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
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
# Changelog
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.5.0 — 静默等待、提问与审批闭环(2026-11-15)
|
|
4
|
+
|
|
5
|
+
- 新增 `delegate_question_answer`,转交 DSH 原生普通问题;回答后可在同一次调用继续静默等待。问题有有效期,并绑定原 Agent、Session 和工具调用;回答不授予权限。
|
|
6
|
+
- 审批工具支持 `waitAfterDecision: true`。已确认生效后直接续等;决定答复未知不自动重送,已生效后的等待故障仍保留回执。省略新选项保留旧协议。
|
|
7
|
+
- 新增只读 `delegate_metrics`,统计程序调用、内部观察、等待原因、字节数与决定/回答事实。宿主模型 token 和费用仍标记未接入,账单对照单独核算。
|
|
8
|
+
- 修复正常 `dsh-delegate` / `dsh-taskbridge` 路径误脱敏;分离显示投影和可恢复身份,重启后核验真实路径/摘要并续接原对话。已丢失可信证据的旧记录不猜测恢复。
|
|
9
|
+
- 审批证据上限提高至单项8192字符、总计16384字符;超限仍明确阻止允许。拒绝理由送达同一个执行Agent,原操作继续拒绝,后续申请独立决定。
|
|
10
|
+
- 问题完整提供或明确不可答;需要脱敏改义的题目拒绝发布。裁剪优先保留待处理问题和已应用回执,避免重复作答或重复审批。
|
|
11
|
+
- MCP/插件版本从自身包清单读取;更新Codex托管规则和等待配置。识别已发布1.4.2及本地test.1/test.2原版模板,保留用户自定义规则。
|
|
12
|
+
- 候选真实验收:原生提问、拒绝反馈、972字符审批、90秒操作、集中审查、DSH实际重启续接、约21分23秒真实模型通道验收均通过。20分钟内无中间结果查询,外层客户端到期后续接同一调用。
|
|
13
|
+
- 1.5.0版本戳及测试版升级规则更新后,完整自动回归1468项通过,发布针对性检查160项通过。
|
|
14
|
+
- 等待阶段账单样本:token总量从9,986,839降至457,224,少95.42%;按任务时长折算少94.46%。这是不同任务的等待样本对照,旧任务含审批、新验收无审批,不代表整任务或所有用户的固定降幅;完整方法和同类动作对照见 `docs/releases/1.5.0-token-benchmark.zh.md`。
|
|
15
|
+
- 保留默认通用加载策略;不新增CLI执行通道或Claude Code一键安装。更新方法、验收范围与客户端限制见 `docs/releases/1.5.0.zh.md`。
|
|
16
|
+
|
|
17
|
+
## 1.4.2 — 移除 DSH 版本白名单,默认通用加载(2026-11-14)
|
|
18
|
+
|
|
19
|
+
- 删除 `engines.dsh`,将宿主提供的 `@deepseek-ai/dsh-*` peer 范围改为 `*`,不再因 DSH 版本号不在枚举列表中而拒绝安装或加载;包含截图所示的 `0.2.2-rc.3` 场景。
|
|
20
|
+
- 自定义插件索引不再生成 `engines` 字段,避免发现与安装通道继续使用旧白名单。Node 要求、开发依赖固定版本和现有运行时能力检查保持原有作用。
|
|
21
|
+
- 同步当前版本、安装说明和运行时说明,识别已发布 1.4.1 Codex 模板以支持升级,保留用户修改的规则。
|
|
22
|
+
- 本版仅调整版本准入与分发元数据,延续 1.4.1 的审查修复;不包含后续静默等待优化,也不声称所有宿主版本均已端到端实测。
|
|
2
23
|
|
|
3
24
|
## 1.4.1 — 历史补审、可靠保存与长审查意见(2026-11-14)
|
|
4
25
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DSH TaskBridge
|
|
2
2
|
|
|
3
|
-
**1.
|
|
3
|
+
**1.5.0** 完善静默等待闭环:审批或回答后直接续等、原生提问转交、拒绝理由送达、调用计量和重启续接。详见 [1.5.0 更新说明](docs/releases/1.5.0.zh.md)及[真实账单样本对照](docs/releases/1.5.0-token-benchmark.zh.md)。
|
|
4
4
|
|
|
5
5
|
**让 Claude Code 或 Codex 指挥 DSH 完成任务,在 DSH 插件中配置 API、执行模型和思考强度。**
|
|
6
6
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
- [从 DSH Delegate/TaskDispatch 迁移到 TaskBridge](docs/taskbridge-upgrade.md):包名为 `dsh-taskbridge`,保留旧数据和 MCP 技术标识,不要同时启用新旧插件。
|
|
11
11
|
- [在 DSH“发现”中搜索和安装](docs/plugin-market.md):添加本项目的自定义索引,安装源固定到本项目的 Git 提交。
|
|
12
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)给出等待阶段样本的实测结果和适用边界。
|
|
13
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)保留。
|
|
14
15
|
|
|
15
16
|
DeepSeek Harness(DSH)的委托插件:让 MCP 宿主在你开启本机总开关后,调用 DSH
|
|
@@ -18,7 +19,7 @@ DeepSeek Harness(DSH)的委托插件:让 MCP 宿主在你开启本机总
|
|
|
18
19
|
新安装时本机调用总开关默认关闭。开关状态会保存在插件设置中,重启后恢复保存值;
|
|
19
20
|
关闭时拒绝新的委派任务,并请求停止正在运行的任务。
|
|
20
21
|
|
|
21
|
-
>
|
|
22
|
+
> **当前源码版本:`1.5.0`(静默等待、提问与审批闭环;正式发布以 npm/GitHub 状态为准)。** 源码仓库和可下载的 Release
|
|
22
23
|
> 位于 [GitHub](https://github.com/ranranyya/dsh-taskbridge)。npm 安装标识为 **`dsh-taskbridge`**,
|
|
23
24
|
> GitHub Release 同时提供 `.tgz`。`1.1.0` 的静默等待说明见
|
|
24
25
|
> [`docs/silent-wait.md`](./docs/silent-wait.md);`1.2.0` 修正了其中三处真实问题(等待中断的
|
|
@@ -30,7 +31,7 @@ DeepSeek Harness(DSH)的委托插件:让 MCP 宿主在你开启本机总
|
|
|
30
31
|
|
|
31
32
|
| 项 | 要求 | 说明 |
|
|
32
33
|
| --- | --- | --- |
|
|
33
|
-
| DSH |
|
|
34
|
+
| DSH | 默认通用,不按版本号筛选 | 不声明 `engines.dsh`;宿主提供的 DSH 依赖使用 `*`。所需模型路由、审批等接口仍按实际能力检查;说明见 [`docs/runtime-compatibility.md`](./docs/runtime-compatibility.md)。 |
|
|
34
35
|
| Node.js | `>= 24` | 与 DSH `0.2.0-rc.2` / `0.2.1-rc.2` 运行时一致;使用了原生 ESM、`AbortSignal.timeout`、`node --test`。 |
|
|
35
36
|
| 操作系统 | Windows / Linux / macOS | 自动测试在 Windows + Node 24 上运行;需要 git 的工作树隔离在缺少 git 时会被显式拒绝,而不是静默降级。 |
|
|
36
37
|
|
|
@@ -49,13 +50,13 @@ profile 是**应用保留的**:npm / `dsh plugin` CLI 对该 profile 的操作
|
|
|
49
50
|
Desktop 侧的包操作只能交给应用完成——不要在 Desktop 的正式 profile 里执行 npm/pnpm
|
|
50
51
|
命令,也不要直接编辑其中的文件。
|
|
51
52
|
|
|
52
|
-
1. 打开 Desktop 的 **Plugins manager → 添加插件**,输入 **`dsh-taskbridge@1.
|
|
53
|
+
1. 打开 Desktop 的 **Plugins manager → 添加插件**,输入 **`dsh-taskbridge@1.5.0`**。
|
|
53
54
|
若中国大陆镜像尚未同步,先选择 npm 官方源再重试。安装后的显示名为 **DSH TaskBridge**。
|
|
54
55
|
也可以从本项目 Release 下载 `.tgz`,或在仓库根目录打包:
|
|
55
56
|
|
|
56
57
|
```bash
|
|
57
58
|
npm pack
|
|
58
|
-
# → dsh-taskbridge-1.
|
|
59
|
+
# → dsh-taskbridge-1.5.0.tgz
|
|
59
60
|
```
|
|
60
61
|
|
|
61
62
|
2. 使用本地包时,通过 **添加插件**入口选择下载或生成的 `.tgz`(或本仓库目录)完成安装。
|
|
@@ -69,7 +70,7 @@ Desktop 侧的包操作只能交给应用完成——不要在 Desktop 的正式
|
|
|
69
70
|
|
|
70
71
|
```bash
|
|
71
72
|
# 装进一个 profile(例:web)
|
|
72
|
-
dsh plugin --profile web add ./dsh-taskbridge-1.
|
|
73
|
+
dsh plugin --profile web add ./dsh-taskbridge-1.5.0.tgz && dsh plugin --profile web why dsh-taskbridge
|
|
73
74
|
|
|
74
75
|
# 启动(首次启动会自动把插件 bundle 追加到 dsh.profile.bundles)
|
|
75
76
|
dsh --profile web
|
|
@@ -82,7 +83,7 @@ dsh --profile web
|
|
|
82
83
|
### 说明与注意
|
|
83
84
|
|
|
84
85
|
- **不要装进你正在用的正式 profile 做试验。** 建议先用一次性 profile:
|
|
85
|
-
`dsh plugin --profile dsh-delegate-try add ./dsh-taskbridge-1.
|
|
86
|
+
`dsh plugin --profile dsh-delegate-try add ./dsh-taskbridge-1.5.0.tgz`,再把
|
|
86
87
|
`DSH_HOME` 指向临时目录做隔离验证。该命令同样只用于 CLI profile。
|
|
87
88
|
- 该包声明了 `@deepseek-ai/dsh-*` 的 peer,若你的包管理器默认自动安装 peer,
|
|
88
89
|
安装过程会尝试解析这些版本。可显式关闭:`npm_config_auto_install_peers=false`
|
|
@@ -517,7 +518,7 @@ Codex 子智能体现在按「提交 → `delegate_wait` 同一任务」运作
|
|
|
517
518
|
# 不要在 Desktop 的正式 profile 下执行下面的 CLI 命令。
|
|
518
519
|
|
|
519
520
|
# CLI web profile 的升级:换成本地新包或(将来)新版本
|
|
520
|
-
dsh plugin --profile web add ./dsh-taskbridge-1.
|
|
521
|
+
dsh plugin --profile web add ./dsh-taskbridge-1.5.0.tgz
|
|
521
522
|
|
|
522
523
|
# 导出:界面里"导出非敏感配置"按钮,或用只读 API
|
|
523
524
|
# GET /api/dsh-delegate/settings
|
|
@@ -542,17 +543,7 @@ dsh plugin --profile web remove dsh-taskbridge
|
|
|
542
543
|
|
|
543
544
|
- **发布渠道**:1.3.1 已通过 npm、GitHub Release 和本项目自定义插件索引分发。索引不是官方默认
|
|
544
545
|
市场收录;更新能力取决于 DSH 客户端,插件没有独立的自动更新程序,也未提供作者签名或构建来源证明。
|
|
545
|
-
-
|
|
546
|
-
`0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.2-rc.1`),其余版本会被 peer 门禁拒绝。其中
|
|
547
|
-
`0.2.0-rc.2` 是开发与自动测试版本,`0.2.1-rc.2` 的验收在**隔离 profile** 中完成,
|
|
548
|
-
`0.2.1-rc.3` 为上一宿主版本(本次未在它上面重新做原生全量验证),`0.2.2-rc.1` 是本次新增支持的原生
|
|
549
|
-
运行时——原生源码已审计,原生 base+web+delegate 全量 profile 加载、stdio MCP、runner 模型路由
|
|
550
|
-
回读与沙箱策略回读均已在隔离夹具中通过,但**没有真实模型调用**、**没有实际沙箱命令**,
|
|
551
|
-
也**没有**在生产 Desktop profile 上做端到端安装运行。逐版本状态见
|
|
552
|
-
[`docs/runtime-compatibility.md`](./docs/runtime-compatibility.md)。
|
|
553
|
-
- **更早的插件版本会被新宿主的门禁跳过**:`0.2.2-rc.1` 宿主不会加载未声明该版本的旧插件
|
|
554
|
-
(即上一版与更早的构建),而是报 `skippedBundles` / denied row。想在新宿主上使用本插件的
|
|
555
|
-
行为,需要升级插件,而不是放宽门禁。
|
|
546
|
+
- **按实际接口工作**:1.4.2 起不按 DSH 版本号筛选。若宿主缺少所需模型路由、审批等接口,相关操作仍会报告具体能力不足;默认通用不表示所有宿主版本都已做过端到端实测。旧插件包仍保留它们自己的声明,遇到旧版兼容性提示应先升级插件。
|
|
556
547
|
- **本机开关不是进程身份认证**:开关开启时,能连接本机 DSH 端口的同机进程可以提交任务。
|
|
557
548
|
不要在不可信的本机环境中开启;它不能防御同账号的恶意进程。
|
|
558
549
|
- **逐次授权桥同样不是进程级边界**:开关模式刻意只用一个 `local-mcp` 连接身份,所以
|
|
@@ -44,12 +44,29 @@ export declare function readConfig(env: Record<string, string | undefined>): Mcp
|
|
|
44
44
|
* - `observe` → `POST /dsh-delegate/x/tasks/observe` (bounded long-poll read)
|
|
45
45
|
* - `cancel` → `POST /dsh-delegate/x/tasks/cancel`
|
|
46
46
|
* - `permission`→ `POST /dsh-delegate/x/tasks/permission`
|
|
47
|
+
* - `question` → `POST /dsh-delegate/x/tasks/question`
|
|
48
|
+
* - `review` → `POST /dsh-delegate/x/tasks/review`
|
|
47
49
|
* - `preflight` → `POST /dsh-delegate/x/workspace/preflight`
|
|
48
50
|
*
|
|
49
|
-
* `observe` backs `delegate_wait`; `
|
|
50
|
-
*
|
|
51
|
+
* `observe` backs `delegate_wait`; `review` records the commander's delivery conclusion
|
|
52
|
+
* (the only writer of `hostAcceptance`); `preflight` is the read-only workspace
|
|
53
|
+
* inspection behind `delegate_preflight`, and it creates nothing. `question` answers an
|
|
54
|
+
* ordinary question a worker asked — it settles one paused call and grants nothing, which
|
|
55
|
+
* is why it is NOT a second permission route.
|
|
56
|
+
*
|
|
57
|
+
* There is deliberately NO route for `delegate_metrics`: that tool reports this process's
|
|
58
|
+
* own census and never reaches the plane.
|
|
51
59
|
*/
|
|
52
|
-
export type ExecutionRoute =
|
|
60
|
+
export type ExecutionRoute =
|
|
61
|
+
| 'submit'
|
|
62
|
+
| 'status'
|
|
63
|
+
| 'result'
|
|
64
|
+
| 'observe'
|
|
65
|
+
| 'cancel'
|
|
66
|
+
| 'permission'
|
|
67
|
+
| 'question'
|
|
68
|
+
| 'review'
|
|
69
|
+
| 'preflight';
|
|
53
70
|
|
|
54
71
|
/**
|
|
55
72
|
* Per-call context passed beside the route and payload.
|
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 ordinary-question answer. Spelled out like every other route: the plane registers
|
|
74
|
+
// exactly `/tasks/question`, and a name-to-path guess would 404 on the one call that
|
|
75
|
+
// resumes a worker paused on a human question.
|
|
76
|
+
question: Object.freeze({ method: 'POST', path: '/tasks/question' }),
|
|
73
77
|
// The commander's delivery review. Spelled out like every other route: the plane
|
|
74
78
|
// registers exactly `/tasks/review`, so a missing entry here refused the one call that
|
|
75
79
|
// records `hostAcceptance` with `MCP_ROUTE_UNMAPPED` before any request was sent.
|
|
@@ -262,6 +266,17 @@ async function main() {
|
|
|
262
266
|
callExecution: createExecutionClient(config),
|
|
263
267
|
logger: { warn: (...args) => process.stderr.write(`dsh-delegate-mcp: ${args.join(' ')}\n`) },
|
|
264
268
|
});
|
|
269
|
+
// One bounded diagnostics line on the way out, on STDERR (stdout is the protocol
|
|
270
|
+
// stream). It carries counts, durations and byte totals only — no task content, no
|
|
271
|
+
// tool arguments — and it states explicitly that the host model's own activity is not
|
|
272
|
+
// observed here, so nobody can read it as a wake-up or token count.
|
|
273
|
+
process.once('exit', () => {
|
|
274
|
+
try {
|
|
275
|
+
process.stderr.write(`${server.diagnosticsLine()}\n`);
|
|
276
|
+
} catch {
|
|
277
|
+
// An exit-time diagnostic must never change the exit status.
|
|
278
|
+
}
|
|
279
|
+
});
|
|
265
280
|
await serveStdio({
|
|
266
281
|
input: process.stdin,
|
|
267
282
|
output: process.stdout,
|
|
@@ -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.5.0"
|
|
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."
|
|
@@ -120,6 +120,20 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
120
120
|
raising it — when a wait ends you simply call it again on the same taskId.
|
|
121
121
|
A shorter explicit `waitSeconds` is legal but is only for a one-off diagnostic the
|
|
122
122
|
operator explicitly asked for; it is never the normal loop.
|
|
123
|
+
5a0. FOUR DIFFERENT THINGS, never conflated.
|
|
124
|
+
- `wait-limit` — THIS call's own wait budget ran out and nothing changed. Wait again
|
|
125
|
+
on the same taskId. Not a result, not a stall, not a task event.
|
|
126
|
+
- An OUTER limit — your client handed the call back on its own tool/exec time limit.
|
|
127
|
+
The MCP observation did not end and the worker did not stop. Continue the SAME exec
|
|
128
|
+
cell and ask for the largest yield it supports (see 5d).
|
|
129
|
+
- `attention` — genuine inactivity: no real progress for the configured threshold
|
|
130
|
+
(ten minutes by default) while the task still runs. A question, not a verdict.
|
|
131
|
+
- The task's TOTAL execution timeout — the worker's own budget, which ends the run and
|
|
132
|
+
is reported as a terminal state. It is not `wait-limit`, not `attention` and not a
|
|
133
|
+
client-side event.
|
|
134
|
+
A real hard failure is worth ONE de-duplicated reminder to the host. An ordinary
|
|
135
|
+
single failing test inside the worker is the WORKER's job to diagnose and fix: it is
|
|
136
|
+
not a host event, and you must not resubmit, cancel or take over for it.
|
|
123
137
|
5a. WHAT THE WAIT REASONS MEAN, and what you do next.
|
|
124
138
|
- `heartbeat`: nothing to report. The wait expired with no news. You will normally
|
|
125
139
|
never see this, because the tool re-issues internally. If you do see it, call
|
|
@@ -163,12 +177,66 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
163
177
|
operation, the request still reported as pending, and you quote that request's
|
|
164
178
|
exact `fingerprint`. Call `delegate_permission_decide` with the `taskId`, the
|
|
165
179
|
`requestId`, a `decision` of `allow-once` or `reject`, that `fingerprint`, and a
|
|
166
|
-
short bounded `reason`.
|
|
180
|
+
short bounded `reason`. When your MCP channel supports it, ALSO pass
|
|
181
|
+
`waitAfterDecision: true`: the decision and the following wait then happen in ONE
|
|
182
|
+
call, so a following request does not cost a second tool call. The answer is the
|
|
183
|
+
same compact `delegate_wait` shape plus `decisionReceipt`; a NEW request comes
|
|
184
|
+
back in it, and the request you just decided is never re-asked. Read
|
|
185
|
+
`decisionReceipt` first. `applied: true` is claimed ONLY when the harness confirmed
|
|
186
|
+
the SAME task, the SAME request and the SAME operation: the decision is in force,
|
|
187
|
+
so keep it — even when this answer instead carries `reason: null` and a
|
|
188
|
+
`waitError` block, which means the DECISION SUCCEEDED and only the FOLLOWING WAIT
|
|
189
|
+
failed, was cancelled or was interrupted. In that case never send the decision
|
|
190
|
+
again, never cancel or reassign the task, and resume following the same taskId with
|
|
191
|
+
`delegate_wait`. `applied: null` with `confirmation: "unknown"` means nothing was
|
|
192
|
+
established — the call failed before the harness answered, or the answer
|
|
193
|
+
contradicted or lacked the evidence to confirm it (the refusal names which, under
|
|
194
|
+
`error.details.decisionReceipt`): read the task with `delegate_result` before
|
|
195
|
+
sending anything again, and never resend automatically. If your client does not
|
|
196
|
+
offer the flag, decide first and then call `delegate_wait` on the SAME task — the
|
|
197
|
+
decision alone does not resume your observation.
|
|
167
198
|
- An invalid or stale decision grants nothing. If an allow is refused as stale or
|
|
168
199
|
changed, re-read the CURRENT pending request and decide again safely. Never
|
|
169
200
|
retry under broader settings, never widen the sandbox, and never silently
|
|
170
201
|
enable anything to get past a refusal. An approval covers exactly one tool
|
|
171
202
|
call; it is never host acceptance and never a standing sandbox grant.
|
|
203
|
+
- A `reject` reaches the WORKER with your reason. It is sent back into the same
|
|
204
|
+
agent as a note, so the worker can read WHY and adjust. Write the reason as a
|
|
205
|
+
statement of what to change ("the command was too long for the evidence bound,
|
|
206
|
+
shorten it and ask again", "that path is outside the authorised workspace, use
|
|
207
|
+
the source checkout"), never as a hidden instruction. The note is not a grant:
|
|
208
|
+
the call stays rejected, and a new attempt is decided on its own.
|
|
209
|
+
- `question`: the worker asked YOU a question and is paused until you answer.
|
|
210
|
+
This is NOT a permission request and grants nothing. `question.questions[]` gives
|
|
211
|
+
each question's `id`, `question`, optional `header`/`detail`, its `options`
|
|
212
|
+
(each with a `label`) and whether it is `multiSelect`; `question.grantsAccess` is
|
|
213
|
+
always false. Answer with `delegate_question_answer({ taskId, requestId, answers })`,
|
|
214
|
+
where `answers` has one entry per question naming that question's `id` exactly
|
|
215
|
+
once, with `selected` (labels the question actually offered) and/or non-empty
|
|
216
|
+
`custom` text; a question with no options needs `custom`. Every asked question
|
|
217
|
+
must be answered, a single-select question takes at most one offered label, and an unknown
|
|
218
|
+
id or an unoffered label is refused while the question stays pending. When your
|
|
219
|
+
channel supports it, pass `waitAfterAnswer: true` to answer and keep following the
|
|
220
|
+
SAME task in one call: the answer is the compact wait shape plus `answerReceipt`.
|
|
221
|
+
If the answer IS applied but the following wait fails, the call still succeeds with
|
|
222
|
+
`answerReceipt.applied: true`, `reason: null` and a `waitError` — the answer stands
|
|
223
|
+
and must not be resent. A question whose `intent` is `approval` is REFUSED on this
|
|
224
|
+
channel by design: a permission decision must go through
|
|
225
|
+
`delegate_permission_decide`, so tell the worker through its next step or reject
|
|
226
|
+
the tool call; never treat a question answer as a way to grant access. Answering a
|
|
227
|
+
`plan-review` question is information only and grants nothing either.
|
|
228
|
+
- A question is published WHOLE or refused. If `delegate_wait` reports
|
|
229
|
+
`questionAnswerable: false`, `questionsOmitted: true`, `QUESTION_PAYLOAD_REDACTED`,
|
|
230
|
+
or `QUESTION_PAYLOAD_TOO_LARGE` (or a task view has no `question` block while the phase
|
|
231
|
+
is `awaiting-question`), the worker's question set was too large to carry intact and
|
|
232
|
+
was refused BEFORE it reached you: you never saw a shortened version of it, and you
|
|
233
|
+
must not answer it. Applied receipts still stand; do not resend them. Tell the worker
|
|
234
|
+
in its next step to ask a smaller question (fewer questions, or
|
|
235
|
+
shorter detail), or reject that tool call. Never invent questions or ids to work
|
|
236
|
+
around it.
|
|
237
|
+
- A question also has a FINITE life (ten minutes by default). If it expires the worker
|
|
238
|
+
gets `ASK_TIMED_OUT` and continues on its own; that is not a failure you must
|
|
239
|
+
unblock, and an expired `requestId` can never be answered afterwards.
|
|
172
240
|
- `ready`: execution finished and the task now waits for HOST REVIEW. That is not
|
|
173
241
|
acceptance: the plugin never approves its own work. Call `delegate_result` ONCE
|
|
174
242
|
for the same task to read the full evidence (diff, validation output, review
|
|
@@ -287,9 +355,10 @@ DISPATCH (only for an explicitly assigned implementation task)
|
|
|
287
355
|
available yield is genuinely short and there is no automatic continuation, a long
|
|
288
356
|
wait costs one resumed turn per yield window. In that case say so plainly to the
|
|
289
357
|
operator once. Never invent an automatic wake-up, never claim the plugin will notify
|
|
290
|
-
you in the background,
|
|
291
|
-
provides
|
|
292
|
-
|
|
358
|
+
you in the background, never report a "background wait" that no interface
|
|
359
|
+
provides, and never promise the plugin will wake you or achieve zero wake-ups
|
|
360
|
+
across clients — no such interface exists. Changing the operator's Codex
|
|
361
|
+
configuration to work around it is also outside your authority.
|
|
293
362
|
- Asking for a long yield is a request, not a guarantee; the host may still return
|
|
294
363
|
early — including for a permission request that arrives during the wait. When it
|
|
295
364
|
does, resume the same cell as above; the plugin side did not fail.
|
package/docs/INTRODUCTION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DSH TaskBridge
|
|
2
2
|
|
|
3
|
-
Version 1.
|
|
3
|
+
Version 1.5.0 adds native question forwarding, answer-and-wait and decision-and-wait calls, rejection feedback, program metrics and restart-safe continuation identity. The installation identifier is `dsh-taskbridge@1.5.0`; check npm/GitHub for publication status. See the [release notes](releases/1.5.0.zh.md) and [billing comparison with its limits](releases/1.5.0-token-benchmark.zh.md).
|
|
4
4
|
|
|
5
5
|
Let Claude Code or Codex direct DSH tasks. Choose the execution API, model and supported reasoning effort in the DSH plugin settings.
|
|
6
6
|
|
|
@@ -16,4 +16,4 @@ Codex has a managed agent/MCP installation button. Version 1.3.2 names the compa
|
|
|
16
16
|
|
|
17
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
18
|
|
|
19
|
-
In DSH's Add plugin dialog, use `dsh-taskbridge@1.
|
|
19
|
+
In DSH's Add plugin dialog, use `dsh-taskbridge@1.5.0`; 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,6 +1,6 @@
|
|
|
1
1
|
# DSH TaskBridge
|
|
2
2
|
|
|
3
|
-
1.
|
|
3
|
+
1.5.0 新增原生提问转交、审批与回答后直接续等、拒绝理由反馈和程序调用计量,并修复重启续接身份。安装标识为 `dsh-taskbridge@1.5.0`;实际是否已发布以 npm/GitHub 为准。详见 [1.5.0 更新说明](releases/1.5.0.zh.md)和[等待阶段真实账单对照](releases/1.5.0-token-benchmark.zh.md)。
|
|
4
4
|
|
|
5
5
|
**让 Claude Code 或 Codex 指挥 DSH 完成任务,在 DSH 插件里配置执行所用的 API、模型和思考强度。**
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
## 安装、升级和边界
|
|
33
33
|
|
|
34
|
-
项目原名 DSH Delegate,1.3.0 曾使用 DSH TaskDispatch。1.3.1 起统一为 **DSH TaskBridge**,包名为 `dsh-taskbridge`。从旧包升级请先阅读 [更名升级说明](taskbridge-upgrade.md)。在 DSH“添加插件”中输入 `dsh-taskbridge@1.
|
|
34
|
+
项目原名 DSH Delegate,1.3.0 曾使用 DSH TaskDispatch。1.3.1 起统一为 **DSH TaskBridge**,包名为 `dsh-taskbridge`。从旧包升级请先阅读 [更名升级说明](taskbridge-upgrade.md)。在 DSH“添加插件”中输入 `dsh-taskbridge@1.5.0`;中国大陆镜像若尚未同步,改选 npm 官方源。GitHub Release 同时提供安装包。
|
|
35
35
|
|
|
36
36
|
[插件索引与更新说明](plugin-market.md)介绍如何添加索引,在 DSH 的“发现”中搜索本插件。发布自定义索引不代表已进入官方内置市场;DSH 当前需要用户自行添加可信索引。
|
|
37
37
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# Codex integration contract
|
|
2
2
|
|
|
3
|
-
Status: implemented in 1.
|
|
3
|
+
Status: implemented in 1.5.0 (1.1.0 introduced wait rules, 1.2.0 added installed-integration upgrades, 1.4.0 clarifies outer long waits and explicit host-review recording). This automatic installer covers Codex. Claude Code uses the separate manual MCP guide.
|
|
4
4
|
|
|
5
|
-
1.4.1
|
|
5
|
+
1.5.0 adds `delegate_question_answer`, combined decision/answer-and-wait flows and program metrics. Managed upgrades recognize the exact published 1.4.2 and verified local test.1/test.2 companions; customized files remain operator-owned. See the [1.5.0 release notes](releases/1.5.0.zh.md).
|
|
6
|
+
|
|
7
|
+
1.4.2 also recognizes the exact published 1.4.1 companion for managed upgrades.
|
|
8
|
+
The review behavior introduced in 1.4.1 recognizes the exact unmodified
|
|
6
9
|
1.4.0 companion in LF and CRLF forms, and updates the review contract: a completed
|
|
7
10
|
task may be read and reviewed by its original identity after a restart. History
|
|
8
11
|
does not restore execution or old permissions. Reviews are confirmed only when
|
|
@@ -527,7 +530,7 @@ successful diagnosis.
|
|
|
527
530
|
```jsonc
|
|
528
531
|
{
|
|
529
532
|
"codexHome": "…",
|
|
530
|
-
"packageVersion": "1.
|
|
533
|
+
"packageVersion": "1.5.0",
|
|
531
534
|
"boundary": { "blocked": false, "link": null, "unknown": false, "home": "directory", "agents": "directory" },
|
|
532
535
|
"agent": {
|
|
533
536
|
"path": "…", "state": "installed", "installed": true, "managed": true,
|
|
@@ -200,13 +200,50 @@ cancelled run that never drove a conversation, and a record naming another
|
|
|
200
200
|
repository are all refusals. None of them falls back to "the map says the thread
|
|
201
201
|
is there, so it must be yours".
|
|
202
202
|
|
|
203
|
-
**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
203
|
+
**Path identity: the operator's spelling plus a canonical digest.** Each stored row
|
|
204
|
+
carries its paths in the operator's real spelling — that value can be handed back to the
|
|
205
|
+
runtime as a directory to open, so it is never a comparison key — and, beside each, a
|
|
206
|
+
`sha256:` digest of the canonical key. Two facts, and every fact a record states must
|
|
207
|
+
agree before it proves anything:
|
|
208
|
+
|
|
209
|
+
- two readable canonical paths are compared exactly. The canonical rule is the session
|
|
210
|
+
layer's own (`sessionPathKey`): trailing separators stripped, case folded on Windows
|
|
211
|
+
at every level, case kept on POSIX. Slash direction is *not* unified, exactly as that
|
|
212
|
+
layer does not unify it, so this module never calls two directories equal that the
|
|
213
|
+
harness treats as different;
|
|
214
|
+
- when redaction shortened one of them, its **digest** is compared instead — a digest is
|
|
215
|
+
opaque to redaction, so it survives the same projection the path did not;
|
|
216
|
+
- a record that states both a path and a digest must have them name the SAME directory.
|
|
217
|
+
A digest that contradicts the readable path beside it is refused **as a whole**:
|
|
218
|
+
neither half is believed. (An earlier version let the readable path win that case,
|
|
219
|
+
which admitted a row whose own two proofs disagreed.)
|
|
220
|
+
- a side with no readable path and no digest proves nothing and is refused.
|
|
221
|
+
|
|
222
|
+
**A digest is a proof, not a reverser.** It can confirm that a recorded directory is
|
|
223
|
+
this directory; it can never reconstruct the original spelling. So when the identity
|
|
224
|
+
store itself is masked there is no trustworthy original to open, and the follow-up is
|
|
225
|
+
refused — the mask is never substituted as a directory. A legacy row written before
|
|
226
|
+
digests existed still continues when its path is readable, and is refused when it is not.
|
|
227
|
+
|
|
228
|
+
`src/jobs/continuation-identity.js` is the single definition; the live re-check in
|
|
229
|
+
`assertAdmissible` and the session layer's `recordedSessionPathIs` both delegate to it,
|
|
230
|
+
so no second comparison rule exists.
|
|
231
|
+
|
|
232
|
+
**Masked paths are a refusal, never a wildcard — and masking is narrow.** The durable
|
|
233
|
+
documents are projected through redaction, which rewrites a per-user profile directory
|
|
234
|
+
under a *temporary root* (`…/Temp/dsh-VG1MVl/…`, `~/.cache/dsh-SoexNz/…`) to
|
|
235
|
+
`masks-user-profile-segment`. That placeholder is never a pattern, never equals
|
|
236
|
+
anything, and a path carrying it **without a digest** is refused exactly like a missing
|
|
237
|
+
one.
|
|
238
|
+
|
|
239
|
+
Redaction keys on the location, not on the shape of a name, because a shape-based rule
|
|
240
|
+
was the defect: an earlier pattern masked every segment starting `dsh-`/`profile-` plus
|
|
241
|
+
six alphanumerics, which is also the shape of an ordinary repository — this product's
|
|
242
|
+
own checkout `dsh-delegate` and its installed package `dsh-taskbridge` were both
|
|
243
|
+
rewritten, so a cancelled task could not be continued after a restart. A name outside a
|
|
244
|
+
temporary root (`dsh-delegate`, `dsh-taskbridge`, `dsh-development`, `profile-settings`,
|
|
245
|
+
`dsh-abc123`, `v2-tools`) now keeps its path; a real per-profile temporary directory is
|
|
246
|
+
still masked. See `docs/redaction-contract.md`.
|
|
210
247
|
|
|
211
248
|
**Equal Workspace ids are not proof of equal placement.** A recorded conversation
|
|
212
249
|
must name a real Workspace *and* a directory this run resolved, and a live parent
|
package/docs/plugin-market.md
CHANGED
|
@@ -15,13 +15,13 @@ https://ranranyya.github.io/dsh-taskbridge/index.json
|
|
|
15
15
|
3. 搜索 **DSH TaskBridge** 或 **dsh-taskbridge**。
|
|
16
16
|
4. 安装确认框应显示本项目 GitHub 仓库和精确提交。核对后安装,不要改填别人的 `dsh-delegate` 或 `dsh-dispatch` npm 包。
|
|
17
17
|
|
|
18
|
-
当前索引采用固定 Git 提交作为安装来源,不依赖本机 npm 登录。另一种安装方式是直接在“添加插件”中输入 `dsh-taskbridge@1.
|
|
18
|
+
当前索引采用固定 Git 提交作为安装来源,不依赖本机 npm 登录。另一种安装方式是直接在“添加插件”中输入 `dsh-taskbridge@1.5.0`,无需添加索引;若中国大陆镜像未同步,改选 npm 官方源。GitHub Release 同时提供 `.tgz` 和 SHA256 文件。
|
|
19
19
|
|
|
20
20
|
## 新版本
|
|
21
21
|
|
|
22
22
|
正式 Release 发布后,GitHub Pages 工作流会重新生成索引。支持 Git 来源更新的 DSH 版本可在索引中选择同一仓库的新版本更新;旧 Desktop 若提示第三方插件需要卸载再安装,以客户端实际能力为准。此前从本地 `.tgz` 安装的副本不保证自动转为 Git 来源。1.2.0 或 1.3.0 到 1.3.1 还涉及包名变更,必须先按 [升级说明](taskbridge-upgrade.md)迁移。曾添加旧 TaskDispatch 索引的用户,应改用本页的新索引地址。
|
|
23
23
|
|
|
24
|
-
工作流或 Pages
|
|
24
|
+
工作流或 Pages 尚未部署成功时,不能声称已可搜索。发布报告记录实际公开地址、返回状态、格式校验与所指提交。1.4.2 起索引与插件都不声明 DSH 版本白名单,索引省略 `engines` 字段;所需运行时接口仍按实际能力检查。
|
|
25
25
|
|
|
26
26
|
## 维护发布源
|
|
27
27
|
|
|
@@ -97,13 +97,51 @@ A preserved usage counter is a number, so it never carries text. A counter-shape
|
|
|
97
97
|
key whose value is a string still goes through `redactText` and then is masked
|
|
98
98
|
whole — a credential-shaped string under `total_tokens` is masked, not published.
|
|
99
99
|
|
|
100
|
-
## 4.
|
|
100
|
+
## 4. Path identity in free text (a rule about location, not appearance)
|
|
101
|
+
|
|
102
|
+
One rule rewrites a directory *segment* rather than a value. It keys on **where** the
|
|
103
|
+
segment lives, never on how unusual its letters look:
|
|
104
|
+
|
|
105
|
+
| path | result |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| `…\Temp\dsh-SoexNz\…`, `…\Temp\dsh-9Fk2Lm\…`, `…\Temp\profile-a1b2c3\…` | the segment is masked |
|
|
108
|
+
| `/home/u/.cache/dsh-SoexNz/x` | the segment is masked, `/` separators kept |
|
|
109
|
+
| `C:\Temp\dsh-development\x`, `C:\Temp\profile-settings\x`, `C:\Temp\dsh-delegate\x` | **kept** |
|
|
110
|
+
| `E:\repo\dsh-abc123\x`, `E:\repo\dsh-SoexNz\x`, `E:\project\v2-tools\x` | **kept** — no temporary root |
|
|
111
|
+
| `C:\Temp\profile-a1b2c3d\x` (seven characters) | **kept** — not the six-character key |
|
|
112
|
+
| a segment beginning `mask` (the placeholder itself) | **kept**, so redaction is idempotent |
|
|
113
|
+
|
|
114
|
+
The key is recognised by its *context*: `dsh-`/`profile-` plus exactly six id
|
|
115
|
+
characters, directly under a temporary root (`Temp`, `tmp`, `.cache`). The temp-root
|
|
116
|
+
segment itself is kept, so `…\Temp\masks-user-profile-segment\work` still reads as the
|
|
117
|
+
temporary tree it is and a Windows path keeps its backslashes.
|
|
118
|
+
|
|
119
|
+
Two earlier versions of this rule were wrong, in opposite directions:
|
|
120
|
+
|
|
121
|
+
- the first masked **every** `dsh-`/`profile-` segment with six alphanumerics, so this
|
|
122
|
+
product's own checkout (`dsh-delegate`) and its installed package
|
|
123
|
+
(`dsh-taskbridge`) lost their path in every published record;
|
|
124
|
+
- the second tried to tell a profile key from an ordinary name by **case and digit
|
|
125
|
+
shape**. That is a guess: a repository may legitimately be `v2-tools` or
|
|
126
|
+
`dsh-Bridge2`, and a masked path proves nothing, so a guess that fires wrongly
|
|
127
|
+
silently disables continuation.
|
|
128
|
+
|
|
129
|
+
Neither shape nor a package-name allowlist is used now. A name outside a temporary root
|
|
130
|
+
is an ordinary directory and keeps its path, whatever its letters.
|
|
131
|
+
|
|
132
|
+
The paths themselves are stored with a durable **digest** beside them
|
|
133
|
+
(`jobs/continuation-identity.js`): a digest is opaque to this rule, so a record that
|
|
134
|
+
really was shortened still proves its directory. A digest is not a reverser — it can
|
|
135
|
+
confirm a directory, never reconstruct one, so a masked row with no other trustworthy
|
|
136
|
+
original is refused. See `docs/conversation-placement.md`.
|
|
137
|
+
|
|
138
|
+
## 5. `maskSecret` never leaks shape
|
|
101
139
|
|
|
102
140
|
`maskSecret` returns the fixed `MASK` (`••••••••`) for any non-empty string, and
|
|
103
141
|
`''` for empty input. It does not keep a prefix, a suffix or the length, because a
|
|
104
142
|
partial mask is a partial credential.
|
|
105
143
|
|
|
106
|
-
##
|
|
144
|
+
## 6. What is *not* redacted
|
|
107
145
|
|
|
108
146
|
- Numbers and booleans under names that are not secret keys.
|
|
109
147
|
- `credentialRef` — a reference is a name, not a value; it is expected in public
|
|
@@ -114,13 +152,18 @@ Structural fields are preserved so a host can still act on them: `code`, `phase`
|
|
|
114
152
|
`outcome`, `agentId`, `sessionId` and the job's `usage` counters. Nothing in the
|
|
115
153
|
exemption path widens what a caller can learn about a credential.
|
|
116
154
|
|
|
117
|
-
##
|
|
155
|
+
## 7. Keeping this honest
|
|
118
156
|
|
|
119
157
|
`tests/redact.test.js` covers the reported bug, each known counter spelling, the
|
|
120
158
|
suffix-rule regression (`refreshTokens` and friends must stay masked), every
|
|
121
159
|
invalid-value shape, numeric secret token values, unknown token names, and
|
|
122
160
|
credential-shaped strings under a counter name. `tests/config.test.js` covers the
|
|
123
|
-
public-settings projection end to end.
|
|
161
|
+
public-settings projection end to end. `tests/continuation-identity.test.js` covers
|
|
162
|
+
the path rule on the exact acceptance paths: `E:\deepseek workplace\dsh-delegate`
|
|
163
|
+
and `…\node_modules\dsh-taskbridge` must read back unchanged, a real temporary
|
|
164
|
+
profile directory must still be masked (with its separators kept), and the saved
|
|
165
|
+
digest must let a genuinely shortened record still prove its directory — while a
|
|
166
|
+
digest that contradicts its own path is refused.
|
|
124
167
|
|
|
125
168
|
Adding a counter means adding it to `USAGE_COUNTER_KEYS` *and* to the test table.
|
|
126
169
|
Adding a name there widens the one exemption in this module, so it deserves the
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# DSH TaskBridge 1.4.2 更新说明
|
|
2
|
+
|
|
3
|
+
发布日期:2026 年 11 月 14 日。安装标识:`dsh-taskbridge@1.4.2`。
|
|
4
|
+
|
|
5
|
+
## 默认通用,不再列举 DSH 兼容版本
|
|
6
|
+
|
|
7
|
+
本版删除 `engines.dsh`,将宿主提供的 DSH peer 依赖范围改为 `*`。DSH 不再因当前版本号没有出现在插件白名单中,而显示“不兼容”并拒绝加载。截图中的 `DSH 0.2.2-rc.3` 因旧版本范围被拒绝的问题属于本次修复范围。
|
|
8
|
+
|
|
9
|
+
自定义插件索引同步移除可选的 `engines` 字段,使索引安装和 npm 安装使用一致的默认通用策略。
|
|
10
|
+
|
|
11
|
+
必要的模型路由、审批、会话等运行时接口检查继续保留;缺失接口时仍报告具体原因。Node.js `>=24` 要求及用于复现测试的固定开发依赖不变。默认通用不是“所有版本均已完成真实任务验收”的声明。
|
|
12
|
+
|
|
13
|
+
## 其他行为
|
|
14
|
+
|
|
15
|
+
- 保留 1.4.1 的历史补审、可靠保存、8000 码点审查意见和按需分页读取。
|
|
16
|
+
- Codex 集成版本同步更新,并识别已发布的原版 1.4.1 模板;用户自行改过的文件保持原样。
|
|
17
|
+
- API、执行模型、思考强度和任务数据使用原有设置。本次不调整权限策略或静默等待流程。
|
|
18
|
+
|
|
19
|
+
## 更新方式
|
|
20
|
+
|
|
21
|
+
在 DSH 插件管理中更新,或添加 `dsh-taskbridge@1.4.2`。区域镜像未同步时选择 npm 官方源,也可使用本 Release 的 `.tgz` 与 SHA256 校验文件。订阅自定义索引的用户可刷新发现页。
|
|
22
|
+
|
|
23
|
+
截图显示的仍是 `dsh-taskbridge@1.4.0`;发布新版本不会改写已安装的旧包,需要实际更新至 1.4.2。无需手动修改 DSH 的版本豁免、正式 profile 或安全设置。
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# 1.5.0 Codex等待阶段token与账单对照
|
|
2
|
+
|
|
3
|
+
核算日期:2026年11月15日。所有时段均为北京时间。
|
|
4
|
+
|
|
5
|
+
## 可以写入升级报告的结论
|
|
6
|
+
|
|
7
|
+
**这次真实记录中,等待相关token从9,986,839降至457,224,样本总量减少95.42%;按DSH任务实际执行时长折算,等待相关token/分钟减少94.46%。只比较同类“外层续等”动作,token/分钟减少90.07%。**
|
|
8
|
+
|
|
9
|
+
上述是不同任务的观察性样本对照,不是同一开发任务的受控A/B试验,不是整个Codex会话、全天账单或所有用户的固定节省率。
|
|
10
|
+
|
|
11
|
+
## 数据及匹配方法
|
|
12
|
+
|
|
13
|
+
- 使用用户提供的 `usage_2026-11-14_to_2026-11-15.csv`,共910条账单记录。
|
|
14
|
+
- 对照同一Codex聊天的模型响应级用量记录。两组宿主账单模型标识均为 `gpt-6.1-sol`。
|
|
15
|
+
- 按非缓存输入、缓存读取和输出三项用量精确匹配,每条只有一个候选。旧任务83条相关响应、本次邻近时段29条响应均找到唯一匹配;本节只抽取明确属于等待的动作。
|
|
16
|
+
- 本机 `input_tokens` 已含缓存输入;CSV的 `Input Tokens` 在这些匹配中是非缓存部分。因此使用 `input_tokens - cached_input_tokens` 对齐,不重复相加;输出已含对应思考输出时不再另加reasoning。
|
|
17
|
+
- 以工具调用及响应ID归类进入等待、外层续等、审批和审查。不能只按CSV时间裁切:账单时间与本机记录约有16秒差异,而且长工具后的token_count事件可能晚于响应级用量记录。
|
|
18
|
+
- 金额采用 `Billed Cost` 原始单位,CSV未标币种。没有再次乘2.5倍率,也没有把它解释成官方价格。
|
|
19
|
+
- 原始账单含API标签和IP信息,不随插件分发。公开文档只给汇总;本机保存脱敏匹配元数据与复算结果。
|
|
20
|
+
|
|
21
|
+
## 等待相关动作对照
|
|
22
|
+
|
|
23
|
+
优化前样本:2026年11月14日11:49:57开始的任务,真实执行约25分51.94秒;截至指挥端收到失败通知,包含30次进入/恢复等待和18次外层续接。
|
|
24
|
+
|
|
25
|
+
新样本:2026年11月15日04:38:07—04:59:29,test.2候选使用真实DSH模型通道,12轮100秒计时与只读校验,整轮21分22.659秒;包含1次进入等待和2次外层续等。
|
|
26
|
+
|
|
27
|
+
| 指标 | 优化前等待样本 | 新候选等待样本 |
|
|
28
|
+
|---|---:|---:|
|
|
29
|
+
| Codex模型响应 | 48 | 3 |
|
|
30
|
+
| 非缓存输入token | 20,237 | 1,684 |
|
|
31
|
+
| 缓存读取token | 9,960,167 | 455,220 |
|
|
32
|
+
| 输出token | 6,435 | 320 |
|
|
33
|
+
| token合计,含缓存读取 | 9,986,839 | 457,224 |
|
|
34
|
+
| Billed Cost,原始单位 | 2.75210175 | 0.13022500 |
|
|
35
|
+
| token/分钟,按执行时长折算 | 386,104.06 | 21,387.94 |
|
|
36
|
+
|
|
37
|
+
token样本总量下降95.42%,费用样本总量下降95.27%。折算时长后,token/分钟下降94.46%,费用/分钟下降94.27%。公式为 `1 - (新样本用量/新时长) ÷ (旧样本用量/旧时长)`;折算仅用于描述请求密度,不表示相同工作量。
|
|
38
|
+
|
|
39
|
+
### 更接近同类动作的外层续等对照
|
|
40
|
+
|
|
41
|
+
| 指标 | 优化前外层续接 | 新候选外层续接 |
|
|
42
|
+
|---|---:|---:|
|
|
43
|
+
| 模型响应 | 18 | 2 |
|
|
44
|
+
| token合计,含缓存读取 | 3,714,264 | 304,914 |
|
|
45
|
+
| Billed Cost,原始单位 | 0.98379100 | 0.08114025 |
|
|
46
|
+
|
|
47
|
+
同类动作token总量下降91.79%,按任务时长折算的token/分钟下降90.07%。这一对照避开了审批后恢复等待次数的直接混用,但上下文大小和任务内容仍不同,因此不能视为纯代码改动的因果效果。
|
|
48
|
+
|
|
49
|
+
## 新样本的三条等待账单
|
|
50
|
+
|
|
51
|
+
| 动作 | 账单时间 | 非缓存输入 | 缓存读取 | 输出 | Billed Cost |
|
|
52
|
+
|---|---|---:|---:|---:|---:|
|
|
53
|
+
| 进入长等待 | 11月15日04:37:59.584 | 1,369 | 150,759 | 182 | 0.04908475 |
|
|
54
|
+
| 第一次外层续等 | 11月15日04:58:11.352 | 214 | 152,125 | 70 | 0.04085125 |
|
|
55
|
+
| 第二次外层续等 | 11月15日04:59:22.687 | 101 | 152,336 | 68 | 0.04028900 |
|
|
56
|
+
|
|
57
|
+
首条账单时间早于DSH任务开始是请求时间边界差异;归属由三项用量和工具动作精确匹配,不是靠时间段猜测。
|
|
58
|
+
|
|
59
|
+
## 交付后审查成本不能省略
|
|
60
|
+
|
|
61
|
+
新验收从派工到收到交付,合计4条模型响应、609,162 token,Billed Cost为0.20742350。它包含派工与上述3条等待响应,**不包含交付后的独立核对、审查写回和报告**。
|
|
62
|
+
|
|
63
|
+
计入交付后的独立核对、审查写回和报告,本次完整验收共有9条模型响应、1,411,939 token,Billed Cost为0.68073650。其中交付后5条响应合计802,777 token、0.47331300。
|
|
64
|
+
|
|
65
|
+
这部分仍有必要成本,不能把等待阶段的95.42%降幅套到完整任务。旧任务在提供方冷却后失败,且有29次审批,因此没有相同边界、相同工作量的完整任务对照,不计算整轮节省率。
|
|
66
|
+
|
|
67
|
+
## 不能作出的宣传
|
|
68
|
+
|
|
69
|
+
- 不写“1.5.0所有任务节省95%token”“Codex完全不再消耗token”或“跨客户端零唤醒”。
|
|
70
|
+
- 旧任务有29次审批,新20分钟任务没有审批,不能把83次与4次的全部差额归因于静默等待实现。
|
|
71
|
+
- 两组缓存上下文大小不同;缓存token按不同价格计费,token降幅与费用降幅分别列出。
|
|
72
|
+
- 程序内部51次观察、50次心跳不是51次GPT响应。新样本仍存在2次真实外层续等模型响应。
|
|
73
|
+
- 只读 `delegate_metrics` 仍不直接观测宿主模型token;本文来自用户账单与本机模型记录的独立核算。
|