Update to specification from 0e204bf878eb63619e205d3419ebc48d4cd35849#620
Update to specification from 0e204bf878eb63619e205d3419ebc48d4cd35849#620
Conversation
Summary of ChangesHello @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 introduces several updates to the core A2A protocol definition, including modifications to data structures, service interfaces, and gRPC configurations. These changes aim to improve the functionality and maintain consistency across the A2A system. Highlights
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
|
There was a problem hiding this comment.
Code Review
This pull request updates the generated Protobuf and type definition files based on a new version of the A2A specification. This introduces numerous breaking changes to the API surface, such as renaming fields (e.g., Message.content to Message.parts) and RPC methods (e.g., TaskSubscription to SubscribeToTask). However, the pull request does not include the corresponding updates to the client and server code that consumes this API. For example, src/a2a/client/transports/grpc.py and src/a2a/server/request_handlers/grpc_handler.py will be broken by these changes. Merging this PR as-is will break the build and render the gRPC transport unusable. The PR should be updated to include all necessary changes to the consumer code to adapt to the new API.
| self.SubscribeToTask = channel.unary_stream( | ||
| '/a2a.v1.A2AService/SubscribeToTask', | ||
| request_serializer=a2a__pb2.SubscribeToTaskRequest.SerializeToString, | ||
| response_deserializer=a2a__pb2.StreamResponse.FromString, | ||
| _registered_method=True) |
There was a problem hiding this comment.
The RPC method TaskSubscription has been renamed to SubscribeToTask. This is a breaking change. The client and server implementations that use this method, such as in src/a2a/client/transports/grpc.py and src/a2a/server/request_handlers/grpc_handler.py, need to be updated accordingly. These updates are missing from this pull request.
| self.SetTaskPushNotificationConfig = channel.unary_unary( | ||
| '/a2a.v1.A2AService/SetTaskPushNotificationConfig', | ||
| request_serializer=a2a__pb2.SetTaskPushNotificationConfigRequest.SerializeToString, | ||
| response_deserializer=a2a__pb2.TaskPushNotificationConfig.FromString, | ||
| _registered_method=True) |
| self.GetExtendedAgentCard = channel.unary_unary( | ||
| '/a2a.v1.A2AService/GetExtendedAgentCard', | ||
| request_serializer=a2a__pb2.GetExtendedAgentCardRequest.SerializeToString, | ||
| response_deserializer=a2a__pb2.AgentCard.FromString, | ||
| _registered_method=True) |
|
|
||
| class SendMessageConfiguration(_message.Message): | ||
| __slots__ = ("accepted_output_modes", "push_notification", "history_length", "blocking") | ||
| __slots__ = ("accepted_output_modes", "push_notification_config", "history_length", "blocking") |
|
|
||
| class TaskStatus(_message.Message): | ||
| __slots__ = ("state", "update", "timestamp") | ||
| __slots__ = ("state", "message", "timestamp") |
|
|
||
| class Message(_message.Message): | ||
| __slots__ = ("message_id", "context_id", "task_id", "role", "content", "metadata", "extensions") | ||
| __slots__ = ("message_id", "context_id", "task_id", "role", "parts", "metadata", "extensions", "reference_task_ids") |
| """A2AService defines the operations of the A2A protocol. | ||
| """ |
There was a problem hiding this comment.
This detailed docstring provided a good overview of the gRPC service design and its resources. Removing it reduces clarity for developers trying to understand the service structure. If the service structure has changed significantly, it would be better to update the docstring to reflect the new design rather than removing it entirely.
Commit: a2aproject/A2A@0e204bf