dsh-taskbridge 1.7.1 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/LICENSE +21 -21
  3. package/README.md +733 -877
  4. package/THIRD_PARTY_NOTICES.txt +23 -23
  5. package/antigravity/agents/dsh-taskbridge.md +32 -0
  6. package/antigravity/skills/dsh-taskbridge/SKILL.md +51 -0
  7. package/codex/dsh-taskbridge.toml +181 -631
  8. package/cordis.patch.yml +6 -6
  9. package/docs/INTRODUCTION.md +122 -295
  10. package/docs/INTRODUCTION.zh.md +134 -279
  11. package/docs/antigravity-integration.md +42 -0
  12. package/docs/auth-contract.md +138 -138
  13. package/docs/claude-code.md +6 -11
  14. package/docs/codex-integration.md +2 -2
  15. package/docs/contracts-stage-b.md +443 -443
  16. package/docs/conversation-placement.md +7 -6
  17. package/docs/plugin-market.md +30 -30
  18. package/docs/redaction-contract.md +170 -170
  19. package/docs/releases/1.7.0.zh.md +11 -11
  20. package/docs/releases/1.8.0.zh.md +16 -0
  21. package/docs/releases/1.8.1.zh.md +24 -0
  22. package/docs/runtime-compatibility.md +1 -1
  23. package/docs/taskbridge-upgrade.md +28 -28
  24. package/docs/taskdispatch-upgrade.md +25 -25
  25. package/docs/workspace-contract.md +538 -538
  26. package/docs/workspace-grouping.md +126 -126
  27. package/icon.svg +1 -1
  28. package/lib/client.d.ts +804 -699
  29. package/lib/client.js +7 -7
  30. package/locale/en.json +1 -1
  31. package/locale/zh.json +1 -1
  32. package/package.json +150 -144
  33. package/src/antigravity/installer.js +1068 -0
  34. package/src/antigravity/seam.js +142 -0
  35. package/src/auth/fence.js +361 -361
  36. package/src/auth/grants.js +789 -789
  37. package/src/client/api.js +266 -3
  38. package/src/client/index.jsx +224 -11
  39. package/src/client/sidebar.jsx +862 -862
  40. package/src/client/styles.js +624 -624
  41. package/src/client/task-cleanup.js +429 -304
  42. package/src/client/task-records-table.jsx +217 -217
  43. package/src/client/task-view.js +307 -307
  44. package/src/client/workspace-groups.js +482 -482
  45. package/src/client/workspaces-browser.jsx +770 -770
  46. package/src/codex/agent-ownership.js +270 -270
  47. package/src/codex/installer.js +6 -0
  48. package/src/codex/toml.js +784 -784
  49. package/src/config/defaults.js +11 -15
  50. package/src/config/redact.js +245 -245
  51. package/src/config/store.js +186 -186
  52. package/src/credentials/seam.js +202 -202
  53. package/src/http/respond.js +6 -5
  54. package/src/http/user-plane.js +83 -1
  55. package/src/index.js +25 -0
  56. package/src/jobs/diagnostics.js +15 -15
  57. package/src/jobs/engine.js +1 -0
  58. package/src/jobs/history.js +1 -1
  59. package/src/jobs/plan-store.js +1103 -1020
  60. package/src/jobs/record-cleanup.js +452 -7
  61. package/src/jobs/review-note.js +63 -63
  62. package/src/jobs/task-descriptions.js +82 -82
  63. package/src/jobs/task-display.js +73 -73
  64. package/src/jobs/task-tree.js +786 -786
  65. package/src/jobs/title.js +134 -134
  66. package/src/mcp/continuation.js +317 -317
  67. package/src/mcp/server.js +34 -27
  68. package/src/mcp/wait.js +34 -15
  69. package/src/model/connectivity.js +371 -371
  70. package/src/model/discovery.js +582 -582
  71. package/src/model/native-catalog.js +68 -68
  72. package/src/model/openai-adapter.js +671 -671
  73. package/src/model/probe.js +264 -264
  74. package/src/model/providers.js +756 -756
  75. package/src/model/routing.js +321 -321
  76. package/src/runtime/agent-runner.js +1 -0
  77. package/src/runtime/permissions.js +1619 -1619
  78. package/src/runtime/question-call.js +162 -162
  79. package/src/runtime/questions.js +909 -909
  80. package/src/runtime/session-placement.js +36 -1
  81. package/src/runtime/worker-prompt.js +61 -55
  82. package/src/workspace/audit.js +775 -775
  83. package/src/workspace/preflight.js +424 -424
  84. package/src/workspace/worktrees.js +833 -679
@@ -23,12 +23,13 @@ conversation is ever continued.
23
23
 
24
24
  `delegate_submit.title` is an optional, short description of the actual work in
25
25
  the operator's language. The engine derives a title from the prompt's goal when
26
- older callers omit it. Only newly created Workspace groups are renamed through
27
- `workspaceController.rename({ workspaceId, title })`; an existing Workspace or
28
- an explicit follow-up retains its current name. Conflicting names receive a short
29
- task-id suffix. Naming needs no model call and does not change the execution
30
- directory, Git branch or task identity. Historical Workspaces are not renamed in
31
- bulk.
26
+ older callers omit it. Only newly created **worktree** Workspace groups are renamed
27
+ through `workspaceController.rename({ workspaceId, title })`; a shared-mode run
28
+ executes inside the project's native source Workspace and preserves the project's
29
+ own Workspace name, and an existing Workspace or explicit follow-up retains its
30
+ current name. Conflicting names receive a short task-id suffix. Naming needs no
31
+ model call and does not change the execution directory, Git branch or task identity.
32
+ Historical Workspaces are not renamed in bulk.
32
33
 
33
34
  ## The two questions, and the two services that answer them
34
35
 
@@ -1,30 +1,30 @@
1
- # DSH 插件索引、搜索和更新
2
-
3
- 本项目发布 **DSH TaskBridge 自定义插件索引**。它不是官方内置市场收录,也不会自动出现在没有订阅该索引的用户的搜索结果中。
4
-
5
- 索引地址:
6
-
7
- ```text
8
- https://ranranyya.github.io/dsh-taskbridge/index.json
9
- ```
10
-
11
- ## 在 DSH 中使用
12
-
13
- 1. 打开“插件”,启用实验性的“自定义插件索引”。
14
- 2. 在“发现”中选择“添加索引源”,填写上面的 HTTPS 地址。
15
- 3. 搜索 **DSH TaskBridge** 或 **dsh-taskbridge**。
16
- 4. 安装确认框应显示本项目 GitHub 仓库和精确提交。核对后安装,不要改填别人的 `dsh-delegate` 或 `dsh-dispatch` npm 包。
17
-
18
- 当前索引采用固定 Git 提交作为安装来源,不依赖本机 npm 登录。另一种安装方式是直接在“添加插件”中输入 `dsh-taskbridge`,无需添加索引;若中国大陆镜像未同步,改选 npm 官方源。GitHub Release 同时提供 `.tgz` 和 SHA256 文件。
19
-
20
- ## 新版本
21
-
22
- 正式 Release 发布后,GitHub Pages 工作流会重新生成索引。支持 Git 来源更新的 DSH 版本可在索引中选择同一仓库的新版本更新;旧 Desktop 若提示第三方插件需要卸载再安装,以客户端实际能力为准。此前从本地 `.tgz` 安装的副本不保证自动转为 Git 来源。1.2.0 或 1.3.0 到 1.3.1 还涉及包名变更,必须先按 [升级说明](taskbridge-upgrade.md)迁移。曾添加旧 TaskDispatch 索引的用户,应改用本页的新索引地址。
23
-
24
- 工作流或 Pages 尚未部署成功时,不能声称已可搜索。发布报告记录实际公开地址、返回状态、格式校验与所指提交。1.4.2 起索引与插件都不声明 DSH 版本白名单,索引省略 `engines` 字段;所需运行时接口仍按实际能力检查。
25
-
26
- ## 维护发布源
27
-
28
- `scripts/build-plugin-market.mjs` 从已检出的包元数据、明确的 40 位提交 SHA 和真实发布时间生成索引;不使用分支名或占位提交,不编造下载量或 star 数。`.github/workflows/plugin-market.yml` 在正式发布或手动指定已发布标签时部署 GitHub Pages;不自动发布 npm。
29
-
30
- 格式与操作依据:[DSH 官方插件索引说明](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/guide/plugin-market.zh.md)。
1
+ # DSH 插件索引、搜索和更新
2
+
3
+ 本项目发布 **DSH TaskBridge 自定义插件索引**。它不是官方内置市场收录,也不会自动出现在没有订阅该索引的用户的搜索结果中。
4
+
5
+ 索引地址:
6
+
7
+ ```text
8
+ https://ranranyya.github.io/dsh-taskbridge/index.json
9
+ ```
10
+
11
+ ## 在 DSH 中使用
12
+
13
+ 1. 打开“插件”,启用实验性的“自定义插件索引”。
14
+ 2. 在“发现”中选择“添加索引源”,填写上面的 HTTPS 地址。
15
+ 3. 搜索 **DSH TaskBridge** 或 **dsh-taskbridge**。
16
+ 4. 安装确认框应显示本项目 GitHub 仓库和精确提交。核对后安装,不要改填别人的 `dsh-delegate` 或 `dsh-dispatch` npm 包。
17
+
18
+ 当前索引采用固定 Git 提交作为安装来源,不依赖本机 npm 登录。另一种安装方式是直接在“添加插件”中输入 `dsh-taskbridge`,无需添加索引;若中国大陆镜像未同步,改选 npm 官方源。GitHub Release 同时提供 `.tgz` 和 SHA256 文件。
19
+
20
+ ## 新版本
21
+
22
+ 正式 Release 发布后,GitHub Pages 工作流会重新生成索引。支持 Git 来源更新的 DSH 版本可在索引中选择同一仓库的新版本更新;旧 Desktop 若提示第三方插件需要卸载再安装,以客户端实际能力为准。此前从本地 `.tgz` 安装的副本不保证自动转为 Git 来源。1.2.0 或 1.3.0 到 1.3.1 还涉及包名变更,必须先按 [升级说明](taskbridge-upgrade.md)迁移。曾添加旧 TaskDispatch 索引的用户,应改用本页的新索引地址。
23
+
24
+ 工作流或 Pages 尚未部署成功时,不能声称已可搜索。发布报告记录实际公开地址、返回状态、格式校验与所指提交。1.4.2 起索引与插件都不声明 DSH 版本白名单,索引省略 `engines` 字段;所需运行时接口仍按实际能力检查。
25
+
26
+ ## 维护发布源
27
+
28
+ `scripts/build-plugin-market.mjs` 从已检出的包元数据、明确的 40 位提交 SHA 和真实发布时间生成索引;不使用分支名或占位提交,不编造下载量或 star 数。`.github/workflows/plugin-market.yml` 在正式发布或手动指定已发布标签时部署 GitHub Pages;不自动发布 npm。
29
+
30
+ 格式与操作依据:[DSH 官方插件索引说明](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/guide/plugin-market.zh.md)。
@@ -1,170 +1,170 @@
1
- # Redaction contract: what may cross a public surface
2
-
3
- The rule this module enforces is narrow and checkable:
4
-
5
- > A stored secret value never leaves the module that read it. A public surface
6
- > carries a mask at most, and a model usage count is published only when it is a
7
- > plain finite non-negative number under a known counter name.
8
-
9
- `src/config/redact.js` is the only component that decides this. Configuration
10
- surfaces, job history, MCP results, review findings, audit diagnostics and logs
11
- all funnel through it.
12
-
13
- ---
14
-
15
- ## 1. The secret-key rule
16
-
17
- `isSecretKey(key)` returns true when the key matches:
18
-
19
- ```
20
- /(api[_-]?key|apikey|secret|token|password|passwd|credential[_-]?value|authorization)/i
21
- ```
22
-
23
- This is a substring test, on purpose: `RELAY_API_KEY`, `access_token`,
24
- `dbPassword` and `client_secret` are all caught without enumerating them. It also
25
- means the rule is coarse — it cannot tell a credential from a count that merely
26
- spells the same word.
27
-
28
- `redactDeep` therefore masks the value behind such a key, with one exemption
29
- described next.
30
-
31
- ## 2. The usage-counter exemption (the narrow fix)
32
-
33
- Model token counts are named `inputTokens`, `totalTokens`, `reasoningTokens`, …
34
- Every one of those names contains `token`, so before this contract they were all
35
- masked and a job record reported nothing about what the run consumed. The
36
- exemption restores exactly that, and nothing more.
37
-
38
- `isUsageCounter(key, value)` is true when **both** hold:
39
-
40
- 1. `key` is one of these exact names:
41
-
42
- ```
43
- inputTokens input_tokens
44
- outputTokens output_tokens
45
- totalTokens total_tokens
46
- reasoningTokens reasoning_tokens
47
- cacheTokens cache_tokens
48
- cacheReadTokens cache_read_tokens
49
- cacheWriteTokens cache_write_tokens
50
- ```
51
-
52
- (`TokenUsage` in `@deepseek-ai/dsh-llm` uses the camel forms; the snake forms
53
- cover OpenAI-compatible wire payloads. Both spellings are listed for the same
54
- seven counters.)
55
-
56
- 2. `value` is `typeof 'number'`, `Number.isFinite(value)` and `value >= 0`.
57
-
58
- ### Why this is an allow-list and not a `*Tokens` suffix rule
59
-
60
- A suffix rule would exempt `refreshTokens`, `approvalTokens` and every credential
61
- field that will ever end in those letters — a permanent hole for the sake of one
62
- counter family. The allow-list keeps the hole to the names actually read from a
63
- model response, and leaves every future unknown name masked by default. That is
64
- the safe direction for a mistake to point.
65
-
66
- ### Why the value type matters
67
-
68
- A counter name proves nothing about the value. `inputTokens: 'sk-abc…'` is a
69
- credential that happens to sit under a counter name, and
70
- `inputTokens: { raw: 'sk-abc…' }` is a nested object holding one. Neither is a
71
- count, so neither is exempt:
72
-
73
- | value | result |
74
- | --- | --- |
75
- | `12`, `0`, `1.5` | published as the number |
76
- | `-1`, `NaN`, `Infinity` | masked — not a count |
77
- | `'12'`, `'sk-abc…'` | masked — a string is never a count |
78
- | `{ raw: 12 }`, `[1, 2]`, `true` | masked |
79
- | `null` / `undefined` / `''` | passed through as `null` (no value to hide) |
80
-
81
- The empty/null case is the existing rule for all secret keys, not a new
82
- exception: an absent credential is not a credential.
83
-
84
- ## 3. Free text
85
-
86
- `redactText` is the safety net for values the plugin never intended to see. It
87
- runs over every string `redactDeep` visits, including strings inside a preserved
88
- structure:
89
-
90
- | pattern | replaced with |
91
- | --- | --- |
92
- | `Bearer <12+ token chars>` | `Bearer ••••••••` |
93
- | `sk-…` / `pk-…` / `ak-…` (16+ chars) | `••••••••` |
94
- | `SOMETHING_TOKEN=value` | `SOMETHING_TOKEN=••••••••` |
95
-
96
- A preserved usage counter is a number, so it never carries text. A counter-shaped
97
- key whose value is a string still goes through `redactText` and then is masked
98
- whole — a credential-shaped string under `total_tokens` is masked, not published.
99
-
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
139
-
140
- `maskSecret` returns the fixed `MASK` (`••••••••`) for any non-empty string, and
141
- `''` for empty input. It does not keep a prefix, a suffix or the length, because a
142
- partial mask is a partial credential.
143
-
144
- ## 6. What is *not* redacted
145
-
146
- - Numbers and booleans under names that are not secret keys.
147
- - `credentialRef` — a reference is a name, not a value; it is expected in public
148
- settings.
149
- - The mask itself, which is not a secret.
150
-
151
- Structural fields are preserved so a host can still act on them: `code`, `phase`,
152
- `outcome`, `agentId`, `sessionId` and the job's `usage` counters. Nothing in the
153
- exemption path widens what a caller can learn about a credential.
154
-
155
- ## 7. Keeping this honest
156
-
157
- `tests/redact.test.js` covers the reported bug, each known counter spelling, the
158
- suffix-rule regression (`refreshTokens` and friends must stay masked), every
159
- invalid-value shape, numeric secret token values, unknown token names, and
160
- credential-shaped strings under a counter name. `tests/config.test.js` covers the
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.
167
-
168
- Adding a counter means adding it to `USAGE_COUNTER_KEYS` *and* to the test table.
169
- Adding a name there widens the one exemption in this module, so it deserves the
170
- review that any other relaxation of a secret rule would get.
1
+ # Redaction contract: what may cross a public surface
2
+
3
+ The rule this module enforces is narrow and checkable:
4
+
5
+ > A stored secret value never leaves the module that read it. A public surface
6
+ > carries a mask at most, and a model usage count is published only when it is a
7
+ > plain finite non-negative number under a known counter name.
8
+
9
+ `src/config/redact.js` is the only component that decides this. Configuration
10
+ surfaces, job history, MCP results, review findings, audit diagnostics and logs
11
+ all funnel through it.
12
+
13
+ ---
14
+
15
+ ## 1. The secret-key rule
16
+
17
+ `isSecretKey(key)` returns true when the key matches:
18
+
19
+ ```
20
+ /(api[_-]?key|apikey|secret|token|password|passwd|credential[_-]?value|authorization)/i
21
+ ```
22
+
23
+ This is a substring test, on purpose: `RELAY_API_KEY`, `access_token`,
24
+ `dbPassword` and `client_secret` are all caught without enumerating them. It also
25
+ means the rule is coarse — it cannot tell a credential from a count that merely
26
+ spells the same word.
27
+
28
+ `redactDeep` therefore masks the value behind such a key, with one exemption
29
+ described next.
30
+
31
+ ## 2. The usage-counter exemption (the narrow fix)
32
+
33
+ Model token counts are named `inputTokens`, `totalTokens`, `reasoningTokens`, …
34
+ Every one of those names contains `token`, so before this contract they were all
35
+ masked and a job record reported nothing about what the run consumed. The
36
+ exemption restores exactly that, and nothing more.
37
+
38
+ `isUsageCounter(key, value)` is true when **both** hold:
39
+
40
+ 1. `key` is one of these exact names:
41
+
42
+ ```
43
+ inputTokens input_tokens
44
+ outputTokens output_tokens
45
+ totalTokens total_tokens
46
+ reasoningTokens reasoning_tokens
47
+ cacheTokens cache_tokens
48
+ cacheReadTokens cache_read_tokens
49
+ cacheWriteTokens cache_write_tokens
50
+ ```
51
+
52
+ (`TokenUsage` in `@deepseek-ai/dsh-llm` uses the camel forms; the snake forms
53
+ cover OpenAI-compatible wire payloads. Both spellings are listed for the same
54
+ seven counters.)
55
+
56
+ 2. `value` is `typeof 'number'`, `Number.isFinite(value)` and `value >= 0`.
57
+
58
+ ### Why this is an allow-list and not a `*Tokens` suffix rule
59
+
60
+ A suffix rule would exempt `refreshTokens`, `approvalTokens` and every credential
61
+ field that will ever end in those letters — a permanent hole for the sake of one
62
+ counter family. The allow-list keeps the hole to the names actually read from a
63
+ model response, and leaves every future unknown name masked by default. That is
64
+ the safe direction for a mistake to point.
65
+
66
+ ### Why the value type matters
67
+
68
+ A counter name proves nothing about the value. `inputTokens: 'sk-abc…'` is a
69
+ credential that happens to sit under a counter name, and
70
+ `inputTokens: { raw: 'sk-abc…' }` is a nested object holding one. Neither is a
71
+ count, so neither is exempt:
72
+
73
+ | value | result |
74
+ | --- | --- |
75
+ | `12`, `0`, `1.5` | published as the number |
76
+ | `-1`, `NaN`, `Infinity` | masked — not a count |
77
+ | `'12'`, `'sk-abc…'` | masked — a string is never a count |
78
+ | `{ raw: 12 }`, `[1, 2]`, `true` | masked |
79
+ | `null` / `undefined` / `''` | passed through as `null` (no value to hide) |
80
+
81
+ The empty/null case is the existing rule for all secret keys, not a new
82
+ exception: an absent credential is not a credential.
83
+
84
+ ## 3. Free text
85
+
86
+ `redactText` is the safety net for values the plugin never intended to see. It
87
+ runs over every string `redactDeep` visits, including strings inside a preserved
88
+ structure:
89
+
90
+ | pattern | replaced with |
91
+ | --- | --- |
92
+ | `Bearer <12+ token chars>` | `Bearer ••••••••` |
93
+ | `sk-…` / `pk-…` / `ak-…` (16+ chars) | `••••••••` |
94
+ | `SOMETHING_TOKEN=value` | `SOMETHING_TOKEN=••••••••` |
95
+
96
+ A preserved usage counter is a number, so it never carries text. A counter-shaped
97
+ key whose value is a string still goes through `redactText` and then is masked
98
+ whole — a credential-shaped string under `total_tokens` is masked, not published.
99
+
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
139
+
140
+ `maskSecret` returns the fixed `MASK` (`••••••••`) for any non-empty string, and
141
+ `''` for empty input. It does not keep a prefix, a suffix or the length, because a
142
+ partial mask is a partial credential.
143
+
144
+ ## 6. What is *not* redacted
145
+
146
+ - Numbers and booleans under names that are not secret keys.
147
+ - `credentialRef` — a reference is a name, not a value; it is expected in public
148
+ settings.
149
+ - The mask itself, which is not a secret.
150
+
151
+ Structural fields are preserved so a host can still act on them: `code`, `phase`,
152
+ `outcome`, `agentId`, `sessionId` and the job's `usage` counters. Nothing in the
153
+ exemption path widens what a caller can learn about a credential.
154
+
155
+ ## 7. Keeping this honest
156
+
157
+ `tests/redact.test.js` covers the reported bug, each known counter spelling, the
158
+ suffix-rule regression (`refreshTokens` and friends must stay masked), every
159
+ invalid-value shape, numeric secret token values, unknown token names, and
160
+ credential-shaped strings under a counter name. `tests/config.test.js` covers the
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.
167
+
168
+ Adding a counter means adding it to `USAGE_COUNTER_KEYS` *and* to the test table.
169
+ Adding a name there widens the one exemption in this module, so it deserves the
170
+ review that any other relaxation of a secret rule would get.
@@ -1,11 +1,11 @@
1
- # TaskBridge 1.7.0
2
-
3
- - 「任务记录」会自动显示新任务,保留工作标题。可按日期筛选,按执行链清理记录,也可打开任务原来的 DSH 会话。清理记录会保留源码和 DSH 会话。入口在**插件设置页的「任务记录」标签**;左侧侧栏不再有独立的「TaskBridge 任务」行。
4
- - 左侧保留 DSH 原生工作区列表(原名、顺序、搜索、会话与菜单都不变)。「工作区 → 视图选项 → 按工作区树」显示可折叠的 TaskBridge 根工作区,展开后是隔离任务工作区和对话,旁边仍可访问原有工作区。工作区菜单可移除该工作区并保留文件及会话,对话菜单可归档和取消归档。共享任务沿用原项目中的原生工作区;经 TaskBridge 派出的会话在它自己的原生行里带一个很小的标记(「派工」/「派工 · 隔离」)。
5
- - 同一项目可同时派发多个独立的隔离任务。每个工作包有自己的 DSH 会话和执行目录,各占一个并发名额。同一个共享目录一次只允许一个执行任务。
6
- - 任务实际运行满 10 分钟时,插件在本机自检一次。Codex 连续 40 分钟未收到新成果时,插件会提醒 Codex 检查。两项可分别调整或关闭,提醒不会中止任务。
7
- - 智能体协作默认关闭,可由用户设置,也可随单次派工选择。续接默认保留原会话的选择。任务的规划与交付验收由 Codex 负责。
8
- - Codex 集成可识别和升级插件托管的旧智能体文件,保留用户的自定义设置。「安装 / 更新 TaskBridge 智能体」可重新配置集成,「仅修复 MCP 配置」只处理连接。
9
-
10
- 在 DSH 的「添加插件」中安装 `dsh-taskbridge-1.7.0.tgz`。已有 TaskBridge 的用户可用本地包升级。
11
-
1
+ # TaskBridge 1.7.0
2
+
3
+ - 「任务记录」会自动显示新任务,保留工作标题。可按日期筛选,按执行链清理记录,也可打开任务原来的 DSH 会话。清理记录会保留源码和 DSH 会话。入口在**插件设置页的「任务记录」标签**;左侧侧栏不再有独立的「TaskBridge 任务」行。
4
+ - 左侧保留 DSH 原生工作区列表(原名、顺序、搜索、会话与菜单都不变)。「工作区 → 视图选项 → 按工作区树」显示可折叠的 TaskBridge 根工作区,展开后是隔离任务工作区和对话,旁边仍可访问原有工作区。工作区菜单可移除该工作区并保留文件及会话,对话菜单可归档和取消归档。共享任务沿用原项目中的原生工作区;经 TaskBridge 派出的会话在它自己的原生行里带一个很小的标记(「派工」/「派工 · 隔离」)。
5
+ - 同一项目可同时派发多个独立的隔离任务。每个工作包有自己的 DSH 会话和执行目录,各占一个并发名额。同一个共享目录一次只允许一个执行任务。
6
+ - 任务实际运行满 10 分钟时,插件在本机自检一次。Codex 连续 40 分钟未收到新成果时,插件会提醒 Codex 检查。两项可分别调整或关闭,提醒不会中止任务。
7
+ - 智能体协作默认关闭,可由用户设置,也可随单次派工选择。续接默认保留原会话的选择。任务的规划与交付验收由 Codex 负责。
8
+ - Codex 集成可识别和升级插件托管的旧智能体文件,保留用户的自定义设置。「安装 / 更新 TaskBridge 智能体」可重新配置集成,「仅修复 MCP 配置」只处理连接。
9
+
10
+ 在 DSH 的「添加插件」中安装 `dsh-taskbridge-1.7.0.tgz`。已有 TaskBridge 的用户可用本地包升级。
11
+
@@ -0,0 +1,16 @@
1
+ # TaskBridge 1.8.0
2
+
3
+ ## 核心更新
4
+
5
+ - **新增 Antigravity 一键集成**:设置页新增独立「Antigravity 集成」标签页,可将自包含插件包安装至 `~/.gemini/config/plugins/dsh-taskbridge/`(内含 `plugin.json`、按需加载的 `SKILL.md`、仅保留只读与 MCP 工具的后台派工子智能体 `agents/dsh-taskbridge.md` 与独立 `mcp_config.json`),不修改 Antigravity 全局配置。支持安装/更新、仅修复 MCP、移除托管项与 DSH 启动自动刷新;按文件哈希逐文件保护自定义修改,不影响其余托管文件升级或补装。
6
+ - **三层黑盒架构优化(Codex 端大幅瘦身)**:
7
+ - 底层 `worker-prompt.js` 自动注入“共享或脏工作区保留已有未提交修改”与“测试读取后清理新建未追踪临时日志”约束。
8
+ - 精简 `codex/dsh-taskbridge.toml`(移除顶层手管底层工作区与重复等待段落,篇幅缩减约 73%),保留完整 P0 规划、静默等待、单次审批、原生提问、派工回执核对(含 `agentTeamsOrigin` 与 `team.enabled`)、断线防重与检查点落盘纪律,并登记 `1.7.1` 原版哈希支持无感升级。
9
+ - 去除顶层规则与设置页说明中对用户可配监控阈值(自检/运行进度检查分钟数)的硬编码,全部动态跟随 DSH 插件设置。
10
+ - **润色中英文插件介绍与文档**:重写 `docs/INTRODUCTION.zh.md`、`docs/INTRODUCTION.md`、`README.md` 开头及 `locale/*.json`,新增 `docs/antigravity-integration.md`(含 Antigravity 首次调用 `delegate_*` 放行提示),统一同步 `1.7.0+` 实际监控计时口径与 2.0 Claude Code 接入规划。
11
+ - **工程细节补齐**:补全 `ANTIGRAVITY_*` / `CODEX_*` 错误码映射与中文提示,对齐客户端导出面与 `lib/client.d.ts`。
12
+
13
+ ## 安装与升级
14
+
15
+ - 可通过 DSH **插件 → 添加插件** 安装 `dsh-taskbridge`,或下载下方 `dsh-taskbridge-1.8.0.tgz` 本地安装。
16
+ - 从 `1.7.1` 升级时,DSH 启动后会自动刷新未修改过的 Codex 托管模板并保留自定义配置;如需接入 Antigravity,打开 **DSH TaskBridge 设置 → Antigravity 集成** 点击 **安装 / 更新 Antigravity 插件** 即可。
@@ -0,0 +1,24 @@
1
+ # TaskBridge 1.8.1
2
+
3
+ ## 核心更新
4
+
5
+ - **任务记录联动清理与历史孤儿扫除**:
6
+ - 设置页「任务记录」新增**快捷勾选预设**(全部可清理 / 仅已通过验收 / 仅失败·已取消·已中断)与三项按需勾选的**联动清理**能力:归档关联 DSH 派工会话、移除隔离工作树目录与临时工作区、递归清理已变空的规划父节点。
7
+ - **严格按隔离模式保护现场**:`worktree` 隔离任务可按需一并移除受管工作树与临时工作区;`shared` 共享任务绝不删除主项目源码目录与共享工作区,仅按勾选项归档对应派工会话。
8
+ - **支持清理重启中断记录**:将 `interrupted`(DSH 重启导致且永不恢复的终态历史记录)纳入可手动清理范围并归入「失败·取消·中断」快捷预设,同时打通底层 `HistoryStore.deleteMany` 原子删除。
9
+ - **一键扫除历史残留**:新增 `POST /api/dsh-delegate/tasks/cleanup-orphans` 与设置页入口,扫描并清理已删历史记录残留的孤儿隔离工作树目录、临时工作区与失效会话映射。
10
+ - **三重指挥端省 Token 优化**:
11
+ - **Antigravity 轻量后台子智能体隔离**:默认通过 `dsh-taskbridge` 子智能体(`Model: "flash"`)在后台承载预检、静默等待与常规权限审批,并仅回传结构化精简摘要,避免多轮中间载荷灌入主旗舰模型上下文;修正 YAML `tools:` 不应声明 `call_mcp_tool`(由 `mcp_config.json` 自动注入)的真机启动问题并加防回归断言。
12
+ - **Worker 原生文件工具优先**:底层 `worker-prompt.js` 明确要求读写、检索文件与日志优先使用原生工具而非 Shell(`pwsh`/`powershell`/`cmd`/`bash`),禁止未要求的外部网络请求,显著降低 Windows 沙箱内的无效审批回合。
13
+ - **MCP 载荷大幅瘦身**:全量 MCP 工具响应改为单行紧凑 JSON 序列化;`delegate_wait` / `delegate_permission_decide` / `delegate_question_answer` 在交互暂停回合剔除重复的 `task.activity`、`selfCheck`、`route`、`reviewPersistence` 监控大块(`attention` 与终态仍完整保留)。
14
+ - **共享模式工作区命名保护**:
15
+ - 仅在 `worktree` 隔离模式首次新建专属任务工作区时以 `delegate_submit.title` 命名;`shared` 共享模式首次为项目创建原生工作区时保留项目原有名称,不再被第一笔单次任务标题覆盖。
16
+ - **规则、MCP 握手契约、文档与全新架构图全面刷新**:
17
+ - 修正 MCP `initialize` 握手下发 `instructions`、`delegate_wait` 工具描述与兜底提示中的旧版 10 分钟静默口径,对齐 `1.7.0+` 实际进度检查与默认无总执行超时契约。
18
+ - 在双端规则、设置页与中英文介绍中写透“隔离与共享模式均要求已提交的 Git 仓库根目录”及非代码问答触发边界;补齐双端 `delegate_question_answer` 防重发、`confirmation: "unknown"` 复核、`interrupted` 三态区分与 `completionSummary` 分页对称性,并登记 `1.8.0` 精确升级哈希(Codex + Antigravity 均支持无感升级)。
19
+ - 替换 `v1.5.2` 旧配图为全新中英文高清多端黑盒架构图(`docs/assets/taskbridge-workflow.{zh,en}.png`),修复 `README.md` 全部 10 处断链并刷新折叠区技术参考。
20
+
21
+ ## 安装与升级
22
+
23
+ - 可通过 DSH **插件 → 添加插件** 安装或升级 `dsh-taskbridge`,或下载下方 `dsh-taskbridge-1.8.1.tgz` 本地安装。
24
+ - 从 `1.8.0` 升级时,DSH 启动后会自动刷新未修改过的 Codex 与 Antigravity 托管规则文件并保留自定义编辑;升级完成后建议重连 MCP 或重启一次 Antigravity / Codex 会话以加载新版紧凑 JSON MCP 进程与最新子智能体配置。
@@ -1,6 +1,6 @@
1
1
  # Runtime compatibility
2
2
 
3
- Build 1.7.1 retains the loading policy introduced in 1.4.2: **no DSH version whitelist**: it omits `engines.dsh`, declares
3
+ Build 1.8.1 retains the loading policy introduced in 1.4.2: **no DSH version whitelist**: it omits `engines.dsh`, declares
4
4
  host-provided `@deepseek-ai/dsh-*` peers as `*`, and publishes no DSH engine range
5
5
  in the custom plugin index. The plugin uses runtime capability checks rather than
6
6
  rejecting a host solely by its version number. Node.js `>=24` is still required.
@@ -1,28 +1,28 @@
1
- # 从 DSH Delegate/TaskDispatch 升级到 DSH TaskBridge
2
-
3
- **1.3.1 起统一使用 DSH TaskBridge,包名为 `dsh-taskbridge`,GitHub 仓库为 `ranranyya/dsh-taskbridge`。** 1.3.0 的旧包名 `dsh-taskdispatch` 只在 GitHub 发布;npm 因其与已有包名过于相似而拒绝注册。此前的 `dsh-delegate` 同样不要与 npm 上他人的包混淆。
4
-
5
- ## 升级步骤
6
-
7
- 1. 等待当前任务结束,关闭旧插件的本机调用开关。
8
- 2. 在 DSH 插件管理中停用并卸载本项目旧 `dsh-delegate` 或 `dsh-taskdispatch` 包。**保留 `<DSH_HOME>/data/dsh-delegate` 数据目录**;DSH 若提供删除数据选项,不要勾选。新旧包不能同时启用。
9
- 3. 在“添加插件”中输入 **`dsh-taskbridge`**。中国大陆镜像未同步时改选 npm 官方源。也可安装对应版本的本地包,例如 `dsh-taskbridge-1.7.1.tgz`,或添加本项目固定 Git 提交的自定义索引。不要手动修改 Desktop 保留的 profile。
10
- 4. 打开 **DSH TaskBridge** 配置页,核对 API、模型、思考强度和总开关。数据目录与旧版相同;安装前关闭旧开关,避免恢复之前保存的开启状态。
11
- 5. 在 Codex 集成中点击“安装 / 更新 TaskBridge 智能体”,更新智能体及 MCP,然后重新加载 Codex。未修改的旧 `dsh-delegate.toml` 会迁移为 `dsh-taskbridge.toml`;修改过的文件保留。只需修复 MCP 时可使用“仅修复 MCP 配置”。启动自检不会接管其他安装目录。
12
- 6. 若添加过旧索引,改用 `https://ranranyya.github.io/dsh-taskbridge/index.json`。
13
-
14
- ## 保持兼容的技术标识
15
-
16
- - 数据与端点:`<DSH_HOME>/data/dsh-delegate`、`runtime-endpoint.json`。
17
- - 环境变量:`DSH_DELEGATE_*`。
18
- - MCP 工具:`delegate_status`、`delegate_preflight`、`delegate_submit`、`delegate_wait`、`delegate_result`、`delegate_cancel`、`delegate_permission_decide`。
19
- - Codex MCP 条目:`mcp_servers.dsh-delegate`。智能体文件从 1.3.2 起改为 `agents/dsh-taskbridge.toml`,对外名称为 `dsh-taskbridge`。
20
- - MCP/控制程序:`bin/dsh-delegate-mcp.js`、`bin/dsh-delegate-control.js`。
21
-
22
- 保留的内部名称不会让安装指向其他 npm 项目。仍存在的旧包入口须证明真实文件、bin 映射及本项目仓库来源。1.3.2 的显式安装/修复也接受本插件目录旁已卸载的 `node_modules/dsh-delegate` 或 `dsh-taskdispatch` 标准入口,前提是原 MCP 配置带托管标记且结构符合插件规则。其他路径、自定义包装器和用户编辑过的智能体文件保留;启动自检不会接管搬家路径。
23
-
24
- ## 版本差异
25
-
26
- 1.2.0 完成静默等待中断语义、独立控制通道和既有 Codex 集成升级修复。1.3.0 增加中英文介绍、图标、更名兼容和自定义插件索引。1.3.1 统一为 TaskBridge 并增加 npm 安装渠道。1.3.2 将 Codex 智能体同步更名、新工作区按任务内容命名,并修复旧包卸载后的 MCP 路径迁移;不改变模型选择、等待、审批或审查流程。从 TaskBridge 1.3.1 升到 1.3.2 是同包小版本更新。
27
-
28
- 更名是包身份迁移,不能称为对旧包的普通原地更新。隔离配置目录中的迁移测试不等于已经在真实 Desktop 完成卸载、安装和重启验收。
1
+ # 从 DSH Delegate/TaskDispatch 升级到 DSH TaskBridge
2
+
3
+ **1.3.1 起统一使用 DSH TaskBridge,包名为 `dsh-taskbridge`,GitHub 仓库为 `ranranyya/dsh-taskbridge`。** 1.3.0 的旧包名 `dsh-taskdispatch` 只在 GitHub 发布;npm 因其与已有包名过于相似而拒绝注册。此前的 `dsh-delegate` 同样不要与 npm 上他人的包混淆。
4
+
5
+ ## 升级步骤
6
+
7
+ 1. 等待当前任务结束,关闭旧插件的本机调用开关。
8
+ 2. 在 DSH 插件管理中停用并卸载本项目旧 `dsh-delegate` 或 `dsh-taskdispatch` 包。**保留 `<DSH_HOME>/data/dsh-delegate` 数据目录**;DSH 若提供删除数据选项,不要勾选。新旧包不能同时启用。
9
+ 3. 在“添加插件”中输入 **`dsh-taskbridge`**。中国大陆镜像未同步时改选 npm 官方源。也可安装对应版本的本地包,例如 `dsh-taskbridge-1.8.1.tgz`,或添加本项目固定 Git 提交的自定义索引。不要手动修改 Desktop 保留的 profile。
10
+ 4. 打开 **DSH TaskBridge** 配置页,核对 API、模型、思考强度和总开关。数据目录与旧版相同;安装前关闭旧开关,避免恢复之前保存的开启状态。
11
+ 5. 在 Codex 集成中点击“安装 / 更新 TaskBridge 智能体”,更新智能体及 MCP,然后重新加载 Codex。未修改的旧 `dsh-delegate.toml` 会迁移为 `dsh-taskbridge.toml`;修改过的文件保留。只需修复 MCP 时可使用“仅修复 MCP 配置”。启动自检不会接管其他安装目录。
12
+ 6. 若添加过旧索引,改用 `https://ranranyya.github.io/dsh-taskbridge/index.json`。
13
+
14
+ ## 保持兼容的技术标识
15
+
16
+ - 数据与端点:`<DSH_HOME>/data/dsh-delegate`、`runtime-endpoint.json`。
17
+ - 环境变量:`DSH_DELEGATE_*`。
18
+ - MCP 工具:`delegate_status`、`delegate_preflight`、`delegate_submit`、`delegate_wait`、`delegate_result`、`delegate_cancel`、`delegate_permission_decide`。
19
+ - Codex MCP 条目:`mcp_servers.dsh-delegate`。智能体文件从 1.3.2 起改为 `agents/dsh-taskbridge.toml`,对外名称为 `dsh-taskbridge`。
20
+ - MCP/控制程序:`bin/dsh-delegate-mcp.js`、`bin/dsh-delegate-control.js`。
21
+
22
+ 保留的内部名称不会让安装指向其他 npm 项目。仍存在的旧包入口须证明真实文件、bin 映射及本项目仓库来源。1.3.2 的显式安装/修复也接受本插件目录旁已卸载的 `node_modules/dsh-delegate` 或 `dsh-taskdispatch` 标准入口,前提是原 MCP 配置带托管标记且结构符合插件规则。其他路径、自定义包装器和用户编辑过的智能体文件保留;启动自检不会接管搬家路径。
23
+
24
+ ## 版本差异
25
+
26
+ 1.2.0 完成静默等待中断语义、独立控制通道和既有 Codex 集成升级修复。1.3.0 增加中英文介绍、图标、更名兼容和自定义插件索引。1.3.1 统一为 TaskBridge 并增加 npm 安装渠道。1.3.2 将 Codex 智能体同步更名、新工作区按任务内容命名,并修复旧包卸载后的 MCP 路径迁移;不改变模型选择、等待、审批或审查流程。从 TaskBridge 1.3.1 升到 1.3.2 是同包小版本更新。
27
+
28
+ 更名是包身份迁移,不能称为对旧包的普通原地更新。隔离配置目录中的迁移测试不等于已经在真实 Desktop 完成卸载、安装和重启验收。