using System;
using System.Threading.Tasks;
using CliFx;
using CliFx.Attributes;
using CliFx.Infrastructure;

namespace MxAccess.Cli.Commands
{
    [Command("info", Description = "Print runtime info: loaded MxAccess assembly, supported value types, status enum names.")]
    public sealed class InfoCommand : ICommand
    {
        public ValueTask ExecuteAsync(IConsole console)
        {
            var asm = typeof(ArchestrA.MxAccess.LMXProxyServerClass).Assembly;
            console.Output.WriteLine($"MxAccess assembly : {asm.GetName().FullName}");
            console.Output.WriteLine($"  location        : {asm.Location}");
            console.Output.WriteLine();
            console.Output.WriteLine("Supported --type values for write:");
            console.Output.WriteLine("  bool, byte, short, int (int32), long (int64),");
            console.Output.WriteLine("  float (single), double, string, datetime");
            console.Output.WriteLine();
            console.Output.WriteLine("MxStatusCategory values:");
            foreach (var n in Enum.GetNames(typeof(ArchestrA.MxAccess.MxStatusCategory)))
                console.Output.WriteLine("  " + n);
            console.Output.WriteLine();
            console.Output.WriteLine("LLM-JSON envelope shape: { query, ok, results: [...] }");
            return default;
        }
    }
}
