Skip to content

feat(codedb-pro): lookup one-shots; compact tools/list - #603

Draft
justrach wants to merge 6 commits into
mainfrom
cursor/zigrepper-oneshot-1a17
Draft

feat(codedb-pro): lookup one-shots; compact tools/list#603
justrach wants to merge 6 commits into
mainfrom
cursor/zigrepper-oneshot-1a17

Conversation

@justrach

@justrach justrach commented Aug 21, 2026

Copy link
Copy Markdown
Owner

What

Licensed codedb-pro sessions keep native codedb (free index) and add mcp__codedbpro__lookup as the one-RPC paid entry.

Lookup routes:

  • name → explain
  • task / query → context
  • from+to → callpath
  • directory path → list_dir
  • file path → outline
  • pattern / regex-shaped query → search hits

Named one-shots stay dispatchable. Only read_file and leading shell search redirect to the paid suite.

The paid suite's advertised tools/list is now compact (routing keys, no titles/annotations; read enum is full/outline/symbol/lines). Handlers still accept extra fields. Graff already defers the whole server behind load_tool_schemas — this cut is for hosts that embed the catalog every turn.

Mini catalog: 1438 bytes (was ~3116).

Why

Hop chains cost 2–5 MCP round-trips for questions codedb already answers in one call. Schema bytes are a separate tax: count was already 4 tools; Claude/Cursor still paid the JSON every turn.

Suite

Companion: https://github.com/justrach/zigrepper/pull/155

Open in Web Open in Cursor 

Advertise explain/context/callpath/list_dir/status on the paid suite
and classify those MCP names in the harness. Native codedb is a
different job (the free index) and is neither blocked nor redirected
when codedb-pro is licensed — only read_file and leading shell
searches go to the paid tools (ADR 0020).
Steer licensed sessions at mcp__codedbpro__lookup (cached composed
answer) instead of hop chains. Native codedb stays the free index.
@cursor cursor Bot changed the title feat(codedb-pro): zigrepper one-shots; native codedb stays feat(codedb-pro): lookup first; native codedb stays Aug 21, 2026
replacementFor now leads with lookup but still names the hop tools so
the existing pointer test and the model both see a concrete fallback.
Four tier-2 cases lock the RPC count: native around is 1 call, the
symbol+callers hop is 2, pro lookup is 1, the old pro hop path is 3.
scripts/eval-codedb-surface.py times the codedb CLI on this repo and
prints those harness numbers together.
Extend ADR 0020 so a licensed session does not hop read/search after
lookup: file path resolves to outline, pattern to search hits. Normalize
lookup's file argument against the session cwd.
@cursor cursor Bot changed the title feat(codedb-pro): lookup first; native codedb stays feat(codedb-pro): lookup file outline and pattern search are one RPC Aug 21, 2026
Advertise routing keys without titles, annotations, or unused read
modes. Handlers still accept extra properties. Graff already defers the
server; other hosts pay the catalog every turn.
@cursor cursor Bot changed the title feat(codedb-pro): lookup file outline and pattern search are one RPC feat(codedb-pro): lookup one-shots; compact tools/list Aug 21, 2026
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.

2 participants