feat: implement tasks/list RPC#210
Conversation
Wire the tasks/list method through all layers: JSON-RPC client/server, gRPC client, proto conversion, transport interface, request handler, and intercepted handler. The task store already implements List() with filtering and pagination. This commit exposes it via the protocol. Closes a2aproject#58
Summary of ChangesHello @birdayz, 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 the Highlights
Changelog
Activity
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
The original comment regarding logging context_id in OnListTasks has been dropped. This is because OnListTasks appears to be a GET-equivalent operation, and according to repository rule 'For REST APIs, GET requests should use URL query parameters for passing parameters, not a request body', such operations should not accept a request body. The original comment implicitly accepted the presence of a request body, thus contradicting this design principle. The underlying design of OnListTasks should be reviewed against this rule.
|
Thanks for working on this and sorry for the confusion. This was already implemented in release/spec-v1 branch. I marked similar issues with an appropriate label, but we should think about making the current state of the repository (with spec-v1 branch) more clear. |
|
That's great actually. What is the planned timeline to get that branch merged? |
We'll keep it separate for a while, but the plan is to add a 1.0-alpha (or similar) release tag next week. It will include gRPC support including 0.3 gRPC and agentcard compatibility mode. Bringing other transports is the next priority. Which transports are you using and how critical is it for you to get this earlier? Is it a new system, are you using in-memory task store? |
|
We are using our own implementation that uses Kafka (Redpanda really )topics as storage. JSON RPC Transport only. I suppose it's important but not critical. We have an inspector UI that users can use to explore sessions - without list tasks, we cannot show the exact task history. This made us implement the state in the UI - just for the debugger - which really does not work well if disconnects happen. Want to move everything server side. |
Nice. Have you looked into implementing a workqueue for work distribution as well? Proposal and example. It has gaps and issues (#200) but I'll be pushing for making it the default mode (with in-memory implementation) after we're done with 1.0 work. Any contributions and / or feedback very welcome.
Why I asked about having a custom task store is that the reasoning behind not having delete (or list previously) was that this does not necessarily need to be a part of the protocol / SDK for implementations to use, meaning you could just expose a separate list endpoint. Given the code already exists and the 0.3 is being retired (otherwise I'd be against having a weird cross-version transitionary state) I merged the change. |
What
Wire the
tasks/listmethod through all protocol layers: JSON-RPC client/server, gRPC client, proto conversion, transport interface, request handler, and intercepted handler.Why
The TSC voted to add
tasks/listwith filtering and pagination to the spec for 0.4.0. The task store already implementsList()with all the filtering logic (context ID, status, last updated time, pagination, history length, artifacts). This was just never exposed through the protocol.Implementation details
Pure plumbing - no new business logic. Each layer gets the obvious
ListTasksmethod that delegates to the next:Transportinterface +unimplementedTransportstubtasks/list, unmarshalsListTasksResponsetasks/listtoonListTasksListTasksRequestHandlerinterface + default impl delegates totaskStore.List()InterceptedHandler: wraps with before/after interceptorsMethodTasksListconstant addedReferences
re #58
Spec PR: a2aproject/A2A#831