feat: codegraph_explore 改为原生 CLI 工具并移除 /plugin_init

codegraph 有一等公民 CLI 且上游保证其输出与 codegraph_explore MCP
工具一致,走共享 MCP adapter 只是多余的传输层。改为原生 Pi 工具后
每次调用以短命 codegraph explore 进程完成,去掉常驻 server/daemon;
未初始化项目经 ctx.ui.confirm 确认后 init 并自动重试,拒绝或失败时
打回并引导模型回退 find/grep/read/LSP;结果按 codegraph.db mtime
做有界缓存,索引一变即失效。共享 MCP adapter 只保留 Exa;工具名
不变,权限策略、Tool Search 常驻表、路由规则与分组不受影响。

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
云服务部-叶林立
2026-10-19 19:42:11 -07:00
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 97c2e75dfe
commit 6fe6cb29ae
11 changed files with 242 additions and 410 deletions
+1 -11
View File
@@ -4,7 +4,7 @@ import test from "node:test";
import { createMcpConfig, EXA_TOOLS } from "../extensions/mcp-config.ts";
test("one MCP adapter config contains both Exa and CodeGraph", () => {
test("the shared MCP adapter config only connects Exa", () => {
assert.deepEqual(createMcpConfig({}), {
settings: {
disableProxyTool: true,
@@ -21,16 +21,6 @@ test("one MCP adapter config contains both Exa and CodeGraph", () => {
approveTools: false,
exposeResources: false,
},
codegraph: {
command: "codegraph",
args: ["serve", "--mcp"],
lifecycle: "keep-alive",
directTools: ["codegraph_explore"],
includeTools: ["codegraph_explore"],
toolPrefix: "none",
approveTools: false,
exposeResources: false,
},
},
});
});