-
Notifications
You must be signed in to change notification settings - Fork 266
fix(grpc): Fix inconsistent property name between gRPC and JSON-RPC in Message object #512
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
base: main
Are you sure you want to change the base?
fix(grpc): Fix inconsistent property name between gRPC and JSON-RPC in Message object #512
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 significantly enhances the A2A service API by integrating a new 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.
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 updates the A2A specification, primarily by renaming the content field to parts within the Message object and introducing a new ListTasks RPC. The changes across the generated protobuf files and Pydantic type definitions appear consistent with these updates. My review highlights opportunities to enhance data validation in the new Pydantic models and points out some structural redundancies that could be simplified. More critically, I've noted that while the ListTasks RPC is now defined, its server-side and client-side implementations are missing, rendering the feature incomplete. These omissions are flagged as high-severity issues that need to be addressed.
| self.ListTasks = channel.unary_unary( | ||
| '/a2a.v1.A2AService/ListTasks', | ||
| request_serializer=a2a__pb2.ListTasksRequest.SerializeToString, | ||
| response_deserializer=a2a__pb2.ListTasksResponse.FromString, | ||
| _registered_method=True) |
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.
| def ListTasks(self, request, context): | ||
| """List tasks with optional filtering and pagination. | ||
| """ | ||
| context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
| context.set_details('Method not implemented!') | ||
| raise NotImplementedError('Method not implemented!') |
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.
| SendMessageRequest | ||
| | SendStreamingMessageRequest | ||
| | GetTaskRequest | ||
| | ListTasksRequest |
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.
This union is redundant. The type for the RootModel is already defined in the class's generic type parameter (lines 1756-1768). This root attribute with its type hint should be removed to avoid redundancy and simplify the class definition. The same issue exists for the JSONRPCResponse class (defined around line 2102).
| """ | ||
| Filter tasks by context ID to get tasks from a specific conversation or session. | ||
| """ | ||
| history_length: int | None = None |
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.
| """ | ||
| Request-specific metadata. | ||
| """ | ||
| page_size: int | None = None |
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.
Commit: a2aproject/A2A@2a1f819