dsh-taskbridge 1.4.1 → 1.5.0
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 +22 -1
- package/README.md +10 -19
- package/bin/dsh-delegate-mcp.d.ts +20 -3
- package/bin/dsh-delegate-mcp.js +15 -0
- package/codex/dsh-taskbridge.toml +74 -5
- package/docs/INTRODUCTION.md +2 -2
- package/docs/INTRODUCTION.zh.md +2 -2
- package/docs/codex-integration.md +6 -3
- package/docs/conversation-placement.md +44 -7
- package/docs/plugin-market.md +2 -2
- package/docs/redaction-contract.md +47 -4
- package/docs/releases/1.4.2.zh.md +23 -0
- package/docs/releases/1.5.0-token-benchmark.zh.md +73 -0
- package/docs/releases/1.5.0.zh.md +51 -0
- package/docs/runtime-compatibility.md +30 -51
- package/docs/silent-wait.md +84 -0
- package/docs/taskbridge-upgrade.md +1 -1
- package/docs/worker-permissions.md +154 -17
- package/lib/client.js +3 -0
- package/package.json +11 -9
- package/src/client/api.js +26 -0
- package/src/codex/installer.js +18 -0
- package/src/config/redact.js +72 -11
- package/src/http/execution-plane.js +76 -5
- package/src/index.d.ts +285 -0
- package/src/index.js +72 -2
- package/src/jobs/activity.js +10 -0
- package/src/jobs/continuation-identity.js +278 -0
- package/src/jobs/engine.js +326 -36
- package/src/jobs/history.js +53 -0
- package/src/mcp/continuation.js +317 -0
- package/src/mcp/metrics.js +343 -0
- package/src/mcp/server.js +1079 -47
- package/src/mcp/wait.js +266 -74
- package/src/review/prompts.js +145 -126
- package/src/runtime/agent-runner.js +165 -0
- package/src/runtime/permissions.js +192 -2
- package/src/runtime/question-call.js +162 -0
- package/src/runtime/questions.js +909 -0
- package/src/runtime/session-placement.js +78 -5
- package/src/version.js +99 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# DSH TaskBridge 1.5.0 更新说明
|
|
2
|
+
|
|
3
|
+
发布日期:2026年11月15日。安装标识:`dsh-taskbridge@1.5.0`。
|
|
4
|
+
|
|
5
|
+
让你的 Claude Code 或 Codex 指挥 DSH 工作,在 DSH 插件中选择已有 API、执行模型和思考强度。1.5.0 的重点是把“派工—静默等待—必要判断—集中审查—续接修正”接成完整流程。
|
|
6
|
+
|
|
7
|
+
## 为什么是1.5.0
|
|
8
|
+
|
|
9
|
+
这次不仅修复缺陷,还新增普通提问回答工具、程序计量工具,以及审批或回答后在同一调用内继续等待的能力。旧调用方式保持兼容,因此按新增功能的小版本准备1.5.0,1.4.3仅作为此前本地测试包的版本前缀,不另行发布。
|
|
10
|
+
|
|
11
|
+
## 新功能
|
|
12
|
+
|
|
13
|
+
- **审批后直接续等。** `delegate_permission_decide` 支持 `waitAfterDecision: true`,指挥端决定当前请求后,程序直接等下一事件,不必再调用一次模型来恢复等待。
|
|
14
|
+
- **普通问题及时转交。** 接入 DSH 原生 `ask_user_question`,新增 `delegate_question_answer`。问题出现时立即返回完整题目和选项;`waitAfterAnswer: true` 可在回答后直接续等。
|
|
15
|
+
- **程序调用计量。** 新增只读 `delegate_metrics`,统计工具调用、等待返回、原因、内部观察、返回字节及决定/回答事实。它不把程序内部观察当作GPT响应,也不虚构宿主token或费用。
|
|
16
|
+
- **集中审查规则。** 正常执行期间由程序等待;只处理提问、审批、真实异常和交付。审查后写回结论,有问题通过 `continueFromTaskId` 续接原对话。
|
|
17
|
+
|
|
18
|
+
## 修正与边界
|
|
19
|
+
|
|
20
|
+
- 正常的 `dsh-delegate`、`dsh-taskbridge` 目录不再被误脱敏。显示投影与可恢复身份分离,恢复时核对真实路径和摘要,拒绝矛盾或证据不足的续接。
|
|
21
|
+
- 审批参数单项上限8192字符、总上限16384字符。证据超过边界时明确不可批准,不根据残缺命令授权。
|
|
22
|
+
- 拒绝理由注入同一个执行Agent,并记录是否成功送达;原操作仍保持拒绝,新操作必须重新申请。
|
|
23
|
+
- 问题完整传送或明确不可回答。过期、取消、换会话、原调用失效及重复回答都受核验;问题回答不授予权限。
|
|
24
|
+
- 大答案回执不会挤掉新题目或丢失已经应用的事实。已应用后等待失败仍保留回执,结果未知时不自动重送决定或答案。
|
|
25
|
+
- MCP与插件版本从安装包清单读取。Codex托管升级识别正式1.4.2和已验证的本地test.1/test.2原版规则;自定义文件保持原样。
|
|
26
|
+
- 继续默认通用加载,不声明DSH版本白名单;所需接口仍按实际能力检查。未新增CLI执行通道或Claude Code一键安装。
|
|
27
|
+
|
|
28
|
+
## Codex token实测
|
|
29
|
+
|
|
30
|
+
用户提供的2026年11月14日至15日账单,与同一Codex聊天的响应记录按非缓存输入、缓存读取、输出三项用量逐条匹配。
|
|
31
|
+
|
|
32
|
+
优化前等待样本48次模型响应,等待相关token共9,986,839;本次候选等待样本3次响应,共457,224,**样本总量减少95.42%**。两项任务时长不同,按实际执行时长折算,等待相关token/分钟减少**94.46%**。
|
|
33
|
+
|
|
34
|
+
这不是整个任务或所有用户的固定节省率。旧任务有29次审批,新长时验收没有审批,且上下文大小不同。只比较相同的“外层续等”动作时,token/分钟减少**90.07%**。完整口径、账单费用与交付后审查成本见[真实账单对照报告](1.5.0-token-benchmark.zh.md)。
|
|
35
|
+
|
|
36
|
+
## 已验证
|
|
37
|
+
|
|
38
|
+
在Windows上的本地test.2候选完成:
|
|
39
|
+
|
|
40
|
+
- 原生提问转交、回答后续等、正式拒绝反馈送达、972字符完整命令审批、90秒操作、集中审查持久化。
|
|
41
|
+
- 真正重启Desktop和插件运行时、监听端口改变后,仍保留已接受结论并续接同一Session;执行者不读文件就准确回忆旧上下文。
|
|
42
|
+
- 真实选择的模型串行完成12轮100秒的计时/只读哈希校验,整轮约21分23秒。只有1次MCP等待和1次ready返回,执行中结果查询为0;外层客户端到期后继续同一exec。
|
|
43
|
+
- test.2候选1465项完整自动测试通过;同步1.5.0版本戳并补充test.2托管规则迁移后,完整回归1468项全部通过,针对性检查160项通过。发布包本身另做解包、MCP握手与升级验证。
|
|
44
|
+
|
|
45
|
+
这些证据不能代替所有平台、提供方、Claude Code客户端、一小时等待上限和全部故障组合的实测。插件不保证跨客户端绝对零模型唤醒;旧记录若已经丢失可信路径证据,也不能凭空恢复。
|
|
46
|
+
|
|
47
|
+
## 更新方法
|
|
48
|
+
|
|
49
|
+
正式上线后,在DSH插件管理中更新 `dsh-taskbridge`,或添加 `dsh-taskbridge@1.5.0`;也可安装本Release提供的 `dsh-taskbridge-1.5.0.tgz` 并核对SHA256。区域镜像未同步时改选npm官方源。不要手工改写Desktop保留的profile。
|
|
50
|
+
|
|
51
|
+
原版Codex托管规则可在插件启动时刷新;尚未安装的集成仍需在设置页点击安装按钮。已有客户端若仍缓存旧MCP工具定义,需要重新连接或新开会话,确认能看到 `delegate_question_answer` 等10个工具。不要同时启用旧Delegate/TaskDispatch与TaskBridge。
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
# Runtime compatibility
|
|
2
2
|
|
|
3
|
-
Build 1.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
report; the package is distributed through npm and the GitHub Release. See the
|
|
13
|
-
[1.4.1 release notes](releases/1.4.1.zh.md) for upgrade details and the
|
|
3
|
+
Build 1.5.0 retains the loading policy introduced in 1.4.2: **no DSH version whitelist**: it omits `engines.dsh`, declares
|
|
4
|
+
host-provided `@deepseek-ai/dsh-*` peers as `*`, and publishes no DSH engine range
|
|
5
|
+
in the custom plugin index. The plugin uses runtime capability checks rather than
|
|
6
|
+
rejecting a host solely by its version number. Node.js `>=24` is still required.
|
|
7
|
+
|
|
8
|
+
The historical runtime audits below describe the interfaces already implemented;
|
|
9
|
+
they are not an exclusive admission list or a claim of end-to-end testing on every
|
|
10
|
+
DSH build. See the [1.4.2 release notes](releases/1.4.2.zh.md) for this change,
|
|
11
|
+
the [1.4.1 release notes](releases/1.4.1.zh.md) for review fixes, and the
|
|
14
12
|
[1.3.1 release report](releases/1.3.1.zh.md) for historical distribution verification.
|
|
15
13
|
|
|
16
14
|
`1.1.0` added silent waiting: the global `monitoring` thresholds (self-check and attention
|
|
@@ -42,39 +40,20 @@ upgrades the installed MCP entry) and Codex reloaded before the new wait rules a
|
|
|
42
40
|
managed `tool_timeout_sec` take effect. No unit-test count and no mock constitutes an
|
|
43
41
|
acceptance run.
|
|
44
42
|
|
|
45
|
-
## 1.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
| `0.2.2-rc.1` | Supported; the newest runtime this build adds | Native sources audited (`.cache/compat-022-20261107/reference-022`); native base+web bootstrap verified in isolated fixtures (`.cache/native022-host-*`). |
|
|
60
|
-
|
|
61
|
-
Additional rules:
|
|
62
|
-
|
|
63
|
-
- **DSH checks these ranges with prereleases included.** `@deepseek-ai/dsh-*` peer
|
|
64
|
-
ranges are matched with `semver` plus `includePrerelease`, so an exact prerelease
|
|
65
|
-
string is required; a caret or tilde would admit builds that were never exercised.
|
|
66
|
-
- **No version was dropped.** Every release admitted before this one is still admitted,
|
|
67
|
-
and the automated tests assert that the manifest, both lockfiles and the table above
|
|
68
|
-
agree with each other.
|
|
69
|
-
- **Any other DSH version is unverified.** Do not assume it works; the loader will
|
|
70
|
-
refuse a plugin whose peer range does not match.
|
|
71
|
-
- **Older *plugin* builds are refused by the native gate.** The gate is checked against
|
|
72
|
-
the plugin's declared ranges, so an older build (`0.1.11` and anything before it) that
|
|
73
|
-
does not declare `0.2.2-rc.1` is *skipped* by a `0.2.2-rc.1` host
|
|
74
|
-
(`skippedBundles` / a denied row) rather than loaded with unknown behaviour. Getting
|
|
75
|
-
this build's behaviour on `0.2.2-rc.1` requires upgrading the plugin, not relaxing the
|
|
76
|
-
gate.
|
|
77
|
-
- **Node.js `>= 24`** is required (`engines.node`), matching the DSH runtimes above.
|
|
43
|
+
## 1. Default loading policy
|
|
44
|
+
|
|
45
|
+
- No DSH version whitelist is declared. Both stable and prerelease DSH builds may
|
|
46
|
+
pass the host's metadata check without updating an enumerated range.
|
|
47
|
+
- DSH falls back to its peer checks when `engines.dsh` is absent; the native peers
|
|
48
|
+
use `*` so that fallback does not restore the old restriction.
|
|
49
|
+
- The index omits the optional engine field rather than publishing an empty or
|
|
50
|
+
outdated DSH range. Package and discovery metadata therefore agree.
|
|
51
|
+
- Required runtime capabilities, model-selection readback and permission checks
|
|
52
|
+
remain in place. Removing a version filter does not disable those checks.
|
|
53
|
+
- Development dependencies remain pinned for reproducible tests; they do not
|
|
54
|
+
restrict the host-provided peer versions used by an installed plugin.
|
|
55
|
+
- Older plugin packages keep their own metadata and can still be refused by a
|
|
56
|
+
newer host. Upgrade to `dsh-taskbridge@1.5.0` to use this loading policy.
|
|
78
57
|
|
|
79
58
|
## 2. What DSH 0.2.2 changes
|
|
80
59
|
|
|
@@ -205,27 +184,27 @@ What remains genuinely unverified:
|
|
|
205
184
|
|
|
206
185
|
## 5. Upgrading from an older plugin build
|
|
207
186
|
|
|
208
|
-
1. Download `dsh-taskbridge-1.
|
|
187
|
+
1. Download `dsh-taskbridge-1.5.0.tgz` from the GitHub Release, or build the package locally (`npm pack`).
|
|
209
188
|
2. Install it the way your surface requires: the Desktop **Plugins manager** for a
|
|
210
189
|
Desktop profile (npm/CLI operations on that profile are refused), or
|
|
211
|
-
`dsh plugin --profile <name> add ./dsh-taskbridge-1.
|
|
190
|
+
`dsh plugin --profile <name> add ./dsh-taskbridge-1.5.0.tgz` for a CLI profile you
|
|
212
191
|
start yourself.
|
|
213
192
|
3. The settings, the switch value and the task history are preserved
|
|
214
193
|
(`$DSH_HOME/data/dsh-delegate`); nothing is migrated destructively.
|
|
215
194
|
4. If the Codex companion was installed, no action is needed: a `0.1.11` — or `0.1.10` —
|
|
216
195
|
agent file whose bytes still match a published template is refreshed automatically on
|
|
217
196
|
startup, or explicitly from the Codex panel. A file you edited is left untouched.
|
|
218
|
-
5. To roll back, re-install the older `.tgz`. The data directory is not deleted
|
|
219
|
-
|
|
220
|
-
|
|
197
|
+
5. To roll back, re-install the older `.tgz`. The data directory is not deleted.
|
|
198
|
+
Older packages retain their own version restrictions and may be refused by the
|
|
199
|
+
host; the unrestricted policy is specific to 1.4.2 and later builds that keep it.
|
|
221
200
|
|
|
222
201
|
## 6. Where this is enforced
|
|
223
202
|
|
|
224
203
|
| Claim | Enforced by |
|
|
225
204
|
| --- | --- |
|
|
226
|
-
|
|
|
205
|
+
| No DSH engine range and unrestricted native peers | `tests/package.test.js` (manifest and host-provided peer checks) |
|
|
227
206
|
| Both lockfiles' root metadata match `package.json` | `tests/package.test.js` ("the lockfile pins the same dependency set…") |
|
|
228
|
-
|
|
|
207
|
+
| The published index does not restore a DSH version filter | `tests/taskdispatch-release.test.js` (real index generator output) |
|
|
229
208
|
| A published `0.1.11` or `0.1.10` agent is refreshed, an edited one is not | `tests/codex-integration.test.js` |
|
|
230
209
|
|
|
231
210
|
|
package/docs/silent-wait.md
CHANGED
|
@@ -188,6 +188,68 @@ node bin/dsh-delegate-control.js cancel <taskId> # 只停止这一个任务
|
|
|
188
188
|
- 不会被报告成"长时间没进展";
|
|
189
189
|
- 授权决定只对**那一次调用**有效,不构成常规权限,也不会被后续调用复用。
|
|
190
190
|
|
|
191
|
+
### 5.1 决定之后直接续等(`waitAfterDecision`)
|
|
192
|
+
|
|
193
|
+
`delegate_permission_decide` 有一个可选参数 `waitAfterDecision: boolean`,默认 `false`。
|
|
194
|
+
|
|
195
|
+
- **省略或 `false`**:行为与之前完全一致——只做决定,返回权限路由自己的原样答复
|
|
196
|
+
(`ok`/`task`/`permission`/`hostAcceptance`),不额外增加任何字段。旧客户端不受影响。
|
|
197
|
+
- **`true`**:在同一次 MCP 调用内,决定被后端确认生效后,**复用同一个等待循环**
|
|
198
|
+
(`delegate_wait` 的那一套:25 秒一次的受限观察、默认一小时的截止时间、心跳处理、
|
|
199
|
+
`interrupted` 分类)继续等同一个 `taskId`,直到出现真正需要判断的事件。
|
|
200
|
+
|
|
201
|
+
答复形状是**扁平的 `delegate_wait` 形状 + `decisionReceipt`**:`reason`/`state`/
|
|
202
|
+
`actionable`/`terminal`/`permission`/`task` 在顶层,新申请仍带完整的脱敏操作、
|
|
203
|
+
`completeness` 与 `fingerprint`。不嵌套 `followUpWait` 这样的子块,因此已有的
|
|
204
|
+
`boundedJson` 权限保护照旧生效:答复过大时,**回执和当前待定申请都会保留**,
|
|
205
|
+
被截短的操作会明确标记为不可放行(`permissionDecidable: false`),不会被当成完整操作。
|
|
206
|
+
|
|
207
|
+
`decisionReceipt` 说明决定本身的结果,例如
|
|
208
|
+
`{ taskId, requestId, decision, fingerprint, applied, confirmation, outcome?, verified? }`:
|
|
209
|
+
|
|
210
|
+
| 情形 | 回执 | 含义 |
|
|
211
|
+
| --- | --- | --- |
|
|
212
|
+
| 后端确认生效 | `applied: true`、`confirmation: "applied"` | 决定已生效,后续等待失败或取消都不会撤销它 |
|
|
213
|
+
| 后端明确拒绝 | 抛出原有拒绝码,无回执 | 决定未生效,也不会有任何等待开始 |
|
|
214
|
+
| 传输失败、超时、畸形答复 | `applied: null`、`confirmation: "unknown"` | **不知道**是否已生效;先读任务真实状态,不要直接重送 |
|
|
215
|
+
| 答复与所决定的不一致 | `applied: null`、`confirmation: "unknown"`,附 `reason`/`evidence` | 答复中的 task、request 或 operation 与实际不符,或缺少 `state`/`outcome` 等必要证据 |
|
|
216
|
+
| 答复 `ok: false` 或缺证据 | 同上 | `applied` 只可能来自**匹配的真实证据**,不会因为"有答复"就置真 |
|
|
217
|
+
| 答复过大被裁剪 | 最小回执:身份 + `applied` + `confirmation`(`evidenceOmitted: true`) | 大块 `grant`/`verified` 证据被丢弃并可另读,但回执身份不丢 |
|
|
218
|
+
|
|
219
|
+
确认"已生效"要求同时满足:`ok: true`、同一 task、同一 request、同一 operation fingerprint、
|
|
220
|
+
`state` 为已结算、`outcome` 与本次决定一致(`allow-once` 对应 `allowed-once`,
|
|
221
|
+
`reject` 对应 `rejected`)。`allow-once` 还需要 `verified` 证据,`reject` 不需要。
|
|
222
|
+
真实后端记录的 `decision` 字段可能为 `null`,因此不把它当作必要条件;判定依据是
|
|
223
|
+
`outcome` 与实际证据。**引用的 fingerprint 不会被后端值静默替换**:不一致就是矛盾。
|
|
224
|
+
|
|
225
|
+
几条固定规则:
|
|
226
|
+
|
|
227
|
+
- **已经决定的申请不会被再次询问**:等待循环按 `requestId` + `fingerprint` 完整匹配跳过
|
|
228
|
+
旧记录;**新 `requestId`,或同一 id 但操作变了,都是新问题**,不会继承上一次的允许。
|
|
229
|
+
- **决定被拒绝时不会进入等待**;决定是本次调用的第一次请求,所以被拒时不会留下任何观察。
|
|
230
|
+
- **决定已生效而后续等待失败/被取消/抛错时,本次仍是成功答复**:`decisionReceipt.applied`
|
|
231
|
+
保持 `true`,`reason` 为 `null`(没有观察到任何任务状态,就不编造),并附
|
|
232
|
+
`waitError`(含 `phase: "follow-up-wait"`)与"不要重送决定、执行未被停止"的明确指引。
|
|
233
|
+
回执只保证在**真实已生效**这一分支不丢;它不意味着任何答复都能恢复任意失败的决定。
|
|
234
|
+
- **无法确认的决定不会进入等待**:拒绝码为 `MCP_DECISION_UNCONFIRMED`(或传输失败时保留
|
|
235
|
+
后端码),`error.details.decisionReceipt` 带 `applied: null` 与原始身份。
|
|
236
|
+
- 同一请求重复提交仍由现有引擎拒绝;恢复时先读真实状态,不伪造幂等批准。
|
|
237
|
+
|
|
238
|
+
## 5.2 计量(`delegate_metrics`)
|
|
239
|
+
|
|
240
|
+
`delegate_metrics` 是**本 MCP 进程**的只读计数,不需要任务 id:
|
|
241
|
+
|
|
242
|
+
- 每个工具被调用了多少次;每次等待返回的原因、耗时、内部观察次数;
|
|
243
|
+
- 交给宿主的**工具文本字节数**——在最终脱敏、裁剪后的文本上,用
|
|
244
|
+
`Buffer.byteLength(..., 'utf8')` 计量,不是字符数,也不是答复里自报的自身长度。
|
|
245
|
+
它表示"交给传输层的数据量",**不等于**宿主确认收到;
|
|
246
|
+
- 已生效的决定次数,以及每次决定之后那次等待的关联 id。
|
|
247
|
+
|
|
248
|
+
它**不**记录工具参数、思考正文、答复正文、密钥或任务内容。宿主模型自己的轮次、
|
|
249
|
+
token 用量和费用在这个进程里**不可见**,因此报告为 `not-integrated`,而不是填 `0`。
|
|
250
|
+
这里的数字是**程序**等待了多少,不是"叫醒了模型多少次",本插件也没有任何
|
|
251
|
+
跨客户端的零唤醒承诺。
|
|
252
|
+
|
|
191
253
|
## 6. 集中审查:什么时候读证据
|
|
192
254
|
|
|
193
255
|
插件不会把对话内容、推理过程或工具输出塞进状态报告。派工方在**执行结束之后**
|
|
@@ -264,5 +326,27 @@ node bin/dsh-delegate-control.js cancel <taskId> # 只停止这一个任务
|
|
|
264
326
|
字段是判断依据,不要只看原因名字。
|
|
265
327
|
- 串行宿主下没有通用的“并发”承诺:插件传输支持并发,独立控制程序只提供 `status` 与
|
|
266
328
|
`cancel` 两个动作,也不能改变宿主的调度方式。
|
|
329
|
+
- **四类"结束"不是一回事**,不要混用:(a) `wait-limit` 是**这次调用自己**的等待预算用完,
|
|
330
|
+
任务本身没变,继续等同一个 `taskId`;(b) 外层宿主工具/执行时限把调用提前交回,是
|
|
331
|
+
**外层事件**,观察没结束、执行也没停;(c) `attention` 是**真的没有活动**超过阈值
|
|
332
|
+
(默认 10 分钟);(d) 任务的**总执行超时**是执行方自己的预算,以终态报告,既不是
|
|
333
|
+
`wait-limit` 也不是 `attention`,更不是客户端事件。
|
|
334
|
+
- 插件**不能**创建后台等待者、不能唤醒宿主模型,也**不**承诺跨客户端的零唤醒。宿主有
|
|
335
|
+
自动续接时,一次长等待只占一个续接窗口;没有时,每个 yield 窗口要花一次续接。这一点
|
|
336
|
+
必须如实说明,不能编造后台唤醒。
|
|
337
|
+
- 2026-11-14 的候选验收使用真实 Codex 外层调用、独立 stdio MCP 进程、本机 HTTP 通道与生产活动监控器,
|
|
338
|
+
持续等待 1200 秒:内部观察 48 次、消化心跳 47 次,仅返回 1 次交付事件,期间没有读取中间结果。
|
|
339
|
+
活动由脚本按真实事件格式模拟,包含持续思考流;这证明该客户端能够维持这次 20 分钟等待,
|
|
340
|
+
**不等于**真实提供方连续执行 20 分钟、所有客户端零续接或固定比例的 token/费用节省。
|
|
267
341
|
- 设置页的自动刷新只在"任务记录"标签页可见、且存在进行中的任务时运行;
|
|
268
342
|
终端状态的任务不会触发刷新。
|
|
343
|
+
|
|
344
|
+
## 1.5.0:原生提问、拒绝理由与真实验收
|
|
345
|
+
|
|
346
|
+
- 原生 `ask_user_question` 通过 `reason: question` 即时返回,问题处于 `awaiting-question`,不等十分钟停滞提醒。`delegate_question_answer` 回答一次;使用 `waitAfterAnswer: true` 可在同次调用继续等待原任务。
|
|
347
|
+
- 问题与选项完整传送;超过整体界限或含必须脱敏的内容时明确拒绝。若返回 `questionsOmitted: true` 或 `questionAnswerable: false`,不得依据残缺内容作答。
|
|
348
|
+
- `answerReceipt` 和 `decisionReceipt` 的身份、`applied`、`confirmation` 在结果裁剪或后续等待失败时仍保留。大批答案可标明省略,不反复回传全文;收到已应用回执后不要重送。
|
|
349
|
+
- 题目默认十分钟到期,最多三十分钟;DSH 原生调用若更早撤销,也立即失效。题目绑定同一 Agent、Session 和原工具调用,不会移交给新回合的同名调用。
|
|
350
|
+
- 审批拒绝理由注入同一个执行 Agent。`rejectionFeedback.delivered` 表示注入是否成功,不等于模型已理解;原操作仍被拒绝,后续申请独立判断。问题回答始终不授予任何权限。
|
|
351
|
+
|
|
352
|
+
2026-11-15,本地 test.2 候选通过实际 DSH Desktop 重启续接,以及真实模型12轮串行100秒工具等待/只读校验,整轮约21分23秒。1次 MCP 等待、1次ready返回、0次中间结果读取;外层客户端20分钟时仍需续接同一个exec。账单实测见[1.5.0等待阶段对照](releases/1.5.0-token-benchmark.zh.md),不承诺跨客户端零唤醒或所有任务固定节省率。
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
1. 等待当前任务结束,关闭旧插件的本机调用开关。
|
|
8
8
|
2. 在 DSH 插件管理中停用并卸载本项目旧 `dsh-delegate` 或 `dsh-taskdispatch` 包。**保留 `<DSH_HOME>/data/dsh-delegate` 数据目录**;DSH 若提供删除数据选项,不要勾选。新旧包不能同时启用。
|
|
9
|
-
3. 在“添加插件”中输入 **`dsh-taskbridge@1.
|
|
9
|
+
3. 在“添加插件”中输入 **`dsh-taskbridge@1.5.0`**。中国大陆镜像未同步时改选 npm 官方源。也可安装本项目 Release 的 `dsh-taskbridge-1.5.0.tgz`,或添加本项目固定 Git 提交的自定义索引。不要手动修改 Desktop 保留的 profile。
|
|
10
10
|
4. 打开 **DSH TaskBridge** 配置页,核对 API、模型、思考强度和总开关。数据目录与旧版相同;安装前关闭旧开关,避免恢复之前保存的开启状态。
|
|
11
11
|
5. 在 Codex 集成中点击“安装 / 更新 TaskBridge 智能体”,更新智能体及 MCP,然后重新加载 Codex。未修改的旧 `dsh-delegate.toml` 会迁移为 `dsh-taskbridge.toml`;修改过的文件保留。只需修复 MCP 时可使用“仅修复 MCP 配置”。启动自检不会接管其他安装目录。
|
|
12
12
|
6. 若添加过旧索引,改用 `https://ranranyya.github.io/dsh-taskbridge/index.json`。
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
# Worker session permissions (1.
|
|
2
|
-
|
|
3
|
-
This document
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
**Production status:** the per-call decision feature is exercised by this repository's
|
|
11
|
-
tests, not yet by a real production run. The production Desktop profile still runs
|
|
12
|
-
the previous plugin build, where this sixth tool is absent; exposing it needs a Desktop plugin upgrade and
|
|
13
|
-
an MCP reconnect or new session, and the end-to-end provider → commander → resume
|
|
14
|
-
acceptance run remains pending.
|
|
15
|
-
|
|
1
|
+
# Worker session permissions (1.5.0; historical 1.0.0–1.2.0 audits retained)
|
|
2
|
+
|
|
3
|
+
This document describes the worker sandbox, per-call approval and ordinary-question boundaries. The standing worker sandbox remains `workspace-write`; a question answer never grants access. A single approved operation does not authorize another call.
|
|
4
|
+
|
|
5
|
+
**1.5.0 acceptance status:** the verified test.2 candidate was installed through native DSH Desktop plugin management. Real provider runs exercised both rejection and a separately approved call, delivery of the rejection reason, native question forwarding, answer-and-wait, and decision-and-wait. An actual Desktop restart retained the source identity, Session and saved host acceptance. A subsequent real-model, twelve-round timing/read-only exercise lasted over twenty minutes with one MCP wait and no intermediate result reads. See [1.5.0 release notes](releases/1.5.0.zh.md).
|
|
6
|
+
|
|
7
|
+
Historical validation sections below describe their own older builds and do not override this current acceptance statement. These checks do not prove every host/platform combination or turn the same-user loopback switch into per-process authentication.
|
|
8
|
+
|
|
16
9
|
## The policy
|
|
17
10
|
|
|
18
11
|
Every delegated worker run drives a DSH session whose policy is fixed by this
|
|
@@ -87,12 +80,37 @@ An `allow-once` is accepted only when ALL of these hold at the moment of the dec
|
|
|
87
80
|
| the turn that asked for the call has not ended | `PERMISSION_REQUEST_CHANGED` |
|
|
88
81
|
| the request is still pending and inside its deadline | `PERMISSION_REQUEST_NOT_PENDING` / `PERMISSION_REQUEST_EXPIRED` |
|
|
89
82
|
|
|
90
|
-
A projection that was shortened by a bound (a
|
|
83
|
+
A projection that was shortened by a bound (a `bash.command` whose tail was cut, a
|
|
91
84
|
large `write` body) is reported as `permission.pending.completeness: "truncated"` and
|
|
92
85
|
**cannot be allowed** — an allow would grant a call whose executable material the
|
|
93
86
|
commander never saw. `reject` needs no fingerprint and no completeness, because refusing
|
|
94
87
|
is always safe.
|
|
95
88
|
|
|
89
|
+
### The evidence bounds are sized from real commands
|
|
90
|
+
|
|
91
|
+
| Bound | Value | What it holds |
|
|
92
|
+
| --- | --- | --- |
|
|
93
|
+
| one redacted argument scalar (`argumentValueChars`) | 8 192 | a complete PowerShell/`bash` command, including a long Windows path |
|
|
94
|
+
| the whole redacted argument object (`argumentsChars`) | 16 384 | that command plus its other fields (`sandbox_permissions`, `justification`, …) |
|
|
95
|
+
| `McpPermissionRequest.arguments` at the MCP layer | the engine's own `argumentsChars` | the published operation, never a smaller second cap |
|
|
96
|
+
|
|
97
|
+
They are finite, and the rule above is what makes them safe: a request past either cap is
|
|
98
|
+
still cut, still says so, and still cannot be allowed. The correction was to the **size**,
|
|
99
|
+
not to the gate. Two refusals motivated it:
|
|
100
|
+
|
|
101
|
+
- the per-scalar cap was 400 characters, so a real Windows path plus a write-back command
|
|
102
|
+
(~403 characters) was cut, marking the request `truncated` and unapprovable — a
|
|
103
|
+
reviewable request was turned into an un-reviewable one;
|
|
104
|
+
- the MCP text layer separately capped `permission.pending.arguments` at 4 000 characters,
|
|
105
|
+
*below* the engine's own cap, so an operation the engine published whole could be cut
|
|
106
|
+
again at the last layer before the host saw it and forced back to `argumentsComplete:
|
|
107
|
+
false`.
|
|
108
|
+
|
|
109
|
+
`tests/permission-evidence-bounds.test.js` pins both: a ~403, ~1000 and ~8000 character
|
|
110
|
+
command is published whole and decidable, a command past the cap is cut and refused for
|
|
111
|
+
`allow-once`, the fingerprint still covers the complete real arguments, and neither the
|
|
112
|
+
MCP projection nor the history projection re-cuts an operation the engine kept whole.
|
|
113
|
+
|
|
96
114
|
A decision is refused when the request is unknown, already settled, past its
|
|
97
115
|
deadline, or carries a fingerprint that does not match the pending operation; and
|
|
98
116
|
a task of another connection is answered as absent, so the reply cannot be used to
|
|
@@ -170,8 +188,127 @@ inheriting an older, possibly interactive policy. Nothing here touches the
|
|
|
170
188
|
operator's ordinary DSH sessions: the policy is installed only for a delegated
|
|
171
189
|
worker session.
|
|
172
190
|
|
|
173
|
-
##
|
|
191
|
+
## Ordinary questions: a separate channel that grants nothing
|
|
174
192
|
|
|
193
|
+
A delegated worker may also ask a HUMAN something with the native `ask_user_question`
|
|
194
|
+
tool — an ambiguity it must not resolve itself, a choice it must not invent. That is a
|
|
195
|
+
different situation from a permission request, and it gets a different channel.
|
|
196
|
+
|
|
197
|
+
**The seam.** `ask_user_question` dispatches the Agent-scoped Cordis waterfall
|
|
198
|
+
`'user-questions/request'` (`@deepseek-ai/dsh-user-questions`):
|
|
199
|
+
|
|
200
|
+
```js
|
|
201
|
+
ctx.on('user-questions/request', (request, next) => …, { prepend: true })
|
|
202
|
+
// request = { questions: [{ id, question, header?, detail?, options?, multiSelect?, intent? }],
|
|
203
|
+
// agent?, signal?, wait?: { callId, timed? } }
|
|
204
|
+
// → { answers: [{ id, selected: string[], custom?: string }] }
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Each run registers its own answerer on its own Agent's scoped context, with
|
|
208
|
+
`prepend: true` for the same reason the approval answerer needs it: the waterfall gives
|
|
209
|
+
the request to the FIRST answerer that returns a value, and this run exists so the
|
|
210
|
+
**commander** sees the question. Without it a UI answerer composed earlier would claim
|
|
211
|
+
the request and the commander would never learn the worker was asking — which is exactly
|
|
212
|
+
what happened in the acceptance run, where the task sat in `execute` for ten minutes
|
|
213
|
+
until the silence threshold.
|
|
214
|
+
|
|
215
|
+
**What the commander sees, and when.** A pending question makes an observation answer
|
|
216
|
+
`reason: 'question'` **immediately** — not after a silence threshold — carrying the whole
|
|
217
|
+
`question` block: `requestId`, `taskId`, `sessionId`, `callId` and `questions[]` with each
|
|
218
|
+
question's text, options and detail. The task stays `running` with phase
|
|
219
|
+
`awaiting-question`, keeps its lock, its concurrency slot and its provider lease, and the
|
|
220
|
+
wait is charged to the question's own deadline instead of the execution budget.
|
|
221
|
+
|
|
222
|
+
The timing matters and is enforced in the MONITOR, not only in the engine: an observation
|
|
223
|
+
that is already inside its bounded wait polls for a pending question on every slice, so a
|
|
224
|
+
question raised mid-wait returns at once instead of after the 25-second bound. A pending
|
|
225
|
+
permission request still outranks a question, because that is the one wait that can grant
|
|
226
|
+
something.
|
|
227
|
+
|
|
228
|
+
**Answering.** `delegate_question_answer({ taskId, requestId, answers })`, or
|
|
229
|
+
`POST /dsh-delegate/x/tasks/question` on the execution plane. Each asked question is
|
|
230
|
+
answered **exactly once**; every selected label must be one of that question's own
|
|
231
|
+
options; a single-select question takes exactly one label (a selection AND custom text
|
|
232
|
+
together is legal, matching the native tool); a question with no options needs `custom`
|
|
233
|
+
text. A refused batch leaves the question **pending**, so a correct answer can still be
|
|
234
|
+
made. An answer applies **once**: a repeat is `QUESTION_ALREADY_ANSWERED`, and an expired
|
|
235
|
+
or cancelled question cannot be answered.
|
|
236
|
+
|
|
237
|
+
**Published whole, or refused.** A question set is accepted only if its EXACT serialised
|
|
238
|
+
form — every question, header, detail, option label and description, with all JSON
|
|
239
|
+
escapes counted — fits `QUESTION_BOUNDS.wireChars` (12 000, deliberately below the
|
|
240
|
+
20 000-character tool-text bound so the block, the task summary and a receipt travel
|
|
241
|
+
together). A set that does not fit is refused with `QUESTION_PAYLOAD_TOO_LARGE` **before**
|
|
242
|
+
anything is published, so the commander is never shown a shortened menu it could answer
|
|
243
|
+
from. The id is used verbatim (no trimming, no generated substitute), a duplicate id or a
|
|
244
|
+
duplicate option label is refused, and the id is bounded.
|
|
245
|
+
|
|
246
|
+
**Bound to a real call, with a finite life.** The answer resumes the paused native call, so
|
|
247
|
+
the bridge binds that call: `request.wait.callId` is verified against the Session log (it
|
|
248
|
+
must be an `ask_user_question` call in the OPEN turn with no recorded result), and a
|
|
249
|
+
legacy request that names none is bound only when the open turn holds exactly one such
|
|
250
|
+
call — two candidates are an ambiguity, which is a refusal rather than a guess. The call is
|
|
251
|
+
re-checked BEFORE the answer is applied: once it has returned or its turn closed, the answer
|
|
252
|
+
is refused with `QUESTION_CALL_GONE` and the set is closed instead of left answerable.
|
|
253
|
+
|
|
254
|
+
A pending question has its own **finite** deadline — ten minutes by default, capped at
|
|
255
|
+
thirty — because it pauses the execution budget. An unanswered question therefore ends with
|
|
256
|
+
the native `ASK_TIMED_OUT`; cancellation, switch-off and disposal end it with `ASK_ABORTED`.
|
|
257
|
+
|
|
258
|
+
**It is not an approval, and it cannot become one.**
|
|
259
|
+
|
|
260
|
+
- A question whose `intent.kind` is `'approval'` is **refused** here with
|
|
261
|
+
`QUESTION_APPROVAL_INTENT`. A permission decision must go through
|
|
262
|
+
`delegate_permission_decide`, which binds one exact tool call and one fingerprint;
|
|
263
|
+
answering it on the question channel would grant access with none of that.
|
|
264
|
+
- A `'plan-review'` question is an information answer: the decision text goes back to the
|
|
265
|
+
worker, and any widening it then wants still needs its own approval.
|
|
266
|
+
- The published block states `grantsAccess: false`, so no reader has to infer it.
|
|
267
|
+
|
|
268
|
+
**Lifecycle.** Cancellation, switch-off, revocation, agent disposal, plugin teardown and
|
|
269
|
+
the question's own deadline all settle the outstanding wait with the native refusal
|
|
270
|
+
(`ASK_ABORTED` / `ASK_TIMED_OUT`) and release the record, so a paused worker is never left
|
|
271
|
+
waiting for a commander that can no longer answer. A restart begins with no bridge and no
|
|
272
|
+
question, so an interrupted question is history only and is never replayed as an answer.
|
|
273
|
+
A harness without the `userQuestions` seam simply gets no answerer: the native call then
|
|
274
|
+
fails at once with `NO_PROVIDER` instead of hanging.
|
|
275
|
+
|
|
276
|
+
## Rejection reasons reach the worker
|
|
277
|
+
|
|
278
|
+
The native approval protocol cannot carry prose: `ApprovalService.request()` resolves one
|
|
279
|
+
of four closed outcomes (`allowed-once`, `rejected`, `cancelled`, `unavailable`). So a
|
|
280
|
+
commander's reason used to be recorded in history and nowhere else — the worker saw a bare
|
|
281
|
+
`rejected` and could not know that shortening its command would let it ask again.
|
|
282
|
+
|
|
283
|
+
The reason is now sent into the **same Agent** through the channel that does carry prose
|
|
284
|
+
into its next model step: `agent.inject(createUserMessage(...))`, the call the native
|
|
285
|
+
approval service itself uses for its policy notices. The note states, in one message:
|
|
286
|
+
|
|
287
|
+
- **why** that one call was rejected, quoted from the decision (redacted and bounded);
|
|
288
|
+
- that the rejection **stands** and the call did not run;
|
|
289
|
+
- that nothing was widened — not the sandbox, the switch, the policy or the standing mode;
|
|
290
|
+
- that this is **not** a new authorization and grants nothing by itself;
|
|
291
|
+
- what to do: change the operation to fit the reason and request approval again.
|
|
292
|
+
|
|
293
|
+
Delivery is tracked per request id, so a repeated reject, a retried decision or a restart
|
|
294
|
+
cannot deliver the same note twice. The note names the task, the request and the call so
|
|
295
|
+
the worker can place exactly which operation was refused. The settled evidence records
|
|
296
|
+
`rejectionFeedback: { delivered, reason, requestId, callId, messageId, text }` —
|
|
297
|
+
`delivered: true` only after an actual injection on the bound Agent — and that record is
|
|
298
|
+
carried into durable history, so "the worker was told why" survives a restart and can be
|
|
299
|
+
checked instead of claimed. A failed injection is reported as **not delivered** and never
|
|
300
|
+
un-rejects the call or claims the worker was told.
|
|
301
|
+
|
|
302
|
+
The message is built by the REAL native `createUserMessage`, injected by the plugin's own
|
|
303
|
+
composition (`src/index.js`); the locally built default exists only for a harness-free
|
|
304
|
+
import and uses the same `user-approval` source the native approval service itself emits, so
|
|
305
|
+
it is a stand-in rather than a different protocol.
|
|
306
|
+
|
|
307
|
+
**Metrics.** `delegate_metrics` counts question waits under their own `question` reason and
|
|
308
|
+
question answers on their own `questionAnswers` axis. A question answer is **never** counted
|
|
309
|
+
as a permission decision or a refusal: it authorizes nothing.
|
|
310
|
+
|
|
311
|
+
## Reviews: the sandbox policy and the bridge do not apply
|
|
175
312
|
The optional read-only review agent uses its own composition (its own provider,
|
|
176
313
|
model and effort, read-only tools and its own workspace). It does **not** run through
|
|
177
314
|
the worker sandbox path, it gets **no permission bridge**, and this release does not
|
package/lib/client.js
CHANGED
|
@@ -402,6 +402,9 @@ window.__ModuleLoader__.load({
|
|
|
402
402
|
"before-create": "即将创建执行器",
|
|
403
403
|
execute: "执行中",
|
|
404
404
|
"awaiting-permission": "等待本次调用授权决定",
|
|
405
|
+
// A question is a DIFFERENT wait from an approval: answering it grants nothing, so the
|
|
406
|
+
// label must not read as an authorization either.
|
|
407
|
+
"awaiting-question": "等待回答问题",
|
|
405
408
|
review: "附加审查中",
|
|
406
409
|
"awaiting-host-review": "等待宿主审查",
|
|
407
410
|
failed: "已失败",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-taskbridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "让 Claude Code 或 Codex 指挥 DSH 完成任务;在 DSH 插件中配置 API、执行模型、思考强度、权限审批与集中审查。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=24"
|
|
17
|
-
"dsh": "0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.2-rc.1"
|
|
16
|
+
"node": ">=24"
|
|
18
17
|
},
|
|
19
18
|
"main": "src/index.js",
|
|
20
19
|
"types": "src/index.d.ts",
|
|
@@ -76,7 +75,10 @@
|
|
|
76
75
|
"docs/taskbridge-upgrade.md",
|
|
77
76
|
"docs/releases/1.4.0.zh.md",
|
|
78
77
|
"docs/releases/1.4.0-token-benchmark.zh.md",
|
|
79
|
-
"docs/releases/1.4.1.zh.md"
|
|
78
|
+
"docs/releases/1.4.1.zh.md",
|
|
79
|
+
"docs/releases/1.4.2.zh.md",
|
|
80
|
+
"docs/releases/1.5.0.zh.md",
|
|
81
|
+
"docs/releases/1.5.0-token-benchmark.zh.md"
|
|
80
82
|
],
|
|
81
83
|
"dsh": {
|
|
82
84
|
"manifestVersion": 1,
|
|
@@ -92,11 +94,11 @@
|
|
|
92
94
|
}
|
|
93
95
|
},
|
|
94
96
|
"peerDependencies": {
|
|
95
|
-
"@deepseek-ai/dsh-agent": "
|
|
96
|
-
"@deepseek-ai/dsh-llm": "
|
|
97
|
-
"@deepseek-ai/dsh-llm-pi-ai": "
|
|
98
|
-
"@deepseek-ai/dsh-tool-fs": "
|
|
99
|
-
"@deepseek-ai/dsh-tool-fs-search": "
|
|
97
|
+
"@deepseek-ai/dsh-agent": "*",
|
|
98
|
+
"@deepseek-ai/dsh-llm": "*",
|
|
99
|
+
"@deepseek-ai/dsh-llm-pi-ai": "*",
|
|
100
|
+
"@deepseek-ai/dsh-tool-fs": "*",
|
|
101
|
+
"@deepseek-ai/dsh-tool-fs-search": "*",
|
|
100
102
|
"@earendil-works/pi-ai": "^0.87.1 || ^1.1.0"
|
|
101
103
|
},
|
|
102
104
|
"dependencies": {
|
package/src/client/api.js
CHANGED
|
@@ -552,6 +552,9 @@ export const TASK_PHASE_LABELS = Object.freeze({
|
|
|
552
552
|
'before-create': '即将创建执行器',
|
|
553
553
|
execute: '执行中',
|
|
554
554
|
'awaiting-permission': '等待本次调用授权决定',
|
|
555
|
+
// A question is a DIFFERENT wait from an approval: answering it grants nothing, so the
|
|
556
|
+
// label must not read as an authorization either.
|
|
557
|
+
'awaiting-question': '等待回答问题',
|
|
555
558
|
review: '附加审查中',
|
|
556
559
|
'awaiting-host-review': '等待宿主审查',
|
|
557
560
|
failed: '已失败',
|
|
@@ -1130,6 +1133,29 @@ export function pendingPermission(task) {
|
|
|
1130
1133
|
return pending !== null && typeof pending === 'object' ? pending : null;
|
|
1131
1134
|
}
|
|
1132
1135
|
|
|
1136
|
+
/**
|
|
1137
|
+
* Whether the worker is waiting for an ORDINARY QUESTION answer.
|
|
1138
|
+
*
|
|
1139
|
+
* Kept separate from {@link isAwaitingPermission}: answering a question authorizes
|
|
1140
|
+
* nothing, so a UI must not present it as an approval card.
|
|
1141
|
+
* @param {object} task - task view.
|
|
1142
|
+
* @returns {boolean} true when a question is outstanding.
|
|
1143
|
+
*/
|
|
1144
|
+
export function isAwaitingQuestion(task) {
|
|
1145
|
+
if (task?.question?.waiting === true) return true;
|
|
1146
|
+
return task?.phase === 'awaiting-question';
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* The pending ordinary question set of one task, or `null`.
|
|
1151
|
+
* @param {object} task - task view.
|
|
1152
|
+
* @returns {object | null} the pending question.
|
|
1153
|
+
*/
|
|
1154
|
+
export function pendingQuestion(task) {
|
|
1155
|
+
const pending = task?.question?.pending ?? null;
|
|
1156
|
+
return pending !== null && typeof pending === 'object' ? pending : null;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1133
1159
|
/**
|
|
1134
1160
|
* One-line, plain-Chinese summary of what a task's permission state means.
|
|
1135
1161
|
*
|
package/src/codex/installer.js
CHANGED
|
@@ -347,6 +347,24 @@ export const KNOWN_AGENT_TEMPLATES = [
|
|
|
347
347
|
// still hashes to something unknown and is left alone.
|
|
348
348
|
{ version: '1.4.0', sha256: '2b2f6c35ffc9e99d98f38d00e07fef11de8bf96a9dd446e80889fcf92ba45cd8' },
|
|
349
349
|
{ version: '1.4.0', sha256: 'cfb21bc510b47be27c5e64bce86c48cbc9a49055777cd265e118ed942a94d9a5' },
|
|
350
|
+
// Exact published 1.4.1 companion, including its LF and CRLF forms.
|
|
351
|
+
{ version: '1.4.1', sha256: '8b6211918ce867ecfdac3495973813a70b7290bdd40221b439d98638f82ac3d4' },
|
|
352
|
+
{ version: '1.4.1', sha256: 'e2a8dc4cac897266e198b98be8fbf91d4159ab9a799704f200224457d292b5be' },
|
|
353
|
+
// Exact 1.4.2 bytes, taken from that RELEASE's own `codex/dsh-taskbridge.toml` in the
|
|
354
|
+
// repository's HEAD (the file as it was published, before later edits), in the LF form it
|
|
355
|
+
// was committed in (`38234033…`, 26388 bytes) and the CRLF form a Windows install rewrites
|
|
356
|
+
// it to (`b62426ab…`, 26740 bytes). Both were computed from the committed blob, never from
|
|
357
|
+
// the current working-tree template: deriving them from the NEW text would make every
|
|
358
|
+
// untouched 1.4.2 install hash to an unknown value, be reported `modified` and never be
|
|
359
|
+
// refreshed. An operator-edited file still hashes to something unknown and stays untouched.
|
|
360
|
+
{ version: '1.4.2', sha256: '38234033103190c0523fbf5223c848186fbd03d86b109e89940d1623e430bfb7' },
|
|
361
|
+
{ version: '1.4.2', sha256: 'b62426abad77e06b054941cc71fb3d821a9e0d695b1196f62e2170c47c6d17a7' },
|
|
362
|
+
// Exact local test.1 template, read from its installed package (LF and CRLF).
|
|
363
|
+
{ version: '1.4.3-test.1', sha256: 'a42fa6da6f028f7ea489ee4b97af7a734958d0cf5ee9affe4361fd534b233882' },
|
|
364
|
+
{ version: '1.4.3-test.1', sha256: 'd9fcf481dd7cd61a019dfd753f9dc29c6ad34e6a6aeb4e31e08de7117ff1deaf' },
|
|
365
|
+
// Exact installed test.2 package verified by the coordinator before 1.5.0.
|
|
366
|
+
{ version: '1.4.3-test.2', sha256: 'a761461a769b8f297be0e4b7bb68de591918d5afa74a8348e9d475c87011a967' },
|
|
367
|
+
{ version: '1.4.3-test.2', sha256: '75ee69400e040d8e18542121a0a49467539368cc0205cc120785b62b6692e16d' },
|
|
350
368
|
];
|
|
351
369
|
|
|
352
370
|
/** The `version = "…"` line of an agent file, at column 0. */
|