feat(a2a): includeArtifacts on GetTask for lean status polls - #69
Conversation
GetTask always returned the task's full artifacts array — the A2A spec
defines an artifact switch only on ListTasks (default exclude), so status
pollers had no way to skip multi-MB inline artifact payloads.
- A2ARequest.TasksGet gains includeArtifacts: Option[Boolean]. Absent or
true keeps the spec-shaped response (include — the opposite default of
ListTasks); false trims artifacts after applyHistoryLength. Read
projection only: the stored task is untouched.
- REST binding parses includeArtifacts/include_artifacts on GET /tasks/{id};
proto GetTaskRequest gains optional bool include_artifacts = 4, a local
extension like tenant.
- Version literal bumped to 0.13.1 for the next release.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review:
|
Review:
|
…ection - A2AGrpcProtoCodecSpec sets include_artifacts=false on the binary request: the value only survives JsonFormat.printer() because the proto field is declared optional, so this is the test that catches a re-vendor or edit dropping the modifier (false would silently decode as include). - A2ACodecSpec: TasksGet optional-false encoder presence, snake_case include_artifacts decode, and the round-trip sample carries the field. - A2AServerLiveSpec: REST ?include_artifacts=false and JSON-RPC includeArtifacts=false both return a body with no artifacts key; the default GET keeps it. - A2ATaskStore.applyArtifactProjection: one projection for GetTask (default include) and ListTasks (default exclude), defaults stated at call sites; handler now reads getOrElse(true) instead of contains(false). - TasksGet scaladoc states the default direction and that suppressed artifacts are omitted from the wire (never write a trimmed result back to a store); README gains the 0.13.1 note; proto/A2A_PROTO_SOURCE.txt lists the local deltas a re-vendor must re-apply. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Addressed the review in 28f7cf9. What changed: Adopted (both reviews' pre-merge asks):
Deferred to #70 (out of this PR's scope): threading Kept as-is, with reasoning:
Full suite green on both platforms (326/326; 🤖 Generated with Claude Code |
Review:
|
What
GetTask always returns the task's full artifacts array. The A2A spec defines an artifact switch only on ListTasks (
include_artifacts, default exclude), so a client polling task status has no way to skip multi-MB inline base64 artifact payloads — on TJC's email-hook reconcile path that is every in-flight task, every 60s (tjc-agents TJC-1962/TJC-1967).Contract
A2ARequest.TasksGetgainsincludeArtifacts: Option[Boolean] = None. Absent or true = include — the opposite default of ListTasks, so every existing caller and the spec-shaped GetTask response are unchanged;falsetrims the artifacts array afterapplyHistoryLength. Read projection only — the stored task keeps its artifacts.includeArtifacts/include_artifacts; REST binding parses the query param onGET /tasks/{id}; protoGetTaskRequestgainsoptional bool include_artifacts = 4(a local extension, same precedent astenant).Tests
./mill agent.testgreen on both platforms (326/326 targets), includingA2AProtoParitySpecexact-set equality and a newA2AServerCoreSpeccase: absent/true keep artifacts, false trims, stored task unaffected.Release intent: tag
v0.13.1after merge (version literal bumped per repo convention); tjc-agents repins viaRuntimeVersions.Scalagent.🤖 Generated with Claude Code