dsh-taskbridge 1.5.0 → 1.5.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.
- package/CHANGELOG.md +26 -0
- package/README.md +279 -28
- package/codex/dsh-taskbridge.toml +107 -12
- package/docs/INTRODUCTION.md +261 -9
- package/docs/INTRODUCTION.zh.md +254 -21
- package/docs/assets/taskbridge-workflow.en.png +0 -0
- package/docs/assets/taskbridge-workflow.zh.png +0 -0
- package/docs/claude-code.md +14 -22
- package/docs/codex-integration.md +9 -13
- package/docs/plugin-market.md +1 -1
- package/docs/releases/1.5.1.zh.md +70 -0
- package/docs/releases/1.5.2.zh.md +30 -0
- package/docs/runtime-compatibility.md +4 -4
- package/docs/silent-wait.md +75 -5
- package/docs/taskbridge-upgrade.md +1 -1
- package/docs/worker-permissions.md +1 -1
- package/lib/client.js +295 -103
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +10 -4
- package/src/client/api.js +289 -34
- package/src/client/index.jsx +151 -67
- package/src/codex/installer.js +239 -11
- package/src/http/execution-plane.js +48 -5
- package/src/index.d.ts +62 -0
- package/src/index.js +18 -5
- package/src/jobs/activity.js +92 -9
- package/src/jobs/continuation-identity.js +283 -278
- package/src/jobs/engine.js +165 -19
- package/src/jobs/history.js +43 -0
- package/src/mcp/metrics.js +366 -343
- package/src/mcp/server.js +127 -9
- package/src/mcp/wait.js +77 -4
- package/src/runtime/agent-runner.js +165 -0
- package/src/runtime/sandbox.js +363 -358
- package/src/runtime/session-placement.js +1207 -1194
- package/src/version.js +121 -99
- package/src/workspace/worktrees.js +70 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.2 — 产品介绍更新(2026-11-15)
|
|
4
|
+
|
|
5
|
+
- 重写插件列表与 npm 简介,突出让 Codex 指挥 DSH,并在插件中配置已有 API、执行模型和思考强度。
|
|
6
|
+
- 重写中英文详情页,按用途、任务流程、核心功能和上手步骤组织,补充设置表、任务状态、使用示例、常见问题和中英文任务流程图。
|
|
7
|
+
- 同步 README 开头的产品介绍,将历史更新与测量材料放回对应文档入口。
|
|
8
|
+
- 明确当前仅支持 Codex 端,Claude Code 与 Claude Desktop 接入预计在 2.0 上线;同步旧接入文档为路线说明。
|
|
9
|
+
- 功能沿用 1.5.1;同步发布版本和旧版 Codex 托管模板身份,保持原版集成可升级、自定义内容不覆盖。无新增执行功能或 token 节省比例声明。
|
|
10
|
+
|
|
11
|
+
## 1.5.1 — 自动保存、集成升级与可靠提醒(2026-11-15)
|
|
12
|
+
|
|
13
|
+
- 连续工具失败提醒增加稳定事件 ID;取出提醒不再提前消费,HTTP 或 MCP 回包丢失后可重新取得同一事件。
|
|
14
|
+
- `delegate_wait` 新增可选 `ackFailureEventId` 并返回 `failureAck`;确认幂等,错误 ID 不会清除待处理提醒。已收到的确认事实在后续网络错误、取消及审查落盘等待中保留,并发观察各自携带自己的回执。
|
|
15
|
+
- 更新托管 Codex 规则,按任务 ID 与事件 ID 去重、处理后确认;识别正式 1.5.0 的 LF/CRLF 原版模板以支持迁移,保留用户自定义规则。旧参数仍可调用;未确认事件会重放,旧宿主需同步更新处理规则。
|
|
16
|
+
- 修复长会话 `delegate_metrics` 因历史样本过多而整体报 `MCP_RESULT_OVER_BUDGET`:等待和决定样本各显示最近 8 条,累计数完整保留,明确列出全部未展示记录数,普通问答计入共享样本轴。
|
|
17
|
+
- 修复长审批与问答压缩时丢失 `failureAck` 的问题;问答救援路径补充生产桥接受的超大问题集回归。最终 `MCP_RESULT_OVER_BUDGET` 拒绝兜底尚未独立复现,不宣称覆盖。
|
|
18
|
+
- 设置页自动保存:文本输入防抖、离散选择及时保存、串行写入避免旧响应覆盖新输入;无效草稿可继续修正,移除底部两个保存按钮。
|
|
19
|
+
- 修复任务详情与完整审查意见展示,重复打开或切换任务时定位到详情;后台刷新不抢焦点,不用摘要替换已加载全文。
|
|
20
|
+
- 新增逐任务 `agentTeams` 选择,由指挥官按复杂度决定 DSH 团队模式;不改变用户选定的 API、模型和思考强度。续接继承原决定,显式值可覆盖,实际应用读回验证。原生子成员提权不由本插件桥接,需额外权限的操作仍由 root 执行并逐次审批。
|
|
21
|
+
- 修复 DSH 重启后隔离工作区无法续接:从已验证任务身份、真实目录和 Git 登记恢复原工作区,保留候选修改,不创建替代副本;缺失、身份不符、分支替换或已处置的目录继续拒绝。
|
|
22
|
+
- 统一托管规则:正常执行只静默等待;审批核验具体操作;交付后集中、有界读取与审查;同链身份无变化时复用预检事实,审查结果确认持久化。用真实 1.5.0 的 LF/CRLF 发布模板验证迁移、幂等和自定义规则保护。
|
|
23
|
+
- 修复迁移过 Codex 配置目录的机器每次更新都误报冲突:允许选定的 home 根目录为正常 symlink/Windows junction,将各安装、修复、移除和启动刷新操作固定到真实目录;保留根目录链接和用户自定义配置保护,不改变全局 CODEX_HOME。
|
|
24
|
+
- 登记已安装的 1.5.1-test.1 托管模板的准确 LF/CRLF 身份,支持后续候选升级;补充经真实 junction 升级原版模板、再次幂等及自定义文件保留的回归。
|
|
25
|
+
- 修复热更新时沿用旧清单缓存、将新规则误写成旧版本的问题:每次激活从当前包清单刷新版本;登记已观察到的本地测试版旧版本戳模板,支持准确迁移,继续保留自定义文件。真实热更新和重启结果见本轮验收报告。
|
|
26
|
+
- 本轮候选完整回归 1566 项通过;同步正式版本和补充 test.3 升级验证后,正式源码完整回归 1567 项通过,无失败、跳过或取消;前端构建产物检查通过。原生设置自动保存、任务详情与完整审查意见已实测;真实 DSH 任务确认团队关闭成功。夹具注入的事件测试不冒充全真模型验收。
|
|
27
|
+
- 真实模型验收通过失败提醒重放、错误确认保留、正确与重复确认、90 秒静默等待以及集中审查持久化;支持已安装 test.3 候选准确迁移到正式版。版本范围、升级方式和已知限制见 docs/releases/1.5.1.zh.md;未新增跨进程提醒持久化,不宣称新的 token 节省比例。
|
|
28
|
+
|
|
3
29
|
## 1.5.0 — 静默等待、提问与审批闭环(2026-11-15)
|
|
4
30
|
|
|
5
31
|
- 新增 `delegate_question_answer`,转交 DSH 原生普通问题;回答后可在同一次调用继续静默等待。问题有有效期,并绑定原 Agent、Session 和工具调用;回答不授予权限。
|
package/README.md
CHANGED
|
@@ -1,32 +1,282 @@
|
|
|
1
1
|
# DSH TaskBridge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**让 Codex 指挥 DSH 工作,在 DSH 插件里选择执行所用的 API、模型和思考强度。**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **当前支持 Codex 端。Claude Code 与 Claude Desktop 接入预计在 2.0 版本上线。**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[English](docs/INTRODUCTION.md) · [安装与接入](#安装与接入) · [设置说明](#设置说明) · [常见问题](#常见问题) · [更新日志](CHANGELOG.md)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- [从 DSH Delegate/TaskDispatch 迁移到 TaskBridge](docs/taskbridge-upgrade.md):包名为 `dsh-taskbridge`,保留旧数据和 MCP 技术标识,不要同时启用新旧插件。
|
|
11
|
-
- [在 DSH“发现”中搜索和安装](docs/plugin-market.md):添加本项目的自定义索引,安装源固定到本项目的 Git 提交。
|
|
12
|
-
- [Claude Code 手动 MCP 接入](docs/claude-code.md);Codex 继续使用设置页的安装/修复按钮。Claude Code 的一键安装按钮和真实客户端验收尚未完成。
|
|
13
|
-
- [1.5.0 更新说明](docs/releases/1.5.0.zh.md):新增提问工具、审批/回答后同调用续等;Windows 实际重启续接与超过20分钟真实通道验收通过。[Codex token 对照](docs/releases/1.5.0-token-benchmark.zh.md)给出等待阶段样本的实测结果和适用边界。
|
|
14
|
-
- [1.4.0 更新说明](docs/releases/1.4.0.zh.md):长等待规则、重复失败提醒和宿主审查结果写回;[等待阶段 token 测量](docs/releases/1.4.0-token-benchmark.zh.md)说明短时样本的 66.58% 降幅及适用边界。历史 [1.3.2 更新说明](docs/releases/1.3.2.zh.md)保留。
|
|
9
|
+
TaskBridge 是安装在 **DeepSeek Harness(DSH)** 中的任务委派插件。你继续在熟悉的 Codex 中描述需求,由指挥端理解目标、规划任务、处理执行中的申请并审查交付;DSH 中的执行模型负责修改文件、运行命令、测试和提交工作结果。
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
已配置的接口执行任务,执行结果回到宿主(例如 Codex)自行验收。
|
|
11
|
+
**你决定用哪个模型,指挥端决定如何安排工作,DSH 负责把任务做出来。** 从派工、等待到审查和返工,TaskBridge 把两端接在同一条任务流程里。
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
关闭时拒绝新的委派任务,并请求停止正在运行的任务。
|
|
13
|
+

|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
> 位于 [GitHub](https://github.com/ranranyya/dsh-taskbridge)。npm 安装标识为 **`dsh-taskbridge`**,
|
|
24
|
-
> GitHub Release 同时提供 `.tgz`。`1.1.0` 的静默等待说明见
|
|
25
|
-
> [`docs/silent-wait.md`](./docs/silent-wait.md);`1.2.0` 修正了其中三处真实问题(等待中断的
|
|
26
|
-
> 语义、串行宿主下的控制能力、已安装 Codex 集成升级遗漏),见第 7.4 节。
|
|
15
|
+
*任务流程示意图。正常执行期间由程序等待,需要判断时回到指挥端;审查后的修正沿用原任务会话。*
|
|
27
16
|
|
|
28
|
-
|
|
17
|
+
## 为什么使用 TaskBridge
|
|
29
18
|
|
|
19
|
+
如果你习惯让 Codex 理解项目、制定方案和检查质量,同时又希望使用 DSH 中已经接入的模型完成实现,TaskBridge 可以让这个分工直接落地。
|
|
20
|
+
|
|
21
|
+
- **不用来回复制任务和结果**:指挥端通过 MCP 派工,交付后读取改动与验证证据,继续完成审查。
|
|
22
|
+
- **不用反复告诉指挥端选哪个 API**:在 DSH 插件里选好提供方、模型和思考强度,任务按有效配置执行。
|
|
23
|
+
- **不用靠模型频繁“查看进度”维持等待**:程序持续观察执行活动,只在需要判断的节点返回。
|
|
24
|
+
- **返工不用重新开一个毫无上下文的任务**:将问题集中成修正清单,续接原来的 DSH 会话和执行工作区。
|
|
25
|
+
- **执行与验收各有记录**:任务完成、附加模型意见、指挥端审查结论分别展示,方便判断工作究竟进行到哪一步。
|
|
26
|
+
|
|
27
|
+
适合功能开发、缺陷修复、测试补充、代码整理和项目文档等任务。使用成本仍包括指挥端和执行端各自的模型调用;静默等待减少的是重复查询与搬运中间结果产生的开销。
|
|
28
|
+
|
|
29
|
+
## 功能概览
|
|
30
|
+
|
|
31
|
+
| 功能 | 你可以做什么 |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| **已有 API 连接** | 选择 DSH 已启用的接口,无需重复填写地址与密钥。 |
|
|
34
|
+
| **执行模型与思考强度** | 自行选择执行模型和它支持的强度,配置任务超时、并发和隔离方式。 |
|
|
35
|
+
| **Codex 集成按钮** | 安装/更新 TaskBridge 智能体、MCP 连接和派工规则,也可单独修复 MCP。 |
|
|
36
|
+
| **一个委派总开关** | 控制本机是否允许派工,随时关闭新的委派入口。 |
|
|
37
|
+
| **静默等待** | 执行期间由程序等待,审批、提问、异常和交付时交回指挥端。 |
|
|
38
|
+
| **逐次权限判断** | 根据具体操作决定是否允许,处理后继续等待原任务。 |
|
|
39
|
+
| **任务工作区与会话续接** | 按工作内容命名工作区;独立任务新建会话,修正任务明确续接。 |
|
|
40
|
+
| **集中审查** | 交付后统一查看改动、测试和证据,写回通过或需要修正的结论。 |
|
|
41
|
+
| **可选附加模型审查** | 单独选择审查模型与思考强度,增加一份只读复审意见。 |
|
|
42
|
+
| **设置自动保存** | 开关与选择及时保存,文本输入停顿后合并保存,页面显示保存结果。 |
|
|
43
|
+
| **预设与项目覆盖** | 保存常用执行/审查组合,让不同项目使用各自的配置。 |
|
|
44
|
+
| **任务记录与详情** | 查看阶段、实际模型、最近活动、权限决定、变更与完整审查意见。 |
|
|
45
|
+
|
|
46
|
+
## 安装与接入
|
|
47
|
+
|
|
48
|
+
### 1. 在 DSH 中安装
|
|
49
|
+
|
|
50
|
+
打开 **插件 → 添加插件**,输入:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
dsh-taskbridge
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
也可以指定本次版本:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
dsh-taskbridge@1.5.2
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
安装后启用 **DSH TaskBridge**,进入该插件的设置页面。若使用的区域镜像尚未同步新版本,可切换到 npm 官方源;本项目 GitHub Release 也提供 `.tgz` 安装包。
|
|
63
|
+
|
|
64
|
+
TaskBridge 可独立使用,**不需要先安装 dsh-crew**。DSH 负责提供执行环境;本机 MCP 入口需要 Node.js 24 或更高版本,Codex 安装器会检查可用运行时。
|
|
65
|
+
|
|
66
|
+
### 2. 选择 API、模型与思考强度
|
|
67
|
+
|
|
68
|
+
在 **接口管理** 中,从“DSH 已启用的接口”选择你已配置的提供方并添加。然后进入 **执行设置**,选择提供方、模型及它支持的思考强度。
|
|
69
|
+
|
|
70
|
+
这里复用 DSH 的模型连接,密钥仍由 DSH 管理。若接口不在列表中,先到 DSH 自身的模型/API 设置中配置并启用,再刷新插件目录。
|
|
71
|
+
|
|
72
|
+
修改会自动保存。确认页面显示“已保存”或“所有修改已保存”后,再开始派工。
|
|
73
|
+
|
|
74
|
+
### 3. 接入指挥端
|
|
75
|
+
|
|
76
|
+
打开 **Codex 集成**,点击 **安装 / 更新 TaskBridge 智能体**。按钮会配置:
|
|
77
|
+
|
|
78
|
+
- **TaskBridge 智能体**:写入 `agents/dsh-taskbridge.toml`。
|
|
79
|
+
- **MCP 连接**:登记本插件的工具入口。
|
|
80
|
+
- **指挥规则**:包含明确派工、静默等待、权限判断、集中审查与原任务续接。
|
|
81
|
+
|
|
82
|
+
安装后重新加载 Codex。在支持智能体提及的客户端中,可选择 `@dsh-taskbridge` 并说明任务;输入框是否提供 `@` 选择由客户端决定。
|
|
83
|
+
|
|
84
|
+
首次集成由你点击安装触发;后续可更新本插件管理且未被自行修改的条目。**Claude Code 和 Claude Desktop 尚未作为当前版本的接入端提供,预计在 2.0 上线。**
|
|
85
|
+
|
|
86
|
+
### 4. 开启委派并给出第一项任务
|
|
87
|
+
|
|
88
|
+
开启页面顶部 **允许本机 MCP 调用 DSH 委派**,然后在指挥端给出目标、允许修改的项目和验收标准。例如:
|
|
89
|
+
|
|
90
|
+
> 通过 TaskBridge 修复当前项目中设置修改后不生效的问题。你负责规划和最终审查,让 DSH 按插件选定的模型执行。只修改设置保存相关代码,保留现有交互;补充回归验证。交付后检查修改与测试,有问题就续接原任务修正。
|
|
91
|
+
|
|
92
|
+
指挥端会先检查连接与工作区,再提交任务。你可以在 DSH 的工作区会话中查看执行过程,在插件的 **任务记录** 中查看阶段与交付情况。
|
|
93
|
+
|
|
94
|
+
## 一项任务如何完成
|
|
95
|
+
|
|
96
|
+
| 阶段 | 指挥端负责 | DSH / TaskBridge 负责 |
|
|
97
|
+
| --- | --- | --- |
|
|
98
|
+
| **规划** | 理解需求,明确范围和验收标准,必要时拆分任务。 | 提供连接状态和工作区预检信息。 |
|
|
99
|
+
| **派工** | 提交清晰的目标、项目路径和任务标题。 | 按有效配置启动执行,建立任务记录与会话。 |
|
|
100
|
+
| **执行** | 进入等待。 | 修改文件、运行工具与测试;程序记录活动并持续等待。 |
|
|
101
|
+
| **申请或提问** | 判断具体权限申请,回答执行所需问题。 | 暂停相应操作,提供依据,接收决定后继续原任务。 |
|
|
102
|
+
| **交付** | 集中检查实际改动、测试结果和未解决问题。 | 提供结果与证据;启用附加审查时提供复审意见。 |
|
|
103
|
+
| **验收或修正** | 写回审查结论;有问题时整理一轮修正清单。 | 保存结论,或续接原会话与执行工作区。 |
|
|
104
|
+
|
|
105
|
+
“执行完成”表示执行者交回了结果;“审查通过”表示指挥端已经验收。两者在任务记录中分别呈现。
|
|
106
|
+
|
|
107
|
+
## 设置说明
|
|
108
|
+
|
|
109
|
+
插件设置包含 **接口管理、执行设置、附加审查、任务记录、Codex 集成** 五个页签;本机调用总开关位于页签上方。
|
|
110
|
+
|
|
111
|
+
### API、模型与执行参数
|
|
112
|
+
|
|
113
|
+
| 设置 | 作用与使用方式 |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| **提供方** | 选择 DSH 已启用、且已加入插件的 API 连接。 |
|
|
116
|
+
| **执行模型** | 选择负责实现任务的模型。实际使用的提供方与模型会写入任务详情。 |
|
|
117
|
+
| **思考强度** | 使用所选模型声明支持的档位;可用选项随模型变化。 |
|
|
118
|
+
| **超时** | 单项任务的总时间预算,默认 1800 秒;停滞检查不会自动延长预算。 |
|
|
119
|
+
| **最大并发** | 限制同时执行的任务数,默认 1;是否拆分多个任务由指挥端结合任务决定。 |
|
|
120
|
+
| **工作区隔离** | 选择独立 Git 工作树或共享项目目录,决定执行者在哪里修改文件。 |
|
|
121
|
+
| **预设** | 保存常用的执行/审查组合,便于切换。 |
|
|
122
|
+
| **项目覆盖** | 为匹配的项目设置专用组合,优先于全局配置。 |
|
|
123
|
+
|
|
124
|
+
**执行模型由你选择。** 指挥端的托管规则要求尊重插件配置,不自行替换 API、模型或思考强度。选中的组合不可用时会报告原因,不会悄悄换成另一个模型。
|
|
125
|
+
|
|
126
|
+
设置修改用于后续派工;已运行的任务保留提交时的配置快照。页面显示的“未保存”或保存错误需要修正,不能将未保存的草稿当作已生效配置。
|
|
127
|
+
|
|
128
|
+
### 独立工作树与共享工作区
|
|
129
|
+
|
|
130
|
+
| 模式 | 文件在哪里修改 | 适用情况 |
|
|
131
|
+
| --- | --- | --- |
|
|
132
|
+
| **独立工作树(默认)** | 从源仓库已提交的版本创建独立 Git 工作树。 | 希望候选修改与当前开发目录隔离,交付后统一审查与整合。 |
|
|
133
|
+
| **共享工作区** | 直接修改授权的项目目录。 | 你明确希望执行者处理当前目录,包括现有未提交内容。 |
|
|
134
|
+
|
|
135
|
+
独立工作树需要可用的 Git 仓库和提交基线;源目录有未提交修改时会被预检拦截,避免执行者拿到旧版本。先整理提交,或在理解影响后明确选择共享模式。
|
|
136
|
+
|
|
137
|
+
**审查通过不会自动合并工作树、创建提交或推送。** 如何将候选改动整合回项目,仍按你给指挥端的任务范围处理。
|
|
138
|
+
|
|
139
|
+
### 一个开关控制调用
|
|
140
|
+
|
|
141
|
+
新安装默认关闭本机调用开关;安装插件或仅提到 DSH 不会自动启动任务。打开开关后,指挥端仍需收到明确的委派要求。
|
|
142
|
+
|
|
143
|
+
关闭开关会拒绝新任务,并请求停止正在运行的任务。本机使用无需手动签发连接或复制授权签名。
|
|
144
|
+
|
|
145
|
+
### 可选附加模型审查
|
|
146
|
+
|
|
147
|
+
在 **附加审查** 中开启“启用附加模型审查”,并单独选择审查所用的 API、模型与思考强度。
|
|
148
|
+
|
|
149
|
+
它会读取交付的改动与证据,提出检查意见,适合为重要修改增加一道复核。该审查是**只读**的,会增加一次审查模型的工作与相应费用;它不修改文件,也不代替指挥端最终验收。关闭后仍由指挥端完成审查。
|
|
150
|
+
|
|
151
|
+
## 静默等待:执行时程序等待,判断时模型介入
|
|
152
|
+
|
|
153
|
+
静默等待的目标是减少“执行者还在干活,指挥模型却反复读状态和中间代码”的重复工作。
|
|
154
|
+
|
|
155
|
+
| 发生的情况 | 处理方式 |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| 有新的输出、思考活动或工具事件 | 更新活动时间,程序继续等待。 |
|
|
158
|
+
| 连续 **5 分钟**没有新活动 | 程序检查执行状态与连接,不因此调用指挥模型。 |
|
|
159
|
+
| 连续 **10 分钟**仍无新活动 | 返回简短诊断,请指挥端决定是否继续等待。 |
|
|
160
|
+
| 需要权限决定或回答问题 | 返回处理所需的信息;决定或回答后继续等待原任务。 |
|
|
161
|
+
| 同一操作连续重复失败达到阈值 | 发出需确认的提醒,避免相同错误不断重试;默认阈值为 3,可调整。 |
|
|
162
|
+
| 完成、失败、取消或中断 | 及时交回结果或异常,进入审查或处理。 |
|
|
163
|
+
|
|
164
|
+
5/10 分钟是**连续无活动的阈值**,不是“每隔 5/10 分钟让 GPT 查看一次”。界面刷新和连接心跳不会伪装成执行进度;没有文件改动也不直接等于卡住。
|
|
165
|
+
|
|
166
|
+
高级设置可调整无活动阈值和重复失败提醒。单次等待到达上限或被客户端提前结束时,应续等同一任务;不会因此自动取消、重复派工或切换模型。具体规则见 [静默等待说明](docs/silent-wait.md)。
|
|
167
|
+
|
|
168
|
+
## 会话续接与任务组织
|
|
169
|
+
|
|
170
|
+
### 每项独立工作有自己的会话
|
|
171
|
+
|
|
172
|
+
新任务在对应的 DSH 工作区中新建会话,工作区使用任务内容命名,例如“修复设置自动保存”或“补充登录回归测试”。在独立工作树模式下,新任务通常对应各自的执行目录;同一共享目录可能对应同一个 DSH 工作区,但独立任务仍新开会话。
|
|
173
|
+
|
|
174
|
+
### 同一任务的改进继续原来的对话
|
|
175
|
+
|
|
176
|
+
如果交付后发现问题,可以这样告诉指挥端:
|
|
177
|
+
|
|
178
|
+
> 继续刚才那项任务。把审查发现的三个问题一起交给原执行者,在原来的会话和工作区里修正,完成后再集中审查。
|
|
179
|
+
|
|
180
|
+
指挥端通过 `continueFromTaskId` 明确指定续接任务,保留原会话与候选修改。单纯“项目路径一样”不会让所有任务混用一条聊天。
|
|
181
|
+
|
|
182
|
+
DSH 重启后,插件会核验原任务与工作区身份再尝试恢复续接;原目录缺失或身份无法确认时会报告原因,不假装已经恢复。
|
|
183
|
+
|
|
184
|
+
### 复杂任务可按需使用 DSH 团队
|
|
185
|
+
|
|
186
|
+
指挥端可根据任务复杂度逐任务决定是否启用 DSH 原生智能体团队。简单修复可以交给单个执行者,多模块工作再考虑团队;这项决定不改变你选定的执行 API、模型和思考强度。团队成员的额外权限申请目前仍需回到主执行者处理。
|
|
187
|
+
|
|
188
|
+
## 任务记录:看进度,也看验收结果
|
|
189
|
+
|
|
190
|
+
打开 **任务记录 → 详情**,可以查看:
|
|
191
|
+
|
|
192
|
+
- **执行情况**:当前阶段、最近活动时间、当前工具与无活动诊断。
|
|
193
|
+
- **实际配置**:本次生效的提供方、模型、思考强度与隔离方式。
|
|
194
|
+
- **任务关系**:执行工作区、会话以及是否续接已有任务。
|
|
195
|
+
- **操作依据**:权限申请、单次允许/拒绝决定和相关记录。
|
|
196
|
+
- **交付证据**:变更文件、差异、验证结果与执行结果。
|
|
197
|
+
- **审查结论**:附加模型意见、指挥端验收状态,以及可展开的完整审查意见。
|
|
198
|
+
|
|
199
|
+
| 你看到的状态 | 含义 |
|
|
200
|
+
| --- | --- |
|
|
201
|
+
| **执行中 / 等待工具** | 执行者仍在工作,由程序等待。 |
|
|
202
|
+
| **等待本次调用授权决定** | 某项具体操作需要指挥端判断。 |
|
|
203
|
+
| **等待宿主审查** | 已交付,尚未记录指挥端的最终验收结论。 |
|
|
204
|
+
| **审查通过** | 指挥端已经记录接受结果的结论。 |
|
|
205
|
+
| **需要修正** | 指挥端已列出问题,可以续接原任务处理。 |
|
|
206
|
+
| **审查结论保存未确认** | 保存结果尚未确认,不能按已经验收落盘处理。 |
|
|
207
|
+
|
|
208
|
+
页面的后台状态刷新由程序完成,不会为了刷新列表调用指挥模型。长审查意见可通过“查看完整审查意见”展开。
|
|
209
|
+
|
|
210
|
+
## 常见问题
|
|
211
|
+
|
|
212
|
+
### 安装 TaskBridge 后,Codex 会自动把所有工作交给 DSH 吗?
|
|
213
|
+
|
|
214
|
+
不会。需要你开启本机调用开关,并明确把任务交给 TaskBridge。托管规则区分普通讨论和实际委派;你仍可让 Codex 自己完成指定工作。
|
|
215
|
+
|
|
216
|
+
### 我在 DSH 中选什么,派工就用什么吗?
|
|
217
|
+
|
|
218
|
+
使用 TaskBridge 的有效执行配置:全局选择可能被匹配的项目覆盖项替代,运行任务保留提交时的快照。任务详情中的实际提供方、模型和思考强度用于核对本次路由。
|
|
219
|
+
|
|
220
|
+
### “指挥端审批”是每次都让我手动点允许吗?
|
|
221
|
+
|
|
222
|
+
权限请求会交给使用 TaskBridge 的指挥端,由它依据你的授权范围和具体操作判断。请求超出已有授权、需要你决定时,指挥端再向你询问。一次批准只适用于对应操作,不等于长期放开权限。
|
|
223
|
+
|
|
224
|
+
### 静默等待能保证 Codex 完全不消耗 token 吗?
|
|
225
|
+
|
|
226
|
+
不能。规划、审批、回答、异常处理和最终审查仍需要模型调用;额外模型复审也有成本。TaskBridge 减少正常执行中的重复查询,实际节省取决于任务、客户端等待机制和上下文大小。历史测量及其适用范围见 [等待阶段用量对照](docs/releases/1.5.0-token-benchmark.zh.md)。
|
|
227
|
+
|
|
228
|
+
### 为什么任务做完后还显示“等待宿主审查”?
|
|
229
|
+
|
|
230
|
+
执行者交付后,指挥端需要检查结果并写回审查结论。如果只读取结果却没有记录验收,任务仍会待审。托管规则要求通过 `delegate_review` 写回并确认保存。
|
|
231
|
+
|
|
232
|
+
### 更新后没有看到新版介绍或 Codex 集成没有刷新怎么办?
|
|
233
|
+
|
|
234
|
+
先确认 DSH 中实际安装的版本,再刷新插件页面。区域镜像和发现索引可能存在缓存;本地 `.tgz` 安装是否显示在线更新取决于 DSH 的来源管理。
|
|
235
|
+
|
|
236
|
+
Codex 可在 **Codex 集成** 中点击“安装 / 更新 TaskBridge 智能体”后重新加载。若只是 MCP 条目需要调整,可用“仅修复 MCP 配置”;你自行修改过的配置会被保留并提示处理。
|
|
237
|
+
|
|
238
|
+
### TaskBridge 会替我安装所有依赖、接好所有客户端吗?
|
|
239
|
+
|
|
240
|
+
TaskBridge 自身无需 dsh-crew。执行任务使用的项目依赖仍按任务环境准备;首次 Codex 集成由按钮配置。Claude Code 和 Claude Desktop 接入属于预计 2.0 上线的计划。需要 DSH 保持运行,并在其中启用插件。
|
|
241
|
+
|
|
242
|
+
## 客户端支持与 2.0 计划
|
|
243
|
+
|
|
244
|
+
| 客户端 | 当前状态 | 计划 |
|
|
245
|
+
| --- | --- | --- |
|
|
246
|
+
| **Codex** | 当前支持,提供智能体与 MCP 安装/更新/修复入口。 | 继续完善现有委派与审查体验。 |
|
|
247
|
+
| **Claude Code** | 尚未上线。 | 预计在 **2.0** 提供接入。 |
|
|
248
|
+
| **Claude Desktop** | 尚未上线。 | 预计在 **2.0** 提供接入。 |
|
|
249
|
+
|
|
250
|
+
2.0 的目标是让更多指挥端使用 DSH 中配置的执行模型。具体接入方式与交付范围以 2.0 发布说明为准;当前版本请使用 Codex。
|
|
251
|
+
|
|
252
|
+
## 更多文档与反馈
|
|
253
|
+
|
|
254
|
+
| 文档 | 内容 |
|
|
255
|
+
| --- | --- |
|
|
256
|
+
| [Codex 集成](docs/codex-integration.md) | 安装、更新、修复、配置目录与托管规则。 |
|
|
257
|
+
| [Claude 接入规划](docs/claude-code.md) | Claude Code / Claude Desktop 预计 2.0 上线,目前不属于已支持端。 |
|
|
258
|
+
| [静默等待](docs/silent-wait.md) | 活动计时、等待续接、提醒与验证范围。 |
|
|
259
|
+
| [工作区与隔离](docs/workspace-contract.md) | 预检、独立工作树、共享模式与任务身份。 |
|
|
260
|
+
| [会话放置与续接](docs/conversation-placement.md) | DSH 工作区命名、会话创建和同任务续接。 |
|
|
261
|
+
| [插件发现与更新](docs/plugin-market.md) | 自定义索引、npm 与 GitHub 安装来源。 |
|
|
262
|
+
| [旧名称迁移](docs/taskbridge-upgrade.md) | 从 DSH Delegate / TaskDispatch 升级。 |
|
|
263
|
+
| [1.5.2 更新说明](docs/releases/1.5.2.zh.md) | 本次介绍更新的内容与验证范围。 |
|
|
264
|
+
|
|
265
|
+
本插件不按 DSH 版本白名单筛选,所需接口按运行时实际能力检查;具体说明见 [运行时说明](docs/runtime-compatibility.md)。CLI 独立执行通道及所有运行环境组合尚未完成,已知限制见 [1.5.1 说明](docs/releases/1.5.1.zh.md)。
|
|
266
|
+
|
|
267
|
+
发现问题或希望改进使用体验,欢迎在 [GitHub Issues](https://github.com/ranranyya/dsh-taskbridge/issues) 提交反馈。请附上插件版本、出现问题的步骤和必要的脱敏错误信息,避免附带 API 密钥。
|
|
268
|
+
|
|
269
|
+
## 许可证
|
|
270
|
+
|
|
271
|
+
[MIT](LICENSE)
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
<details>
|
|
276
|
+
<summary>高级安装、配置与协议参考</summary>
|
|
277
|
+
|
|
278
|
+
以下为详细技术参考,日常使用可先阅读上面的安装步骤、设置说明和常见问题。
|
|
279
|
+
|
|
30
280
|
## 1. 环境要求
|
|
31
281
|
|
|
32
282
|
| 项 | 要求 | 说明 |
|
|
@@ -50,13 +300,13 @@ profile 是**应用保留的**:npm / `dsh plugin` CLI 对该 profile 的操作
|
|
|
50
300
|
Desktop 侧的包操作只能交给应用完成——不要在 Desktop 的正式 profile 里执行 npm/pnpm
|
|
51
301
|
命令,也不要直接编辑其中的文件。
|
|
52
302
|
|
|
53
|
-
1. 打开 Desktop 的 **Plugins manager → 添加插件**,输入 **`dsh-taskbridge@1.5.
|
|
303
|
+
1. 打开 Desktop 的 **Plugins manager → 添加插件**,输入 **`dsh-taskbridge@1.5.2`**。
|
|
54
304
|
若中国大陆镜像尚未同步,先选择 npm 官方源再重试。安装后的显示名为 **DSH TaskBridge**。
|
|
55
305
|
也可以从本项目 Release 下载 `.tgz`,或在仓库根目录打包:
|
|
56
306
|
|
|
57
307
|
```bash
|
|
58
308
|
npm pack
|
|
59
|
-
# → dsh-taskbridge-1.5.
|
|
309
|
+
# → dsh-taskbridge-1.5.2.tgz
|
|
60
310
|
```
|
|
61
311
|
|
|
62
312
|
2. 使用本地包时,通过 **添加插件**入口选择下载或生成的 `.tgz`(或本仓库目录)完成安装。
|
|
@@ -70,7 +320,7 @@ Desktop 侧的包操作只能交给应用完成——不要在 Desktop 的正式
|
|
|
70
320
|
|
|
71
321
|
```bash
|
|
72
322
|
# 装进一个 profile(例:web)
|
|
73
|
-
dsh plugin --profile web add ./dsh-taskbridge-1.5.
|
|
323
|
+
dsh plugin --profile web add ./dsh-taskbridge-1.5.2.tgz && dsh plugin --profile web why dsh-taskbridge
|
|
74
324
|
|
|
75
325
|
# 启动(首次启动会自动把插件 bundle 追加到 dsh.profile.bundles)
|
|
76
326
|
dsh --profile web
|
|
@@ -83,7 +333,7 @@ dsh --profile web
|
|
|
83
333
|
### 说明与注意
|
|
84
334
|
|
|
85
335
|
- **不要装进你正在用的正式 profile 做试验。** 建议先用一次性 profile:
|
|
86
|
-
`dsh plugin --profile dsh-delegate-try add ./dsh-taskbridge-1.5.
|
|
336
|
+
`dsh plugin --profile dsh-delegate-try add ./dsh-taskbridge-1.5.2.tgz`,再把
|
|
87
337
|
`DSH_HOME` 指向临时目录做隔离验证。该命令同样只用于 CLI profile。
|
|
88
338
|
- 该包声明了 `@deepseek-ai/dsh-*` 的 peer,若你的包管理器默认自动安装 peer,
|
|
89
339
|
安装过程会尝试解析这些版本。可显式关闭:`npm_config_auto_install_peers=false`
|
|
@@ -408,7 +658,7 @@ worker 请求把**某一次调用**的沙箱权限提升时,那次调用会暂
|
|
|
408
658
|
- 提醒有冷却:同一次静默里到点报一次,之后要再过同样的间隔才会再报。
|
|
409
659
|
- 间隔是全局设置(`monitoring.selfCheckSeconds` / `monitoring.attentionSeconds`,存成整秒),
|
|
410
660
|
项目覆盖和单任务覆盖都不能改它。设置页在「执行设置」里的**进阶:静默监控间隔**卡片,
|
|
411
|
-
|
|
661
|
+
以分钟呈现、按秒保存,修改后自动保存,无需再点击底部按钮。
|
|
412
662
|
- 修改只影响**之后新提交**的任务;运行中的任务保留它开始时冻结的那份间隔快照。
|
|
413
663
|
- 任务记录页在有进行中任务、且页面可见时每 5 秒只读刷新一次;终端状态的任务不会触发刷新。
|
|
414
664
|
详情里显示阶段、最近进展、当前工具与其耗时、无进展诊断;旧版本写的记录会如实显示
|
|
@@ -518,7 +768,7 @@ Codex 子智能体现在按「提交 → `delegate_wait` 同一任务」运作
|
|
|
518
768
|
# 不要在 Desktop 的正式 profile 下执行下面的 CLI 命令。
|
|
519
769
|
|
|
520
770
|
# CLI web profile 的升级:换成本地新包或(将来)新版本
|
|
521
|
-
dsh plugin --profile web add ./dsh-taskbridge-1.5.
|
|
771
|
+
dsh plugin --profile web add ./dsh-taskbridge-1.5.2.tgz
|
|
522
772
|
|
|
523
773
|
# 导出:界面里"导出非敏感配置"按钮,或用只读 API
|
|
524
774
|
# GET /api/dsh-delegate/settings
|
|
@@ -571,7 +821,7 @@ dsh plugin --profile web remove dsh-taskbridge
|
|
|
571
821
|
- **交付与验收分开**:附加模型审查只产出发现;执行交付时等待宿主审查,由指挥端明确写回结论,
|
|
572
822
|
任务页才显示“审查通过”或“需要修正”。
|
|
573
823
|
- **Codex 集成的限制**:
|
|
574
|
-
-
|
|
824
|
+
- 当前接入端仅支持 Codex;Claude Code 与 Claude Desktop 接入预计在 2.0 上线。
|
|
575
825
|
- **不宣称**当前 Codex 桌面版/CLI 支持用 `@dsh-taskbridge` 在输入框直接选中该子智能体:
|
|
576
826
|
这取决于 Codex 版本自身是否提供提及选择,仓库内没有官方文档或运行时证据支持该说法。
|
|
577
827
|
插件只保证子智能体文件与 MCP 条目存在;安装后必须让 Codex 重新载入。
|
|
@@ -586,8 +836,7 @@ dsh plugin --profile web remove dsh-taskbridge
|
|
|
586
836
|
- 启动自检只补齐**已安装、入口正好是本安装**且能证明属于本插件的托管 MCP 条目缺失的
|
|
587
837
|
`tool_timeout_sec`,不会在未安装时创建条目,也不会采纳同名非托管条目或用户改写过的条目;
|
|
588
838
|
入口路径指向旧安装时只会报告冲突,需用显式按钮在证明该路径是同一包的真实安装后才会被采纳。
|
|
589
|
-
|
|
590
|
-
祖先链同样会被证明,绝不沿链接把完整 config 写出去。
|
|
839
|
+
正常的 Codex 根目录符号链接/Windows junction 会解析到真实目录后操作,并保留原链接;agents 子目录及最终文件的链接仍拒绝。备份目录继续按既有边界规则校验。
|
|
591
840
|
- 安装/修复不会打开本机调用开关;开关仍由操作者在第 4 节的位置单独控制。
|
|
592
841
|
|
|
593
842
|
## 10. 开发
|
|
@@ -617,3 +866,5 @@ Codex 集成相关的自动化测试(全部在临时 `CODEX_HOME` 中运行,
|
|
|
617
866
|
## 许可证
|
|
618
867
|
|
|
619
868
|
MIT,见 [LICENSE](./LICENSE)。
|
|
869
|
+
|
|
870
|
+
</details>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# dsh-taskbridge Codex companion — managed by the DSH TaskBridge plugin settings page.
|
|
2
2
|
# Editing this file turns it into an operator-owned file: the plugin then never
|
|
3
3
|
# overwrites or removes it, and reports it as "modified" instead.
|
|
4
|
-
version = "1.5.
|
|
4
|
+
version = "1.5.2"
|
|
5
5
|
|
|
6
6
|
name = "dsh-taskbridge"
|
|
7
7
|
description = "Dispatch an explicitly assigned implementation task to DSH through the dsh-taskbridge MCP tools, then return evidence for Codex review."
|
|
@@ -24,7 +24,7 @@ ACTIVATION (check this before anything else)
|
|
|
24
24
|
clarifying question instead of dispatching.
|
|
25
25
|
|
|
26
26
|
DISPATCH (only for an explicitly assigned implementation task)
|
|
27
|
-
1. PREFLIGHT FACTS FIRST. Call `delegate_status` first, then call
|
|
27
|
+
1. PREFLIGHT FACTS FIRST — FOR A NEW TASK. Call `delegate_status` first, then call
|
|
28
28
|
`delegate_preflight` with the exact authorized workspace path as
|
|
29
29
|
`workspacePath`. `delegate_status` reports whether delegation is enabled at all;
|
|
30
30
|
`delegate_preflight` reports what the workspace actually looks like and which
|
|
@@ -35,10 +35,26 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
35
35
|
A `delegate_status` answer that says the switch is off ends the dispatch here:
|
|
36
36
|
the preflight may still be read for reporting, but nothing may be submitted.
|
|
37
37
|
2. APPLY THE ISOLATION DECISION. `delegate_preflight` answers with an `isolation`
|
|
38
|
-
of `worktree`, `shared` or `block` and a stable `reason` code.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
of `worktree`, `shared` or `block` and a stable `reason` code.
|
|
39
|
+
2a. PREFLIGHT IS PER CHAIN, NOT PER DISPATCH. Preflight a NEW task: `delegate_status`,
|
|
40
|
+
then `delegate_preflight` on the original authorized source path, then the dirty-tree
|
|
41
|
+
decision below. For a CONTINUATION of a task chain you already verified, do NOT redo
|
|
42
|
+
the dirty-tree decision every round: when the source path is the same, the goal and
|
|
43
|
+
boundaries are unchanged, and there is no identity or isolation anomaly, reuse the
|
|
44
|
+
already-verified preflight facts and go straight to the submit in rule 4b. The
|
|
45
|
+
worker's own uncommitted candidate changes in that chain are the expected state of
|
|
46
|
+
the chain, not a fresh dirty-tree decision to re-litigate. Re-verify when the source
|
|
47
|
+
path changed, the work is unrelated, an identity/isolation refusal came back, or the
|
|
48
|
+
engine reports a mismatch — and then preflight afresh. This reuse changes NOTHING in
|
|
49
|
+
the engine: every submission still carries the ORIGINAL source `workspacePath` plus
|
|
50
|
+
the latest `continueFromTaskId`, and the engine still re-checks ownership, paths, the
|
|
51
|
+
original checkout and the Session on every submit. Never route a refused or blocked
|
|
52
|
+
chain through a new task to get past the refusal.
|
|
53
|
+
2b. For an explicit follow-up, submit with the parent's original source `workspacePath`
|
|
54
|
+
— and re-run `delegate_preflight` only when needed under 2a (source changed, work
|
|
55
|
+
unrelated, identity/isolation refusal, or an engine mismatch). A verified chain is NOT
|
|
56
|
+
preflighted mechanically every round. The engine pins the parent's isolation, so do
|
|
57
|
+
not choose a new mode from any fresh preflight result.
|
|
42
58
|
- `isolation: "worktree"` (reason `PREFLIGHT_CLEAN_REPOSITORY`) — the repository
|
|
43
59
|
is clean. Dispatch with the worktree isolation configured in the DSH TaskBridge
|
|
44
60
|
plugin settings; do not change it.
|
|
@@ -87,6 +103,35 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
87
103
|
override the configured provider, model, reasoning effort or timeout, and never
|
|
88
104
|
encode a route in the task prompt. `allowShared` on the preflight records the
|
|
89
105
|
decision but does not change the submitted job's isolation by itself.
|
|
106
|
+
4a. AGENT TEAMS IS YOUR DECISION, NOT THE OPERATOR'S. `delegate_submit` accepts an
|
|
107
|
+
optional boolean `agentTeams`: it selects DSH's Agent Teams mode
|
|
108
|
+
("启用智能体团队协作", the switch in the DSH model menu) for THIS task's own DSH
|
|
109
|
+
Session. It is NOT Codex's own multi-agent feature and NOT the additional review
|
|
110
|
+
model. The operator decides ONCE that you choose per task; do not ask them per
|
|
111
|
+
dispatch.
|
|
112
|
+
- Simple single-file or strongly sequential work: turn it OFF EXPLICITLY with
|
|
113
|
+
`agentTeams: false` whenever the loaded schema accepts the field. OMITTING the field
|
|
114
|
+
is NOT "off": an omitted value makes no new decision, so the run keeps (or, on a
|
|
115
|
+
continuation, inherits) whatever selection the Session already has. A repository
|
|
116
|
+
whose AGENTS.md forbids delegating again must send `false` and state which actions
|
|
117
|
+
the ROOT execution must perform instead (those still need normal approval).
|
|
118
|
+
- Turn it on only when the work genuinely splits into independent modules that can
|
|
119
|
+
proceed in parallel AND the gain clearly covers the coordination cost. Say the
|
|
120
|
+
reason in the dispatch text.
|
|
121
|
+
- A continuation does not re-decide it: the plugin inherits the chain's choice, so an
|
|
122
|
+
omitted value on a follow-up keeps the parent's mode. Pass `agentTeams: false`
|
|
123
|
+
explicitly when you want THIS follow-up off, and an explicit value when the scope
|
|
124
|
+
changed enough to justify flipping it.
|
|
125
|
+
- Execution provider/model/effort remain the operator's configuration. `agentTeams`
|
|
126
|
+
never overrides them, and you never encode a model in it.
|
|
127
|
+
- Express it ONLY through this schema field. If the loaded tool version does not
|
|
128
|
+
accept `agentTeams`, say so and ask for the newer integration — never fake success,
|
|
129
|
+
never route it through another field, the task prompt or a different channel.
|
|
130
|
+
- Team members run under DSH's native policy (their own approvals default to
|
|
131
|
+
`never`), so they only do what is already permitted. A concrete action that needs
|
|
132
|
+
more permission must be done by the ROOT execution and decided through this
|
|
133
|
+
channel's normal single-call approval. Never claim member approvals are bridged,
|
|
134
|
+
never widen `owns`, never change the host's policy.
|
|
90
135
|
4b. TASK THREADS. Every submission starts a NEW DSH task conversation by default,
|
|
91
136
|
even when the same workspace has been used for many earlier tasks; a
|
|
92
137
|
directory-level reuse setting no longer exists. Pass `continueFromTaskId` ONLY
|
|
@@ -134,6 +179,17 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
134
179
|
A real hard failure is worth ONE de-duplicated reminder to the host. An ordinary
|
|
135
180
|
single failing test inside the worker is the WORKER's job to diagnose and fix: it is
|
|
136
181
|
not a host event, and you must not resubmit, cancel or take over for it.
|
|
182
|
+
ORDER OF WORK: you plan, approve and review; the worker implements. In a normal run
|
|
183
|
+
your only operation is `delegate_wait` on the task you submitted. Do not read the
|
|
184
|
+
worker's in-progress code, do not run the tests yourself to "help", and do not use an
|
|
185
|
+
approval to take over the implementation.
|
|
186
|
+
ONE COMPLETE BRIEF: state the goal, the boundaries and the acceptance checks once, up
|
|
187
|
+
front. After an approval, continue observing with `waitAfterDecision: true` on the SAME
|
|
188
|
+
task (or `delegate_wait` on it) instead of submitting anything new.
|
|
189
|
+
BOUNDED DIAGNOSIS, NOT TAKEOVER: only when the task is a proven blocker, reports
|
|
190
|
+
`attention`, shows a genuinely abnormal signal, or the operator asks, you may run a
|
|
191
|
+
BOUNDED diagnosis — facts first, then a decision. Never start writing the implementation
|
|
192
|
+
during it.
|
|
137
193
|
5a. WHAT THE WAIT REASONS MEAN, and what you do next.
|
|
138
194
|
- `heartbeat`: nothing to report. The wait expired with no news. You will normally
|
|
139
195
|
never see this, because the tool re-issues internally. If you do see it, call
|
|
@@ -150,11 +206,22 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
150
206
|
stated error justifies anything else, and then you report it instead of silently
|
|
151
207
|
restarting work.
|
|
152
208
|
If the same answer instead carries a `failure` block (`kind:
|
|
153
|
-
"repeated-tool-failure"`, with `toolName`, `failureCode`, `consecutive`), the
|
|
154
|
-
NOT silent: the worker has repeated ONE operation and failed the same way
|
|
155
|
-
times in a row. That is a different situation and needs a different decision.
|
|
156
|
-
|
|
157
|
-
|
|
209
|
+
"repeated-tool-failure"`, with `eventId`, `toolName`, `failureCode`, `consecutive`), the
|
|
210
|
+
task is NOT silent: the worker has repeated ONE operation and failed the same way
|
|
211
|
+
several times in a row. That is a different situation and needs a different decision.
|
|
212
|
+
The SAME reminder (same `eventId`) is REDELIVERED on later waits until you acknowledge
|
|
213
|
+
it, so a lost answer is never a lost reminder: do not read the repetition as several
|
|
214
|
+
failures or new events; it is one notification you have not confirmed yet. After you
|
|
215
|
+
decide how to proceed, call `delegate_wait` with `ackFailureEventId` set to the
|
|
216
|
+
`eventId` you saw. That acknowledgment stops the redelivery; it decides nothing about
|
|
217
|
+
the task and stops nothing. The answer reports the verdict in `failureAck`:
|
|
218
|
+
`acknowledged: true` means it landed; `acknowledged: false` means it did NOT land.
|
|
219
|
+
When the reason says the ack was refused or the event is unknown, do NOT resend the
|
|
220
|
+
same id blindly: keep the fact, keep following the task with plain `delegate_wait`,
|
|
221
|
+
and act on the NEW event if a different one appears. A superseded episode needs no
|
|
222
|
+
confirmation at all — just continue waiting on the SAME task. Only a transport-level
|
|
223
|
+
uncertainty (the wait itself failed or was cancelled) justifies one bounded retry of
|
|
224
|
+
the SAME ack. Decide deliberately: keep waiting (the worker may still recover),
|
|
158
225
|
cancel, or write a follow-up that gives the worker the missing information. Do not
|
|
159
226
|
repeat the identical instruction and hope for another outcome, and do not take the
|
|
160
227
|
reminder itself as proof the task can never succeed.
|
|
@@ -164,7 +231,20 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
164
231
|
- You are the deciding commander. Do not invoke another approval or review model,
|
|
165
232
|
do not ask the operator to choose routine within-task decisions, and do not
|
|
166
233
|
delegate the approval decision to the worker. The worker's own `reason` is a
|
|
167
|
-
|
|
234
|
+
CLAIM awaiting verification, never evidence and never authority.
|
|
235
|
+
- Approval verifies the OPERATION, not the story: the complete, concrete command or
|
|
236
|
+
script, every path it touches, and the process ownership (whose program would run
|
|
237
|
+
and which directory it would act in). If any of those is missing or materially
|
|
238
|
+
incomplete, refuse and ask for the exact command.
|
|
239
|
+
- Reading source does not need approval. A simple source search or field lookup is a
|
|
240
|
+
plain PowerShell built-in (`Select-String`/`Get-Content`), and you must not start
|
|
241
|
+
`node`, Electron or another interpreter just to READ a file. An external program
|
|
242
|
+
earns a one-off request ONLY when there is concrete evidence that the built-in
|
|
243
|
+
path genuinely fails in this same environment — and then you request exactly ONE
|
|
244
|
+
bounded command and say which error it resolves.
|
|
245
|
+
- A test writing into its own temporary directory is NOT a source commit. Do not
|
|
246
|
+
refuse, and do not treat it as history rewriting; the ban is on your own commits,
|
|
247
|
+
pushes, tags and history edits in the repository.
|
|
168
248
|
- Inspect the FULL operation the wait returned at the top level: the tool, the
|
|
169
249
|
redacted arguments, completeness and bounds, the call identity, the session and
|
|
170
250
|
the repository. Read whatever local evidence you need to understand an
|
|
@@ -243,6 +323,15 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
243
323
|
findings, changed files) and then do the review yourself, in Codex. If the diff
|
|
244
324
|
is large, inspect only the files that matter for this change, once each. Do not
|
|
245
325
|
re-read the same evidence repeatedly, and never reply "done" without reviewing.
|
|
326
|
+
READ IN THIS ORDER, and keep the read small:
|
|
327
|
+
1. the short summary, the changed-file list, and the test results with their log
|
|
328
|
+
paths and stated limitations;
|
|
329
|
+
2. only then the specific files the review gap actually needs, one file or one
|
|
330
|
+
bounded range at a time. Do NOT dump whole large files or a whole-repository
|
|
331
|
+
diff: a truncated read forces a re-read and proves nothing.
|
|
332
|
+
Record every verified conclusion WITH its evidence path (file plus line, or log path)
|
|
333
|
+
as you go, so a later question is answered from that note instead of a second full
|
|
334
|
+
read.
|
|
246
335
|
The review note is up to 8000 Unicode code points; a longer answer states
|
|
247
336
|
`noteOmitted: true` and the note is read in pages with `reviewNoteOffset` and
|
|
248
337
|
`reviewNoteLimit` (2000 code points per page) until `complete` is true. Read the
|
|
@@ -263,6 +352,12 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
263
352
|
`continueFromTaskId`; do not overwrite the old task's decision. Never mark old
|
|
264
353
|
records accepted in bulk, and never claim a decision was saved when an older
|
|
265
354
|
server lacks this tool.
|
|
355
|
+
THE REVIEW WRITE IS THE RECORD. A report you paste into the conversation is NOT a
|
|
356
|
+
review: it is recorded only when `delegate_review` answers that the write is
|
|
357
|
+
durable. If nothing was written, nothing was reviewed.
|
|
358
|
+
ONE ROUND PER DELIVERY. Collect every defect you find into a single correction list
|
|
359
|
+
and send it as ONE follow-up on the same chain (`continueFromTaskId`); do not trickle
|
|
360
|
+
one correction per submission.
|
|
266
361
|
Reviewing is done in ONE pass per delivery: do not call `delegate_review` to
|
|
267
362
|
"check in" while the run is still going, and do not review the same result more
|
|
268
363
|
than once.
|