pandashere/dsh-codex-bridge ↗★ 1
dsh-codex-bridge
Codex bridge for DeepSeek Harness: call_codex / codex_status / codex_abort tools plus a WebUI Codex tab observing the codex sessions of the current session.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:pandashere/dsh-codex-bridge说明文档
阅读完整 README ↗dsh-codex-bridge
English | 中文
面向 DeepSeek Harness(dsh)的双面(宿主 + 浏览器)插件:把 Codex CLI 桥接进 harness。
为什么需要它
dsh agent 经常想找外部编码 agent(OpenAI Codex)要一个第二意见或并行编码一遍。手动做这件事——spawn codex、抓 JSONL、轮询、把输出接回来——正是 harness 插件存在的意义。本插件让 Codex 成为 dsh 的一等公民:
- 把 Codex 当工具调用 —
call_codex在会话工作目录启动 Codex 会话(codex -a never exec --json),支持async(立即返回;多次调用并行)与block(等待最终答案)两种模式,另有codex_status轮询、codex_abort取消。 - 同一线程续跑 —
codex_steer在同一线程上恢复已 settle 的 Codex 会话(codex exec resume),可纠偏、追问、改方向且保留完整历史。线程是线性的:父必须是该线程最新记录,且同一线程只允许一个进行中的延续。 - 展示整个 agent loop — 会话 pane 里的 Codex 标签(与 Chat/Trajectory 平级)实时观察每个会话:状态、提示词、Agent Loop waterfall(消息、带命令/参数的工具行、可折叠的工具输出与退出码、回合分隔)、transcript 与最终回答——经 session projection 通道推送。
定位:UX 通道,不是安全边界。 Codex 以调用用户权限运行,使用其自身 sandbox 策略(模型可选 read-only/workspace-write;danger-full-access 仅部署配置可设)。模型面对的面刻意收紧:Codex 恒在会话工作目录运行(绝不回退宿主 cwd——fail closed),默认仅顶层 agent 可调用,maxParallel/maxSessionsPerSession/maxLoopSteps/maxLoopBytes 约束资源与写放大。
安装
前置条件:Node.js 22 或更高版本、@deepseek-ai/dsh@0.1.0-rc.6,以及已完成认证且可通过 codex 调用的 Codex CLI(也可配置 codexPath)。插件不读取或保存 API Key;认证仍由 Codex CLI 管理。
在插件目录内构建、校验并打包独立 bundle:
npm install
npm run check
npm pack
把生成的 tarball 安装进 DSH profile,然后重启 dsh web。不要把源码目录作为 link 安装,因为宿主 peer 依赖由 DSH profile 提供:
npx @deepseek-ai/dsh@0.1.0-rc.6 plugin --profile web add ./dsh-codex-bridge-0.1.0.tgz
npx @deepseek-ai/dsh@0.1.0-rc.6 web
浏览器端由 /plugins/dsh-codex-bridge/client.js 提供,并显示在会话 pane 中。对运行中的默认 Web profile 验证:
curl -s http://127.0.0.1:3080/plugins/dsh-codex-bridge/client.js | head
更新时先提高 package 版本并重新打包,再移除旧 bundle、添加新 tarball 并重启。卸载命令:
npx @deepseek-ai/dsh@0.1.0-rc.6 plugin --profile web remove dsh-codex-bridge
配置
| Key |
|---|