dsh-coding 0.0.1 → 0.1.1-rc2
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/AGENTS.md +80 -0
- package/LICENSE +21 -21
- package/README.md +120 -54
- package/cordis.patch.yml +274 -4
- package/docs/CHANGELOG.md +47 -0
- package/docs/DETAIL.md +272 -0
- package/icon.svg +6 -6
- package/lib/apply-patch.js +268 -0
- package/lib/client/capsule.js +120 -0
- package/lib/client/card.js +308 -0
- package/lib/client/command-row.js +76 -0
- package/lib/client/config-page.js +392 -0
- package/lib/client/definition.js +164 -0
- package/lib/client/index.js +129 -0
- package/lib/client/locales.js +170 -0
- package/lib/client/mode-picker.js +77 -0
- package/lib/client/styles.js +283 -0
- package/lib/client.js +1802 -0
- package/lib/coding-projection.js +349 -0
- package/lib/config.js +218 -0
- package/lib/contract.js +138 -0
- package/lib/editor.js +23 -0
- package/lib/failures.js +142 -0
- package/lib/handoff.js +347 -0
- package/lib/index.js +110 -7
- package/lib/language.js +136 -0
- package/lib/memory.js +336 -0
- package/lib/messages.js +43 -0
- package/lib/models.js +154 -0
- package/lib/patch.js +235 -0
- package/lib/preset.js +1552 -0
- package/lib/reasoning-levels.js +28 -0
- package/lib/reasoning-projection.js +178 -0
- package/lib/reasoning.js +585 -0
- package/lib/stages.js +344 -0
- package/lib/state.js +585 -0
- package/lib/system-language.js +56 -0
- package/lib/types/apply-patch.d.ts +13 -0
- package/lib/types/client/capsule.d.ts +9 -0
- package/lib/types/client/card.d.ts +76 -0
- package/lib/types/client/command-row.d.ts +42 -0
- package/lib/types/client/config-page.d.ts +136 -0
- package/lib/types/client/definition.d.ts +51 -0
- package/lib/types/client/index.d.ts +10 -0
- package/lib/types/client/locales.d.ts +18 -0
- package/lib/types/client/mode-picker.d.ts +25 -0
- package/lib/types/client/styles.d.ts +28 -0
- package/lib/types/coding-projection.d.ts +116 -0
- package/lib/types/config.d.ts +208 -0
- package/lib/types/contract.d.ts +33 -0
- package/lib/types/editor.d.ts +9 -0
- package/lib/types/failures.d.ts +62 -0
- package/lib/types/handoff.d.ts +132 -0
- package/lib/types/index.d.ts +150 -0
- package/lib/types/language.d.ts +56 -0
- package/lib/types/memory.d.ts +71 -0
- package/lib/types/messages.d.ts +27 -0
- package/lib/types/models.d.ts +82 -0
- package/lib/types/patch.d.ts +37 -0
- package/lib/types/preset.d.ts +22 -0
- package/lib/types/reasoning-levels.d.ts +20 -0
- package/lib/types/reasoning-projection.d.ts +64 -0
- package/lib/types/reasoning.d.ts +141 -0
- package/lib/types/stages.d.ts +193 -0
- package/lib/types/state.d.ts +273 -0
- package/lib/types/system-language.d.ts +10 -0
- package/lib/types/verification-tool.d.ts +32 -0
- package/lib/types/verification.d.ts +77 -0
- package/lib/types/verifier.d.ts +9 -0
- package/lib/types/volatile.d.ts +17 -0
- package/lib/verification-tool.js +176 -0
- package/lib/verification.js +337 -0
- package/lib/verifier.js +25 -0
- package/lib/volatile.js +20 -0
- package/locale/en.json +3 -2
- package/locale/zh.json +3 -2
- package/package.json +84 -9
- package/lib/index.d.ts +0 -11
package/AGENTS.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# AGENTS.md — DSH Coding 编程智能体维护指南
|
|
2
|
+
|
|
3
|
+
面向智能体与维护者的通用指令与仓库入口。使用者看 [README](README.md);为什么这样设计见 [docs/DETAIL.md](docs/DETAIL.md)。
|
|
4
|
+
|
|
5
|
+
**按目录阅读**(上游 `agent-instructions` 会在触碰对应目录文件时自动注入子文件;也可以主动读):
|
|
6
|
+
|
|
7
|
+
- 改 `src/` 下任何代码前:先读 [src/AGENTS.md](https://github.com/ygzhang-lab/dsh-coding/blob/main/src/AGENTS.md)(DSH 契约表、约束 1-23、src 模块表、调试表)。
|
|
8
|
+
- 改 `test/` 前:读 [test/AGENTS.md](https://github.com/ygzhang-lab/dsh-coding/blob/main/test/AGENTS.md)(测试矩阵、验证步骤)。
|
|
9
|
+
- 改 `scripts/` 前:读 [scripts/AGENTS.md](https://github.com/ygzhang-lab/dsh-coding/blob/main/scripts/AGENTS.md)(构建流程与挂载调试)。
|
|
10
|
+
|
|
11
|
+
## 会话边界:一次会话只跑一个任务
|
|
12
|
+
|
|
13
|
+
一个 Coding 会话只服务一个任务;换任务请新开会话,不要在同一个会话里接着做第二个任务。
|
|
14
|
+
|
|
15
|
+
原因:`coding_handoff` 的 constraints / decisions / findings / acceptance / tasks 等列表字段只追加,只有 `goal` 与 `delivered` 会覆盖;复用会话时,上一个任务的 `acceptance` 仍会满足新任务进入 verify / deliver 的门禁,等于用旧证据放行新任务。`coding_handoff({ reset: true })` 只重置验证重试预算,不清空交接记录。
|
|
16
|
+
|
|
17
|
+
## 0. 不可违背的硬规则(速览,完整条款见 src/AGENTS.md)
|
|
18
|
+
|
|
19
|
+
1. 门禁只用 `deny`,不要改成 `ask`(审批语义)。详见 src/AGENTS.md 约束 1。
|
|
20
|
+
2. `tools.restrict` 裁剪与 `tools/pre-execute`/guard 拒绝必须双层并存。详见 src/AGENTS.md 约束 2。
|
|
21
|
+
3. 子代理白名单只写在预设组合里,不继承父级限制,也不经 `agentOptions` 传递。详见 src/AGENTS.md 约束 4。
|
|
22
|
+
4. 不新增自定义 Session 事件类型;新状态放进整值 checkpoint 或 `ctx.sessionProjections`。详见 src/AGENTS.md 约束 5。
|
|
23
|
+
5. 所有监听与注册(含客户端 `locale`/Definition)都包在 `ctx.effect` 里。详见 src/AGENTS.md 约束 6。
|
|
24
|
+
6. worker 路由缺失必须失败,不得回退主代理模型。详见 src/AGENTS.md 约束 7。
|
|
25
|
+
|
|
26
|
+
## 1. 环境与命令
|
|
27
|
+
|
|
28
|
+
- Node.js ≥ 24.9.0(`.node-version` 已锁定)
|
|
29
|
+
- pnpm 12+
|
|
30
|
+
- DSH 0.2.2-rc.5(本插件按该版本的实际契约实现,见 src/AGENTS.md 的契约表)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm install
|
|
34
|
+
pnpm typecheck # tsc --noEmit
|
|
35
|
+
pnpm build # 生成 lib/*.js、lib/types/**、lib/client.js
|
|
36
|
+
pnpm test # 先 build,再 node --test test/*.test.mjs
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**测试跑的是构建产物 `lib/*.js`,不是源码。** 改完 `src/` 必须先 `pnpm build` 再跑测试,否则测的是旧代码;测试矩阵与验证步骤细节见 [test/AGENTS.md](test/AGENTS.md)。
|
|
40
|
+
|
|
41
|
+
## 2. 目录总览
|
|
42
|
+
|
|
43
|
+
- `src/` —— 插件源码(含浏览器半 `src/client/`);src 模块表见 [src/AGENTS.md](src/AGENTS.md)。
|
|
44
|
+
- `test/` —— node:test 用例(跑构建产物)。
|
|
45
|
+
- `scripts/` —— 构建流程与挂载调试脚本。
|
|
46
|
+
- `docs/` —— 设计文档。
|
|
47
|
+
- `locale/` —— 界面文案。
|
|
48
|
+
- 根文件 —— `cordis.patch.yml`、`package.json`、`README.md`。
|
|
49
|
+
|
|
50
|
+
## 3. 构建产物
|
|
51
|
+
|
|
52
|
+
| 入口 | 产物 | 说明 |
|
|
53
|
+
| --------------------- | ----------------- | ------------------------------------------------------------- |
|
|
54
|
+
| `dsh-coding` | `lib/index.js` | Host 设置服务;同时导出 `Config` 与 `configSchema` |
|
|
55
|
+
| `dsh-coding/preset` | `lib/preset.js` | 预设运行时 |
|
|
56
|
+
| `dsh-coding/editor` | `lib/editor.js` | `apply_patch` |
|
|
57
|
+
| `dsh-coding/verifier` | `lib/verifier.js` | `run_verification` |
|
|
58
|
+
| `dsh-coding/client` | `lib/client.js` | 浏览器模块表:`window.__ModuleLoader__.load({ id, factory })` |
|
|
59
|
+
|
|
60
|
+
宿主代码只编译、不打包,所有 `@deepseek-ai/*` 保持外部引用,运行时由 DSH 安装目录解析;客户端用 esbuild 打包为 CJS,再由脚本包一层模块表工厂,React 由宿主模块表提供。`scripts/build.mjs` 先写临时目录、全部成功后才替换 `lib/`,构建失败不会留下半成品。
|
|
61
|
+
|
|
62
|
+
## 4. 发布
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pnpm typecheck && pnpm build && pnpm test
|
|
66
|
+
pnpm pack --dry-run # 检查 files 是否包含 lib/locale/docs/icon/patch
|
|
67
|
+
pnpm publish # prepublishOnly 会再跑一遍 typecheck/build/test
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
本地安装调试:`plugin_manager install_bundle` 传工作区绝对路径,或 `dsh plugin --profile <profile> add /绝对路径`。替换已安装版本需先移除再安装(同一路径的 `link:` 会直接读取新产物,但正在运行的 JS 需要重载)。
|
|
71
|
+
|
|
72
|
+
## 5. 跨平台注意事项
|
|
73
|
+
|
|
74
|
+
项目在 macOS 上开发,Windows 上继续维护时注意以下已实测的差异:
|
|
75
|
+
|
|
76
|
+
1. **shell 调用按平台分叉**:`src/verification.ts` 的 `shellArgv()` 在 Windows 上返回 `['cmd.exe','/d','/s','/c',command]`,其它平台返回 `['/bin/sh','-c',command]`。任何断言 `argv` 前缀的测试都必须按 `process.platform` 推导期望值,不要硬编码 `/bin/sh`。
|
|
77
|
+
2. **DSH 沙箱会拦截子进程管道**:在 DSH 的 `workspace-write` 文件沙箱下,`pnpm build`(esbuild)与 `pnpm test`(`node --test` 为每个测试文件起子进程)会以 `spawn EPERM` 失败,因为子进程需要管道 stdio。这不是代码缺陷:在普通终端运行,或在 DSH 中对该命令提权后运行。
|
|
78
|
+
3. **`src/system-language.ts` 只有 macOS 分支**:读取 `AppleLanguages` 的探测仅 macOS 生效,其它平台返回空数组并回退到宿主的 locale 解析;改语言逻辑时不要假设该模块在 Windows 有输出。
|
|
79
|
+
4. **路径处理一律用 `node:path`**:不要拼接 `/` 或假设大小写不敏感;测试里的固定路径字符串(如 `/tmp/fixture`)只作为传入假 provider 的不透明值。
|
|
80
|
+
5. 文档与代码注释使用中文,标识符、命令、报错原文保持原样。
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 ygzhang
|
|
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 ygzhang
|
|
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,84 +1,150 @@
|
|
|
1
|
-
# DSH Coding
|
|
1
|
+
# DSH Coding 编程智能体
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DSH 编程智能体插件,工程化任务编排机制,Codex 五段式契约层层推进,Pro 模型负责分析需求/编排任务,交由子代理隔离各项任务使用 Flash 模型干活,确保任务交付质量和 Token 价值最大化。
|
|
4
|
+
DSH programming intelligent agent plugin, engineering task orchestration mechanism, Codex five-stage contract progressing layer by layer, Pro model responsible for analyzing requirements/orchestrating tasks, delegating to sub-agents to isolate various tasks and using Flash model to perform work, ensuring task delivery quality and maximizing Token value.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
[](https://github.com/ygzhang-lab/dsh-coding)
|
|
7
|
+

|
|
8
|
+
[](https://www.npmjs.com/package/dsh-coding)
|
|
9
|
+
[](https://www.npmjs.com/package/dsh-coding)
|
|
10
|
+
[](https://dsh-plugin.org/zh/plugins/ygzhang-lab/dsh-coding)
|
|
6
11
|
|
|
7
|
-
-
|
|
8
|
-
- 插件说明:开发中,NPM 包名锁定为 `dsh-coding`
|
|
9
|
-
- npm 包名:`dsh-coding`
|
|
10
|
-
- 插件 ID:`dsh-coding`
|
|
12
|
+
插件名是 `dsh-coding`,NPM 包名是 `dsh-coding`,在 DSH 中的插件显示名是 **DSH Coding**。源码与 issue 在 [ygzhang-lab/dsh-coding](https://github.com/ygzhang-lab/dsh-coding)。
|
|
11
13
|
|
|
12
|
-
##
|
|
14
|
+
## 本插件价值
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
**一切皆插件/自由过了火**
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
DSH 作为通用 Harness 基座,开源至今火出天际,但没有内置工程化任务智能体,能力依赖插件组合实现。自由是把双刃剑:社区插件生态丰富,不少插件维护滞后甚至无人维护;纯对话式、许愿式的编程方式,面对工程项目/模块构建这类长编程任务体验不佳,上下文遗忘、反复重来。
|
|
19
|
+
|
|
20
|
+
- **工程化任务设计**:内置工程化任务编排机制,Codex 五段式契约层层推进。脱离古法编程,不再靠对话框反复确认 Plan A、修复回归 Plan B。
|
|
21
|
+
- **提高任务交付质量**:每轮交付都要过门禁——需求分析充分、任务单明确、编辑完整落盘、验证真实跑过,避免“看起来做完”的常见问题。
|
|
22
|
+
- **Token 价值最大化**:Pro 模型只做需求分析与任务拆分,编辑与核查交给 Flash 子代理;工具表按阶段裁剪、交接记录有界,不为长对话和无关工具反复付费。
|
|
23
|
+
- **过程可见可回溯**:每轮一张会话控制卡片、每次 Coding 工具调用一枚阶段胶囊,都从持久事件回放;刷新、重开、翻页看到的都是当时真实的阶段与验证状态。
|
|
24
|
+
|
|
25
|
+
## 特性
|
|
26
|
+
|
|
27
|
+
| 特性 | 工作机制 |
|
|
28
|
+
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
+
| **阶段门禁由插件判定** | 模型只能提出推进请求(`requirements → plan → implement → verify → deliver`),是否放行由插件按事实决定:是否完成只读观察、是否有任务单、是否有编辑落盘、最近一次验证是否通过;被拒时返回含当前阶段、允许阶段与补救动作的 `reason` |
|
|
30
|
+
| **双层门禁,不靠提示词自律** | `tools/pre-execute` waterfall 负责友好拒绝,`ctx.tools.guard` 是单调生效的最终边界;两层共用同一个 `checkTool` 判定函数,不会漂移。门禁用 `deny` 而非 `ask`,模型看到 `Error: <reason>` 后自行纠正 |
|
|
31
|
+
| **工具按阶段物理裁剪** | 实现阶段主代理的工具表只剩 `delegate_implement`、`coding_handoff`、`todo_write`、shell(`bash` / `pwsh`)与控制类工具;编辑工具被移除,既看不见也调不到,改文件仍走 `delegate_implement`;交付阶段连命令也不授予 |
|
|
32
|
+
| **子代理隔离执行 + 模型分工** | planner / implement / verify 三个 worker 各有独立上下文、独立工具白名单与独立路由:Pro 负责勘探现状与拆分任务,Flash 负责编辑与核查。codex 下任务单严格大于三条(多文件改动)时 planner 是**强制步骤**:本会话未派发过 `delegate_plan` 就不能进入实现,派发失败也算一次尝试(尝试只记进整值 checkpoint,不新增 Session 事件);主 Agent 自身模型就是 planner 路由时跳过,`requirePlanner: off` 可整条关闭。worker 路由缺失、格式错误或模型不可用时直接失败并给出字段名与可用模型,绝不悄悄回退主代理模型。implement worker 固定携带仓库指令(`AGENTS.md`),verify worker 只在 codex 且任务复杂(多子任务或改动文件 ≥3)时才改用带指令的验证预设,普通核查保持精简 |
|
|
33
|
+
| **有界交接取代对话记忆** | 目标、约束、验收标准、决策与任务写进 `coding_handoff`,随 checkpoint 持久化,重启与翻页可恢复;注入 worker 提示词时按角色裁剪并有字符/条数上限,不把整段对话塞给子代理 |
|
|
34
|
+
| **语义化验证 + 防死循环** | `run_verification` 从项目 manifest 自动探测命令与包管理器(pnpm / npm / yarn / bun);命令级超时 `verificationTimeoutMs` 到点终止并记为失败;失败按签名计入 `maxVerifyAttempts` / `maxSameFailure`,耗尽后只放行一次 BLOCKED 交付,再次验证通过才自动清零 |
|
|
35
|
+
| **状态可见、控制回流** | 每轮一张会话控制卡片(模式、阶段路径、推理等级、验证状态、任务单进度、改动文件数),每次 Coding 工具调用一枚阶段胶囊;两者只读,控制动作一律经 `/coding` 命令回流 Host,前端不直接改状态,旧轮冻结在它实际运行的模式与阶段 |
|
|
36
|
+
| **本轮完成后一键生成交接文档** | 最新一轮卡片在该轮以 codex 交付并通过验证后出现「结束任务并生成交接文档」按钮,二次确认后把本轮目标、验收标准、交付记录、验证与改动文件写成 `<会话 cwd>/.agents/memory/<sessionId>-<YYYYMMDD-HHmmss>.md`;历史轮与非 codex 轮不显示按钮,按钮只写文档,不改变运行时状态 |
|
|
37
|
+
| **失败只播报一次** | 八个关键调度点(projection / restore / tool-table / reasoning / delegate / verification / handoff / command)的阻断性异常注入一条“运行中断”通知(原因 + 处理),不新开 Turn、不新增事件类型;同点恢复成功后自动清除 |
|
|
38
|
+
| **模式与推理等级可调** | 自动 / 问答 / 审查 / Codex 四种工作模式;推理等级支持 `auto` 按任务规模分类(问答与单文件 Low、多文件与模块级 High、项目级 Max,同一轮只升不降),也可配置固定或会话覆盖 |
|
|
39
|
+
|
|
40
|
+
## 安装
|
|
19
41
|
|
|
20
|
-
|
|
42
|
+
插件市场 / **插件** 页面:**添加插件** → 输入 `dsh-coding`(或本地目录绝对路径)。
|
|
21
43
|
|
|
22
44
|
```bash
|
|
23
45
|
dsh plugin --profile <profile> add dsh-coding
|
|
24
46
|
```
|
|
25
47
|
|
|
26
|
-
|
|
48
|
+
## 更新
|
|
27
49
|
|
|
28
|
-
|
|
50
|
+
插件市场 / **插件** 页面:**DSH Coding** → **更新**。
|
|
29
51
|
|
|
30
|
-
|
|
52
|
+
或手动更新:卸载插件再重新安装。
|
|
31
53
|
|
|
32
|
-
|
|
33
|
-
pnpm install
|
|
34
|
-
pnpm typecheck # tsc --noEmit
|
|
35
|
-
pnpm build # 输出 lib/index.js 与 lib/index.d.ts
|
|
36
|
-
pnpm test # 校验清单与构建产物
|
|
37
|
-
```
|
|
54
|
+
> 注意:插件卸载或更新后,需要重新启动 DSH 。
|
|
38
55
|
|
|
39
|
-
|
|
56
|
+
## 配置
|
|
40
57
|
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
装好后在 **插件 → DSH Coding 编程智能体** 页面可视化编辑(保存后立即生效)。`requirePlanner`、`verificationCommands`、`verificationTimeoutMs` 与两个验证预算键是普通字段(非 volatile,不出现在插件页),需改插件包配置(`cordis.patch.yml`):
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
- id: dsh-coding
|
|
62
|
+
name: "dsh-coding"
|
|
63
|
+
config:
|
|
64
|
+
defaultMode: auto # auto | consult | review | codex
|
|
65
|
+
language: auto # auto | zh | en
|
|
66
|
+
reasoning: auto # auto | low | high | max
|
|
67
|
+
plannerWorkerModel: provider/model # 必填,插件安装初始值:deepseek-account/deepseek-v4-pro
|
|
68
|
+
requirePlanner: complex # complex | off;complex 时 codex 下任务单严格大于三条必须先 delegate_plan,off 关闭该门禁
|
|
69
|
+
implementWorkerModel: provider/model # 必填,插件安装初始值:deepseek-account/deepseek-flash
|
|
70
|
+
verifyWorkerModel: provider/model # 必填,插件安装初始值:deepseek-account/deepseek-flash
|
|
71
|
+
verificationTimeoutMs: 360000 # 单次验证命令的最长运行时间(毫秒);超时终止并记为失败。0 表示不限制。
|
|
72
|
+
verificationCommands: {} # 按 kind / kind:scope 覆盖验证命令
|
|
73
|
+
maxVerifyAttempts: 5 # 验证失败重试预算:0 表示不限制。耗尽后允许 BLOCKED 交付,避免死循环。
|
|
74
|
+
maxSameFailure: 2 # 相同失败签名连续出现上限;0 表示不限制
|
|
43
75
|
```
|
|
44
76
|
|
|
45
|
-
|
|
77
|
+
默认值:planner 用 `deepseek-account/deepseek-v4-pro`(pro 模型负责勘探现状与拆分任务),implement / verify 用 `deepseek-account/deepseek-flash`(flash 模型执行编辑与核查);三个字段都可以在插件页里改。
|
|
46
78
|
|
|
47
|
-
|
|
79
|
+
插件页里三个模型字段是**下拉选择**,选项来自当前 DSH 已配置的模型目录(`ctx.remote.llm`:已注册 provider + 可配置 provider + 各自声明的模型);选错(空值,或不在已加载列表里)时字段与提示都用警告色,并禁用保存。**恢复默认**只把 `defaultMode`、三个 worker 模型、`language`、`reasoning` 回填为默认值,仍需再点保存才会写入。
|
|
48
80
|
|
|
49
|
-
|
|
50
|
-
npm view dsh-coding version
|
|
51
|
-
```
|
|
81
|
+
三个 worker 模型**不回退**主代理模型:缺失、格式不对或 provider 不存在时插件挂载失败;派发前还会校验模型是否可用(`ctx.llm.resolveModelInfo`),失败时错误给出配置字段名、当前路由与该 provider 的可用模型,修好配置后重试原调用即可。
|
|
52
82
|
|
|
53
|
-
|
|
83
|
+
## 使用
|
|
54
84
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
85
|
+
1. 新建会话,预设选择 **Coding**。worker 预设(共四个,含带仓库指令的 verify 变体)只用于 `delegate_*` 派发,不出现在预设列表。
|
|
86
|
+
2. 空白首页输入框旁可选 **工作模式**(自动 / 问答 / 审查 / Codex)。默认 **自动** 先做需求分析,再用 `coding_mode` 选定后续工作流;不确定时回退到问答。
|
|
87
|
+
3. 正常提需求:需求分析 → 规划(pro worker 勘探现状并输出单一职责子任务)→ 任务单 → 实现(flash worker)→ 验证。每个子任务写清目标、涉及文件、验收方式与不碰的范围。
|
|
88
|
+
4. **一次会话只跑一个任务**:换任务请新开会话。`coding_handoff` 的 acceptance / constraints 等字段只追加,同一会话复用会让上一个任务的验收标准继续满足新任务的门禁;目前没有清空交接记录的入口(`coding_handoff({ reset: true })` 与 `/coding reset` 只重置验证重试预算)。
|
|
59
89
|
|
|
60
|
-
|
|
90
|
+
## 最佳任务实践
|
|
61
91
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
README.md
|
|
68
|
-
LICENSE
|
|
69
|
-
package.json
|
|
70
|
-
```
|
|
92
|
+
1. 一个任务只做同方向的一类事(不是一件事),避免大而全的“许愿式任务”,提示词不要长篇大论,最重要的是明确目标和边界。
|
|
93
|
+
2. 创建项目级 AGENTS.md,记录项目背景、目标、当前状态、关键里程碑、交付物、验收标准、依赖关系、协作流程、常见问题、FAQ 等,作为需求分析的基础。
|
|
94
|
+
3. 大型工程项目建议 + 模块级(目录级) AGENTS.md,记录模块背景、目标、当前状态、交付物、验收标准、依赖关系、协作流程、常见问题、FAQ 等,作为具体工程任务的基础。
|
|
95
|
+
4. 使用 Git/GitLab 进行代码托管,按照一库一项目(服务)原则建仓管理,明确的标签化/版本号机制联动进行迭代发布。
|
|
96
|
+
5. 编程智能体基于项目(服务)创建管理会话,养成开发文档/交接文档随时更新的好习惯,脱离智能体也能确保代码的可追溯性和可回溯性。
|
|
71
97
|
|
|
72
|
-
|
|
98
|
+
| 阶段 | 主代理可以做什么 |
|
|
99
|
+
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
100
|
+
| 需求分析 requirements | 读文件、搜索、检查命令;不能改文件、不能验证、不能委派 |
|
|
101
|
+
| 规划 plan | 读 + `delegate_plan` + `todo_write`;先用 `coding_handoff` 记录 goal,再写任务单;没有任务单不能进入实现;任务单严格大于三条(多文件改动)时,未派发过 `delegate_plan` 不能进入实现——主 Agent 自身就是 planner 模型时跳过,单文件小改 1-3 条不强制 |
|
|
102
|
+
| 实现 implement | 只剩 `delegate_implement`、`coding_handoff`、`todo_write`、shell(`bash` / `pwsh`)与控制类工具;能自己跑安装、`git` 与一次性命令;编辑工具被移除,改文件仍走 `delegate_implement` |
|
|
103
|
+
| 验证 verify | 读 + `run_verification` / `delegate_verify` + `todo_write`;可跑临时命令复现失败,正式检查仍走 `run_verification`;先记录验收标准,失败按预算重试;失败不能交付 |
|
|
104
|
+
| 交付 deliver | 只读汇报;可把已完成条目勾成 completed;预算耗尽时为 BLOCKED 交付 |
|
|
73
105
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
106
|
+
| 控制类工具 | 作用 |
|
|
107
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
108
|
+
| `coding_stage` | 查看或推进阶段,放行与否由插件判定 |
|
|
109
|
+
| `coding_mode` / `coding_reasoning` | 选择工作流 / 调整推理等级 |
|
|
110
|
+
| `coding_handoff` | 读写跨阶段交接记录(goal / constraints / acceptance / findings / decisions / open / tasks / changes);`{ reset: true }` 只重置验证重试预算,不清空记录 |
|
|
111
|
+
|
|
112
|
+
| 命令 | 作用 |
|
|
113
|
+
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
114
|
+
| `/coding` | 查看当前阶段、模式、任务单与验证状态(状态行含 `handoff goal=…, acceptance=N`、`attempt N`、`BLOCKED`、`delivery BLOCKED`、派发过 planner 时的 `planner completed\|failed`) |
|
|
115
|
+
| `/coding auto / consult / review / codex` | 切换模式并新开一轮(`agent.followup()`) |
|
|
116
|
+
| `/coding set <模式>` | 静默设置模式(卡片按钮与首页选择器使用) |
|
|
117
|
+
| `/coding stage <阶段>` | 在当前轮内推进阶段(`agent.steer()`) |
|
|
118
|
+
| `/coding reset` | 重置验证重试预算(交接记录与最近一次验证结果保留) |
|
|
119
|
+
| `/coding memory` | 写出本轮任务交接文档到项目根 `.agents/memory`(卡片按钮使用同一命令) |
|
|
120
|
+
|
|
121
|
+
每轮结束处有**会话控制卡片**(模式、阶段路径、推理等级、验证状态、任务单进度、改动文件数;最新一轮可切换模式),每次 Coding 工具调用处有**阶段胶囊**。两者都从持久会话投影回放:刷新、重开、历史翻页都显示当时的真实状态,旧轮冻结在它实际运行的模式与阶段。
|
|
122
|
+
|
|
123
|
+
### 交接与验证预算
|
|
124
|
+
|
|
125
|
+
- 每个阶段的结论写进 `coding_handoff`,而不是留在对话里:planner 返回的任务、implement 报告的文件、verify 的发现会自动并入;记录随 checkpoint 持久化,重启与翻页可恢复,进入 worker 提示词时按角色裁剪并有字符/条数上限。
|
|
126
|
+
- 结构化任务必须带验收标准。codex 模式下 plan 前要有 goal,verify 前要有 acceptance,deliver 前两者都要有。
|
|
127
|
+
- 验证命令有总时限(`verificationTimeoutMs`,默认 6 分钟 = 360000 ms,可配置,`0` 不限制):到点终止并记为一次失败,避免测试脚本死循环一直等待。
|
|
128
|
+
- 验证失败按预算重试(默认 5 次失败、同一失败签名 2 次);耗尽后 `coding_stage(deliver)` 放行但标记为 BLOCKED 交付,`coding_handoff({ reset: true })` 或 `/coding reset` 重置预算,只有验证通过才自动清零——这是防止死循环的出口。
|
|
129
|
+
|
|
130
|
+
### 仓库指令(AGENTS.md)注入
|
|
131
|
+
|
|
132
|
+
- implement worker 固定携带仓库指令;verify worker 默认不带,只在 codex 模式且任务复杂时改用内部预设 `dsh-coding-verify-instructions`:判定条件是 `taskCount >= 2 || changedFiles >= 3`(多子任务代表跨任务依赖,≥3 个改动文件代表改动面大),普通单任务核查保持精简。
|
|
133
|
+
- 每次派发都是新的子会话,指令在会话启动时从磁盘读取,所以派发时读到的是最新内容;worker 运行中若指令文件被更新,上游会在该 worker 后续 `read` / `write` / `edit` 触碰文件时重新读取并注入 `Updated instructions from: …`,不会每步刷新,运行时也不缓存指令文本。
|
|
134
|
+
- **手工验证**:在 codex 会话完成一个多子任务改动后派发 verify,确认子代理会话里存在 `source.kind === 'agent-instructions'` 的 user 消息;把同一场景换成单任务单文件再派发 verify,则不应出现该消息。
|
|
135
|
+
|
|
136
|
+
### 失败提示
|
|
137
|
+
|
|
138
|
+
- 关键调度点(子代理派发、验证启动/超时、工具表裁剪、会话恢复/投影、推理等级、交接写入、控制命令)遇到阻断性异常时,下一步会注入一条**运行中断**通知,写明原因与处理方式;状态行与会话 checkpoint 同时记录 `failure <point>`。
|
|
139
|
+
- 通知只出现一次,不新开 Turn;同一环节恢复成功后自动清除,重启只恢复 `failure` 状态、不重复提示。
|
|
140
|
+
- 普通验证失败仍走预算 / BLOCKED 路径,不产生该通知。
|
|
141
|
+
- 启动即失败(worker 路由或依赖缺失)没有下一步可注入,插件挂载错误里会附一段 `What to do`。
|
|
142
|
+
|
|
143
|
+
## 文档
|
|
144
|
+
|
|
145
|
+
- [设计思路与分层结构](docs/DETAIL.md)
|
|
146
|
+
- [更新日志](docs/CHANGELOG.md)
|
|
147
|
+
- [维护者与智能体工作指南](AGENTS.md)
|
|
82
148
|
|
|
83
149
|
## 许可
|
|
84
150
|
|
package/cordis.patch.yml
CHANGED
|
@@ -1,6 +1,276 @@
|
|
|
1
|
-
# dsh-coding bundle
|
|
2
|
-
#
|
|
1
|
+
# dsh-coding bundle.
|
|
2
|
+
#
|
|
3
|
+
# One passive Host settings row plus four preset declarations:
|
|
4
|
+
# preset-dsh-coding the `Coding` preset a session selects
|
|
5
|
+
# preset-dsh-coding-implement the isolated implement worker (internal)
|
|
6
|
+
# preset-dsh-coding-verify the isolated verify worker (internal)
|
|
7
|
+
# preset-dsh-coding-verify-instructions the verify worker with repo instructions (internal)
|
|
8
|
+
#
|
|
9
|
+
# The worker presets are internal, but DSH has no hidden-preset flag, so they
|
|
10
|
+
# are declared openly, ordered last, and named as workers. Their plugin lists ARE
|
|
11
|
+
# the workers' tool whitelists: a subagent gets a fresh flat registration scope,
|
|
12
|
+
# so the parent's tool restrictions are never inherited — the composition is the
|
|
13
|
+
# only honest place to state what a worker may hold.
|
|
3
14
|
- insert:
|
|
15
|
+
# Verified configuration. `implementWorkerModel` / `verifyWorkerModel` are
|
|
16
|
+
# required `provider/model` routes: a worker never falls back to the lead's
|
|
17
|
+
# model, and an unset route fails the mount instead of spending tokens.
|
|
4
18
|
- id: dsh-coding
|
|
5
|
-
name: dsh-coding
|
|
6
|
-
config:
|
|
19
|
+
name: "dsh-coding"
|
|
20
|
+
config:
|
|
21
|
+
defaultMode: auto
|
|
22
|
+
implementWorkerModel: deepseek-account/deepseek-flash
|
|
23
|
+
plannerWorkerModel: deepseek-account/deepseek-v4-pro
|
|
24
|
+
# planner 门禁:complex 时 codex 复杂任务(任务单 >3 条)必须先派发 delegate_plan;off 关闭。
|
|
25
|
+
requirePlanner: complex
|
|
26
|
+
verifyWorkerModel: deepseek-account/deepseek-flash
|
|
27
|
+
# auto follows the DSH interface locale, then the host locale; zh/en pin it.
|
|
28
|
+
language: auto
|
|
29
|
+
# auto classifies each turn; low/high/max pin every turn.
|
|
30
|
+
reasoning: auto
|
|
31
|
+
# 验证失败重试预算:0 表示不限制。耗尽后允许 BLOCKED 交付,避免死循环。
|
|
32
|
+
maxVerifyAttempts: 5
|
|
33
|
+
# 连续相同失败签名上限:0 表示不限制。
|
|
34
|
+
maxSameFailure: 2
|
|
35
|
+
# 单次验证命令的最长运行时间(毫秒);超时终止并记为失败。0 表示不限制。
|
|
36
|
+
verificationTimeoutMs: 360000
|
|
37
|
+
verificationCommands: {}
|
|
38
|
+
|
|
39
|
+
- id: preset-dsh-coding
|
|
40
|
+
name: "@deepseek-ai/dsh-agent-preset"
|
|
41
|
+
config:
|
|
42
|
+
id: dsh-coding
|
|
43
|
+
name: Coding
|
|
44
|
+
description: >-
|
|
45
|
+
DSH 编程智能体运行时:工程化任务编排机制,Codex 五段式契约层层推进,确保任务交付质量和 Token 价值最大化。
|
|
46
|
+
When the DSH programming intelligent agent runs, it employs an engineered task orchestration mechanism,
|
|
47
|
+
utilizing the Codex five-stage contract to progress step by step, ensuring task delivery quality and maximizing token value.
|
|
48
|
+
order: 4
|
|
49
|
+
plugins:
|
|
50
|
+
# Identity and temperament only. The workflow contract is injected per
|
|
51
|
+
# stage by dsh-coding/preset, one fragment at a time — never as a global
|
|
52
|
+
# system prompt that the model can re-read but the runtime cannot enforce.
|
|
53
|
+
- id: persona
|
|
54
|
+
name: "@deepseek-ai/dsh-persona"
|
|
55
|
+
config:
|
|
56
|
+
prefix: |-
|
|
57
|
+
You are the Coding agent of the DeepSeek Harness (DSH): a pragmatic senior software engineer assigned to this repository. {{model}} is the model behind you; DSH supplies the workspace, the tools, and this session.
|
|
58
|
+
|
|
59
|
+
What you optimize for:
|
|
60
|
+
- Ground truth over recall. Inspect the real file, run the real command, read the real error before deciding. Never claim a check you did not run.
|
|
61
|
+
- The smallest correct change. Reuse existing patterns, functions, and types; add no abstraction, dependency, or drive-by refactor the task does not need.
|
|
62
|
+
- A user who is better informed after every turn. Say plainly what you did, what you found, what you could not verify, and what you need next.
|
|
63
|
+
|
|
64
|
+
How you show up: direct, concrete, calm. No flattery, no filler, no self-narration. Short sentences with real paths, commands, and file:line references instead of pasted walls of text. Admit a mistake or a dead end quickly.
|
|
65
|
+
|
|
66
|
+
The runtime below enforces the coding rhythm: it decides which stage you are in, which tools you may use, and whether verification passed. Treat a refusal as the rule, not as a suggestion to work around.
|
|
67
|
+
includeRuntimeContext: true
|
|
68
|
+
|
|
69
|
+
- id: agent-instructions
|
|
70
|
+
name: "@deepseek-ai/dsh-agent-instructions"
|
|
71
|
+
config:
|
|
72
|
+
maxBytes: 65536
|
|
73
|
+
|
|
74
|
+
- id: tool-bash
|
|
75
|
+
name: "@deepseek-ai/dsh-tool-bash"
|
|
76
|
+
disabled: !!js process.platform === 'win32'
|
|
77
|
+
- id: tool-pwsh
|
|
78
|
+
name: "@deepseek-ai/dsh-tool-pwsh"
|
|
79
|
+
disabled: !!js process.platform !== 'win32'
|
|
80
|
+
- id: tool-fs
|
|
81
|
+
name: "@deepseek-ai/dsh-tool-fs"
|
|
82
|
+
config:
|
|
83
|
+
# `apply_patch` here would be the built-in editor; the Coding runtime
|
|
84
|
+
# registers the Codex-format editor itself so the lead can lose it.
|
|
85
|
+
applyPatch: false
|
|
86
|
+
- id: tool-fs-search
|
|
87
|
+
name: "@deepseek-ai/dsh-tool-fs-search"
|
|
88
|
+
config:
|
|
89
|
+
sampleOverCapGlobResults: false
|
|
90
|
+
- id: tool-jobs
|
|
91
|
+
name: "@deepseek-ai/dsh-tool-jobs"
|
|
92
|
+
- id: tool-todo
|
|
93
|
+
name: "@deepseek-ai/dsh-tool-todo"
|
|
94
|
+
config:
|
|
95
|
+
allowParallelInProgress: true
|
|
96
|
+
- id: tool-web
|
|
97
|
+
name: "@deepseek-ai/dsh-tool-web"
|
|
98
|
+
config:
|
|
99
|
+
fetch: true
|
|
100
|
+
searchTimeoutMs: 60000
|
|
101
|
+
|
|
102
|
+
- id: skill-filesystem
|
|
103
|
+
name: "@deepseek-ai/dsh-skill-filesystem"
|
|
104
|
+
- id: tool-skill
|
|
105
|
+
name: "@deepseek-ai/dsh-tool-skill"
|
|
106
|
+
|
|
107
|
+
# The Codex patch editor. The stage gate refuses it outside a stage
|
|
108
|
+
# that admits writes, and `implement` also removes it from the table.
|
|
109
|
+
- id: dsh-coding-editor
|
|
110
|
+
name: "dsh-coding/editor"
|
|
111
|
+
|
|
112
|
+
# The enforced runtime: stage machine, dual gate, delegation tools,
|
|
113
|
+
# structured verification, per-stage contract injection.
|
|
114
|
+
- id: dsh-coding-preset
|
|
115
|
+
name: "dsh-coding/preset"
|
|
116
|
+
|
|
117
|
+
- id: compaction
|
|
118
|
+
name: cordis:group
|
|
119
|
+
group: true
|
|
120
|
+
isolate:
|
|
121
|
+
compaction: true
|
|
122
|
+
toolResultPruner: true
|
|
123
|
+
config:
|
|
124
|
+
- id: compaction-basic
|
|
125
|
+
name: "@deepseek-ai/dsh-compaction-basic"
|
|
126
|
+
config:
|
|
127
|
+
auto: false
|
|
128
|
+
- id: command-compact
|
|
129
|
+
name: "@deepseek-ai/dsh-command-compact"
|
|
130
|
+
- id: tool-result-pruner
|
|
131
|
+
name: "@deepseek-ai/dsh-compaction-tool-result-pruner"
|
|
132
|
+
config:
|
|
133
|
+
thresholdChars: 8192
|
|
134
|
+
headChars: 4096
|
|
135
|
+
tailChars: 1024
|
|
136
|
+
|
|
137
|
+
# Planner worker: read + search + web only. It explores the project and
|
|
138
|
+
# produces a single-purpose task list; it cannot edit, run a shell, or
|
|
139
|
+
# delegate further.
|
|
140
|
+
- id: preset-dsh-coding-planner
|
|
141
|
+
name: "@deepseek-ai/dsh-agent-preset"
|
|
142
|
+
config:
|
|
143
|
+
id: dsh-coding-planner
|
|
144
|
+
name: Coding planner worker
|
|
145
|
+
description: >-
|
|
146
|
+
Internal worker of the Coding preset: explores the workspace and returns a
|
|
147
|
+
single-purpose task list from the requirement. Dispatched by delegate_plan.
|
|
148
|
+
order: 89
|
|
149
|
+
plugins:
|
|
150
|
+
- id: persona
|
|
151
|
+
name: "@deepseek-ai/dsh-persona"
|
|
152
|
+
config:
|
|
153
|
+
prefix: |-
|
|
154
|
+
You are the planner worker of the DSH Coding runtime. You have a fresh context: the delegating agent's requirement is complete on its own. Explore the workspace with read, glob, grep, and web; you may not edit files, run a shell, or delegate further. Produce a plan of single-purpose sub-tasks, each doing exactly one thing.
|
|
155
|
+
includeRuntimeContext: false
|
|
156
|
+
- id: tool-fs
|
|
157
|
+
name: "@deepseek-ai/dsh-tool-fs"
|
|
158
|
+
config:
|
|
159
|
+
applyPatch: false
|
|
160
|
+
write: false
|
|
161
|
+
edit: false
|
|
162
|
+
- id: tool-fs-search
|
|
163
|
+
name: "@deepseek-ai/dsh-tool-fs-search"
|
|
164
|
+
config:
|
|
165
|
+
sampleOverCapGlobResults: false
|
|
166
|
+
- id: tool-web
|
|
167
|
+
name: "@deepseek-ai/dsh-tool-web"
|
|
168
|
+
config:
|
|
169
|
+
fetch: true
|
|
170
|
+
searchTimeoutMs: 60000
|
|
171
|
+
|
|
172
|
+
# Implement worker: read, search, write, edit, and the Codex apply_patch
|
|
173
|
+
# editor. No shell, no web, no delegation — it cannot widen its own scope.
|
|
174
|
+
- id: preset-dsh-coding-implement
|
|
175
|
+
name: "@deepseek-ai/dsh-agent-preset"
|
|
176
|
+
config:
|
|
177
|
+
id: dsh-coding-implement
|
|
178
|
+
name: Coding implement worker
|
|
179
|
+
description: >-
|
|
180
|
+
Internal worker of the Coding preset: edits files from a self-contained brief and
|
|
181
|
+
reports the files it changed. Dispatched by delegate_implement.
|
|
182
|
+
order: 90
|
|
183
|
+
plugins:
|
|
184
|
+
- id: persona
|
|
185
|
+
name: "@deepseek-ai/dsh-persona"
|
|
186
|
+
config:
|
|
187
|
+
prefix: |-
|
|
188
|
+
You are the implement worker of the DSH Coding runtime. You have a fresh context: the delegating agent's brief is complete on its own. You may read, search, and edit files; you may not run shell commands, use the web, or delegate further.
|
|
189
|
+
|
|
190
|
+
Work in small, reviewable edits: read before you write, change only what the brief needs, and never commit, push, or tag. When you are done, report through structured_output — the files you changed are the evidence the lead verifies.
|
|
191
|
+
includeRuntimeContext: false
|
|
192
|
+
- id: tool-fs
|
|
193
|
+
name: "@deepseek-ai/dsh-tool-fs"
|
|
194
|
+
config:
|
|
195
|
+
applyPatch: false
|
|
196
|
+
write: true
|
|
197
|
+
edit: true
|
|
198
|
+
- id: tool-fs-search
|
|
199
|
+
name: "@deepseek-ai/dsh-tool-fs-search"
|
|
200
|
+
config:
|
|
201
|
+
sampleOverCapGlobResults: false
|
|
202
|
+
- id: agent-instructions
|
|
203
|
+
name: "@deepseek-ai/dsh-agent-instructions"
|
|
204
|
+
config:
|
|
205
|
+
maxBytes: 65536
|
|
206
|
+
- id: dsh-coding-editor
|
|
207
|
+
name: "dsh-coding/editor"
|
|
208
|
+
|
|
209
|
+
# Verify worker: read-only. `run_verification` is its only way to execute
|
|
210
|
+
# anything, and that tool cannot write a file.
|
|
211
|
+
- id: preset-dsh-coding-verify
|
|
212
|
+
name: "@deepseek-ai/dsh-agent-preset"
|
|
213
|
+
config:
|
|
214
|
+
id: dsh-coding-verify
|
|
215
|
+
name: Coding verify worker
|
|
216
|
+
description: >-
|
|
217
|
+
Internal worker of the Coding preset: runs checks read-only and reports findings with
|
|
218
|
+
evidence. Dispatched by delegate_verify.
|
|
219
|
+
order: 91
|
|
220
|
+
plugins:
|
|
221
|
+
- id: persona
|
|
222
|
+
name: "@deepseek-ai/dsh-persona"
|
|
223
|
+
config:
|
|
224
|
+
prefix: |-
|
|
225
|
+
You are the verify worker of the DSH Coding runtime. You hold no edit tool: you read files, search them, and run checks through run_verification. Never claim a passing check you did not run; report findings with file:line and a reproducible scenario, ordered by impact.
|
|
226
|
+
includeRuntimeContext: false
|
|
227
|
+
- id: tool-fs
|
|
228
|
+
name: "@deepseek-ai/dsh-tool-fs"
|
|
229
|
+
config:
|
|
230
|
+
applyPatch: false
|
|
231
|
+
write: false
|
|
232
|
+
edit: false
|
|
233
|
+
readImage: false
|
|
234
|
+
- id: tool-fs-search
|
|
235
|
+
name: "@deepseek-ai/dsh-tool-fs-search"
|
|
236
|
+
config:
|
|
237
|
+
sampleOverCapGlobResults: false
|
|
238
|
+
- id: dsh-coding-verifier
|
|
239
|
+
name: "dsh-coding/verifier"
|
|
240
|
+
|
|
241
|
+
# Verify worker with repository instructions. Dispatched only for a codex run
|
|
242
|
+
# that spans dependent sub-tasks or a broad change; a single-task check stays
|
|
243
|
+
# on the lean preset above.
|
|
244
|
+
- id: preset-dsh-coding-verify-instructions
|
|
245
|
+
name: "@deepseek-ai/dsh-agent-preset"
|
|
246
|
+
config:
|
|
247
|
+
id: dsh-coding-verify-instructions
|
|
248
|
+
name: Coding verify worker (repo instructions)
|
|
249
|
+
description: >-
|
|
250
|
+
Internal worker of the Coding preset: the verify worker with the repository
|
|
251
|
+
instructions injected. Dispatched by delegate_verify for a complex codex run.
|
|
252
|
+
order: 92
|
|
253
|
+
plugins:
|
|
254
|
+
- id: persona
|
|
255
|
+
name: "@deepseek-ai/dsh-persona"
|
|
256
|
+
config:
|
|
257
|
+
prefix: |-
|
|
258
|
+
You are the verify worker of the DSH Coding runtime. You hold no edit tool: you read files, search them, and run checks through run_verification. Never claim a passing check you did not run; report findings with file:line and a reproducible scenario, ordered by impact.
|
|
259
|
+
includeRuntimeContext: false
|
|
260
|
+
- id: tool-fs
|
|
261
|
+
name: "@deepseek-ai/dsh-tool-fs"
|
|
262
|
+
config:
|
|
263
|
+
applyPatch: false
|
|
264
|
+
write: false
|
|
265
|
+
edit: false
|
|
266
|
+
readImage: false
|
|
267
|
+
- id: tool-fs-search
|
|
268
|
+
name: "@deepseek-ai/dsh-tool-fs-search"
|
|
269
|
+
config:
|
|
270
|
+
sampleOverCapGlobResults: false
|
|
271
|
+
- id: dsh-coding-verifier
|
|
272
|
+
name: "dsh-coding/verifier"
|
|
273
|
+
- id: agent-instructions
|
|
274
|
+
name: "@deepseek-ai/dsh-agent-instructions"
|
|
275
|
+
config:
|
|
276
|
+
maxBytes: 65536
|