fix(dispatch): align A2A protocol with v0.3.0 message/send - #48
Open
addadi wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #42
buildA2aRequestBodyemitted the A2A v0.2 shape: methodtasks/sendand parts discriminated by"type". Current nullclaw (and A2A v0.3.0) requiresmessage/send,parts[].kind, and a message object withkind:"message"+messageId. Dispatching to an A2A worker failed protocol validation on the worker side.messageIdfrom thecontext_id. Session semantics unchanged (samecontext_id= same conversation).parseA2aResponseonly understood the legacyresult.artifacts[0].parts[0].textshape;message/sendreturns the Message object directly, so extractresult.parts[0].textfirst 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).