Skip to content

fix(dispatch): align A2A protocol with v0.3.0 message/send - #48

Merged
vernonstinebaker merged 1 commit into
nullclaw:mainfrom
addadi:fix/a2a-message-send-v0.3.0
Sep 28, 2026
Merged

vernonstinebaker merged 1 commit into
nullclaw:mainfrom
addadi:fix/a2a-message-send-v0.3.0

Conversation

@addadi

@addadi addadi commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #42

buildA2aRequestBody emitted the A2A v0.2 shape: method tasks/send and parts discriminated by "type". Current nullclaw (and A2A v0.3.0) requires message/send, parts[].kind, and a message object with kind:"message" + messageId. Dispatching to an A2A worker failed protocol validation on the worker side.

  • Request side: emit the v0.3.0 shape, deriving messageId from the context_id. Session semantics unchanged (same context_id = same conversation).
  • Response side: parseA2aResponse only understood the legacy result.artifacts[0].parts[0].text shape; message/send returns the Message object directly, so extract result.parts[0].text first and keep the artifacts path as legacy fallback.

Tests updated to the new contract; new test for Message-shape response parsing. Full suite green (zig build test, 356/356).

buildA2aRequestBody emitted the A2A v0.2 shape: method tasks/send and
parts discriminated by "type". Current nullclaw (and A2A v0.3.0)
requires message/send, parts[].kind, and a message object with
kind:"message" + messageId. Dispatching to an A2A worker failed
protocol validation on the worker side.

Request side: emit the v0.3.0 shape, deriving messageId from the
context_id. Session semantics unchanged (same context_id = same
conversation).

Response side: parseA2aResponse only understood the legacy
result.artifacts[0].parts[0].text shape; message/send returns the
Message object directly, so extract result.parts[0].text first and keep
the artifacts path as legacy fallback.

Tests updated to the new contract; new test for Message-shape response
parsing.

Fixes nullclaw#42

@vernonstinebaker vernonstinebaker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated against a live cross-component test: nullclaw's A2A server (v0.3.0) requires exactly this shape — method message/send, parts discriminated by kind, message kind: "message" with non-empty messageId — and returns the reply Message as the result, which the new response parser reads correctly. Diff is minimal and confined to dispatch.zig, tests updated. Also empirically confirmed the bug this fixes: Boiler's current tasks/send dispatch fails against nullclaw (#42 / this issue) and against ZeroClaw (which speaks A2A 1.0 SendMessage — three dialects now in the org; flagging that A2A 1.0 support may deserve a follow-up). Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: A2A dispatch uses tasks/send (v0.2) — incompatible with nullclaw A2A v0.3.0 message/send

2 participants