@shuind/dsh-codex-harness 0.2.21 → 0.3.0
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 +185 -0
- package/README.md +38 -50
- package/RELEASE.md +61 -0
- package/assets/codex.svg +5 -0
- package/cordis.patch.yml +181 -6
- package/docs/preset-library.md +33 -23
- package/docs/tool-policy-benchmark.json +310 -0
- package/docs/tool-policy.md +148 -0
- package/lib/client.js +4774 -2416
- package/lib/compact-command.js +416 -0
- package/lib/compaction.js +141 -12
- package/lib/hybrid-executor.js +1196 -0
- package/lib/index.js +3658 -2334
- package/lib/preferences.js +117 -0
- package/lib/tool-policy.js +2422 -0
- package/lib/typert.js +86 -79
- package/lib/types/client/activity.d.ts +33 -9
- package/lib/types/client/activity.js +4 -3
- package/lib/types/client/desktop.d.ts +67 -0
- package/lib/types/client/desktop.js +229 -0
- package/lib/types/client/index.d.ts +207 -110
- package/lib/types/client/index.js +99 -492
- package/lib/types/client/policy-drafts.d.ts +25 -0
- package/lib/types/client/policy-drafts.js +47 -0
- package/lib/types/client/policy-locale.d.ts +260 -0
- package/lib/types/client/policy-locale.js +357 -0
- package/lib/types/client/preset-manager.d.ts +38 -10
- package/lib/types/client/preset-manager.js +235 -185
- package/lib/types/client/preset-requests.d.ts +12 -0
- package/lib/types/client/preset-requests.js +101 -0
- package/lib/types/client/tool-policy.d.ts +33 -0
- package/lib/types/client/tool-policy.js +336 -0
- package/lib/types/contracts/preset-editor-schema.d.ts +78 -0
- package/lib/types/contracts/preset-editor-schema.js +95 -0
- package/lib/types/{prompt.js → contracts/prompt.js} +13 -7
- package/lib/types/{settings.d.ts → contracts/settings.d.ts} +11 -4
- package/lib/types/{settings.js → contracts/settings.js} +22 -6
- package/lib/types/contracts/tool-policy-contract.d.ts +63 -0
- package/lib/types/contracts/tool-policy-contract.js +33 -0
- package/lib/types/contracts/ui-contracts.d.ts +92 -0
- package/lib/types/contracts/ui-contracts.js +83 -0
- package/lib/types/entries/client.d.ts +10 -0
- package/lib/types/entries/client.js +10 -0
- package/lib/types/{compact-command.d.ts → entries/compact-command.d.ts} +2 -0
- package/lib/types/entries/compact-command.js +176 -0
- package/lib/types/{compaction.d.ts → entries/compaction.d.ts} +15 -3
- package/lib/types/{compaction.js → entries/compaction.js} +47 -11
- package/lib/types/entries/hybrid-executor.d.ts +19 -0
- package/lib/types/entries/hybrid-executor.js +57 -0
- package/lib/types/entries/index.d.ts +66 -0
- package/lib/types/entries/index.js +192 -0
- package/lib/types/entries/preferences.d.ts +11 -0
- package/lib/types/entries/preferences.js +16 -0
- package/lib/types/entries/tool-policy.d.ts +97 -0
- package/lib/types/entries/tool-policy.js +158 -0
- package/lib/types/entries/typert.host.d.ts +23 -0
- package/lib/types/entries/typert.host.js +24 -0
- package/lib/types/hybrid/codex-hybrid-executor.d.ts +44 -0
- package/lib/types/hybrid/codex-hybrid-executor.js +257 -0
- package/lib/types/hybrid/hybrid-sdk.d.ts +13 -0
- package/lib/types/hybrid/hybrid-sdk.js +196 -0
- package/lib/types/hybrid/program-calls.d.ts +28 -0
- package/lib/types/hybrid/program-calls.js +193 -0
- package/lib/types/hybrid/subcall-scheduler.d.ts +90 -0
- package/lib/types/hybrid/subcall-scheduler.js +343 -0
- package/lib/types/policy/deferred-tools.d.ts +42 -0
- package/lib/types/policy/deferred-tools.js +264 -0
- package/lib/types/policy/overlay-installer.d.ts +12 -0
- package/lib/types/policy/overlay-installer.js +179 -0
- package/lib/types/policy/rule-resolver.d.ts +94 -0
- package/lib/types/policy/rule-resolver.js +114 -0
- package/lib/types/policy/tool-capabilities.d.ts +33 -0
- package/lib/types/policy/tool-capabilities.js +46 -0
- package/lib/types/{activity.d.ts → presets/activity.d.ts} +3 -5
- package/lib/types/{activity.js → presets/activity.js} +51 -27
- package/lib/types/presets/desktop-preset.d.ts +22 -0
- package/lib/types/presets/desktop-preset.js +43 -0
- package/lib/types/presets/preset-editor.d.ts +47 -0
- package/lib/types/presets/preset-editor.js +81 -0
- package/lib/types/presets/preset-prompt-catalog.d.ts +23 -0
- package/lib/types/presets/preset-prompt-catalog.js +215 -0
- package/lib/types/presets/preset-tool-catalog.d.ts +5 -0
- package/lib/types/presets/preset-tool-catalog.js +58 -0
- package/lib/types/presets/runtime-enhancements.d.ts +45 -0
- package/lib/types/presets/runtime-enhancements.js +349 -0
- package/lib/types/presets/small-window-compaction.d.ts +15 -0
- package/lib/types/presets/small-window-compaction.js +121 -0
- package/lib/types/responses/compact-checkpoint.d.ts +27 -0
- package/lib/types/responses/compact-checkpoint.js +257 -0
- package/lib/types/responses/fetch-transport.d.ts +16 -0
- package/lib/types/responses/fetch-transport.js +257 -0
- package/lib/types/responses/remote-compact.d.ts +13 -0
- package/lib/types/responses/remote-compact.js +319 -0
- package/lib/types/responses/sse-diagnostics.d.ts +9 -0
- package/lib/types/responses/sse-diagnostics.js +157 -0
- package/lib/types/responses/wire-rewrite.d.ts +35 -0
- package/lib/types/responses/wire-rewrite.js +237 -0
- package/lib/types/tools/exec-output.d.ts +58 -0
- package/lib/types/tools/exec-output.js +173 -0
- package/lib/types/tools/exec-plan-tools.d.ts +37 -0
- package/lib/types/tools/exec-plan-tools.js +265 -0
- package/lib/types/tools/exec-runner.d.ts +21 -0
- package/lib/types/tools/exec-runner.js +385 -0
- package/lib/types/tools/patch-tool.d.ts +16 -0
- package/lib/types/tools/patch-tool.js +258 -0
- package/lib/types/{patch.d.ts → tools/patch.d.ts} +1 -1
- package/lib/types/{patch.js → tools/patch.js} +96 -21
- package/locale/en.json +6 -0
- package/locale/hybrid-executor/en.json +6 -0
- package/locale/hybrid-executor/zh.json +6 -0
- package/locale/tool-policy/en.json +6 -0
- package/locale/tool-policy/zh.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +297 -299
- package/presets/{codex-collaboration → codex-hybrid}/agent.cordis.yml +45 -48
- package/presets/codex-hybrid/preset.yml +3 -0
- package/scripts/benchmark-tool-policy.mjs +186 -0
- package/scripts/build-preset.mjs +19 -0
- package/scripts/clean-build.mjs +11 -0
- package/src/client/activity.ts +83 -0
- package/src/client/desktop.tsx +276 -0
- package/src/client/index.tsx +391 -0
- package/src/client/policy-drafts.ts +56 -0
- package/src/client/policy-locale.ts +362 -0
- package/src/client/preset-manager.tsx +376 -0
- package/src/client/preset-requests.ts +113 -0
- package/src/client/tool-policy.tsx +402 -0
- package/src/contracts/preset-editor-schema.ts +110 -0
- package/src/contracts/prompt.ts +66 -0
- package/src/contracts/settings.ts +103 -0
- package/src/contracts/tool-policy-contract.ts +93 -0
- package/src/contracts/ui-contracts.ts +173 -0
- package/src/entries/client.tsx +14 -0
- package/src/entries/compact-command.ts +256 -0
- package/src/entries/compaction.ts +218 -0
- package/src/entries/hybrid-executor.ts +76 -0
- package/src/entries/index.ts +298 -0
- package/src/entries/preferences.ts +17 -0
- package/src/entries/tool-policy.ts +162 -0
- package/src/entries/typert.host.ts +29 -0
- package/src/hybrid/codex-hybrid-executor.ts +310 -0
- package/src/hybrid/hybrid-sdk.ts +217 -0
- package/src/hybrid/program-calls.ts +202 -0
- package/src/hybrid/subcall-scheduler.ts +446 -0
- package/src/policy/deferred-tools.ts +331 -0
- package/src/policy/overlay-installer.ts +191 -0
- package/src/policy/rule-resolver.ts +128 -0
- package/src/policy/tool-capabilities.ts +88 -0
- package/src/presets/activity.ts +146 -0
- package/src/presets/desktop-preset.ts +60 -0
- package/src/presets/preset-editor.ts +101 -0
- package/src/presets/preset-prompt-catalog.ts +221 -0
- package/src/presets/preset-tool-catalog.ts +58 -0
- package/src/presets/runtime-enhancements.ts +415 -0
- package/src/presets/small-window-compaction.ts +166 -0
- package/src/responses/compact-checkpoint.ts +264 -0
- package/src/responses/fetch-transport.ts +290 -0
- package/src/responses/remote-compact.ts +393 -0
- package/src/responses/sse-diagnostics.ts +156 -0
- package/src/responses/wire-rewrite.ts +261 -0
- package/src/tools/exec-output.ts +211 -0
- package/src/tools/exec-plan-tools.ts +307 -0
- package/src/tools/exec-runner.ts +445 -0
- package/src/tools/patch-tool.ts +331 -0
- package/src/tools/patch.ts +328 -0
- package/tsconfig.json +29 -0
- package/tsdown.config.ts +110 -0
- package/lib/installer.js +0 -237
- package/lib/invariant.js +0 -23
- package/lib/types/activity-types.d.ts +0 -6
- package/lib/types/activity-types.js +0 -3
- package/lib/types/client/preset-copy.d.ts +0 -42
- package/lib/types/client/preset-copy.js +0 -81
- package/lib/types/compact-command.js +0 -79
- package/lib/types/context.d.ts +0 -8
- package/lib/types/context.js +0 -14
- package/lib/types/exec.d.ts +0 -46
- package/lib/types/exec.js +0 -365
- package/lib/types/index.d.ts +0 -95
- package/lib/types/index.js +0 -738
- package/lib/types/installer.d.ts +0 -27
- package/lib/types/installer.js +0 -146
- package/lib/types/invariant.d.ts +0 -16
- package/lib/types/invariant.js +0 -22
- package/lib/types/preset-contract.d.ts +0 -69
- package/lib/types/preset-contract.js +0 -22
- package/lib/types/preset-editor-remote.d.ts +0 -30
- package/lib/types/preset-editor-remote.js +0 -37
- package/lib/types/preset-editor.d.ts +0 -69
- package/lib/types/preset-editor.js +0 -557
- package/lib/types/preset-templates.d.ts +0 -36
- package/lib/types/preset-templates.js +0 -12
- package/lib/types/prompt-sections.d.ts +0 -15
- package/lib/types/prompt-sections.js +0 -23
- package/lib/types/remote.d.ts +0 -40
- package/lib/types/remote.js +0 -683
- package/lib/types/typert.host.d.ts +0 -47
- package/lib/types/typert.host.js +0 -99
- package/presets/codex-collaboration/preset.yml +0 -3
- /package/lib/types/{prompt.d.ts → contracts/prompt.d.ts} +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.3.0 (2026-11-18)
|
|
4
|
+
|
|
5
|
+
本版本整合 `0.2.22`–`0.2.40`(本地重构与适配,含 npm `0.2.32-dsh-v0.2.2-rc.1` 之后的演进)并新增以下改进与修复,作为面向 DeepSeek Harness `0.2.2-rc.1`–`0.2.2-rc.4`(`>=0.2.2-rc.1 <=0.2.2-rc.4`)的 `0.3.0` 正式发布版本:
|
|
6
|
+
|
|
7
|
+
- **`0.2.2-rc.4` 开发依赖与类型适配**:
|
|
8
|
+
- 将全部 `@deepseek-ai/dsh-*` 开发依赖与传递 peer 依赖对齐验证到 `0.2.2-rc.4`,并将 `zod` 升级至 `4.6.6` 与 `0.2.2-rc.4` 运行时保持一致,消除跨版本 `ZodType` 类型实例化膨胀。
|
|
9
|
+
- **远程压缩与本地压缩统一回收冷工具**:
|
|
10
|
+
- 移除 `compaction/end` 中针对远端加密压缩(`<codex-remote-compaction>` / `<dsh-codex-connect-native-compaction-v1>`)跳过回收的限制;无论本地摘要还是远程加密压缩,压缩进行期间仍维持工具集合不变以命中原前缀缓存,压缩完成后统一回收超过 `2` 轮(`DEFERRED_RECENT_TURN_WINDOW`)未再使用的已激活延迟工具,避免冷工具在历史被压缩折叠后被 `dsh-llm` 退回顶层 `body.tools` 常驻占用。
|
|
11
|
+
|
|
12
|
+
- **输入框快捷上下文调控与界面精简**:
|
|
13
|
+
- 在对话输入框右下角新增紧凑的上下文容量按钮与菜单(预设 `64k`–`1000k` 档位及 `k` / 数值输入,最高 `1000k`,可在运行偏好关闭显示);`openai-codex` 路由直接读写 `dsh-codex-connect` 的逐模型 `contextWindowOverrides` 并拉取 `/plugins/dsh-codex-connect/models` 动态上限,其它 GPT 路由读写本地 `contextWindow` 配置。
|
|
14
|
+
- 在运行偏好设置页隐藏与输入框快捷按钮重复的“上下文大小 (tokens)”数字输入框,保留后台 schema 与非 `openai-codex` 路由已有配置兼容。
|
|
15
|
+
- **`/compact [remote|local]` 命令与交互弹层**:
|
|
16
|
+
- 新增 Codex 感知的 `/compact` 命令并接入输入框指令选择弹层;支持显式传入 `remote` 或 `local`(`/compact local` 强制本地摘要压缩并抑制外部原生远端压缩),映射宿主 `ManualCompactionError` 错误反馈。
|
|
17
|
+
- **小窗口自动压缩回退与上下文上限保护**:
|
|
18
|
+
- 当 GPT 会话有效上下文窗口低于 `80K`(低于宿主默认预留阈值)时,按 `0.8` 阈值自动对最旧安全区间执行截断压缩,保留近期约 `0.16` 上下文及首条系统消息并确保 tool call/result 配对完整。
|
|
19
|
+
- 在 `compaction` 阶段按模型真实上限放宽遗留 `pi-ai` 上下文溢出诊断修补阈值。
|
|
20
|
+
- **`codex-hybrid` 预设提示词变量兼容修复**:
|
|
21
|
+
- 移除 `deployment:persona-prefix` 与 `DEFAULT_CODEX_PERSONA` 中 DSH `0.2.2-rc.1` 未注册的 `{{cwd}}` 变量(工作目录改由宿主 `working-directory:current` 运行时上下文提供),避免新会话首轮报 `unknown prompt variable "{{cwd}}"`;同时为手动保留 `{{cwd}}` 的自定义覆写提供 `working-directory:current` 自动提取兜底,并在预设运行时测试补充 `renderPrompt()` 校验。
|
|
22
|
+
|
|
23
|
+
## 0.2.40-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
24
|
+
|
|
25
|
+
- 消除与 `dsh-codex-connect` 的剩余功能与界面重叠:
|
|
26
|
+
- **Fast 开关**:输入框右下角仅在非 `openai-codex` 的 GPT 模型(或无 `modelDirectories` 的旧宿主)下展示;切到 `openai-codex`(已有三档菜单)或非 GPT 模型(如 DeepSeek)时自动隐藏;`agent/request` 对 `openai-codex` 不再注入 `serviceTier`。
|
|
27
|
+
- **上下文窗口**:`syncCodexContextWindow`、`applyCodexRequestSettings`、`CodexCompactionEngine` 与 `llm/stream` 均不对 `openai-codex` 覆盖容量,保留 `dsh-codex-connect` 的逐模型预算与 `contextWindowOverrides`。
|
|
28
|
+
- **联网搜索与补丁语法**:`openai-codex` 路由关闭 `hostedWebSearch` Wire 改写以直接走 Codex Connect 搜索服务,同时保留互补的 `apply_patch` Lark 自定义语法升级。
|
|
29
|
+
- **工具说明**:补全 `view_image`、`codex_connect_image_generate`、`codex_connect_quota` 三个可选工具的中英文设置页说明。
|
|
30
|
+
|
|
31
|
+
## 0.2.39-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
32
|
+
|
|
33
|
+
- 让路 `dsh-codex-connect` 并对齐 Responses V2 远程压缩能力:
|
|
34
|
+
- `openai-codex` 路由不再尝试读取 `llm-pi-ai` 或拦截改写 `compaction_trigger` 与既有 `service_tier`,`/compact local` 会显式抑制外部原生压缩触发,冷工具回收同时识别 `<dsh-codex-connect-native-compaction-v1>` 标记。
|
|
35
|
+
- 独立 `llm-pi-ai` 路由(无 `dsh-codex-connect` 时)新增 V2 双层检查点(按自适应预算保留最高 `64 KB` 近期用户原话 + `compaction` 密文,向后兼容 V1 标记)、基于 `isCompactCheckpointSource` 的可信来源防伪、DSH `0.2.2` 系统提示词 `instructions` 提取与 `tool-addition` / `tool-removal` 兼容、`openai-codex-responses` `/responses` `compaction_trigger` SSE 解析,以及 `429/502/503/504` 短时重试。
|
|
36
|
+
|
|
37
|
+
## 0.2.38-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
38
|
+
|
|
39
|
+
- 为按需延迟加载(`deferLoading`)新增压缩前轮次热度账本:在 `activate_tools` 与延迟工具实际执行时零阻塞记录最近使用轮次,并在本地摘要压缩(`compaction/end`)完成且非远端加密压缩时,自动回收超过 `2` 轮(`DEFERRED_RECENT_TURN_WINDOW`)未再使用的冷工具;压缩摘要生成过程保持工具列表不变以复用热 KV 缓存,活跃工具与 `codex:deferred-tools` 静态目录保持不动。
|
|
40
|
+
|
|
41
|
+
## 0.2.37-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
42
|
+
|
|
43
|
+
- 补全设置页全部 65+ 个 DSH 官方工具(含 `job_list`、`list_subagent_models`、`schedule_*`、`session_*`、`terminal_*`、`team_*`、`stagehand_*`、`plugin_*`、`cordis_*` 等)、`dsh-codex-connect` 审批工具以及动态 `mcp__*__*` 扩展工具的保留术语中文说明,替代英文原描述截断展示。
|
|
44
|
+
|
|
45
|
+
## 0.2.36-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
46
|
+
|
|
47
|
+
- 移除旧非混合预设 `codex-collaboration`(`Codex 模式`),仅保留唯一的 **Codex 混合模式**(`codex-hybrid` / `preset-codex-hybrid`),并在 `codex-hybrid-executor` 新增 `hiddenTools` 隐藏冗余的 `todo_write` 工具。
|
|
48
|
+
- 重构 **Codex Harness** 设置界面:贴合桌面端原生卡片与分段标签设计,移除多余 `高级…` 二级入口,将全部/已修改/延迟筛选与 `启用 / 替换 / 延迟 / 隐藏` 分段操作按钮整合到同一视图,屏蔽 Codex 自带工具误报的 `按条件可用` 标签并改用吸底待保存栏。
|
|
49
|
+
|
|
50
|
+
## 0.2.35-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
51
|
+
|
|
52
|
+
- 新增实验性非对称混合模式执行器 `@shuind/dsh-codex-harness/hybrid-executor`(`CodexHybridExecutor`)与预设 `codex-hybrid`(`preset-codex-hybrid`):`apply_patch`、`exec_command`、`write_stdin`、`update_plan`、`activate_tools` 等高频工具保留原生 wire 调用,只读检索类工具归入 `run_code` SDK 批量并发执行。
|
|
53
|
+
- 新增按需延迟加载工具能力(`deferLoading: true` + `activate_tools`),在混合模式和工具方案策略中默认延迟低频工具并保持提示词与请求缓存前缀稳定。
|
|
54
|
+
- 强化核心工具与 Responses 协议适配:支持 `read_image`、Windows `terminal-pwsh` PTY 与 64 会话 LRU 清理、`apply_patch` Diff 卡片、工作流/计划模式兼容、`zstd` 请求重写与 `/responses/compact` 远程压缩及回退。
|
|
55
|
+
- 完成 `src/` 与 `tests/` 分层模块化重构,保持 8 个 `lib/*.js` 导出入口与浏览器客户端隔离不变。
|
|
56
|
+
|
|
57
|
+
## 0.2.34-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
58
|
+
|
|
59
|
+
- 请求状态改放输入框卡片外上方的原生 dock 区域,不再占用输入框右侧操作栏;原生思考提示保持不动。
|
|
60
|
+
- 沿用消息投影、计时、隐藏设置和回收逻辑,继续不使用消息区 DOM 定位或悬浮层。
|
|
61
|
+
|
|
62
|
+
## 0.2.33-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
63
|
+
|
|
64
|
+
- 请求/回复/压缩状态移到输入框右侧、发送按钮之前的原生扩展位,以紧凑单行显示,不再悬浮在消息区。
|
|
65
|
+
- 删除跟踪宿主“深度求索中”DOM、每帧测量坐标及状态浮层 portal;计时和状态来源保持不变,长标签在窄屏内截断,不替换宿主原有思考提示。
|
|
66
|
+
|
|
67
|
+
## 0.2.32-dsh-v0.2.2-rc.1 (2026-11-13)
|
|
68
|
+
|
|
69
|
+
- 删除共享 Codex 模板编辑界面,改为跟随当前所选预设的提示词;工具与提示词使用同一份预设草稿和“保存此预设”,不再写入旧全局模板字段。
|
|
70
|
+
- 新增预设提示词只读目录及精确指令段覆盖;仅可核验的原生身份前缀/后缀与 Codex 操作指南可编辑,未知或无法安全覆盖的段保持只读,不把表达式或全局 Codex 默认当成其它预设原文。
|
|
71
|
+
- 按 Agent 规则快照注册同名作用域指令段,保留 complete/interpolate/顺序和双 owner 回收;清除覆盖恢复原始指令,不改原始预设声明、其它预设或宿主工具/权限规则。
|
|
72
|
+
- 旧共享模板数据后台兼容保留;无覆盖时不增加模型说明,不改变原有提示词内容。
|
|
73
|
+
|
|
74
|
+
## 0.2.31 (local, unpublished)
|
|
75
|
+
|
|
76
|
+
- 工具列表以实际工具标识为主标题,字号更大并加粗;中文仅作次要用途说明,不另起工具名。
|
|
77
|
+
- 待保存摘要直接列实际工具名,避免把中文用途当成名称;工具定义、执行和保存逻辑不变。
|
|
78
|
+
|
|
79
|
+
## 0.2.30 (local, unpublished)
|
|
80
|
+
|
|
81
|
+
- 删除运行偏好、工具方案及模板页的常驻解释性/教学式段落和对应中英文文案;作用范围、生效时间只保留简短标签,停用状态去掉说教说明,不留隐藏节点或占位。
|
|
82
|
+
- 设置控件、保存行为和所有后端逻辑保持不变。
|
|
83
|
+
|
|
84
|
+
## 0.2.29 (local, unpublished)
|
|
85
|
+
|
|
86
|
+
- 实际删除诊断入口、页面、模式、回调、状态、旧规则修复/原始名单编辑控件、专用样式及双语文案;不是隐藏入口或换名保留。
|
|
87
|
+
- 保留普通工具配置、当前预设保存、独立草稿、正常输入/保存校验,以及后台旧规则解析;不清除、不迁移、不重置用户旧数据。
|
|
88
|
+
- 仅调整客户端,不修改工具执行、权限、后端策略、提示词作用域或预设定义。
|
|
89
|
+
|
|
90
|
+
## 0.2.28 (local, unpublished)
|
|
91
|
+
|
|
92
|
+
- 设置页拆为“工具方案”和“运行偏好”,按实际工具分组、展示人类标签和变更摘要;逐工具选择保留,普通页不再出现全局工具总闸或兼容字段。
|
|
93
|
+
- 工具方案只保存当前预设,切换保留独立草稿,自己的成功提交仅在基线可证明未变时更新其它草稿版本;外部并发冲突拒绝并保稿。
|
|
94
|
+
- 旧规则、共享 Codex 模板和原始预设定义移入高级诊断,定义跟随当前预设只读;插件详情只作摘要,不再复制完整编辑器。
|
|
95
|
+
- 以 Agent 快照内的预设策略统一 Codex 工具准入,明确选择不再被旧共享开关二次否决;旧关闭作为兼容基线保留,原预设局部禁用及宿主权限不可越过,不写入或重置 profile 旧数据。
|
|
96
|
+
- 不新增 PTC、Ops 或执行工具,不改底层 shell、文件、审批和沙箱执行管线。
|
|
97
|
+
|
|
98
|
+
## 0.2.27 (local, unpublished)
|
|
99
|
+
|
|
100
|
+
- 按所选 preset 读取实际注册工具,逐项选择保留、隐藏或已实现的替代方案;去掉执行/计划总开关,支持搜索和筛选。
|
|
101
|
+
- 新增逐工具 `tools` 规则:明确选择优先于本规则的旧 allow/deny 与大类默认;旧配置不迁移,新界面新规则不联动其它工具。
|
|
102
|
+
- 工具目录通过预设 revision lease 与只读子作用域读取,不创建 Agent、不执行工具或激活条件;条件工具、目标名冲突和未适配工具不开放替换。
|
|
103
|
+
- 保留原有审批、单次沙箱策略、Agent 快照及双 owner 清理,补充独立源工具、目录隔离与回收、真实 Remote 保存回归。
|
|
104
|
+
|
|
105
|
+
## 0.2.26 (local, unpublished)
|
|
106
|
+
|
|
107
|
+
- 将设置页改为按 preset 切换的单编辑器:启用覆盖、执行/计划接口、保存;不再展开所有规则或重复显示 ID 输入。
|
|
108
|
+
- 精简常驻说明,工具裁剪、全局选项、提示词和源码按需展开;统一卡片、控件、间距与公开主题 token。
|
|
109
|
+
- 保留跨 preset 草稿、首次编辑 revision、空 allowlist 与未知 preset;不修改后端 schema 或迁移已有配置。
|
|
110
|
+
|
|
111
|
+
## 0.2.25 (local, unpublished)
|
|
112
|
+
|
|
113
|
+
- 在“设置 → 内置插件”中增加与 Codex Connect 并列的 Codex Harness 独立标签,工具规则置顶,预设声明作为折叠的只读参考。
|
|
114
|
+
- 工具规则可从现有预设目录选择真实 ID,保留自定义 ID 手动输入;目录失败可重试,不轮询、不妨碍现有规则编辑。
|
|
115
|
+
- 新标签与原插件详情页共用 ConfigForms、保存队列、配置命名空间和 revision 检查;不迁移或重置已保存设置,不改变 Codex Connect。
|
|
116
|
+
- 不修改 Host 工具覆盖、审批、文件工具或 Agent 规则快照语义;插件列表继续如实显示内部组件的运行诊断。
|
|
117
|
+
|
|
118
|
+
## 0.2.24 (local, unpublished)
|
|
119
|
+
|
|
120
|
+
- 新增独立的跨预设工具覆盖插件:在 Agent 子作用域按 preset ID 应用 allow/deny,并替换已有的原生执行与计划工具;保留 Persona、源预设和原生文件定义。
|
|
121
|
+
- 新增插件详情页规则编辑卡:显式空 allowlist、首编辑 revision 保存、并发拒绝留草稿、volatile 更新及新 Agent 规则快照。
|
|
122
|
+
- 限制替换范围,明确拒绝 conditional source、Agent 自身工具、未知名单和目标名称碰撞;支持空白会话预设切换及双 owner 清理。
|
|
123
|
+
- 补齐执行工具的宿主审批参数、单次升级策略、沙箱拒绝/runner 失败标记;不再吞掉 ShellExecution.result() 的基础设施错误。
|
|
124
|
+
- 当前宿主不再广告逐次 shell/login 参数;补充真实 Responses parser → Native 执行器 → 官方文件工具的成功、失败与结果回放测试。
|
|
125
|
+
- 新增可复现工具 schema/reference tokenizer、筛选、组装、调度与新 Agent 覆盖成本基准;不把离线微基准等同于模型端到端提速。
|
|
126
|
+
|
|
127
|
+
## 0.2.23 (local, unpublished)
|
|
128
|
+
|
|
129
|
+
- 适配当前 DeepSeek Harness `0.2.2-rc.1`,更新并锁定 Cordis、Host 与 Client 开发依赖;不再声明未经本轮验证的旧宿主版本兼容性。
|
|
130
|
+
- 将 Codex 模式改为普通 `dsh-agent-preset` bundle 声明,构建时生成 patch;使用当前工作流和子代理配置,不再自动修改旧预设目录。
|
|
131
|
+
- 适配异步 `shell.execute`、基于 SessionId 的后台任务输出、实时工作目录和 `fs.deleteFile`/删除意图检查。
|
|
132
|
+
- 通过工具注册条件应用能力开关,兼容不含 tools 的提示词 presentation;修复当前 tool/developer 消息的 Responses 转换和上下文压缩参数。
|
|
133
|
+
- 适配当前会话流记录及投影注册,避免在 Session publication 过程中嵌套写入上下文事件。
|
|
134
|
+
- 将设置页挂到 bundle 详情槽位,移除退役 Client API 依赖;保存时传递初次编辑 revision,拒绝覆盖并发修改。
|
|
135
|
+
- 补充当前 Loader、预设注册表、工具执行器和 Client ConfigForms 的 keyless 集成测试,以及中英文显示元数据和原创图标。
|
|
136
|
+
|
|
137
|
+
## 0.2.22 (local, unpublished)
|
|
138
|
+
|
|
139
|
+
- 兼容桌面端 `0.2.0-rc.2` 的原生预设注册、ConfigForms 设置和插件页面,保留 Web `0.1.5-rc.2` 接口。
|
|
140
|
+
- 将桌面 Codex 提示词、Fast、上下文容量和能力开关接入 profile 持久化配置;原生只读预设可查看,不能误写为文件预设。
|
|
141
|
+
- 适配新版 Persona 前缀及工作流执行器,避免在隔离的预设内重复注册宿主编辑服务。
|
|
142
|
+
- 修复终端等待定时器与中止监听器残留、清理后台进程时丢失已产生输出的问题。
|
|
143
|
+
- 修复预设列表刷新失败后的重试目标,并保护未保存的编辑。
|
|
144
|
+
|
|
145
|
+
## 0.2.20 - 2026-09-21
|
|
146
|
+
|
|
147
|
+
- 将 DSH 宿主声明限定为已验证的精确版本 `0.1.5-rc.2`,不再把未测试的更高版本标为兼容。
|
|
148
|
+
|
|
149
|
+
## 0.2.19 - 2026-09-21
|
|
150
|
+
|
|
151
|
+
- 在插件清单中声明最低 DSH 宿主版本 `>=0.1.5-rc.2`,让市场能够直接显示宿主要求并参与兼容性检查。
|
|
152
|
+
- 更新市场截图,改为当前的预设管理和 Codex 能力编辑界面。
|
|
153
|
+
|
|
154
|
+
## 0.2.18 - 2026-09-20
|
|
155
|
+
|
|
156
|
+
- 修复从没有 DSH Core 提示词的完整 Persona 创建 Codex 副本时,保存后自动补出源码和 Web 说明的问题。
|
|
157
|
+
- 保存时保留源预设的空提示词状态,避免预设编辑器把宿主默认段误显示为当前预设内容。
|
|
158
|
+
|
|
159
|
+
## 0.2.17 - 2026-09-20
|
|
160
|
+
|
|
161
|
+
- 简化为单页预设编辑:选择预设、修改名称和说明、按需加入 Codex、保存或另存副本。
|
|
162
|
+
- 移除列表中的逐项 YAML 读取与保存后的全量刷新;只在选择预设时加载内容,避免反复扫描目录。
|
|
163
|
+
|
|
164
|
+
- 支持普通预设的元数据和 Codex 能力转换,保存时检查版本冲突并保留备份,写入失败时回滚。
|
|
165
|
+
- 修复预设专用提示词被共享设置覆盖的问题,使用明确的 `presetPrompt` 优先级。
|
|
166
|
+
- 将托管网络搜索和远程上下文压缩归入 Codex 模式能力,活动状态保留为全局显示设置。
|
|
167
|
+
|
|
168
|
+
- 复制保留工具、插件、YAML 标签和其他配置;内置预设只读,用户预设通过锁定和原子写入保存。
|
|
169
|
+
- 修正设置卡片的宿主命名空间挂载:预设管理现在显示在 **插件配置 → Codex Harness** 卡片内,而不是注册到未提供的独立命名空间。
|
|
170
|
+
- 修正 Story 预设对宿主提示词区段的识别,避免把被 `clean-slate` 清除的 DSH Core 区段显示为可编辑内容。
|
|
171
|
+
- 让 Story 自动 Git 同步在无法获得一次性沙箱审批时降级为提示,不再阻断预设加载。
|
|
172
|
+
|
|
173
|
+
## 0.2.16 - 2026-09-20
|
|
174
|
+
|
|
175
|
+
- 发布统一层级的预设编辑器:Codex 模式与其它预设同级,内置预设通过副本编辑。
|
|
176
|
+
- 将 Codex 能力与全局活动状态分开,预设编辑器不再要求直接编辑 YAML。
|
|
177
|
+
|
|
178
|
+
## 0.2.15 - 2026-09-19
|
|
179
|
+
|
|
180
|
+
- 修复 Codex 预设与新版 `@deepseek-ai/dsh-persona` 的配置字段兼容性,使用 `prefix`。
|
|
181
|
+
- 自动迁移未修改过的旧 `text` 预设,并保留用户已经修改的预设。
|
|
182
|
+
- 记录最低宿主约束:`@deepseek-ai/dsh-persona >=0.1.3-alpha.2`。
|
|
183
|
+
- 补充旧预设迁移和用户修改保护的安装器回归测试。
|
|
184
|
+
- 固定 Corepack 使用的 pnpm 版本,并锁定兼容的本地压缩工具依赖,保证安装和发布流程可重复。
|
|
185
|
+
- 修正当前 DSH 客户端 overlay slot 的类型声明。
|
package/README.md
CHANGED
|
@@ -1,69 +1,57 @@
|
|
|
1
1
|
# @shuind/dsh-codex-harness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
给 DeepSeek Harness(DSH)用的 Codex 风格插件:自带一套混合模式编码预设(`codex-hybrid`)和 Codex 常用工具,支持对任意预设按工具做启用 / 替换 / 延迟加载 / 隐藏,也可以单独调整预设提示词,并针对 OpenAI Responses API 与中转站补全了常用请求增强。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## 功能
|
|
8
|
-
|
|
9
|
-
- 使用精简codex提示词;对gpt过度拉屎做了少量提示词约束。
|
|
10
|
-
- 在 **设置 → 插件 → 插件配置 → Codex Harness** 中查看、编辑或恢复完整提示词。
|
|
11
|
-
- 在 **设置 → 插件 → 插件配置 → Codex Harness** 中展开 **预设编辑**:Codex 模式和其它预设处于同一级,打开时默认选中 Codex。用户预设可直接编辑;DSH 内置预设只读,先创建可编辑副本。
|
|
12
|
-
- 提供 `exec_command`、`write_stdin`、`apply_patch` 和 `update_plan`。
|
|
13
|
-
- 支持 Fast 请求、GPT 图片与思考强度和上下文容量。
|
|
14
|
-
- 实时显示请求模型、模型回复和上下文压缩状态及耗时。
|
|
15
|
-
- Responses 请求优先使用原生 `apply_patch`、hosted `web_search` 和远程压缩,失败时回退到 DSH 实现。
|
|
5
|
+
当前版本 `0.3.0` 适配 **DeepSeek Harness `0.2.2-rc.1`–`0.2.2-rc.4`**(`engines.dsh: >=0.2.2-rc.1 <=0.2.2-rc.4`)。
|
|
16
6
|
|
|
17
7
|
## 安装
|
|
18
8
|
|
|
19
|
-
|
|
20
|
-
dsh plugin --profile web add @shuind/dsh-codex-harness@latest
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
重启 Web,在 **Agent 预设** 中选择 **Codex 模式**,再创建会话。
|
|
24
|
-
|
|
25
|
-
### 宿主版本
|
|
26
|
-
|
|
27
|
-
Codex 模式使用 `@deepseek-ai/dsh-persona` 的 `prefix` 配置。宿主必须提供
|
|
28
|
-
`@deepseek-ai/dsh-persona >=0.1.3-alpha.2`;当前的 DSH `0.1.5-rc.2` 满足此要求。
|
|
29
|
-
更早的 persona 版本只接受 `text`,会在加载预设时报告缺少 `prefix`。
|
|
30
|
-
|
|
31
|
-
预设管理还需要 DSH 的 `agent-presets`、`api-remotes`、`atomic-write` 和 `typert-protocol` 接口至少为
|
|
32
|
-
`0.1.5-rc.2`。较旧宿主仍可加载 Codex 工具层,但不会注册预设编辑入口。
|
|
33
|
-
|
|
34
|
-
### 已有自定义预设
|
|
35
|
-
|
|
36
|
-
插件会自动更新未修改过且带有本插件管理标记的旧预设。包含用户修改的预设会保留,
|
|
37
|
-
需要手动迁移:先备份 `$DSH_HOME/.agent-presets/codex-collaboration`,再打开其中的
|
|
38
|
-
`agent.cordis.yml`,将 `@deepseek-ai/dsh-persona` 配置下的 `text:` 改为 `prefix:`,
|
|
39
|
-
保留后面的提示词内容,然后重启 DSH 并重新选择 Codex 模式。若预设没有该管理标记,
|
|
40
|
-
也应按同样步骤迁移;不要覆盖已有的自定义提示词。
|
|
9
|
+
### 从插件市场 / npm 安装
|
|
41
10
|
|
|
42
|
-
|
|
11
|
+
在 Harness 的 **插件 → 添加插件** 中输入 `@shuind/dsh-codex-harness`(或指定 `@shuind/dsh-codex-harness@0.3.0`),安装后按提示重启 Harness 即可。
|
|
43
12
|
|
|
44
|
-
###
|
|
13
|
+
### 从离线包安装(GitHub Release)
|
|
45
14
|
|
|
46
|
-
在
|
|
15
|
+
1. 在 [Releases](https://github.com/shuind/dsh-codex-harness/releases) 页面下载对应版本的 `.tgz` 安装包(如 `shuind-dsh-codex-harness-0.3.0.tgz`)。
|
|
16
|
+
2. 打开 Harness 桌面端的 **插件 → 添加插件**,填入该 `.tgz` 文件的本地路径确认安装,然后重启 Harness。
|
|
47
17
|
|
|
48
|
-
|
|
49
|
-
api: openai-responses
|
|
50
|
-
baseURL: https://your-responses-endpoint.example.com
|
|
51
|
-
apiKeyEnv: OPENAI_API_KEY
|
|
52
|
-
```
|
|
18
|
+
> 桌面端请直接在软件内的插件页面安装或升级,不要用命令行里可能存在的旧版 `dsh` 去改桌面端的 `desktop` profile。
|
|
53
19
|
|
|
54
|
-
|
|
20
|
+
## 功能概览
|
|
55
21
|
|
|
56
|
-
|
|
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
|
+
- **运行状态条**:在输入框上方实时显示当前模型「请求中 / 回复中 / 正在压缩上下文」及已耗时秒数。
|
|
57
40
|
|
|
58
|
-
|
|
41
|
+
## 接入模型(官方接口 / 中转站 / 订阅)
|
|
59
42
|
|
|
60
|
-
|
|
43
|
+
- **用插件自带工具与预设**:不挑模型,DeepSeek 等模型都可以正常使用 `exec_command`、`apply_patch`、`codex-hybrid` 和工具裁剪。
|
|
44
|
+
- **用 Responses API 相关功能**(原生 `apply_patch`、远程 `/responses/compact`、托管联网搜索、`Fast` 通道等),通常按下面两种方式之一接入:
|
|
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` 管理,输入框右下角的容量按钮也会直接联动它的逐模型配置。
|
|
61
47
|
|
|
62
|
-
|
|
48
|
+
## 更多说明
|
|
63
49
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
50
|
+
- 跨预设工具替换、延迟加载与回收细则:[docs/tool-policy.md](docs/tool-policy.md)
|
|
51
|
+
- 预设结构与提示词覆盖说明:[docs/preset-library.md](docs/preset-library.md)
|
|
52
|
+
- 更新日志:[CHANGELOG.md](CHANGELOG.md)
|
|
53
|
+
- 源码构建与发包说明:[RELEASE.md](RELEASE.md)
|
|
66
54
|
|
|
67
55
|
## License
|
|
68
56
|
|
|
69
|
-
MIT
|
|
57
|
+
MIT。插件图标为本项目原创,按同一许可分发。
|
package/RELEASE.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Release
|
|
2
|
+
|
|
3
|
+
For `@shuind/dsh-codex-harness`.
|
|
4
|
+
|
|
5
|
+
## 开发与部署注意事项
|
|
6
|
+
|
|
7
|
+
- 只允许修改和发布 `@shuind/dsh-codex-harness` 插件;不要修改、发布或安装 DSH 宿主包。
|
|
8
|
+
- 不要自行更新 Web profile 中已安装的插件版本。发布完成后,由用户手动执行更新。
|
|
9
|
+
- 不要自行重启 DSH,不要停止、替换或另起当前 Harness 服务;以运行时提供的现有 URL 为准。
|
|
10
|
+
- 不要直接修改 `$HOME/.dsh`、profile、运行时 bundle 或已安装的 `node_modules`。
|
|
11
|
+
- 不要启动第二个 DSH Web 服务来验证修改;需要页面验证时使用当前 Harness URL,无法连接时如实记录限制。
|
|
12
|
+
- 发布前只执行插件范围内的检查、测试、构建和 `pack --dry-run`;不要因为验证方便而更新运行环境。
|
|
13
|
+
- 仓库通过 `packageManager` 固定 pnpm 9;运行发布命令时使用 `corepack pnpm`,避免被全局 pnpm shim 覆盖。
|
|
14
|
+
- 如果插件需要宿主新增 slot 或宿主 bundle 修改,不能把宿主改动作为交付方案;应改为兼容当前宿主,或先向用户说明并等待明确授权。
|
|
15
|
+
- 发布后只核对 npm 版本和发布内容;不要把“npm 已发布”当成“运行中的 DSH 已更新”。
|
|
16
|
+
|
|
17
|
+
### 推荐交付流程
|
|
18
|
+
|
|
19
|
+
1. 修改插件源代码和插件测试。
|
|
20
|
+
2. 运行插件的 `check`、相关测试、`build` 和 `pack --dry-run`。
|
|
21
|
+
3. 递增插件版本并只发布插件。
|
|
22
|
+
4. 核对 npm 的版本和 `latest` dist-tag。
|
|
23
|
+
5. 把更新命令和重启要求交给用户,由用户手动更新并重启。
|
|
24
|
+
|
|
25
|
+
## Publish
|
|
26
|
+
|
|
27
|
+
Run from the repository directory:
|
|
28
|
+
|
|
29
|
+
```powershell
|
|
30
|
+
npm whoami
|
|
31
|
+
npm version <version> --no-git-tag-version
|
|
32
|
+
corepack pnpm run check
|
|
33
|
+
corepack pnpm test
|
|
34
|
+
corepack pnpm run build
|
|
35
|
+
corepack pnpm run pack:check
|
|
36
|
+
npm publish --access public --tag latest --registry https://registry.npmjs.org/
|
|
37
|
+
npm view @shuind/dsh-codex-harness@<version> version
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`npm publish` runs the package build through `prepare`. Publish only after the
|
|
41
|
+
dry-run contains the current `lib/` files, generated `cordis.patch.yml`, preset
|
|
42
|
+
sources, exported locales and icon. The generated patch must declare
|
|
43
|
+
`@deepseek-ai/dsh-agent-preset`; it must not mount the legacy directory installer.
|
|
44
|
+
|
|
45
|
+
The `0.3.0` build targets Harness `0.2.2-rc.1`–`0.2.2-rc.4` (`>=0.2.2-rc.1 <=0.2.2-rc.4`). Keep that exact engine
|
|
46
|
+
requirement until another runtime has been verified. Do not publish as part of
|
|
47
|
+
an ordinary adaptation task unless the user explicitly requests publishing.
|
|
48
|
+
|
|
49
|
+
## Authentication
|
|
50
|
+
|
|
51
|
+
An npm token may remain configured for future releases:
|
|
52
|
+
|
|
53
|
+
```powershell
|
|
54
|
+
npm config set "//registry.npmjs.org/:_authToken" "<TOKEN>"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Do not commit or paste the token. If npm requests two-factor authentication,
|
|
58
|
+
publish with `--otp=<code>` or use a token authorized to publish this package.
|
|
59
|
+
|
|
60
|
+
Token cleanup is optional; if the token is removed, run `npm login` or configure
|
|
61
|
+
another token before the next release.
|
package/assets/codex.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" role="img" aria-label="Codex harness">
|
|
2
|
+
<rect x="2" y="2" width="60" height="60" rx="15" fill="#152238"/>
|
|
3
|
+
<path d="m23 19-13 13 13 13m18-26 13 13-13 13" fill="none" stroke="#8ce8cb" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="m36 16-8 32" fill="none" stroke="#f6c978" stroke-width="4" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
package/cordis.patch.yml
CHANGED
|
@@ -1,11 +1,186 @@
|
|
|
1
|
+
# Generated by scripts/build-preset.mjs; edit presets/codex-hybrid or src/presets/desktop-preset.ts.
|
|
1
2
|
- insert:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
- id: codex
|
|
4
|
+
name: "@shuind/dsh-codex-harness/preferences"
|
|
5
|
+
- id: codex-tool-policy
|
|
6
|
+
name: "@shuind/dsh-codex-harness/tool-policy"
|
|
7
|
+
config:
|
|
8
|
+
rules: []
|
|
9
|
+
- id: preset-codex-hybrid
|
|
10
|
+
name: "@deepseek-ai/dsh-agent-preset"
|
|
11
|
+
config:
|
|
12
|
+
name: Codex 混合模式
|
|
13
|
+
description: 原生补丁与终端交互配合 run_code 批量检索 SDK 及按需延迟加载的编码 Agent。
|
|
14
|
+
order: 5
|
|
15
|
+
id: codex-hybrid
|
|
16
|
+
plugins:
|
|
17
|
+
- id: persona
|
|
18
|
+
name: "@deepseek-ai/dsh-persona"
|
|
19
|
+
config:
|
|
20
|
+
prefix: You are Codex, a coding agent based on the {{model}} model.
|
|
21
|
+
includeRuntimeContext: true
|
|
22
|
+
- id: agent-instructions
|
|
23
|
+
name: "@deepseek-ai/dsh-agent-instructions"
|
|
24
|
+
config:
|
|
25
|
+
maxBytes: 65536
|
|
26
|
+
- id: codex-tools
|
|
27
|
+
name: "@shuind/dsh-codex-harness"
|
|
28
|
+
config:
|
|
29
|
+
globalEnhancements: false
|
|
30
|
+
codexCore: true
|
|
31
|
+
- id: codex-jobs
|
|
32
|
+
name: "@deepseek-ai/dsh-tool-jobs"
|
|
33
|
+
config:
|
|
34
|
+
completionDelivery: wakeup
|
|
35
|
+
- id: codex-web-search
|
|
36
|
+
name: "@deepseek-ai/dsh-tool-web"
|
|
37
|
+
config:
|
|
38
|
+
search: true
|
|
39
|
+
fetch: true
|
|
40
|
+
- id: tool-fs
|
|
41
|
+
name: "@deepseek-ai/dsh-tool-fs"
|
|
42
|
+
config:
|
|
43
|
+
read: true
|
|
44
|
+
readImage: true
|
|
45
|
+
write: false
|
|
46
|
+
edit: false
|
|
47
|
+
applyPatch: false
|
|
48
|
+
- id: tool-fs-search
|
|
49
|
+
name: "@deepseek-ai/dsh-tool-fs-search"
|
|
50
|
+
config:
|
|
51
|
+
sampleOverCapGlobResults: false
|
|
52
|
+
- id: hybrid-executor
|
|
53
|
+
name: "@shuind/dsh-codex-harness/hybrid-executor"
|
|
54
|
+
config:
|
|
55
|
+
hiddenTools:
|
|
56
|
+
- todo_write
|
|
57
|
+
deferredTools:
|
|
58
|
+
- create_goal
|
|
59
|
+
- get_goal
|
|
60
|
+
- ralph
|
|
61
|
+
- subagent_fork
|
|
62
|
+
- update_goal
|
|
63
|
+
- workflow
|
|
64
|
+
- id: codex-terminal
|
|
65
|
+
name: cordis:group
|
|
66
|
+
group: true
|
|
67
|
+
isolate:
|
|
68
|
+
terminals: true
|
|
69
|
+
config:
|
|
70
|
+
- id: terminals
|
|
71
|
+
name: "@deepseek-ai/dsh-terminal"
|
|
72
|
+
- id: terminal-bash
|
|
73
|
+
name: "@deepseek-ai/dsh-terminal-bash"
|
|
74
|
+
disabled:
|
|
75
|
+
__jsExpr: process.platform === 'win32'
|
|
76
|
+
config:
|
|
77
|
+
timeoutMs: 300000
|
|
78
|
+
- id: terminal-pwsh
|
|
79
|
+
name: "@deepseek-ai/dsh-terminal-bash"
|
|
80
|
+
disabled:
|
|
81
|
+
__jsExpr: process.platform !== 'win32'
|
|
82
|
+
config:
|
|
83
|
+
shellDialect: pwsh
|
|
84
|
+
timeoutMs: 300000
|
|
85
|
+
- id: compaction
|
|
86
|
+
name: cordis:group
|
|
87
|
+
group: true
|
|
88
|
+
isolate:
|
|
89
|
+
compaction: true
|
|
90
|
+
toolResultPruner: true
|
|
91
|
+
config:
|
|
92
|
+
- id: compaction-basic
|
|
93
|
+
name: "@shuind/dsh-codex-harness/compaction"
|
|
94
|
+
config:
|
|
95
|
+
thresholdRatio: 0.9
|
|
96
|
+
- id: command-compact
|
|
97
|
+
name: "@shuind/dsh-codex-harness/compact-command"
|
|
98
|
+
- id: tool-result-pruner
|
|
99
|
+
name: "@deepseek-ai/dsh-compaction-tool-result-pruner"
|
|
100
|
+
config:
|
|
101
|
+
thresholdChars: 40960
|
|
102
|
+
headChars: 20000
|
|
103
|
+
tailChars: 20000
|
|
104
|
+
- id: skill-filesystem
|
|
105
|
+
name: "@deepseek-ai/dsh-skill-filesystem"
|
|
106
|
+
- id: tool-skill
|
|
107
|
+
name: "@deepseek-ai/dsh-tool-skill"
|
|
108
|
+
- id: tool-goal
|
|
109
|
+
name: "@deepseek-ai/dsh-tool-goal"
|
|
110
|
+
- id: planning
|
|
111
|
+
name: cordis:group
|
|
112
|
+
group: true
|
|
113
|
+
isolate:
|
|
114
|
+
planMode: true
|
|
115
|
+
config:
|
|
116
|
+
- id: plan-mode
|
|
117
|
+
name: "@deepseek-ai/dsh-plan-mode"
|
|
118
|
+
config:
|
|
119
|
+
section: |
|
|
120
|
+
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement, including an answer confirming something you asked, approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
121
|
+
|
|
122
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
123
|
+
|
|
124
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override later tool descriptions or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use update_plan or todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
125
|
+
|
|
126
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
127
|
+
|
|
128
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
129
|
+
|
|
130
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
131
|
+
- id: delegation
|
|
132
|
+
name: cordis:group
|
|
133
|
+
group: true
|
|
134
|
+
isolate:
|
|
135
|
+
workflowEngine: true
|
|
136
|
+
config:
|
|
137
|
+
- id: tool-subagent-control
|
|
138
|
+
name: "@deepseek-ai/dsh-tool-subagent-control"
|
|
139
|
+
- id: tool-subagent
|
|
140
|
+
name: "@deepseek-ai/dsh-tool-subagent"
|
|
141
|
+
config:
|
|
142
|
+
provider: spawn
|
|
143
|
+
toolName: subagent
|
|
144
|
+
modelSelection: true
|
|
145
|
+
modelDiscovery: true
|
|
146
|
+
- id: tool-subagent-fork
|
|
147
|
+
name: "@deepseek-ai/dsh-tool-subagent"
|
|
148
|
+
config:
|
|
149
|
+
provider: fork
|
|
150
|
+
toolName: subagent_fork
|
|
151
|
+
- id: tool-subagent-codex
|
|
152
|
+
name: "@deepseek-ai/dsh-tool-subagent"
|
|
153
|
+
disabled: true
|
|
154
|
+
config:
|
|
155
|
+
provider: codex
|
|
156
|
+
toolName: subagent_codex
|
|
157
|
+
maxDepth: provider-managed
|
|
158
|
+
- id: tool-subagent-claude-code
|
|
159
|
+
name: "@deepseek-ai/dsh-tool-subagent"
|
|
160
|
+
disabled: true
|
|
161
|
+
config:
|
|
162
|
+
provider: claude-code
|
|
163
|
+
toolName: subagent_claude_code
|
|
164
|
+
maxDepth: provider-managed
|
|
165
|
+
- id: workflow-worker-thread
|
|
166
|
+
name: "@deepseek-ai/dsh-workflow-ptc"
|
|
167
|
+
config:
|
|
168
|
+
provider: spawn
|
|
169
|
+
- id: tool-workflow
|
|
170
|
+
name: "@deepseek-ai/dsh-tool-workflow"
|
|
171
|
+
- id: tool-ralph
|
|
172
|
+
name: "@deepseek-ai/dsh-tool-ralph"
|
|
173
|
+
config:
|
|
174
|
+
subagentProvider: spawn
|
|
175
|
+
maxRounds: 64
|
|
176
|
+
- id: tool-ask-user
|
|
177
|
+
name: "@deepseek-ai/dsh-tool-ask-user"
|
|
178
|
+
- id: tool-todo
|
|
179
|
+
name: "@deepseek-ai/dsh-tool-todo"
|
|
180
|
+
config:
|
|
181
|
+
allowParallelInProgress: true
|
|
7
182
|
- id: codex-client
|
|
8
|
-
name:
|
|
183
|
+
name: "@shuind/dsh-codex-harness"
|
|
9
184
|
config:
|
|
10
185
|
globalEnhancements: true
|
|
11
186
|
codexCore: false
|
package/docs/preset-library.md
CHANGED
|
@@ -1,23 +1,33 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
# 预设与提示词
|
|
2
|
+
|
|
3
|
+
适用于插件 `0.3.0` 和 DeepSeek Harness `0.2.2-rc.1`–`0.2.2-rc.4`。
|
|
4
|
+
|
|
5
|
+
## 当前入口
|
|
6
|
+
|
|
7
|
+
打开 **设置 → 内置插件 → Codex Harness**。页面分为“预设方案”和“运行偏好”:前者管理当前选中预设的工具控制(启用 / 替换 / 延迟 / 隐藏)、提示词覆盖与只读原始 YAML;后者编辑当前配置环境共享的模型请求与显示偏好。插件详情仅提供摘要和设置路径,不再复制另一套完整表单。
|
|
8
|
+
|
|
9
|
+
## 原始定义只读,提示词覆盖可编辑
|
|
10
|
+
|
|
11
|
+
当前 `agentPresets` 服务提供声明列表和 YAML 查看,不提供目录路径、复制或删除接口。因此,本插件不把原生预设伪装成可写源文件,也不为只读声明提供假保存或复制操作。
|
|
12
|
+
|
|
13
|
+
“提示词”子视图读取当前预设原有的指令段。可核验的原生身份前缀/后缀和 Codex 操作指南支持独立覆盖;无法确认来源、完整性或覆盖语义的其它段只读。不会把 YAML 标签或表达式当正文,更不会给非 Codex 预设填入一份共享 Codex 模板。
|
|
14
|
+
|
|
15
|
+
修改存到该预设的 `promptOverrides`,不写原始定义。每段“恢复原始”只移除对应覆盖;工具配置、其它指令段和其它预设不变。覆盖在新建或重载 Agent 时按快照加载,保留原有 complete、插值和位置语义,不替换工具声明或宿主运行约束。
|
|
16
|
+
|
|
17
|
+
旧共享模板数据保留后台兼容;没有独立覆盖的预设维持原来的指令,不自动迁移成每个预设一份,也没有共享模板编辑页面。需要改变插件组成时,仍使用 Harness 的 Creator/自定义 bundle。
|
|
18
|
+
|
|
19
|
+
工具选择与执行/计划替换同样无需修改预设声明,详见 [跨预设工具覆盖](tool-policy.md)。工具选择本身不改身份指令;提示词仅在用户明确编辑该预设对应段时覆盖。
|
|
20
|
+
|
|
21
|
+
## 本仓库的声明来源
|
|
22
|
+
|
|
23
|
+
- [原始组合](../presets/codex-hybrid/agent.cordis.yml) 保存 **Codex 混合模式** 预设的工具、延迟加载与提示词配置。
|
|
24
|
+
- [适配器](../src/presets/desktop-preset.ts) 转换旧工作流名称、子代理配置,并移除已退役的 `list-agents` 子路径;不会执行 YAML 中的 `!!js`。
|
|
25
|
+
- [生成脚本](../scripts/build-preset.mjs) 在构建时产生 [bundle patch](../cordis.patch.yml),其中的普通声明行 id 为 `preset-codex-hybrid`,会话预设 id 为 `codex-hybrid`。
|
|
26
|
+
|
|
27
|
+
不要手动修改生成的 patch,也不要直接改安装目录或 profile。通过 bundle 覆盖声明时,`config` 是完整替换,必须保留所需的 `id`、名称、说明及完整 `plugins` 列表。服务提供者和消费者的隔离组应保持完整。
|
|
28
|
+
|
|
29
|
+
## 旧目录预设
|
|
30
|
+
|
|
31
|
+
历史版本曾使用 `$DSH_HOME/.agent-presets/<id>/` 中的 `preset.yml` 和 `agent.cordis.yml`。当前宿主不再读取这个目录,本插件也不会在启动时覆盖、迁移或删除它。
|
|
32
|
+
|
|
33
|
+
如需迁移自定义内容,先备份旧目录,再通过 Creator/自定义 bundle 将元数据和插件列表迁成普通预设声明,检查插件名称和 Config 是否符合当前宿主接口。不要仅把目录复制到新安装中;也不要用版本豁免加载旧插件。
|