Skip to content

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

edenreich
Copy link

@edenreich edenreich commented Jul 3, 2025

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:

  • Follow the CONTRIBUTING Guide.
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
  • Ensure the tests and linter pass (Run nox -s format from the repository root to format)
  • Appropriate docs were updated (if necessary)
  • Fix existing linting errors (I guess they were already on the main upstream)

Fixes #761 🦕

@edenreich edenreich requested a review from a team as a code owner July 3, 2025 17:15
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 new tasks/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 by contextId and status, as well as pagination using limit and offset 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

  1. 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.

@edenreich edenreich changed the title docs: Add 'tasks/list' method with filtering and pagination to the specification feat: Add 'tasks/list' method with filtering and pagination to the specification Jul 3, 2025
@edenreich edenreich changed the title feat: Add 'tasks/list' method with filtering and pagination to the specification feat(spec): Add 'tasks/list' method with filtering and pagination to the specification Jul 3, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

@holtskinner holtskinner changed the title feat(spec): Add 'tasks/list' method with filtering and pagination to the specification feat(spec): Add tasks/list method with filtering and pagination to the specification Jul 4, 2025
@edenreich
Copy link
Author

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.

@edenreich edenreich force-pushed the feature/implement-list-tasks branch from bb07e2f to 3262d7f Compare July 11, 2025 08:56
@edenreich edenreich requested a review from holtskinner July 11, 2025 08:57
…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>
@holtskinner holtskinner force-pushed the feature/implement-list-tasks branch from 2caed14 to 785925a Compare July 16, 2025 16:52
@holtskinner
Copy link
Member

holtskinner commented Jul 16, 2025

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?

@a2aproject a2aproject deleted a comment from gemini-code-assist bot Jul 16, 2025
@holtskinner
Copy link
Member

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Comment on lines +173 to +176
- **`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`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider adding TaskNotFoundError and TaskNotCancelableError to the list of possible errors for this endpoint.

Suggested change
- **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)).

@holtskinner holtskinner requested a review from a team as a code owner July 23, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat]: The ability to list tasks (tasks/list) in addition to the existing get (tasks/get)
4 participants