dsh-taskbridge 1.3.2 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -2
- package/README.md +19 -13
- package/bin/dsh-delegate-mcp.js +4 -0
- package/codex/dsh-taskbridge.toml +129 -24
- package/docs/INTRODUCTION.md +19 -15
- package/docs/INTRODUCTION.zh.md +38 -34
- package/docs/codex-integration.md +63 -20
- package/docs/plugin-market.md +1 -1
- package/docs/releases/1.4.0-token-benchmark.zh.md +40 -0
- package/docs/releases/1.4.0.zh.md +54 -0
- package/docs/releases/1.4.1.zh.md +59 -0
- package/docs/runtime-compatibility.md +17 -9
- package/docs/silent-wait.md +87 -10
- package/docs/taskbridge-upgrade.md +1 -1
- package/lib/client.js +305 -65
- package/package.json +7 -3
- package/src/client/api.js +326 -46
- package/src/client/index.jsx +226 -52
- package/src/codex/installer.js +39 -6
- package/src/config/defaults.js +12 -0
- package/src/config/settings.js +12 -10
- package/src/config/validate.js +26 -11
- package/src/http/execution-plane.js +179 -9
- package/src/http/respond.js +179 -175
- package/src/http/user-plane.js +5 -4
- package/src/index.d.ts +157 -3
- package/src/index.js +1 -1
- package/src/jobs/activity.js +1369 -1008
- package/src/jobs/diagnostics.js +15 -0
- package/src/jobs/engine.js +1029 -12
- package/src/jobs/history.js +152 -6
- package/src/jobs/review-note.js +63 -0
- package/src/mcp/server.js +345 -21
- package/src/mcp/wait.js +67 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.1 — 历史补审、可靠保存与长审查意见(2026-11-14)
|
|
4
|
+
|
|
5
|
+
- **重启后仍能完成审查。** 原指挥端可用原任务 ID 读取已结束的历史记录并补审,再次重启后仍保留结论。沿用原任务归属校验,不恢复旧执行对象或旧审批权限;历史缺少的执行证据明确标记。
|
|
6
|
+
- **保存状态与实际落盘一致。** 区分保存中、等待超时但尚未确认、已保存和确定失败;保存前不显示已通过,晚到结果同步更新。相同审查并发共享写入,冲突结论明确拒绝,失败可重试;修复任务收尾覆盖已保存结论的竞态。
|
|
7
|
+
- **审查备注统一为 8000 Unicode 码点。** MCP、HTTP、引擎与历史存储使用同一约定;合法正文完整保存,超限或容量不足明确拒绝。以前已经丢失的备注尾部无法凭升级恢复。
|
|
8
|
+
- **页面自动更新审查结论。** 待审和保存中的记录继续每 5 秒后台刷新;隐藏暂停、恢复立即读取、保存确认后停止。历史补审保存状态同步显示;刷新失败保留已显示内容。
|
|
9
|
+
- **长备注按需读取。** 列表预览最多 200 码点,详情展开/收起和复制全文;复制不可用或失败时准确提示。等待只返回状态和长度,结果过大时明确省略正文,使用 `delegate_result` 的可选备注分页取回。
|
|
10
|
+
- **更新托管 Codex 规则。** 明确集中审查、保存确认及按需读取;识别原版 1.4.0 模板的 LF/CRLF 字节并升级,保留用户自行修改的文件。技术 MCP 名称与既有配置目录保持兼容。
|
|
11
|
+
- 完整自动回归 1283 项通过,源码同步后针对性验证 48 项通过;隔离安装包的真实 stdio MCP/本机 HTTP 通道完成跨两次重启补审与 8000 码点备注分页验证。正式 Desktop 人工点击和真实提供方任务不在本轮验收范围内。
|
|
12
|
+
- API/模型选择与现有执行通道保持兼容。本版不包含后续规划的外层静默等待优化、审批后直接续等和减少不必要提权申请,也不宣称新的 token 节省比例。验证边界见 `docs/releases/1.4.1.zh.md`。
|
|
13
|
+
|
|
14
|
+
## 1.4.0 — 静默等待、重复失败提醒与宿主审查闭环
|
|
15
|
+
|
|
16
|
+
- **长等待与集中审查。** Codex companion、MCP 说明和文档统一要求正常调用 `delegate_wait({ taskId })` 时省略短 `waitSeconds`。外层工具允许长 yield 时保持同一次等待;提前返回仍运行的单元则续接同一个单元,不重复派工、不反复读取中间代码。执行期间由程序观察,交付后由指挥端集中审查,需要修正时续接原任务。
|
|
17
|
+
- **澄清无活动监控。** 保留默认连续 5 分钟无活动时程序自检、10 分钟时请求指挥端判断。真实输出、思考和工具事件重新计时;心跳和页面刷新不重置。等待结束不代表执行结束,提醒不自动取消、重派、换模型或延长时限。
|
|
18
|
+
- **新增重复失败提醒。** `monitoring.repeatFailureThreshold` 默认 3,允许 0–20,0 关闭。只对相同工具、相同操作的连续相同结构化失败提醒一次;成功或失败身份变化重新计数。审批和任务结局优先,原始参数、错误正文和思考内容不进入提醒记录。高级设置、任务详情、历史与公开类型同步支持。
|
|
19
|
+
- **宿主审查写回。** 新增 `delegate_review`,由宿主审查后明确记录 accepted/changes-requested;任务页显示“审查通过”或“需要修正”。保留旧执行状态兼容,执行者不能通过交付自动验收,旧记录不补写虚构结论。审查写回不授予权限、不合并工作树、不修改执行路由。
|
|
20
|
+
- **阶段和兼容修复。** 执行尚未开始时保留 before-create,失败后同步失败阶段;晚到事件不覆盖审批或终态。补齐已发布 1.3.2 Codex 模板的精确识别和启动刷新;保留自定义智能体。旧监控配置及历史字段兼容,修复表单校验与保存时丢失其他草稿的问题。
|
|
21
|
+
- **验证与测量口径。** 当前客户端已完成真实墙钟 20 分 2 秒的模拟活动等待,中途零 GPT 续等;它不是提供方连续执行 20 分钟的任务。另做同聊天、同模型、每组约 45 秒的实际用量对照,等待阶段输入加输出从 507,885 降至 169,734 token,样本减少 66.58%。不将该比例宣传为完整任务、账单或所有客户端的固定节省。
|
|
22
|
+
- 本版未新增 CLI 执行通道或 Claude Code 一键安装。更新方法和验证边界见 `docs/releases/1.4.0.zh.md`,测量方法见 `docs/releases/1.4.0-token-benchmark.zh.md`。
|
|
23
|
+
|
|
3
24
|
## 1.3.2 — TaskBridge companion and descriptive task workspace names
|
|
4
25
|
|
|
5
26
|
- Rename the shipped Codex companion to `dsh-taskbridge` (`agents/dsh-taskbridge.toml`). Install and startup migrate an unchanged, recognized published `dsh-delegate.toml` and remove the old managed file; edited agent files remain operator-owned. Add TaskBridge CLI aliases while retaining the existing binaries and internal MCP identifiers.
|
|
@@ -7,8 +28,8 @@
|
|
|
7
28
|
- Explicit Codex install/repair can migrate a marked legacy MCP entry after the old package was uninstalled, when its missing package path is a known sibling of the current `dsh-taskbridge` installation. Custom wrappers, unrelated paths and automatic startup path adoption remain excluded.
|
|
8
29
|
- Update the settings page, companion dispatch rules and upgrade instructions. Model selection, delegation authorization, quiet waiting and host review retain their existing behavior.
|
|
9
30
|
|
|
10
|
-
- Make loopback HTTP test fixtures avoid Fetch-blocked ports, which Windows can allocate from a customized low dynamic-port range. This only affects tests.
|
|
11
|
-
|
|
31
|
+
- Make loopback HTTP test fixtures avoid Fetch-blocked ports, which Windows can allocate from a customized low dynamic-port range. This only affects tests.
|
|
32
|
+
|
|
12
33
|
## 1.3.1 — DSH TaskBridge identity and npm distribution
|
|
13
34
|
|
|
14
35
|
- Unify the project, GitHub repository, plugin title, package and bundle identity as **DSH TaskBridge** / `dsh-taskbridge`. The previous GitHub-only `dsh-taskdispatch` name was rejected by npm's similarity protection; it never became an npm package.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# DSH TaskBridge
|
|
2
2
|
|
|
3
|
+
**1.4.1** 修复跨重启补审、审查保存一致性及长备注,详见 [1.4.1 更新说明](docs/releases/1.4.1.zh.md)。安装标识为 `dsh-taskbridge@1.4.1`,也可使用对应的 `.tgz` 安装包。
|
|
4
|
+
|
|
3
5
|
**让 Claude Code 或 Codex 指挥 DSH 完成任务,在 DSH 插件中配置 API、执行模型和思考强度。**
|
|
4
6
|
|
|
5
7
|
你向指挥端提出目标;指挥端规划、拆分、派工和审查,DSH 根据插件设置执行。插件可选择 DSH 已接入的 API 提供方、执行模型及其支持的思考强度,并配置超时、并发与工作区隔离;额外模型审查可单独开关和配置。任务交付后集中审查,需要改进时续接同一任务对话。
|
|
@@ -8,7 +10,7 @@
|
|
|
8
10
|
- [从 DSH Delegate/TaskDispatch 迁移到 TaskBridge](docs/taskbridge-upgrade.md):包名为 `dsh-taskbridge`,保留旧数据和 MCP 技术标识,不要同时启用新旧插件。
|
|
9
11
|
- [在 DSH“发现”中搜索和安装](docs/plugin-market.md):添加本项目的自定义索引,安装源固定到本项目的 Git 提交。
|
|
10
12
|
- [Claude Code 手动 MCP 接入](docs/claude-code.md);Codex 继续使用设置页的安装/修复按钮。Claude Code 的一键安装按钮和真实客户端验收尚未完成。
|
|
11
|
-
- [1.
|
|
13
|
+
- [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)保留。
|
|
12
14
|
|
|
13
15
|
DeepSeek Harness(DSH)的委托插件:让 MCP 宿主在你开启本机总开关后,调用 DSH
|
|
14
16
|
已配置的接口执行任务,执行结果回到宿主(例如 Codex)自行验收。
|
|
@@ -16,7 +18,7 @@ DeepSeek Harness(DSH)的委托插件:让 MCP 宿主在你开启本机总
|
|
|
16
18
|
新安装时本机调用总开关默认关闭。开关状态会保存在插件设置中,重启后恢复保存值;
|
|
17
19
|
关闭时拒绝新的委派任务,并请求停止正在运行的任务。
|
|
18
20
|
|
|
19
|
-
>
|
|
21
|
+
> **当前版本:`1.4.1`(跨重启补审、可靠保存与长备注)。** 源码仓库和可下载的 Release
|
|
20
22
|
> 位于 [GitHub](https://github.com/ranranyya/dsh-taskbridge)。npm 安装标识为 **`dsh-taskbridge`**,
|
|
21
23
|
> GitHub Release 同时提供 `.tgz`。`1.1.0` 的静默等待说明见
|
|
22
24
|
> [`docs/silent-wait.md`](./docs/silent-wait.md);`1.2.0` 修正了其中三处真实问题(等待中断的
|
|
@@ -47,13 +49,13 @@ profile 是**应用保留的**:npm / `dsh plugin` CLI 对该 profile 的操作
|
|
|
47
49
|
Desktop 侧的包操作只能交给应用完成——不要在 Desktop 的正式 profile 里执行 npm/pnpm
|
|
48
50
|
命令,也不要直接编辑其中的文件。
|
|
49
51
|
|
|
50
|
-
1. 打开 Desktop 的 **Plugins manager → 添加插件**,输入 **`dsh-taskbridge@1.
|
|
52
|
+
1. 打开 Desktop 的 **Plugins manager → 添加插件**,输入 **`dsh-taskbridge@1.4.1`**。
|
|
51
53
|
若中国大陆镜像尚未同步,先选择 npm 官方源再重试。安装后的显示名为 **DSH TaskBridge**。
|
|
52
54
|
也可以从本项目 Release 下载 `.tgz`,或在仓库根目录打包:
|
|
53
55
|
|
|
54
56
|
```bash
|
|
55
57
|
npm pack
|
|
56
|
-
# → dsh-taskbridge-1.
|
|
58
|
+
# → dsh-taskbridge-1.4.1.tgz
|
|
57
59
|
```
|
|
58
60
|
|
|
59
61
|
2. 使用本地包时,通过 **添加插件**入口选择下载或生成的 `.tgz`(或本仓库目录)完成安装。
|
|
@@ -67,7 +69,7 @@ Desktop 侧的包操作只能交给应用完成——不要在 Desktop 的正式
|
|
|
67
69
|
|
|
68
70
|
```bash
|
|
69
71
|
# 装进一个 profile(例:web)
|
|
70
|
-
dsh plugin --profile web add ./dsh-taskbridge-1.
|
|
72
|
+
dsh plugin --profile web add ./dsh-taskbridge-1.4.1.tgz && dsh plugin --profile web why dsh-taskbridge
|
|
71
73
|
|
|
72
74
|
# 启动(首次启动会自动把插件 bundle 追加到 dsh.profile.bundles)
|
|
73
75
|
dsh --profile web
|
|
@@ -80,7 +82,7 @@ dsh --profile web
|
|
|
80
82
|
### 说明与注意
|
|
81
83
|
|
|
82
84
|
- **不要装进你正在用的正式 profile 做试验。** 建议先用一次性 profile:
|
|
83
|
-
`dsh plugin --profile dsh-delegate-try add ./dsh-taskbridge-1.
|
|
85
|
+
`dsh plugin --profile dsh-delegate-try add ./dsh-taskbridge-1.4.1.tgz`,再把
|
|
84
86
|
`DSH_HOME` 指向临时目录做隔离验证。该命令同样只用于 CLI profile。
|
|
85
87
|
- 该包声明了 `@deepseek-ai/dsh-*` 的 peer,若你的包管理器默认自动安装 peer,
|
|
86
88
|
安装过程会尝试解析这些版本。可显式关闭:`npm_config_auto_install_peers=false`
|
|
@@ -146,14 +148,18 @@ dsh --profile web
|
|
|
146
148
|
|
|
147
149
|
## 6. MCP(stdio)接入
|
|
148
150
|
|
|
149
|
-
包内可执行文件 `bin/dsh-delegate-mcp.js`(bin 名 `dsh-delegate-mcp
|
|
151
|
+
包内可执行文件 `bin/dsh-delegate-mcp.js`(bin 名 `dsh-delegate-mcp`)实现了八个工具:
|
|
150
152
|
`delegate_status` / `delegate_preflight` / `delegate_submit` / `delegate_wait` / `delegate_result` / `delegate_cancel` /
|
|
151
|
-
`delegate_permission_decide`。
|
|
153
|
+
`delegate_permission_decide` / `delegate_review`。
|
|
152
154
|
它**不提供**授权、配置写入或凭据读写工具。`delegate_permission_decide` 是唯一一条窄例外:
|
|
153
155
|
它只能回答一个**已经挂起**的「单次调用授权请求」,给 `allow-once`(仅这一次调用可继续)或
|
|
154
156
|
`reject`。它不能创建或扩大任何**长期有效**的授权,不能修改设置、凭据、本机开关、提供方/模型或隔离方式,
|
|
155
157
|
也不能预先批准后续调用。
|
|
156
158
|
|
|
159
|
+
`delegate_review` 只记录已交付任务的宿主审查结论。指挥端检查结果和验证证据后,传入
|
|
160
|
+
`decision: "accepted"` 或 `"changes-requested"` 与简短 `note`;任务页显示“审查通过”或“需要修正”。
|
|
161
|
+
它不会授予工具权限或自动合并文件。旧记录缺少结论时仍保留待审,不把执行完成自动标成通过。
|
|
162
|
+
|
|
157
163
|
在需要调用委派工具的 MCP 宿主中添加 stdio server(以下为通用配置示意;Codex 用见 6.1,
|
|
158
164
|
插件会替你写这条并给出正确路径):
|
|
159
165
|
|
|
@@ -173,8 +179,8 @@ dsh --profile web
|
|
|
173
179
|
每次工具调用前都会重新读取,因此 DSH 重启并更换端口后无需改 Codex 配置。
|
|
174
180
|
- 默认发现路径使用 `DSH_HOME`,未设置时为 `~/.dsh`。若 DSH 和 MCP 宿主使用不同的 DSH_HOME,
|
|
175
181
|
可通过 `DSH_DELEGATE_DISCOVERY_FILE` 指向该发现文件。`DSH_DELEGATE_BASE_URL` 仅作为手动固定地址覆盖。
|
|
176
|
-
- 工具为 `delegate_status`、`delegate_preflight`、`delegate_submit`、`delegate_result`、
|
|
177
|
-
`delegate_cancel` 和 `
|
|
182
|
+
- 工具为 `delegate_status`、`delegate_preflight`、`delegate_submit`、`delegate_wait`、`delegate_result`、
|
|
183
|
+
`delegate_cancel`、`delegate_permission_decide` 和 `delegate_review`。
|
|
178
184
|
- 开关关闭时,`delegate_submit` 与 `delegate_permission_decide` 返回 `DELEGATION_DISABLED`;状态、
|
|
179
185
|
预检、结果和取消工具仍可使用。`delegate_preflight` 只读取工作区事实,不创建任何东西,因此不受
|
|
180
186
|
开关和并发上限限制。
|
|
@@ -511,7 +517,7 @@ Codex 子智能体现在按「提交 → `delegate_wait` 同一任务」运作
|
|
|
511
517
|
# 不要在 Desktop 的正式 profile 下执行下面的 CLI 命令。
|
|
512
518
|
|
|
513
519
|
# CLI web profile 的升级:换成本地新包或(将来)新版本
|
|
514
|
-
dsh plugin --profile web add ./dsh-taskbridge-1.
|
|
520
|
+
dsh plugin --profile web add ./dsh-taskbridge-1.4.1.tgz
|
|
515
521
|
|
|
516
522
|
# 导出:界面里"导出非敏感配置"按钮,或用只读 API
|
|
517
523
|
# GET /api/dsh-delegate/settings
|
|
@@ -571,8 +577,8 @@ dsh plugin --profile web remove dsh-taskbridge
|
|
|
571
577
|
第二个模型审查、也不依赖人工点击。
|
|
572
578
|
- **工作树隔离需要 git**:默认 `worktree` 隔离要求源目录是已提交的 git 仓库;
|
|
573
579
|
否则显式拒绝。`shared` 模式不是隔离,界面会如实标注。
|
|
574
|
-
-
|
|
575
|
-
|
|
580
|
+
- **交付与验收分开**:附加模型审查只产出发现;执行交付时等待宿主审查,由指挥端明确写回结论,
|
|
581
|
+
任务页才显示“审查通过”或“需要修正”。
|
|
576
582
|
- **Codex 集成的限制**:
|
|
577
583
|
- 一键安装按钮只支持 Codex;Claude Code 可按接入说明手动配置标准 MCP,尚无一键安装按钮或真实客户端验收。
|
|
578
584
|
- **不宣称**当前 Codex 桌面版/CLI 支持用 `@dsh-taskbridge` 在输入框直接选中该子智能体:
|
package/bin/dsh-delegate-mcp.js
CHANGED
|
@@ -70,6 +70,10 @@ const ROUTES = Object.freeze({
|
|
|
70
70
|
// plane registers exactly this path, and a name-to-path guess would 404 with
|
|
71
71
|
// `EXECUTION_ROUTE_UNKNOWN` on the one call that unblocks a paused worker.
|
|
72
72
|
permission: Object.freeze({ method: 'POST', path: '/tasks/permission' }),
|
|
73
|
+
// The commander's delivery review. Spelled out like every other route: the plane
|
|
74
|
+
// registers exactly `/tasks/review`, so a missing entry here refused the one call that
|
|
75
|
+
// records `hostAcceptance` with `MCP_ROUTE_UNMAPPED` before any request was sent.
|
|
76
|
+
review: Object.freeze({ method: 'POST', path: '/tasks/review' }),
|
|
73
77
|
// Read-only workspace facts. Registered on the execution plane beside `/status`
|
|
74
78
|
// so it answers with the switch off; it creates nothing to clean up.
|
|
75
79
|
preflight: Object.freeze({ method: 'POST', path: '/workspace/preflight' }),
|
|
@@ -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.
|
|
4
|
+
version = "1.4.1"
|
|
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."
|
|
@@ -68,8 +68,8 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
68
68
|
- `isolation: "shared"` (reason `PREFLIGHT_DIRTY_SHARED_EXPLICIT`) — a dirty
|
|
69
69
|
workspace was already allowed explicitly. Dispatch only if that allowance is
|
|
70
70
|
part of this request; it must be preserved.
|
|
71
|
-
3. Set `title` to a short description of the actual work, in the operator's language
|
|
72
|
-
(for example, "修复登录错误" or "制作潘德 G 版装备表"). Do not use role instructions,
|
|
71
|
+
3. Set `title` to a short description of the actual work, in the operator's language
|
|
72
|
+
(for example, "修复登录错误" or "制作潘德 G 版装备表"). Do not use role instructions,
|
|
73
73
|
task ids or generic labels as the title. Then submit one complete, bounded task
|
|
74
74
|
containing the exact authorized workspace path supplied by the parent session, the concrete work to perform, and
|
|
75
75
|
the acceptance checks. Never guess a different workspace. Include the workspace
|
|
@@ -106,28 +106,44 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
106
106
|
recorded isolation even if the current settings changed. If the original tree
|
|
107
107
|
is unavailable or cannot be proven, report the refusal and ask; do not retry as
|
|
108
108
|
a new task to get past it.
|
|
109
|
-
5. SUBMIT, THEN WAIT. Keep the returned taskId and call `delegate_wait` with
|
|
110
|
-
same taskId. Repeat `delegate_wait` on the SAME
|
|
111
|
-
reasons below. Do NOT poll `delegate_result`
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
5. SUBMIT, THEN WAIT. Keep the returned taskId and call `delegate_wait({ taskId })` with
|
|
110
|
+
that same taskId and NO `waitSeconds` argument. Repeat `delegate_wait` on the SAME
|
|
111
|
+
taskId until it returns one of the reasons below. Do NOT poll `delegate_result` or
|
|
112
|
+
`delegate_status` in a loop while a task runs: one `delegate_wait` already blocks
|
|
113
|
+
internally and re-issues its own bounded observation requests, so it IS the waiting
|
|
114
|
+
loop. That internal cadence (about one observation every 25 seconds) belongs to the
|
|
115
|
+
tool, not to you: it is not a rhythm you should imitate, narrate or act on.
|
|
116
|
+
Never submit a duplicate because a task is still running; use `delegate_cancel` to
|
|
117
|
+
stop it. Keep that taskId for later follow-ups.
|
|
118
|
+
`delegate_wait` already waits up to 3600 seconds (one hour) by default and cannot
|
|
119
|
+
wait longer than that. So: do not shorten it, and do not try to "stay longer" by
|
|
120
|
+
raising it — when a wait ends you simply call it again on the same taskId.
|
|
121
|
+
A shorter explicit `waitSeconds` is legal but is only for a one-off diagnostic the
|
|
122
|
+
operator explicitly asked for; it is never the normal loop.
|
|
117
123
|
5a. WHAT THE WAIT REASONS MEAN, and what you do next.
|
|
118
124
|
- `heartbeat`: nothing to report. The wait expired with no news. You will normally
|
|
119
125
|
never see this, because the tool re-issues internally. If you do see it, call
|
|
120
126
|
`delegate_wait` on the SAME task again. Never treat it as progress, as a stall or
|
|
121
127
|
as an excuse to submit anything.
|
|
122
|
-
- `attention`: the task has been
|
|
123
|
-
|
|
124
|
-
is
|
|
125
|
-
returns (phase, last activity, current tool
|
|
126
|
-
verdict, elapsed) and decide whether to keep
|
|
127
|
-
call `delegate_wait` on the SAME task. Never cancel,
|
|
128
|
-
and never submit a replacement merely because a task is
|
|
129
|
-
or test has been running a long time. Only a concrete,
|
|
130
|
-
anything else, and then you report it instead of silently
|
|
128
|
+
- `attention`: the task has been COMPLETELY SILENT for longer than the configured
|
|
129
|
+
inactivity threshold (ten minutes by default). It does NOT mean an ordinary wait
|
|
130
|
+
ended — a wait ending is `wait-limit`, not `attention`. This is a QUESTION, not a
|
|
131
|
+
verdict. Read the compact diagnostic it returns (phase, last activity, current tool
|
|
132
|
+
and how long it has run, the self-check verdict, elapsed) and decide whether to keep
|
|
133
|
+
waiting. DEFAULT: keep waiting — call `delegate_wait` on the SAME task. Never cancel,
|
|
134
|
+
never mark the task failed, and never submit a replacement merely because a task is
|
|
135
|
+
quiet or because one tool or test has been running a long time. Only a concrete,
|
|
136
|
+
stated error justifies anything else, and then you report it instead of silently
|
|
137
|
+
restarting work.
|
|
138
|
+
If the same answer instead carries a `failure` block (`kind:
|
|
139
|
+
"repeated-tool-failure"`, with `toolName`, `failureCode`, `consecutive`), the task is
|
|
140
|
+
NOT silent: the worker has repeated ONE operation and failed the same way several
|
|
141
|
+
times in a row. That is a different situation and needs a different decision. It is
|
|
142
|
+
reported ONCE per occurrence, and nothing was cancelled, retimed or reconfigured
|
|
143
|
+
automatically. Decide deliberately: keep waiting (the worker may still recover),
|
|
144
|
+
cancel, or write a follow-up that gives the worker the missing information. Do not
|
|
145
|
+
repeat the identical instruction and hope for another outcome, and do not take the
|
|
146
|
+
reminder itself as proof the task can never succeed.
|
|
131
147
|
- `permission`: the worker is PAUSED on one native tool call awaiting YOUR
|
|
132
148
|
decision. This is not a stall and not a failure. Do not submit a duplicate and do
|
|
133
149
|
not cancel it merely because it waits.
|
|
@@ -159,6 +175,29 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
159
175
|
findings, changed files) and then do the review yourself, in Codex. If the diff
|
|
160
176
|
is large, inspect only the files that matter for this change, once each. Do not
|
|
161
177
|
re-read the same evidence repeatedly, and never reply "done" without reviewing.
|
|
178
|
+
The review note is up to 8000 Unicode code points; a longer answer states
|
|
179
|
+
`noteOmitted: true` and the note is read in pages with `reviewNoteOffset` and
|
|
180
|
+
`reviewNoteLimit` (2000 code points per page) until `complete` is true. Read the
|
|
181
|
+
full note before concluding when the page says it is longer.
|
|
182
|
+
After the review, call `delegate_review` on THAT task with `decision: "accepted"`
|
|
183
|
+
or `decision: "changes-requested"`. A passing conclusion keeps a SHORT note (what
|
|
184
|
+
you checked and that it passed); a rework note is written ONCE as a single
|
|
185
|
+
consolidated correction list, not as a conversation.
|
|
186
|
+
Record accepted only when the delivered evidence supports it. This records your
|
|
187
|
+
conclusion; it grants no tool permission and does not merge files.
|
|
188
|
+
A review is only recorded once the answer says it is durable (`reviewPersistence`
|
|
189
|
+
`state: "saved"`, or a returned `hostAcceptance`). If the answer says `saving` or
|
|
190
|
+
`timed-out`, the write is still running: do NOT report it as recorded and do NOT
|
|
191
|
+
resubmit or re-dispatche the work — read the SAME task again with
|
|
192
|
+
`delegate_result`/`delegate_wait` until it is confirmed. A `failed` write is a
|
|
193
|
+
recording problem, not proof that execution failed; retry it on the same task.
|
|
194
|
+
For changes-requested, consolidate corrections and submit a follow-up using
|
|
195
|
+
`continueFromTaskId`; do not overwrite the old task's decision. Never mark old
|
|
196
|
+
records accepted in bulk, and never claim a decision was saved when an older
|
|
197
|
+
server lacks this tool.
|
|
198
|
+
Reviewing is done in ONE pass per delivery: do not call `delegate_review` to
|
|
199
|
+
"check in" while the run is still going, and do not review the same result more
|
|
200
|
+
than once.
|
|
162
201
|
- `failed`, `cancelled`: the run ended without deliverables. Call
|
|
163
202
|
`delegate_result` ONCE for the same task to read the recorded reason, then report
|
|
164
203
|
it. Do not resubmit identical work hoping for a different result; if a correction
|
|
@@ -177,10 +216,19 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
177
216
|
stopped. Keep the taskId, and FIRST check one fact with `delegate_result` (state,
|
|
178
217
|
recorded outcome, whether it is still live) before deciding anything. Do not
|
|
179
218
|
re-wait indefinitely on a task you cannot classify.
|
|
180
|
-
- `wait-limit
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
219
|
+
- `wait-limit`: your own wait budget ran out and NOTHING about the task changed. The
|
|
220
|
+
answer carries `actionable: false` and `terminal: false`: no result, no decision and
|
|
221
|
+
no business action is required. Call `delegate_wait` on the SAME task immediately,
|
|
222
|
+
again with no `waitSeconds`. It is not a failure, not a stall, and not a reason to
|
|
223
|
+
submit a new task or to check the implementation yourself.
|
|
224
|
+
- A CLIENT-SIDE tool timeout (your host's own limit ending the call — whatever that
|
|
225
|
+
limit happens to be, not necessarily a minute) is NOT `wait-limit` and says NOTHING
|
|
226
|
+
about the task: it does not prove the
|
|
227
|
+
execution stopped, and it does not prove it is still alive. Keep the taskId and
|
|
228
|
+
call `delegate_wait` on the SAME task again. If you genuinely need to know more,
|
|
229
|
+
read one compact fact with `delegate_result`; do not assume an outcome, and never
|
|
230
|
+
submit a duplicate, restart or cancel a task because a client timeout fired. Waiting
|
|
231
|
+
for a task and having your own observation interrupted are different events.
|
|
184
232
|
5b. WHEN THE HOST CANNOT SEND A SECOND CALL. Some hosts forward one tool call at a time,
|
|
185
233
|
so while a long `delegate_wait` is outstanding this session cannot send anything
|
|
186
234
|
else — not a status read, not a cancel. If the operator asks to STOP or INSPECT the
|
|
@@ -208,6 +256,43 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
208
256
|
for both preflight and submit. Then call `delegate_wait` on the NEW task id and
|
|
209
257
|
follow the reasons again. Never submit a correction as an unrelated new task to
|
|
210
258
|
escape a long wait, and never reuse an id to "keep context".
|
|
259
|
+
5d. OUTER WAIT: WHEN YOUR HOST TAKES THE CALL BACK. Your host, not this plugin,
|
|
260
|
+
decides how long one tool call may occupy your turn. A `delegate_wait` can be
|
|
261
|
+
handed back EARLY even though it asks for an hour, because the host's own tool or
|
|
262
|
+
exec time limit fired. That is an OUTER event:
|
|
263
|
+
- It does NOT mean the MCP wait ended, and it is NOT `wait-limit`. Neither of those
|
|
264
|
+
is something you can observe from the outside; only the answer's own `reason`
|
|
265
|
+
field reports those.
|
|
266
|
+
- It says NOTHING about the task: the execution may still be running exactly as
|
|
267
|
+
before. Never conclude it stopped, and never conclude it finished.
|
|
268
|
+
- Do NOT open a SECOND wait, do NOT read `delegate_result`, do NOT poll
|
|
269
|
+
`delegate_status`, and do NOT submit a duplicate or a replacement. If an exec cell
|
|
270
|
+
for this task is still open, CONTINUE THAT SAME CELL rather than starting a new
|
|
271
|
+
one; the taskId you already hold is the whole state you need.
|
|
272
|
+
- Ask the host for the longest yield it actually supports instead of handing control
|
|
273
|
+
back on a habit. When your client offers a yield/pragmas parameter, a normal wait
|
|
274
|
+
should ask for something on the order of 1200000 ms (20 minutes), not a minute. A
|
|
275
|
+
short yield is not a "safe" default: re-issuing every second, or every minute, is
|
|
276
|
+
not waiting — it is polling with extra steps, it re-enters your turn for nothing,
|
|
277
|
+
and it prevents the quiet period this mechanism exists for.
|
|
278
|
+
- A one-minute return is a CALLER CHOICE, not a documented hard limit. Do not describe
|
|
279
|
+
one minute as the client's inherent maximum, and do not claim every client supports
|
|
280
|
+
the same long yield: state what this client actually offers and use the longest value
|
|
281
|
+
it accepts.
|
|
282
|
+
- Handing control back to the human is a UI decision, NOT a statement that the
|
|
283
|
+
delegated observation stopped. The plugin keeps its own observation loop; the
|
|
284
|
+
worker keeps running.
|
|
285
|
+
- BOUNDARY, stated honestly: this plugin does not own your scheduler and cannot
|
|
286
|
+
create a background waiter, a timer or a callback that would wake you. If the
|
|
287
|
+
available yield is genuinely short and there is no automatic continuation, a long
|
|
288
|
+
wait costs one resumed turn per yield window. In that case say so plainly to the
|
|
289
|
+
operator once. Never invent an automatic wake-up, never claim the plugin will notify
|
|
290
|
+
you in the background, and never report a "background wait" that no interface
|
|
291
|
+
provides. Changing the operator's Codex configuration to work around it is also
|
|
292
|
+
outside your authority.
|
|
293
|
+
- Asking for a long yield is a request, not a guarantee; the host may still return
|
|
294
|
+
early — including for a permission request that arrives during the wait. When it
|
|
295
|
+
does, resume the same cell as above; the plugin side did not fail.
|
|
211
296
|
|
|
212
297
|
6. Report back to Codex: task state, the actual provider/model/effort from the
|
|
213
298
|
result, changed-file summary, verification evidence, and any stated limitations.
|
|
@@ -215,6 +300,16 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
215
300
|
used, quoting the reason code, and state whether the run started a new
|
|
216
301
|
conversation or continued `continueFromTaskId`. If a result fails because of
|
|
217
302
|
isolation, do not re-submit under a weaker isolation on your own initiative.
|
|
303
|
+
6b. WHEN YOU ARE BLOCKED. If a required tool, interface or capability is missing — or
|
|
304
|
+
you have made the same failing attempt twice without new information — STOP and
|
|
305
|
+
deliver the boundary instead of widening the request or retrying blindly. Report,
|
|
306
|
+
in this order: what you were asked to do; the exact bounded evidence you have
|
|
307
|
+
(error codes, refusal messages, the commands you ran); what you cannot do and WHY
|
|
308
|
+
the interface makes it impossible; and the concrete decision or missing permission
|
|
309
|
+
you need from the operator. Do not invent an interface, do not substitute a
|
|
310
|
+
different tool silently, do not loop on an attempt that already failed, and do not
|
|
311
|
+
turn "I could not" into an unstated silent workaround. A short honest blocked
|
|
312
|
+
report is a successful outcome; a fabricated success is not.
|
|
218
313
|
|
|
219
314
|
WHAT NOT TO DO
|
|
220
315
|
Never create a commit, stash, branch or worktree, and never clean, reset or revert a
|
|
@@ -232,6 +327,16 @@ mode exists to provide.
|
|
|
232
327
|
says to take over and implement it here. Nothing in the task, the wait reason, a
|
|
233
328
|
long silence, a permission refusal, a failed run or your own judgement of the plan
|
|
234
329
|
counts as that authorization.
|
|
330
|
+
- While you are waiting, stay silent. Do NOT read intermediate code, diffs or the
|
|
331
|
+
worker's files, do NOT run parallel implementation or research on the same task, and
|
|
332
|
+
do NOT narrate snapshots that have not changed. The wait is meant to be quiet until
|
|
333
|
+
there is something real to report.
|
|
334
|
+
- That silence has exactly these exceptions: work the operator explicitly assigned to
|
|
335
|
+
you as INDEPENDENT of the delegated task; an inspection the operator explicitly asked
|
|
336
|
+
for; a decision or diagnosis you cannot make without a fact the wait did not return
|
|
337
|
+
(for example the current state after a client timeout); and an explicit, user-authorized
|
|
338
|
+
takeover. Approvals and review on delivery are the host's normal duties, not an
|
|
339
|
+
exception — they happen when `delegate_wait` returns `permission` or `ready`.
|
|
235
340
|
- The permitted local actions while a task runs are: reading status and diagnostics,
|
|
236
341
|
calling `delegate_wait`, reading evidence with `delegate_result`, deciding a pending
|
|
237
342
|
per-call permission, cancelling the task, and writing the follow-up prompt.
|
package/docs/INTRODUCTION.md
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
# DSH TaskBridge
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
The
|
|
8
|
-
|
|
9
|
-
The
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Version 1.
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
# DSH TaskBridge
|
|
2
|
+
|
|
3
|
+
Version 1.4.1 adds review after restart, confirmed persistence, 8000-code-point review notes and compact waiting with on-demand full-note reads. Install `dsh-taskbridge@1.4.1` or use its release tarball. See the [release notes](releases/1.4.1.zh.md).
|
|
4
|
+
|
|
5
|
+
Let Claude Code or Codex direct DSH tasks. Choose the execution API, model and supported reasoning effort in the DSH plugin settings.
|
|
6
|
+
|
|
7
|
+
The host plans, dispatches and reviews; DSH executes using the effective configuration. Follow-up corrections explicitly continue the same task conversation and execution checkout. Providers come from DSH's existing API connections, without copying their credentials into the plugin.
|
|
8
|
+
|
|
9
|
+
The settings include the local delegation switch, worker model/effort, task timeout, concurrency, workspace isolation, project overrides and optional additional read-only model review. A newly installed plugin starts with delegation disabled. Runtime/model capability checks remain authoritative.
|
|
10
|
+
|
|
11
|
+
The quiet wait observes execution inside the program and returns at actionable boundaries. Pending wider-permission calls are presented to the commander for a single-call decision. Completion is evidence for host review, never automatic host acceptance.
|
|
12
|
+
|
|
13
|
+
Version 1.4.0 clarifies long outer waits and continuation of the same running call, adds a configurable repeated-tool-failure reminder (3 by default; 0 disables it), and lets the host explicitly record an accepted or changes-requested decision with `delegate_review`. Task records display that decision instead of remaining indefinitely awaiting review.
|
|
14
|
+
|
|
15
|
+
Codex has a managed agent/MCP installation button. Version 1.3.2 names the companion `dsh-taskbridge` and migrates unchanged published legacy companions. New DSH Workspaces use the task's work-content title; explicit follow-ups keep the original Workspace and conversation. Claude Code connects using standard stdio MCP; see [the manual guide](claude-code.md). A Claude one-click installer and native client mention selection are not promised.
|
|
16
|
+
|
|
17
|
+
Version 1.3.1 adopts DSH TaskBridge and the package identity `dsh-taskbridge`, replacing `dsh-delegate` and the GitHub-only `dsh-taskdispatch` 1.3.0. Read the [upgrade guide](taskbridge-upgrade.md) before replacing an old installation. Historical data, MCP tools, environment variables and the Codex `dsh-delegate` technical identifier remain compatible. Do not run old and new bundles together.
|
|
18
|
+
|
|
19
|
+
In DSH's Add plugin dialog, use `dsh-taskbridge@1.4.1`; use the official npm registry if a regional mirror has not synchronized yet. Distribution also uses GitHub releases and a [DSH custom plugin index](plugin-market.md) pinned to exact Git commits. This is not universal official marketplace inclusion. A single same-model, approximately 45-second waiting comparison reduced recorded waiting-response tokens by 66.58% (3 model responses to 1); this is not a full-task or billing reduction. See the [measurement report](releases/1.4.0-token-benchmark.zh.md). Client time limits and full Desktop upgrade behavior require environment-specific verification.
|
package/docs/INTRODUCTION.zh.md
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
# DSH TaskBridge
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
# DSH TaskBridge
|
|
2
|
+
|
|
3
|
+
1.4.1 补齐跨重启补审、可靠保存、8000 Unicode 码点审查意见及按需全文读取,页面自动显示审查进展。安装 `dsh-taskbridge@1.4.1` 或对应的 Release 安装包;详见 [1.4.1 更新说明](releases/1.4.1.zh.md)。
|
|
4
|
+
|
|
5
|
+
**让 Claude Code 或 Codex 指挥 DSH 完成任务,在 DSH 插件里配置执行所用的 API、模型和思考强度。**
|
|
6
|
+
|
|
7
|
+
你向指挥端说明目标,指挥端负责规划、拆分、派工和审查;DSH 根据插件设置调用执行模型。执行结束后交回结果,有需要修改的地方,指挥端可以续接同一任务对话继续处理。
|
|
8
|
+
|
|
9
|
+
## 在 DSH 中配置执行
|
|
10
|
+
|
|
11
|
+
- 从 DSH 已接入的 API 提供方中选择,无需重复填写接口地址和密钥。
|
|
12
|
+
- 选择执行模型及其支持的思考强度;也可设置任务超时、并发数量和工作区隔离方式。
|
|
13
|
+
- 用一个本机调用总开关控制是否允许派工。新安装默认关闭;安装插件不会自动授权执行。
|
|
14
|
+
- 可选开启额外模型审查,为审查单独选择 API、模型和思考强度;最终是否接收结果仍由指挥端决定。
|
|
15
|
+
- 保存项目级覆盖和非敏感配置预设。具体选项以运行时及模型实际支持能力为准。
|
|
16
|
+
|
|
17
|
+
## 在执行期间减少重复干预
|
|
18
|
+
|
|
19
|
+
`delegate_wait` 在程序内部观察任务。正常执行时保持等待,只在交付、失败、审批、停滞检查或等待上限等节点返回简短信息。连续 5 分钟无新活动时程序自查,10 分钟时请求指挥端判断;阈值可在高级设置中调整。
|
|
20
|
+
|
|
21
|
+
需要更大权限的工具调用会暂停,指挥端根据准确操作和指纹决定单次允许或拒绝,不是默认全部放行。交付后集中审查,修正通过 `continueFromTaskId` 续接原对话与执行工作区。
|
|
22
|
+
|
|
23
|
+
1.4.0 明确长等待及同一等待单元续接规则,新增默认 3 次的重复工具失败提醒(可调整,0 关闭)。指挥端审查交付后通过 `delegate_review` 写回结论,任务页区分“审查通过”“需要修正”和尚未审查,避免记录始终停在待审。
|
|
24
|
+
|
|
25
|
+
1.3.2 起,新建的 DSH 工作区按实际工作内容命名,例如“制作潘德 G 版装备表”,不再只显示工作树的任务编号。指挥端随派工提交标题,旧客户端则从任务目标提取;续接同一任务时保留原名称与对话。
|
|
26
|
+
|
|
27
|
+
## 连接 Claude Code 与 Codex
|
|
28
|
+
|
|
29
|
+
- **Codex**:设置页提供智能体及 MCP 的安装/修复按钮。智能体名为 `dsh-taskbridge`,更新会迁移未修改的旧智能体,派工规则随安装写入。客户端是否提供输入框 `@` 选择由客户端版本决定。
|
|
30
|
+
- **Claude Code**:通过标准 stdio MCP 连接,参见 [接入说明](claude-code.md)。目前没有一键安装 Claude Code 的按钮,也未进行真实 Claude Code 客户端验收。
|
|
31
|
+
|
|
32
|
+
## 安装、升级和边界
|
|
33
|
+
|
|
34
|
+
项目原名 DSH Delegate,1.3.0 曾使用 DSH TaskDispatch。1.3.1 起统一为 **DSH TaskBridge**,包名为 `dsh-taskbridge`。从旧包升级请先阅读 [更名升级说明](taskbridge-upgrade.md)。在 DSH“添加插件”中输入 `dsh-taskbridge@1.4.1`;中国大陆镜像若尚未同步,改选 npm 官方源。GitHub Release 同时提供安装包。
|
|
35
|
+
|
|
36
|
+
[插件索引与更新说明](plugin-market.md)介绍如何添加索引,在 DSH 的“发现”中搜索本插件。发布自定义索引不代表已进入官方内置市场;DSH 当前需要用户自行添加可信索引。
|
|
37
|
+
|
|
38
|
+
同一 Codex 模型的约 45 秒等待对照样本中,长等待把模型响应从 3 次减少为 1 次,记录的等待阶段 token 总量减少 66.58%。这不是整个任务或账单的节省比例;方法与边界见[测量报告](releases/1.4.0-token-benchmark.zh.md)。插件不保证所有客户端完全零唤醒,Windows 与隔离迁移测试也不等同于所有平台和客户端均已验收。
|