@harness-mix/cli 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +469 -467
  3. package/output/native-build/desktop-controller.mjs +1 -1
  4. package/output/native-build/renderer-extension.js +23 -4
  5. package/package.json +11 -9
  6. package/scripts/antigravity-adapter-test.cjs +647 -626
  7. package/scripts/codex-adapter-test.cjs +162 -127
  8. package/scripts/collaboration-test.cjs +274 -262
  9. package/scripts/jsonl-stdin-test.cjs +40 -31
  10. package/scripts/kiro-cursor-adapters-test.cjs +124 -100
  11. package/scripts/native-acp-depth-test.cjs +30 -5
  12. package/scripts/native-update-apply-test.cjs +269 -215
  13. package/scripts/native-update.cjs +78 -0
  14. package/scripts/native-vendor-adapters-test.cjs +196 -154
  15. package/scripts/salvage-rollout-writes.cjs +72 -0
  16. package/scripts/zcode-adapter-test.cjs +329 -0
  17. package/scripts/zcode-live-probe.cjs +66 -0
  18. package/src/main/adapters/antigravity.js +1428 -1418
  19. package/src/main/adapters/codex.js +656 -649
  20. package/src/main/adapters/native-acp-command.js +51 -48
  21. package/src/main/adapters/native-acp.js +47 -12
  22. package/src/main/adapters/qoder.js +12 -8
  23. package/src/main/adapters/zcode.js +921 -10
  24. package/src/main/host/collaboration.js +723 -715
  25. package/src/main/host/jsonl.js +130 -120
  26. package/src/main/native/config.js +9 -9
  27. package/src/main/native/launcher.js +252 -237
  28. package/src/main/native/process-utils.js +157 -57
  29. package/src/main/native/protocol.js +1221 -1187
  30. package/src/main/native/update-state.js +123 -110
  31. package/src/main/native/updater.js +460 -394
  32. package/src/native-ui/desktop-control/src/renderer-cdp-control-session.ts +358 -358
  33. package/src/native-ui/renderer-extension/src/renderer-binding-probe.ts +3211 -3181
  34. package/src/native-ui/renderer-extension/src/settings/connections-page.ts +2 -2
package/README.md CHANGED
@@ -1,467 +1,469 @@
1
- # Harness Mix
2
-
3
- <p align="center"><a href="#zh">中文</a> | <a href="#en">English</a></p>
4
-
5
- <a id="zh"></a>
6
-
7
- macOS/Linux 已加入源码构建与启动适配;目标系统的完整桌面验收仍需在对应机器执行。安装方式、Linux 桌面前提和支持边界见 [跨平台指南](docs/cross-platform.md)。
8
-
9
- <p align="center">
10
- <img src="src/assets/brand-harness-mix.png" width="92" alt="Harness Mix logo">
11
- </p>
12
-
13
- <p align="center">
14
- ⭐ 如果这个项目对你有帮助,请给我们一个 <a href="https://github.com/emo-xiaoyu/harness-mix">Star</a>! ⭐
15
- </p>
16
-
17
- <p align="center">
18
- <a href="https://linux.do/"><img alt="Linux DO" src="https://img.shields.io/badge/Linux%20DO-%E7%A4%BE%E5%8C%BA-0A66C2.svg"></a>
19
- </p>
20
-
21
- <p align="center"><strong>Codex 原生 UI,连接多个原生 Coding Harness,并让任务在它们之间无缝接力。</strong></p>
22
-
23
- <p align="center">
24
- <a href="LICENSE"><img alt="License: Apache-2.0 OR MIT" src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg"></a>
25
- <img alt="UI" src="https://img.shields.io/badge/UI-Codex%20Desktop-412991.svg">
26
- <img alt="Windows" src="https://img.shields.io/badge/platform-Windows-0078D4.svg">
27
- <img alt="macOS" src="https://img.shields.io/badge/platform-macOS-555555.svg">
28
- <img alt="Linux" src="https://img.shields.io/badge/platform-Linux-FCC624.svg">
29
- </p>
30
-
31
- <p align="center"><strong>当前注册的 Harness(17 个)</strong></p>
32
-
33
- <table align="center">
34
- <tbody>
35
- <tr>
36
- <td align="center"><img src="src/assets/icons/antigravity-color.svg" width="28" height="28" alt="Antigravity"><br><sub>Antigravity</sub></td>
37
- <td align="center"><img src="src/assets/icons/codex-harness.svg" width="28" height="28" alt="Codex"><br><sub>Codex</sub></td>
38
- <td align="center"><img src="src/assets/icons/claude-color.svg" width="28" height="28" alt="Claude Code"><br><sub>Claude Code</sub></td>
39
- <td align="center"><img src="src/assets/icons/pi.svg" width="28" height="28" alt="Pi"><br><sub>Pi</sub></td>
40
- </tr>
41
- <tr>
42
- <td align="center"><img src="src/assets/icons/omp-color.svg" width="28" height="28" alt="Oh My Pi"><br><sub>Oh My Pi</sub></td>
43
- <td align="center"><img src="src/assets/icons/deepseek-color.svg" width="28" height="28" alt="DeepSeek Harness"><br><sub>DeepSeek</sub></td>
44
- <td align="center"><img src="src/assets/icons/opencode-color.svg" width="28" height="28" alt="OpenCode"><br><sub>OpenCode</sub></td>
45
- <td align="center"><img src="src/assets/icons/grok-color.svg" width="28" height="28" alt="Grok"><br><sub>Grok</sub></td>
46
- </tr>
47
- <tr>
48
- <td align="center"><img src="src/assets/icons/openclaw-color.svg" width="28" height="28" alt="OpenClaw"><br><sub>OpenClaw</sub></td>
49
- <td align="center"><img src="src/assets/icons/hermes-color.svg" width="28" height="28" alt="Hermes"><br><sub>Hermes</sub></td>
50
- <td align="center"><img src="src/assets/icons/qoder-color.svg" width="28" height="28" alt="Qoder"><br><sub>Qoder</sub></td>
51
- <td align="center"><img src="src/assets/icons/codebuddy-color.svg" width="28" height="28" alt="CodeBuddy"><br><sub>CodeBuddy</sub></td>
52
- </tr>
53
- <tr>
54
- <td align="center"><img src="src/assets/icons/kiro-cli-color.svg" width="28" height="28" alt="Kiro"><br><sub>Kiro</sub></td>
55
- <td align="center"><img src="src/assets/icons/cursor.svg" width="28" height="28" alt="Cursor"><br><sub>Cursor</sub></td>
56
- <td align="center"><img src="src/assets/icons/zcode-color.svg" width="28" height="28" alt="ZCode"><br><sub>ZCode</sub></td>
57
- <td align="center"><img src="src/assets/icons/trae-color.svg" width="28" height="28" alt="Trae"><br><sub>Trae</sub></td>
58
- </tr>
59
- <tr>
60
- <td align="center"><img src="src/assets/icons/cline-color.svg" width="28" height="28" alt="Cline"><br><sub>Cline</sub></td>
61
- </tr>
62
- </tbody>
63
- </table>
64
-
65
- <p align="center"><sub>图标与 Harness 能力均来自项目自身的注册表;只有本机已安装且握手成功的 Harness 才会进入真实运行。</sub></p>
66
-
67
- Harness Mix 是接入官方 Codex Desktop 原生界面的本地内核。它通过本地编译的 CLI Shim 对接桌面的 app-server 协议,把包括 Antigravity、Codex、Pi、Oh My Pi、Claude Code、DeepSeek Harness、OpenCode、Grok、OpenClaw、Hermes、Qoder、CodeBuddy、Kiro CLI、Cursor CLI、ZCode、Trae 和 Cline 在内的原生 Coding Harness 接入同一套 UI。Host Runtime 与 Protocol Core 管理任务映射、协作和事件投影;模型调用、工具执行、原生会话与凭据仍由各 Harness 自己管理。
68
-
69
- ## 界面预览
70
-
71
- <p align="center">
72
- <img src="docs/images/codex-desktop-home.png" width="960" alt="Codex Desktop 原生首页中的 Harness Mix">
73
- </p>
74
-
75
- 预览来自当前 Codex Desktop 原生窗口:Harness Mix 作为原生扩展入口出现在桌面工具栏和 Composer 中,会话、模型、工具与权限仍由 Codex Desktop 及各 Harness 管理。
76
-
77
- | 功能模块 | 核心能力 | 交互入口与特点 |
78
- | :--- | :--- | :--- |
79
- | **🔄 跨 Harness 任务接力** | 4 种接力模式(继续执行 / 执行计划 / 独立审查 / 重新分析)平滑交接 | 输入框接力角标 / `/switch`;持久化脱敏检查点与证据追溯 |
80
- | **🎨 皮肤市场** | 内置 HeiGe、Codex Styler、Dream Skin 与经典编辑器配色主题,支持亮色 / 暗色、背景装饰和可读性保护 | 设置 → 皮肤;一键预览、应用和恢复原生外观 |
81
- | **📚 历史会话导入与引用** | 一键导入 Pi / Claude / Codex / CodeBuddy 原生历史并可中断续跑;`#` 引用任意旧会话注入脱敏上下文 | 引用仅预取最近一页;MCP 只读工具 `get_session_info` / `list_session_messages` 供 Harness 按需翻页与读取分支 / 模型 / 用量元数据 |
82
- | **🤝 多 Agent 协同编排** | 输入 `#` 唤起目标 Harness,胶囊标签直观管理,主控强约束派发 | 输入框 `#` 菜单;支持循环审查验证、子任务级联取消与超时熔断 |
83
- | **🧩 原生 Skills 管理** | 全量覆盖 17 个 Harness 原生技能目录,会话启动自动预建根目录 | 设置 → Skills;支持单个 `SKILL.md` 或完整文件夹直接拖拽安装 |
84
- | **🛠️ 原生 MCP 扩展** | 支持本地 stdio 与远程 Streamable HTTP / SSE 协议 | 设置 → MCP;支持自定义 Header 传递,按 Harness 独立生效 |
85
- | **📋 原生消息队列** | 完整接入 Codex 会话排队机制(增删改查、排序、插队抢占与自动排空) | 原生 Composer 队列;当前回合完成后自动顺序调度执行排队消息 |
86
- | **✅ 可配置验证门禁** | 任务级 off / advisory / required 策略,内置一致性检查与自定义验证命令 | 命令面板 `/gate`、`/verify`;强制模式保护隔离分支合并与推送 |
87
- | **💾 会话存储治理** | schema v3 分片惰性加载、无损紧凑存储、迁移备份与体积诊断 | 冷启动只读任务索引;打开任务时才恢复对应 Core checkpoint |
88
- | **🩹 失败分类与恢复** | 失败回合归类为连接 / 登录 / 额度 / 被拒 / 服务异常五类,分类来自原生结构化错误(Codex `codexErrorInfo` 透传)、状态码或消息特征,无法归类时诚实标注 unknown | 错误状态随任务投影;Renderer 可查 `harnessmix/harness/turn-error` 获取分类与动作(重试 / 去登录 / 新建会话),login 按钮按 Harness 真实登录能力出现 |
89
- | **🌐 ChatGPT 侧边栏桥接** | 安全脱敏提取当前会话上下文并一键生成结构化草稿 | Web 快捷聊天面板;直通注入 ChatGPT,实现跨工具无缝协作 |
90
- | **👤 账户与用量隔离** | Codex 多账户隔离与即时切换;实时追踪 Token / Credits 用量 | 原生侧边栏与设置面板;各 Harness 凭据、模型与审批原生自理 |
91
-
92
- ### 🎨 皮肤市场预览
93
-
94
- 主题资源随项目发布,图片直接使用仓库内的授权素材;应用皮肤只改变视觉层,不改变 Codex 原生交互和 Harness 执行行为。
95
-
96
- <table align="center">
97
- <tr>
98
- <td align="center"><img src="src/assets/skins/heige/themes/miku-488137/hero.webp" width="360" alt="Miku 主题"><br><sub>🎀 Miku</sub></td>
99
- <td align="center"><img src="src/assets/skins/heige/themes/genshin-night/hero.webp" width="360" alt="Genshin Night 主题"><br><sub>🌌 Genshin Night</sub></td>
100
- </tr>
101
- <tr>
102
- <td align="center"><img src="src/assets/skins/heige/themes/deepspace-star/hero.webp" width="360" alt="Deepspace Star 主题"><br><sub>🌠 Deepspace Star</sub></td>
103
- <td align="center"><img src="src/assets/skins/heige/themes/wuthering-tide/hero.webp" width="360" alt="Wuthering Tide 主题"><br><sub>🌊 Wuthering Tide</sub></td>
104
- </tr>
105
- </table>
106
-
107
- ## 原生 Harness 功能支持矩阵
108
-
109
- > 💡 **设计原则**:所有能力严格在 Adapter `manifest` 中诚实声明,界面按真实能力渲染,不依靠名称猜测。凭据、模型、工具与权限审批始终由原生 Harness 独立掌控。
110
-
111
- | Harness | 原生接入协议 | 流式输出 | 思考推理 | 工具审批 | 用户提问 | 会话恢复/Fork | 图片附件 | 原生 Skills | MCP 扩展 |
112
- | :--- | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
113
- | **Antigravity** | `agy` CLI (`stream-json` / Hook) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
114
- | **Codex** | `codex app-server --stdio` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
115
- | **Claude Code** | `@anthropic-ai/claude-agent-sdk` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
116
- | **Pi** | `pi --mode rpc` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ➖ |
117
- | **Oh My Pi** | `omp --mode rpc` (`pi-family.js`) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ➖ |
118
- | **DeepSeek** | 普通 Web Remote / 协作 ACP | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
119
- | **OpenCode** | `opencode serve` (HTTP / SSE) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
120
- | **Grok** | `grok agent stdio` (`_x.ai/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
121
- | **OpenClaw** | Gateway WebSocket Loopback | ✅ | ➖ | ✅ | ➖ | ✅ / ➖ | ✅ | ✅ | ➖ |
122
- | **Hermes** | `hermes acp` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ➖ | ✅ | ✅ |
123
- | **CodeBuddy** | `codebuddy --acp` (`_codebuddy.ai/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / ➖ | ✅ | ✅ | ✅ |
124
- | **Kiro CLI** | `kiro-cli acp` (`_kiro/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ➖ | ✅ | ✅ |
125
- | **Cursor CLI** | `cursor-agent acp` (`cursor/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / ➖ | ➖ | ✅ | ✅ |
126
- | **Qoder** | `qoder --acp` | ✅ | ➖ | ✅ | ➖ | ✅ / ➖ | ✅ | ✅ | ✅ |
127
- | **ZCode** | 兼容 ACP 桥接程序 | ✅ | | ✅ | | ✅ / ➖ | | ✅ | |
128
- | **Trae** | 兼容 ACP 桥接程序 | ✅ | ➖ | ✅ | ➖ | ✅ / ➖ | ➖ | ✅ | ✅ |
129
- | **Cline** | `cline --acp` | ✅ | ✅ | ✅ | ➖ | ✅ / ➖ | ✅ | ✅ | ✅ |
130
-
131
- <sub>注:✅ 为原生支持并已打通;➖ 为上游协议当前未开放或未声明;只有本机已安装且握手成功的 Harness 才会进入真实运行。详见 [原生 ACP 深度适配](docs/native-acp.md) 与 [Harness 管理说明](docs/harness-management.md)。</sub>
132
-
133
- ## 核心功能特色
134
-
135
- ### 🔄 跨 Harness 任务接力(Task Handoff)
136
- 一个 Harness 负责深入分析,另一个编写具体实现,再切回原 Harness 交叉复核——整个过程无缝保留在同一个 Codex Desktop 原生窗口中:
137
- - **现场完整保留**:保留对话历史、未提交代码改动、Git 状态与 Review 记录。
138
- - **持久化检查点**:创建带哈希的接力快照,自动脱敏测试证据与敏感密钥,支持随时暂停与恢复。
139
- - **独立会话恢复**:每个 Harness 的原生 Session 与参数独立保存,切回时调用其原生恢复机制(如 Pi `--session` 或 Claude `resume`)。
140
- - **四种接力方式**:支持「继续执行」、「执行上一方案」、「独立审查」与「重新分析」。
141
-
142
- ### 🤝 多 Agent 协同编排(Multi-Agent Collaboration)
143
- - **触发符解耦**:在原生输入框输入 `#` 调出协同菜单(`#pi`、`#claude`、`#codex`、`#dsh`),完全保留官方 `@` 菜单给 Codex 原生功能。
144
- - **标签可视化**:已选协同 Agent 在输入框顶部呈现为胶囊标签,支持点击快速删除或 Backspace 撤销。
145
- - **严谨编排约束**:自动为主控 Coordinator 注入硬约束,严禁越界派发给未指定的 Harness;完善级联取消与子任务超时熔断机制。
146
- - **真正的 Agent Team**:一个 Lead 可组织最多六个并发的具名 Harness 成员;Team、职责、共享任务依赖图和成员邮箱均由 Host 持久化,teammate 可直接定向通信、交接和反馈,而不是只把并行结果返回 Lead。
147
- - **独立开关**:「设置 → 协作」中「多 Agent 协作」与「Agent Team」是两个独立开关(默认均开启);关闭协作即同时停用团队,关闭团队则保留一次性委派。
148
- - **原生 Team Workbench**:对话顶部团队驾驶舱点击「展开详情」后在 Codex 内容流内显示唯一主导者、各成员职责、独立任务列、进度、通信流和事件回放,不覆盖原生侧栏、消息或输入框;成员卡片可跳转其原生子任务。状态直接向 Host 实时刷新,各成员仍使用自己的原生 Harness Session、模型、工具、权限和账户。
149
- - **统一 Workspace 能力**:全部 Harness 由 Host 统一获得 Git 探测、Worktree 隔离和最终快照 Diff;原生实时 Diff 继续按各 Harness 实际协议叠加。显式隔离失败不会降级到共享目录。
150
-
151
- ### 🧩 原生 Skills 与 MCP 管理
152
- - **17 平台免配置预建**:打开会话时自动预建全部 17 个 Harness 声明的原生 Skills 根目录,新安装 Harness 也能即开即用。
153
- - **拖拽安装**:在「设置 → Skills」中可将单个 `SKILL.md` 或完整技能文件夹直接拖拽安装,自带安全路径校验。
154
- - **作用域与安全停用**:支持 Global(全局)与 Project(项目级)无缝切换;停用时安全移入保留目录,绝不损坏用户源文件。
155
- - **远程 MCP 支持**:支持配置带自定义 Headers 的 Streamable HTTP / SSE 远程服务。
156
-
157
- ### 🎨 皮肤市场与可读性保护
158
- - **主题预览与切换**:设置 → 皮肤中可预览并应用内置主题,也可随时恢复原生 Codex 外观。
159
- - **全界面覆盖**:背景、侧边栏、消息卡片、输入框、按钮和文字颜色统一使用主题令牌。
160
- - **暗色可读性**:自动增加遮罩和对比度,避免侧边栏、任务列表和消息内容在深色背景上消失。
161
- - **交互零侵入**:不替换 Codex 控件,不修改模型、工具、权限、队列或原生会话。
162
-
163
- ## 本地运行
164
-
165
- 开发环境需要 Windows、macOS 或 Linux,近期 Node.js LTS 和 npm。应用不会读取或保存 Harness 的账户密钥,请先在对应的原生 CLI 中完成安装与登录;平台前提和真机验收范围见 [跨平台指南](docs/cross-platform.md)。
166
- ```powershell
167
- git clone https://github.com/emo-xiaoyu/harness-mix.git
168
- cd harness-mix
169
- npm install
170
- ```
171
-
172
- ### 从 npm 安装
173
-
174
- Harness Mix 发布为 `@harness-mix/cli` npm 包,命令名仍是 `harness-mix`。当前发布包包含本次构建平台的 native Shim;macOS/Linux 请在目标系统执行源码构建,完整说明见 [跨平台指南](docs/cross-platform.md)。
175
-
176
- ```powershell
177
- npm install --global @harness-mix/cli
178
- harness-mix
179
- ```
180
-
181
- 升级到最新版本:
182
-
183
- ```powershell
184
- npm update --global @harness-mix/cli
185
- ```
186
-
187
- 首次运行会重启已打开的 Codex Desktop。npm 包只分发 Harness Mix 本身;各 Harness 的 CLI、登录状态、模型额度和权限仍需按下表在本机单独安装和配置。
188
-
189
- ### 运行方式
190
-
191
- 原生模式(默认):本地编译的 Shim 与 Renderer 扩展接入官方 Codex Desktop,模型选择会路由到对应 Harness。首次启动会重启已打开的 Codex Desktop:
192
- ```powershell
193
- npm start
194
- ```
195
-
196
- 常用原生依赖:
197
-
198
- - Codex:安装 `@openai/codex`,确保 `codex` 命令可用。
199
- - Pi:确保 `pi.cmd` 可用。
200
- - Claude Code:SDK 已由 npm 依赖安装,认证仍由 Claude Code 环境管理。
201
- - DeepSeek Harness:使用本项目锁定的 `@deepseek-ai/dsh@0.1.2-rc.1`。可通过 `HARNESS_MIX_DSH_ROOT` 显式指定源码目录,但版本必须被内核支持。
202
- - CodeBuddy:安装官方 `codebuddy` CLI 并完成登录;旧 WorkBuddy 安装也可通过兼容别名继续使用。
203
- - Kiro CLI:安装 `kiro-cli`,启用 `acp` 子命令并完成 CLI 登录。
204
- - Cursor CLI:安装 `cursor-agent` 并完成 CLI 登录。
205
- - Cline:安装 `cline`(`npm i -g cline`)并通过 `cline auth` 完成登录;Harness Mix 以官方 `cline --acp` 接入。
206
- - Qoder:安装 `qodercli`(或 `qoder`)并完成 CLI 登录;ACP 入口由本机版本决定。
207
- - ZCode / Trae:只有在拥有已验证的 ACP 兼容桥接程序时才配置 `HARNESS_MIX_ZCODE_ACP_EXECUTABLE` / `HARNESS_MIX_TRAE_EXECUTABLE`,项目不会猜测官方入口。
208
-
209
- 原生接入方式、数据目录和验证说明见 [原生 Codex 接入](docs/native-codex.md)。
210
-
211
- ## 验证
212
-
213
- ```powershell
214
- npm run check
215
- npm run test:core-all
216
- npm run e2e:native
217
- npm run smoke:native-ui
218
- ```
219
-
220
- 涉及原生 Adapter 时,再执行对应的真实链路:
221
-
222
- ```powershell
223
- npm run e2e:pi
224
- npm run e2e:dsh
225
- npm run e2e:claude
226
- npm run e2e:codex
227
- ```
228
-
229
- 部分 E2E 会启动真实 Harness,可能需要本机安装、登录或模型额度。测试生成物写入 `output/`,不应提交到仓库。
230
-
231
- ## License
232
-
233
- Harness Mix 基于 [Apache License 2.0](LICENSE) 或 [MIT](LICENSE-MIT) 双许可证发布,可任选其一。第三方组件仍适用各自的许可证;归属信息见 [NOTICE](NOTICE)。
234
-
235
- ---
236
-
237
- <a id="en"></a>
238
-
239
- # Harness Mix
240
-
241
- macOS/Linux source builds and launch adaptation are in place; full desktop acceptance on those systems still has to run on the respective machines. See the [Cross-Platform Guide](docs/cross-platform.md) for install options, Linux desktop prerequisites and support boundaries.
242
-
243
- <p align="center">
244
- <img src="src/assets/brand-harness-mix.png" width="92" alt="Harness Mix logo">
245
- </p>
246
-
247
- <p align="center">
248
- ⭐ If this project helps you, please give us a <a href="https://github.com/emo-xiaoyu/harness-mix">Star</a>! ⭐
249
- </p>
250
-
251
- <p align="center">
252
- <a href="https://linux.do/"><img alt="Linux DO" src="https://img.shields.io/badge/Linux%20DO-%E7%A4%BE%E5%8C%BA-0A66C2.svg"></a>
253
- </p>
254
-
255
- <p align="center"><strong>The Codex native UI, connecting multiple native coding Harnesses with seamless task handoff between them.</strong></p>
256
-
257
- <p align="center">
258
- <a href="LICENSE"><img alt="License: Apache-2.0 OR MIT" src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg"></a>
259
- <img alt="UI" src="https://img.shields.io/badge/UI-Codex%20Desktop-412991.svg">
260
- <img alt="Windows" src="https://img.shields.io/badge/platform-Windows-0078D4.svg">
261
- <img alt="macOS" src="https://img.shields.io/badge/platform-macOS-555555.svg">
262
- <img alt="Linux" src="https://img.shields.io/badge/platform-Linux-FCC624.svg">
263
- </p>
264
-
265
- <p align="center"><strong>Currently registered Harnesses (17)</strong></p>
266
-
267
- <table align="center">
268
- <tbody>
269
- <tr>
270
- <td align="center"><img src="src/assets/icons/antigravity-color.svg" width="28" height="28" alt="Antigravity"><br><sub>Antigravity</sub></td>
271
- <td align="center"><img src="src/assets/icons/codex-harness.svg" width="28" height="28" alt="Codex"><br><sub>Codex</sub></td>
272
- <td align="center"><img src="src/assets/icons/claude-color.svg" width="28" height="28" alt="Claude Code"><br><sub>Claude Code</sub></td>
273
- <td align="center"><img src="src/assets/icons/pi.svg" width="28" height="28" alt="Pi"><br><sub>Pi</sub></td>
274
- </tr>
275
- <tr>
276
- <td align="center"><img src="src/assets/icons/omp-color.svg" width="28" height="28" alt="Oh My Pi"><br><sub>Oh My Pi</sub></td>
277
- <td align="center"><img src="src/assets/icons/deepseek-color.svg" width="28" height="28" alt="DeepSeek Harness"><br><sub>DeepSeek</sub></td>
278
- <td align="center"><img src="src/assets/icons/opencode-color.svg" width="28" height="28" alt="OpenCode"><br><sub>OpenCode</sub></td>
279
- <td align="center"><img src="src/assets/icons/grok-color.svg" width="28" height="28" alt="Grok"><br><sub>Grok</sub></td>
280
- </tr>
281
- <tr>
282
- <td align="center"><img src="src/assets/icons/openclaw-color.svg" width="28" height="28" alt="OpenClaw"><br><sub>OpenClaw</sub></td>
283
- <td align="center"><img src="src/assets/icons/hermes-color.svg" width="28" height="28" alt="Hermes"><br><sub>Hermes</sub></td>
284
- <td align="center"><img src="src/assets/icons/qoder-color.svg" width="28" height="28" alt="Qoder"><br><sub>Qoder</sub></td>
285
- <td align="center"><img src="src/assets/icons/codebuddy-color.svg" width="28" height="28" alt="CodeBuddy"><br><sub>CodeBuddy</sub></td>
286
- </tr>
287
- <tr>
288
- <td align="center"><img src="src/assets/icons/kiro-cli-color.svg" width="28" height="28" alt="Kiro"><br><sub>Kiro</sub></td>
289
- <td align="center"><img src="src/assets/icons/cursor.svg" width="28" height="28" alt="Cursor"><br><sub>Cursor</sub></td>
290
- <td align="center"><img src="src/assets/icons/zcode-color.svg" width="28" height="28" alt="ZCode"><br><sub>ZCode</sub></td>
291
- <td align="center"><img src="src/assets/icons/trae-color.svg" width="28" height="28" alt="Trae"><br><sub>Trae</sub></td>
292
- </tr>
293
- <tr>
294
- <td align="center"><img src="src/assets/icons/cline-color.svg" width="28" height="28" alt="Cline"><br><sub>Cline</sub></td>
295
- </tr>
296
- </tbody>
297
- </table>
298
-
299
- <p align="center"><sub>Icons and Harness capabilities come from the project's own registry; only Harnesses installed locally with a successful handshake enter real runs.</sub></p>
300
-
301
- Harness Mix is a local kernel that plugs into the official Codex Desktop native UI. Through a locally compiled CLI Shim it speaks the desktop's app-server protocol and connects native coding Harnesses — including Antigravity, Codex, Pi, Oh My Pi, Claude Code, DeepSeek Harness, OpenCode, Grok, OpenClaw, Hermes, Qoder, CodeBuddy, Kiro CLI, Cursor CLI, ZCode, Trae and Cline — into one UI. The Host Runtime and Protocol Core manage task mapping, collaboration and event projection; model calls, tool execution, native sessions and credentials stay owned by each Harness itself.
302
-
303
- ## UI Preview
304
-
305
- <p align="center">
306
- <img src="docs/images/codex-desktop-home.png" width="960" alt="Harness Mix in the Codex Desktop native home">
307
- </p>
308
-
309
- The preview comes from the current Codex Desktop native window: Harness Mix appears as a native extension entry in the desktop toolbar and the Composer, while sessions, models, tools and permissions remain managed by Codex Desktop and each Harness.
310
-
311
- | Module | Core capabilities | Entry points & notes |
312
- | :--- | :--- | :--- |
313
- | **🔄 Cross-Harness Task Handoff** | 4 handoff modes (continue / run plan / independent review / re-analyze) with smooth transitions | Composer handoff badge / `/switch`; persisted redacted checkpoints with evidence traceability |
314
- | **🎨 Skin Marketplace** | Built-in HeiGe, Codex Styler, Dream Skin and classic editor-palette themes with light / dark modes, background decorations and readability protection | Settings Skins; one-click preview, apply and restore the stock look |
315
- | **📚 History Import & Reference** | One-click import of Pi / Claude / Codex / CodeBuddy native history with interruptible resume; `#` references any past session with redacted context injected | References prefetch only the latest page; read-only MCP tools `get_session_info` / `list_session_messages` let Harnesses page through and read branch / model / usage metadata on demand |
316
- | **🤝 Multi-Agent Orchestration** | Type `#` to summon target Harnesses, manage them as capsule tags, dispatch under strong coordinator constraints | Composer `#` menu; loop review and verification, cascading subtask cancellation and timeout circuit breaking |
317
- | **🧩 Native Skills Management** | Covers the native skill directories of all 17 Harnesses, with root directories pre-created at session start | Settings Skills; drag-and-drop install of a single `SKILL.md` or a complete folder |
318
- | **🛠️ Native MCP Extensions** | Local stdio and remote Streamable HTTP / SSE transports | Settings → MCP; custom headers supported, applied per Harness |
319
- | **📋 Native Message Queue** | Full integration of the Codex session queue (add / remove / edit, reorder, preempt and auto-drain) | Native Composer queue; queued messages are scheduled sequentially once the current turn completes |
320
- | **✅ Configurable Verification Gates** | Per-task off / advisory / required policies, built-in consistency checks and custom verification commands | Command palette `/gate`, `/verify`; required mode protects isolated branch merges and pushes |
321
- | **💾 Session Storage Governance** | schema v3 sharded lazy loading, lossless compact storage, migration backups and size diagnostics | Cold start reads only the task index; a task's Core checkpoint is restored only when it is opened |
322
- | **🩹 Failure Classification & Recovery** | Failed turns are classified as connection / login / quota / rejected / service fault, derived from native structured errors (Codex `codexErrorInfo` passthrough), status codes or message patterns, and honestly marked unknown when nothing matches | Error state follows the task projection; the Renderer can query `harnessmix/harness/turn-error` for the classification and actions (retry / go sign in / new session), and the login button only appears when the Harness truly supports it |
323
- | **🌐 ChatGPT Sidebar Bridge** | Safely redacts and extracts the current session context and generates a structured draft in one click | Web quick-chat panel; injected straight into ChatGPT for seamless cross-tool collaboration |
324
- | **👤 Account & Usage Isolation** | Codex multi-account isolation with instant switching; real-time Token / Credits tracking | Native sidebar and settings panel; each Harness manages its own credentials, models and approvals |
325
-
326
- ### 🎨 Skin Marketplace Preview
327
-
328
- Theme assets ship with the project and the images use licensed material from this repository; applying a skin only changes the visual layer, never Codex's native interactions or Harness execution behavior.
329
-
330
- <table align="center">
331
- <tr>
332
- <td align="center"><img src="src/assets/skins/heige/themes/miku-488137/hero.webp" width="360" alt="Miku theme"><br><sub>🎀 Miku</sub></td>
333
- <td align="center"><img src="src/assets/skins/heige/themes/genshin-night/hero.webp" width="360" alt="Genshin Night theme"><br><sub>🌌 Genshin Night</sub></td>
334
- </tr>
335
- <tr>
336
- <td align="center"><img src="src/assets/skins/heige/themes/deepspace-star/hero.webp" width="360" alt="Deepspace Star theme"><br><sub>🌠 Deepspace Star</sub></td>
337
- <td align="center"><img src="src/assets/skins/heige/themes/wuthering-tide/hero.webp" width="360" alt="Wuthering Tide theme"><br><sub>🌊 Wuthering Tide</sub></td>
338
- </tr>
339
- </table>
340
-
341
- ## Native Harness Support Matrix
342
-
343
- > 💡 **Design principle**: every capability is honestly declared in the Adapter `manifest`, and the UI renders from real capabilities instead of guessing from names. Credentials, models, tools and permission approvals always remain under each native Harness's own control.
344
-
345
- | Harness | Native protocol | Streaming | Reasoning | Tool approval | User questions | Resume / Fork | Image attachments | Native Skills | MCP |
346
- | :--- | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
347
- | **Antigravity** | `agy` CLI (`stream-json` / Hook) | | | | | / ✅ | | | |
348
- | **Codex** | `codex app-server --stdio` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
349
- | **Claude Code** | `@anthropic-ai/claude-agent-sdk` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
350
- | **Pi** | `pi --mode rpc` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | |
351
- | **Oh My Pi** | `omp --mode rpc` (`pi-family.js`) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ➖ |
352
- | **DeepSeek** | Plain Web Remote / collaboration ACP | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | |
353
- | **OpenCode** | `opencode serve` (HTTP / SSE) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
354
- | **Grok** | `grok agent stdio` (`_x.ai/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
355
- | **OpenClaw** | Gateway WebSocket Loopback | ✅ | | ✅ | | ✅ / | ✅ | ✅ | |
356
- | **Hermes** | `hermes acp` | ✅ | | ✅ | | ✅ / | | ✅ | |
357
- | **CodeBuddy** | `codebuddy --acp` (`_codebuddy.ai/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / | | ✅ | ✅ |
358
- | **Kiro CLI** | `kiro-cli acp` (`_kiro/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / | | ✅ | ✅ |
359
- | **Cursor CLI** | `cursor-agent acp` (`cursor/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / | ➖ | ✅ | ✅ |
360
- | **Qoder** | `qoder --acp` | ✅ | | ✅ | | ✅ / ➖ | | ✅ | ✅ |
361
- | **ZCode** | Compatible ACP bridge | ✅ | ➖ | ✅ | ➖ | ✅ / ➖ | | ✅ | ✅ |
362
- | **Trae** | Compatible ACP bridge | ✅ | | ✅ | | ✅ / ➖ | | ✅ | |
363
- | **Cline** | `cline --acp` | ✅ | | ✅ | ➖ | ✅ / ➖ | | ✅ | ✅ |
364
-
365
- <sub>Note: ✅ means natively supported and wired end-to-end; ➖ means the upstream protocol currently does not expose or declare it; only Harnesses installed locally with a successful handshake enter real runs. See [Native ACP Deep Integration](docs/native-acp.md) and [Harness Management](docs/harness-management.md) for details.</sub>
366
-
367
- ## Core Features
368
-
369
- ### 🔄 Cross-Harness Task Handoff
370
- One Harness analyzes in depth, another writes the implementation, then you switch back to the original Harness for cross-review — all seamlessly within the same Codex Desktop native window:
371
- - **Context fully preserved**: conversation history, uncommitted code changes, Git status and review records all carry over.
372
- - **Persisted checkpoints**: hashed handoff snapshots with automatic redaction of test evidence and sensitive keys, pausable and resumable at any time.
373
- - **Independent session resume**: each Harness's native session and parameters are stored separately, and switching back invokes its native resume mechanism (e.g. Pi `--session` or Claude `resume`).
374
- - **Four handoff modes**: "Continue", "Run the previous plan", "Independent review" and "Re-analyze".
375
-
376
- ### 🤝 Multi-Agent Collaboration
377
- - **Decoupled trigger**: type `#` in the native composer to open the collaboration menu (`#pi`, `#claude`, `#codex`, `#dsh`); the official `@` menu stays fully reserved for Codex native features.
378
- - **Tag visualization**: selected collaborating Agents appear as capsule tags above the composer, with click-to-remove and Backspace-to-undo.
379
- - **Strict orchestration constraints**: the coordinator is automatically injected with hard constraints that forbid dispatching to unspecified Harnesses; cascading cancellation and subtask timeout circuit breaking are built in.
380
- - **Real Agent Teams**: one Lead can organize up to six concurrent named Harness members; the Team, roles, shared task dependency graph and member mailboxes are all persisted by the Host, so teammates communicate, hand off and report directly instead of only returning parallel results to the Lead.
381
- - **Independent switches**: Settings Collaboration offers separate toggles for Multi-Agent Collaboration and Agent Team (both on by default); disabling collaboration also disables teams, while disabling teams keeps one-shot delegation available.
382
- - **Native Team Workbench**: expanding the details of the team cockpit at the top of a conversation shows the single lead, member roles, per-member task lanes, progress, message flow and event replay inside the Codex content stream without covering the native sidebar, messages or composer. Member cards jump to their native subtasks. State refreshes live from the Host, and members keep using their own native Harness sessions, models, tools, permissions and accounts.
383
- - **Unified workspace capabilities**: every Harness uniformly gets Host-owned Git detection, worktree isolation and a final snapshot diff; native live diffs continue to layer on top according to each Harness's real protocol. An explicit isolation failure never degrades to a shared directory.
384
-
385
- ### 🧩 Native Skills & MCP Management
386
- - **Zero-config pre-creation across 17 platforms**: opening a session pre-creates the native Skills root directories declared by all 17 Harnesses, so even newly installed Harnesses work out of the box.
387
- - **Drag-and-drop install**: in Settings Skills, drop a single `SKILL.md` or a complete skill folder to install it, with safe path validation built in.
388
- - **Scoped and safe disabling**: switch seamlessly between Global and Project scopes; disabling moves skills into a retention directory and never damages user source files.
389
- - **Remote MCP support**: configure Streamable HTTP / SSE remote servers with custom headers.
390
-
391
- ### 🎨 Skin Marketplace & Readability Protection
392
- - **Theme preview and switching**: preview and apply built-in themes in Settings → Skins, or restore the stock Codex look at any time.
393
- - **Full-UI coverage**: background, sidebar, message cards, composer, buttons and text colors all follow theme tokens.
394
- - **Dark-mode readability**: automatic overlays and contrast keep the sidebar, task lists and message content visible on dark backgrounds.
395
- - **Zero interaction intrusion**: no Codex controls are replaced, and models, tools, permissions, queues and native sessions are never modified.
396
-
397
- ## Running Locally
398
-
399
- Development requires Windows, macOS or Linux, a recent Node.js LTS and npm. The app never reads or stores Harness account credentials — install and sign in with each native CLI first; see the [Cross-Platform Guide](docs/cross-platform.md) for platform prerequisites and on-device acceptance scope.
400
- ```powershell
401
- git clone https://github.com/emo-xiaoyu/harness-mix.git
402
- cd harness-mix
403
- npm install
404
- ```
405
-
406
- ### Install from npm
407
-
408
- Harness Mix is published as the `@harness-mix/cli` npm package, and the command is still `harness-mix`. The current release bundles the native Shim for the platform that built it; on macOS/Linux, build from source on the target system — full details are in the [Cross-Platform Guide](docs/cross-platform.md).
409
-
410
- ```powershell
411
- npm install --global @harness-mix/cli
412
- harness-mix
413
- ```
414
-
415
- Upgrade to the latest version:
416
-
417
- ```powershell
418
- npm update --global @harness-mix/cli
419
- ```
420
-
421
- The first run restarts an already-open Codex Desktop. The npm package distributes Harness Mix itself only; each Harness's CLI, login state, model quota and permissions still need to be installed and configured locally as listed below.
422
-
423
- ### How to Run
424
-
425
- Native mode (default): the locally compiled Shim and Renderer extension plug into the official Codex Desktop, and model selection routes to the corresponding Harness. The first launch restarts an already-open Codex Desktop:
426
- ```powershell
427
- npm start
428
- ```
429
-
430
- Common native dependencies:
431
-
432
- - Codex: install `@openai/codex` and make sure the `codex` command is available.
433
- - Pi: make sure `pi.cmd` is available.
434
- - Claude Code: the SDK ships as an npm dependency; authentication stays managed by the Claude Code environment.
435
- - DeepSeek Harness: uses the `@deepseek-ai/dsh@0.1.2-rc.1` version locked by this project. `HARNESS_MIX_DSH_ROOT` may explicitly point at a source checkout, but the version must be supported by the kernel.
436
- - CodeBuddy: install the official `codebuddy` CLI and sign in; old WorkBuddy installs keep working through a compatibility alias.
437
- - Kiro CLI: install `kiro-cli`, enable the `acp` subcommand and sign in.
438
- - Cursor CLI: install `cursor-agent` and sign in.
439
- - Cline: install `cline` (`npm i -g cline`) and sign in via `cline auth`; Harness Mix connects through the official `cline --acp`.
440
- - Qoder: install `qodercli` (or `qoder`) and sign in; the ACP entry depends on the installed version.
441
- - ZCode / Trae: only set `HARNESS_MIX_ZCODE_ACP_EXECUTABLE` / `HARNESS_MIX_TRAE_EXECUTABLE` when you have a verified ACP-compatible bridge; the project never guesses official entry points.
442
-
443
- See [Native Codex Integration](docs/native-codex.md) for wiring, data directories and verification notes.
444
-
445
- ## Verification
446
-
447
- ```powershell
448
- npm run check
449
- npm run test:core-all
450
- npm run e2e:native
451
- npm run smoke:native-ui
452
- ```
453
-
454
- When native Adapters are involved, also run the corresponding real chains:
455
-
456
- ```powershell
457
- npm run e2e:pi
458
- npm run e2e:dsh
459
- npm run e2e:claude
460
- npm run e2e:codex
461
- ```
462
-
463
- Some E2E suites launch real Harnesses and may require local installs, sign-in or model quota. Test artifacts are written to `output/` and should not be committed.
464
-
465
- ## License
466
-
467
- Harness Mix is dual-licensed under [Apache License 2.0](LICENSE) or [MIT](LICENSE-MIT), at your option. Third-party components remain subject to their own licenses; see [NOTICE](NOTICE) for attribution.
1
+ # Harness Mix
2
+
3
+ <p align="center"><a href="#zh">中文</a> | <a href="#en">English</a></p>
4
+
5
+ <a id="zh"></a>
6
+
7
+ macOS/Linux 已加入源码构建与启动适配;目标系统的完整桌面验收仍需在对应机器执行。安装方式、Linux 桌面前提和支持边界见 [跨平台指南](docs/cross-platform.md)。
8
+
9
+ <p align="center">
10
+ <img src="src/assets/brand-harness-mix.png" width="92" alt="Harness Mix logo">
11
+ </p>
12
+
13
+ <p align="center">
14
+ ⭐ 如果这个项目对你有帮助,请给我们一个 <a href="https://github.com/emo-xiaoyu/harness-mix">Star</a>! ⭐
15
+ </p>
16
+
17
+ <p align="center">
18
+ <a href="https://linux.do/"><img alt="Linux DO" src="https://img.shields.io/badge/Linux%20DO-%E7%A4%BE%E5%8C%BA-0A66C2.svg"></a>
19
+ </p>
20
+
21
+ <p align="center"><strong>Codex 原生 UI,连接多个原生 Coding Harness,并让任务在它们之间无缝接力。</strong></p>
22
+
23
+ <p align="center">
24
+ <a href="LICENSE"><img alt="License: Apache-2.0 OR MIT" src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg"></a>
25
+ <img alt="UI" src="https://img.shields.io/badge/UI-Codex%20Desktop-412991.svg">
26
+ <img alt="Windows" src="https://img.shields.io/badge/platform-Windows-0078D4.svg">
27
+ <img alt="macOS" src="https://img.shields.io/badge/platform-macOS-555555.svg">
28
+ <img alt="Linux" src="https://img.shields.io/badge/platform-Linux-FCC624.svg">
29
+ </p>
30
+
31
+ <p align="center"><strong>当前注册的 Harness(17 个)</strong></p>
32
+
33
+ <table align="center">
34
+ <tbody>
35
+ <tr>
36
+ <td align="center"><img src="src/assets/icons/antigravity-color.svg" width="28" height="28" alt="Antigravity"><br><sub>Antigravity</sub></td>
37
+ <td align="center"><img src="src/assets/icons/codex-harness.svg" width="28" height="28" alt="Codex"><br><sub>Codex</sub></td>
38
+ <td align="center"><img src="src/assets/icons/claude-color.svg" width="28" height="28" alt="Claude Code"><br><sub>Claude Code</sub></td>
39
+ <td align="center"><img src="src/assets/icons/pi.svg" width="28" height="28" alt="Pi"><br><sub>Pi</sub></td>
40
+ </tr>
41
+ <tr>
42
+ <td align="center"><img src="src/assets/icons/omp-color.svg" width="28" height="28" alt="Oh My Pi"><br><sub>Oh My Pi</sub></td>
43
+ <td align="center"><img src="src/assets/icons/deepseek-color.svg" width="28" height="28" alt="DeepSeek Harness"><br><sub>DeepSeek</sub></td>
44
+ <td align="center"><img src="src/assets/icons/opencode-color.svg" width="28" height="28" alt="OpenCode"><br><sub>OpenCode</sub></td>
45
+ <td align="center"><img src="src/assets/icons/grok-color.svg" width="28" height="28" alt="Grok"><br><sub>Grok</sub></td>
46
+ </tr>
47
+ <tr>
48
+ <td align="center"><img src="src/assets/icons/openclaw-color.svg" width="28" height="28" alt="OpenClaw"><br><sub>OpenClaw</sub></td>
49
+ <td align="center"><img src="src/assets/icons/hermes-color.svg" width="28" height="28" alt="Hermes"><br><sub>Hermes</sub></td>
50
+ <td align="center"><img src="src/assets/icons/qoder-color.svg" width="28" height="28" alt="Qoder"><br><sub>Qoder</sub></td>
51
+ <td align="center"><img src="src/assets/icons/codebuddy-color.svg" width="28" height="28" alt="CodeBuddy"><br><sub>CodeBuddy</sub></td>
52
+ </tr>
53
+ <tr>
54
+ <td align="center"><img src="src/assets/icons/kiro-cli-color.svg" width="28" height="28" alt="Kiro"><br><sub>Kiro</sub></td>
55
+ <td align="center"><img src="src/assets/icons/cursor.svg" width="28" height="28" alt="Cursor"><br><sub>Cursor</sub></td>
56
+ <td align="center"><img src="src/assets/icons/zcode-color.svg" width="28" height="28" alt="ZCode"><br><sub>ZCode</sub></td>
57
+ <td align="center"><img src="src/assets/icons/trae-color.svg" width="28" height="28" alt="Trae"><br><sub>Trae</sub></td>
58
+ </tr>
59
+ <tr>
60
+ <td align="center"><img src="src/assets/icons/cline-color.svg" width="28" height="28" alt="Cline"><br><sub>Cline</sub></td>
61
+ </tr>
62
+ </tbody>
63
+ </table>
64
+
65
+ <p align="center"><sub>图标与 Harness 能力均来自项目自身的注册表;只有本机已安装且握手成功的 Harness 才会进入真实运行。</sub></p>
66
+
67
+ Harness Mix 是接入官方 Codex Desktop 原生界面的本地内核。它通过本地编译的 CLI Shim 对接桌面的 app-server 协议,把包括 Antigravity、Codex、Pi、Oh My Pi、Claude Code、DeepSeek Harness、OpenCode、Grok、OpenClaw、Hermes、Qoder、CodeBuddy、Kiro CLI、Cursor CLI、ZCode、Trae 和 Cline 在内的原生 Coding Harness 接入同一套 UI。Host Runtime 与 Protocol Core 管理任务映射、协作和事件投影;模型调用、工具执行、原生会话与凭据仍由各 Harness 自己管理。
68
+
69
+ ## 界面预览
70
+
71
+ <p align="center">
72
+ <img src="docs/images/codex-desktop-home.png" width="960" alt="Codex Desktop 原生首页中的 Harness Mix">
73
+ </p>
74
+
75
+ 预览来自当前 Codex Desktop 原生窗口:Harness Mix 作为原生扩展入口出现在桌面工具栏和 Composer 中,会话、模型、工具与权限仍由 Codex Desktop 及各 Harness 管理。
76
+
77
+ | 功能模块 | 核心能力 | 交互入口与特点 |
78
+ | :--- | :--- | :--- |
79
+ | **🔄 跨 Harness 任务接力** | 4 种接力模式(继续执行 / 执行计划 / 独立审查 / 重新分析)平滑交接 | 输入框接力角标 / `/switch`;持久化脱敏检查点与证据追溯 |
80
+ | **🎨 皮肤市场** | 内置 HeiGe、Codex Styler、Dream Skin 与经典编辑器配色主题,支持亮色 / 暗色、背景装饰和可读性保护 | 设置 → 皮肤;一键预览、应用和恢复原生外观 |
81
+ | **📚 历史会话导入与引用** | 一键导入 Pi / Claude / Codex / CodeBuddy 原生历史并可中断续跑;`#` 引用任意旧会话注入脱敏上下文 | 引用仅预取最近一页;MCP 只读工具 `get_session_info` / `list_session_messages` 供 Harness 按需翻页与读取分支 / 模型 / 用量元数据 |
82
+ | **🤝 多 Agent 协同编排** | 输入 `#` 唤起目标 Harness,胶囊标签直观管理,主控强约束派发 | 输入框 `#` 菜单;支持循环审查验证、子任务级联取消与超时熔断 |
83
+ | **🧩 原生 Skills 管理** | 全量覆盖 17 个 Harness 原生技能目录,会话启动自动预建根目录 | 设置 → Skills;支持单个 `SKILL.md` 或完整文件夹直接拖拽安装 |
84
+ | **🛠️ 原生 MCP 扩展** | 支持本地 stdio 与远程 Streamable HTTP / SSE 协议 | 设置 → MCP;支持自定义 Header 传递,按 Harness 独立生效 |
85
+ | **📋 原生消息队列** | 完整接入 Codex 会话排队机制(增删改查、排序、插队抢占与自动排空) | 原生 Composer 队列;当前回合完成后自动顺序调度执行排队消息 |
86
+ | **✅ 可配置验证门禁** | 任务级 off / advisory / required 策略,内置一致性检查与自定义验证命令 | 命令面板 `/gate`、`/verify`;强制模式保护隔离分支合并与推送 |
87
+ | **💾 会话存储治理** | schema v3 分片惰性加载、无损紧凑存储、迁移备份与体积诊断 | 冷启动只读任务索引;打开任务时才恢复对应 Core checkpoint |
88
+ | **🩹 失败分类与恢复** | 失败回合归类为连接 / 登录 / 额度 / 被拒 / 服务异常五类,分类来自原生结构化错误(Codex `codexErrorInfo` 透传)、状态码或消息特征,无法归类时诚实标注 unknown | 错误状态随任务投影;Renderer 可查 `harnessmix/harness/turn-error` 获取分类与动作(重试 / 去登录 / 新建会话),login 按钮按 Harness 真实登录能力出现 |
89
+ | **🌐 ChatGPT 侧边栏桥接** | 安全脱敏提取当前会话上下文并一键生成结构化草稿 | Web 快捷聊天面板;直通注入 ChatGPT,实现跨工具无缝协作 |
90
+ | **👤 账户与用量隔离** | Codex 多账户隔离与即时切换;实时追踪 Token / Credits 用量 | 原生侧边栏与设置面板;各 Harness 凭据、模型与审批原生自理 |
91
+
92
+ ### 🎨 皮肤市场预览
93
+
94
+ 主题资源随项目发布,图片直接使用仓库内的授权素材;应用皮肤只改变视觉层,不改变 Codex 原生交互和 Harness 执行行为。
95
+
96
+ <table align="center">
97
+ <tr>
98
+ <td align="center"><img src="src/assets/skins/heige/themes/miku-488137/hero.webp" width="360" alt="Miku 主题"><br><sub>🎀 Miku</sub></td>
99
+ <td align="center"><img src="src/assets/skins/heige/themes/genshin-night/hero.webp" width="360" alt="Genshin Night 主题"><br><sub>🌌 Genshin Night</sub></td>
100
+ </tr>
101
+ <tr>
102
+ <td align="center"><img src="src/assets/skins/heige/themes/deepspace-star/hero.webp" width="360" alt="Deepspace Star 主题"><br><sub>🌠 Deepspace Star</sub></td>
103
+ <td align="center"><img src="src/assets/skins/heige/themes/wuthering-tide/hero.webp" width="360" alt="Wuthering Tide 主题"><br><sub>🌊 Wuthering Tide</sub></td>
104
+ </tr>
105
+ </table>
106
+
107
+ ## 原生 Harness 功能支持矩阵
108
+
109
+ > 💡 **设计原则**:所有能力严格在 Adapter `manifest` 中诚实声明,界面按真实能力渲染,不依靠名称猜测。凭据、模型、工具与权限审批始终由原生 Harness 独立掌控。
110
+
111
+ | Harness | 原生接入协议 | 流式输出 | 思考推理 | 工具审批 | 用户提问 | 会话恢复/Fork | 图片附件 | 原生 Skills | MCP 扩展 |
112
+ | :--- | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
113
+ | **Antigravity** | `agy` CLI (`stream-json` / Hook) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
114
+ | **Codex** | `codex app-server --stdio` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
115
+ | **Claude Code** | `@anthropic-ai/claude-agent-sdk` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
116
+ | **Pi** | `pi --mode rpc` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ➖ |
117
+ | **Oh My Pi** | `omp --mode rpc` (`pi-family.js`) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ➖ |
118
+ | **DeepSeek** | 普通 Web Remote / 协作 ACP | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
119
+ | **OpenCode** | `opencode serve` (HTTP / SSE) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
120
+ | **Grok** | `grok agent stdio` (`_x.ai/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
121
+ | **OpenClaw** | Gateway WebSocket Loopback | ✅ | ➖ | ✅ | ➖ | ✅ / ➖ | ✅ | ✅ | ➖ |
122
+ | **Hermes** | `hermes acp` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ➖ | ✅ | ✅ |
123
+ | **CodeBuddy** | `codebuddy --acp` (`_codebuddy.ai/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / ➖ | ✅ | ✅ | ✅ |
124
+ | **Kiro CLI** | `kiro-cli acp` (`_kiro/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ➖ | ✅ | ✅ |
125
+ | **Cursor CLI** | `cursor-agent acp` (`cursor/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / ➖ | ➖ | ✅ | ✅ |
126
+ | **Qoder** | `qoder --acp` | ✅ | ➖ | ✅ | ➖ | ✅ / ➖ | ✅ | ✅ | ✅ |
127
+ | **ZCode** | `zcode.cjs app-server --stdio`(ZCode Protocol v1) | ✅ | | ✅ | | ✅ / ➖ | | ✅ | |
128
+ | **Trae** | 兼容 ACP 桥接程序 | ✅ | ➖ | ✅ | ➖ | ✅ / ➖ | ➖ | ✅ | ✅ |
129
+ | **Cline** | `cline --acp` | ✅ | ✅ | ✅ | ➖ | ✅ / ➖ | ✅ | ✅ | ✅ |
130
+
131
+ <sub>注:✅ 为原生支持并已打通;➖ 为上游协议当前未开放或未声明;只有本机已安装且握手成功的 Harness 才会进入真实运行。详见 [原生 ACP 深度适配](docs/native-acp.md) 与 [Harness 管理说明](docs/harness-management.md)。</sub>
132
+
133
+ ## 核心功能特色
134
+
135
+ ### 🔄 跨 Harness 任务接力(Task Handoff)
136
+ 一个 Harness 负责深入分析,另一个编写具体实现,再切回原 Harness 交叉复核——整个过程无缝保留在同一个 Codex Desktop 原生窗口中:
137
+ - **现场完整保留**:保留对话历史、未提交代码改动、Git 状态与 Review 记录。
138
+ - **持久化检查点**:创建带哈希的接力快照,自动脱敏测试证据与敏感密钥,支持随时暂停与恢复。
139
+ - **独立会话恢复**:每个 Harness 的原生 Session 与参数独立保存,切回时调用其原生恢复机制(如 Pi `--session` 或 Claude `resume`)。
140
+ - **四种接力方式**:支持「继续执行」、「执行上一方案」、「独立审查」与「重新分析」。
141
+
142
+ ### 🤝 多 Agent 协同编排(Multi-Agent Collaboration)
143
+ - **触发符解耦**:在原生输入框输入 `#` 调出协同菜单(`#pi`、`#claude`、`#codex`、`#dsh`),完全保留官方 `@` 菜单给 Codex 原生功能。
144
+ - **标签可视化**:已选协同 Agent 在输入框顶部呈现为胶囊标签,支持点击快速删除或 Backspace 撤销。
145
+ - **严谨编排约束**:自动为主控 Coordinator 注入硬约束,严禁越界派发给未指定的 Harness;完善级联取消与子任务超时熔断机制。
146
+ - **真正的 Agent Team**:一个 Lead 可组织最多六个并发的具名 Harness 成员;Team、职责、共享任务依赖图和成员邮箱均由 Host 持久化,teammate 可直接定向通信、交接和反馈,而不是只把并行结果返回 Lead。
147
+ - **独立开关**:「设置 → 协作」中「多 Agent 协作」与「Agent Team」是两个独立开关(默认均开启);关闭协作即同时停用团队,关闭团队则保留一次性委派。
148
+ - **原生 Team Workbench**:对话顶部团队驾驶舱点击「展开详情」后在 Codex 内容流内显示唯一主导者、各成员职责、独立任务列、进度、通信流和事件回放,不覆盖原生侧栏、消息或输入框;成员卡片可跳转其原生子任务。状态直接向 Host 实时刷新,各成员仍使用自己的原生 Harness Session、模型、工具、权限和账户。
149
+ - **统一 Workspace 能力**:全部 Harness 由 Host 统一获得 Git 探测、Worktree 隔离和最终快照 Diff;原生实时 Diff 继续按各 Harness 实际协议叠加。显式隔离失败不会降级到共享目录。
150
+
151
+ ### 🧩 原生 Skills 与 MCP 管理
152
+ - **17 平台免配置预建**:打开会话时自动预建全部 17 个 Harness 声明的原生 Skills 根目录,新安装 Harness 也能即开即用。
153
+ - **拖拽安装**:在「设置 → Skills」中可将单个 `SKILL.md` 或完整技能文件夹直接拖拽安装,自带安全路径校验。
154
+ - **作用域与安全停用**:支持 Global(全局)与 Project(项目级)无缝切换;停用时安全移入保留目录,绝不损坏用户源文件。
155
+ - **远程 MCP 支持**:支持配置带自定义 Headers 的 Streamable HTTP / SSE 远程服务。
156
+
157
+ ### 🎨 皮肤市场与可读性保护
158
+ - **主题预览与切换**:设置 → 皮肤中可预览并应用内置主题,也可随时恢复原生 Codex 外观。
159
+ - **全界面覆盖**:背景、侧边栏、消息卡片、输入框、按钮和文字颜色统一使用主题令牌。
160
+ - **暗色可读性**:自动增加遮罩和对比度,避免侧边栏、任务列表和消息内容在深色背景上消失。
161
+ - **交互零侵入**:不替换 Codex 控件,不修改模型、工具、权限、队列或原生会话。
162
+
163
+ ## 本地运行
164
+
165
+ 开发环境需要 Windows、macOS 或 Linux,近期 Node.js LTS 和 npm。应用不会读取或保存 Harness 的账户密钥,请先在对应的原生 CLI 中完成安装与登录;平台前提和真机验收范围见 [跨平台指南](docs/cross-platform.md)。
166
+ ```powershell
167
+ git clone https://github.com/emo-xiaoyu/harness-mix.git
168
+ cd harness-mix
169
+ npm install
170
+ ```
171
+
172
+ ### 从 npm 安装
173
+
174
+ Harness Mix 发布为 `@harness-mix/cli` npm 包,命令名仍是 `harness-mix`。当前发布包包含本次构建平台的 native Shim;macOS/Linux 请在目标系统执行源码构建,完整说明见 [跨平台指南](docs/cross-platform.md)。
175
+
176
+ ```powershell
177
+ npm install --global @harness-mix/cli
178
+ harness-mix
179
+ ```
180
+
181
+ 升级到最新版本:
182
+
183
+ ```powershell
184
+ npm update --global @harness-mix/cli
185
+ ```
186
+
187
+ 首次运行会重启已打开的 Codex Desktop。npm 包只分发 Harness Mix 本身;各 Harness 的 CLI、登录状态、模型额度和权限仍需按下表在本机单独安装和配置。
188
+
189
+ ### 运行方式
190
+
191
+ 原生模式(默认):本地编译的 Shim 与 Renderer 扩展接入官方 Codex Desktop,模型选择会路由到对应 Harness。首次启动会重启已打开的 Codex Desktop:
192
+ ```powershell
193
+ npm start
194
+ ```
195
+
196
+ 常用原生依赖:
197
+
198
+ - Codex:安装 `@openai/codex`,确保 `codex` 命令可用。
199
+ - Pi:确保 `pi.cmd` 可用。
200
+ - Claude Code:SDK 已由 npm 依赖安装,认证仍由 Claude Code 环境管理。
201
+ - DeepSeek Harness:使用本项目锁定的 `@deepseek-ai/dsh@0.1.2-rc.1`。可通过 `HARNESS_MIX_DSH_ROOT` 显式指定源码目录,但版本必须被内核支持。
202
+ - CodeBuddy:安装官方 `codebuddy` CLI 并完成登录;旧 WorkBuddy 安装也可通过兼容别名继续使用。
203
+ - Kiro CLI:安装 `kiro-cli`,启用 `acp` 子命令并完成 CLI 登录。
204
+ - Cursor CLI:安装 `cursor-agent` 并完成 CLI 登录。
205
+ - Cline:安装 `cline`(`npm i -g cline`)并通过 `cline auth` 完成登录;Harness Mix 以官方 `cline --acp` 接入。
206
+ - Qoder:安装 `qodercli`(或 `qoder`)并完成 CLI 登录;ACP 入口由本机版本决定。
207
+ - ZCode:安装 ZCode 桌面版并完成登录(自带无头 `glm/zcode.cjs`),内核直接以 `zcode.cjs app-server --stdio`(ZCode Protocol v1)接入;共享凭据、模型目录与账号声明均由 ZCode 自治。可用 `HARNESS_MIX_ZCODE_EXECUTABLE` 覆盖 CLI 路径。多 Agent 协作中 ZCode 可作为派活目标、Agent Team 成员与 `/delegate` 对象;`#` 主控角色待协议提供运行时 MCP 注册后开放。
208
+ - Trae:只有在拥有已验证的 ACP 兼容桥接程序时才配置 `HARNESS_MIX_TRAE_EXECUTABLE`,项目不会猜测官方入口。
209
+
210
+ 原生接入方式、数据目录和验证说明见 [原生 Codex 接入](docs/native-codex.md)。
211
+
212
+ ## 验证
213
+
214
+ ```powershell
215
+ npm run check
216
+ npm run test:core-all
217
+ npm run e2e:native
218
+ npm run smoke:native-ui
219
+ ```
220
+
221
+ 涉及原生 Adapter 时,再执行对应的真实链路:
222
+
223
+ ```powershell
224
+ npm run e2e:pi
225
+ npm run e2e:dsh
226
+ npm run e2e:claude
227
+ npm run e2e:codex
228
+ ```
229
+
230
+ 部分 E2E 会启动真实 Harness,可能需要本机安装、登录或模型额度。测试生成物写入 `output/`,不应提交到仓库。
231
+
232
+ ## License
233
+
234
+ Harness Mix 基于 [Apache License 2.0](LICENSE) 或 [MIT](LICENSE-MIT) 双许可证发布,可任选其一。第三方组件仍适用各自的许可证;归属信息见 [NOTICE](NOTICE)。
235
+
236
+ ---
237
+
238
+ <a id="en"></a>
239
+
240
+ # Harness Mix
241
+
242
+ macOS/Linux source builds and launch adaptation are in place; full desktop acceptance on those systems still has to run on the respective machines. See the [Cross-Platform Guide](docs/cross-platform.md) for install options, Linux desktop prerequisites and support boundaries.
243
+
244
+ <p align="center">
245
+ <img src="src/assets/brand-harness-mix.png" width="92" alt="Harness Mix logo">
246
+ </p>
247
+
248
+ <p align="center">
249
+ ⭐ If this project helps you, please give us a <a href="https://github.com/emo-xiaoyu/harness-mix">Star</a>! ⭐
250
+ </p>
251
+
252
+ <p align="center">
253
+ <a href="https://linux.do/"><img alt="Linux DO" src="https://img.shields.io/badge/Linux%20DO-%E7%A4%BE%E5%8C%BA-0A66C2.svg"></a>
254
+ </p>
255
+
256
+ <p align="center"><strong>The Codex native UI, connecting multiple native coding Harnesses with seamless task handoff between them.</strong></p>
257
+
258
+ <p align="center">
259
+ <a href="LICENSE"><img alt="License: Apache-2.0 OR MIT" src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg"></a>
260
+ <img alt="UI" src="https://img.shields.io/badge/UI-Codex%20Desktop-412991.svg">
261
+ <img alt="Windows" src="https://img.shields.io/badge/platform-Windows-0078D4.svg">
262
+ <img alt="macOS" src="https://img.shields.io/badge/platform-macOS-555555.svg">
263
+ <img alt="Linux" src="https://img.shields.io/badge/platform-Linux-FCC624.svg">
264
+ </p>
265
+
266
+ <p align="center"><strong>Currently registered Harnesses (17)</strong></p>
267
+
268
+ <table align="center">
269
+ <tbody>
270
+ <tr>
271
+ <td align="center"><img src="src/assets/icons/antigravity-color.svg" width="28" height="28" alt="Antigravity"><br><sub>Antigravity</sub></td>
272
+ <td align="center"><img src="src/assets/icons/codex-harness.svg" width="28" height="28" alt="Codex"><br><sub>Codex</sub></td>
273
+ <td align="center"><img src="src/assets/icons/claude-color.svg" width="28" height="28" alt="Claude Code"><br><sub>Claude Code</sub></td>
274
+ <td align="center"><img src="src/assets/icons/pi.svg" width="28" height="28" alt="Pi"><br><sub>Pi</sub></td>
275
+ </tr>
276
+ <tr>
277
+ <td align="center"><img src="src/assets/icons/omp-color.svg" width="28" height="28" alt="Oh My Pi"><br><sub>Oh My Pi</sub></td>
278
+ <td align="center"><img src="src/assets/icons/deepseek-color.svg" width="28" height="28" alt="DeepSeek Harness"><br><sub>DeepSeek</sub></td>
279
+ <td align="center"><img src="src/assets/icons/opencode-color.svg" width="28" height="28" alt="OpenCode"><br><sub>OpenCode</sub></td>
280
+ <td align="center"><img src="src/assets/icons/grok-color.svg" width="28" height="28" alt="Grok"><br><sub>Grok</sub></td>
281
+ </tr>
282
+ <tr>
283
+ <td align="center"><img src="src/assets/icons/openclaw-color.svg" width="28" height="28" alt="OpenClaw"><br><sub>OpenClaw</sub></td>
284
+ <td align="center"><img src="src/assets/icons/hermes-color.svg" width="28" height="28" alt="Hermes"><br><sub>Hermes</sub></td>
285
+ <td align="center"><img src="src/assets/icons/qoder-color.svg" width="28" height="28" alt="Qoder"><br><sub>Qoder</sub></td>
286
+ <td align="center"><img src="src/assets/icons/codebuddy-color.svg" width="28" height="28" alt="CodeBuddy"><br><sub>CodeBuddy</sub></td>
287
+ </tr>
288
+ <tr>
289
+ <td align="center"><img src="src/assets/icons/kiro-cli-color.svg" width="28" height="28" alt="Kiro"><br><sub>Kiro</sub></td>
290
+ <td align="center"><img src="src/assets/icons/cursor.svg" width="28" height="28" alt="Cursor"><br><sub>Cursor</sub></td>
291
+ <td align="center"><img src="src/assets/icons/zcode-color.svg" width="28" height="28" alt="ZCode"><br><sub>ZCode</sub></td>
292
+ <td align="center"><img src="src/assets/icons/trae-color.svg" width="28" height="28" alt="Trae"><br><sub>Trae</sub></td>
293
+ </tr>
294
+ <tr>
295
+ <td align="center"><img src="src/assets/icons/cline-color.svg" width="28" height="28" alt="Cline"><br><sub>Cline</sub></td>
296
+ </tr>
297
+ </tbody>
298
+ </table>
299
+
300
+ <p align="center"><sub>Icons and Harness capabilities come from the project's own registry; only Harnesses installed locally with a successful handshake enter real runs.</sub></p>
301
+
302
+ Harness Mix is a local kernel that plugs into the official Codex Desktop native UI. Through a locally compiled CLI Shim it speaks the desktop's app-server protocol and connects native coding Harnesses — including Antigravity, Codex, Pi, Oh My Pi, Claude Code, DeepSeek Harness, OpenCode, Grok, OpenClaw, Hermes, Qoder, CodeBuddy, Kiro CLI, Cursor CLI, ZCode, Trae and Cline — into one UI. The Host Runtime and Protocol Core manage task mapping, collaboration and event projection; model calls, tool execution, native sessions and credentials stay owned by each Harness itself.
303
+
304
+ ## UI Preview
305
+
306
+ <p align="center">
307
+ <img src="docs/images/codex-desktop-home.png" width="960" alt="Harness Mix in the Codex Desktop native home">
308
+ </p>
309
+
310
+ The preview comes from the current Codex Desktop native window: Harness Mix appears as a native extension entry in the desktop toolbar and the Composer, while sessions, models, tools and permissions remain managed by Codex Desktop and each Harness.
311
+
312
+ | Module | Core capabilities | Entry points & notes |
313
+ | :--- | :--- | :--- |
314
+ | **🔄 Cross-Harness Task Handoff** | 4 handoff modes (continue / run plan / independent review / re-analyze) with smooth transitions | Composer handoff badge / `/switch`; persisted redacted checkpoints with evidence traceability |
315
+ | **🎨 Skin Marketplace** | Built-in HeiGe, Codex Styler, Dream Skin and classic editor-palette themes with light / dark modes, background decorations and readability protection | Settings Skins; one-click preview, apply and restore the stock look |
316
+ | **📚 History Import & Reference** | One-click import of Pi / Claude / Codex / CodeBuddy native history with interruptible resume; `#` references any past session with redacted context injected | References prefetch only the latest page; read-only MCP tools `get_session_info` / `list_session_messages` let Harnesses page through and read branch / model / usage metadata on demand |
317
+ | **🤝 Multi-Agent Orchestration** | Type `#` to summon target Harnesses, manage them as capsule tags, dispatch under strong coordinator constraints | Composer `#` menu; loop review and verification, cascading subtask cancellation and timeout circuit breaking |
318
+ | **🧩 Native Skills Management** | Covers the native skill directories of all 17 Harnesses, with root directories pre-created at session start | Settings → Skills; drag-and-drop install of a single `SKILL.md` or a complete folder |
319
+ | **🛠️ Native MCP Extensions** | Local stdio and remote Streamable HTTP / SSE transports | Settings MCP; custom headers supported, applied per Harness |
320
+ | **📋 Native Message Queue** | Full integration of the Codex session queue (add / remove / edit, reorder, preempt and auto-drain) | Native Composer queue; queued messages are scheduled sequentially once the current turn completes |
321
+ | **✅ Configurable Verification Gates** | Per-task off / advisory / required policies, built-in consistency checks and custom verification commands | Command palette `/gate`, `/verify`; required mode protects isolated branch merges and pushes |
322
+ | **💾 Session Storage Governance** | schema v3 sharded lazy loading, lossless compact storage, migration backups and size diagnostics | Cold start reads only the task index; a task's Core checkpoint is restored only when it is opened |
323
+ | **🩹 Failure Classification & Recovery** | Failed turns are classified as connection / login / quota / rejected / service fault, derived from native structured errors (Codex `codexErrorInfo` passthrough), status codes or message patterns, and honestly marked unknown when nothing matches | Error state follows the task projection; the Renderer can query `harnessmix/harness/turn-error` for the classification and actions (retry / go sign in / new session), and the login button only appears when the Harness truly supports it |
324
+ | **🌐 ChatGPT Sidebar Bridge** | Safely redacts and extracts the current session context and generates a structured draft in one click | Web quick-chat panel; injected straight into ChatGPT for seamless cross-tool collaboration |
325
+ | **👤 Account & Usage Isolation** | Codex multi-account isolation with instant switching; real-time Token / Credits tracking | Native sidebar and settings panel; each Harness manages its own credentials, models and approvals |
326
+
327
+ ### 🎨 Skin Marketplace Preview
328
+
329
+ Theme assets ship with the project and the images use licensed material from this repository; applying a skin only changes the visual layer, never Codex's native interactions or Harness execution behavior.
330
+
331
+ <table align="center">
332
+ <tr>
333
+ <td align="center"><img src="src/assets/skins/heige/themes/miku-488137/hero.webp" width="360" alt="Miku theme"><br><sub>🎀 Miku</sub></td>
334
+ <td align="center"><img src="src/assets/skins/heige/themes/genshin-night/hero.webp" width="360" alt="Genshin Night theme"><br><sub>🌌 Genshin Night</sub></td>
335
+ </tr>
336
+ <tr>
337
+ <td align="center"><img src="src/assets/skins/heige/themes/deepspace-star/hero.webp" width="360" alt="Deepspace Star theme"><br><sub>🌠 Deepspace Star</sub></td>
338
+ <td align="center"><img src="src/assets/skins/heige/themes/wuthering-tide/hero.webp" width="360" alt="Wuthering Tide theme"><br><sub>🌊 Wuthering Tide</sub></td>
339
+ </tr>
340
+ </table>
341
+
342
+ ## Native Harness Support Matrix
343
+
344
+ > 💡 **Design principle**: every capability is honestly declared in the Adapter `manifest`, and the UI renders from real capabilities instead of guessing from names. Credentials, models, tools and permission approvals always remain under each native Harness's own control.
345
+
346
+ | Harness | Native protocol | Streaming | Reasoning | Tool approval | User questions | Resume / Fork | Image attachments | Native Skills | MCP |
347
+ | :--- | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
348
+ | **Antigravity** | `agy` CLI (`stream-json` / Hook) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
349
+ | **Codex** | `codex app-server --stdio` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
350
+ | **Claude Code** | `@anthropic-ai/claude-agent-sdk` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | |
351
+ | **Pi** | `pi --mode rpc` | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ➖ |
352
+ | **Oh My Pi** | `omp --mode rpc` (`pi-family.js`) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | |
353
+ | **DeepSeek** | Plain Web Remote / collaboration ACP | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
354
+ | **OpenCode** | `opencode serve` (HTTP / SSE) | ✅ | ✅ | ✅ | ✅ | ✅ / ✅ | ✅ | ✅ | ✅ |
355
+ | **Grok** | `grok agent stdio` (`_x.ai/*`) | ✅ | | ✅ | | ✅ / | ✅ | ✅ | |
356
+ | **OpenClaw** | Gateway WebSocket Loopback | ✅ | | ✅ | | ✅ / | | ✅ | |
357
+ | **Hermes** | `hermes acp` | ✅ | ✅ | ✅ | ✅ | ✅ / | | ✅ | ✅ |
358
+ | **CodeBuddy** | `codebuddy --acp` (`_codebuddy.ai/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / | | ✅ | ✅ |
359
+ | **Kiro CLI** | `kiro-cli acp` (`_kiro/*`) | ✅ | ✅ | ✅ | ✅ | ✅ / | ➖ | ✅ | ✅ |
360
+ | **Cursor CLI** | `cursor-agent acp` (`cursor/*`) | ✅ | | ✅ | | ✅ / ➖ | | ✅ | ✅ |
361
+ | **Qoder** | `qoder --acp` | ✅ | ➖ | ✅ | ➖ | ✅ / ➖ | | ✅ | ✅ |
362
+ | **ZCode** | `zcode.cjs app-server --stdio` (ZCode Protocol v1) | ✅ | | ✅ | | ✅ / ➖ | | ✅ | |
363
+ | **Trae** | Compatible ACP bridge | ✅ | | ✅ | ➖ | ✅ / ➖ | | ✅ | ✅ |
364
+ | **Cline** | `cline --acp` | ✅ | ✅ | ✅ | ➖ | ✅ / ➖ | ✅ | ✅ | ✅ |
365
+
366
+ <sub>Note: ✅ means natively supported and wired end-to-end; ➖ means the upstream protocol currently does not expose or declare it; only Harnesses installed locally with a successful handshake enter real runs. See [Native ACP Deep Integration](docs/native-acp.md) and [Harness Management](docs/harness-management.md) for details.</sub>
367
+
368
+ ## Core Features
369
+
370
+ ### 🔄 Cross-Harness Task Handoff
371
+ One Harness analyzes in depth, another writes the implementation, then you switch back to the original Harness for cross-review all seamlessly within the same Codex Desktop native window:
372
+ - **Context fully preserved**: conversation history, uncommitted code changes, Git status and review records all carry over.
373
+ - **Persisted checkpoints**: hashed handoff snapshots with automatic redaction of test evidence and sensitive keys, pausable and resumable at any time.
374
+ - **Independent session resume**: each Harness's native session and parameters are stored separately, and switching back invokes its native resume mechanism (e.g. Pi `--session` or Claude `resume`).
375
+ - **Four handoff modes**: "Continue", "Run the previous plan", "Independent review" and "Re-analyze".
376
+
377
+ ### 🤝 Multi-Agent Collaboration
378
+ - **Decoupled trigger**: type `#` in the native composer to open the collaboration menu (`#pi`, `#claude`, `#codex`, `#dsh`); the official `@` menu stays fully reserved for Codex native features.
379
+ - **Tag visualization**: selected collaborating Agents appear as capsule tags above the composer, with click-to-remove and Backspace-to-undo.
380
+ - **Strict orchestration constraints**: the coordinator is automatically injected with hard constraints that forbid dispatching to unspecified Harnesses; cascading cancellation and subtask timeout circuit breaking are built in.
381
+ - **Real Agent Teams**: one Lead can organize up to six concurrent named Harness members; the Team, roles, shared task dependency graph and member mailboxes are all persisted by the Host, so teammates communicate, hand off and report directly instead of only returning parallel results to the Lead.
382
+ - **Independent switches**: Settings Collaboration offers separate toggles for Multi-Agent Collaboration and Agent Team (both on by default); disabling collaboration also disables teams, while disabling teams keeps one-shot delegation available.
383
+ - **Native Team Workbench**: expanding the details of the team cockpit at the top of a conversation shows the single lead, member roles, per-member task lanes, progress, message flow and event replay inside the Codex content stream — without covering the native sidebar, messages or composer. Member cards jump to their native subtasks. State refreshes live from the Host, and members keep using their own native Harness sessions, models, tools, permissions and accounts.
384
+ - **Unified workspace capabilities**: every Harness uniformly gets Host-owned Git detection, worktree isolation and a final snapshot diff; native live diffs continue to layer on top according to each Harness's real protocol. An explicit isolation failure never degrades to a shared directory.
385
+
386
+ ### 🧩 Native Skills & MCP Management
387
+ - **Zero-config pre-creation across 17 platforms**: opening a session pre-creates the native Skills root directories declared by all 17 Harnesses, so even newly installed Harnesses work out of the box.
388
+ - **Drag-and-drop install**: in Settings Skills, drop a single `SKILL.md` or a complete skill folder to install it, with safe path validation built in.
389
+ - **Scoped and safe disabling**: switch seamlessly between Global and Project scopes; disabling moves skills into a retention directory and never damages user source files.
390
+ - **Remote MCP support**: configure Streamable HTTP / SSE remote servers with custom headers.
391
+
392
+ ### 🎨 Skin Marketplace & Readability Protection
393
+ - **Theme preview and switching**: preview and apply built-in themes in Settings → Skins, or restore the stock Codex look at any time.
394
+ - **Full-UI coverage**: background, sidebar, message cards, composer, buttons and text colors all follow theme tokens.
395
+ - **Dark-mode readability**: automatic overlays and contrast keep the sidebar, task lists and message content visible on dark backgrounds.
396
+ - **Zero interaction intrusion**: no Codex controls are replaced, and models, tools, permissions, queues and native sessions are never modified.
397
+
398
+ ## Running Locally
399
+
400
+ Development requires Windows, macOS or Linux, a recent Node.js LTS and npm. The app never reads or stores Harness account credentials — install and sign in with each native CLI first; see the [Cross-Platform Guide](docs/cross-platform.md) for platform prerequisites and on-device acceptance scope.
401
+ ```powershell
402
+ git clone https://github.com/emo-xiaoyu/harness-mix.git
403
+ cd harness-mix
404
+ npm install
405
+ ```
406
+
407
+ ### Install from npm
408
+
409
+ Harness Mix is published as the `@harness-mix/cli` npm package, and the command is still `harness-mix`. The current release bundles the native Shim for the platform that built it; on macOS/Linux, build from source on the target system — full details are in the [Cross-Platform Guide](docs/cross-platform.md).
410
+
411
+ ```powershell
412
+ npm install --global @harness-mix/cli
413
+ harness-mix
414
+ ```
415
+
416
+ Upgrade to the latest version:
417
+
418
+ ```powershell
419
+ npm update --global @harness-mix/cli
420
+ ```
421
+
422
+ The first run restarts an already-open Codex Desktop. The npm package distributes Harness Mix itself only; each Harness's CLI, login state, model quota and permissions still need to be installed and configured locally as listed below.
423
+
424
+ ### How to Run
425
+
426
+ Native mode (default): the locally compiled Shim and Renderer extension plug into the official Codex Desktop, and model selection routes to the corresponding Harness. The first launch restarts an already-open Codex Desktop:
427
+ ```powershell
428
+ npm start
429
+ ```
430
+
431
+ Common native dependencies:
432
+
433
+ - Codex: install `@openai/codex` and make sure the `codex` command is available.
434
+ - Pi: make sure `pi.cmd` is available.
435
+ - Claude Code: the SDK ships as an npm dependency; authentication stays managed by the Claude Code environment.
436
+ - DeepSeek Harness: uses the `@deepseek-ai/dsh@0.1.2-rc.1` version locked by this project. `HARNESS_MIX_DSH_ROOT` may explicitly point at a source checkout, but the version must be supported by the kernel.
437
+ - CodeBuddy: install the official `codebuddy` CLI and sign in; old WorkBuddy installs keep working through a compatibility alias.
438
+ - Kiro CLI: install `kiro-cli`, enable the `acp` subcommand and sign in.
439
+ - Cursor CLI: install `cursor-agent` and sign in.
440
+ - Cline: install `cline` (`npm i -g cline`) and sign in via `cline auth`; Harness Mix connects through the official `cline --acp`.
441
+ - Qoder: install `qodercli` (or `qoder`) and sign in; the ACP entry depends on the installed version.
442
+ - ZCode: install the ZCode desktop app and sign in (it bundles the headless `glm/zcode.cjs`); Harness Mix connects via `zcode.cjs app-server --stdio` (ZCode Protocol v1) while credentials, models and account state stay ZCode-owned. Override the CLI path with `HARNESS_MIX_ZCODE_EXECUTABLE`. In multi-agent work ZCode serves as a dispatch target, Agent-Team member and `/delegate` peer; the `#` lead role waits for a runtime MCP registration API upstream.
443
+ - Trae: only set `HARNESS_MIX_TRAE_EXECUTABLE` when you have a verified ACP-compatible bridge; the project never guesses official entry points.
444
+
445
+ See [Native Codex Integration](docs/native-codex.md) for wiring, data directories and verification notes.
446
+
447
+ ## Verification
448
+
449
+ ```powershell
450
+ npm run check
451
+ npm run test:core-all
452
+ npm run e2e:native
453
+ npm run smoke:native-ui
454
+ ```
455
+
456
+ When native Adapters are involved, also run the corresponding real chains:
457
+
458
+ ```powershell
459
+ npm run e2e:pi
460
+ npm run e2e:dsh
461
+ npm run e2e:claude
462
+ npm run e2e:codex
463
+ ```
464
+
465
+ Some E2E suites launch real Harnesses and may require local installs, sign-in or model quota. Test artifacts are written to `output/` and should not be committed.
466
+
467
+ ## License
468
+
469
+ Harness Mix is dual-licensed under [Apache License 2.0](LICENSE) or [MIT](LICENSE-MIT), at your option. Third-party components remain subject to their own licenses; see [NOTICE](NOTICE) for attribution.