@shuind/dsh-codex-harness 0.2.32-dsh-v0.2.2-rc.1 → 0.3.1
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 +73 -0
- package/LICENSE +21 -21
- package/README.md +37 -59
- package/README.zh.md +3 -3
- package/RELEASE.md +1 -1
- package/cordis.patch.yml +42 -11
- package/docs/preset-library.md +6 -12
- package/docs/tool-policy-benchmark.json +89 -89
- package/docs/tool-policy.md +11 -7
- package/lib/client.js +3794 -2964
- package/lib/compact-command.js +416 -0
- package/lib/compaction.js +129 -15
- package/lib/hybrid-executor.js +1196 -0
- package/lib/index.js +3554 -2841
- package/lib/preferences.js +17 -11
- package/lib/tool-policy.js +1930 -1743
- package/lib/typert.js +49 -89
- package/lib/types/client/activity.js +4 -3
- package/lib/types/client/desktop.d.ts +26 -2
- package/lib/types/client/desktop.js +143 -35
- package/lib/types/client/index.d.ts +136 -129
- package/lib/types/client/index.js +92 -466
- package/lib/types/client/policy-drafts.d.ts +1 -1
- 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 +33 -15
- package/lib/types/client/preset-manager.js +220 -215
- package/lib/types/client/preset-requests.d.ts +2 -2
- package/lib/types/client/tool-policy.d.ts +6 -93
- package/lib/types/client/tool-policy.js +85 -143
- 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} +9 -5
- package/lib/types/{settings.d.ts → contracts/settings.d.ts} +8 -1
- package/lib/types/{settings.js → contracts/settings.js} +19 -3
- package/lib/types/{tool-policy-contract.d.ts → contracts/tool-policy-contract.d.ts} +9 -6
- package/lib/types/{tool-policy-contract.js → contracts/tool-policy-contract.js} +9 -2
- package/lib/types/contracts/ui-contracts.d.ts +92 -0
- package/lib/types/contracts/ui-contracts.js +83 -0
- package/lib/types/{client/entry.d.ts → entries/client.d.ts} +2 -2
- package/lib/types/{client/entry.js → entries/client.js} +2 -4
- 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} +12 -0
- package/lib/types/{compaction.js → entries/compaction.js} +43 -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 +12 -0
- package/lib/types/{preferences.js → entries/preferences.js} +1 -1
- package/lib/types/entries/tool-policy.d.ts +22 -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 +18 -0
- package/lib/types/policy/rule-resolver.js +114 -0
- package/lib/types/{tool-capabilities.d.ts → policy/tool-capabilities.d.ts} +3 -2
- package/lib/types/{tool-capabilities.js → policy/tool-capabilities.js} +6 -2
- package/lib/types/{activity.d.ts → presets/activity.d.ts} +2 -4
- package/lib/types/{activity.js → presets/activity.js} +2 -14
- package/lib/types/{desktop-preset.d.ts → presets/desktop-preset.d.ts} +3 -1
- package/lib/types/{desktop-preset.js → presets/desktop-preset.js} +6 -2
- package/lib/types/presets/preset-editor.d.ts +47 -0
- package/lib/types/presets/preset-editor.js +81 -0
- package/lib/types/{preset-prompt-catalog.d.ts → presets/preset-prompt-catalog.d.ts} +3 -1
- package/lib/types/{preset-prompt-catalog.js → presets/preset-prompt-catalog.js} +27 -4
- package/lib/types/{preset-tool-catalog.d.ts → presets/preset-tool-catalog.d.ts} +1 -1
- package/lib/types/{preset-tool-catalog.js → presets/preset-tool-catalog.js} +11 -4
- 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/hybrid-executor/en.json +6 -0
- package/locale/hybrid-executor/zh.json +6 -0
- package/package.json +183 -150
- 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 +3 -3
- package/scripts/build-preset.mjs +5 -5
- package/src/client/activity.ts +4 -3
- package/src/client/desktop.tsx +165 -51
- package/src/client/index.tsx +128 -709
- package/src/client/policy-drafts.ts +1 -1
- package/src/client/policy-locale.ts +362 -0
- package/src/client/preset-manager.tsx +331 -236
- package/src/client/preset-requests.ts +2 -2
- package/src/client/tool-policy.tsx +225 -203
- package/src/contracts/preset-editor-schema.ts +110 -0
- package/src/{prompt.ts → contracts/prompt.ts} +9 -5
- package/src/{settings.ts → contracts/settings.ts} +27 -3
- package/src/{tool-policy-contract.ts → contracts/tool-policy-contract.ts} +24 -7
- package/src/contracts/ui-contracts.ts +173 -0
- package/src/{client/entry.tsx → entries/client.tsx} +2 -4
- package/src/entries/compact-command.ts +256 -0
- package/src/{compaction.ts → entries/compaction.ts} +47 -19
- package/src/entries/hybrid-executor.ts +76 -0
- package/src/entries/index.ts +298 -0
- package/src/{preferences.ts → entries/preferences.ts} +3 -2
- 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/{tool-capabilities.ts → policy/tool-capabilities.ts} +16 -4
- package/src/{activity.ts → presets/activity.ts} +4 -16
- package/src/{desktop-preset.ts → presets/desktop-preset.ts} +7 -2
- package/src/presets/preset-editor.ts +101 -0
- package/src/{preset-prompt-catalog.ts → presets/preset-prompt-catalog.ts} +35 -5
- package/src/{preset-tool-catalog.ts → presets/preset-tool-catalog.ts} +12 -5
- 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/{patch.ts → tools/patch.ts} +90 -20
- package/tsdown.config.ts +8 -8
- package/lib/installer.js +0 -281
- 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 -43
- package/lib/types/client/preset-copy.js +0 -83
- package/lib/types/client/session.d.ts +0 -6
- package/lib/types/client/session.js +0 -9
- 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 -50
- package/lib/types/exec.js +0 -491
- package/lib/types/host-settings.d.ts +0 -4
- package/lib/types/host-settings.js +0 -13
- package/lib/types/index.d.ts +0 -113
- package/lib/types/index.js +0 -851
- package/lib/types/installer.d.ts +0 -27
- package/lib/types/installer.js +0 -155
- package/lib/types/invariant.d.ts +0 -16
- package/lib/types/invariant.js +0 -22
- package/lib/types/preferences.d.ts +0 -11
- 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 -32
- package/lib/types/preset-editor-remote.js +0 -41
- package/lib/types/preset-editor.d.ts +0 -74
- package/lib/types/preset-editor.js +0 -587
- package/lib/types/preset-prompt-catalog-schema.d.ts +0 -16
- package/lib/types/preset-prompt-catalog-schema.js +0 -11
- package/lib/types/preset-prompt-contract.d.ts +0 -22
- package/lib/types/preset-prompt-contract.js +0 -3
- package/lib/types/preset-tool-catalog-schema.d.ts +0 -38
- package/lib/types/preset-tool-catalog-schema.js +0 -28
- package/lib/types/prompt-sections.d.ts +0 -15
- package/lib/types/prompt-sections.js +0 -29
- package/lib/types/remote.d.ts +0 -40
- package/lib/types/remote.js +0 -698
- package/lib/types/tool-policy.d.ts +0 -171
- package/lib/types/tool-policy.js +0 -367
- package/lib/types/typert.host.d.ts +0 -47
- package/lib/types/typert.host.js +0 -109
- package/presets/codex-collaboration/preset.yml +0 -3
- package/src/activity-types.ts +0 -7
- package/src/client/preset-copy.ts +0 -83
- package/src/client/session.ts +0 -11
- package/src/compact-command.ts +0 -112
- package/src/context.ts +0 -15
- package/src/exec.ts +0 -570
- package/src/host-settings.ts +0 -17
- package/src/index.ts +0 -1097
- package/src/installer.ts +0 -172
- package/src/invariant.ts +0 -34
- package/src/preset-contract.ts +0 -85
- package/src/preset-editor-remote.ts +0 -41
- package/src/preset-editor.ts +0 -502
- package/src/preset-prompt-catalog-schema.ts +0 -10
- package/src/preset-prompt-contract.ts +0 -21
- package/src/preset-tool-catalog-schema.ts +0 -28
- package/src/prompt-sections.ts +0 -33
- package/src/remote.ts +0 -748
- package/src/tool-policy.ts +0 -388
- package/src/typert.host.ts +0 -119
- /package/lib/types/{prompt.d.ts → contracts/prompt.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,78 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.1 (2026-11-22)
|
|
4
|
+
|
|
5
|
+
- **适配 DeepSeek Harness `0.2.2-rc.5`**:
|
|
6
|
+
- 将 `engines.dsh` 范围扩展至 `>=0.2.2-rc.1 <=0.2.2-rc.5`,并将全部 `@deepseek-ai/dsh-*` 开发依赖与传递 peer 依赖对齐验证到 `0.2.2-rc.5`。
|
|
7
|
+
- **修复从 GitHub 源码安装触发的 `TS2883` 构建错误**:
|
|
8
|
+
- 为 `src/policy/rule-resolver.ts` 与 `src/entries/preferences.ts` 的 `Config` 补齐显式可移植类型标注,避免在 `pnpm v11` 严格依赖布局下导出 `.d.ts` 时引用非直接依赖 `@deepseek-ai/cosmokit`。
|
|
9
|
+
- **市场元数据维护**:
|
|
10
|
+
- 新增 256px 栅格市场图标 `assets/codex-icon-256.png`,并将 `screenshots.json` 迁移为相对路径。
|
|
11
|
+
|
|
12
|
+
## 0.3.0 (2026-11-18)
|
|
13
|
+
|
|
14
|
+
本版本整合 `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` 正式发布版本:
|
|
15
|
+
|
|
16
|
+
- **`0.2.2-rc.4` 开发依赖与类型适配**:
|
|
17
|
+
- 将全部 `@deepseek-ai/dsh-*` 开发依赖与传递 peer 依赖对齐验证到 `0.2.2-rc.4`,并将 `zod` 升级至 `4.6.6` 与 `0.2.2-rc.4` 运行时保持一致,消除跨版本 `ZodType` 类型实例化膨胀。
|
|
18
|
+
- **远程压缩与本地压缩统一回收冷工具**:
|
|
19
|
+
- 移除 `compaction/end` 中针对远端加密压缩(`<codex-remote-compaction>` / `<dsh-codex-connect-native-compaction-v1>`)跳过回收的限制;无论本地摘要还是远程加密压缩,压缩进行期间仍维持工具集合不变以命中原前缀缓存,压缩完成后统一回收超过 `2` 轮(`DEFERRED_RECENT_TURN_WINDOW`)未再使用的已激活延迟工具,避免冷工具在历史被压缩折叠后被 `dsh-llm` 退回顶层 `body.tools` 常驻占用。
|
|
20
|
+
|
|
21
|
+
- **输入框快捷上下文调控与界面精简**:
|
|
22
|
+
- 在对话输入框右下角新增紧凑的上下文容量按钮与菜单(预设 `64k`–`1000k` 档位及 `k` / 数值输入,最高 `1000k`,可在运行偏好关闭显示);`openai-codex` 路由直接读写 `dsh-codex-connect` 的逐模型 `contextWindowOverrides` 并拉取 `/plugins/dsh-codex-connect/models` 动态上限,其它 GPT 路由读写本地 `contextWindow` 配置。
|
|
23
|
+
- 在运行偏好设置页隐藏与输入框快捷按钮重复的“上下文大小 (tokens)”数字输入框,保留后台 schema 与非 `openai-codex` 路由已有配置兼容。
|
|
24
|
+
- **`/compact [remote|local]` 命令与交互弹层**:
|
|
25
|
+
- 新增 Codex 感知的 `/compact` 命令并接入输入框指令选择弹层;支持显式传入 `remote` 或 `local`(`/compact local` 强制本地摘要压缩并抑制外部原生远端压缩),映射宿主 `ManualCompactionError` 错误反馈。
|
|
26
|
+
- **小窗口自动压缩回退与上下文上限保护**:
|
|
27
|
+
- 当 GPT 会话有效上下文窗口低于 `80K`(低于宿主默认预留阈值)时,按 `0.8` 阈值自动对最旧安全区间执行截断压缩,保留近期约 `0.16` 上下文及首条系统消息并确保 tool call/result 配对完整。
|
|
28
|
+
- 在 `compaction` 阶段按模型真实上限放宽遗留 `pi-ai` 上下文溢出诊断修补阈值。
|
|
29
|
+
- **`codex-hybrid` 预设提示词变量兼容修复**:
|
|
30
|
+
- 移除 `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()` 校验。
|
|
31
|
+
|
|
32
|
+
## 0.2.40-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
33
|
+
|
|
34
|
+
- 消除与 `dsh-codex-connect` 的剩余功能与界面重叠:
|
|
35
|
+
- **Fast 开关**:输入框右下角仅在非 `openai-codex` 的 GPT 模型(或无 `modelDirectories` 的旧宿主)下展示;切到 `openai-codex`(已有三档菜单)或非 GPT 模型(如 DeepSeek)时自动隐藏;`agent/request` 对 `openai-codex` 不再注入 `serviceTier`。
|
|
36
|
+
- **上下文窗口**:`syncCodexContextWindow`、`applyCodexRequestSettings`、`CodexCompactionEngine` 与 `llm/stream` 均不对 `openai-codex` 覆盖容量,保留 `dsh-codex-connect` 的逐模型预算与 `contextWindowOverrides`。
|
|
37
|
+
- **联网搜索与补丁语法**:`openai-codex` 路由关闭 `hostedWebSearch` Wire 改写以直接走 Codex Connect 搜索服务,同时保留互补的 `apply_patch` Lark 自定义语法升级。
|
|
38
|
+
- **工具说明**:补全 `view_image`、`codex_connect_image_generate`、`codex_connect_quota` 三个可选工具的中英文设置页说明。
|
|
39
|
+
|
|
40
|
+
## 0.2.39-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
41
|
+
|
|
42
|
+
- 让路 `dsh-codex-connect` 并对齐 Responses V2 远程压缩能力:
|
|
43
|
+
- `openai-codex` 路由不再尝试读取 `llm-pi-ai` 或拦截改写 `compaction_trigger` 与既有 `service_tier`,`/compact local` 会显式抑制外部原生压缩触发,冷工具回收同时识别 `<dsh-codex-connect-native-compaction-v1>` 标记。
|
|
44
|
+
- 独立 `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` 短时重试。
|
|
45
|
+
|
|
46
|
+
## 0.2.38-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
47
|
+
|
|
48
|
+
- 为按需延迟加载(`deferLoading`)新增压缩前轮次热度账本:在 `activate_tools` 与延迟工具实际执行时零阻塞记录最近使用轮次,并在本地摘要压缩(`compaction/end`)完成且非远端加密压缩时,自动回收超过 `2` 轮(`DEFERRED_RECENT_TURN_WINDOW`)未再使用的冷工具;压缩摘要生成过程保持工具列表不变以复用热 KV 缓存,活跃工具与 `codex:deferred-tools` 静态目录保持不动。
|
|
49
|
+
|
|
50
|
+
## 0.2.37-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
51
|
+
|
|
52
|
+
- 补全设置页全部 65+ 个 DSH 官方工具(含 `job_list`、`list_subagent_models`、`schedule_*`、`session_*`、`terminal_*`、`team_*`、`stagehand_*`、`plugin_*`、`cordis_*` 等)、`dsh-codex-connect` 审批工具以及动态 `mcp__*__*` 扩展工具的保留术语中文说明,替代英文原描述截断展示。
|
|
53
|
+
|
|
54
|
+
## 0.2.36-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
55
|
+
|
|
56
|
+
- 移除旧非混合预设 `codex-collaboration`(`Codex 模式`),仅保留唯一的 **Codex 混合模式**(`codex-hybrid` / `preset-codex-hybrid`),并在 `codex-hybrid-executor` 新增 `hiddenTools` 隐藏冗余的 `todo_write` 工具。
|
|
57
|
+
- 重构 **Codex Harness** 设置界面:贴合桌面端原生卡片与分段标签设计,移除多余 `高级…` 二级入口,将全部/已修改/延迟筛选与 `启用 / 替换 / 延迟 / 隐藏` 分段操作按钮整合到同一视图,屏蔽 Codex 自带工具误报的 `按条件可用` 标签并改用吸底待保存栏。
|
|
58
|
+
|
|
59
|
+
## 0.2.35-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
60
|
+
|
|
61
|
+
- 新增实验性非对称混合模式执行器 `@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 批量并发执行。
|
|
62
|
+
- 新增按需延迟加载工具能力(`deferLoading: true` + `activate_tools`),在混合模式和工具方案策略中默认延迟低频工具并保持提示词与请求缓存前缀稳定。
|
|
63
|
+
- 强化核心工具与 Responses 协议适配:支持 `read_image`、Windows `terminal-pwsh` PTY 与 64 会话 LRU 清理、`apply_patch` Diff 卡片、工作流/计划模式兼容、`zstd` 请求重写与 `/responses/compact` 远程压缩及回退。
|
|
64
|
+
- 完成 `src/` 与 `tests/` 分层模块化重构,保持 8 个 `lib/*.js` 导出入口与浏览器客户端隔离不变。
|
|
65
|
+
|
|
66
|
+
## 0.2.34-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
67
|
+
|
|
68
|
+
- 请求状态改放输入框卡片外上方的原生 dock 区域,不再占用输入框右侧操作栏;原生思考提示保持不动。
|
|
69
|
+
- 沿用消息投影、计时、隐藏设置和回收逻辑,继续不使用消息区 DOM 定位或悬浮层。
|
|
70
|
+
|
|
71
|
+
## 0.2.33-dsh-v0.2.2-rc.1 (local, unpublished)
|
|
72
|
+
|
|
73
|
+
- 请求/回复/压缩状态移到输入框右侧、发送按钮之前的原生扩展位,以紧凑单行显示,不再悬浮在消息区。
|
|
74
|
+
- 删除跟踪宿主“深度求索中”DOM、每帧测量坐标及状态浮层 portal;计时和状态来源保持不变,长标签在窄屏内截断,不替换宿主原有思考提示。
|
|
75
|
+
|
|
3
76
|
## 0.2.32-dsh-v0.2.2-rc.1 (2026-11-13)
|
|
4
77
|
|
|
5
78
|
- 删除共享 Codex 模板编辑界面,改为跟随当前所选预设的提示词;工具与提示词使用同一份预设草稿和“保存此预设”,不再写入旧全局模板字段。
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 DeepSeek
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,78 +1,56 @@
|
|
|
1
1
|
# @shuind/dsh-codex-harness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
给 DeepSeek Harness(DSH)用的 Codex 风格插件:自带一套混合模式编码预设(`codex-hybrid`)和 Codex 常用工具,支持对任意预设按工具做启用 / 替换 / 延迟加载 / 隐藏,也可以单独调整预设提示词,并针对 OpenAI Responses API 与中转站补全了常用请求增强。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
当前版本 `0.3.1` 适配 **DeepSeek Harness `0.2.2-rc.1`–`0.2.2-rc.5`**(`engines.dsh: >=0.2.2-rc.1 <=0.2.2-rc.5`)。
|
|
6
6
|
|
|
7
7
|
## 安装
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### 从插件市场 / npm 安装
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
在 Harness 的 **插件 → 添加插件** 中输入 `@shuind/dsh-codex-harness`(或指定 `@shuind/dsh-codex-harness@0.3.1`),安装后按提示重启 Harness 即可。
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
2. 在当前 Harness 的 **插件 → 添加插件** 中输入这个压缩包的绝对路径,确认安装。
|
|
15
|
-
3. 按安装结果提示操作;升级已有插件通常需要手动重启 Harness。
|
|
16
|
-
4. 打开 **设置 → 内置插件 → Codex Harness → 工具方案**,选择预设,调整具体工具并“保存此预设”;新建或重载目标 Agent 后生效。“运行偏好”单独管理本环境共享的请求和显示设置。独立的 Codex 模式仍可从 Agent 预设选择。
|
|
13
|
+
### 从离线包安装(GitHub Release)
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
1. 在 [Releases](https://github.com/shuind/dsh-codex-harness/releases) 页面下载对应版本的 `.tgz` 安装包(如 `shuind-dsh-codex-harness-0.3.1.tgz`)。
|
|
16
|
+
2. 打开 Harness 桌面端的 **插件 → 添加插件**,填入该 `.tgz` 文件的本地路径确认安装,然后重启 Harness。
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
> 桌面端请直接在软件内的插件页面安装或升级,不要用命令行里可能存在的旧版 `dsh` 去改桌面端的 `desktop` profile。
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
- **设置 → 内置插件 → Codex Harness** 分为按预设的“工具方案”和本环境共享的“运行偏好”;保存时检查编辑起始版本,拒绝覆盖并发修改。高级页提供逐工具详情、当前预设提示词和只读原始定义;共享模板编辑器及诊断功能已删除。
|
|
24
|
-
- GPT Responses 路由支持原生 `apply_patch`、托管网络搜索和远程压缩;不支持时回退到宿主实现。非 GPT 路由不附加 Fast 或 GPT 容量字段。
|
|
25
|
-
- 保留官方技能、计划模式、子代理、模型发现、工作流、用户提问和任务列表。
|
|
26
|
-
- 显示模型请求、回复和上下文压缩状态;持久化状态适配当前的会话流记录。
|
|
20
|
+
## 功能概览
|
|
27
21
|
|
|
28
|
-
|
|
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
|
+
- **运行状态条**:在输入框上方实时显示当前模型「请求中 / 回复中 / 正在压缩上下文」及已耗时秒数。
|
|
29
40
|
|
|
30
|
-
|
|
41
|
+
## 接入模型(官方接口 / 中转站 / 订阅)
|
|
31
42
|
|
|
32
|
-
|
|
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` 管理,输入框右下角的容量按钮也会直接联动它的逐模型配置。
|
|
33
47
|
|
|
34
|
-
|
|
48
|
+
## 更多说明
|
|
35
49
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
当前宿主的预设服务只提供声明查看,不提供目录式复制和写入。原始定义仍只读;“预设提示词”通过本插件保存该预设独立的指令段覆盖,不修改源 YAML,也不编辑其它预设。旧共享模板仅后台兼容,不再提供共享编辑器。需要定制预设组成时,使用 Harness 的 Creator/自定义 bundle;不要直接编辑已安装运行时或 profile 文件。更多说明见 [预设说明](docs/preset-library.md)。
|
|
41
|
-
|
|
42
|
-
已有会话保留启动时选择的预设修订。升级或修改预设组成后,应创建新会话;不要把插件安装成功等同于旧会话已换用新工具。
|
|
43
|
-
|
|
44
|
-
## 模型
|
|
45
|
-
|
|
46
|
-
通用工具可随宿主模型使用。要使用 GPT 专属增强,在宿主模型设置中配置 OpenAI Responses provider、endpoint、API key 和模型,例如:
|
|
47
|
-
|
|
48
|
-
```yaml
|
|
49
|
-
api: openai-responses
|
|
50
|
-
baseURL: https://your-responses-endpoint.example.com
|
|
51
|
-
apiKeyEnv: OPENAI_API_KEY
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
也可配合 [dsh-codex-connect](https://github.com/shuind/dsh-codex-connect) 使用 ChatGPT 订阅模型。
|
|
55
|
-
|
|
56
|
-
- **Fast**:开启后,GPT Responses 请求使用 `service_tier: "priority"`。
|
|
57
|
-
- **上下文容量**:支持 `1K`–`1000K` tokens,后续请求的上下文显示与压缩使用该设置。
|
|
58
|
-
|
|
59
|
-
## 开发与验证
|
|
60
|
-
|
|
61
|
-
需要支持项目依赖的 Node.js 和 pnpm 9。构建先清理本包生成的 `lib/`,避免把旧版本残留代码打进压缩包。Windows 沙箱中建议使用平铺依赖布局,避免 junction 的 realpath 解析差异:
|
|
62
|
-
|
|
63
|
-
```sh
|
|
64
|
-
pnpm install --ignore-scripts --node-linker=hoisted
|
|
65
|
-
pnpm run check
|
|
66
|
-
pnpm run build
|
|
67
|
-
pnpm test
|
|
68
|
-
pnpm pack
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
构建从 [原始预设](presets/codex-collaboration/agent.cordis.yml) 经 [当前接口适配器](src/desktop-preset.ts) 生成 [bundle patch](cordis.patch.yml)。请编辑源文件,不要手改生成结果。原始目录格式只供旧安装器兼容代码使用;发布的 patch 使用当前的工作流和子代理配置,不包含已移除的子路径。
|
|
72
|
-
|
|
73
|
-
测试包括工具/沙箱调用、请求与压缩、设置冲突,以及当前真实 Cordis Loader、预设注册表、工具执行器和 Client ConfigForms 的集成。先构建再测试,以覆盖发布入口;这些 keyless 测试不发送真实付费模型请求,也不操作当前 profile。
|
|
74
|
-
|
|
75
|
-
发布约束见 [发布说明](RELEASE.md)。
|
|
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)
|
|
76
54
|
|
|
77
55
|
## License
|
|
78
56
|
|
package/README.zh.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# @shuind/dsh-codex-harness
|
|
2
|
-
|
|
3
|
-
中文文档已默认放在 [README.md](README.md)。
|
|
1
|
+
# @shuind/dsh-codex-harness
|
|
2
|
+
|
|
3
|
+
中文文档已默认放在 [README.md](README.md)。
|
package/RELEASE.md
CHANGED
|
@@ -42,7 +42,7 @@ dry-run contains the current `lib/` files, generated `cordis.patch.yml`, preset
|
|
|
42
42
|
sources, exported locales and icon. The generated patch must declare
|
|
43
43
|
`@deepseek-ai/dsh-agent-preset`; it must not mount the legacy directory installer.
|
|
44
44
|
|
|
45
|
-
The `0.2.
|
|
45
|
+
The `0.3.1` build targets Harness `0.2.2-rc.1`–`0.2.2-rc.5` (`>=0.2.2-rc.1 <=0.2.2-rc.5`). Keep that exact engine
|
|
46
46
|
requirement until another runtime has been verified. Do not publish as part of
|
|
47
47
|
an ordinary adaptation task unless the user explicitly requests publishing.
|
|
48
48
|
|
package/cordis.patch.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Generated by scripts/build-preset.mjs; edit presets/codex-
|
|
1
|
+
# Generated by scripts/build-preset.mjs; edit presets/codex-hybrid or src/presets/desktop-preset.ts.
|
|
2
2
|
- insert:
|
|
3
3
|
- id: codex
|
|
4
4
|
name: "@shuind/dsh-codex-harness/preferences"
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
name: "@shuind/dsh-codex-harness/tool-policy"
|
|
7
7
|
config:
|
|
8
8
|
rules: []
|
|
9
|
-
- id: preset-codex-
|
|
9
|
+
- id: preset-codex-hybrid
|
|
10
10
|
name: "@deepseek-ai/dsh-agent-preset"
|
|
11
11
|
config:
|
|
12
|
-
name: Codex
|
|
13
|
-
description:
|
|
12
|
+
name: Codex 混合模式
|
|
13
|
+
description: 原生补丁与终端交互配合 run_code 批量检索 SDK 及按需延迟加载的编码 Agent。
|
|
14
14
|
order: 5
|
|
15
|
-
id: codex-
|
|
15
|
+
id: codex-hybrid
|
|
16
16
|
plugins:
|
|
17
17
|
- id: persona
|
|
18
18
|
name: "@deepseek-ai/dsh-persona"
|
|
19
19
|
config:
|
|
20
|
-
prefix: You are Codex, a coding agent based on the {{model}} model.
|
|
20
|
+
prefix: You are Codex, a coding agent based on the {{model}} model.
|
|
21
21
|
includeRuntimeContext: true
|
|
22
22
|
- id: agent-instructions
|
|
23
23
|
name: "@deepseek-ai/dsh-agent-instructions"
|
|
@@ -36,7 +36,31 @@
|
|
|
36
36
|
name: "@deepseek-ai/dsh-tool-web"
|
|
37
37
|
config:
|
|
38
38
|
search: true
|
|
39
|
-
fetch:
|
|
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
|
|
40
64
|
- id: codex-terminal
|
|
41
65
|
name: cordis:group
|
|
42
66
|
group: true
|
|
@@ -51,6 +75,13 @@
|
|
|
51
75
|
__jsExpr: process.platform === 'win32'
|
|
52
76
|
config:
|
|
53
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
|
|
54
85
|
- id: compaction
|
|
55
86
|
name: cordis:group
|
|
56
87
|
group: true
|
|
@@ -61,15 +92,15 @@
|
|
|
61
92
|
- id: compaction-basic
|
|
62
93
|
name: "@shuind/dsh-codex-harness/compaction"
|
|
63
94
|
config:
|
|
64
|
-
thresholdRatio: 0.
|
|
95
|
+
thresholdRatio: 0.9
|
|
65
96
|
- id: command-compact
|
|
66
97
|
name: "@shuind/dsh-codex-harness/compact-command"
|
|
67
98
|
- id: tool-result-pruner
|
|
68
99
|
name: "@deepseek-ai/dsh-compaction-tool-result-pruner"
|
|
69
100
|
config:
|
|
70
|
-
thresholdChars:
|
|
71
|
-
headChars:
|
|
72
|
-
tailChars:
|
|
101
|
+
thresholdChars: 40960
|
|
102
|
+
headChars: 20000
|
|
103
|
+
tailChars: 20000
|
|
73
104
|
- id: skill-filesystem
|
|
74
105
|
name: "@deepseek-ai/dsh-skill-filesystem"
|
|
75
106
|
- id: tool-skill
|
package/docs/preset-library.md
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
# 预设与提示词
|
|
2
2
|
|
|
3
|
-
适用于插件 `0.
|
|
3
|
+
适用于插件 `0.3.1` 和 DeepSeek Harness `0.2.2-rc.1`–`0.2.2-rc.5`。
|
|
4
4
|
|
|
5
5
|
## 当前入口
|
|
6
6
|
|
|
7
|
-
打开 **设置 → 内置插件 → Codex Harness
|
|
8
|
-
|
|
9
|
-
“高级”提供逐工具详情、当前预设的“预设提示词”,以及“原始预设定义(只读)”。提示词与工具方案共用当前选中预设和草稿,切换预设不会改成编辑共享 Codex 模板。诊断页面和旧规则编辑功能已删除。原始定义仍只读,没有另一份选择器或写入源 YAML 的假保存操作。
|
|
10
|
-
|
|
11
|
-
配置继续保存到宿主提供的 profile ConfigForms,不另建数据库。工具和提示词覆盖都属于当前预设,“保存此预设”只提交当前目标,切换时保留其它预设草稿。运行偏好另行保存。所有保存均检查首次编辑基线,并发修改被拒绝后保留草稿;退出页面仍会丢弃未保存的编辑。
|
|
7
|
+
打开 **设置 → 内置插件 → Codex Harness**。页面分为“预设方案”和“运行偏好”:前者管理当前选中预设的工具控制(启用 / 替换 / 延迟 / 隐藏)、提示词覆盖与只读原始 YAML;后者编辑当前配置环境共享的模型请求与显示偏好。插件详情仅提供摘要和设置路径,不再复制另一套完整表单。
|
|
12
8
|
|
|
13
9
|
## 原始定义只读,提示词覆盖可编辑
|
|
14
10
|
|
|
15
11
|
当前 `agentPresets` 服务提供声明列表和 YAML 查看,不提供目录路径、复制或删除接口。因此,本插件不把原生预设伪装成可写源文件,也不为只读声明提供假保存或复制操作。
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
“提示词”子视图读取当前预设原有的指令段。可核验的原生身份前缀/后缀和 Codex 操作指南支持独立覆盖;无法确认来源、完整性或覆盖语义的其它段只读。不会把 YAML 标签或表达式当正文,更不会给非 Codex 预设填入一份共享 Codex 模板。
|
|
18
14
|
|
|
19
15
|
修改存到该预设的 `promptOverrides`,不写原始定义。每段“恢复原始”只移除对应覆盖;工具配置、其它指令段和其它预设不变。覆盖在新建或重载 Agent 时按快照加载,保留原有 complete、插值和位置语义,不替换工具声明或宿主运行约束。
|
|
20
16
|
|
|
@@ -24,9 +20,9 @@
|
|
|
24
20
|
|
|
25
21
|
## 本仓库的声明来源
|
|
26
22
|
|
|
27
|
-
- [原始组合](../presets/codex-
|
|
28
|
-
- [适配器](../src/desktop-preset.ts) 转换旧工作流名称、子代理配置,并移除已退役的 `list-agents` 子路径;不会执行 YAML 中的 `!!js`。
|
|
29
|
-
- [生成脚本](../scripts/build-preset.mjs) 在构建时产生 [bundle patch](../cordis.patch.yml),其中的普通声明行 id 为 `preset-codex-
|
|
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`。
|
|
30
26
|
|
|
31
27
|
不要手动修改生成的 patch,也不要直接改安装目录或 profile。通过 bundle 覆盖声明时,`config` 是完整替换,必须保留所需的 `id`、名称、说明及完整 `plugins` 列表。服务提供者和消费者的隔离组应保持完整。
|
|
32
28
|
|
|
@@ -35,5 +31,3 @@
|
|
|
35
31
|
历史版本曾使用 `$DSH_HOME/.agent-presets/<id>/` 中的 `preset.yml` 和 `agent.cordis.yml`。当前宿主不再读取这个目录,本插件也不会在启动时覆盖、迁移或删除它。
|
|
36
32
|
|
|
37
33
|
如需迁移自定义内容,先备份旧目录,再通过 Creator/自定义 bundle 将元数据和插件列表迁成普通预设声明,检查插件名称和 Config 是否符合当前宿主接口。不要仅把目录复制到新安装中;也不要用版本豁免加载旧插件。
|
|
38
|
-
|
|
39
|
-
[旧编辑服务](../src/preset-editor.ts) 的目录写入兼容代码仍保留,以便维护历史行为测试;在当前只读服务上,这些操作明确拒绝,且不会触碰文件系统。
|