Skip to content

[DOCS] ListTasks accepts proto3 default pageToken/pageSize #928

Closed

Description

@inference-gateway-maintainer

Summary

The TypeScript ADK's ListTasks handler now follows the proto3 JSON mapping for default-valued optional params: pageToken: "" returns the first page, pageSize: 0 falls back to the server's default page size, and empty status / contextId apply no filter. Previously each of these was rejected with -32602 invalid params, which locked out Go ADK clients that send the empty page token on their first call. This matches the Go ADK server, which already treated an empty page token as the first page.

Source PR: inference-gateway/typescript-adk#247 (closes inference-gateway/typescript-adk#244)

Affected pages

  • Any A2A protocol / ListTasks pagination reference page that documents the pageToken and pageSize request params.
  • TypeScript ADK server handler docs covering createTaskListHandler.

Acceptance Criteria

  • ListTasks pagination docs state that an empty pageToken means "first page".
  • pageSize: 0 is documented as "use the server default" rather than an error.
  • Empty status / contextId are documented as "no filter".

Activity

  1. added
    documentation
    on Oct 3, 2026
  2. edenreich commented on Oct 3, 2026

    @edenreich
    Contributor

    @claude can you work on this? use /ponytail:ponytail

  3. added theissue type on Oct 3, 2026
  4. inference-gateway-maintainer commented on Oct 3, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 3m 22s —— View job • docs/issue-928-20261003-1335 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-928-20261003-1335?quick_pull=1&title=Issue%20%23928%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23928%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Done - PR #930

    • Gather context (read the upstream task-list.ts handler and PR 247 diff)
    • Marked [DOCS] ListTasks accepts proto3 default pageToken/pageSize #928 In progress, then QA, on the Roadmap 2026 board
    • Document empty pageToken = first page
    • Document pageSize: 0 = server default page size
    • Document empty status / contextId = no filter
    • Validate (lint:md, format:check, build - all pass)
    • Commit + open PR

    What changed

    While reading the handler I found the page was documenting a stale request shape: it described state / limit / cursor / nextCursor, but the handler reads status / pageSize / pageToken and returns nextPageToken. Documenting pageSize: 0 on a page that calls the field limit would have been incoherent, so I aligned the names in the same pass.

    typescript-adk.md, the ListTasks section:

    • New "Default-valued params mean unset" subsection with a table: pageToken: "" -> first page, pageSize: 0 -> server default page size, status: "" / contextId: "" -> no filter. Notes this matches the Go ADK server and is why a Go ADK client can serialize all four fields on its first call.
    • TaskListParams / TaskListResult renamed to the generated ListTasksRequest / ListTasksResponse with their real fields (response now shows pageSize, totalSize, nextPageToken). Dropped the metadata field, which the handler never validates.
    • Validation-contract table loosened to match: pageSize must be a non-negative integer; status / contextId / pageToken must be strings, not non-empty strings. The proto3 defaults are listed next to over-cap pageSize as explicitly not an error.
    • Pagination loop, curl example and JSON response updated to the current field names; the loop now passes the empty page token straight through on the first call rather than conditionally omitting it.

    a2a.md: one sentence next to the existing A2A section 1.4 field-name note, saying the same proto3 mapping governs values, with the ListTasks defaults as the worked example.

    Not done: rust-adk.md and adk.md were left alone - the Rust server is a separate implementation and the Go ADK page documents its own Limit/Offset client helper, neither of which this change touches.
    | Branch | PR #930

  5. inference-gateway-releaser commented on Oct 4, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.21 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions