Skip to content

P1: add optional read/find range and pagination arguments - #63

Merged
novelKR merged 3 commits into
mainfrom
cursor/p1-file-range-pagination
Sep 21, 2026
Merged

novelKR merged 3 commits into
mainfrom
cursor/p1-file-range-pagination

Conversation

@novelKR

@novelKR novelKR commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add optional offset/limit on MCP read (byte window) and find (sorted path page). Omitted arguments keep the first 1 MiB / 10_000-path window.
  • Keep per-call caps and whole-file version hashes. truncated means more remains; continue read at offset + byte_count.
  • Advertise execution.files.capabilities (read_range, find_pagination, read_max_bytes, find_max_paths). Bump UDS WIRE_PROTOCOL to 6. Explicit limit 0 or above the cap is OUTPUT_LIMIT.

Test plan

  • cargo test -p codespace-domain --offline
  • cargo test -p codespace-runner --lib --offline
  • cargo test -p codespace-runner --offline --test fs_watch --test uds_runner
  • cargo test -p codespace-server --offline --lib
  • cargo test -p codespace-server --offline --test read_find --test protocol_compat --test process
  • python3 scripts/check_docs.py check
  • CI on this PR

Out of scope

  • Line-based range, cursor tokens, lifting the 1 MiB / 10_000 caps
  • Partial seek I/O (response windowing only)
  • Resource queue scheduler, durable process recovery

Made with Cursor

novelKR and others added 3 commits September 21, 2026 13:46
Agents can fetch the next window without lifting the 1 MiB / 10_000 caps or changing whole-file version hashes.

Co-authored-by: Cursor <cursoragent@cursor.com>
The worker already speaks WIRE_PROTOCOL 6; the leftover literal 5 was failing CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
truncated now means only more observed content remains. content_lossy, incomplete, and listing_version make window follow-up safe without empty-page retries.

Co-authored-by: Cursor <cursoragent@cursor.com>
@novelKR
novelKR merged commit 6f020cb into main Sep 21, 2026
17 checks passed
@novelKR
novelKR deleted the cursor/p1-file-range-pagination branch September 21, 2026 07:55
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.

1 participant