diff --git a/src/Main/CLI/Commands/GetCommand.cs b/src/Main/CLI/Commands/GetCommand.cs index 420bf8fd6..b8bd656b1 100644 --- a/src/Main/CLI/Commands/GetCommand.cs +++ b/src/Main/CLI/Commands/GetCommand.cs @@ -69,9 +69,26 @@ public override async Task ExecuteAsync( return Constants.ExitCodeUserError; } + // Wrap result with node information + var response = new + { + id = result.Id, + node = node.Id, + content = result.Content, + mimeType = result.MimeType, + byteSize = result.ByteSize, + contentCreatedAt = result.ContentCreatedAt, + recordCreatedAt = result.RecordCreatedAt, + recordUpdatedAt = result.RecordUpdatedAt, + title = result.Title, + description = result.Description, + tags = result.Tags, + metadata = result.Metadata + }; + // If --full flag is set, ensure verbose mode for human formatter // For JSON/YAML, all fields are always included - formatter.Format(result); + formatter.Format(response); return Constants.ExitCodeSuccess; } diff --git a/src/Main/CLI/Commands/ListCommand.cs b/src/Main/CLI/Commands/ListCommand.cs index dec7cef99..2a1a4e98f 100644 --- a/src/Main/CLI/Commands/ListCommand.cs +++ b/src/Main/CLI/Commands/ListCommand.cs @@ -74,8 +74,25 @@ public override async Task ExecuteAsync( // Get page of items var items = await service.ListAsync(settings.Skip, settings.Take, CancellationToken.None).ConfigureAwait(false); + // Wrap items with node information + var itemsWithNode = items.Select(item => new + { + id = item.Id, + node = node.Id, + content = item.Content, + mimeType = item.MimeType, + byteSize = item.ByteSize, + contentCreatedAt = item.ContentCreatedAt, + recordCreatedAt = item.RecordCreatedAt, + recordUpdatedAt = item.RecordUpdatedAt, + title = item.Title, + description = item.Description, + tags = item.Tags, + metadata = item.Metadata + }); + // Format list with pagination info - formatter.FormatList(items, totalCount, settings.Skip, settings.Take); + formatter.FormatList(itemsWithNode, totalCount, settings.Skip, settings.Take); return Constants.ExitCodeSuccess; }