feat(cli): MCP parity verbs for shell-only consumers#160
Conversation
Wire CLI commands that call the same tool-handlers and resource builders as MCP/HTTP so consumers without a transport still get identical JSON.
🦋 Changeset detectedLatest commit: 0e481b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reached
More reviews will be available in 22 minutes and 16 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (26)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
validateIndexModeArgs blocked trace/explore/node/file/schema before dispatch. Validate query batch input with queryBatchArgsSchema; add dispatch smoke tests.
Reject invalid group_by/changed_since in batch JSON instead of silently coercing to CLI defaults. Extend dispatch smoke tests and architecture docs.
Route context through handleContext, dedupe resource builders, align composer validation with MCP zod schemas, emit JSON parse errors for always-JSON verbs, and sync cmd-mcp help plus agent-content docs.
Add codemap symbols resource twin, align file-not-indexed errors with MCP, add query batch --no-summary, and extend dispatch smoke tests.
Golden-path subprocess tests on fixtures/minimal; glossary/bootstrap/mcp help and context-engine comments updated for symbols and --no-summary.
Add explore, node, and context --include-snippets e2e coverage; align architecture and glossary with handleContext and CLI --include-snippets.
Align with repo convention: additive CLI twins ship as patch, not minor.
Summary
tool-handlersand resource builders as MCP/HTTP, so consumers without a transport get identical JSON payloads.codemap query batch,trace,explore,node,file,schema, pluscontext --include-snippets.buildFileRollup/buildSchemaCatalogfromresource-handlers.tsfor shared MCP + CLI paths.Test plan
bun test src/cli/cmd-cli-parity.test.ts src/cli/cmd-context.test.tsbun run typecheckcodemap context --include-snippets,codemap schema,codemap file src/db.tsecho '{"statements":["SELECT 1"]}' | codemap query batch --stdin