-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(spec): Add tasks/list
method with filtering and pagination to the specification
#831
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?
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 @edenreich, 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 a new tasks/list
method to the A2A protocol specification. This addition significantly enhances the protocol's task management capabilities by allowing clients to retrieve a paginated and filterable list of tasks, enabling more efficient discovery and oversight of ongoing or completed operations.
Highlights
- New
tasks/list
Method: A newtasks/list
method has been added to the A2A protocol, enabling clients to query and retrieve a list of tasks. - Filtering and Pagination Capabilities: The
tasks/list
method supports filtering bycontextId
andstatus
, as well as pagination usinglimit
andoffset
parameters, providing flexible task discovery and management. - Comprehensive Specification Updates: The new method is fully documented across the specification, including its detailed parameters (
ListTasksParams
) and result (ListTasksResult
) objects, along with usage examples. - Protocol Definition Updates: Corresponding updates have been made to the gRPC (
a2a.proto
), JSON Schema (a2a.json
), and TypeScript (types.ts
) definitions to incorporate the new method and its associated types.
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 is currently in preview and 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 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 adds the tasks/list
method to the A2A specification, enabling clients to retrieve a paginated and filterable list of tasks. The changes are consistently applied across the markdown documentation, gRPC proto definitions, JSON schema, and TypeScript types. My review focuses on the design of the new endpoint, particularly the pagination strategy and the clarity of the gRPC request parameters. I've identified a couple of areas for improvement regarding consistency and potential ambiguity to ensure the specification is robust and clear for implementers.
tasks/list
method with filtering and pagination to the specification
Not sure about this linting error of 404.html file, I didn't even touched this file. I guess it will be fixed on the main upstream. |
bb07e2f
to
3262d7f
Compare
…ecification Signed-off-by: Eden Reich <eden.reich@gmail.com>
wap definitions for 'CancelTaskRequest' and 'ListTasksRequest' in JSON schema; add detailed structure for 'ListTasks' methods. And mark the file as generated so it's easier to understand that this file is generated and it doesn't expand on the pull request. Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ation Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ation approach Signed-off-by: Eden Reich <eden.reich@gmail.com>
…or tokens Signed-off-by: Eden Reich <eden.reich@gmail.com>
2caed14
to
785925a
Compare
I did a rebase to pull in the updates from main so the lint errors don't mess with your PR. @kthota-g and @pstephengoogle Can you please review/approve this change to the spec? |
/gemini review |
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 tasks/list
method to the A2A specification, enabling clients to fetch tasks with filtering and pagination. The changes are comprehensive, updating the main specification document, gRPC proto, JSON schema, and TypeScript types. The implementation of cursor-based pagination is well-documented. I've identified some inconsistencies in the documentation examples and missing information that could cause confusion for implementers. My review includes suggestions to align the documentation and improve clarity. Overall, this is a valuable addition to the protocol.
- **`tasks/list`:** (Request/Response) | ||
- Retrieves a list of tasks with optional filtering and pagination. | ||
- `params`: `ListTasksParams` (optional: `contextId`, `status`, `limit`, `offset`, `historyLength`). | ||
- `result`: `ListTasksResult` (includes `tasks[]`, `total`, `limit`, `offset`). |
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.
The description of the tasks/list
method's parameters and result uses offset-based pagination (limit
, offset
), which is inconsistent with the cursor-based pagination (pageSize
, pageToken
, nextPageToken
) used in the main specification and the defined types.
Consider updating the description to reflect the actual implementation to avoid confusion for developers using this summary.
- `params`: `ListTasksParams` (optional: `contextId`, `status`, `pageSize`, `pageToken`, `historyLength`).
- `result`: `ListTasksResult` (includes `tasks[]`, `totalSize`, `pageSize`, `nextPageToken`).
|
||
</div> | ||
|
||
#### 7.4.1. `TaskIdParams` Object (for `tasks/cancel` and `tasks/pushNotificationConfig/get`) | ||
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`TaskNotFoundError`](#82-a2a-specific-errors), [`TaskNotCancelableError`](#82-a2a-specific-errors)). |
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.
Consider adding TaskNotFoundError
and TaskNotCancelableError
to the list of possible errors for this endpoint.
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`TaskNotFoundError`](#82-a2a-specific-errors), [`TaskNotCancelableError`](#82-a2a-specific-errors)). | |
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`TaskNotFoundError`](#82-a2a-specific-errors), [`TaskNotCancelableError`](#82-a2a-specific-errors)). |
Description
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
CONTRIBUTING
Guide.nox -s format
from the repository root to format)Fixes #761 🦕