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 API by introducing 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.
Code Review
This pull request updates the A2A specification and the corresponding generated Python files to introduce the ListTasks functionality. The changes correctly add the necessary protobuf messages, gRPC service definitions, and Pydantic models for the JSON-RPC transport. It appears the implementation of these new endpoints in the server handlers and client transports is planned for future work.
My review focuses on the manually edited src/a2a/types.py file. I've suggested adding Pydantic validators to the ListTasksParams model to enforce constraints mentioned in the docstrings, which will improve data integrity. I also pointed out a small inconsistency in a docstring for better clarity. Overall, the changes are well-structured and align with the existing design.
39b57dc to
e5853a6
Compare
tasks/list method with filtering and pagination to the specification
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the tasks/list method, providing filtering and pagination capabilities for tasks. The changes are extensive, touching the client, server, transports, data stores, and tests. The implementation is solid, but I have a few suggestions to improve consistency, validation, and code clarity. Specifically, I recommend centralizing the payload reduction logic, adding a validator for request parameters, and removing some dead code. Overall, a great addition to the A2A specification.
Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the tasks/list method across the entire stack, from the specification and type definitions to client and server implementations for all transports (gRPC, JSON-RPC, REST), and includes comprehensive tests. The changes are well-structured and thorough. I've found a few minor issues, mostly related to robustness, documentation, and a small bug in a test case. Overall, this is a solid contribution.
# Description Do not use `NULLS LAST` which is not available in MySQL, coalesce nulls to empty strings which will appear last in descending ordering (there are tests for this behavior already, however CI wasn't enabled for this branch). Currently `NULLS LAST` fails MySQL tests: ``` (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULLS LAST, tasks.id DESC \n LIMIT 51' at line 3") ``` ([actions run](https://github.com/a2aproject/a2a-python/actions/runs/21520017047/job/62008309612?pr=651)) Enable tests run against `1.0-dev` to prevent it in the future. Re #511 Fixes #652 --- Mark as "refactor" for release please as it's a fix for a non-released feature, hence shouldn't get into a changelog. BEGIN_COMMIT_OVERRIDE refactor: use MySQL compatible syntax in list tasks END_COMMIT_OVERRIDE
…the specification (#511) Commit: a2aproject/A2A@0a9f629 This PR introduces support for the new `tasks/list` method, including: - Automatically generated type definitions from the specification. - Complete client-side and server-side implementations. Fixes #515 🦕 --------- Co-authored-by: lkawka <lkawka@google.com> Co-authored-by: lkawka <luk.kawka@gmail.com> Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com>
# Description Do not use `NULLS LAST` which is not available in MySQL, coalesce nulls to empty strings which will appear last in descending ordering (there are tests for this behavior already, however CI wasn't enabled for this branch). Currently `NULLS LAST` fails MySQL tests: ``` (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULLS LAST, tasks.id DESC \n LIMIT 51' at line 3") ``` ([actions run](https://github.com/a2aproject/a2a-python/actions/runs/21520017047/job/62008309612?pr=651)) Enable tests run against `1.0-dev` to prevent it in the future. Re #511 Fixes #652 --- Mark as "refactor" for release please as it's a fix for a non-released feature, hence shouldn't get into a changelog. BEGIN_COMMIT_OVERRIDE refactor: use MySQL compatible syntax in list tasks END_COMMIT_OVERRIDE
🤖 I have created a release *beep* *boop* --- ### ⚠ BREAKING CHANGES * **spec**: upgrade SDK to A2A 1.0 spec and use proto-based types ([#572](#572), [#665](#665), [#804](#804), [#765](#765)) * **client:** introduce ServiceParameters for extensions and include it in ClientCallContext ([#784](#784)) * **client:** rename "callback" -> "push_notification_config" ([#749](#749)) * **client:** transport agnostic interceptors ([#796](#796)) ([a910cbc](a910cbc)) * add `protocol_version` column to Task and PushNotificationConfig models and create a migration ([#789](#789)) ([2e2d431](2e2d431)) * **server:** implement `Resource Scoping` for tasks and push notifications ([#709](#709)) ([f0d4669](f0d4669)) ### Features * add GetExtendedAgentCardRequest as input parameter to GetExtendedAgentCard method ([#767](#767)) ([13a092f](13a092f)) * add validation for the JSON-RPC version ([#808](#808)) ([6eb7e41](6eb7e41)) * **client:** expose close() and async context manager support on abstract Client ([#719](#719)) ([e25ba7b](e25ba7b)) * **compat:** AgentCard backward compatibility helpers and tests ([#760](#760)) ([81f3494](81f3494)) * **compat:** GRPC client compatible with 0.3 server ([#779](#779)) ([0ebca93](0ebca93)) * **compat:** GRPC server compatible with 0.3 client ([#772](#772)) ([80d827a](80d827a)) * **compat:** legacy v0.3 protocol models, conversion logic and utilities ([#754](#754)) ([26835ad](26835ad)) * **compat:** REST and JSONRPC clients compatible with 0.3 servers ([#798](#798)) ([08794f7](08794f7)) * **compat:** REST and JSONRPC servers compatible with 0.3 clients ([#795](#795)) ([9856054](9856054)) * **compat:** set a2a-version header to 1.0.0 ([#764](#764)) ([4cb68aa](4cb68aa)) * **compat:** unify v0.3 REST url prefix and expand cross-version tests ([#820](#820)) ([0925f0a](0925f0a)) * database forward compatibility: make `owner` field optional ([#812](#812)) ([cc29d1f](cc29d1f)) * handle tenant in Client ([#758](#758)) ([5b354e4](5b354e4)) * implement missing push notifications related methods ([#711](#711)) ([041f0f5](041f0f5)) * implement rich gRPC error details per A2A v1.0 spec ([#790](#790)) ([245eca3](245eca3)) * **rest:** add tenant support to rest ([#773](#773)) ([4771b5a](4771b5a)) * send task as a first subscribe event ([#716](#716)) ([e71ac62](e71ac62)) * **server, grpc:** Implement tenant context propagation for gRPC requests. ([#781](#781)) ([164f919](164f919)) * **server, json-rpc:** Implement tenant context propagation for JSON-RPC requests. ([#778](#778)) ([72a330d](72a330d)) * **server:** add v0.3 legacy compatibility for database models ([#783](#783)) ([08c491e](08c491e)) * **spec:** add `tasks/list` method with filtering and pagination to the specification ([#511](#511)) ([d5818e5](d5818e5)) * use StreamResponse as push notifications payload ([#724](#724)) ([a149a09](a149a09)) * **rest:** update REST error handling to use `google.rpc.Status` ([#838](#838)) ([ea7d3ad](ea7d3ad)) ### Bug Fixes * add history length and page size validations ([#726](#726)) ([e67934b](e67934b)) * allign error codes with the latest spec ([#826](#826)) ([709b1ff](709b1ff)) * **client:** align send_message signature with BaseClient ([#740](#740)) ([57cb529](57cb529)) * get_agent_card trailing slash when agent_card_path="" ([#799](#799)) ([#800](#800)) ([a55c97e](a55c97e)) * handle parsing error in REST ([#806](#806)) ([bbd09f2](bbd09f2)) * Improve error handling for Timeout exceptions on REST and JSON-RPC clients ([#690](#690)) ([2acd838](2acd838)) * Improve streaming errors handling ([#576](#576)) ([7ea7475](7ea7475)) * properly handle unset and zero history length ([#717](#717)) ([72a1007](72a1007)) * return entire history when history_length=0 ([#537](#537)) ([acdc0de](acdc0de)) * return mandatory fields from list_tasks ([#710](#710)) ([6132053](6132053)) * taskslist error on invalid page token and response serialization ([#814](#814)) ([a102d31](a102d31)) * use correct REST path for Get Extended Agent Card operation ([#769](#769)) ([ced3f99](ced3f99)) * Use POST method for REST endpoint /tasks/{id}:subscribe ([#843](#843)) ([a0827d0](a0827d0)) --- 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: Ivan Shymko <ishymko@google.com>
Commit: a2aproject/A2A@0a9f629
This PR introduces support for the new
tasks/listmethod, including:Fixes #515 🦕