Skip to content

Commit 37ef5b5

Browse files
authored
Merge pull request #1069 from DeusData/feat/agent-installations
feat: expand coverage-aware agent integrations
2 parents 2469ecc + aa23668 commit 37ef5b5

48 files changed

Lines changed: 36872 additions & 2155 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ jobs:
5151
PR: ${{ github.event.pull_request.number }}
5252
REPO: ${{ github.repository }}
5353
run: |
54-
FILES=$(gh pr diff "$PR" --repo "$REPO" --name-only)
54+
# The full .diff endpoint rejects large-but-valid PRs at 20k lines.
55+
# The paginated files endpoint remains filename-only for this gate.
56+
FILES=$(gh api --paginate "repos/$REPO/pulls/$PR/files?per_page=100" --jq '.[].filename')
5557
printf '%s\n' "$FILES"
5658
if printf '%s\n' "$FILES" | grep -qE '^(src/|internal/|scripts/build\.sh|scripts/smoke-test\.sh|scripts/env\.sh|Makefile\.cbm)'; then
5759
echo "product=true" >> "$GITHUB_OUTPUT"

Makefile.cbm

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,15 @@ CXXFLAGS_PROD = $(CXXFLAGS_COMMON) -O2
6363

6464
# Test flags: debug + sanitizers (override SANITIZE= to disable on Windows)
6565
SANITIZE = -fsanitize=address,undefined -fno-omit-frame-pointer
66-
CFLAGS_TEST = $(CFLAGS_COMMON) -g -O1 $(SANITIZE)
66+
EDITOR_TEST_DEFINES = -DCBM_JSON_LIKE_ENABLE_TEST_API=1 \
67+
-DCBM_TOML_EDIT_ENABLE_TEST_API=1 -DCBM_YAML_ENABLE_TEST_API=1 \
68+
-DCBM_TEXT_EDIT_ENABLE_TEST_API=1 -DCBM_CLI_ENABLE_TEST_API=1
69+
CFLAGS_TEST = $(CFLAGS_COMMON) $(EDITOR_TEST_DEFINES) -g -O1 $(SANITIZE)
6770
CXXFLAGS_TEST = $(CXXFLAGS_COMMON) -g -O1 $(SANITIZE)
6871

6972
# TSan (can't combine with ASan)
7073
TSAN_SANITIZE = -fsanitize=thread -fno-omit-frame-pointer
71-
CFLAGS_TSAN = $(CFLAGS_COMMON) -g -O1 \
74+
CFLAGS_TSAN = $(CFLAGS_COMMON) $(EDITOR_TEST_DEFINES) -g -O1 \
7275
$(TSAN_SANITIZE)
7376
CXXFLAGS_TSAN = $(CXXFLAGS_COMMON) -g -O1 \
7477
$(TSAN_SANITIZE)
@@ -237,7 +240,10 @@ WATCHER_SRCS = src/watcher/watcher.c
237240
GIT_SRCS = src/git/git_context.c
238241

239242
# CLI module (new)
240-
CLI_SRCS = src/cli/cli.c src/cli/progress_sink.c src/cli/hook_augment.c
243+
CLI_SRCS = src/cli/cli.c src/cli/progress_sink.c src/cli/hook_augment.c \
244+
src/cli/agent_clients.c src/cli/agent_profiles.c \
245+
src/cli/config_json_like.c src/cli/config_toml_edit.c src/cli/config_yaml_edit.c \
246+
src/cli/config_text_edit.c
241247

242248
# UI module (graph visualization)
243249
UI_SRCS = \
@@ -393,7 +399,9 @@ TEST_INTEGRATION_SRCS = tests/test_integration.c tests/test_incremental.c tests/
393399
TEST_TRACES_SRCS = tests/test_traces.c
394400

395401

396-
TEST_CLI_SRCS = tests/test_cli.c
402+
TEST_CLI_SRCS = tests/test_cli.c tests/test_agent_clients.c tests/test_agent_profiles.c \
403+
tests/test_config_json_like.c \
404+
tests/test_config_toml_edit.c tests/test_config_yaml_edit.c tests/test_config_text_edit.c
397405

398406
TEST_MEM_SRCS = tests/test_mem.c
399407

@@ -629,6 +637,14 @@ $(BUILD_DIR)/test-runner: $(ALL_TEST_SRCS) $(PROD_SRCS) $(EXTRACTION_SRCS) $(AC_
629637
test: $(BUILD_DIR)/test-runner
630638
cd $(CURDIR) && $(BUILD_DIR)/test-runner
631639

640+
# Focused native development is intentionally a separate, explicit target so
641+
# an inherited TEST_SUITES value cannot silently narrow the gating test target.
642+
TEST_SUITES ?=
643+
test-focused: $(BUILD_DIR)/test-runner
644+
@test -n "$(strip $(TEST_SUITES))" || \
645+
(echo "TEST_SUITES is required for test-focused"; exit 2)
646+
cd $(CURDIR) && $(BUILD_DIR)/test-runner $(TEST_SUITES)
647+
632648
# ── Cumulative bug-reproduction runner (RED by design, non-gating) ──
633649
# Mirrors test-runner's link line but uses repro_main.c (own main + counters)
634650
# and TEST_REPRO_SRCS instead of ALL_TEST_SRCS. Exits non-zero while any bug is

README.md

Lines changed: 158 additions & 37 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>codebase-memory-mcp — Code Intelligence Knowledge Graph for AI Coding Agents</title>
7-
<meta name="description" content="codebase-memory-mcp is an open-source MCP server that indexes any codebase into a persistent knowledge graph so AI coding agents answer structural questions with ~120x fewer tokens. 158 languages, Hybrid LSP type resolution, local semantic vector search, code-clone detection, sub-1ms queries, Linux kernel indexed in 3 minutes. Single static C binary, zero dependencies. Works with 11 agents including Claude Code, Codex CLI, Gemini CLI, Cursor, and Zed.">
7+
<meta name="description" content="codebase-memory-mcp is an open-source MCP server that indexes any codebase into a persistent knowledge graph so AI coding agents answer structural questions with ~120x fewer tokens. 158 languages, Hybrid LSP type resolution, local semantic vector search, code-clone detection, sub-1ms queries, Linux kernel indexed in 3 minutes. Single static C binary, zero dependencies. One command configures 43 automatic/conditional client surfaces.">
88
<meta name="keywords" content="MCP server, code intelligence, knowledge graph, tree-sitter, Hybrid LSP, semantic code search, code embeddings, code clone detection, cross-repo analysis, data-flow analysis, Claude Code, Codex CLI, Gemini CLI, Cursor, Zed, code exploration, token reduction, call graph, dead code detection">
99
<meta name="author" content="DeusData">
1010
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
@@ -56,7 +56,7 @@
5656
"featureList": [
5757
"Indexes 158 programming languages via vendored tree-sitter grammars",
5858
"Hybrid LSP semantic type resolution for Python, TypeScript/JavaScript, PHP, C#, Go, C/C++, Java, Kotlin, and Rust",
59-
"14 MCP tools for structural search, call-path tracing, and Cypher graph queries",
59+
"15 MCP tools for structural search, call-path tracing, targeted coverage checks, and Cypher graph queries",
6060
"Semantic vector code search via bundled nomic-embed-code embeddings (no API key, fully local)",
6161
"Semantic graph edges (SEMANTICALLY_RELATED) and near-clone detection (SIMILAR_TO, MinHash + LSH)",
6262
"Cross-service linking for HTTP, gRPC, GraphQL, tRPC, and pub/sub channels with confidence scoring",
@@ -68,7 +68,7 @@
6868
"Infrastructure-as-code indexing for Dockerfiles, Kubernetes, and Kustomize",
6969
"Built-in 3D graph visualization UI",
7070
"Auto-sync background watcher for incremental re-indexing",
71-
"One-command install for 11 AI coding agents"
71+
"One command configures 43 automatic/conditional client surfaces"
7272
],
7373
"author": {
7474
"@type": "Organization",
@@ -157,7 +157,7 @@
157157
"name": "Which AI coding agents work with codebase-memory-mcp?",
158158
"acceptedAnswer": {
159159
"@type": "Answer",
160-
"text": "A single install command configures 11 agents: Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, and Kiro. Any MCP-compatible client can use the server."
160+
"text": "A single install command configures 43 automatic/conditional client surfaces. The 37 detected surfaces are Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, Cursor, Windsurf, Augment / Auggie, OpenClaw, Kiro, Junie, Hermes, OpenHands, Cline, Warp, Qwen Code, GitHub Copilot CLI, Factory Droid, Crush, Goose, Mistral Vibe, Qoder CLI, Kimi Code CLI, GitLab Duo CLI, Rovo Dev CLI, Amp, Devin CLI / Local, Tabnine, Amazon Q Developer IDE, CodeBuddy Code CLI, IBM Bob Shell, Pochi, and Pi. Continue / cn, Visual Studio, TRAE, Roo Code, IBM Bob IDE, and Sourcegraph Cody are conditional or explicit integrations. Qodo, Warp MCP, JetBrains AI/ACP, GitHub Copilot coding agent, Jules, CodeRabbit, Replit, BLACKBOX AI, Plandex, and SWE-agent require manual, UI, cloud, or repository-managed setup and are not counted among the 43."
161161
}
162162
},
163163
{
@@ -450,7 +450,7 @@ <h1>codebase-memory-mcp</h1>
450450
<div class="stat"><div class="number">~120x</div><div class="label">fewer tokens</div></div>
451451
<div class="stat"><div class="number">158</div><div class="label">languages</div></div>
452452
<div class="stat"><div class="number">3 min</div><div class="label">Linux kernel index</div></div>
453-
<div class="stat"><div class="number">11</div><div class="label">agents supported</div></div>
453+
<div class="stat"><div class="number">43</div><div class="label">client surfaces</div></div>
454454
</div>
455455
<div class="cta-buttons">
456456
<a href="https://github.com/DeusData/codebase-memory-mcp" class="cta-primary">View on GitHub</a>
@@ -521,15 +521,54 @@ <h2>How do I install codebase-memory-mcp?</h2>
521521
<div class="install-block">
522522
<span class="comment"># 1. One-line install (macOS / Linux). Add --ui for the 3D graph UI.</span><br>
523523
<span class="cmd">curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash</span><br><br>
524-
<span class="comment"># 2. The installer auto-detects and configures every installed agent.</span><br><br>
524+
<span class="comment"># 2. The installer configures detected clients; explicit flags cover conditional clients.</span><br><br>
525525
<span class="comment"># 3. Restart your agent, then say:</span><br>
526526
<span class="cmd">"Index this project"</span>
527527
</div>
528528
<p class="muted">
529-
One command configures all 11 supported agents: Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode,
530-
Antigravity, Aider, KiloCode, VS Code, OpenClaw, and Kiro — with MCP entries, instruction files, and
531-
pre-tool hooks for each. Windows users run <code>install.ps1</code>. Also available via
532-
<code>npm</code>, <code>pip</code>, Homebrew, Scoop, Winget, Chocolatey, AUR, and <code>go install</code>.
529+
One command configures 43 automatic/conditional client surfaces. <strong>Detected automatically (37):</strong>
530+
Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, Cursor,
531+
Windsurf, Augment / Auggie, OpenClaw, Kiro, Junie, Hermes, OpenHands, Cline, Warp, Qwen Code,
532+
GitHub Copilot CLI, Factory Droid, Crush, Goose, Mistral Vibe, Qoder CLI, Kimi Code CLI,
533+
GitLab Duo CLI, Rovo Dev CLI, Amp, Devin CLI / Local, Tabnine, Amazon Q Developer IDE,
534+
CodeBuddy Code CLI, IBM Bob Shell, Pochi, and Pi.
535+
</p>
536+
<p class="muted">
537+
<strong>Conditional or explicit (6):</strong> Continue / cn, Visual Studio, TRAE, Roo Code, IBM Bob IDE,
538+
and Sourcegraph Cody. <strong>Manual, UI, cloud, or repository-managed (not counted):</strong> Qodo,
539+
Warp MCP, JetBrains AI/ACP, GitHub Copilot coding agent, Jules, CodeRabbit, Replit, BLACKBOX AI,
540+
Plandex, and SWE-agent. Warp is counted above for its detected skill installation; its MCP connection
541+
remains manual. Windows users run <code>install.ps1</code>. Also available via <code>npm</code>,
542+
<code>pip</code>, Homebrew, Scoop, Winget, Chocolatey, AUR, and <code>go install</code>.
543+
</p>
544+
<p class="muted">
545+
Lifecycle installation follows documented context contracts: Qoder uses <code>SessionStart</code>,
546+
<code>SubagentStart</code>, and post-<code>Read</code> coverage, including its documented Windows
547+
PowerShell executor. Kimi uses <code>UserPromptSubmit</code>;
548+
on macOS/Linux, GitLab Duo gets a fail-open user <code>SessionStart</code>, while Devin gets
549+
<code>UserPromptSubmit</code>, <code>PostCompaction</code>, and a deduplicated <code>SessionStart</code>
550+
when Claude does not already provide it. GitLab Duo, Devin, and Factory hooks are withheld on
551+
Windows where no deterministic shell/executor contract is documented. Cline's auto-activating file hooks
552+
are withheld because their context output is not reliably consumed; CodeBuddy's beta hooks are not
553+
auto-installed; Junie's EAP
554+
<code>SessionStart</code> output is documented as ignored; and Cursor context hooks are withheld because
555+
the documented events cannot safely provide race-free MCP context to read-only subagents.
556+
</p>
557+
<p class="muted">
558+
Documented custom-agent formats receive three exact-owned evidence tiers: Scout for narrow provisional
559+
discovery, Verify as the task-directed default, and Auditor for bounded, paginated, current-generation
560+
verification. Every direct tier calls <code>check_index_coverage</code> for cited paths and relevant scopes,
561+
then reads flagged ranges or skipped files directly. Kiro and Junie use positive-allowlist
562+
<code>--tool-profile scout</code> and <code>--tool-profile analysis</code> server surfaces;
563+
Junie selects dedicated named aliases because its subagent schema filters by server.
564+
Qoder combines named-server selection with exact tier-specific MCP tool IDs. Factory uses
565+
exact registered tool IDs without its additive whole-server <code>mcpServers</code> field.
566+
A foreign Junie alias is preserved and causes the installed profiles to fail closed to parent handoff.
567+
Cursor, Rovo, Augment, Pochi, and Cline use explicit
568+
parent handoff where direct child MCP is unavailable or unsafe; Pochi is limited to <code>readFile</code>.
569+
Neither IBM Bob surface receives an invented hook or custom agent. Amazon Q Developer
570+
IDE defaults to <code>~/.aws/amazonq/default.json</code> while preserving either existing documented
571+
alternative.
533572
</p>
534573
</section>
535574

@@ -699,8 +738,8 @@ <h3>3D graph visualization</h3>
699738
<p>An optional UI binary serves an interactive 3D graph at <code>localhost:9749</code> to explore nodes, edges, and clusters visually.</p>
700739
</div>
701740
<div class="feature">
702-
<h3>14 MCP tools</h3>
703-
<p><code>search_graph</code>, <code>trace_path</code>, <code>detect_changes</code>, <code>query_graph</code> (Cypher), <code>get_architecture</code>, <code>get_code_snippet</code>, <code>manage_adr</code>, and 7 more.</p>
741+
<h3>15 MCP tools</h3>
742+
<p><code>search_graph</code>, <code>trace_path</code>, <code>detect_changes</code>, <code>query_graph</code> (Cypher), <code>get_architecture</code>, <code>get_code_snippet</code>, <code>check_index_coverage</code>, <code>manage_adr</code>, and 7 more.</p>
704743
</div>
705744
<div class="feature">
706745
<h3>Cypher graph queries</h3>

docs/llms.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
- License: MIT, open source.
88
- Languages: 158 (158 vendored tree-sitter grammars compiled into the binary).
99
- Hybrid LSP type resolution: 9 language families (Python, TypeScript/JavaScript/JSX/TSX, PHP, C#, Go, C/C++, Java, Kotlin, Rust) — a lightweight C implementation of language type-resolution algorithms, structurally inspired by and compatible with major language servers including tsserver, pyright, gopls, Roslyn, Eclipse JDT, and rust-analyzer.
10-
- MCP tools: 14 (search_graph incl. semantic_query vector search, trace_path (alias: trace_call_path), query_graph (Cypher), detect_changes, get_architecture, get_code_snippet, manage_adr, and more).
10+
- MCP tools: 15 (search_graph incl. semantic_query vector search, trace_path (alias: trace_call_path), check_index_coverage, query_graph (Cypher), detect_changes, get_architecture, get_code_snippet, manage_adr, and more).
1111
- Semantic search: natural-language code discovery via bundled nomic-embed-code embeddings (768-dim, compiled into the binary); 11-signal combined scoring; fully local, no API key.
1212
- Semantic & similarity edges: SEMANTICALLY_RELATED (vocabulary-mismatch matches) and SIMILAR_TO (MinHash + LSH near-clone / duplicate detection).
1313
- Cross-repo intelligence: CROSS_* edges link nodes across multiple repos indexed in one store; multi-galaxy 3D layout and cross-repo architecture summary.
1414
- Cross-service linking: HTTP route ↔ call-site matching, plus gRPC/GraphQL/tRPC detection and pub/sub channels (EMITS/LISTENS_ON for Socket.IO, EventEmitter, generic buses).
15-
- Supported agents: 11 (Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, Kiro).
15+
- Supported agents: 43 automatic/conditional client surfaces (37 automatically detected + 6 conditional/explicit): Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, Cursor, Windsurf, Augment / Auggie, OpenClaw, Kiro, Junie, Hermes, OpenHands, Cline, Warp, Qwen Code, GitHub Copilot CLI, Factory Droid, Crush, Goose, Mistral Vibe, Qoder CLI, Kimi Code CLI, GitLab Duo CLI, Rovo Dev CLI, Amp, Devin CLI / Local, Tabnine, Continue / cn, Visual Studio, TRAE, Roo Code, Amazon Q Developer IDE, CodeBuddy Code CLI, IBM Bob IDE, IBM Bob Shell, Pochi, Pi, and Sourcegraph Cody.
16+
- Agent profiles: documented custom-agent formats receive Scout (fast/provisional), Verify (default/task-directed), and Auditor (bounded/full verification) definitions. Every direct tier checks exact path/scope coverage with check_index_coverage and falls back to source for flagged gaps; unsafe child-MCP formats use explicit parent handoff. Kiro and Junie use positive-allowlist Scout/Analysis server profiles (7/11 tools); Qoder combines named-server selection with exact tier-specific MCP tool IDs, while Factory uses exact registered IDs without additive whole-server exposure. Foreign Junie aliases are preserved and force parent handoff.
1617
- Performance: Linux kernel (28M LOC, 75K files) full index in 3 minutes → 4.81M nodes, 7.72M edges; Cypher queries in under 1ms.
1718
- Distribution: single static C binary; also npm, PyPI, Homebrew, Scoop, Winget, Chocolatey, AUR, and `go install`.
1819

0 commit comments

Comments
 (0)