fix: support proto-based AgentCard in AgentCardResolver#344
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical compatibility issue within the SDK's Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🧪 Code Coverage
Generated by coverage-comment.yml |
There was a problem hiding this comment.
Code Review
This pull request introduces support for resolving Agent Cards that are served in Protobuf JSON format, which has a different structure from the JSON Schema format the SDK internally uses. The changes correctly detect the protobuf format and normalize it. The implementation is clean and is accompanied by good tests covering both formats. I have one suggestion to enhance the error handling within the new normalization logic to make it more robust against potential detection errors.
ee3422a to
6da5373
Compare
6da5373 to
21e64d3
Compare
🤖 I have created a release *beep* *boop* --- ## [0.3.11](v0.3.10...v0.3.11) (2026-03-10) ### Bug Fixes * support proto-based AgentCard in AgentCardResolver ([#344](#344)) ([e71221c](e71221c)) * throw on JSON-RPC response id mismatch ([#318](#318)) ([5ea1c94](5ea1c94)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
It had nothing to do with 0.3 and 1.0. Re #344
## Description
Fixes an issue where the SDK fails to resolve Agent Cards served in
Protobuf JSON format.
In the v0.3.0 specification, there was a structural drift between the
JSON Schema data model and the Protobuf data model:
- **JSON Schema:** Uses a `"type"` discriminator (e.g., `{"type":
"openIdConnect"}`).
[Source](https://github.com/a2aproject/A2A/blob/8d57eba286de756176892518a8fc39b0ac2ccefb/specification/json/a2a.json#L1757-L1782)
- **Protobuf:** Uses the `oneof` field name as the discriminator (e.g.,
`{"oauth2SecurityScheme": {...}}`).
[Source](https://github.com/a2aproject/A2A/blob/8d57eba286de756176892518a8fc39b0ac2ccefb/specification/grpc/a2a.proto#L502-L510)
🤖 I have created a release *beep* *boop* --- ## [0.3.11](a2aproject/a2a-js@v0.3.10...v0.3.11) (2026-03-10) ### Bug Fixes * support proto-based AgentCard in AgentCardResolver ([a2aproject#344](a2aproject#344)) ([e71221c](a2aproject@e71221c)) * throw on JSON-RPC response id mismatch ([a2aproject#318](a2aproject#318)) ([5ea1c94](a2aproject@5ea1c94)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
It had nothing to do with 0.3 and 1.0. Re a2aproject#344
Description
Fixes an issue where the SDK fails to resolve Agent Cards served in Protobuf JSON format.
In the v0.3.0 specification, there was a structural drift between the JSON Schema data model and the Protobuf data model:
"type"discriminator (e.g.,{"type": "openIdConnect"}). Sourceoneoffield name as the discriminator (e.g.,{"oauth2SecurityScheme": {...}}). Source