@shuind/dsh-codex-harness 0.2.20 → 0.2.32-dsh-v0.2.2-rc.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 +121 -0
- package/README.md +48 -38
- package/RELEASE.md +61 -0
- package/assets/codex.svg +5 -0
- package/cordis.patch.yml +150 -6
- package/docs/preset-library.md +39 -23
- package/docs/tool-policy-benchmark.json +310 -0
- package/docs/tool-policy.md +144 -0
- package/lib/client.js +1663 -119
- package/lib/compaction.js +17 -2
- package/lib/index.js +801 -190
- package/lib/installer.js +50 -6
- package/lib/preferences.js +111 -0
- package/lib/tool-policy.js +2235 -0
- package/lib/typert.js +57 -10
- package/lib/types/activity.d.ts +1 -1
- package/lib/types/activity.js +50 -14
- package/lib/types/client/activity.d.ts +33 -9
- package/lib/types/client/desktop.d.ts +43 -0
- package/lib/types/client/desktop.js +121 -0
- package/lib/types/client/entry.d.ts +10 -0
- package/lib/types/client/entry.js +12 -0
- package/lib/types/client/index.d.ts +109 -19
- package/lib/types/client/index.js +52 -45
- package/lib/types/client/policy-drafts.d.ts +25 -0
- package/lib/types/client/policy-drafts.js +47 -0
- package/lib/types/client/preset-copy.d.ts +1 -0
- package/lib/types/client/preset-copy.js +2 -0
- package/lib/types/client/preset-manager.d.ts +12 -2
- package/lib/types/client/preset-manager.js +70 -25
- package/lib/types/client/preset-requests.d.ts +12 -0
- package/lib/types/client/preset-requests.js +101 -0
- package/lib/types/client/session.d.ts +6 -0
- package/lib/types/client/session.js +9 -0
- package/lib/types/client/tool-policy.d.ts +120 -0
- package/lib/types/client/tool-policy.js +394 -0
- package/lib/types/compaction.d.ts +3 -3
- package/lib/types/compaction.js +6 -2
- package/lib/types/desktop-preset.d.ts +20 -0
- package/lib/types/desktop-preset.js +39 -0
- package/lib/types/exec.d.ts +4 -0
- package/lib/types/exec.js +192 -66
- package/lib/types/host-settings.d.ts +4 -0
- package/lib/types/host-settings.js +13 -0
- package/lib/types/index.d.ts +20 -2
- package/lib/types/index.js +183 -70
- package/lib/types/installer.js +11 -2
- package/lib/types/preferences.d.ts +11 -0
- package/lib/types/preferences.js +16 -0
- package/lib/types/preset-editor-remote.d.ts +2 -0
- package/lib/types/preset-editor-remote.js +6 -2
- package/lib/types/preset-editor.d.ts +12 -7
- package/lib/types/preset-editor.js +43 -13
- package/lib/types/preset-prompt-catalog-schema.d.ts +16 -0
- package/lib/types/preset-prompt-catalog-schema.js +11 -0
- package/lib/types/preset-prompt-catalog.d.ts +21 -0
- package/lib/types/preset-prompt-catalog.js +192 -0
- package/lib/types/preset-prompt-contract.d.ts +22 -0
- package/lib/types/preset-prompt-contract.js +3 -0
- package/lib/types/preset-tool-catalog-schema.d.ts +38 -0
- package/lib/types/preset-tool-catalog-schema.js +28 -0
- package/lib/types/preset-tool-catalog.d.ts +5 -0
- package/lib/types/preset-tool-catalog.js +51 -0
- package/lib/types/prompt-sections.d.ts +1 -1
- package/lib/types/prompt-sections.js +9 -3
- package/lib/types/prompt.js +4 -2
- package/lib/types/remote.js +23 -8
- package/lib/types/settings.d.ts +3 -3
- package/lib/types/settings.js +3 -3
- package/lib/types/tool-capabilities.d.ts +32 -0
- package/lib/types/tool-capabilities.js +42 -0
- package/lib/types/tool-policy-contract.d.ts +60 -0
- package/lib/types/tool-policy-contract.js +26 -0
- package/lib/types/tool-policy.d.ts +171 -0
- package/lib/types/tool-policy.js +367 -0
- package/lib/types/typert.host.d.ts +2 -2
- package/lib/types/typert.host.js +12 -2
- package/locale/en.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 +368 -292
- package/scripts/benchmark-tool-policy.mjs +186 -0
- package/scripts/build-preset.mjs +19 -0
- package/scripts/clean-build.mjs +11 -0
- package/src/activity-types.ts +7 -0
- package/src/activity.ts +158 -0
- package/src/client/activity.ts +82 -0
- package/src/client/desktop.tsx +162 -0
- package/src/client/entry.tsx +16 -0
- package/src/client/index.tsx +972 -0
- package/src/client/policy-drafts.ts +56 -0
- package/src/client/preset-copy.ts +83 -0
- package/src/client/preset-manager.tsx +281 -0
- package/src/client/preset-requests.ts +113 -0
- package/src/client/session.ts +11 -0
- package/src/client/tool-policy.tsx +380 -0
- package/src/compact-command.ts +112 -0
- package/src/compaction.ts +190 -0
- package/src/context.ts +15 -0
- package/src/desktop-preset.ts +55 -0
- package/src/exec.ts +570 -0
- package/src/host-settings.ts +17 -0
- package/src/index.ts +1097 -0
- package/src/installer.ts +172 -0
- package/src/invariant.ts +34 -0
- package/src/patch.ts +258 -0
- package/src/preferences.ts +17 -0
- package/src/preset-contract.ts +85 -0
- package/src/preset-editor-remote.ts +41 -0
- package/src/preset-editor.ts +502 -0
- package/src/preset-prompt-catalog-schema.ts +10 -0
- package/src/preset-prompt-catalog.ts +191 -0
- package/src/preset-prompt-contract.ts +21 -0
- package/src/preset-tool-catalog-schema.ts +28 -0
- package/src/preset-tool-catalog.ts +51 -0
- package/src/prompt-sections.ts +33 -0
- package/src/prompt.ts +62 -0
- package/src/remote.ts +748 -0
- package/src/settings.ts +79 -0
- package/src/tool-capabilities.ts +76 -0
- package/src/tool-policy-contract.ts +76 -0
- package/src/tool-policy.ts +388 -0
- package/src/typert.host.ts +119 -0
- package/tsconfig.json +29 -0
- package/tsdown.config.ts +110 -0
- package/lib/types/preset-templates.d.ts +0 -36
- package/lib/types/preset-templates.js +0 -12
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.32-dsh-v0.2.2-rc.1 (2026-11-13)
|
|
4
|
+
|
|
5
|
+
- 删除共享 Codex 模板编辑界面,改为跟随当前所选预设的提示词;工具与提示词使用同一份预设草稿和“保存此预设”,不再写入旧全局模板字段。
|
|
6
|
+
- 新增预设提示词只读目录及精确指令段覆盖;仅可核验的原生身份前缀/后缀与 Codex 操作指南可编辑,未知或无法安全覆盖的段保持只读,不把表达式或全局 Codex 默认当成其它预设原文。
|
|
7
|
+
- 按 Agent 规则快照注册同名作用域指令段,保留 complete/interpolate/顺序和双 owner 回收;清除覆盖恢复原始指令,不改原始预设声明、其它预设或宿主工具/权限规则。
|
|
8
|
+
- 旧共享模板数据后台兼容保留;无覆盖时不增加模型说明,不改变原有提示词内容。
|
|
9
|
+
|
|
10
|
+
## 0.2.31 (local, unpublished)
|
|
11
|
+
|
|
12
|
+
- 工具列表以实际工具标识为主标题,字号更大并加粗;中文仅作次要用途说明,不另起工具名。
|
|
13
|
+
- 待保存摘要直接列实际工具名,避免把中文用途当成名称;工具定义、执行和保存逻辑不变。
|
|
14
|
+
|
|
15
|
+
## 0.2.30 (local, unpublished)
|
|
16
|
+
|
|
17
|
+
- 删除运行偏好、工具方案及模板页的常驻解释性/教学式段落和对应中英文文案;作用范围、生效时间只保留简短标签,停用状态去掉说教说明,不留隐藏节点或占位。
|
|
18
|
+
- 设置控件、保存行为和所有后端逻辑保持不变。
|
|
19
|
+
|
|
20
|
+
## 0.2.29 (local, unpublished)
|
|
21
|
+
|
|
22
|
+
- 实际删除诊断入口、页面、模式、回调、状态、旧规则修复/原始名单编辑控件、专用样式及双语文案;不是隐藏入口或换名保留。
|
|
23
|
+
- 保留普通工具配置、当前预设保存、独立草稿、正常输入/保存校验,以及后台旧规则解析;不清除、不迁移、不重置用户旧数据。
|
|
24
|
+
- 仅调整客户端,不修改工具执行、权限、后端策略、提示词作用域或预设定义。
|
|
25
|
+
|
|
26
|
+
## 0.2.28 (local, unpublished)
|
|
27
|
+
|
|
28
|
+
- 设置页拆为“工具方案”和“运行偏好”,按实际工具分组、展示人类标签和变更摘要;逐工具选择保留,普通页不再出现全局工具总闸或兼容字段。
|
|
29
|
+
- 工具方案只保存当前预设,切换保留独立草稿,自己的成功提交仅在基线可证明未变时更新其它草稿版本;外部并发冲突拒绝并保稿。
|
|
30
|
+
- 旧规则、共享 Codex 模板和原始预设定义移入高级诊断,定义跟随当前预设只读;插件详情只作摘要,不再复制完整编辑器。
|
|
31
|
+
- 以 Agent 快照内的预设策略统一 Codex 工具准入,明确选择不再被旧共享开关二次否决;旧关闭作为兼容基线保留,原预设局部禁用及宿主权限不可越过,不写入或重置 profile 旧数据。
|
|
32
|
+
- 不新增 PTC、Ops 或执行工具,不改底层 shell、文件、审批和沙箱执行管线。
|
|
33
|
+
|
|
34
|
+
## 0.2.27 (local, unpublished)
|
|
35
|
+
|
|
36
|
+
- 按所选 preset 读取实际注册工具,逐项选择保留、隐藏或已实现的替代方案;去掉执行/计划总开关,支持搜索和筛选。
|
|
37
|
+
- 新增逐工具 `tools` 规则:明确选择优先于本规则的旧 allow/deny 与大类默认;旧配置不迁移,新界面新规则不联动其它工具。
|
|
38
|
+
- 工具目录通过预设 revision lease 与只读子作用域读取,不创建 Agent、不执行工具或激活条件;条件工具、目标名冲突和未适配工具不开放替换。
|
|
39
|
+
- 保留原有审批、单次沙箱策略、Agent 快照及双 owner 清理,补充独立源工具、目录隔离与回收、真实 Remote 保存回归。
|
|
40
|
+
|
|
41
|
+
## 0.2.26 (local, unpublished)
|
|
42
|
+
|
|
43
|
+
- 将设置页改为按 preset 切换的单编辑器:启用覆盖、执行/计划接口、保存;不再展开所有规则或重复显示 ID 输入。
|
|
44
|
+
- 精简常驻说明,工具裁剪、全局选项、提示词和源码按需展开;统一卡片、控件、间距与公开主题 token。
|
|
45
|
+
- 保留跨 preset 草稿、首次编辑 revision、空 allowlist 与未知 preset;不修改后端 schema 或迁移已有配置。
|
|
46
|
+
|
|
47
|
+
## 0.2.25 (local, unpublished)
|
|
48
|
+
|
|
49
|
+
- 在“设置 → 内置插件”中增加与 Codex Connect 并列的 Codex Harness 独立标签,工具规则置顶,预设声明作为折叠的只读参考。
|
|
50
|
+
- 工具规则可从现有预设目录选择真实 ID,保留自定义 ID 手动输入;目录失败可重试,不轮询、不妨碍现有规则编辑。
|
|
51
|
+
- 新标签与原插件详情页共用 ConfigForms、保存队列、配置命名空间和 revision 检查;不迁移或重置已保存设置,不改变 Codex Connect。
|
|
52
|
+
- 不修改 Host 工具覆盖、审批、文件工具或 Agent 规则快照语义;插件列表继续如实显示内部组件的运行诊断。
|
|
53
|
+
|
|
54
|
+
## 0.2.24 (local, unpublished)
|
|
55
|
+
|
|
56
|
+
- 新增独立的跨预设工具覆盖插件:在 Agent 子作用域按 preset ID 应用 allow/deny,并替换已有的原生执行与计划工具;保留 Persona、源预设和原生文件定义。
|
|
57
|
+
- 新增插件详情页规则编辑卡:显式空 allowlist、首编辑 revision 保存、并发拒绝留草稿、volatile 更新及新 Agent 规则快照。
|
|
58
|
+
- 限制替换范围,明确拒绝 conditional source、Agent 自身工具、未知名单和目标名称碰撞;支持空白会话预设切换及双 owner 清理。
|
|
59
|
+
- 补齐执行工具的宿主审批参数、单次升级策略、沙箱拒绝/runner 失败标记;不再吞掉 ShellExecution.result() 的基础设施错误。
|
|
60
|
+
- 当前宿主不再广告逐次 shell/login 参数;补充真实 Responses parser → Native 执行器 → 官方文件工具的成功、失败与结果回放测试。
|
|
61
|
+
- 新增可复现工具 schema/reference tokenizer、筛选、组装、调度与新 Agent 覆盖成本基准;不把离线微基准等同于模型端到端提速。
|
|
62
|
+
|
|
63
|
+
## 0.2.23 (local, unpublished)
|
|
64
|
+
|
|
65
|
+
- 适配当前 DeepSeek Harness `0.2.2-rc.1`,更新并锁定 Cordis、Host 与 Client 开发依赖;不再声明未经本轮验证的旧宿主版本兼容性。
|
|
66
|
+
- 将 Codex 模式改为普通 `dsh-agent-preset` bundle 声明,构建时生成 patch;使用当前工作流和子代理配置,不再自动修改旧预设目录。
|
|
67
|
+
- 适配异步 `shell.execute`、基于 SessionId 的后台任务输出、实时工作目录和 `fs.deleteFile`/删除意图检查。
|
|
68
|
+
- 通过工具注册条件应用能力开关,兼容不含 tools 的提示词 presentation;修复当前 tool/developer 消息的 Responses 转换和上下文压缩参数。
|
|
69
|
+
- 适配当前会话流记录及投影注册,避免在 Session publication 过程中嵌套写入上下文事件。
|
|
70
|
+
- 将设置页挂到 bundle 详情槽位,移除退役 Client API 依赖;保存时传递初次编辑 revision,拒绝覆盖并发修改。
|
|
71
|
+
- 补充当前 Loader、预设注册表、工具执行器和 Client ConfigForms 的 keyless 集成测试,以及中英文显示元数据和原创图标。
|
|
72
|
+
|
|
73
|
+
## 0.2.22 (local, unpublished)
|
|
74
|
+
|
|
75
|
+
- 兼容桌面端 `0.2.0-rc.2` 的原生预设注册、ConfigForms 设置和插件页面,保留 Web `0.1.5-rc.2` 接口。
|
|
76
|
+
- 将桌面 Codex 提示词、Fast、上下文容量和能力开关接入 profile 持久化配置;原生只读预设可查看,不能误写为文件预设。
|
|
77
|
+
- 适配新版 Persona 前缀及工作流执行器,避免在隔离的预设内重复注册宿主编辑服务。
|
|
78
|
+
- 修复终端等待定时器与中止监听器残留、清理后台进程时丢失已产生输出的问题。
|
|
79
|
+
- 修复预设列表刷新失败后的重试目标,并保护未保存的编辑。
|
|
80
|
+
|
|
81
|
+
## 0.2.20 - 2026-09-21
|
|
82
|
+
|
|
83
|
+
- 将 DSH 宿主声明限定为已验证的精确版本 `0.1.5-rc.2`,不再把未测试的更高版本标为兼容。
|
|
84
|
+
|
|
85
|
+
## 0.2.19 - 2026-09-21
|
|
86
|
+
|
|
87
|
+
- 在插件清单中声明最低 DSH 宿主版本 `>=0.1.5-rc.2`,让市场能够直接显示宿主要求并参与兼容性检查。
|
|
88
|
+
- 更新市场截图,改为当前的预设管理和 Codex 能力编辑界面。
|
|
89
|
+
|
|
90
|
+
## 0.2.18 - 2026-09-20
|
|
91
|
+
|
|
92
|
+
- 修复从没有 DSH Core 提示词的完整 Persona 创建 Codex 副本时,保存后自动补出源码和 Web 说明的问题。
|
|
93
|
+
- 保存时保留源预设的空提示词状态,避免预设编辑器把宿主默认段误显示为当前预设内容。
|
|
94
|
+
|
|
95
|
+
## 0.2.17 - 2026-09-20
|
|
96
|
+
|
|
97
|
+
- 简化为单页预设编辑:选择预设、修改名称和说明、按需加入 Codex、保存或另存副本。
|
|
98
|
+
- 移除列表中的逐项 YAML 读取与保存后的全量刷新;只在选择预设时加载内容,避免反复扫描目录。
|
|
99
|
+
|
|
100
|
+
- 支持普通预设的元数据和 Codex 能力转换,保存时检查版本冲突并保留备份,写入失败时回滚。
|
|
101
|
+
- 修复预设专用提示词被共享设置覆盖的问题,使用明确的 `presetPrompt` 优先级。
|
|
102
|
+
- 将托管网络搜索和远程上下文压缩归入 Codex 模式能力,活动状态保留为全局显示设置。
|
|
103
|
+
|
|
104
|
+
- 复制保留工具、插件、YAML 标签和其他配置;内置预设只读,用户预设通过锁定和原子写入保存。
|
|
105
|
+
- 修正设置卡片的宿主命名空间挂载:预设管理现在显示在 **插件配置 → Codex Harness** 卡片内,而不是注册到未提供的独立命名空间。
|
|
106
|
+
- 修正 Story 预设对宿主提示词区段的识别,避免把被 `clean-slate` 清除的 DSH Core 区段显示为可编辑内容。
|
|
107
|
+
- 让 Story 自动 Git 同步在无法获得一次性沙箱审批时降级为提示,不再阻断预设加载。
|
|
108
|
+
|
|
109
|
+
## 0.2.16 - 2026-09-20
|
|
110
|
+
|
|
111
|
+
- 发布统一层级的预设编辑器:Codex 模式与其它预设同级,内置预设通过副本编辑。
|
|
112
|
+
- 将 Codex 能力与全局活动状态分开,预设编辑器不再要求直接编辑 YAML。
|
|
113
|
+
|
|
114
|
+
## 0.2.15 - 2026-09-19
|
|
115
|
+
|
|
116
|
+
- 修复 Codex 预设与新版 `@deepseek-ai/dsh-persona` 的配置字段兼容性,使用 `prefix`。
|
|
117
|
+
- 自动迁移未修改过的旧 `text` 预设,并保留用户已经修改的预设。
|
|
118
|
+
- 记录最低宿主约束:`@deepseek-ai/dsh-persona >=0.1.3-alpha.2`。
|
|
119
|
+
- 补充旧预设迁移和用户修改保护的安装器回归测试。
|
|
120
|
+
- 固定 Corepack 使用的 pnpm 版本,并锁定兼容的本地压缩工具依赖,保证安装和发布流程可重复。
|
|
121
|
+
- 修正当前 DSH 客户端 overlay slot 的类型声明。
|
package/README.md
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
# @shuind/dsh-codex-harness
|
|
2
2
|
|
|
3
|
-
为
|
|
3
|
+
为 DeepSeek Harness 提供 Codex 编码预设、Responses 请求增强,以及按 preset 的工具方案和提示词覆盖。工具选择不改身份;明确编辑提示词时只覆盖该预设对应指令段,不修改源文件或其它预设。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
版本 `0.2.32-dsh-v0.2.2-rc.1` 适配 **DeepSeek Harness `0.2.2-rc.1`**。宿主和 Cordis 开发依赖均锁定到当前接口;旧版宿主请保留原插件版本,不要用版本豁免强行加载。
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 安装
|
|
8
8
|
|
|
9
|
-
-
|
|
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 实现。
|
|
9
|
+
在 Harness 的 **插件 → 添加插件** 中输入 `@shuind/dsh-codex-harness@0.2.32-dsh-v0.2.2-rc.1`,按结果提示手动重启 Harness。发布不会自动更新正在运行的插件。
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
### 从源码构建安装
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
1. 在本仓库完成下方构建、检查和打包,得到 `shuind-dsh-codex-harness-0.2.32-dsh-v0.2.2-rc.1.tgz`。
|
|
14
|
+
2. 在当前 Harness 的 **插件 → 添加插件** 中输入这个压缩包的绝对路径,确认安装。
|
|
15
|
+
3. 按安装结果提示操作;升级已有插件通常需要手动重启 Harness。
|
|
16
|
+
4. 打开 **设置 → 内置插件 → Codex Harness → 工具方案**,选择预设,调整具体工具并“保存此预设”;新建或重载目标 Agent 后生效。“运行偏好”单独管理本环境共享的请求和显示设置。独立的 Codex 模式仍可从 Agent 预设选择。
|
|
17
|
+
|
|
18
|
+
桌面端请使用桌面应用的插件页面,不要用 PATH 中另一份旧版 `dsh` 修改保留的 `desktop` profile。源码修改和重新构建不会自动更新正在运行的桌面应用。构建和打包不会发布到 npm;正式发布也不会自动安装插件或重启服务。
|
|
19
|
+
|
|
20
|
+
## 功能
|
|
21
|
+
|
|
22
|
+
- `exec_command`、`write_stdin`、`apply_patch` 和 `update_plan`,沿用宿主的文件系统、沙箱、终端和后台任务能力。
|
|
23
|
+
- **设置 → 内置插件 → Codex Harness** 分为按预设的“工具方案”和本环境共享的“运行偏好”;保存时检查编辑起始版本,拒绝覆盖并发修改。高级页提供逐工具详情、当前预设提示词和只读原始定义;共享模板编辑器及诊断功能已删除。
|
|
24
|
+
- GPT Responses 路由支持原生 `apply_patch`、托管网络搜索和远程压缩;不支持时回退到宿主实现。非 GPT 路由不附加 Fast 或 GPT 容量字段。
|
|
25
|
+
- 保留官方技能、计划模式、子代理、模型发现、工作流、用户提问和任务列表。
|
|
26
|
+
- 显示模型请求、回复和上下文压缩状态;持久化状态适配当前的会话流记录。
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
## 给其它 preset 裁剪、替换工具
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
在 Codex Harness 独立标签中,选择 preset 后会读取其已注册的具体工具;每行独立选择保留、隐藏或已实现的替代,不再使用执行/计划总开关。`bash/pwsh` 可选择 `exec_command + write_stdin`,`todo_write` 可选择 `update_plan`;其它工具没有适配器时只提供保留/隐藏。默认保留原生文件读取、搜索与修改工具,不复制或覆写目标预设。规则保存 live 更新,只影响随后创建的 Agent;当前已加载的 Agent 使用原规则快照。
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
`@deepseek-ai/dsh-persona >=0.1.3-alpha.2`;当前的 DSH `0.1.5-rc.2` 满足此要求。
|
|
29
|
-
更早的 persona 版本只接受 `text`,会在加载预设时报告缺少 `prefix`。
|
|
32
|
+
“内置插件 → 插件列表”是只读运行组件清单,会列出本包的设置、覆盖、预设声明和客户端组件;它们不是四个独立安装包,也不需要逐项配置。普通编辑只在相邻的 **Codex Harness** 标签完成,插件详情保留摘要与进入设置的路径。旧字段由兼容层读取,不要求用户再配置一遍,也不在安装时重置旧数据。
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
`0.1.5-rc.2`。较旧宿主仍可加载 Codex 工具层,但不会注册预设编辑入口。
|
|
34
|
+
空 allowlist 与未启用 allowlist 不相同;掩码不是权限隔离,不能把隐藏文件写入工具当作禁止命令写文件。详情、配置示例、生命周期和性能边界见 [工具覆盖说明](docs/tool-policy.md)。
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
## 当前宿主的预设机制
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
需要手动迁移:先备份 `$DSH_HOME/.agent-presets/codex-collaboration`,再打开其中的
|
|
38
|
-
`agent.cordis.yml`,将 `@deepseek-ai/dsh-persona` 配置下的 `text:` 改为 `prefix:`,
|
|
39
|
-
保留后面的提示词内容,然后重启 DSH 并重新选择 Codex 模式。若预设没有该管理标记,
|
|
40
|
-
也应按同样步骤迁移;不要覆盖已有的自定义提示词。
|
|
38
|
+
插件通过普通的 `@deepseek-ai/dsh-agent-preset` 声明注册 **Codex 模式**,Loader 行 id 为 `preset-codex-collaboration`,会话中的预设 id 为 `codex-collaboration`。不再在启动时复制、升级或删除 `$DSH_HOME/.agent-presets` 下的目录,因此已有自定义预设和提示词文件保持不变。
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
当前宿主的预设服务只提供声明查看,不提供目录式复制和写入。原始定义仍只读;“预设提示词”通过本插件保存该预设独立的指令段覆盖,不修改源 YAML,也不编辑其它预设。旧共享模板仅后台兼容,不再提供共享编辑器。需要定制预设组成时,使用 Harness 的 Creator/自定义 bundle;不要直接编辑已安装运行时或 profile 文件。更多说明见 [预设说明](docs/preset-library.md)。
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
已有会话保留启动时选择的预设修订。升级或修改预设组成后,应创建新会话;不要把插件安装成功等同于旧会话已换用新工具。
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
## 模型
|
|
45
|
+
|
|
46
|
+
通用工具可随宿主模型使用。要使用 GPT 专属增强,在宿主模型设置中配置 OpenAI Responses provider、endpoint、API key 和模型,例如:
|
|
47
47
|
|
|
48
48
|
```yaml
|
|
49
49
|
api: openai-responses
|
|
@@ -51,19 +51,29 @@ baseURL: https://your-responses-endpoint.example.com
|
|
|
51
51
|
apiKeyEnv: OPENAI_API_KEY
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
也可配合 [dsh-codex-connect](https://github.com/shuind/dsh-codex-connect) 使用 ChatGPT 订阅模型。
|
|
55
|
+
|
|
56
|
+
- **Fast**:开启后,GPT Responses 请求使用 `service_tier: "priority"`。
|
|
57
|
+
- **上下文容量**:支持 `1K`–`1000K` tokens,后续请求的上下文显示与压缩使用该设置。
|
|
55
58
|
|
|
56
|
-
|
|
59
|
+
## 开发与验证
|
|
57
60
|
|
|
58
|
-
|
|
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
|
+
```
|
|
59
70
|
|
|
60
|
-
|
|
71
|
+
构建从 [原始预设](presets/codex-collaboration/agent.cordis.yml) 经 [当前接口适配器](src/desktop-preset.ts) 生成 [bundle patch](cordis.patch.yml)。请编辑源文件,不要手改生成结果。原始目录格式只供旧安装器兼容代码使用;发布的 patch 使用当前的工作流和子代理配置,不包含已移除的子路径。
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
测试包括工具/沙箱调用、请求与压缩、设置冲突,以及当前真实 Cordis Loader、预设注册表、工具执行器和 Client ConfigForms 的集成。先构建再测试,以覆盖发布入口;这些 keyless 测试不发送真实付费模型请求,也不操作当前 profile。
|
|
63
74
|
|
|
64
|
-
|
|
65
|
-
- **上下文容量**:点击输入栏旁的上下文用量指示器,可设置 `1K`–`1000K` tokens;下一次请求和自动压缩使用该值。
|
|
75
|
+
发布约束见 [发布说明](RELEASE.md)。
|
|
66
76
|
|
|
67
77
|
## License
|
|
68
78
|
|
|
69
|
-
MIT
|
|
79
|
+
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.2.32-dsh-v0.2.2-rc.1` release targets Harness `0.2.2-rc.1`. 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,155 @@
|
|
|
1
|
+
# Generated by scripts/build-preset.mjs; edit presets/codex-collaboration or src/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-collaboration
|
|
10
|
+
name: "@deepseek-ai/dsh-agent-preset"
|
|
11
|
+
config:
|
|
12
|
+
name: Codex 模式
|
|
13
|
+
description: 使用可自定义提示词与 Codex 工具的编码 Agent。
|
|
14
|
+
order: 5
|
|
15
|
+
id: codex-collaboration
|
|
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. Your working directory is {{cwd}}.
|
|
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: false
|
|
40
|
+
- id: codex-terminal
|
|
41
|
+
name: cordis:group
|
|
42
|
+
group: true
|
|
43
|
+
isolate:
|
|
44
|
+
terminals: true
|
|
45
|
+
config:
|
|
46
|
+
- id: terminals
|
|
47
|
+
name: "@deepseek-ai/dsh-terminal"
|
|
48
|
+
- id: terminal-bash
|
|
49
|
+
name: "@deepseek-ai/dsh-terminal-bash"
|
|
50
|
+
disabled:
|
|
51
|
+
__jsExpr: process.platform === 'win32'
|
|
52
|
+
config:
|
|
53
|
+
timeoutMs: 300000
|
|
54
|
+
- id: compaction
|
|
55
|
+
name: cordis:group
|
|
56
|
+
group: true
|
|
57
|
+
isolate:
|
|
58
|
+
compaction: true
|
|
59
|
+
toolResultPruner: true
|
|
60
|
+
config:
|
|
61
|
+
- id: compaction-basic
|
|
62
|
+
name: "@shuind/dsh-codex-harness/compaction"
|
|
63
|
+
config:
|
|
64
|
+
thresholdRatio: 0.95
|
|
65
|
+
- id: command-compact
|
|
66
|
+
name: "@shuind/dsh-codex-harness/compact-command"
|
|
67
|
+
- id: tool-result-pruner
|
|
68
|
+
name: "@deepseek-ai/dsh-compaction-tool-result-pruner"
|
|
69
|
+
config:
|
|
70
|
+
thresholdChars: 8192
|
|
71
|
+
headChars: 4096
|
|
72
|
+
tailChars: 1024
|
|
73
|
+
- id: skill-filesystem
|
|
74
|
+
name: "@deepseek-ai/dsh-skill-filesystem"
|
|
75
|
+
- id: tool-skill
|
|
76
|
+
name: "@deepseek-ai/dsh-tool-skill"
|
|
77
|
+
- id: tool-goal
|
|
78
|
+
name: "@deepseek-ai/dsh-tool-goal"
|
|
79
|
+
- id: planning
|
|
80
|
+
name: cordis:group
|
|
81
|
+
group: true
|
|
82
|
+
isolate:
|
|
83
|
+
planMode: true
|
|
84
|
+
config:
|
|
85
|
+
- id: plan-mode
|
|
86
|
+
name: "@deepseek-ai/dsh-plan-mode"
|
|
87
|
+
config:
|
|
88
|
+
section: |
|
|
89
|
+
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.
|
|
90
|
+
|
|
91
|
+
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.
|
|
92
|
+
|
|
93
|
+
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.
|
|
94
|
+
|
|
95
|
+
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.
|
|
96
|
+
|
|
97
|
+
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.
|
|
98
|
+
|
|
99
|
+
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.
|
|
100
|
+
- id: delegation
|
|
101
|
+
name: cordis:group
|
|
102
|
+
group: true
|
|
103
|
+
isolate:
|
|
104
|
+
workflowEngine: true
|
|
105
|
+
config:
|
|
106
|
+
- id: tool-subagent-control
|
|
107
|
+
name: "@deepseek-ai/dsh-tool-subagent-control"
|
|
108
|
+
- id: tool-subagent
|
|
109
|
+
name: "@deepseek-ai/dsh-tool-subagent"
|
|
110
|
+
config:
|
|
111
|
+
provider: spawn
|
|
112
|
+
toolName: subagent
|
|
113
|
+
modelSelection: true
|
|
114
|
+
modelDiscovery: true
|
|
115
|
+
- id: tool-subagent-fork
|
|
116
|
+
name: "@deepseek-ai/dsh-tool-subagent"
|
|
117
|
+
config:
|
|
118
|
+
provider: fork
|
|
119
|
+
toolName: subagent_fork
|
|
120
|
+
- id: tool-subagent-codex
|
|
121
|
+
name: "@deepseek-ai/dsh-tool-subagent"
|
|
122
|
+
disabled: true
|
|
123
|
+
config:
|
|
124
|
+
provider: codex
|
|
125
|
+
toolName: subagent_codex
|
|
126
|
+
maxDepth: provider-managed
|
|
127
|
+
- id: tool-subagent-claude-code
|
|
128
|
+
name: "@deepseek-ai/dsh-tool-subagent"
|
|
129
|
+
disabled: true
|
|
130
|
+
config:
|
|
131
|
+
provider: claude-code
|
|
132
|
+
toolName: subagent_claude_code
|
|
133
|
+
maxDepth: provider-managed
|
|
134
|
+
- id: workflow-worker-thread
|
|
135
|
+
name: "@deepseek-ai/dsh-workflow-ptc"
|
|
136
|
+
config:
|
|
137
|
+
provider: spawn
|
|
138
|
+
- id: tool-workflow
|
|
139
|
+
name: "@deepseek-ai/dsh-tool-workflow"
|
|
140
|
+
- id: tool-ralph
|
|
141
|
+
name: "@deepseek-ai/dsh-tool-ralph"
|
|
142
|
+
config:
|
|
143
|
+
subagentProvider: spawn
|
|
144
|
+
maxRounds: 64
|
|
145
|
+
- id: tool-ask-user
|
|
146
|
+
name: "@deepseek-ai/dsh-tool-ask-user"
|
|
147
|
+
- id: tool-todo
|
|
148
|
+
name: "@deepseek-ai/dsh-tool-todo"
|
|
149
|
+
config:
|
|
150
|
+
allowParallelInProgress: true
|
|
7
151
|
- id: codex-client
|
|
8
|
-
name:
|
|
152
|
+
name: "@shuind/dsh-codex-harness"
|
|
9
153
|
config:
|
|
10
154
|
globalEnhancements: true
|
|
11
155
|
codexCore: false
|
package/docs/preset-library.md
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
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.2.32-dsh-v0.2.2-rc.1` 和 DeepSeek Harness `0.2.2-rc.1`。
|
|
4
|
+
|
|
5
|
+
## 当前入口
|
|
6
|
+
|
|
7
|
+
打开 **设置 → 内置插件 → Codex Harness**。常用页分为“工具方案”和“运行偏好”:前者只编辑选中预设的工具,后者编辑当前配置环境共享的模型请求与显示偏好。插件详情仅提供摘要和设置路径,不再复制另一套完整表单。
|
|
8
|
+
|
|
9
|
+
“高级”提供逐工具详情、当前预设的“预设提示词”,以及“原始预设定义(只读)”。提示词与工具方案共用当前选中预设和草稿,切换预设不会改成编辑共享 Codex 模板。诊断页面和旧规则编辑功能已删除。原始定义仍只读,没有另一份选择器或写入源 YAML 的假保存操作。
|
|
10
|
+
|
|
11
|
+
配置继续保存到宿主提供的 profile ConfigForms,不另建数据库。工具和提示词覆盖都属于当前预设,“保存此预设”只提交当前目标,切换时保留其它预设草稿。运行偏好另行保存。所有保存均检查首次编辑基线,并发修改被拒绝后保留草稿;退出页面仍会丢弃未保存的编辑。
|
|
12
|
+
|
|
13
|
+
## 原始定义只读,提示词覆盖可编辑
|
|
14
|
+
|
|
15
|
+
当前 `agentPresets` 服务提供声明列表和 YAML 查看,不提供目录路径、复制或删除接口。因此,本插件不把原生预设伪装成可写源文件,也不为只读声明提供假保存或复制操作。
|
|
16
|
+
|
|
17
|
+
“预设提示词”读取当前预设原有的指令段。可核验的原生身份前缀/后缀和 Codex 操作指南支持独立覆盖;无法确认来源、完整性或覆盖语义的其它段只读。不会把 YAML 标签或表达式当正文,更不会给非 Codex 预设填入一份共享 Codex 模板。
|
|
18
|
+
|
|
19
|
+
修改存到该预设的 `promptOverrides`,不写原始定义。每段“恢复原始”只移除对应覆盖;工具配置、其它指令段和其它预设不变。覆盖在新建或重载 Agent 时按快照加载,保留原有 complete、插值和位置语义,不替换工具声明或宿主运行约束。
|
|
20
|
+
|
|
21
|
+
旧共享模板数据保留后台兼容;没有独立覆盖的预设维持原来的指令,不自动迁移成每个预设一份,也没有共享模板编辑页面。需要改变插件组成时,仍使用 Harness 的 Creator/自定义 bundle。
|
|
22
|
+
|
|
23
|
+
工具选择与执行/计划替换同样无需修改预设声明,详见 [跨预设工具覆盖](tool-policy.md)。工具选择本身不改身份指令;提示词仅在用户明确编辑该预设对应段时覆盖。
|
|
24
|
+
|
|
25
|
+
## 本仓库的声明来源
|
|
26
|
+
|
|
27
|
+
- [原始组合](../presets/codex-collaboration/agent.cordis.yml) 保存预设的工具和提示词配置。
|
|
28
|
+
- [适配器](../src/desktop-preset.ts) 转换旧工作流名称、子代理配置,并移除已退役的 `list-agents` 子路径;不会执行 YAML 中的 `!!js`。
|
|
29
|
+
- [生成脚本](../scripts/build-preset.mjs) 在构建时产生 [bundle patch](../cordis.patch.yml),其中的普通声明行 id 为 `preset-codex-collaboration`,会话预设 id 为 `codex-collaboration`。
|
|
30
|
+
|
|
31
|
+
不要手动修改生成的 patch,也不要直接改安装目录或 profile。通过 bundle 覆盖声明时,`config` 是完整替换,必须保留所需的 `id`、名称、说明及完整 `plugins` 列表。服务提供者和消费者的隔离组应保持完整。
|
|
32
|
+
|
|
33
|
+
## 旧目录预设
|
|
34
|
+
|
|
35
|
+
历史版本曾使用 `$DSH_HOME/.agent-presets/<id>/` 中的 `preset.yml` 和 `agent.cordis.yml`。当前宿主不再读取这个目录,本插件也不会在启动时覆盖、迁移或删除它。
|
|
36
|
+
|
|
37
|
+
如需迁移自定义内容,先备份旧目录,再通过 Creator/自定义 bundle 将元数据和插件列表迁成普通预设声明,检查插件名称和 Config 是否符合当前宿主接口。不要仅把目录复制到新安装中;也不要用版本豁免加载旧插件。
|
|
38
|
+
|
|
39
|
+
[旧编辑服务](../src/preset-editor.ts) 的目录写入兼容代码仍保留,以便维护历史行为测试;在当前只读服务上,这些操作明确拒绝,且不会触碰文件系统。
|