Feat/v4 mcp and session store - #173
Merged
Merged
Conversation
v4 MCP 适配第一部分:MCP 从「按需连接的插件能力」变成受生命周期管辖的一等 资源接入面。 - System MCP 启动准入:新增启动闸门 hook `before_react_start`,transport / initialize / 协商 / 真实 tools/list 未完成,或必需工具缺失、超时、取消时 阻止本次 loop 进入后续阶段(该 Err 不降级);配置层三字段与纯校验在 serde 与项目/全局/插件四条来源都拒绝非法组合;消除 initialize 路径 4 处 `unwrap_or_default`,tools/list 失败不再伪装成 Connected + 空工具列表。 - 一等工具注入:`system_mcp_tools` 按所属 server 的原始工具名精确匹配后 all-or-nothing 提升 direct,经目录原子提交后进入首个 Reason 的 LLM tools; `[]` 只要求 ready 不注入;普通 MCP 工具仍走 ToolSearch deferred 路径。 - MCP over ACP:client 可声明 acp 型 server,由宿主在会话级接入(与 plugin / process 并列的第三种 transport),带 host-policy 与 isolation 契约测试。 - 测试:host seam 用真实子进程 + 真实 rmcp stdio + counting model 断言首个 LLM 请求入参、失败时模型调用 0 次。 - 文档:配置参考、代码索引、架构契约与测试标准同步,part-1 规划/子计划/ 验收记录入库。 顺带清理三处已失效的 `#[allow(dead_code)]`(`prepare_system_tools`、 `with_direct`、`original_tool_name` 均已有生产调用方)。part-2 规划文档不进 本分支,保留在 `feat/mcp-adaptation-v4-part-2`。 Co-Authored-By: deepseek-v4-flash <deepseek-ai@claude-code-best.win>
|
Important Review skippedToo many files! This PR contains 365 files, which is 265 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (365)
You can disable this status message by setting the 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 |
KonghaYao
force-pushed
the
feat/v4-mcp-and-session-store
branch
from
September 27, 2026 13:21
6dc47f0 to
5b479f5
Compare
KonghaYao
added a commit
that referenced
this pull request
Sep 27, 2026
现象:PR #173 Windows CI 中以下两例稳定失败(平台语义,非回归): - sessions::remote::session_shape_tests::binding_cwd_must_be_relative_and_textual - sessions::sqlite_store::workspace::tests::test_worktree_binding_cwd_text_matches_registration_without_trailing_separator 定位: 1) 用例用 `/etc` 当作「绝对路径」反例。Windows 上带根无盘符的路径 `Path::new("/etc").is_absolute()` 为 false(缺 Prefix 分量),生产侧 `session_codec::decode_binding` 与写入准入按契约不会拒绝它,`expect_err` 就把「按契约未拒绝」误报成契约失败。反例应取该平台真正绝对的路径。 2) 用例断言解析出的执行目录文本 `ends_with("/sub")`。Windows 的路径文本以 `\` 为分隔符,同一断言必然失败。用例意图是「不带尾部分隔符」 (`root.join("")` 与解析结果的差异),分隔符随平台。 修复:两处夹具按平台表达同一意图,被测契约不变。 Co-Authored-By: deepseek-v4-flash <deepseek-ai@claude-code-best.win>
Introduce a configurable session storage facade with deployment-owned shutdown, local migration and remote Turso/libSQL adapters. Unify remote tables and serialization with the local canonical shape, preserving read-only fallback and explicit unsupported operations. Keep the approved boundaries, migration notes and code index alongside the implementation. Co-Authored-By: deepseek-v4-flash <deepseek-ai@claude-code-best.win> Co-Authored-By: gpt-6-astra <openai@claude-code-best.win>
Preserve canonical history through manual and automatic compaction, and keep cancellation and terminal events consistent across the real ACP lifecycle. Include regression coverage and the completed audit documentation.
Honor isolated home paths across plugin and skill discovery, handle platform-specific path and locking semantics, and separate process startup from RPC timing assertions. Use real temporary workspaces in LSP tests and scope unsupported Unix fixtures explicitly. Complete prediction cancellation during host shutdown, serve prediction requests in print fixtures, retain Windows bootstrap variables, and preserve timeout diagnostics while reaping child processes. Co-Authored-By: deepseek-v4-flash <deepseek-ai@claude-code-best.win>
KonghaYao
force-pushed
the
feat/v4-mcp-and-session-store
branch
from
September 27, 2026 15:45
26d0f44 to
4d23b72
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.