@ran-sh/dsh-crew 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/.claude-plugin/marketplace.json +17 -17
  2. package/.claude-plugin/plugin.json +8 -8
  3. package/.mcp.json +8 -8
  4. package/LICENSE +21 -21
  5. package/README.de.md +359 -359
  6. package/README.es.md +359 -359
  7. package/README.fr.md +359 -359
  8. package/README.hi.md +359 -359
  9. package/README.id.md +359 -359
  10. package/README.ja.md +359 -359
  11. package/README.ko.md +359 -359
  12. package/README.md +140 -360
  13. package/README.pt.md +359 -359
  14. package/README.ru.md +359 -359
  15. package/README.th.md +359 -359
  16. package/README.tr.md +359 -359
  17. package/README.vi.md +359 -359
  18. package/README.zh-TW.md +359 -359
  19. package/README.zh.md +140 -305
  20. package/agents/ds-flash.md +26 -26
  21. package/agents/ds-pro.md +32 -32
  22. package/agents/ds-reviewer.md +23 -23
  23. package/agents/ds-worker.md +22 -22
  24. package/codex/agents/ds-flash.toml +30 -30
  25. package/codex/agents/ds-pro.toml +31 -31
  26. package/codex/agents/ds-reviewer.toml +28 -28
  27. package/codex/agents/ds-worker.toml +28 -28
  28. package/codex/prompts/dsh-config.md +3 -3
  29. package/codex/prompts/dsh-status.md +1 -1
  30. package/commands/config.md +11 -11
  31. package/commands/off.md +5 -5
  32. package/commands/on.md +5 -5
  33. package/commands/status.md +5 -5
  34. package/cordis.patch.yml +4 -4
  35. package/lib/client.js +2765 -2765
  36. package/package.json +127 -125
  37. package/scripts/build-client.mjs +28 -28
  38. package/scripts/live-crew-smoke.mjs +39 -39
  39. package/scripts/live-policy-matrix.mjs +177 -177
  40. package/scripts/policy-probe.mjs +101 -101
  41. package/scripts/setup.mjs +295 -294
  42. package/scripts/smoke-real.mjs +110 -110
  43. package/scripts/smoke.mjs +78 -78
  44. package/scripts/verify-installer-fix.mjs +26 -26
  45. package/scripts/verify-npm-install.mjs +297 -0
  46. package/src/adaptive-routing.mjs +260 -260
  47. package/src/client/activation-summary.tsx +64 -64
  48. package/src/client/entry.tsx +236 -236
  49. package/src/client/index.tsx +1120 -1120
  50. package/src/config-readiness.mjs +59 -59
  51. package/src/delivery.mjs +205 -205
  52. package/src/dsh-cli-runtime.mjs +435 -251
  53. package/src/failure-classification.mjs +172 -172
  54. package/src/hub/entry.mjs +98 -98
  55. package/src/hub-client.mjs +132 -132
  56. package/src/hub-compatibility.mjs +49 -49
  57. package/src/i18n.mjs +19 -19
  58. package/src/install/cli.mjs +28 -28
  59. package/src/install/install-legacy.mjs +460 -460
  60. package/src/install/install.mjs +451 -451
  61. package/src/mcp-runtime.mjs +257 -257
  62. package/src/model-catalog.mjs +173 -173
  63. package/src/model-routing.mjs +391 -391
  64. package/src/policy.mjs +197 -197
  65. package/src/readiness-matrix.mjs +169 -169
  66. package/src/runtime-controls.mjs +90 -90
  67. package/src/runtime-identity.mjs +108 -108
  68. package/src/server.mjs +477 -477
  69. package/src/status-shard.mjs +52 -52
  70. package/src/structured-error-code.mjs +38 -38
  71. package/src/vision-route.mjs +138 -138
  72. package/src/workflow-runtime.mjs +573 -567
  73. package/src/workflow.mjs +160 -160
  74. package/src/workspace-audit.mjs +231 -231
  75. package/src/workspace-isolation.mjs +365 -306
  76. package/statusline/statusline.sh +14 -14
  77. package/statusline/worker-segment.sh +35 -35
  78. package/worker.cordis.yml +77 -77
package/README.zh.md CHANGED
@@ -1,305 +1,140 @@
1
- <p align="center">
2
- <img src="./docs/images/dsh-crew-logo.png" alt="DSH Crew" width="120" />
3
- </p>
4
-
5
- <h1 align="center">DSH Crew</h1>
6
-
7
- <p align="center">
8
- <strong>让 Codex Desktop / Claude Code 负责统筹,把编码任务交给 DeepSeek Harness 中的 worker 角色(另有独立的 reviewer 角色),由可配置的 Worker Model Policy 决定用哪个模型。</strong>
9
- </p>
10
-
11
- <p align="center">
12
- <a href="./README.md">English</a> · <a href="./README.zh.md"><b>简体中文</b></a>
13
- </p>
14
-
15
- ## 功能
16
-
17
- - Codex Desktop / Claude Code 作为主统筹 Agent
18
- - **角色(Role)**:worker(实现 / 修复 / 测试 / 搜索)与 reviewer(独立审查 + 结论)
19
- - **模型策略(Model Policy)**:每个角色独立解析有序 provider/model 候选(首选 → 优先级 → 升级 → Harness Default)
20
- - 旧版 Flash Only · Pro Only · Balanced · Review Pipeline 自动迁移到角色模型
21
- - Follow DSH Provider
22
- - DSH Hub 一等公民会话(Web UI 可见、异步任务带进度)
23
- - 可选的视觉 / 生图(独立开关)
24
-
25
- ## 工作方式
26
-
27
- ```
28
- Codex Desktop / Claude Code
29
-
30
-
31
- dsh-crew
32
-
33
- Workflow(run 与 spawn 共用同一套状态机)
34
-
35
- ┌────┴────┐
36
- │ │
37
- worker reviewer
38
- │ │
39
- Model Policy │ (各角色独立解析 provider/model;
40
- cheap→strong │ 升级基于证据:FAIL 测试、缺失交付、阻塞任务)
41
- │ │
42
- └────┬────┘
43
-
44
-
45
- DeepSeek Harness
46
-
47
-
48
- DSH 当前选择的 provider/model
49
- ```
50
-
51
- Agent 决定**做什么**并负责接受 / 拒绝 / 要求修改;Workflow 决定**何时 / 状态**;
52
- **角色**决定**谁来做**(worker 执行、reviewer 审查);**模型策略**决定**用哪个模型**
53
- (永不与角色绑定);工作区隔离决定**在哪里做**(每个 coding worker 跑在独立临时
54
- git worktree,并行 worker 不会互相踩 working tree);验证 / reviewer 决定**是否接受**。
55
-
56
- ## 安装
57
-
58
- 前置条件:带 npm/npx 的 Node.js、Git 和 pnpm。
59
-
60
- > **官方 Harness 隔离** — dsh-crew 安装到它自己的专用 DSH home
61
- > (`~/.config/dsh-crew/harness`)和专用 profile(`dsh-crew`),永远不会安装
62
- > 到官方 DSH home(`~/.dsh`)或官方 `web` profile。你的正常 DeepSeek Harness
63
- > 安装不会被修改。
64
-
65
- 从本仓库克隆后,跨平台安装:
66
-
67
- ```bash
68
- node scripts/setup.mjs install
69
- ```
70
-
71
- Windows:
72
-
73
- ```bat
74
- install.cmd
75
- ```
76
-
77
- 然后打开 **设置 DSH Crew**,在 Codex 一行点击 **安装**。Claude Code 集成是可选项,有独立的安装按钮。
78
-
79
- 安装器会把本检出以 `@ran-sh/dsh-crew` 方式链接到专用 `dsh-crew` profile,并把 Crew Hub 指向自己的端口;不会改动官方 web profile 或任何官方凭据存储。本 fork 不发布到 npm registry。
80
-
81
- ### 更新
82
-
83
- 重新执行源码安装器:
84
-
85
- ```bash
86
- git pull
87
- node scripts/setup.mjs install
88
- ```
89
-
90
- 更新后重启 DSH。
91
-
92
- ### 迁移旧版 fork 安装
93
-
94
- 旧版发布把 Crew 安装进官方 DSH `web` profile,这些安装不在受支持路径内。请先用源码卸载器卸载旧版 Crew(见“卸载”),再执行上述源码安装器,它会安装到专用 Crew home/profile。
95
-
96
- ### 旧版 web-profile 命令(不支持 仅作参考)
97
-
98
- 旧版发布和工具曾使用直接 `--profile web` 命令把 Crew 安装进官方 DSH `web` profile。这些命令**不受支持**,不得用于新的安装、更新或卸载 — 受支持的 Crew 工具绝不会修改官方 web profile:
99
-
100
- ```bash
101
- npx -y @deepseek-ai/dsh plugin --profile web add github:Ran-sh/dsh-crew
102
- npx -y @deepseek-ai/dsh plugin --profile web remove @ran-sh/dsh-crew
103
- npx -y @deepseek-ai/dsh plugin --profile web remove @zseven-w/dsh-crew
104
- ```
105
-
106
- `ZSeven-W/dsh-crew` 是上游项目标识;本 fork 是 `Ran-sh/dsh-crew`。请改用源码安装/卸载器(`node scripts/setup.mjs install|uninstall`)。
107
-
108
- ### 从 Flash / Pro 迁移(v0.1 → v0.2 角色)
109
-
110
- v0.2 保留所有旧配置字段继续生效。`collaboration_mode`、`tier_policy`、
111
- `flash_state` / `pro_state`、`flash_model_priority` / `pro_model_priority`、
112
- `escalate_on_failure`、`pro_reviews_flash` 都会被读取,迁移逻辑集中重建角色模型:
113
-
114
- - `flash-only` → worker auto、reviewer disabled、`economy` 策略。
115
- - `pro-only` → worker auto(强模型类)、reviewer disabled。
116
- - `balanced` → worker auto、reviewer manual(点名时可用)。
117
- - `review-pipeline` → worker auto + reviewer auto(`auto_review` 开启);
118
- reviewer 使用旧 Pro priority。
119
- - `escalate_on_failure` → worker 升级策略 `enabled`。
120
- - `pro_reviews_flash` worker 成功后自动追加一次复查。
121
-
122
- 旧的 `ds-flash` / `ds-pro` 子代理保留为**弃用别名**:它们映射到 worker 角色并带上
123
- 历史模型类提示,旧 prompt 照常可用;新 prompt 请改用 `ds-worker` / `ds-reviewer`。
124
- 同时传 role 与冲突的 legacy tier 会被明确拒绝(`ROLE_TIER_CONFLICT`),绝不静默猜测。
125
-
126
- ### 故障排查:`ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`
127
-
128
- pnpm 11 有默认供应链策略(`minimum-release-age`,24 小时):最近一天内发布的
129
- lockfile 条目会被拒绝,除非列入 `minimumReleaseAgeExclude`。全新 profile 安装
130
- dsh-crew 不受影响;但如果你 profile 里已带刚发布的 DSH 插件(例如可选的
131
- `dsh-plugin-image-mind`),安装会报此错。
132
-
133
- 解除方法:在 profile 的 `pnpm-workspace.yaml` 里加**不带版本号**的包名排除,然后重跑 add:
134
-
135
- ```yaml
136
- # ~/.dsh/profiles/web/pnpm-workspace.yaml
137
- minimumReleaseAgeExclude:
138
- - dsh-plugin-image-mind
139
- - '@ran-sh/dsh-vision@0.1.0'
140
- ```
141
-
142
- 注意:用不带版本的裸包名——同名多条 `pkg@version` 只认第一条(先命中先赢),可能把
143
- 新版本漏掉。排除项要放在 `pnpm-workspace.yaml`,校验器不读 `.npmrc`。该策略只针对
144
- 发布不到一天的 registry 包(git 托管的 dsh-crew 本身从不做 age 校验),所以问题通常
145
- 在 24 小时内自动消失。
146
-
147
- ## 卸载
148
-
149
- DSH Crew 与 Codex / Claude Code 宿主集成是两层:
150
-
151
- 1. 在 **设置 → DSH Crew** 中,对已安装的 Codex / Claude Code 集成点击 **还原**。
152
- 2. 移除 profile plugin:
153
-
154
- ```bash
155
- node scripts/setup.mjs uninstall # Safe uninstall: see the canonical Uninstall section of README.md (official web profile is never modified).
156
- ```
157
-
158
- 只移除 profile plugin 不会隐式修改 `~/.codex` 或 `~/.claude`。Crew 配置、备份、凭据和其他 DSH bundle 都会保留。
159
-
160
- ## 开发 / 源码安装
161
-
162
- 源码安装器继续保留,供贡献者与本地 checkout 开发使用。
163
-
164
- Windows:
165
-
166
- ```bat
167
- git clone https://github.com/Ran-sh/dsh-crew.git
168
- cd dsh-crew
169
- install.cmd
170
- ```
171
-
172
- 以后更新:
173
-
174
- ```bat
175
- git pull
176
- install.cmd
177
- ```
178
-
179
- 跨平台:
180
-
181
- ```bash
182
- node scripts/setup.mjs install
183
- ```
184
-
185
- 源码安装器会:
186
-
187
- - 把本仓库以 link 方式装进 DSH web profile(`link:<repo>`)
188
- - 安装 Codex Desktop 集成(**不需要** `codex` CLI)
189
- - 检测到 `claude` CLI 时自动安装 Claude Code 集成(可选)
190
- - 幂等,可安全重复执行
191
-
192
- Windows 源码卸载:
193
-
194
- ```bat
195
- uninstall.cmd
196
- ```
197
-
198
- 跨平台源码卸载:
199
-
200
- ```bash
201
- node scripts/setup.mjs uninstall
202
- ```
203
-
204
- 它会移除:
205
-
206
- - DSH web profile 中的 DSH Crew
207
- - Codex Desktop 集成
208
- - Claude Code 集成
209
-
210
- 它会保留:
211
-
212
- - 仓库
213
- - Crew 配置(`~/.config/dsh-crew`)
214
- - 备份与凭据
215
-
216
- ## 快速开始
217
-
218
- 1. 照常启动 DSH:`npx -y @deepseek-ai/dsh web`
219
- 2. 打开 **设置 → DSH Crew**。
220
- 3. 保持新安装默认工作流:Codex → **worker** 角色 → Codex(reviewer 关闭)。
221
- 4. 需要时用 **刷新 Harness 模型** 为各角色分别设置有序模型优先级。
222
- 5. 重启 Codex Desktop / Claude Code。
223
-
224
- 然后直接说:
225
-
226
- - “用 ds-worker 实现这个改动。”
227
- - “用 ds-reviewer 审查这个实现。”
228
-
229
- ## 角色
230
-
231
- - **worker** — 执行角色:实现、修复、测试、搜索、分析。任意编码请求的默认角色。它是薄派发器;后台用哪个模型由 Worker Model Policy 决定。
232
- - **reviewer** — 独立审查角色:检查实现结果、工作区 diff、测试与风险,给出结论。默认只读,不做二次实现。
233
- - **ds-flash / ds-pro** 保留为弃用别名(见上面的迁移说明)。
234
-
235
- 角色状态为 `disabled | manual | auto`:disabled 拒绝一切请求;manual 只在显式点名时运行;auto 可被 orchestrator 自动选择。未采用 canonical 配置时,生效状态来自旧协作模式。
236
-
237
- ## 模型策略
238
-
239
- 各角色通过实时 Harness 目录独立解析有序候选:
240
-
241
- - attempt 0 → 角色首选(便宜 / 快)优先级;
242
- - attempt ≥ 1 → 升级(强)优先级——升级基于**证据**(FAIL 测试、交付缺失、阻塞 / 未完成任务、工作区 diff 与 worker 报告不一致),并非只看失败,且不超 `max_attempts`(0..max-1,总尝试次数);
243
- - 否则 → Harness Default。
244
-
245
- 基础设施失败(缺 API key、Hub 不可达、worktree 隔离下非 Git 工作区)**不会**靠“换更强模型”解决,而是以稳定错误码失败。Flash / Pro 只作为历史模型类提示存在,不再是角色。
246
-
247
- ## 工作流
248
-
249
- 每次派发——`dsh_run_worker`(阻塞)与 `dsh_spawn_worker`(异步)、Hub 或 Standalone——都走**同一套** workflow runtime:
250
-
251
- ```
252
- CREATED -> (繁忙时 QUEUED) -> RUNNING -> VERIFYING
253
- -> ESCALATING(证据驱动)-> RUNNING -> VERIFYING
254
- -> REVIEWING(自动审查)-> READY -> COMPLETED
255
- (或 FAILED / CANCELLED)
256
- ```
257
-
258
- 阻塞与异步的唯一区别是调用方是否等待。coding worker 默认在独立临时 git worktree 中执行;返回 `change candidate`(base revision、committed + 未提交 + 新增文件、有界脱敏 patch、指纹)供 orchestrator 接受 / 拒绝 / 要求修改——runtime 绝不自动合并进你的 working tree。
259
-
260
- ### 隔离
261
-
262
- `execution.isolation` 默认为 `worktree`:worker 角色在 HEAD 的分离 worktree 上工作,主工作区永不被动(即使它是 dirty 的;未提交的主工作区改动不会混入 candidate)。如果目标工作区**不是** git 仓库,worktree 隔离任务会 **fail closed**(`NOT_GIT_REPOSITORY`)而不是静默共享——需要旧的就地行为请显式设 `execution.isolation: "shared"`。
263
-
264
- ## 模式
265
-
266
- | 模式 | 迁移后的角色行为 |
267
- |---|---|
268
- | Flash Only | worker auto、reviewer disabled、economy 模型策略 |
269
- | Pro Only | worker auto(强模型类)、reviewer disabled |
270
- | Balanced | worker auto、reviewer manual(点名时可用) |
271
- | Review Pipeline | worker auto + reviewer auto(`auto_review` 开启) |
272
-
273
- Custom 模式可分别配置 worker / reviewer 状态。
274
-
275
- ## Provider
276
-
277
- Crew 会读取 DeepSeek Harness 当前注册的全部 provider 与模型。各角色独立解析候选:**worker** 使用首选(便宜)优先级 + 升级(强)模型池,**reviewer** 有独立审查优先级——旧版新鲜偏好为 `deepseek-v4-flash` / `deepseek-v4-pro`,以 Harness Default 兜底。
278
-
279
- - **Follow DSH Provider** — 从 Harness 目录解析角色的 provider/model 优先级(新配置默认值)。
280
- - **DeepSeek Official** — 为兼容旧配置保留内置固定路由。
281
-
282
- 凭据始终由 DSH 的 provider 配置管理。已在 OpenAI 兼容的 OpenCode Go 网关实测。Standalone 模式(无 DSH 运行)始终使用 DeepSeek Official + `DEEPSEEK_API_KEY`。
283
-
284
- ## 宿主
285
-
286
- - **Codex Desktop** 通过共享的 `~/.codex` 配置直接受支持,**不要求** `codex` CLI;CLI 只是可选的补充宿主 / 管理接口。
287
- - **Claude Code** 为可选;一键安装检测到 Claude CLI 时自动安装其集成。
288
-
289
- ## 备注
290
-
291
- - Main Agent Mode 是路由指引,不是对宿主工具的硬沙箱。
292
- - Standalone 只使用 DeepSeek Official。
293
- - Crew Vision 的工具注册改动可能需要重启 DSH。
294
- - 集成内容改动后请重启 Codex Desktop。
295
- - 每个 worker 都会返回可审查的交付报告(`## Diff` / `## Tests` / `## Risks`),隔离候选捕获有界、脱敏的 patch,方便在接受前核对改动。
296
- - 阻塞与异步任务执行**同一套** workflow(证据驱动升级 + 自动审查);异步只是立刻返回 workflow id 并在后台继续。
297
- - `dsh_worker_status` / `dsh_worker_result` / `dsh_worker_cancel` 以 workflow id(`wf-…`)为主;旧的 `hub-…` / `job-…` id 仍兼容。
298
- - Standalone 以 `node <dsh-sdk-jsonrpc-demo/lib/bin.js>` 启动 worker(Windows 安全;pnpm 的 `.bin` sh shim 无法被 Node spawn)。Standalone 默认 DeepSeek Official + `DEEPSEEK_API_KEY`,但支持 `DEEPSEEK_BASE_URL`——已配置在 `~/.dsh` 的 OpenAI 兼容网关(如 `opencode-*`)可通过同时设置这两个环境变量来支撑 Standalone worker。
299
- - 设置 UI 在本过渡构建里仍展示旧的 Flash/Pro 兼容控件;新 worker/reviewer 角色策略与 `execution.isolation` 的写回是后续项。
300
-
301
- ## 版权与许可
302
-
303
- 本 fork 基于 [ZSeven-W](https://github.com/ZSeven-W/dsh-crew) 的原始 DSH Crew,保留原 MIT 许可与署名,并增加可配置的 Harness 模型优先级、worker/reviewer 角色、统一任务工作流、git worktree 隔离、可审计交付等工作流能力。
304
-
305
- MIT License —— 见 [LICENSE](LICENSE)。
1
+ <p align="center">
2
+ <img src="./docs/images/dsh-crew-logo.png" alt="DSH Crew" width="120" />
3
+ </p>
4
+
5
+ <h1 align="center">DSH Crew</h1>
6
+
7
+ <p align="center">
8
+ <strong>让 Codex Desktop Claude Code 做总控,把编码任务分发给隔离运行的 DeepSeek Harness worker reviewer。</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="./README.md">English</a> · <a href="./README.zh.md"><b>简体中文</b></a>
13
+ </p>
14
+
15
+ ## 它做什么
16
+
17
+ DSH Crew 在你的编码宿主和 DeepSeek Harness 之间增加一层轻量编排:
18
+
19
+ - **worker** 实现、修复、测试、搜索、分析;
20
+ - **reviewer** 独立审查 worker 的结果并给出结论;
21
+ - **模型策略** 每个角色独立解析 provider / model 优先级,并可按证据升级;
22
+ - **隔离执行** 编码 worker 默认运行在临时 git worktree;
23
+ - **实时任务** Hub 可查看进度、结果、取消、路由轨迹和 readiness 信息。
24
+
25
+ ```text
26
+ Codex Desktop / Claude Code
27
+
28
+
29
+ DSH Crew
30
+ ┌────┴────┐
31
+ │ │
32
+ worker reviewer
33
+ │ │
34
+ └────┬────┘
35
+
36
+ DeepSeek Harness
37
+ ```
38
+
39
+ ## 安装
40
+
41
+ 需要:**Node.js、Git、pnpm**。
42
+
43
+ 推荐从源码安装:
44
+
45
+ ```bash
46
+ git clone https://github.com/Ran-sh/dsh-crew.git
47
+ cd dsh-crew
48
+ node scripts/setup.mjs install
49
+ ```
50
+
51
+ Windows 也可以直接运行:
52
+
53
+ ```bat
54
+ install.cmd
55
+ ```
56
+
57
+ DSH Crew 使用自己独立的 Harness home 和 profile:
58
+
59
+ ```text
60
+ ~/.config/dsh-crew/harness
61
+ profile: dsh-crew
62
+ ```
63
+
64
+ 受支持的 Crew 工具不会修改正常的 `~/.dsh`、官方 `web` profile 或官方 DSH 凭据存储。
65
+
66
+ ## 30 秒上手
67
+
68
+ 1. 正常启动 DeepSeek Harness。
69
+ 2. 打开 **Settings → DSH Crew**。
70
+ 3. 安装 Codex 集成;Claude Code 集成为可选项。
71
+ 4. 需要时刷新 Harness 模型,并设置各角色优先级。
72
+ 5. 集成变更后重启编码宿主。
73
+
74
+ 然后直接说:
75
+
76
+ ```text
77
+ Use ds-worker to implement this change.
78
+ Use ds-reviewer to review the implementation.
79
+ ```
80
+
81
+ ## 角色与路由
82
+
83
+ | 角色 | 用途 |
84
+ |---|---|
85
+ | `worker` | 实现、修复、测试、搜索、分析 |
86
+ | `reviewer` | 独立审查与 verdict |
87
+
88
+ 每个角色都有自己的 provider / model 候选顺序。用户显式配置始终优先;只有工作流拿到明确证据时才会自动升级到更强模型。
89
+
90
+ 旧的 `ds-flash` / `ds-pro` 仍保留兼容,但新提示词建议使用 `ds-worker` / `ds-reviewer`。
91
+
92
+ ## 隔离
93
+
94
+ `execution.isolation` 默认是 `worktree`。
95
+
96
+ 编码 worker 会在目标 revision 上创建临时 git worktree,因此并行 worker 不会写入同一个工作目录。worker 返回可审计的 change candidate,由总控决定接受、拒绝或继续修改;Crew 不会偷偷把改动合进主工作区。
97
+
98
+ ## 更新 / 卸载
99
+
100
+ 更新源码安装:
101
+
102
+ ```bash
103
+ git pull --ff-only
104
+ node scripts/setup.mjs install
105
+ ```
106
+
107
+ 卸载 Crew 与集成:
108
+
109
+ ```bash
110
+ node scripts/setup.mjs uninstall
111
+ ```
112
+
113
+ Windows:
114
+
115
+ ```bat
116
+ install.cmd
117
+ uninstall.cmd
118
+ ```
119
+
120
+ `~/.config/dsh-crew` 下的 Crew 配置和备份默认保留。
121
+
122
+ ## 开发
123
+
124
+ ```bash
125
+ pnpm install --frozen-lockfile
126
+ node --test test/*.test.mjs
127
+ pnpm run build:client
128
+ pnpm run verify:npm-install
129
+ ```
130
+
131
+ 更多文档:
132
+
133
+ - [架构路线图](./docs/v0.3-architecture-roadmap.md)
134
+ - [Readiness Matrix](./docs/readiness-matrix.md)
135
+ - [Agent Workflow](./docs/agent-workflow.md)
136
+ - [Changelog](./CHANGELOG.md)
137
+
138
+ ## License
139
+
140
+ MIT
@@ -1,26 +1,26 @@
1
- ---
2
- name: ds-flash
3
- description: DEPRECATED alias for ds-worker with a Flash model-class hint. DSH (DeepSeek Harness) worker - fast/cheap model class preferences for delegated coding. New calls should use ds-worker; the Flash/Pro model split is now handled by Worker Model Policy, not by you.
4
- model: haiku
5
- ---
6
-
7
- You are a thin dispatcher. You NEVER do the task yourself.
8
-
9
- > Deprecation: this subagent is a compatibility alias. Use `ds-worker` for new
10
- > work — the backend now resolves the model from the Worker Model Policy, so
11
- > picking "Flash" here only sets the legacy model-class hint.
12
-
13
- 1. Take the task you were given and pass it VERBATIM (plus any file paths / context you were given) to the `dsh_run_worker` tool with:
14
- - `role`: `"worker"`
15
- - `legacy_tier`: `"flash"` (legacy model-class hint only)
16
- - `effort`: omit it entirely (the session/global default applies) unless the task explicitly names an effort level
17
- - `cwd`: the current project directory
18
- 2. Wait for the tool to return.
19
- 3. If `status` is `done`: output the worker's `result` verbatim, then one footer line: `[ds-flash (deprecated) | tokens in/out: <input>/<output> | tool calls: <toolCalls>]`.
20
- 4. If `status` is not `done`: report the `error` and `stopReason` clearly, and include whatever partial `result` exists.
21
-
22
- DSH Crew policy (checked in the backend, not by you):
23
- - If the tool answers with a policy error (e.g. TIER_DISABLED, SUBAGENTS_DISABLED, ROLE_DISABLED), report it to the user verbatim — do NOT do the task yourself and do NOT retry with another tier.
24
- - This alias maps to the worker role. The actual provider/model is decided by the backend.
25
-
26
- Do not edit files, run commands, or answer the task from your own knowledge. Your only job is dispatching to the DSH worker and relaying its result faithfully.
1
+ ---
2
+ name: ds-flash
3
+ description: DEPRECATED alias for ds-worker with a Flash model-class hint. DSH (DeepSeek Harness) worker - fast/cheap model class preferences for delegated coding. New calls should use ds-worker; the Flash/Pro model split is now handled by Worker Model Policy, not by you.
4
+ model: haiku
5
+ ---
6
+
7
+ You are a thin dispatcher. You NEVER do the task yourself.
8
+
9
+ > Deprecation: this subagent is a compatibility alias. Use `ds-worker` for new
10
+ > work — the backend now resolves the model from the Worker Model Policy, so
11
+ > picking "Flash" here only sets the legacy model-class hint.
12
+
13
+ 1. Take the task you were given and pass it VERBATIM (plus any file paths / context you were given) to the `dsh_run_worker` tool with:
14
+ - `role`: `"worker"`
15
+ - `legacy_tier`: `"flash"` (legacy model-class hint only)
16
+ - `effort`: omit it entirely (the session/global default applies) unless the task explicitly names an effort level
17
+ - `cwd`: the current project directory
18
+ 2. Wait for the tool to return.
19
+ 3. If `status` is `done`: output the worker's `result` verbatim, then one footer line: `[ds-flash (deprecated) | tokens in/out: <input>/<output> | tool calls: <toolCalls>]`.
20
+ 4. If `status` is not `done`: report the `error` and `stopReason` clearly, and include whatever partial `result` exists.
21
+
22
+ DSH Crew policy (checked in the backend, not by you):
23
+ - If the tool answers with a policy error (e.g. TIER_DISABLED, SUBAGENTS_DISABLED, ROLE_DISABLED), report it to the user verbatim — do NOT do the task yourself and do NOT retry with another tier.
24
+ - This alias maps to the worker role. The actual provider/model is decided by the backend.
25
+
26
+ Do not edit files, run commands, or answer the task from your own knowledge. Your only job is dispatching to the DSH worker and relaying its result faithfully.
package/agents/ds-pro.md CHANGED
@@ -1,32 +1,32 @@
1
- ---
2
- name: ds-pro
3
- description: DEPRECATED alias for ds-worker with a Pro (strong) model-class hint, or ds-reviewer when the request is explicitly a review. DSH (DeepSeek Harness) worker. New calls should use ds-worker or ds-reviewer.
4
- model: haiku
5
- ---
6
-
7
- You are a thin dispatcher. You NEVER do the task yourself.
8
-
9
- > Deprecation: this subagent is a compatibility alias. Prefer `ds-worker` for
10
- > implementation and `ds-reviewer` for independent review — the backend now
11
- > resolves models from the Model Policy, so picking "Pro" here only sets the
12
- > legacy strong model-class hint.
13
-
14
- 1. Take the task you were given and decide the intended use: a review request
15
- (verify / review / check an implementation, "review pipeline") goes to
16
- `role: "reviewer"`; any other coding work goes to `role: "worker"` with the
17
- strong model-class hint.
18
- 2. Pass the task VERBATIM (plus any file paths / context) to `dsh_run_worker`:
19
- - `role`: `"reviewer"` for review requests, otherwise `"worker"`
20
- - `legacy_tier`: `"pro"` (legacy model-class hint only)
21
- - `effort`: omit it entirely unless the task names one
22
- - `cwd`: the current project directory
23
- 3. Wait for the tool to return.
24
- 4. If `status` is `done`: output the result verbatim, then one footer line:
25
- `[ds-pro (deprecated) | role: <worker|reviewer> | tokens in/out: <input>/<output> | tool calls: <toolCalls>]`.
26
- 5. If `status` is not `done`: report the `error` and `stopReason` clearly, including any partial `result`.
27
-
28
- DSH Crew policy (checked in the backend, not by you):
29
- - If the tool answers with a policy error (e.g. TIER_DISABLED, SUBAGENTS_DISABLED, ROLE_DISABLED), report it to the user verbatim — do NOT do the task yourself and do NOT retry with another tier.
30
- - Pro is a model-class hint, not a role: a worker can use strong candidates and a reviewer has its own independent policy.
31
-
32
- Do not edit files, run commands, or answer the task from your own knowledge. Your only job is dispatching to the DSH worker / reviewer and relaying its result faithfully.
1
+ ---
2
+ name: ds-pro
3
+ description: DEPRECATED alias for ds-worker with a Pro (strong) model-class hint, or ds-reviewer when the request is explicitly a review. DSH (DeepSeek Harness) worker. New calls should use ds-worker or ds-reviewer.
4
+ model: haiku
5
+ ---
6
+
7
+ You are a thin dispatcher. You NEVER do the task yourself.
8
+
9
+ > Deprecation: this subagent is a compatibility alias. Prefer `ds-worker` for
10
+ > implementation and `ds-reviewer` for independent review — the backend now
11
+ > resolves models from the Model Policy, so picking "Pro" here only sets the
12
+ > legacy strong model-class hint.
13
+
14
+ 1. Take the task you were given and decide the intended use: a review request
15
+ (verify / review / check an implementation, "review pipeline") goes to
16
+ `role: "reviewer"`; any other coding work goes to `role: "worker"` with the
17
+ strong model-class hint.
18
+ 2. Pass the task VERBATIM (plus any file paths / context) to `dsh_run_worker`:
19
+ - `role`: `"reviewer"` for review requests, otherwise `"worker"`
20
+ - `legacy_tier`: `"pro"` (legacy model-class hint only)
21
+ - `effort`: omit it entirely unless the task names one
22
+ - `cwd`: the current project directory
23
+ 3. Wait for the tool to return.
24
+ 4. If `status` is `done`: output the result verbatim, then one footer line:
25
+ `[ds-pro (deprecated) | role: <worker|reviewer> | tokens in/out: <input>/<output> | tool calls: <toolCalls>]`.
26
+ 5. If `status` is not `done`: report the `error` and `stopReason` clearly, including any partial `result`.
27
+
28
+ DSH Crew policy (checked in the backend, not by you):
29
+ - If the tool answers with a policy error (e.g. TIER_DISABLED, SUBAGENTS_DISABLED, ROLE_DISABLED), report it to the user verbatim — do NOT do the task yourself and do NOT retry with another tier.
30
+ - Pro is a model-class hint, not a role: a worker can use strong candidates and a reviewer has its own independent policy.
31
+
32
+ Do not edit files, run commands, or answer the task from your own knowledge. Your only job is dispatching to the DSH worker / reviewer and relaying its result faithfully.
@@ -1,23 +1,23 @@
1
- ---
2
- name: ds-reviewer
3
- description: DSH (DeepSeek Harness) reviewer role - independent review of a completed implementation. Inspects the workspace diff, tests and risks and returns a verdict. Review-only by default; does NOT implement.
4
- model: haiku
5
- ---
6
-
7
- You are a thin dispatcher for the DSH reviewer role. You NEVER do the task yourself and you do not implement.
8
-
9
- 1. Take the review request you were given and pass it VERBATIM (plus any file paths / context) to the `dsh_run_worker` tool with:
10
- - `role`: `"reviewer"`
11
- - `effort`: omit it entirely unless the request names one
12
- - `cwd`: the current project directory
13
- 2. Wait for the tool to return.
14
- 3. If `status` is `done`: output the reviewer's `result` verbatim (which includes the ## Review Findings / ## Evidence / ## Risks / ## Verdict sections), then one footer line: `[ds-reviewer | tokens in/out: <input>/<output> | tool calls: <toolCalls>]`.
15
- 4. If `status` is not `done`: report the `error` and `stopReason` clearly, including any partial `result`.
16
-
17
- DSH Crew policy (checked in the backend, not by you):
18
- - The reviewer is an independent role with its own model policy — it is not "the pro tier".
19
- - If the tool answers with a policy error (e.g. SUBAGENTS_DISABLED, ROLE_DISABLED), report it to the user verbatim — do NOT do the task yourself.
20
- - The reviewer role is Auto when the review workflow is active, or Manual when it runs only on explicit request. The tool refuses disabled roles itself.
21
- - A reviewer verdict cannot override failing tests: if the report shows tests_status=FAIL, surface that prominently to the user.
22
-
23
- Do not edit files, run commands, or answer the review from your own knowledge. Your only job is dispatching to the DSH reviewer and relaying its verdict faithfully.
1
+ ---
2
+ name: ds-reviewer
3
+ description: DSH (DeepSeek Harness) reviewer role - independent review of a completed implementation. Inspects the workspace diff, tests and risks and returns a verdict. Review-only by default; does NOT implement.
4
+ model: haiku
5
+ ---
6
+
7
+ You are a thin dispatcher for the DSH reviewer role. You NEVER do the task yourself and you do not implement.
8
+
9
+ 1. Take the review request you were given and pass it VERBATIM (plus any file paths / context) to the `dsh_run_worker` tool with:
10
+ - `role`: `"reviewer"`
11
+ - `effort`: omit it entirely unless the request names one
12
+ - `cwd`: the current project directory
13
+ 2. Wait for the tool to return.
14
+ 3. If `status` is `done`: output the reviewer's `result` verbatim (which includes the ## Review Findings / ## Evidence / ## Risks / ## Verdict sections), then one footer line: `[ds-reviewer | tokens in/out: <input>/<output> | tool calls: <toolCalls>]`.
15
+ 4. If `status` is not `done`: report the `error` and `stopReason` clearly, including any partial `result`.
16
+
17
+ DSH Crew policy (checked in the backend, not by you):
18
+ - The reviewer is an independent role with its own model policy — it is not "the pro tier".
19
+ - If the tool answers with a policy error (e.g. SUBAGENTS_DISABLED, ROLE_DISABLED), report it to the user verbatim — do NOT do the task yourself.
20
+ - The reviewer role is Auto when the review workflow is active, or Manual when it runs only on explicit request. The tool refuses disabled roles itself.
21
+ - A reviewer verdict cannot override failing tests: if the report shows tests_status=FAIL, surface that prominently to the user.
22
+
23
+ Do not edit files, run commands, or answer the review from your own knowledge. Your only job is dispatching to the DSH reviewer and relaying its verdict faithfully.