feat: accept v1.0 PascalCase JSON-RPC method names#16
Open
zeroasterisk wants to merge 2 commits intoactioncard:mainfrom
Open
feat: accept v1.0 PascalCase JSON-RPC method names#16zeroasterisk wants to merge 2 commits intoactioncard:mainfrom
zeroasterisk wants to merge 2 commits intoactioncard:mainfrom
Conversation
added 2 commits
March 21, 2026 05:47
- Client now sends PascalCase method names (SendMessage, GetTask, etc.) matching the v1.0 A2A spec by default - Add method_style option (:v1 default, :legacy for v0.3 servers) - Server already accepted both formats via @method_aliases (fix comment) - Add 4 missing PascalCase server dispatch tests (SubscribeToTask, GetTaskPushNotificationConfig, ListTaskPushNotificationConfigs, DeleteTaskPushNotificationConfig) - Add 4 client method_style tests (v1 default + legacy fallback) - All 397 tests pass, 0 failures
Existing users talking to v0.3 servers should not break when upgrading. PascalCase is opt-in via method_style: :v1.
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.
Part of #13 (A2A v1.0 Protocol Support)
What this PR does
Server (already present, minor fix)
The server's
@method_aliasesinlib/a2a/jsonrpc.exalready maps all 11 v1.0 PascalCase method names to internal slash-style names. This PR fixes the comment (was labeled "v0.3.0" → now "v1.0") and adds 4 missing test cases.Client (
lib/a2a/client.ex)SendMessage,GetTask,CancelTask,SendStreamingMessage):method_styleoption onA2A.Client.new/2::v1(default) — PascalCase names per A2A v1.0 spec:legacy— slash-style names for backward compatibility with v0.3 serversTests
SubscribeToTask,GetTaskPushNotificationConfig,ListTaskPushNotificationConfigs,DeleteTaskPushNotificationConfigmethod_styletests (v1 default + legacy fallback for send/get/cancel)Method mapping (all 11 from proto
service A2AService)No breaking changes — the server continues to accept both formats.
Fixes part of #13