-
Notifications
You must be signed in to change notification settings - Fork 337
feat!: Add method for fetching extended card #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: Add method for fetching extended card #361
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @a2a-bot, 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 updates the A2A specification by incorporating new types and methods related to an "Authenticated Extended Card" feature. It introduces a new error type, a new request type, and corresponding success and combined response types for retrieving this card. Additionally, it integrates these new types into the existing A2A JSON-RPC request and response structures and clarifies a description in the Task model.
Highlights
- New Error Type: A new error type,
AuthenticatedExtendedCardNotConfiguredError, has been introduced to specifically handle scenarios where an authenticated extended card is not configured, providing a clear error code and message. - New JSON-RPC Request: The specification now includes
GetAuthenticatedExtendedCardRequest, a new JSON-RPC request type that defines the structure for clients to request an authenticated extended card from an agent. - New JSON-RPC Responses: Corresponding success and combined response types,
GetAuthenticatedExtendedCardSuccessResponseandGetAuthenticatedExtendedCardResponse, have been added to handle the outcomes of the newagent/getAuthenticatedExtendedCardmethod, ensuring proper data serialization for both successful retrievals and errors. - Specification Integration: Core A2A union types such as
A2AError,JSONRPCErrorResponse,A2ARequest, andJSONRPCResponsehave been updated to seamlessly integrate the newly defined error, request, and response types, maintaining the integrity of the overall specification. - Documentation Clarification: A minor but important clarification has been made to the description of the
idfield within theTaskmodel, specifying that the task ID is now generated by the server.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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 or fill out our survey to provide feedback.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces the necessary Pydantic models for the new agent/getAuthenticatedExtendedCard JSON-RPC method, including request, response, and error types. The changes correctly integrate these new types into the existing type hierarchy.
However, the pull request appears to be incomplete. To make this feature functional and maintainable, the following components are missing:
- Tests: There are no new tests in
tests/test_types.pyto validate the new Pydantic models. Adding tests is crucial to prevent future regressions. - Server-side Implementation: The new RPC method is not handled on the server. This would require changes in
src/a2a/server/request_handlers/jsonrpc_handler.pyandsrc/a2a/server/apps/jsonrpc/jsonrpc_app.py. - Client-side Implementation: The client in
src/a2a/client/client.pyhas not been updated to include a method for callingagent/getAuthenticatedExtendedCard.
While this might be the first in a series of PRs, it's generally better to include the implementation and tests for a new feature in a single, self-contained pull request. Please add the missing components or clarify the plan for introducing them.
🤖 I have created a release *beep* *boop* --- ## [0.3.0](v0.2.16...v0.3.0) (2025-07-31) ### ⚠ BREAKING CHANGES * **deps:** Make opentelemetry an optional dependency ([#369](#369)) * **spec:** Update Agent Card Well-Known Path to `/.well-known/agent-card.json` ([#320](#320)) * Remove custom `__getattr__` and `__setattr__` for `camelCase` fields in `types.py` ([#335](#335)) * Add mTLS to SecuritySchemes, add oauth2 metadata url field, allow Skills to specify Security ([#362](#362)) * Support for serving agent card at deprecated path ([#352](#352)) ### Features * Add `metadata` as parameter to `TaskUpdater.update_status()` ([#371](#371)) ([9444ed6](9444ed6)) * Add mTLS to SecuritySchemes, add oauth2 metadata url field, allow Skills to specify Security ([#362](#362)) ([be6c517](be6c517)) * Add RESTful API Serving ([#348](#348)) ([82a6b7c](82a6b7c)) * Add server-side support for plumbing requested and activated extensions ([#333](#333)) ([4d5b92c](4d5b92c)) * Allow agent cards (default and extended) to be dynamic ([#365](#365)) ([ee92aab](ee92aab)) * Support for serving agent card at deprecated path ([#352](#352)) ([2444034](2444034)) * support non-blocking `sendMessage` ([#349](#349)) ([70b4999](70b4999)) * Type update to support fetching extended card ([#361](#361)) ([83304bb](83304bb)) ### Bug Fixes * Add Input Validation for Task Context IDs in new_task Function ([#340](#340)) ([a7ed7ef](a7ed7ef)) * **deps:** Reduce FastAPI library required version to `0.95.0` ([#372](#372)) ([a319334](a319334)) * Remove `DeprecationWarning` for regular properties ([#345](#345)) ([2806f3e](2806f3e)) * **spec:** Add `SendMessageRequest.request` `json_name` mapping to `message` proto ([bc97cba](bc97cba)) * **spec:** Add Transport enum to specification (a2aproject/A2A#909) ([d9e463c](d9e463c)) ### Documentation * Address typos in docstrings and docs. ([#370](#370)) ([ee48d68](ee48d68)) ### Miscellaneous Chores * Add support for authenticated extended card method ([#356](#356)) ([b567e80](b567e80)) ### Code Refactoring * **deps:** Make opentelemetry an optional dependency ([#369](#369)) ([9ad8b96](9ad8b96)) * Remove custom `__getattr__` and `__setattr__` for `camelCase` fields in `types.py` ([#335](#335)) ([cd94167](cd94167)) * **spec:** Update Agent Card Well-Known Path to `/.well-known/agent-card.json` ([#320](#320)) ([270ea9b](270ea9b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Description
This change adds support for a new JSON-RPC method
agent/getAuthenticatedExtendedCardfor fetching authenticated extendedcard.
This is only applicable if
AgentCard.supportsAuthenticatedExtendedCardbit is set to
truethat allows fetching authenticated context specificagent card.
In the previous versions, the extended card was served via
{AgentCard.url}/../agent/authenticatedExtendedCardendpoint. Thisendpoint is being removed in favor of the JSON-RPC method. This endpoint
will be deprecated in the SDKs and will be removed in a future release.
Protocol Update: a2aproject/A2A@2cd7d98
Release-As: 0.3.0