@shuind/dsh-codex-harness 0.3.1 → 0.3.3
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.
- package/CHANGELOG.md +29 -0
- package/README.md +21 -43
- package/docs/preset-library.md +2 -2
- package/docs/tool-policy.md +1 -1
- package/lib/client.js +1738 -327
- package/lib/compact-command.js +7 -1
- package/lib/compaction.js +7 -1
- package/lib/hybrid-executor.js +23 -12
- package/lib/index.js +1266 -36
- package/lib/preferences.js +21 -2
- package/lib/tool-policy.js +11 -2
- package/lib/typert.js +42 -1
- package/lib/types/client/desktop.d.ts +20 -42
- package/lib/types/client/desktop.js +191 -126
- package/lib/types/client/index.d.ts +104 -28
- package/lib/types/client/index.js +97 -15
- package/lib/types/client/policy-drafts.d.ts +18 -0
- package/lib/types/client/policy-drafts.js +27 -0
- package/lib/types/client/policy-locale.d.ts +80 -20
- package/lib/types/client/policy-locale.js +197 -80
- package/lib/types/client/preset-manager.d.ts +25 -2
- package/lib/types/client/preset-manager.js +89 -5
- package/lib/types/client/preset-requests.d.ts +44 -1
- package/lib/types/client/preset-requests.js +150 -0
- package/lib/types/client/tool-policy.d.ts +7 -2
- package/lib/types/client/tool-policy.js +48 -6
- package/lib/types/contracts/preset-editor-schema.d.ts +35 -0
- package/lib/types/contracts/preset-editor-schema.js +39 -0
- package/lib/types/contracts/settings.d.ts +12 -0
- package/lib/types/contracts/settings.js +10 -1
- package/lib/types/contracts/ui-contracts.d.ts +52 -0
- package/lib/types/contracts/ui-contracts.js +58 -0
- package/lib/types/contracts/update.d.ts +73 -0
- package/lib/types/contracts/update.js +291 -0
- package/lib/types/entries/index.js +20 -2
- package/lib/types/entries/preferences.d.ts +2 -0
- package/lib/types/entries/preferences.js +9 -0
- package/lib/types/hybrid/hybrid-sdk.d.ts +1 -1
- package/lib/types/hybrid/hybrid-sdk.js +27 -13
- package/lib/types/presets/preset-editor.d.ts +13 -1
- package/lib/types/presets/preset-editor.js +24 -1
- package/lib/types/presets/pro-mode-store.d.ts +13 -0
- package/lib/types/presets/pro-mode-store.js +69 -0
- package/lib/types/responses/background-sse-codec.d.ts +23 -0
- package/lib/types/responses/background-sse-codec.js +230 -0
- package/lib/types/responses/background-stream.d.ts +28 -0
- package/lib/types/responses/background-stream.js +351 -0
- package/lib/types/responses/compact-checkpoint.js +3 -10
- package/lib/types/responses/fetch-transport.js +24 -9
- package/lib/types/responses/remote-compact.js +39 -11
- package/lib/types/responses/wire-rewrite.d.ts +4 -0
- package/lib/types/responses/wire-rewrite.js +30 -4
- package/lib/types/tools/codex-subagent.d.ts +14 -0
- package/lib/types/tools/codex-subagent.js +269 -0
- package/lib/types/update/checker.d.ts +14 -0
- package/lib/types/update/checker.js +166 -0
- package/locale/en.json +1 -1
- package/locale/hybrid-executor/en.json +1 -1
- package/locale/hybrid-executor/zh.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +6 -2
- package/src/client/desktop.tsx +370 -153
- package/src/client/index.tsx +122 -22
- package/src/client/policy-drafts.ts +45 -0
- package/src/client/policy-locale.ts +197 -80
- package/src/client/preset-manager.tsx +125 -4
- package/src/client/preset-requests.ts +185 -1
- package/src/client/tool-policy.tsx +63 -9
- package/src/contracts/preset-editor-schema.ts +44 -0
- package/src/contracts/settings.ts +20 -1
- package/src/contracts/ui-contracts.ts +91 -0
- package/src/contracts/update.ts +307 -0
- package/src/entries/index.ts +25 -2
- package/src/entries/preferences.ts +9 -0
- package/src/hybrid/hybrid-sdk.ts +28 -12
- package/src/presets/preset-editor.ts +31 -3
- package/src/presets/pro-mode-store.ts +80 -0
- package/src/responses/background-sse-codec.ts +237 -0
- package/src/responses/background-stream.ts +371 -0
- package/src/responses/compact-checkpoint.ts +2 -8
- package/src/responses/fetch-transport.ts +28 -9
- package/src/responses/remote-compact.ts +41 -11
- package/src/responses/wire-rewrite.ts +34 -3
- package/src/tools/codex-subagent.ts +290 -0
- package/src/update/checker.ts +193 -0
- package/tsdown.config.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.3 (2026-11-29)
|
|
4
|
+
|
|
5
|
+
- **OpenAI 官 key API Pro 模式**:
|
|
6
|
+
- 在输入框右侧为官方 OpenAI Responses API(`https://api.openai.com`)的 `GPT-5.6` / `6+` 模型提供会话级 `Pro` 开关(仅当前对话有效,新对话/重启/子代理默认关闭,中转端点与 Codex Connect 路由均不显示也不注入)。
|
|
7
|
+
- 宿主侧支持 `reasoning.mode = "pro"` 与 `background: true` 长流续传、断连重连、5 分钟重放窗口后轮询补帧、双心跳保活及中止自动取消。
|
|
8
|
+
- **全局订阅子代理(`codex_subagent`)**:
|
|
9
|
+
- 新增默认关闭的全局工具 `codex_subagent`,开启后即时注册到全环境,所有支持工具调用的模型均可把独立子任务委托给 Codex Connect 订阅模型;底层复用 DSH 原生 `spawn` 生命周期与深度上限。
|
|
10
|
+
- 在「全局设置」支持选择订阅模型、推理强度与预设(默认 `Codex 混合模式`,可切换「跟随当前对话」),并在「预设方案 → 工具」支持按预设启用 / 延迟 / 隐藏。
|
|
11
|
+
- **设置页重构与自动检查更新**:
|
|
12
|
+
- 将设置页收敛为「预设方案」「全局设置」两个主标签与右上角「说明」页,所有全局开关即点即生效;移除预设工具页的伪置顶「GPT 能力」分组与只读 `/compact` 行,`web_search` 与 `codex_connect_image_generate` 归入「网络与扩展」并保留来源徽章。
|
|
13
|
+
- 将「模型请求」与「界面」置于「全局设置」顶部;未安装 Codex Connect 时,订阅能力区域默认折叠为底部单行「Codex Connect 订阅能力」。
|
|
14
|
+
- 新增 npm(回退 GitHub Releases)自动检查更新与可关闭的新版本提醒浮层,「说明」页底部提供手动检查更新与联动说明。
|
|
15
|
+
- **细节与体验改进**:
|
|
16
|
+
- 在 `run_code` 的 `tools:sdk` 提示中补充 `tools.read` 的 `limit <= 2000` 约束说明。
|
|
17
|
+
- 统一 `/compact` 本地压缩提示文案为「模型摘要」,并将输入框 `上下文` / `Pro` / `Fast` 按钮对齐到原生 `13px` 基线。
|
|
18
|
+
- 更新 `README.md`、中英文插件描述与预览截图。
|
|
19
|
+
|
|
20
|
+
## 0.3.2 (2026-11-28)
|
|
21
|
+
|
|
22
|
+
- **工具页置顶「GPT 能力」分组**:
|
|
23
|
+
- 在预设工具策略页单独置顶「GPT 能力」分组,高亮展示 GPT 来源的联网搜索(托管搜索 / Codex 搜索 / 双搜索)、`codex_connect_image_generate`(默认徽章与提示注明实测路由至 `GPT-Image-2.6 Sunburst`)以及只读 `/compact` 远程压缩说明行。
|
|
24
|
+
- **修复 GPT 能力徽章未实时刷新问题**:
|
|
25
|
+
- 在 `src/client/desktop.tsx` 的设置页 `injected()` 中补齐 `getCodexConnectScope` 注入,修改 `dsh-codex-connect` 的生图模型或搜索配置后工具页徽章可实时同步。
|
|
26
|
+
- **远程压缩健壮性修复**:
|
|
27
|
+
- JSON 压缩响应解析严格校验 `item.type === 'compaction'`,避免将带 `encrypted_content` 的普通推理项(`reasoning`)误认为压缩结果。
|
|
28
|
+
- 远程压缩遇到未卸载的实时图片内容块时不再静默替换为 `[image omitted]`,而是交回 DSH 适配器回退处理;已显式卸载的图片继续使用标准卸载占位文本。
|
|
29
|
+
- **市场截图维护**:
|
|
30
|
+
- 更新设置页与上下文容量/远程压缩展示截图。
|
|
31
|
+
|
|
3
32
|
## 0.3.1 (2026-11-22)
|
|
4
33
|
|
|
5
34
|
- **适配 DeepSeek Harness `0.2.2-rc.5`**:
|
package/README.md
CHANGED
|
@@ -1,57 +1,35 @@
|
|
|
1
1
|
# @shuind/dsh-codex-harness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
- **省 token**:工具按需延迟加载 + 混合模式批量读写。
|
|
4
|
+
- **预设随便改**:Codex 混合预设(含codex工具),任意预设都能逐个启用 / 延迟 / 替换 / 隐藏工具,也能单改提示词。
|
|
5
|
+
- **品尝脱离网页牢笼的 Pro**:官 key 接 GPT-5.6 / 6+ 开 `Pro`;搭配 [Codex Connect](https://github.com/shuind/dsh-codex-connect) 让子代理和搜索走订阅(省 API)
|
|
6
|
+
- 订阅搜索、生图和子代理(`codex_subagent`)能分享给所有模型(deepseek等)用。
|
|
7
|
+
- **快捷控制**:输入框调上下文大小、开 Fast,`/compact` 选远程压缩或模型摘要。
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
适配 DeepSeek Harness `0.2.2-rc.1`–`0.2.2-rc.5`。
|
|
6
10
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
### 从插件市场 / npm 安装
|
|
10
|
-
|
|
11
|
-
在 Harness 的 **插件 → 添加插件** 中输入 `@shuind/dsh-codex-harness`(或指定 `@shuind/dsh-codex-harness@0.3.1`),安装后按提示重启 Harness 即可。
|
|
12
|
-
|
|
13
|
-
### 从离线包安装(GitHub Release)
|
|
11
|
+
## 界面预览
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
| 预设方案 | 全局设置 |
|
|
14
|
+
|---|---|
|
|
15
|
+
|  |  |
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
| 说明 |
|
|
18
|
+
|---|
|
|
19
|
+
|  |
|
|
19
20
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
- **Codex 常用工具**:
|
|
23
|
-
- `exec_command` / `write_stdin`:支持长会话命令执行、分段继续读取输出、Windows `terminal-pwsh` PTY 交互终端,以及流输出对称截断。
|
|
24
|
-
- `apply_patch`:用 Codex `Begin/End Patch` 补丁语法批量改文件,对话界面展示内联 Diff 卡片,保留原文件 BOM / CRLF 编码细节。
|
|
25
|
-
- `update_plan` / `read_image`:轻量任务计划工具,以及图片读取支持(宿主挂载附件服务时生效)。
|
|
26
|
-
- **Codex 混合模式预设(`codex-hybrid`)**:
|
|
27
|
-
- 把 `exec_command`、`write_stdin`、`apply_patch`、`update_plan`、`activate_tools` 等高频工具留在原生工具栏里直调;把 `read`、`glob`、`grep`、`web_fetch` 等检索类工具收进 `run_code` 代码沙箱(PTC,Programmatic Tool Calling)并发批处理,减少模型来回调用轮次。
|
|
28
|
-
- 把 `create_goal`、`get_goal`、`ralph`、`subagent_fork`、`update_goal`、`workflow` 等低频工具设为按需延迟加载,模型用到时通过 `activate_tools` 拉起;触发本地或远程上下文压缩后,超过 `2` 轮未再使用的工具会自动收回,减少后半场无效 schema 占用。
|
|
29
|
-
- **给其他预设改工具、改提示词**:
|
|
30
|
-
- 打开 **设置 → 内置插件 → Codex Harness → 预设方案**,选中任意预设即可逐个工具切换 **启用 / 替换 / 延迟 / 隐藏**:
|
|
31
|
-
- 可将 `bash` / `pwsh` 替换为 `exec_command + write_stdin`
|
|
32
|
-
- 可将 `todo_write` 替换为 `update_plan`
|
|
33
|
-
- 可选将 `edit` / `write` 替换为共用 `apply_patch`
|
|
34
|
-
- 同一页面可单独覆写该预设允许编辑的提示词段,不会修改原预设源文件或其他预设;规则保存后对**新创建的会话**生效,已经打开的老会话会继续保留启动时的配置。
|
|
35
|
-
- **对话快捷控件与状态**:
|
|
36
|
-
- **上下文大小**:点输入框右下角容量按钮可直接切换预设档位(`64k`–`1000k`)或手填数值(最高 `1000k`),在「运行偏好」里可开关显示。
|
|
37
|
-
- **Fast 模式**:使用 OpenAI Responses 接口或中转站时,点右下角开关可开启 `service_tier: "priority"` 加速通道。
|
|
38
|
-
- **远程压缩与 `/compact`**:支持 `/compact remote`(优先走服务端的 `/responses/compact`)和 `/compact local`(强制走 Harness 本地摘要压缩),输入框有命令补全菜单;若模型上下文预算设得小于 `80K`,接近上限时会自动做一次截断压缩兜底。
|
|
39
|
-
- **运行状态条**:在输入框上方实时显示当前模型「请求中 / 回复中 / 正在压缩上下文」及已耗时秒数。
|
|
40
|
-
|
|
41
|
-
## 接入模型(官方接口 / 中转站 / 订阅)
|
|
21
|
+
## 安装
|
|
42
22
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
1. **OpenAI 官方接口或支持 Responses API 的中转站**:在 Harness 模型设置里把接口协议选为 `openai-responses`,填入中转站 `baseURL` 和 API Key 即可。若中转站本身不支持 `/responses/compact` 或托管联网搜索,插件会自动回退到 Harness 本地实现,不必手动禁用。
|
|
46
|
-
2. **搭配 [dsh-codex-connect](https://github.com/shuind/dsh-codex-connect) 使用 ChatGPT 订阅账号**:直接配合即可,插件会自动把搜索、`Fast` 档位和逐模型上下文上限交回 `dsh-codex-connect` 管理,输入框右下角的容量按钮也会直接联动它的逐模型配置。
|
|
23
|
+
- **插件市场 / npm**:在 **设置 → 插件市场** 搜索安装,或在 **插件 → 添加插件** 输入 `@shuind/dsh-codex-harness`,重启生效。
|
|
24
|
+
- **离线包**:在 [Releases](https://github.com/shuind/dsh-codex-harness/releases) 下载 `.tgz`,到 **插件 → 添加插件** 填本地路径安装并重启。
|
|
47
25
|
|
|
48
|
-
##
|
|
26
|
+
## 文档
|
|
49
27
|
|
|
50
|
-
-
|
|
51
|
-
-
|
|
28
|
+
- 工具策略与延迟回收:[docs/tool-policy.md](docs/tool-policy.md)
|
|
29
|
+
- 预设与提示词:[docs/preset-library.md](docs/preset-library.md)
|
|
52
30
|
- 更新日志:[CHANGELOG.md](CHANGELOG.md)
|
|
53
|
-
-
|
|
31
|
+
- 构建与发包:[RELEASE.md](RELEASE.md)
|
|
54
32
|
|
|
55
33
|
## License
|
|
56
34
|
|
|
57
|
-
MIT
|
|
35
|
+
MIT
|
package/docs/preset-library.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# 预设与提示词
|
|
2
2
|
|
|
3
|
-
适用于插件 `0.3.
|
|
3
|
+
适用于插件 `0.3.x` 和 DeepSeek Harness `0.2.2-rc.1`–`0.2.2-rc.5`。
|
|
4
4
|
|
|
5
5
|
## 当前入口
|
|
6
6
|
|
|
7
|
-
打开 **设置 → 内置插件 → Codex Harness
|
|
7
|
+
打开 **设置 → 内置插件 → Codex Harness**。页面分为“预设方案”、“全局设置”与右上角“说明”:前者管理当前选中预设的工具控制(启用 / 替换 / 延迟 / 隐藏)、提示词覆盖与只读原始 YAML;“全局设置”管理本环境共享的订阅能力全局注册、模型请求与界面显示开关(点完即生效)。插件详情仅提供摘要和设置路径,不再复制另一套完整表单。
|
|
8
8
|
|
|
9
9
|
## 原始定义只读,提示词覆盖可编辑
|
|
10
10
|
|
package/docs/tool-policy.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
切换预设会保留各自草稿,但保存只把当前预设合并入已接受的服务器规则,不顺便提交其它草稿。自己的成功提交仅在完整接受值与预期一致、其它目标基线未变时更新其它草稿版本;外部并发修改仍拒绝并保留草稿。
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
“全局设置”页没有预设选择器,只管理本环境共享的订阅能力全局注册、模型请求和界面显示开关,没有另一组执行/计划/文件工具总闸。
|
|
38
38
|
|
|
39
39
|
“高级”提供逐工具详情、当前预设提示词和原始定义;共用所选预设,原始定义仍只读。诊断模式、入口、专用修复/旧名单编辑代码与文案已删除,不迁移到其它位置;后台仍读取旧格式,并保持正常保存校验。插件详情只保留摘要和设置路径,不再复制完整编辑器。运行组件清单保持真实,不需要逐个打开后台卡片。
|
|
40
40
|
|