dsh-taskbridge 1.5.4 → 1.7.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 +80 -59
- package/README.md +51 -50
- package/THIRD_PARTY_NOTICES.txt +23 -0
- package/bin/dsh-delegate-mcp.d.ts +1 -0
- package/bin/dsh-delegate-mcp.js +1 -0
- package/codex/dsh-taskbridge.toml +148 -71
- package/docs/INTRODUCTION.md +44 -22
- package/docs/INTRODUCTION.zh.md +32 -26
- package/docs/codex-integration.md +99 -19
- package/docs/contracts-stage-b.md +4 -4
- package/docs/conversation-placement.md +25 -7
- package/docs/plugin-market.md +1 -1
- package/docs/releases/1.6.0.zh.md +11 -0
- package/docs/releases/1.7.0.zh.md +11 -0
- package/docs/runtime-compatibility.md +10 -11
- package/docs/silent-wait.md +69 -31
- package/docs/taskbridge-upgrade.md +1 -1
- package/docs/worker-permissions.md +11 -21
- package/docs/workspace-grouping.md +126 -0
- package/lib/client.d.ts +581 -0
- package/lib/client.js +332 -3461
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +7 -19
- package/src/client/api.js +895 -90
- package/src/client/index.jsx +1363 -296
- package/src/client/sidebar.jsx +862 -0
- package/src/client/styles.js +340 -0
- package/src/client/task-cleanup.js +304 -0
- package/src/client/task-records-table.jsx +217 -0
- package/src/client/task-view.js +307 -0
- package/src/client/workspace-groups.js +482 -0
- package/src/client/workspaces-browser.jsx +770 -0
- package/src/codex/agent-ownership.js +270 -0
- package/src/codex/installer.js +528 -35
- package/src/codex/seam.js +5 -0
- package/src/config/defaults.js +63 -17
- package/src/config/settings.js +60 -62
- package/src/config/validate.js +126 -71
- package/src/http/execution-plane.js +200 -1
- package/src/http/respond.js +26 -2
- package/src/http/user-plane.js +566 -2
- package/src/index.d.ts +55 -0
- package/src/index.js +58 -42
- package/src/jobs/activity.js +968 -78
- package/src/jobs/engine.js +1010 -230
- package/src/jobs/history.js +224 -12
- package/src/jobs/plan-store.js +1020 -0
- package/src/jobs/record-cleanup.js +196 -0
- package/src/jobs/task-display.js +73 -0
- package/src/jobs/task-tree.js +786 -0
- package/src/jobs/title.js +129 -12
- package/src/mcp/server.js +206 -10
- package/src/mcp/wait.js +64 -5
- package/src/runtime/agent-runner.js +101 -15
- package/src/runtime/worker-prompt.js +53 -0
- package/src/workspace/locks.js +288 -167
- package/docs/assets/taskbridge-workflow.en.png +0 -0
- package/docs/assets/taskbridge-workflow.zh.png +0 -0
- package/docs/releases/1.4.0-token-benchmark.zh.md +0 -40
- package/docs/releases/1.4.0.zh.md +0 -54
- package/docs/releases/1.4.1.zh.md +0 -59
- package/docs/releases/1.4.2.zh.md +0 -23
- package/docs/releases/1.5.0-token-benchmark.zh.md +0 -73
- package/docs/releases/1.5.0.zh.md +0 -51
- package/docs/releases/1.5.1.zh.md +0 -70
- package/docs/releases/1.5.2.zh.md +0 -30
- package/docs/releases/1.5.3-test.1.zh.md +0 -28
- package/docs/releases/1.5.3-test.2.zh.md +0 -24
- package/docs/releases/1.5.3.zh.md +0 -33
- package/docs/releases/1.5.4.zh.md +0 -25
- package/src/review/preset.js +0 -868
- package/src/review/prompts.js +0 -145
- package/src/review/reviewer.js +0 -933
package/docs/silent-wait.md
CHANGED
|
@@ -13,40 +13,68 @@
|
|
|
13
13
|
|
|
14
14
|
## 1. 默认间隔
|
|
15
15
|
|
|
16
|
+
这两个时长量的是**两件不同的事**,各自独立,都可以用 `0` 关闭:
|
|
17
|
+
|
|
16
18
|
| 设置 | 默认 | 范围 | 含义 |
|
|
17
19
|
| --- | --- | --- | --- |
|
|
18
|
-
| `monitoring.selfCheckSeconds` |
|
|
19
|
-
| `monitoring.attentionSeconds` |
|
|
20
|
-
| `monitoring.repeatFailureThreshold` | 3 次 | 0–20,整数;`0` 表示关闭 |
|
|
20
|
+
| `monitoring.selfCheckSeconds` | 600 秒(10 分钟) | 0–3600 秒,整数;`0` 表示关闭 | DSH **真正开始执行**满这么久时,插件在本机做**一次**只读自检;整个运行只做一次 |
|
|
21
|
+
| `monitoring.attentionSeconds` | 2400 秒(40 分钟) | 0–7200 秒,整数,且两项都开启时必须大于自检间隔;`0` 表示关闭 | 从**实际回传给派工方的新成果**起满这么久没有新回传,向派工方报告**一次**"运行进度检查" |
|
|
22
|
+
| `monitoring.repeatFailureThreshold` | 3 次 | 0–20,整数;`0` 表示关闭 | 同一工具、同一操作、同一失败**连续**这么多次时提醒**一次**(与上面两个时长独立,见 4.3) |
|
|
23
|
+
|
|
24
|
+
**两个计时起点不同,这是刻意的:**
|
|
25
|
+
|
|
26
|
+
- **自检**从"开始执行"算起:排队、创建会话、请求受理都不算;模型和工具再活跃也不会把它推迟,
|
|
27
|
+
因为产品要的就是"真的跑了 10 分钟时看一眼",而不是"安静了 10 分钟"。
|
|
28
|
+
- **40 分钟进度检查**从"最近一次真正回传给派工方的新成果"算起,第一段基准是**运行开始**。
|
|
29
|
+
这一条不是一次回传。
|
|
21
30
|
|
|
22
31
|
保存在设置文档里的单位是**整秒**。设置页用"分钟"呈现,二者是同一个值
|
|
23
|
-
(
|
|
32
|
+
(10 分钟 = 600 秒)。一个不是整分钟的值(例如 90 秒)在页面上显示为 1.5 分钟,
|
|
24
33
|
不会被悄悄圆成别的设置。重复失败提醒是一个**次数**,不是时长。
|
|
25
34
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
**没有第三个时长,也没有按任务总运行时长计时的提醒。** 一个跑了几小时、一直在回传新成果的任务,
|
|
36
|
+
40 分钟提醒不会触发;任务也不会因为"跑得久"被中止(见第 2 节和 `docs/INTRODUCTION.zh.md` 的
|
|
37
|
+
执行设置说明)。上一版草稿里那个按总运行时长计时的独立周期**没有发布**,本版本也不提供。
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
这几个值都只能全局设置:项目覆盖和单任务覆盖都**不能**改动它们,且每个任务在提交时冻结
|
|
40
|
+
自己那份有效值——运行中修改只影响之后新提交的任务。没有这个字段的旧设置文档照常加载并按默认
|
|
41
|
+
(600/2400/3)处理;旧文档里**有意设置过**的阈值原样保留,不会被升级改回默认。旧文档里如果
|
|
42
|
+
还留着那个未发布的周期字段,它会被读取后**丢弃**,不会变成一个第三个时钟,也不会让文档打不开。
|
|
43
|
+
|
|
44
|
+
## 2. 核心规则:没有回传 ≠ 失败,跑得久 ≠ 提醒
|
|
31
45
|
|
|
32
46
|
- 任务安静、某个测试跑得久、某个工具调用耗时很长,**都不会**让插件判定失败、
|
|
33
47
|
取消任务或重启任务。
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
-
|
|
48
|
+
- **只有"实际回传给派工方的新成果"才会让 40 分钟计时重新开始。** 当前等待通道
|
|
49
|
+
(`delegate_wait`)只在**任务结束时**交付成果;它没有"运行中途的阶段成果"这种东西。
|
|
50
|
+
- 因此,下面这些**都不算回传**、都不会重置 40 分钟计时:DSH 内部的模型步骤、推理与文本增量、
|
|
51
|
+
工具调用与工具结果;连接心跳、结果轮询、空轮询、页面刷新、读取状态;等待审批或等待普通问题的答复;
|
|
52
|
+
重复失败提醒;一次 40 分钟检查本身;以及**本机自检的结论**。运行开始是第一段基准,也不是一次回传。
|
|
53
|
+
- **本机自检可以被读到,但"读到"不等于"有成果"。** 自检结论随观察结果作为诊断返回,它读的只是插件
|
|
54
|
+
本来就持有的本地事实,不是任何交付物;如果让它重置时钟,运行自己的检查就会盖住它本该发现的停滞。
|
|
37
55
|
- 提醒只是提问,不是判决。派工方默认应当继续等待同一个任务,除非有**具体**的错误。
|
|
56
|
+
- **总运行时长本身永远不是提醒**:跑上几小时但一直在回传新成果的任务,不会被提醒,也不会被中止。
|
|
38
57
|
|
|
39
|
-
|
|
40
|
-
|
|
58
|
+
连接心跳、结果轮询、页面刷新、自检本身以及查看状态这类动作**不会**重新计时;否则一个
|
|
59
|
+
真的卡住的执行器会永远看起来"很活跃"。
|
|
41
60
|
|
|
42
|
-
## 3.
|
|
61
|
+
## 3. 10 分钟自检做了什么、没做什么
|
|
43
62
|
|
|
44
|
-
|
|
63
|
+
DSH **真正开始执行**、并且在执行满 `selfCheckSeconds` 时,插件对**自己已经持有的**任务记录做一次只读检查:
|
|
45
64
|
|
|
46
65
|
- 任务是否还活着、执行器是否已经结束;
|
|
47
66
|
- 当前阶段;
|
|
48
67
|
- 是否有一次工具调用在等待授权决定;
|
|
49
|
-
-
|
|
68
|
+
- 当前正在运行哪个工具、已经运行多久;
|
|
69
|
+
- 以及两个彼此独立的字段:**"未回传多久"**(距最近一次真实回传的时间)和
|
|
70
|
+
**"当前 DSH 在做什么"**(模型在跑、某个工具在跑、在等授权、在等答复等)。
|
|
71
|
+
|
|
72
|
+
这次检查**不需要任何派工方在等待**:任务运行时,插件自己按 `selfCheckSeconds` 排一个
|
|
73
|
+
可取消的定时器;从开始执行起到达阈值就会检查一次,即使 Codex/MCP 客户端
|
|
74
|
+
完全没有在等、甚至根本没连着。**队列、创建会话、请求受理都不算开始执行,所以不会排这个定时器。**
|
|
75
|
+
模型和工具持续活动也**不会**把它推迟。关闭(填 `0`)、任务结束、取消或插件卸载都会清掉它,
|
|
76
|
+
不会留下后台计时器。它和等待循环共用同一个"整个运行只查一次"的判定,所以**同一个运行只会检查一次**——
|
|
77
|
+
即使之后才有人开始等待。
|
|
50
78
|
|
|
51
79
|
它**不会**:
|
|
52
80
|
|
|
@@ -56,7 +84,8 @@
|
|
|
56
84
|
- 重启、取消或重新提交任务。
|
|
57
85
|
|
|
58
86
|
自检的结论会显示在任务详情里("无进展诊断"),例如"执行器健在,这段时间没有新输出"、
|
|
59
|
-
"某个工具调用仍在运行"、"正在等待本次调用授权决定"
|
|
87
|
+
"某个工具调用仍在运行"、"正在等待本次调用授权决定"。它也会随一次观察结果作为诊断被**读到**,
|
|
88
|
+
但读到它只是读了一份本地诊断:**它不是成果,不会重置 40 分钟回传计时**。
|
|
60
89
|
|
|
61
90
|
## 4. 一次等待只返回一个结论
|
|
62
91
|
|
|
@@ -74,7 +103,7 @@
|
|
|
74
103
|
| 原因 | 含义 | 派工方该做什么 |
|
|
75
104
|
| --- | --- | --- |
|
|
76
105
|
| `heartbeat` | 没什么要报告的(内部心跳) | 正常情况下看不到;看到了就继续等待同一任务 |
|
|
77
|
-
| `attention` |
|
|
106
|
+
| `attention` | `checkpoint: "progress"` —— 任务**连续**超过提醒间隔没有**任何新成果回传给派工方**(默认 40 分钟)。**不是**"等待结束",也**不是**"跑得太久"。也可能是**重复失败**(`checkpoint: "failure"`,见 4.3) | 读诊断(`noDeliveryForMs` 是未回传多久,`activity` 是 DSH 在做什么),**默认继续等待**;不要在只是没回传成果时取消或判失败 |
|
|
78
107
|
| `permission` | 有一次工具调用在等授权决定 | 审查这一次调用的完整操作,然后决定一次,再继续等待同一任务 |
|
|
79
108
|
| `ready` | 执行结束,等待宿主审查 | 读**一次**完整证据,自己审查;这不等于已接受 |
|
|
80
109
|
| `failed` / `cancelled` | 运行没有产出 | 读一次记录的原因后报告 |
|
|
@@ -86,8 +115,9 @@
|
|
|
86
115
|
它只说明**这次调用**自己的预算用完了,不是任务事实,也不需要决定。这个标志描述的是答案本身,
|
|
87
116
|
**不承诺**派工方宿主不会因此唤醒它自己的模型——是否被唤醒由宿主管。
|
|
88
117
|
|
|
89
|
-
`attention`
|
|
90
|
-
|
|
118
|
+
`attention` 提醒**每段回传间隔只报告一次**:同一段"没有新成果回传"里,到达提醒间隔时报告一次,之后不再重复。
|
|
119
|
+
一次真实的新成果回传开始新的间隔,下一段到期时会再报告一次。刻意不按"每 40 分钟"重复,是因为重复提醒
|
|
120
|
+
一个没人处理的间隔正是这个功能要消除的噪声。
|
|
91
121
|
|
|
92
122
|
### 4.0 外层续等:宿主提前交回调用时
|
|
93
123
|
|
|
@@ -114,8 +144,8 @@
|
|
|
114
144
|
|
|
115
145
|
### 4.3 重复失败提醒(与静默计时独立)
|
|
116
146
|
|
|
117
|
-
|
|
118
|
-
独立:一个忙碌的任务可以一直在失败,永远碰不到
|
|
147
|
+
除了两个时长,插件还会盯着**同一个工具、同一个操作、同一种失败连续出现的次数**。两者互相
|
|
148
|
+
独立:一个忙碌的任务可以一直在失败,永远碰不到 10/40 分钟阈值,而这正是这个提醒存在的场景。
|
|
119
149
|
|
|
120
150
|
- 默认连续 **3** 次时提醒**一次**;设置项 `monitoring.repeatFailureThreshold`,`0` 表示关闭。
|
|
121
151
|
- 只认**原生结构化失败标记**:`tool/result.message.isError === true`(`ToolResultMessage` 契约)。
|
|
@@ -307,7 +337,8 @@ token 用量和费用在这个进程里**不可见**,因此报告为 `not-inte
|
|
|
307
337
|
等待仅带结论状态和长度。结果中的 `noteOmitted: true` 表示正文被明确省略,使用
|
|
308
338
|
`delegate_result({ taskId, reviewNoteOffset: 0 })` 按 `nextOffset` 读取;默认每页 2000 码点,
|
|
309
339
|
可选 `reviewNoteLimit` 范围 1—2000,直到 `complete: true`。列表 200 码点预览与详情展开
|
|
310
|
-
不改变保存正文;可见页面的待审/保存中刷新由程序完成,不唤醒 GPT
|
|
340
|
+
不改变保存正文;可见页面的待审/保存中刷新由程序完成,不唤醒 GPT(无活动记录时仍按较慢的
|
|
341
|
+
只读节奏发现新任务,见 1.5.x 的说明)。
|
|
311
342
|
|
|
312
343
|
### 同一任务继续修正
|
|
313
344
|
|
|
@@ -329,7 +360,7 @@ token 用量和费用在这个进程里**不可见**,因此报告为 `not-inte
|
|
|
329
360
|
|
|
330
361
|
`delegate_submit` 的可选布尔 `agentTeams` 选择 DSH 的 Agent Teams 模式
|
|
331
362
|
(模型菜单里的"启用智能体团队协作")用于**本任务自己的** DSH 会话。它不是 Codex 自己的
|
|
332
|
-
|
|
363
|
+
多智能体功能。用户在派工制度上决定一次"由 Codex 按复杂度决定",
|
|
333
364
|
不需要每次派工都问用户。
|
|
334
365
|
|
|
335
366
|
- 简单单文件或强顺序依赖的活:**显式**传 `agentTeams: false`(schema 支持该字段时)。
|
|
@@ -396,11 +427,15 @@ token 用量和费用在这个进程里**不可见**,因此报告为 `not-inte
|
|
|
396
427
|
字段是判断依据,不要只看原因名字。
|
|
397
428
|
- 串行宿主下没有通用的“并发”承诺:插件传输支持并发,独立控制程序只提供 `status` 与
|
|
398
429
|
`cancel` 两个动作,也不能改变宿主的调度方式。
|
|
399
|
-
-
|
|
430
|
+
- **五类"结束"不是一回事**,不要混用:(a) `wait-limit` 是**这次调用自己**的等待预算用完,
|
|
400
431
|
任务本身没变,继续等同一个 `taskId`;(b) 外层宿主工具/执行时限把调用提前交回,是
|
|
401
|
-
**外层事件**,观察没结束、执行也没停;(c) `attention
|
|
402
|
-
|
|
403
|
-
`
|
|
432
|
+
**外层事件**,观察没结束、执行也没停;(c) `attention`(`checkpoint: "progress"`)是
|
|
433
|
+
**连续没有任何新成果回传**给派工方超过阈值(默认 40 分钟),跑得久本身不算;(d) `attention` 回答里带了
|
|
434
|
+
`failure` 块(`checkpoint: "failure"`)是**重复失败**提醒,与任何时钟无关;(e) **普通任务
|
|
435
|
+
没有总执行超时**——只有派工时明确给了 `overrides.timeoutSeconds` 才有,那种情况下它以终态
|
|
436
|
+
报告,既不是 `wait-limit` 也不是 `attention`,更不是客户端事件。
|
|
437
|
+
- **本地插件不会唤醒离线的派工方**:不等待时,自检与到期提醒仍然会被记录在任务状态里,
|
|
438
|
+
下一次 `delegate_wait` / `delegate_result` 能读到它——是"恢复观察时收到到期事件",不是后台通知。
|
|
404
439
|
- 插件**不能**创建后台等待者、不能唤醒宿主模型,也**不**承诺跨客户端的零唤醒。宿主有
|
|
405
440
|
自动续接时,一次长等待只占一个续接窗口;没有时,每个 yield 窗口要花一次续接。这一点
|
|
406
441
|
必须如实说明,不能编造后台唤醒。
|
|
@@ -408,8 +443,11 @@ token 用量和费用在这个进程里**不可见**,因此报告为 `not-inte
|
|
|
408
443
|
持续等待 1200 秒:内部观察 48 次、消化心跳 47 次,仅返回 1 次交付事件,期间没有读取中间结果。
|
|
409
444
|
活动由脚本按真实事件格式模拟,包含持续思考流;这证明该客户端能够维持这次 20 分钟等待,
|
|
410
445
|
**不等于**真实提供方连续执行 20 分钟、所有客户端零续接或固定比例的 token/费用节省。
|
|
411
|
-
- 设置页的自动刷新只在"任务记录"
|
|
412
|
-
|
|
446
|
+
- 设置页的自动刷新只在"任务记录"标签页**打开且页面可见**时运行,且只是读取同一份任务列表
|
|
447
|
+
(不调用模型、不触发任务动作、不写设置)。有进行中或待审记录时每 5 秒一次;没有这类记录时
|
|
448
|
+
不再停止,而是每 15 秒只读检查一次,这样从外部派发的新任务会自动出现;切回本页立即刷新。
|
|
449
|
+
窗口或标签页隐藏、离开"任务记录"页、或已有一次读取在途时都不刷新,刷新不并发。
|
|
450
|
+
这条只影响设置页显示,不改变本文件中 MCP 的静默等待协议。
|
|
413
451
|
|
|
414
452
|
## 1.5.0:原生提问、拒绝理由与真实验收
|
|
415
453
|
|
|
@@ -419,4 +457,4 @@ token 用量和费用在这个进程里**不可见**,因此报告为 `not-inte
|
|
|
419
457
|
- 题目默认十分钟到期,最多三十分钟;DSH 原生调用若更早撤销,也立即失效。题目绑定同一 Agent、Session 和原工具调用,不会移交给新回合的同名调用。
|
|
420
458
|
- 审批拒绝理由注入同一个执行 Agent。`rejectionFeedback.delivered` 表示注入是否成功,不等于模型已理解;原操作仍被拒绝,后续申请独立判断。问题回答始终不授予任何权限。
|
|
421
459
|
|
|
422
|
-
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),不承诺跨客户端零唤醒或所有任务固定节省率。
|
|
460
|
+
2026-11-15,本地 test.2 候选通过实际 DSH Desktop 重启续接,以及真实模型12轮串行100秒工具等待/只读校验,整轮约21分23秒。1次 MCP 等待、1次ready返回、0次中间结果读取;外层客户端20分钟时仍需续接同一个exec。账单实测见[1.5.0等待阶段对照](https://github.com/ranranyya/dsh-taskbridge/blob/master/docs/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.7.0`**。中国大陆镜像未同步时改选 npm 官方源。也可安装本项目 Release 的 `dsh-taskbridge-1.7.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,11 +1,11 @@
|
|
|
1
|
-
# Worker session permissions (1.
|
|
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
|
-
|
|
1
|
+
# Worker session permissions (1.6.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](https://github.com/ranranyya/dsh-taskbridge/blob/master/docs/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
|
+
|
|
9
9
|
## The policy
|
|
10
10
|
|
|
11
11
|
Every delegated worker run drives a DSH session whose policy is fixed by this
|
|
@@ -308,19 +308,9 @@ it is a stand-in rather than a different protocol.
|
|
|
308
308
|
question answers on their own `questionAnswers` axis. A question answer is **never** counted
|
|
309
309
|
as a permission decision or a refusal: it authorizes nothing.
|
|
310
310
|
|
|
311
|
-
##
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
the worker sandbox path, it gets **no permission bridge**, and this release does not
|
|
315
|
-
change its tool surface or its permissions. **Only the sandbox policy and the bridge
|
|
316
|
-
are excluded here.** Model selection is a different contract: on `0.2.2-rc.1` the
|
|
317
|
-
reviewer's provider/model/effort are applied through the same durable
|
|
318
|
-
`agent.model.select(...)` surface and read back like the worker's, because a recorded
|
|
319
|
-
route is what makes the reviewer's own composition provable. The exclusion in this
|
|
320
|
-
section is about `workspace-write` / `never` / `ask` and the per-call decision, not
|
|
321
|
-
about how a model is chosen.
|
|
322
|
-
|
|
323
|
-
An ordinary DSH session is untouched for the same reason: the bridge is armed only
|
|
311
|
+
## Scope of the permission bridge
|
|
312
|
+
|
|
313
|
+
The bridge is armed only
|
|
324
314
|
inside a delegated worker run, it is registered as an answerer on that Agent's own
|
|
325
315
|
scoped context, and it declines (falls through to the next answerer) every request
|
|
326
316
|
that is not its own Agent's.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# What the sidebar can do, and what it cannot (verified against the shipped host)
|
|
2
|
+
|
|
3
|
+
This document replaces the earlier "grouped workspaces view" description. It states what the
|
|
4
|
+
shipped DSH `0.2.2-rc.5` client actually publishes, what this plugin therefore does, and the
|
|
5
|
+
interface gap that stops the requested arrangement from being built as asked.
|
|
6
|
+
|
|
7
|
+
## 1. The host contract, as read from the shipped client bundle
|
|
8
|
+
|
|
9
|
+
`@deepseek-ai/dsh-client-ui-workspace` is the package that draws the sidebar's workspace area.
|
|
10
|
+
Its registration, quoted from the bundle actually served by the desktop host (`plugins/??…/
|
|
11
|
+
dsh-client-ui-workspace/client.js`, 205 kB):
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register({
|
|
15
|
+
name: 'sidebar.workspaces',
|
|
16
|
+
children: {
|
|
17
|
+
'sidebar.workspaces.directoryFlow': { kind: 'single', scope: 'root' },
|
|
18
|
+
'sidebar.workspaces.session.row.action': { kind: 'list', scope: 'root' },
|
|
19
|
+
'sidebar.session.row.leading': { kind: 'list', scope: 'root', inline: true },
|
|
20
|
+
'sidebar.session.row.trailing': { kind: 'list', scope: 'root', inline: true },
|
|
21
|
+
'sidebar.session.row.hover': { kind: 'list', scope: 'root' },
|
|
22
|
+
},
|
|
23
|
+
store: viewStore,
|
|
24
|
+
inject: browserInjected,
|
|
25
|
+
locale: NS,
|
|
26
|
+
}, WorkspaceBrowser))
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The same bundle shows how the host itself uses the child slot:
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
ctx.slots.inject('sidebar.workspaces.session.row.action', function* () {
|
|
33
|
+
yield ctx.slots.register({ name: '…session.row.action', id: 'archive', order: 100, … }, ArchiveSessionRowButton)
|
|
34
|
+
yield ctx.slots.register({ name: '…session.row.action', id: 'pin', order: 200, … }, PinSessionRowButton)
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Facts this establishes:
|
|
39
|
+
|
|
40
|
+
| Fact | Consequence |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| `sidebar.workspaces` is a **single** slot: one entry renders, at priority `0`. | A registration there **replaces** the native rows. A sibling section *above* the browser inside the same cell is **not expressible**. That is why the earlier build made the native header and every `data-row-key` row disappear from an acceptance run. |
|
|
43
|
+
| The entry publishes **child slots**, including `sidebar.workspaces.session.row.action` (`kind: 'list'`, `scope: 'root'`). | A plugin can add material **inside** each native session row. This is the supported seam, and it never replaces or reorders a native row. |
|
|
44
|
+
| `workspaceController.create({ path })` registers/reuses **by path**, and no API names a parent Workspace. | One external shared directory cannot be given a second native Workspace, and a chain cannot be given a native TaskBridge parent. |
|
|
45
|
+
| The native rows are the shipped component's own DOM (`data-row-key`, `[data-sidebar-workspace-header]`). | Filtering or hiding individual native rows from outside would mean patching the host's DOM, which this plugin does not do. |
|
|
46
|
+
|
|
47
|
+
**Interface gap (stated, not worked around):** a vertically stacked "TaskBridge section above the
|
|
48
|
+
native workspace list, in the same cell" needs either a second slot for that position or a
|
|
49
|
+
published way to render the shipped browser from a foreign entry. Neither exists in `0.2.2-rc.5`.
|
|
50
|
+
|
|
51
|
+
Minimal host extensions that would close it, in order of preference:
|
|
52
|
+
|
|
53
|
+
1. a sibling slot rendered **above** `sidebar.workspaces` (e.g. `sidebar.workspaces.before`), or
|
|
54
|
+
2. a documented row predicate/filter on the browser, if plugins are to suppress native rows, or
|
|
55
|
+
3. publishing the shipped `WorkspaceBrowser` component so a foreign entry can compose it.
|
|
56
|
+
|
|
57
|
+
## 2. What this plugin does instead
|
|
58
|
+
|
|
59
|
+
1. **The native workspace area is the host's.** `apply()` does **not** register on
|
|
60
|
+
`sidebar.workspaces`. Every native Workspace keeps its name, order, search, session rows, and
|
|
61
|
+
its open / new-session / rename / remove / archive / restore actions and menus — untouched,
|
|
62
|
+
because the plugin draws none of them.
|
|
63
|
+
2. **Dispatched conversations are marked inside their own native row** through the published
|
|
64
|
+
child slot `sidebar.workspaces.session.row.action`, as a list entry with id
|
|
65
|
+
`dsh-taskbridge:dispatched` and `order: 900` — after the host's archive (100) and pin (200), so
|
|
66
|
+
it never comes between the operator and a native control. The marker is one quiet inline word:
|
|
67
|
+
`派工` for a shared run, `派工 · 隔离` for a worktree run, with the task title as its tooltip. A
|
|
68
|
+
session this plugin did not dispatch renders **nothing**, so a native row is byte-identical.
|
|
69
|
+
3. **The grouping itself — TaskBridge → 任务工作区 → 对话 — is drawn on the plugin's own
|
|
70
|
+
surfaces** (the TaskBridge content panel), where it can be complete and cannot disturb a native
|
|
71
|
+
row. It is strictly three levels, one row per dispatched **chain**: two independent dispatches
|
|
72
|
+
of one project are two task workspaces; a continuation keeps its parent's Workspace and Session
|
|
73
|
+
and stays one row.
|
|
74
|
+
|
|
75
|
+
## 3. Ownership
|
|
76
|
+
|
|
77
|
+
Proof, never appearance:
|
|
78
|
+
|
|
79
|
+
| Question | Rule |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| Is this conversation TaskBridge's? | The durable map (`/session-map`) or the conversation's own task record names that exact **(session, workspace)** pair. A title alone never proves anything (it may *describe* a row, never claim one). |
|
|
82
|
+
| Which project? | The recorded **source path**, canonicalised as `sessionPathKey` does — an external target's shared and worktree runs are one project; same-named directories elsewhere are two. |
|
|
83
|
+
| Which task workspace? | The **chain**, resolved from the records' own `continueFromTaskId` links. |
|
|
84
|
+
| What is never claimed? | Any Workspace whose conversations are not fully explained: empty, ordinary, the managed worktree root, or **mixed**. The native browser shows those. |
|
|
85
|
+
|
|
86
|
+
A **mixed** Workspace (a dispatched conversation plus one the operator opened) appears in the
|
|
87
|
+
grouping for its chain, but its node is marked `sharedWithOrdinary`: renaming or removing it would
|
|
88
|
+
act on the operator's own conversation, so both are **refused with a stated reason** and the
|
|
89
|
+
native row remains the place to manage it.
|
|
90
|
+
|
|
91
|
+
## 4. Actions
|
|
92
|
+
|
|
93
|
+
| Row | Action | Call |
|
|
94
|
+
| --- | --- | --- |
|
|
95
|
+
| Conversation | open | `uiWorkspace.openSession(sessionId)` |
|
|
96
|
+
| Conversation | archive | `workspaces.archiveSession(sessionId)` — the host's own protection (a running conversation) applies |
|
|
97
|
+
| Archived conversation | restore | `workspaces.unarchiveSession(sessionId)` |
|
|
98
|
+
| Task workspace | new conversation | `uiWorkspace.startSession(workspaceId)` |
|
|
99
|
+
| Task workspace | rename | `workspaces.rename(workspaceId, title)` after the operator's text; refused when `sharedWithOrdinary` |
|
|
100
|
+
| Task workspace | remove | `workspaces.delete(workspaceId)` after a confirmation; refused when `sharedWithOrdinary` |
|
|
101
|
+
|
|
102
|
+
A TaskBridge or project row is a display node, never a Workspace record: it carries none of these.
|
|
103
|
+
|
|
104
|
+
## 5. Live behaviour
|
|
105
|
+
|
|
106
|
+
* The marker and the grouping both subscribe to the host's own `workspaces.list`, so an archive, a
|
|
107
|
+
restore or a new Workspace appears without a reload.
|
|
108
|
+
* The durable map is read once per mount; a dispatch made afterwards is proven by its own task
|
|
109
|
+
record, so a new chain is marked and grouped immediately.
|
|
110
|
+
* Neither surface starts a read loop: the task panel and records page own that.
|
|
111
|
+
|
|
112
|
+
## 6. What is verified, and how
|
|
113
|
+
|
|
114
|
+
| Claim | How |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `apply` registers the child slot and never the parent | `tests/client.test.js`, `tests/workspaces-browser.test.js` (built bundle, fake ctx) |
|
|
117
|
+
| The host really declares that child slot, as a list | quoted from the bundle the isolated desktop host serves (§1); the marker registers with matching `id`/`order` |
|
|
118
|
+
| The marker appears only for dispatched sessions | `tests/workspaces-browser.test.js` (jsdom, real bundle) |
|
|
119
|
+
| Strict three levels, one row per chain | `tests/workspace-groups.test.js`, `tests/workspaces-browser.test.js` |
|
|
120
|
+
| A mixed Workspace is never renamed/removed as a whole | both files above |
|
|
121
|
+
| The native area is not replaced | `apply` registers no parent entry; asserted in `tests/client.test.js` and `tests/entry.test.js` |
|
|
122
|
+
|
|
123
|
+
Not verified by this work unit in a live desktop UI: the marker's exact position inside the host's
|
|
124
|
+
own row (it depends on the host's row layout), and the grouping panel inside the real desktop
|
|
125
|
+
window (the headless browser could not be launched in this environment — its mojo channel is
|
|
126
|
+
denied by the sandbox). Both are asserted against the real bundle's contract and in jsdom.
|