From e1d304a32460650a2922c0d7bdc7d5be8a8357b3 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 23:39:53 +0000 Subject: [PATCH 1/2] feat(tasks): Show all Task attributes in list command Add missing Task attributes to the list command output: - Kind: Display the task kind/type - Artifacts: Show artifact details including ID, name, description, and part count - Metadata: Display any task metadata key-value pairs This provides complete visibility into all Task attributes as defined in the A2A specification, addressing the issue where attributes like artifacts were missing from the list output. Fixes #12 Co-authored-by: Eden Reich --- cli/cli.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/cli/cli.go b/cli/cli.go index 3760849..671fc9f 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -438,6 +438,7 @@ var listTasksCmd = &cobra.Command{ for i, task := range taskList.Tasks { fmt.Printf("%d. Task ID: %s\n", i+1, task.ID) fmt.Printf(" Context ID: %s\n", task.ContextID) + fmt.Printf(" Kind: %s\n", task.Kind) fmt.Printf(" Status: %s\n", task.Status.State) if task.Status.Message != nil { fmt.Printf(" Message ID: %s\n", task.Status.Message.MessageID) @@ -446,6 +447,35 @@ var listTasksCmd = &cobra.Command{ if task.Status.Timestamp != nil { fmt.Printf(" Timestamp: %s\n", *task.Status.Timestamp) } + + // Display artifacts if any + if len(task.Artifacts) > 0 { + fmt.Printf(" Artifacts (%d):\n", len(task.Artifacts)) + for j, artifact := range task.Artifacts { + fmt.Printf(" %d. ID: %s", j+1, artifact.ArtifactID) + if artifact.Name != nil { + fmt.Printf(" | Name: %s", *artifact.Name) + } + if artifact.Description != nil { + fmt.Printf(" | Description: %s", *artifact.Description) + } + fmt.Printf(" | Parts: %d", len(artifact.Parts)) + fmt.Printf("\n") + } + } else { + fmt.Printf(" Artifacts: None\n") + } + + // Display metadata if any + if len(task.Metadata) > 0 { + fmt.Printf(" Metadata:\n") + for key, value := range task.Metadata { + fmt.Printf(" %s: %v\n", key, value) + } + } else { + fmt.Printf(" Metadata: None\n") + } + fmt.Printf("\n") } From c1cbac7825bd0547fd378f13d73175ac17c4a029 Mon Sep 17 00:00:00 2001 From: Eden Reich Date: Sat, 4 Oct 2025 01:46:31 +0200 Subject: [PATCH 2/2] chore: Remove redundant inline comment --- cli/cli.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cli/cli.go b/cli/cli.go index 671fc9f..59432dc 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -448,7 +448,6 @@ var listTasksCmd = &cobra.Command{ fmt.Printf(" Timestamp: %s\n", *task.Status.Timestamp) } - // Display artifacts if any if len(task.Artifacts) > 0 { fmt.Printf(" Artifacts (%d):\n", len(task.Artifacts)) for j, artifact := range task.Artifacts { @@ -466,7 +465,6 @@ var listTasksCmd = &cobra.Command{ fmt.Printf(" Artifacts: None\n") } - // Display metadata if any if len(task.Metadata) > 0 { fmt.Printf(" Metadata:\n") for key, value := range task.Metadata {