-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Auto-resolve active repository from file paths in MCP tool params #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
MCP tools now auto-detect which repo a call is for based on file paths in the params (filePath, path, targetPath, target, moduleId). This eliminates the need for explicit switchRepo calls before querying a different repo. - Add repo_resolver.go with extractPathHint() and resolveRepoForPath() - Add engine_cache.go with getOrCreateEngine() and ensureActiveEngine() - Hook auto-resolution into handleCallTool dispatch - Initialize engine cache in all server constructors - Remove IsMultiRepoMode() gates from listRepos/switchRepo/getActiveRepo - Remove TODO skips in cmd/ckb/mcp.go Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🟡 Change Impact Analysis
Blast Radius: 0 modules, 1 files, 65 unique callers 📝 Changed Symbols (127)
🎯 Affected Downstream (20)
Recommendations
Generated by CKB |
🔐 Security Audit Results
📦 Dependency VulnerabilitiesFound 8 vulnerability(ies) across 2 scanner(s) DetailsTrivy (4 findings)
OSV-Scanner (4 findings)
📜 License IssuesFound 144 non-permissive license(s) Details
Generated by CKB Security Audit | View Details | Security Tab |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (14.0%) is below the target coverage (30.0%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #131 +/- ##
=========================================
- Coverage 45.5% 45.5% -0.1%
=========================================
Files 365 367 +2
Lines 61829 61897 +68
=========================================
+ Hits 28169 28198 +29
- Misses 31758 31789 +31
- Partials 1902 1910 +8
Flags with carried forward coverage won't be shown. Click here to find out more. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
CKB Analysis
Risk factors: Moderate churn: 564 lines changed • Touches 4 hotspot(s)
🎯 Change Impact Analysis · 🟡 MEDIUM · 127 changed → 20 affected
Symbols changed in this PR:
Downstream symbols affected:
Recommendations:
🔥 Hotspots · 4 volatile files
📊 Complexity · 4 violations
💡 Quick wins · 10 suggestions
📚 Stale docs · 143 broken references
Generated by CKB · Run details |
Summary
switchRepocalls before querying a different repoChanges
repo_resolver.go—extractPathHint()scans params for file paths;resolveRepoForPath()resolves to git rootengine_cache.go—getOrCreateEngine()manages thread-safe engine pool;ensureActiveEngine()swaps active enginehandler.go— Hook auto-resolution intohandleCallTooldispatchserver.go— Init engine cache in constructors; simplifiedswitchToClientRoottool_impls_multirepo.go— RemovedIsMultiRepoMode()gates; tools now work in all modesmcp.go— Removed TODO skipsTest plan
go buildpassesgo test ./internal/mcp/...passesgo test ./internal/repos/...passesgolangci-lint runclean (non-test files)🤖 Generated with Claude Code