dsh-taskbridge 0.0.0-stage → 1.3.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 (74) hide show
  1. package/CHANGELOG.md +754 -0
  2. package/LICENSE +21 -0
  3. package/README.md +624 -3
  4. package/bin/dsh-delegate-codex-agent.js +115 -0
  5. package/bin/dsh-delegate-control.d.ts +90 -0
  6. package/bin/dsh-delegate-control.js +450 -0
  7. package/bin/dsh-delegate-mcp.d.ts +121 -0
  8. package/bin/dsh-delegate-mcp.js +273 -0
  9. package/codex/dsh-delegate.toml +245 -0
  10. package/cordis.patch.yml +6 -0
  11. package/docs/INTRODUCTION.md +15 -0
  12. package/docs/INTRODUCTION.zh.md +32 -0
  13. package/docs/auth-contract.md +138 -0
  14. package/docs/claude-code.md +31 -0
  15. package/docs/codex-integration.md +922 -0
  16. package/docs/contracts-stage-b.md +443 -0
  17. package/docs/conversation-placement.md +293 -0
  18. package/docs/plugin-market.md +30 -0
  19. package/docs/redaction-contract.md +127 -0
  20. package/docs/runtime-compatibility.md +220 -0
  21. package/docs/silent-wait.md +191 -0
  22. package/docs/taskbridge-upgrade.md +28 -0
  23. package/docs/taskdispatch-upgrade.md +25 -0
  24. package/docs/worker-permissions.md +347 -0
  25. package/docs/workspace-contract.md +538 -0
  26. package/icon.svg +1 -0
  27. package/lib/client.d.ts +118 -0
  28. package/lib/client.js +3232 -0
  29. package/locale/en.json +7 -0
  30. package/locale/zh.json +7 -0
  31. package/package.json +135 -4
  32. package/src/auth/fence.js +361 -0
  33. package/src/auth/grants.js +789 -0
  34. package/src/client/api.js +2322 -0
  35. package/src/client/index.jsx +2333 -0
  36. package/src/client/styles.js +251 -0
  37. package/src/codex/installer.js +3260 -0
  38. package/src/codex/seam.js +429 -0
  39. package/src/codex/toml.js +784 -0
  40. package/src/config/defaults.js +164 -0
  41. package/src/config/redact.js +184 -0
  42. package/src/config/settings.js +629 -0
  43. package/src/config/store.js +186 -0
  44. package/src/config/validate.js +763 -0
  45. package/src/credentials/seam.js +202 -0
  46. package/src/http/execution-plane.js +454 -0
  47. package/src/http/respond.js +175 -0
  48. package/src/http/user-plane.js +1122 -0
  49. package/src/index.d.ts +332 -0
  50. package/src/index.js +657 -0
  51. package/src/jobs/activity.js +1008 -0
  52. package/src/jobs/engine.js +3609 -0
  53. package/src/jobs/history.js +1467 -0
  54. package/src/mcp/server.js +1820 -0
  55. package/src/mcp/wait.js +536 -0
  56. package/src/model/connectivity.js +371 -0
  57. package/src/model/discovery.js +582 -0
  58. package/src/model/native-catalog.js +68 -0
  59. package/src/model/openai-adapter.js +671 -0
  60. package/src/model/probe.js +264 -0
  61. package/src/model/providers.js +756 -0
  62. package/src/model/routing.js +321 -0
  63. package/src/review/preset.js +868 -0
  64. package/src/review/prompts.js +126 -0
  65. package/src/review/reviewer.js +933 -0
  66. package/src/runtime/agent-runner.js +1738 -0
  67. package/src/runtime/endpoint-discovery.js +118 -0
  68. package/src/runtime/permissions.js +1429 -0
  69. package/src/runtime/sandbox.js +358 -0
  70. package/src/runtime/session-placement.js +1103 -0
  71. package/src/workspace/audit.js +775 -0
  72. package/src/workspace/locks.js +167 -0
  73. package/src/workspace/preflight.js +424 -0
  74. package/src/workspace/worktrees.js +613 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,754 @@
1
+ # Changelog
2
+
3
+ ## 1.3.1 — DSH TaskBridge identity and npm distribution
4
+
5
+ - Unify the project, GitHub repository, plugin title, package and bundle identity as **DSH TaskBridge** / `dsh-taskbridge`. The previous GitHub-only `dsh-taskdispatch` name was rejected by npm's similarity protection; it never became an npm package.
6
+ - Add npm installation instructions alongside the pinned-Git custom plugin index. Keep the 1.3.0 release and tag intact; use a new patch release for the different package identity.
7
+ - Retain existing task data, `delegate_*` tools, CLI names and managed Codex identifiers. Recognize the exact published 1.3.0 agent template and this project's historical repository identities during explicit migration.
8
+ - Update bilingual introductions and migration guidance. Execution, wait, permission and review behavior remains the same as 1.2.0; this release changes identity, distribution and compatibility metadata.
9
+ - Forward the control CLI's injected test dependencies into `runControl`; the entry-point refusal test now stays isolated from the operator's actual harness instead of accidentally depending on its response. Default CLI behavior is unchanged.
10
+
11
+ ## 1.3.0 — DSH TaskDispatch identity and public plugin index
12
+
13
+ - Public package/bundle identity changes from `dsh-delegate` to `dsh-taskdispatch`; the display title is **DSH TaskDispatch**. Existing data paths, endpoint discovery, environment variables, MCP `delegate_*` tools, binaries and the managed Codex agent/server identifiers remain stable.
14
+ - Add English/Chinese plugin metadata, an SVG icon, a Chinese product introduction and manual Claude Code MCP instructions. The intro emphasizes configuring DSH's already-connected APIs, models and supported reasoning effort. No new context-window selector or Claude one-click installer is claimed.
15
+ - Enumerate the exact published 1.2.0 agent-template bytes so existing managed integrations remain refreshable. Explicit moved-install adoption requires this project's old/new repository provenance as well as real files and the exact bin mapping; an unrelated same-name npm package is refused.
16
+ - Add a dependency-free, exact-commit format-1 DSH plugin-index generator and an official-actions GitHub Pages deployment workflow. Search requires adding the project's custom index; this does not claim universal official marketplace inclusion or npm publication.
17
+ - Package identity migration requires stopping/uninstalling the old bundle while retaining plugin data, then installing the new bundle and explicitly repairing the managed Codex entry. Do not activate both bundles at once. Full real Desktop migration/restart and real Claude Code acceptance remain separate checks.
18
+
19
+ ## 1.2.0 — waiting that cannot be mistaken for completion, and an independent control channel
20
+
21
+ Fixes the three problems the 1.1.0 real acceptance run reported: an `interrupted`
22
+ observation no longer claims the execution stopped, a local control channel serves
23
+ `status`/`cancel` while a host is blocked in a wait, and an already-installed managed Codex
24
+ integration upgrades itself. The operator's formally installed Desktop profile is still on
25
+ `1.1.0`; this change does not install `1.2.0` there. The complete Desktop upgrade/restart
26
+ acceptance and the actual token-saving ratio have not been measured; candidate-channel
27
+ acceptance evidence belongs in the Release notes.
28
+
29
+ ### `interrupted` no longer claims the execution stopped
30
+
31
+ - The engine reports `interrupted` when an OBSERVER's own request ends — the caller's
32
+ signal aborted, the connection dropped, the engine released the waiter during teardown.
33
+ `delegate_wait` treated that as a terminal answer, so a host was told a healthy run had
34
+ ended.
35
+ - The wait now decides from the TASK RECORD, not from the reason label
36
+ (`classifyInterruption` / `resolveInterruption` in `src/mcp/wait.js`), and answers
37
+ ONCE per observation:
38
+ - `state` `pending`/`running` with no `endedAt` → the observation ended, the task did
39
+ not. The answer is `reason: "interrupted"`, `terminal: false`, the REAL task state,
40
+ and an instruction to wait again on the SAME `taskId`. The call does NOT re-issue
41
+ an observation internally: a disposed observer answers `interrupted` to every
42
+ request, so looping made one `delegate_wait` an unbounded request storm.
43
+ - `state: "interrupted"` (a restart history this build never writes for a live run) →
44
+ terminal, with an instruction to stop blind waiting and read `delegate_result`.
45
+ - a settled state carried by an `interrupted` observation → the REAL outcome:
46
+ `awaiting-host-review` is `ready` (so a finished run still reaches review),
47
+ `failed`/`cancelled` report themselves.
48
+ - a missing or UNRECOGNIZED state → nothing is asserted (`terminal: false`); an unknown
49
+ state string is never treated as a restart history, and neither "stopped" nor "still
50
+ running" is claimed.
51
+ - `ready` never invents `state: "ready"`: with no task record the state is `null`.
52
+ - The task panel shows a real `interrupted` history as 「已中断(进程重启后不会继续执行)」 —
53
+ never as "still running".
54
+
55
+ ### An independent local control channel
56
+
57
+ - The plugin's own stdio MCP transport already serves concurrent requests; a serialising
58
+ HOST is what blocks a session behind one long `delegate_wait`.
59
+ - New `dsh-delegate-control` binary (`bin/dsh-delegate-control.js`, registered in `bin`):
60
+ `status <taskId>` (one bounded `observe` with `waitMs: STATUS_WAIT_MS`, i.e. 1 ms —
61
+ the smallest positive bound the engine and the monitor both keep — compact JSON) and
62
+ `cancel <taskId>` (stops exactly that task). Both use the existing
63
+ `createExecutionClient` and endpoint discovery against the existing loopback plane.
64
+ - `status` used to send `waitMs: 0`. The HTTP route accepts 0, but the engine
65
+ (`clampObserveWait`) and the monitor (`boundedWait`) both read a non-positive wait as
66
+ "no bound requested" and substitute their 25 s default. Against a real running plane
67
+ that made one status read last 25 s, past the command's own 10 s budget, and the
68
+ observation retry then extended the command further — observed as an independent
69
+ `status` timeout during the 1.2.0 candidate acceptance. The wait is now the smallest
70
+ POSITIVE value, and the mock-only assertion on the request payload is replaced by
71
+ tests that pin the real behaviour (see Tests).
72
+ - One whole-command budget now bounds everything: 10 s by default,
73
+ `DSH_DELEGATE_CONTROL_TIMEOUT_MS` may only lower it, and a config with no usable
74
+ `timeoutMs` still gets the 10 s default. It is enforced through a single caller
75
+ `AbortSignal` composed with the request timeout, plus `{ retry: false }` on this call —
76
+ the observation retry (1 s/2 s/5 s) is disabled for the control command so a dead or
77
+ slow endpoint cannot outlive the budget or leave a request running after the answer.
78
+ There is no `Promise.race` and no background request or process.
79
+ - Any disconnect or timeout is a bounded JSON document and a non-zero exit
80
+ (`CONTROL_TIMEOUT` for an exhausted budget), with no stack trace and no secrets.
81
+ - No submit, no settings, no switch, no grant, no batch cancel, no daemon, no new endpoint,
82
+ permission or configuration surface. Stable JSON on stdout, diagnostics on stderr,
83
+ exit code 0/1/2 for answered/refused-or-timed-out/usage.
84
+ - The default MCP behaviour is unchanged: `delegate_wait` keeps its bounded retry, which
85
+ is what lets a wait survive a DSH restart onto a new port. A normal wait never polls
86
+ the control binary.
87
+ - A wait listener that goes away releases only that observation: cancellation is always an
88
+ explicit `cancel`.
89
+ - The Codex companion gains one narrow rule: when the operator asks to stop or inspect the
90
+ task AND the host is blocking the same MCP connection, it may run this binary from the
91
+ same package directory as the configured MCP script. It may not call any other script,
92
+ resubmit, or switch models, and during a normal wait it stays silent.
93
+ - Tool catalog now carries accurate MCP `annotations` (`readOnlyHint`, `destructiveHint`,
94
+ `idempotentHint`, `openWorldHint`). They help a concurrency-aware client; they are not a
95
+ fix for a serialising one, and nothing claims they are.
96
+
97
+ ### Installed Codex integrations now upgrade themselves
98
+
99
+ - Plugin startup used to refresh only the agent file, so an MCP table installed by an
100
+ earlier release stayed without `tool_timeout_sec = 3660`. A client may still end a wait
101
+ earlier through its own default tool timeout (Codex's historical default is one minute);
102
+ the managed entry now requests 3660 s, which a client that honours the field can grant,
103
+ while a client-side cap that ignores it remains a client limit this plugin cannot lift.
104
+ - The startup check now also upgrades an ALREADY INSTALLED `mcp_servers.dsh-delegate` entry,
105
+ and writes only what it can PROVE is its own: the marker comment, exactly this package's
106
+ Node command, exactly ONE argument that is this installation's exact entry point
107
+ (`isOwnedStaleEntry` / `isOwnedEntryScript`), and no foreign env key. A wrapper that
108
+ reuses the marker, the command or even the file name is a `conflict` and is never
109
+ rewritten; a differing arg count is a conflict too.
110
+ - Accepted migrations: an exact `args` match with only `tool_timeout_sec` missing (the core
111
+ upgrade), and — by an EXPLICIT `install`/`repair` only — a different path that is proved to
112
+ be a real installation of this package: real root/bin/entry objects, a manifest whose
113
+ `name` is this package AND whose `bin["dsh-delegate-mcp"]` maps that entry (a `./` prefix
114
+ is allowed; absolute, out-of-package, wrong or missing mappings are refused). The
115
+ automatic startup check never adopts a moved path; it reports `conflict` and points at the
116
+ button. The owned timeout and a proved moved entry script migrate in ONE write.
117
+ - The plan records a SHA-256 of the whole `config.toml` and the write re-reads the file and
118
+ requires that digest to match — for the automatic migration AND for the explicit
119
+ moved-install adoption, which re-proves the boundary, the digest and the current entry
120
+ immediately before writing. A re-classification alone was NOT enough: a concurrent edit to
121
+ an owned value still looks stale-and-managed, so it is now refused (`config-changed`) and
122
+ the file is kept. The boundary (`$CODEX_HOME`, `agents/`) is re-inspected immediately
123
+ before the write as well, and the pre-write document is copied to the plugin data
124
+ directory (never into the package, never into the Codex home). The backup destination's
125
+ ENTIRE ancestor chain is proved to be real directories — a link/junction above the backup
126
+ directory refuses the upgrade, and missing levels are created one at a time and
127
+ re-inspected.
128
+ - It never creates the entry, never adopts an unmarked or operator-edited entry, never
129
+ follows a symlink/junction at `$CODEX_HOME` or `agents/` — the MCP half is now not even
130
+ REPORTED by reading through a link — and never touches another MCP table or setting.
131
+ - The startup target is the SEAM's decision, not a second read of `process.env`: an explicit
132
+ `CODEX_HOME` first, then the home a successful explicit install recorded in the plugin data
133
+ directory, then the default only when it is a real directory. A default that is a link is
134
+ reported (`default-is-link`) instead of walked, and a first run with no Codex home creates
135
+ nothing.
136
+ - The 1.0.0 and 1.1.0 companions are enumerated by exact SHA-256 in both byte forms (CRLF and
137
+ LF), taken from their RELEASE commits (`git show 2750047:…`, `git show 2d71708:…`) and kept as
138
+ test fixtures, so an existing installation upgrades instead of being reported as somebody
139
+ else's file. The explicit 安装 / 更新 button stays, and the status document now reports
140
+ `mcp.drift` (which owned facts are stale) and a per-fact note.
141
+
142
+ ### Tests
143
+
144
+ - `tests/mcp-wait.test.js`: the case that only proved one heartbeat is now a full
145
+ 1,200,000 ms simulation — 48 bounded 25-second observations, 47 heartbeats, ONE return,
146
+ no heartbeat/diff/execution text in the answer. The interruption cases assert the
147
+ single-observation contract: ONE observe per live interruption, a non-terminal answer on
148
+ the same `taskId`, a terminal restart history, a settled record reported as `ready`/
149
+ `failed`/`cancelled`, an UNKNOWN state asserted neither way, and no invented
150
+ `state: "ready"`. Plus a listener-cancellation case that proves no task cancel is issued.
151
+ - `tests/control-cli.test.js`: the command contract, its refusals and exit codes, the
152
+ lower-only request bound, bounded nested output, and — through REAL, asynchronously spawned
153
+ `node dsh-delegate-control.js` child processes while the parent holds an HTTP plane and a
154
+ parked MCP wait — that `status` and `cancel` both arrive before the wait ends and cancel
155
+ exactly the named task. A bad environment, a missing discovery file and a dead endpoint
156
+ are each bounded JSON refusals with a non-zero exit. The `status` case now pins the
157
+ defect it exists for with the REAL serving side — a `JobEngine` running a real task over a
158
+ real temporary workspace with its own `TaskMonitor`, behind the real
159
+ `createExecutionHandler` on a loopback HTTP server (only the native services every engine
160
+ test fakes are faked; the task really stays `running` because its prompt never finishes):
161
+ a separate `node dsh-delegate-control.js` child must report that running task inside its
162
+ own budget while the parent's `delegate_wait` is still parked, and a second child must
163
+ cancel the SAME task so the parked wait then returns `cancelled`. Because the engine's
164
+ own `clampObserveWait` and the monitor's own `boundedWait` decide the wait, a `status`
165
+ that sent `waitMs: 0` again would be parked for their real 25 s fallback and fail the
166
+ child's 10 s budget with `CONTROL_TIMEOUT` — the failure observed on the live plane. The
167
+ request is asserted to carry `waitMs: 1` and `{ retry: false }`; and separate cases
168
+ cover the whole-command budget (`CONTROL_TIMEOUT`), a missing/unusable config timeout,
169
+ and refusals thrown with unusual error shapes.
170
+ - `tests/mcp.test.js`: a caller's `{ retry: false }` makes exactly one `observe` attempt
171
+ with no backoff, while no context, `{}` and `{ retry: true }` all keep the documented
172
+ 1 s/2 s/5 s schedule — the MCP wait's restart-following behaviour is unchanged.
173
+ - `tests/codex-integration.test.js`: the write gate (wrapper refused, extra args refused, the
174
+ core missing-timeout case accepted), an end-to-end startup run that never rewrites a
175
+ wrapper, the DETERMINISTIC check-then-write race (the config changes after the plan; the
176
+ digest comparison refuses and the edit survives), the same race between the explicit
177
+ moved-install proof and its write, the boundary re-check (including a link appearing after
178
+ the proof), the backup (including a linked ANCESTOR and a non-directory ancestor, plus
179
+ missing levels that must be created), the seam-resolved startup target (explicit /
180
+ recorded / real default / linked default / none), the moved-install proof matrix (real
181
+ manifest + `bin` mapping accepted; missing, wrong, absolute, out-of-package and trailing-
182
+ slash mappings refused; POSIX package root preserved), and the real 1.0.0 and 1.1.0
183
+ fixture upgrades (packed and LF, unchanged and edited).
184
+ Both guards are mutation-tested: disabling the digest check or the ownership rule makes
185
+ these tests fail.
186
+
187
+ ### Known limits
188
+
189
+ - The operator's formally installed Desktop profile is still on `1.1.0`; `1.2.0` was not
190
+ installed there by this change. The complete Desktop upgrade/restart acceptance and the
191
+ actual token-saving ratio have not been measured; the candidate MCP/CLI channel is
192
+ exercised against the currently running plane before release, and that evidence belongs
193
+ in the Release notes rather than being pre-filled here.
194
+ - The control channel's behaviour against a specifically serialising host was not observed
195
+ live; the tests use a mock plane and a real stdio fixture.
196
+ - Annotations do not make a serialising client concurrent.
197
+ - `tool_timeout_sec` is a request to the client. A client that ignores it (or applies its
198
+ own default tool timeout) can still end a wait early; the plugin cannot prove otherwise
199
+ for every client.
200
+ - The 1.1.0 published agent bytes are enumerated as packed (CRLF) and as LF; any other byte
201
+ form of that release is not claimed to be refreshable.
202
+
203
+ ## 1.1.0 — silent waiting and concentrated host review
204
+
205
+ Candidate feature release. Ships the monitoring foundation, the browser settings and task
206
+ panels, the Codex companion's wait-based dispatch rules and the managed Codex config
207
+ migration. It is **not** published and **not** installed by this change.
208
+
209
+ The transport that actually returns `delegate_wait` results (HTTP execution-plane and MCP
210
+ tool) lands in the same release but a separate change; until both are present, the
211
+ companion's new rules describe the contract the tool will honour, and the legacy
212
+ `delegate_result` polling path still works.
213
+
214
+ ### Waiting no longer means polling
215
+
216
+ - New global setting `monitoring = { selfCheckSeconds: 300, attentionSeconds: 600 }`,
217
+ stored as whole seconds, validated (self-check 30–3600, attention greater than the
218
+ self-check and at most 7200). Missing blocks use the defaults, so an existing
219
+ document keeps loading unchanged.
220
+ - A running task now reports bounded activity metadata: last activity time, how long it
221
+ has been idle, the current tool call and how long it has run, event counters, and the
222
+ last self-check verdict. It carries **no** transcript, reasoning, tool arguments or
223
+ diff, so a task view can show progress without becoming a second transcript.
224
+ - At the self-check interval the engine performs one read-only local inspection of the
225
+ executor it already holds (alive, phase, pending permission, current tool). No model
226
+ call, no workspace read, no state change, no deadline change.
227
+ - At the attention interval it reports `attention` instead of staying silent. Idle time
228
+ is the only trigger: a single long tool call is not proof of progress, and nothing is
229
+ failed, cancelled or restarted for duration alone.
230
+ - Real progress resets the silence and stays internal, so a healthy run never wakes the
231
+ dispatcher. Connection heartbeats, result polling and page refreshes never reset it.
232
+ - Attention reports are delivered once per silence and then cooled down; concurrent
233
+ observers cannot both deliver the same one.
234
+
235
+ ### Settings page
236
+
237
+ - New advanced monitoring controls in the existing execution panel: 5 and 10 minutes by
238
+ default, shown in minutes, stored as integer seconds, with local validation and a
239
+ narrow "save monitoring only" action. A general settings save persists them too.
240
+ - The page states the behaviour it relies on: the checks are local, no LLM is called,
241
+ no-progress is not failure, and changes apply to newly submitted tasks only.
242
+ - New authenticated route `POST /api/dsh-delegate/monitoring`. It is a browser-plane
243
+ operator action; the MCP surface still has no settings write.
244
+
245
+ ### Task records
246
+
247
+ - Task rows and the detail view show the phase, the last activity, the current tool and
248
+ its elapsed time, and the no-progress diagnostic in plain Chinese. A record written
249
+ before this feature says "no progress information was collected" instead of inventing
250
+ an idle time.
251
+ - The task tab refreshes itself every 5 seconds **only** while it is visible and at least
252
+ one task is still pending or running. It skips a hidden document, never overlaps a
253
+ request, cleans up its timer on tab change and unmount, and never reads or writes
254
+ settings. Terminal tasks stop the refresh.
255
+ - No completion percentage is estimated or displayed.
256
+
257
+ ### Codex companion
258
+
259
+ - Dispatch is now submit → `delegate_wait` on the same task id, repeated until a reason
260
+ is actionable. `heartbeat` is internal and never reaches the model.
261
+ - Each reason has a stated policy: `attention` is a question and the default answer is to
262
+ keep waiting; `permission` is a decision on one call followed by waiting the same task;
263
+ `ready`/`failed`/`cancelled` read `delegate_result` once for full evidence;
264
+ `interrupted` and `wait-limit` immediately re-wait the same task.
265
+ - Corrections are consolidated into a follow-up `continueFromTaskId` submission using the
266
+ same authorized source path.
267
+ - Explicitly forbids the parent commander and the dispatch companion from implementing
268
+ locally while a delegated worker runs, except for an explicit user-authorized takeover.
269
+
270
+ ### Managed Codex config
271
+
272
+ - The managed `[mcp_servers.dsh-delegate]` entry now carries `tool_timeout_sec = 3660`,
273
+ so a default 60-minute wait can complete. The value is written on this entry only.
274
+ - A managed entry from an earlier release without the field is repaired in place, and
275
+ unrelated configuration is preserved byte for byte. An unmarked or differently shaped
276
+ same-name entry is still treated as operator-owned and never overwritten.
277
+ - The published 1.0.0 companion is enumerated by exact SHA-256 (CRLF and LF byte forms),
278
+ so an existing 1.0.0 installation updates through the settings page instead of being
279
+ reported as somebody else's file.
280
+
281
+ ### Known limits
282
+
283
+ - This release does not promise zero model tokens or a measured token saving. It changes
284
+ what a dispatcher is told and when.
285
+ - Wait-return counts and timing metrics come from the transport change, not from this one.
286
+
287
+ ## 1.0.0 — first formal release
288
+
289
+ The first public major release of `dsh-delegate`. It is distributed from the GitHub
290
+ Release as `dsh-delegate-1.0.0.tgz`.
291
+
292
+ - Adds the commander-mediated, per-call permission decision tool while keeping the
293
+ local switch as the single enable/disable control.
294
+ - Publishes the Codex companion migration for existing managed `0.1.14` installations.
295
+ - Includes workspace isolation, continuation placement, model/provider selection,
296
+ optional read-only review, Codex integration, and the documented fail-closed runtime
297
+ checks.
298
+ - Production Desktop provider execution, sandbox commands, and permission-resume flows
299
+ remain explicitly marked as unverified where the compatibility documents say so.
300
+
301
+ ## 0.1.14 — local build (candidate package, not a public release)
302
+
303
+ Per-call, commander-mediated approval for delegated worker runs, plus the release
304
+ packaging that was deferred from the core batch. The package is built and packed locally
305
+ as `dsh-delegate-0.1.14.tgz` for review; it is **not** published to npm and it is **not**
306
+ installed on the production Desktop profile.
307
+
308
+ ### Status: what is and is not proven
309
+
310
+ - **Proven by tests in this repository:** the bridge, its refusals, its redaction, its
311
+ deadlines, the durable evidence and the MCP projection all pass their own suites, and
312
+ the archived manifest contains the updated native module, the sixth MCP tool, the current
313
+ client bundle, the managed Codex companion and the docs.
314
+ - **NOT yet proven: production acceptance.** The `0.1.13` build currently installed on the
315
+ production Desktop profile must be upgraded through the Desktop plugin manager, and the
316
+ MCP server must be reconnected (or a new session started) before the sixth tool
317
+ `delegate_permission_decide` is visible to a host. Until a real end-to-end
318
+ provider → commander → resume run has been observed on that profile, the production
319
+ feature is **unverified**. A passing unit-test count, and any mock or scripted stand-in,
320
+ is **not** that test and must not be reported as one.
321
+
322
+ ### The worker can now ask for wider access for ONE call, and only the commander answers
323
+
324
+ Every delegated worker run previously installed `approval/policy: "never"`, because the
325
+ plugin had no way to answer a native approval prompt: an escalation was refused
326
+ deterministically. That is still the default. What is added is one narrow, armed path:
327
+
328
+ - A new module `src/runtime/permissions.js` holds the bridge. While the commander follows
329
+ a task, a native DSH approval request (`ctx.on('approval/request', …)` on that Agent's
330
+ own scope) **pauses exactly that tool call**, and the request is exposed through the
331
+ existing `delegate_result` view as `permission.pending`.
332
+ - The real operation is read from the **native Session log**: the committed `tool/call`
333
+ event is matched by `callId` and its model-produced `arguments` JSON is parsed. The
334
+ asker's own `reason` prose is carried beside it labelled `reasonSource: "asker-claim"`
335
+ and is never treated as the operation.
336
+ - A new bounded MCP tool `delegate_permission_decide` (route
337
+ `POST /dsh-delegate/x/tasks/permission`) answers `allow-once` or `reject`. It refuses an
338
+ unknown task, another connection's task, an unknown or already-settled request, a
339
+ request past its deadline, and a fingerprint that does not match the pending operation.
340
+ - The approval stance is `ask` **only** when the run carries an armed bridge bound to the
341
+ Agent it drives; otherwise it stays `never`. Both are written and **read back** through
342
+ `ctx.approval.effectivePolicy(session)`, so an `ask` nobody services is never installed.
343
+ A bridge that cannot be armed refuses the run before the prompt with
344
+ `RUN_PERMISSION_BRIDGE_UNAVAILABLE`.
345
+ - The standing sandbox mode stays `workspace-write` for the whole run; no decision writes
346
+ `danger-full-access` into a Session, and a grant is `appliesTo: this-call-only`,
347
+ `reusable: false`.
348
+
349
+ ### State, lifetimes and evidence
350
+
351
+ - Task state semantics are unchanged: a waiting task is still `running`, with phase
352
+ `awaiting-permission` and a `permission` block. It is neither failed nor
353
+ execution-complete, and it keeps its workspace lock, concurrency slot and provider
354
+ lease until the native executor actually settles.
355
+ - The approval wait has its **own** fixed, bounded deadline (default 10 minutes, capped at
356
+ 30) and is NOT charged to `worker.timeoutSeconds`; `permission.pausedExecutionMs`
357
+ reports the time actually spent waiting.
358
+ - Cancellation, switch-off, revocation, agent disposal, plugin teardown and that deadline
359
+ all settle the outstanding waiter and release the request's timer and abort listener.
360
+ A restart begins with no tasks, no bridge and no request, so an interrupted request can
361
+ never be replayed as an allow.
362
+ - The settled trail is bounded (last 8) and every published string is redacted and
363
+ truncated; the exact private fingerprint still binds the decision.
364
+
365
+ ### UI, docs and contracts
366
+
367
+ - The task panel shows, in plain Chinese, that a task is waiting on one call, the
368
+ redacted arguments, the worker's claimed reason (labelled as a claim), the deadline and
369
+ the decision trail. It offers **no** manual approve button: the decision belongs to the
370
+ commander over MCP.
371
+ - `SPEC.md` states the narrow exception to the "MCP cannot widen a grant" rule, including
372
+ what the tool cannot do. `docs/worker-permissions.md`, `docs/auth-contract.md`,
373
+ `docs/runtime-compatibility.md` and `README.md` are updated to match, and the
374
+ same-local-user threat-model limitation is stated rather than glossed over.
375
+ - `tests/permissions.test.js` covers the bridge against the installed native
376
+ `ApprovalService`: locating the real call, the `ask`/`never` stance split, allow-once
377
+ resuming one call exactly once and the next escalation asking again, reject, expiry,
378
+ fingerprint substitution, redaction, cancellation, disposal, foreign requests, the
379
+ engine's phase/slot behaviour, cross-owner and post-terminal refusals, restart, and the
380
+ plane route's validation and switch gate.
381
+
382
+ ### Repair round: independent review R1–R9
383
+
384
+ The provisional review found that several claims were not backed by behaviour. Each is now
385
+ a checked fact with a regression test:
386
+
387
+ - **R1 (live re-verification).** A decision no longer trusts the copy captured at ask time.
388
+ An `allow-once` re-reads the `tool/call` at its recorded Session offset and requires
389
+ byte-identical arguments, the same `callId`, the same tool name, and a turn that is still
390
+ OPEN. A mutated record, a missing record and a closed turn are all
391
+ `PERMISSION_REQUEST_CHANGED`. (The turn check had to scan from the END of the log — a scan
392
+ starting at the call would stop at the `turn/start` behind it and never see a later close.)
393
+ - **R2 (key-aware redaction).** A key whose NAME holds a credential has its whole value
394
+ masked, so `{"apiKey":"…"}` can no longer be published verbatim; the module's default
395
+ redaction now also mirrors the production `NAME=value` / bearer patterns so a bridge built
396
+ without injection is not weaker. Applied to the pending view, the decision reason and the
397
+ stored trail.
398
+ - **R3 (completeness gates an allow).** Every bound that fires is counted, and the request
399
+ publishes `completeness` / `argumentsComplete` / `boundsApplied` / `omitted` /
400
+ `allowBlocked`. An `allow-once` on a shortened operation (a `bash.command` whose tail was
401
+ cut) is refused with `PERMISSION_EVIDENCE_INCOMPLETE`; `reject` stays available because
402
+ refusing is always safe.
403
+ - **R4 (exact Agent identity).** `owns()` now requires the exact bound live Agent object and
404
+ rejects a request with no Agent at all — the previous `agent ?? null` check made a missing
405
+ agent match every bridge.
406
+ - **R5 (honest wording).** "The worker cannot self-approve" is restated as a **tool-surface
407
+ restriction**, explicitly NOT a hard boundary against arbitrary same-OS-user code; the
408
+ shared `local-mcp` identity and the absence of a user-managed token are stated, and no
409
+ claim rests on a caller-supplied role label.
410
+ - **R6 (the execution deadline really pauses).** The single `setTimeout` is replaced by
411
+ `ExecutionDeadline`: a wait clears the timer and charges the elapsed span, resume re-arms
412
+ only what is left, and repeated waits accumulate. A regression drives a REAL native
413
+ approval wait of 220 ms inside a run whose budget is 40 ms and proves the run is not
414
+ reported `timed_out`.
415
+ - **R7 (durable evidence).** `HistoryStore.projectView` now stores a bounded, re-redacted
416
+ `permission` block. A restart rewrites a stored pending request as
417
+ `unavailable` / `decidedBy: "restart"` history; the private fingerprint and exact argument
418
+ text are never stored, so a record cannot be replayed into an allow.
419
+ - **R8 (waterfall ordering).** The bridge registers its `approval/request` listener with
420
+ `prepend: true`, because the native seam is a cordis waterfall and an appended listener
421
+ never runs once a pre-existing UI answerer claims the question. Proven against a real
422
+ `ApprovalService` with a pre-existing answerer: the delegated request reaches the
423
+ commander, the UI answerer is never consulted, and an ordinary session still falls through
424
+ to its own answerer.
425
+ - **R9 (proto-safe hashing).** The fingerprint is computed over a hand-written canonical
426
+ serializer instead of a `JSON.stringify` replacer, so a key named `__proto__` is no longer
427
+ swallowed by the prototype setter and two different JSON objects cannot collide.
428
+ - **Fingerprint is mandatory for `allow-once`** (optional for `reject`), and decisions are
429
+ validated before any request lookup or mutation.
430
+ - Also proven behaviourally, not by constants: switching delegation OFF settles the wait as
431
+ `cancelled`, a plugin dispose settles it as `unavailable`, and a task whose native executor
432
+ has not settled keeps its workspace lock and concurrency slot (`JOB_NATIVE_NOT_STOPPED`).
433
+
434
+ `tests/permissions.test.js` grew from 25 to 51 tests covering all of the above.
435
+
436
+ ### Release packaging in this build
437
+
438
+ - Version `0.1.14` is set consistently in `package.json`, both `package-lock.json` root
439
+ fields, the native `PLUGIN_VERSION`, the MCP `SERVER_INFO`, the managed Codex companion's
440
+ `version` marker and the release-test constants.
441
+ - The managed Codex companion now carries the commander's **per-call decision rules**:
442
+ a task in phase `awaiting-permission` is still running (never duplicate, fail or cancel it
443
+ for waiting), the coordinating Codex is the decider (no second approval model, no operator
444
+ prompt for routine within-task calls, no delegation of the decision to the worker), the
445
+ worker's `reason` is a claim rather than authority, and an allow requires
446
+ `argumentsComplete: true`, `completeness: complete`, no `allowBlocked`, no transport
447
+ truncation, a still-pending request and its exact fingerprint. Its existing activation,
448
+ explicit-continuation, route-from-DSH and source-path rules are unchanged.
449
+ - The published `0.1.13` companion template is now enumerated in `KNOWN_AGENT_TEMPLATES`
450
+ by its exact SHA-256 (`b3a1d2f0…`, 9191 bytes, CRLF, verified against the packed
451
+ `dsh-delegate-0.1.13.tgz`). An unchanged `0.1.13` file is refreshed; a file the operator
452
+ edited still hashes differently and is preserved and reported `modified`. There is no
453
+ implicit new installation and no startup edit of `config.toml` or the MCP entry.
454
+ - Two small corrections: a fully restored pending operation no longer reports a phantom
455
+ `truncation.fields` entry at the skeleton projection stage (only real final cuts are
456
+ reported, and a genuinely cut operation still cannot be allowed), the zero-keep stage
457
+ really drops the settled evidence it declares dropped, and a successful task checkpoint is
458
+ no longer discarded by a *different* task's newer checkpoint.
459
+
460
+ ### Known unfinished work (not claimed as solved in this build)
461
+
462
+ - **No process authentication against arbitrary same-user code.** Switch mode
463
+ deliberately uses one shared `local-mcp` identity; the decision is scoped to that
464
+ connection's OWN tasks, but this is not a per-process boundary and the docs say so.
465
+ `delegate_permission_decide` is absent from the native worker's declared tool catalog,
466
+ which is a **tool-surface restriction** on what the worker's model is handed — it is not
467
+ a claim that a shell process running as the same OS user could not call the shared local
468
+ MCP endpoint directly.
469
+ - **Not published and not installed.** This is a candidate package: no npm publication, no
470
+ Desktop profile upgrade, no switch change, no production acceptance run. See the status
471
+ section above for the exact steps still required.
472
+ - 12 test failures in `tests/continuation-auth.test.js` (11) and
473
+ `tests/controller-lifecycle.test.js` (1) are **pre-existing** in the source baseline
474
+ (`ff`-identical failure sets before and after this batch) and are unrelated to it.
475
+
476
+ ## 0.1.13 — local build (not a public release)
477
+
478
+ A source-path contract fix. It is packed locally for review; it is not published to npm
479
+ and is not a distribution release. Nothing about the execution engine changed.
480
+
481
+ ### The MCP description no longer invites the wrong `workspacePath` on a follow-up
482
+
483
+ Observed on a real Desktop `0.2.2` / Delegate `0.1.12` session: a caller read the tool
484
+ description, passed the **previous task's execution worktree** as `workspacePath`, and
485
+ was refused with `JOB_CONTINUATION_REFUSED` (`another source repository`). The engine was
486
+ already correct — an authorization and a continuation are both bound to the source
487
+ repository, and a continuation reuses the parent's worktree internally — so the defect
488
+ was purely in what the tool surface told the caller. Passing the original source
489
+ repository instead continued the same session successfully on the same machine.
490
+
491
+ - `delegate_submit`'s description, the `workspacePath` and `continueFromTaskId` parameter
492
+ descriptions, and the `initialize` instructions now state one rule: `workspacePath` is
493
+ the operator-authorized **source repository or checkout**, and a follow-up keeps
494
+ passing the parent's **original** source path while the plugin reuses the parent's
495
+ execution worktree or session internally.
496
+ - The rule is scoped to `delegate_submit` and continuation. It does not claim every tool
497
+ is bound to the authorization (`delegate_preflight` is a read-only inspection), and it
498
+ does **not** exclude legitimate sources: a source root may itself be a Git checkout or
499
+ an operator-authorized Git worktree. Only substituting an internal
500
+ `execution.workspacePath` for the parent's original source path is refused.
501
+ - The wording is a clarification only. No parameter, tool or behaviour was added; the
502
+ five-tool closed set, the closed input schemas and every path / ownership / isolation
503
+ check in the engine are unchanged, and no validation was relaxed.
504
+ - `tests/mcp.test.js` gains a public-contract regression that reads the real `initialize`
505
+ and `tools/list` responses off a real server — not a private constant — and asserts the
506
+ source-path rule for both parameters plus the handshake, the automatic internal reuse,
507
+ the fail-closed refusal (never a silent new conversation), the unchanged tool set and
508
+ the closed schema. It asserts properties rather than exact sentences.
509
+
510
+ ### Codex agent-template migration
511
+
512
+ - The published `0.1.12` template is now enumerated in `KNOWN_AGENT_TEMPLATES`
513
+ (`ff04a4bf…`). The digest was verified byte for byte, before this release's template
514
+ edit, against `package/codex/dsh-delegate.toml` inside the packed
515
+ `dsh-delegate-0.1.12.tgz` and against the saved release baseline; both were identical
516
+ to the pre-fix working tree. An unchanged `0.1.12` file is refreshed to `0.1.13` on
517
+ plugin startup and by an explicit install.
518
+ - **No earlier digest was removed or replaced.** The `0.1.6`, both `0.1.7` builds,
519
+ `0.1.8`, `0.1.9`, both `0.1.10` byte forms and `0.1.11` remain enumerated, so a machine
520
+ that skipped `0.1.12` is migrated directly to this build.
521
+ - Ownership is still byte identity, never the version line: a user-edited agent file is
522
+ reported `modified` and is never written, refreshed or removed, by startup migration or
523
+ by an explicit install. The `0.1.11` migration coverage is retained and generalized, and
524
+ the `0.1.12` → `0.1.13` step is covered for startup refresh, explicit status/install,
525
+ and edit preservation.
526
+ - Because the companion body did not change in this release, the older release bytes are
527
+ rebuilt for the tests from the current template by rewriting only the version line, and
528
+ against an explicitly stated CRLF byte form; each reconstruction is proved against a
529
+ fixed published digest. The tests depend on no saved cache, fixture or machine-specific
530
+ path.
531
+
532
+ ### Packaging and metadata
533
+
534
+ - Version bumped to `0.1.13` in `package.json`, both `package-lock.json` root fields,
535
+ `PLUGIN_VERSION`, the MCP `SERVER_INFO` and the shipped Codex agent template
536
+ (`codex/dsh-delegate.toml`). `README.md` and `docs/codex-integration.md` name the
537
+ current package and release; historical release facts are unchanged.
538
+ - No dependency was installed or upgraded, no locked `resolved` version moved, the
539
+ production dependency graph and `pnpm-lock.yaml` are unchanged, and no agent body rule
540
+ was edited.
541
+
542
+ ### Known unfinished work (not claimed as solved)
543
+
544
+ - **Not verified:** `0.1.13` has not been installed or accepted on a Desktop profile. The
545
+ successful three-round real-machine continuation evidence belongs to **`0.1.12`**, the
546
+ previous build, and is the reason this fix exists — it is not an acceptance of this
547
+ build.
548
+ - The delegation switch being `OFF` and cancellation of an in-flight task were **not**
549
+ exercised against this build; their coverage here remains the earlier automated tests.
550
+ - Real attached review (a review agent reading a live run) was not exercised in this
551
+ build.
552
+ - The wording is regression-tested as a property of the advertised strings, not against a
553
+ live model's interpretation; only a real host session can show how a caller reads it.
554
+
555
+ ## 0.1.12 — local build (not a public release)
556
+
557
+ A runtime-compatibility build for DSH `0.2.2-rc.1`. It is packed locally for review;
558
+ it is not published to npm and is not a distribution release.
559
+
560
+ ### DSH 0.2.2-rc.1 is now an admitted runtime
561
+
562
+ - `engines.dsh` and every `@deepseek-ai/dsh-*` peer range now read
563
+ `0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.2-rc.1`.
564
+ - **Nothing was dropped.** Every previously declared exact version is still admitted;
565
+ the development cohort (`devDependencies`, all `0.2.0-rc.2`) is unchanged, the
566
+ production dependency graph is unchanged, and no locked `resolved` version moved.
567
+ No `pnpm install` was run.
568
+ - A plugin build that does not declare `0.2.2-rc.1` (`0.1.11` and earlier) is skipped by
569
+ that host's native gate (`skippedBundles` / denied row) rather than loaded with
570
+ unknown behaviour.
571
+
572
+ ### What 0.2.2 changed, and how the plugin adapts
573
+
574
+ Detailed in the new `docs/runtime-compatibility.md`; the runtime implementation is
575
+ reviewed separately from this release-metadata work.
576
+
577
+ - **Durable model selection.** `0.2.2` gives each agent
578
+ `agent.model.select({ provider, model, reasoningEffort? })`, which appends a durable
579
+ `model/selection` event, and `agent.model.current()`, which returns the recorded
580
+ selection (falling back to the agent's own options). The agent loop fixes a step's
581
+ route from that record and rejects a request that proposes a different one, so the
582
+ route that executes is the one the runtime *records*.
583
+ - **Asynchronous native policy initialization.** `ctx.sandboxPolicy` and
584
+ `ctx.approval` register their Session projections during service initialization. The
585
+ worker contract is unchanged — write, then read back through the native services —
586
+ but the read-back now happens per run, after those services can answer, and a service
587
+ that cannot answer remains the fail-closed `RUN_SANDBOX_POLICY_UNAVAILABLE` raised
588
+ before the prompt.
589
+ - The plugin branches on **observed capabilities**, not on a version string: a modern
590
+ path where the selection API and the initialized services exist, a legacy path
591
+ otherwise. A selection read-back that cannot be obtained is a strict failure before
592
+ the prompt on every path — never a run under an unstated route, and never a claimed
593
+ concrete reasoning effort for a selection that omitted one.
594
+
595
+ ### Codex agent-template migration
596
+
597
+ - The published `0.1.11` agent template is now enumerated in
598
+ `KNOWN_AGENT_TEMPLATES` (`b6ca7c32…`, the digest of the packed
599
+ `dsh-delegate-0.1.11.tgz`). An unchanged `0.1.11` file is refreshed to `0.1.12` on
600
+ plugin startup and by an explicit install; a user-edited file is still reported
601
+ `modified` and is never written, refreshed or removed.
602
+ - **`0.1.10` now carries two exact digests instead of one.** The packed
603
+ `dsh-delegate-0.1.10.tgz` contains a CRLF `package/codex/dsh-delegate.toml`
604
+ (`fc7b2710…`); the same template kept as LF text is `6583f08a…`. Either form can be an
605
+ installed file, so both are enumerated and neither replaces the other. The product
606
+ compares exact bytes: it never normalizes line endings and never rewrites a file to
607
+ change them, and no earlier hash was removed.
608
+ - `0.1.11` was delivered as an uncommitted candidate plus a verified tarball (the last
609
+ commit, `a750c0b`, is `0.1.10`), so its digest `b6ca7c32…` is cited from the tarball and
610
+ the saved baseline, not from a `0.1.11` commit.
611
+ - Ownership protection is unchanged and is not weakened: content identity, not the
612
+ version line, remains the proof, and every earlier digest is still enumerated.
613
+
614
+ ### Packaging and metadata
615
+
616
+ - Version bumped to `0.1.12` in `package.json`, both `package-lock.json` root fields,
617
+ `PLUGIN_VERSION`, the MCP `SERVER_INFO`, and the shipped Codex agent template
618
+ (`codex/dsh-delegate.toml`).
619
+ - `docs/runtime-compatibility.md` is added to the published `files` allowlist. Unlike
620
+ the internal notes, it is an operator-facing document: it is the supported-version
621
+ table and the upgrade guidance a consumer needs.
622
+
623
+ ### Documentation
624
+
625
+ - New `docs/runtime-compatibility.md`: the supported-version table, what `0.2.2`
626
+ introduces, the capability-based modern/legacy split, the upgrade path, and an
627
+ explicit list of what is *not* claimed.
628
+ - `README.md`: the supported-version row, the version-gate note, the `0.2.2` behaviour
629
+ summary and the honest limits section.
630
+ - `docs/codex-integration.md`: the digest table for `0.1.10` (both byte forms) and
631
+ `0.1.11`, and the statement that the product does not normalize line endings.
632
+ - `docs/worker-permissions.md`: the `0.2.2` asynchronous initialization note, and the
633
+ corrected scope of the review exclusion (only the sandbox policy is worker-only; the
634
+ reviewer uses the same model-selection adapter).
635
+
636
+ ### Known unfinished work (not released as solved)
637
+
638
+ - **Not verified:** a real provider call, an actual sandbox command under the installed
639
+ policy, and an end-to-end run on the production DSH Desktop profile. The native checks
640
+ below intercepted prompt delivery inside a disposable fixture.
641
+ - `0.2.1-rc.3` was **not** independently native-boot validated for this release. It stays
642
+ declared as supported on the strength of the previous host build.
643
+ - The OS temporary area remains a native platform exception; on Windows the native
644
+ sandbox admits `GetTempPathW` in some configurations, which is not a permission this
645
+ plugin grants.
646
+ - Node child-process checks that capture piped stdio hit `EPERM` in this repository's
647
+ confined Windows sandbox; that is a boundary of that confinement.
648
+ - A verification run outside the Desktop process is not evidence about the Desktop
649
+ process's own sandbox.
650
+
651
+ ### Native verification on 0.2.2-rc.1 (contract checks, not an acceptance run)
652
+
653
+ - The full base + web + delegate profile loads with no skipped bundles; a real stdio MCP
654
+ `initialize` returns `0.1.12` with five tools and discovers the endpoint;
655
+ `delegate_status` works and an `OFF` submit is refused with `DELEGATION_DISABLED`.
656
+ - Real native Workspace/Session controllers, Agent and AgentModel were used. The runner
657
+ selected and read back its route and effort before prompt delivery, a follow-up reused
658
+ the native session and changed both, and a deliberately wrong readback was refused
659
+ before the prompt. The native create/setup runner path also passed.
660
+ - The policy read back `workspace-write` / `never`, and an escalation inside a valid turn
661
+ was rejected in under 1 ms.
662
+ - The `SessionSeq` / `surfaceOp` failures seen in intermediate runs were **coordinator
663
+ test-driver mistakes** — the synthetic event driver omitted native event sequence and
664
+ surface metadata. They were fixed in the driver with no product code change and are not
665
+ open product bugs.
666
+
667
+ ## 0.1.11 — local build (not a public release)
668
+
669
+ A permission and continuity build. It is packed locally for review; it is not
670
+ published to npm and is not a distribution release.
671
+
672
+ ### Delegated worker sessions are confined and verified
673
+
674
+ - A worker run now installs `sandbox/mode: workspace-write` and
675
+ `approval/policy: never` on its own DSH session **before** the prompt is
676
+ delivered, and then **reads the policy back** through the native
677
+ `ctx.sandboxPolicy.resolve({ session })` and
678
+ `ctx.approval.effectivePolicy(session)` services.
679
+ - The policy is applied on every run, including a `continueFromTaskId` follow-up, so
680
+ a resumed thread converges on the current contract.
681
+ - A missing service, a refused read, or a read-back that disagrees with what was
682
+ written is a fail-closed refusal (`RUN_SANDBOX_POLICY_UNAVAILABLE`) raised before
683
+ the prompt: the worker does not start, and no permissive default is substituted.
684
+ - `never` is deterministic rejection of an escalation, not automatic approval.
685
+ - The read-only review agent is unchanged: its own composition and tool surface are
686
+ not affected by worker permissions.
687
+
688
+ ### Path identity
689
+
690
+ - The sandbox module compares a session's workspace root with its own directory
691
+ through the shared `sameSessionPath` identity instead of a private copy, so
692
+ Windows separators, trailing slashes, root paths and letter case are judged in one
693
+ place. The fail-closed checks and the policy read-back are unchanged.
694
+
695
+ ### Worktrees stay in the plugin data directory
696
+
697
+ - Plugin-managed worktrees continue to live under
698
+ `<dataDir>/worktrees`, inside the plugin's persistent data directory, so a review
699
+ still finds the evidence and a follow-up still finds its parent tree. No real
700
+ directory or ACL was changed by this release.
701
+
702
+ ### Packaging and metadata
703
+
704
+ - Version bumped to `0.1.11` in `package.json`, both `package-lock.json` root fields,
705
+ `PLUGIN_VERSION`, the MCP `SERVER_INFO`, and the shipped Codex agent template
706
+ (`codex/dsh-delegate.toml`).
707
+ - The endpoint-discovery error no longer hard-codes a release version in its text.
708
+ - The native packages the tests load directly are now declared as devDependencies:
709
+ `@deepseek-ai/dsh-sandbox-policy`, `@deepseek-ai/dsh-user-approval`,
710
+ `@deepseek-ai/dsh-session-projection`, `@deepseek-ai/dsh-session` (all
711
+ `0.2.0-rc.2`, matching the existing development cohort) and
712
+ `@deepseek-ai/cordis` (`4.0.5`, as already locked). Both lockfiles were updated in
713
+ place from entries that already existed; no dependency was upgraded.
714
+ - The Codex agent-template migration table still lists every earlier published hash
715
+ and still refuses to touch a user-modified file.
716
+
717
+ ### Continuations belong to one verified connection
718
+
719
+ - A `continueFromTaskId` follow-up may join a thread only when the **same verified
720
+ `connectionId`** submits it. The caller's identity is the authenticated connection
721
+ record, never a field the request states about itself.
722
+ - In the same process the live parent record states the owner and the outcome, and the
723
+ two ids are compared exactly.
724
+ - After a restart the persisted task→session map only says where a thread lives, so a
725
+ second authority is consulted: the durable job history (`HistoryStore`) must state
726
+ the same owner, a terminal state a thread can be continued from, and the same
727
+ source repository and execution directory.
728
+ - A missing, damaged, pruned or otherwise unprovable record is refused. So is another
729
+ connection's task: it is reported as `JOB_TASK_NOT_FOUND`, indistinguishable from an
730
+ unknown id, so the response cannot be used to probe other connections' task ids.
731
+ There is no cross-connection take-over, no permission hand-off, and no matching by
732
+ connection label.
733
+ - `local-mcp` (the local-switch path) is a fixed identity compared exactly like any
734
+ other; it is not `null` and it does not stand for every remote connection.
735
+ - This capability is implemented in the current candidate build. Its acceptance is
736
+ reported separately by Codex; this changelog does not claim a passing real install
737
+ on DSH Desktop, nor a reproduced real attack.
738
+
739
+ ### Documentation
740
+
741
+ - `README.md`: current package filename, a short summary of the worker permission
742
+ contract, the continuation identity rule, and the stale test count removed.
743
+ - `docs/worker-permissions.md`: the full contract, the continuation ownership rule,
744
+ what was verified, and what is still open.
745
+
746
+ ### Known unfinished work (not released as solved)
747
+
748
+ - Real-install acceptance on DSH Desktop.
749
+ - The OS temporary area remains a native platform exception.
750
+ - Node child-process checks that capture piped stdio currently hit `EPERM` in this
751
+ repository's confined Windows sandbox; that is a boundary of that confinement, not
752
+ a failure of the approval fix.
753
+ - A verification run outside the Desktop process is not evidence about the Desktop
754
+ process's own sandbox.