Repository navigation
fix(traex): 接通 TraeX 与 CoCo 的插件 MCP Gateway - #2489
Merged
Merged
Conversation
声明共享 TOML Gateway 入口,并在文件沙盒内只读开放配置。 补充真实适配器、配置幂等和 bwrap 工具链回归,保留现有身份隔离。 Co-Authored-By: Aiden
will7856
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
October 28, 2026 15:41
This was referenced Oct 28, 2026
Owner
|
感谢贡献!已 squash 合入 master(保留你的署名)。 评审中在真 traex/coco 0.211.1 + 真 bwrap 上验证:installer 生成的共享条目能被两个 CLI 正确解析(command/args/env_vars/tool_timeout_sec),沙箱内只读可见、写入被拒,app-server 正常握手并真实拉起 gateway;默认/自定义数据目录集成测试 7/7 通过。 两个观察级 follow-up,不影响本次合入:
另外记录一个读面事实:只读 carve 的是整份用户 欢迎继续贡献。 |
deepcoldy
pushed a commit
to haozhenfei/botmux
that referenced
this pull request
Oct 28, 2026
…eepcoldy#2403) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🚀 Released in v3.55.0 |
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.
问题与原因
TraeX/CoCo 本身支持 Codex 格式的 MCP 配置,但当前适配器没有声明
mcpGateway。这导致两段现有流程均被跳过:ensureCliEnv无法安装 BotMux Gateway 配置;因此,聊天和原生 CLI 命令仍可能正常,但模型看不到插件 MCP 工具。手动补 TOML 不能补齐 worker 的可信 socket,也不应绕过会话身份校验。
另外,文件沙盒只暴露
~/.trae/cli与迁移标记;仅补 Gateway 声明仍会把根目录下的traecli.toml隐藏,沙盒内 CLI 无法读取新增入口。修改
codex-tomlGateway 合同,复用现成安装器、会话 host、stdio relay 和身份校验,不另建通路。traeConfigPath(),动态解析默认 HOME、自定义TRAE_HOME和~路径。traecli.toml,不扩大authPaths,不授予共享 hooks/plugins/skills 写权限。影响范围与保留行为
生产修改限于两个适配器和共享路径函数。现有 worker 的新建/恢复会话流程会消费声明;不修改输入队列、模型选择、认证协议、插件权限或其它 CLI 的启动逻辑。Codex、Claude 的既有回归继续运行。
Linux 下已实际验证默认/自定义 BotMux 数据目录:配置可读不可写、插件描述和同级会话快照不可读,Gateway 仍可列出并调用 fixture 工具。macOS/Windows 未做真机验证;保留原生路径处理与现有平台沙盒机制。
验证
验证基于本分支与
master@94e307acc01bab79e25cc1138cb1bac327b5db88的无冲突合并结果(treec946bcf8993c96e163acc181740e4f338e73a21e)。PR 只携带下述 6 个文件的修复,不包含主分支的其它更新。在清除继承的 BotMux 会话环境、使用独立 HOME 与短 TMPDIR 的子进程中运行:
bun run test test/cli-adapters.test.ts test/plugin-mcp-gateway-installer.test.ts \ test/plugin-mcp-gateway.test.ts test/plugin-mcp-sandbox.test.ts \ test/traex-adapter-submit.test.ts test/traex-native-subagent-hook-wiring.test.ts bun run buildtraex mcp get botmux --json成功读取生成配置;启动traex app-server --stdio,通过initialize与mcpServerStatus/list实际列出echo、alpha_unique。未发模型 turn、未调用业务写工具,进程和临时资源均已清理。本 PR 未部署到常驻 BotMux、未重启任何现有会话,也不宣称生产已生效。合入、正式发布及运行版本升级不包含在本次提交中。