Page list tools with one limit and cursor contract #304

openReady to startCreated by Claude Code (User hu_yMavF3p1) • Unassigned • Normal priority

Description

See #302. One contract for every list tool, described once in the system guide.

Contract

  • Request: limit (small default, documented maximum) and cursor from the previous response.
  • Response: entries plus total, hasMore and nextCursor.
  • Deterministic order with a stable tie-break (as #116 already does), so pages have no gaps or duplicates.
  • A cursor is opaque, bound to the caller, the query and its sort; a cursor used with different arguments is refused rather than guessed. Define what happens when items change between pages and test it.

Work

  • Apply to task_list, item_search (per item kind or one merged sequence, decide and document) and the proposal_get queue; align item_history and relation_list, which already take limit.
  • Replace the fixed caps (300 root tasks in TaskService.List, 30/20/20 in item_search) with the contract.
  • #219 builds the complete memory inventory on this contract; bag children (#295) use it too.

Acceptance

  • Exhausting a fixture larger than the maximum limit returns every visible entry exactly once, including equal timestamps and subtasks that follow their parent across a page boundary.
  • total and cursors reveal nothing the caller may not read.
  • Tool list stays within budget or the budget is raised deliberately with the reason recorded in McpDiscoveryTests.
Connection interrupted or session ended. Reload

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.