dsh-creator-mode-plus 0.3.8

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.
@@ -0,0 +1,431 @@
1
+ # Creator Bridge v2
2
+
3
+ Creator Mode+ is a user preset plus one DSH plugin. It brings ten fixed DSHX
4
+ operations into an ordinary DSH session without giving that session control of
5
+ its Host process. Stable DSHX `>=0.7.8 <0.8.0` supplies atomic single-Home Host
6
+ discovery/attachment, temporary-Home cold-boot verification, workspace-aware
7
+ scaffolding, source-preserving watched-plugin removal, external safe profile-bundle
8
+ removal, proactive integrity quarantine, the external Guardian, durable recovery state, the seven-surface
9
+ activation contract, and the transactional Harness Update Assistant.
10
+
11
+ ## Roles
12
+
13
+ | Role | Authority |
14
+ |---|---|
15
+ | Creator Mode+ session | Claim one plugin, create files, check contracts, plan activation, perform bounded new-client activation/removal or server hot replacement, read status |
16
+ | External DSHX Guardian | Monitor the Host, journal activation, quarantine a culprit or missing claimed link, recover Host/official Loader failures, open a crash-loop fuse, persist incidents |
17
+ | User | Approve normal impactful activation and decide what to do after a fused or ambiguous incident |
18
+
19
+ The supervisor is outside DSH. It is not the model session and does not require
20
+ the user to watch every command. No model-facing tool accepts a shell string,
21
+ arbitrary argv/path/profile/port, or Host start/stop/restart operation.
22
+
23
+ The preset still inherits Standard's coding shell, but that shell is not the
24
+ external supervisor. RC8 and RC2 inject `DSH_SHELL=1` into every model shell
25
+ call; DSHX v0.7 rejects raw mutation/process commands at its CLI boundary. This
26
+ keeps an old or mistaken Creator session from bypassing the ten fixed tools with
27
+ `dshx start`, `restart`, `activate-new-client`, or profile shipping commands.
28
+ The only Harness-update exception is read-only `dshx update plan`; the mutating
29
+ update stages remain outside the Host.
30
+
31
+ ## Fixed argv contract
32
+
33
+ The ten model-facing tools map to exactly these child CLI shapes:
34
+
35
+ | Tool | Allowed child argv |
36
+ |---|---|
37
+ | `dshx_status` | `status` |
38
+ | `dshx_browser_open` | `browser open --json` |
39
+ | `dshx_claim_plugin` | `creator claim <plugin-id>` |
40
+ | `dshx_request_takeover` | Host user question, then private-grant `creator takeover <plugin-id> --json` |
41
+ | `dshx_scaffold` | `creator scaffold <plugin-id> <declared-kind>` |
42
+ | `dshx_check` | `check <plugin-id>` |
43
+ | `dshx_activation_plan` | `activation-plan <plugin-id> --change <declared-branch>` |
44
+ | `dshx_activate_new_client` | `activate-new-client <plugin-id> --profile web --port <Host-derived-port>` |
45
+ | `dshx_remove_plugin` | `creator remove <plugin-id>` |
46
+ | `dshx_hot_reload` | `hot-reload <plugin-id> --profile web --port <Host-derived-port> --json` |
47
+
48
+ The approved eighth operation performs bounded official module HMR, not Host restart. The bridge supplies JSON output and trusted session/Host context, refreshes the claim first, and accepts no model-controlled path, profile, port, argv or shell. A successful module receipt remains pending functional verification; a failed attempt cannot reuse an earlier successful replacement receipt. The fixed tool accepts only root-scope receipts. Explicit preset-private replacement stays external and requires its own runtime acceptance, never a self-replacement tool or managed-shell bypass.
49
+
50
+ Multi-file server implementations declare exact package-relative `hotReload.artifacts` in `dshx.yml`. The receipt binds before/after hashes for that complete set and its exact watch roots. This matters because an entry-only reload can leave an imported helper cached. Creator+ declares its complete server file set in `dshx.yml`, excluding its browser client; a self-upgrade must replace those files together and prove that the existing session uses the new tools.
51
+
52
+ The bridge appends a fixed `--json` output flag to activation-plan (not model input). Its session-local delivery journal stores plan/check metadata and validated hot-replacement receipts under the selected Harness `.dshx/creator-plus/deliveries`; credentials and conversation content are excluded. Status and session recovery expose pending delivery across normal launcher restarts. A new Host does not mark the feature accepted, and old module proof is labeled historical when its PID no longer matches. Status uses Connection authentication for same-origin manifest and bundle proof; actual behavior remains a separate required check.
53
+
54
+ Session lifecycle may additionally call fixed internal watch, release, recovery
55
+ pull, and recovery acknowledgement argv. Tests must execute every row and every
56
+ internal lifecycle shape through the allowlist; registering a tool name does not
57
+ prove its child argv is reachable.
58
+
59
+ DSHX v0.7.2 adds `dshx_remove_plugin` as the seventh Creator tool. `update prepare`, `verify`,
60
+ `apply`, and `rollback` remain outside the bridge because they can replace or restore the process that owns the session,
61
+ so the fixed bridge cannot expose them. Read-only `update plan` is available only
62
+ through DSHX's managed-shell gate and remains inventory rather than activation.
63
+ DSHX v0.7.3 adds the external `dshx plugin remove` transaction for boot-captured
64
+ profile bundles. It also stays outside the fixed bridge: it requires current
65
+ profile/port authority and may own a tombstone across App boots, so Creator
66
+ sessions may hand off to it but never execute it as a bridge tool or raw shell.
67
+
68
+ DSHX v0.7.4 makes App, direct CLI, and dshx launchers for one long-lived Web
69
+ Host per real `DSH_HOME`. `start` attaches to one existing Host, while duplicate
70
+ or unknown Host/Home evidence fails closed. `verify-boot` uses a temporary Home,
71
+ always tears it down, and rejects `--keep`. These remain external-supervisor
72
+ rules and do not grant process control to Creator.
73
+
74
+ DSHX v0.7.5 serializes same-Home start, restart, apply, and rollback across
75
+ Harness checkouts; binds PID, OS start time, Home, profile, and root; and
76
+ re-runs discovery after spawn. An affected or identity-unknown live Host blocks
77
+ installation-directory mutation.
78
+
79
+ `refusing an operation outside bridge v2` from one of these fixed tools means the
80
+ bridge contract itself is broken. The session reports the exact tool and error,
81
+ preserves the claim and source location, and stops. It must not reinterpret the
82
+ error as a supervisor decision, switch to raw shell or manual profile edits, move
83
+ the project, or report a later lifecycle stage as successful.
84
+
85
+ The scaffold command stamps the immutable session workspace from
86
+ `exec.agent.session.header.cwd`. If Harness `my-plugins/<id>` is outside that
87
+ writable workspace, DSHX creates the source below the workspace and creates the
88
+ Harness link atomically. The model supplies neither path, and the user is never
89
+ asked to add the link manually. For a fresh `new-client`, implementation, build,
90
+ and `dshx_check` follow scaffold before activation planning because the plan
91
+ validates the built lazy-CJS handoff. Other build-ready targets may plan as soon
92
+ as the target exists.
93
+
94
+ ## Trusted identity and concurrent ownership
95
+
96
+ The bridge creates `DSHX_CREATOR_CONTEXT` from the tool execution object, never
97
+ from model input:
98
+
99
+ ```text
100
+ exec.agent.id + callId + rootCallId
101
+ + Host pid + Host parent pid + current Web port + bridge version
102
+ ```
103
+
104
+ At `agent/session-start`, the bridge arms Guardian and pulls recovery incidents
105
+ for that exact persisted session. Once a plugin id is known, the session calls
106
+ `dshx_claim_plugin`; every other named-plugin operation refreshes the claim.
107
+
108
+ - One session owns at most one plugin at a time.
109
+ - Different sessions can own different plugins concurrently without a fixed cap.
110
+ - One plugin cannot have two session owners.
111
+ - Build/check work remains concurrent. Only the watched live-activation section
112
+ uses a global inter-process lock.
113
+ - Claim and incident registries use atomic locks and rename; `agent/disposed`
114
+ releases the lease. A 24-hour expiry requires revalidation; it does not authorize another writer.
115
+
116
+ ## Complete DSHX v0.7 preflight
117
+
118
+ The standalone package does not accept `0.7.x` by string alone. Before any fixed
119
+ operation or installer mutation it requires:
120
+
121
+ - package identity `dsh-external-plugin-devkit` and stable version
122
+ `>=0.7.8 <0.8.0`;
123
+ - same-Home Web Host discovery/attach, three-state PID/port probes, and
124
+ temporary-Home verification teardown;
125
+ - Creator claim/scaffold commands and Bridge v2 context validation;
126
+ - source-preserving watched-plugin removal, external safe profile-bundle
127
+ removal, and proactive claimed-link integrity quarantine;
128
+ - external Guardian and official Loader-failure recovery implementation;
129
+ - check, activation-plan, and bounded new-client command surfaces;
130
+ - the managed-shell gate and the transactional Harness Update Assistant;
131
+ - Creator+, Guardian, live-activation, and Harness-update knowledge contracts.
132
+
133
+ Missing or prerelease surfaces fail closed. Release verification also probes the
134
+ actual DSHX CLI version and contract markers through `npm run verify:dshx`;
135
+ fabricated fixture tests are not the live-checkout gate.
136
+
137
+ ## New-client transaction
138
+
139
+ ### RC1 authenticated Host proof
140
+
141
+ The bridge obtains the current Host's startup URL from the public
142
+ `connection.authenticatedUrl()` API. It passes it only in the child process's
143
+ private `DSHX_WEB_STARTUP_URL` environment, never in model arguments, tool output,
144
+ session provenance or transaction journals. DSHX exchanges it for a cookie in
145
+ memory and binds every proof request to the selected loopback origin. Authenticated
146
+ activation and absence proofs use the same transport. HTTP 401/403 fails promptly
147
+ as `WEB_AUTH_REQUIRED`, rather than being overwritten by a polling timeout.
148
+
149
+ An authentication failure is an infrastructure blocker: preserve source and the
150
+ claim and repair the bridge. Keep Host authentication enabled. Do not ask the user
151
+ to paste credentials into chat. External launchers may supply the same private
152
+ environment input; DSHX does not discover credentials by scanning App logs.
153
+
154
+ Changing this already-loaded server bridge requires the server activation branch;
155
+ it does not imply that ordinary plugin creation requires Host restarts.
156
+
157
+ `dshx_activate_new_client({ name })` is the only bridge operation that mutates
158
+ live registration. Its sole model-controlled value is a lower-case kebab-case
159
+ plugin id.
160
+
161
+ ```text
162
+ scaffold -> implement/build -> dshx check / SOURCE_BUILT
163
+ -> activation-plan new-client exits 0
164
+ -> add or confirm the official Web profile link
165
+ -> prove package and lib/client.js resolution from that profile
166
+ -> journal session/call/Host identity and the exact patch preimage
167
+ -> insert or semantically retrigger one watched-patch row
168
+ -> poll the current Host manifest and served client.js
169
+ -> HOST_TREE_ACTIVE + CLIENT_MANIFEST_PRESENT
170
+ -> browser reload remains separate
171
+ ```
172
+
173
+ The order is invariant. A failed new row is rolled back by DSHX. A nonzero
174
+ result stops the branch; the session does not compensate with package
175
+ installation, manual profile edits, or a Host restart.
176
+
177
+ ## Safe removal transaction
178
+
179
+ `dshx_remove_plugin({ name })` is the only whole-plugin teardown operation. Its
180
+ sole model-controlled value is the claimed lower-case kebab-case id.
181
+
182
+ ```text
183
+ claim refresh
184
+ -> remove a standalone watched insert row, or append one unique disabled override
185
+ -> poll the same Host PID until its manifest no longer contains the id
186
+ -> run official dsh plugin --profile web remove while the dependency exists
187
+ -> prove profile dependency and node_modules entry are absent
188
+ -> if RC8 left an orphan profile link, detach it only after target verification
189
+ -> detach only a Harness my-plugins symlink
190
+ -> preserve the source directory
191
+ -> HOST_TREE_INACTIVE + PROFILE_DEPENDENCY_REMOVED (+ SOURCE_PRESERVED when observed)
192
+ ```
193
+
194
+ If same-Host absence cannot be proved, the operation stops with its live row
195
+ quarantined and leaves the profile dependency, Harness link, and source intact.
196
+ If the official remover deleted the dependency but left `node_modules/<id>`, a
197
+ retry resumes from the durable quarantine without asking pnpm to remove an
198
+ already-absent dependency. It may report `detached-orphan-symlink` only when the
199
+ entry is a symlink whose resolved target is the claimed Harness/source path;
200
+ directories and outside targets fail closed without recursive cleanup.
201
+ Creator infrastructure ids cannot self-remove. The preset-scoped bash guard
202
+ blocks direct teardown of a claimed plugin root, its Harness link, and the active
203
+ DSH profile while permitting ordinary component/file cleanup inside the source.
204
+
205
+ ## External profile-bundle removal handoff
206
+
207
+ `dshx_remove_plugin` stops when a package is a boot-captured bundle without a
208
+ bounded watched row. The Creator session reports that boundary and hands the
209
+ operation to the external supervisor:
210
+
211
+ ```text
212
+ dshx plugin remove <package> --profile web --port <current-port>
213
+ -> prove the same-name Loader row in current __DSH_BOOT__
214
+ -> write or resume one exact disabled tombstone
215
+ -> prove same-PID HOST_TREE_INACTIVE
216
+ -> run the official profile remover
217
+ -> prove dependency, bundle, and link absence
218
+ -> retain the tombstone while the old boot is alive
219
+ -> after a later normal App boot, rerun and remove it only with start-time proof
220
+ ```
221
+
222
+ The command also resumes the dependency-gone/bundle-leftover failure seam. It
223
+ does not restart the Host, delete source, or grant process control to Creator.
224
+
225
+ ## Guardian recovery
226
+
227
+ Guardian runs as a detached Node process outside the DSH Host. It evaluates Host
228
+ pid and loopback HTTP health and uses the same-port transaction journal for
229
+ attribution:
230
+
231
+ | Confidence | Evidence |
232
+ |---|---|
233
+ | `high` | An activation transaction is active when the Host fails |
234
+ | `probable` | The most recent unrecovered transaction finished within 15 seconds |
235
+ | `ambiguous` | No single short-window transaction can be named |
236
+
237
+ For high/probable attribution, Guardian restores an inserted row's exact
238
+ preimage or disables an existing row while retaining that preimage for a checked
239
+ retry. If another session has already changed the same patch, Guardian appends a
240
+ transaction-unique disabled override instead of overwriting the whole file with
241
+ an old snapshot; a retry removes only that marker. It never deletes plugin source.
242
+
243
+ ```text
244
+ Host failed
245
+ -> select active/recent same-port transaction
246
+ -> quarantine the causal live row when attribution exists
247
+ -> if another supervisor restored the port: do not open a duplicate listener
248
+ -> otherwise restart the same Web target once
249
+ -> a second failure inside 30 seconds opens the fuse
250
+ -> persist incident
251
+ -> steer incident to the owning session when it starts/resumes
252
+ -> acknowledge delivery
253
+ ```
254
+
255
+ An incident steering message interrupts normal work. The Agent inspects its
256
+ confidence, plugin, rollback and log excerpt, repairs preserved source, runs
257
+ `dshx_check`, and only then retries the original lifecycle branch.
258
+
259
+ Creator+ does not register or wrap Host SIGINT/SIGTERM handlers. Explicit DSHX
260
+ stop/restart disarms before signaling a DSHX-owned Host. An adopted Host records
261
+ its launcher pid; when that launcher exits, Guardian neither resurrects the child
262
+ nor leaves behind a Guardian replacement tied to that App lifetime. Manual DSHX
263
+ stop or restart refuses adopted official/App Hosts.
264
+
265
+ On every healthy cycle, Guardian also checks only claimed clients that are still
266
+ active in the watched patch. If such an id has lost its resolvable profile
267
+ package, Guardian removes the byte-identifiable standalone row or appends a
268
+ unique disabled override, waits for same-Host manifest absence, and records a
269
+ `plugin-integrity-failed` incident for the owning session. It does not delete
270
+ source, clean the profile dependency, stop, or restart the Host. This is an
271
+ independent fail-safe for an older Agent or script that bypassed the bridge and
272
+ prevents a later cold boot from consuming stale active configuration.
273
+
274
+ ## Official client-Loader recovery
275
+
276
+ The package also contributes an immediate, self-contained browser client. It
277
+ listens to RC8 Loader status and the framework-free `Failed to load plugins` boot
278
+ page. It sends only bounded failed entry ids and error text to one same-origin
279
+ POST route. That Host route—not the browser or model—stamps Host pid, parent pid,
280
+ and port and invokes fixed `dshx creator client-failure` argv.
281
+
282
+ DSHX may quarantine only one exact candidate:
283
+
284
+ - an active same-port transaction whose plugin appears in the failed ids;
285
+ - one exact recent unrecovered transaction for a failed id; or
286
+ - one uniquely claimed failed id already present in the watched patch.
287
+
288
+ A stale Host identity, unknown id, or multiple candidates is ambiguous and
289
+ changes no plugin row. After quarantine, the bridge waits for the current Host
290
+ manifest to prove the id absent. Only then does the browser reload once. The
291
+ incident remains durable and is steered to its owning session. A failed report
292
+ gets one delayed retry to cover session-start/Guardian arm races; the browser
293
+ fuse prevents an unbounded reload loop.
294
+
295
+ The POST route is a Host-scoped leased resource, not a generation-scoped side
296
+ effect. RC8 may keep an older session generation alive while mounting a newer
297
+ one after the preset composition stamp changes. Independently loaded bridge
298
+ generations therefore share one route broker keyed by the WebServer instance;
299
+ the newest live generation handles requests, disposal falls back to another live
300
+ generation, and only the last lease unregisters the route. The installer also
301
+ preserves the exact composition-file stamp when its bytes are unchanged so
302
+ metadata-only upgrades do not manufacture a new generation.
303
+
304
+ ## Harness Update Assistant boundary
305
+
306
+ The v0.7 update state machine is `plan → prepare → verify → apply`; `rollback`
307
+ requires an existing apply transaction. Creator Mode+ may inspect `plan` from a
308
+ managed shell after `dshx_status` proves one checkout. All later stages are
309
+ external-supervisor work.
310
+
311
+ The evidence labels are deliberately non-transitive:
312
+
313
+ - `plan` inventories tag/SHA, dirty state, and plugins; it proves no build.
314
+ - `prepare` proves an isolated candidate installed and built; it does not update
315
+ the current checkout.
316
+ - `verify` proves candidate static/cold-boot gates; it does not activate the
317
+ production Host or page.
318
+ - `apply` updates local source and artifacts transactionally; it does not restart
319
+ or establish user-visible acceptance.
320
+ - `rollback` restores the recorded checkout, dependencies, and artifacts; it
321
+ does not promise reversal of product-data migrations outside this contract.
322
+
323
+ The update assistant never silently stops or restarts a production Host. Creator
324
+ Mode+ must report candidate verified, applied locally, real runtime accepted, and
325
+ production activated as separate states.
326
+
327
+ ## Compatibility and evidence boundary
328
+
329
+ Supported: the official DSH browser WebUI, public Cordis plugin forms, public
330
+ client runtime, and public UI slots across the RC8 Creator/Guardian contract and
331
+ the RC2 package/update line and the authenticated Web line through 0.1.5-rc.2.
332
+
333
+ Outside acceptance: native menus, window chrome, App IPC, desktop bridges, and
334
+ shell-specific refresh behavior. A wrapper may work when it embeds the same
335
+ WebUI unchanged, but browser-WebUI reproduction is the defect gate.
336
+
337
+ Guardian proves Host process/HTTP recovery and the narrow official Loader-failure
338
+ recovery above. A component render exception, loaded package id, visual
339
+ correctness, and functional behavior remain separate evidence. These layers are
340
+ independent: `SOURCE_BUILT`, `ARTIFACT_SYNCED`, `NEXT_BOOT_REGISTERED`,
341
+ `PRESET_ROSTER_VISIBLE`, `PRESET_SESSION_ACTIVE`, `HOST_TREE_ACTIVE`,
342
+ `CLIENT_MANIFEST_PRESENT`, `CLIENT_LOADED`, and `VISUAL_BEHAVIOR_VERIFIED`.
343
+
344
+ Changes to safe removal, the bash guard, Connection authentication or preflight
345
+ are server changes and need live activation evidence. They are not automatically
346
+ restart-required. A checked server plan returns `HOT_RELOAD_READY` with a fixed `nextAction`.
347
+ Unknown or failed target evidence remains `ACTIVATION_DECISION_REQUIRED`; a launcher handoff supplies identity, not approval.
348
+ Official HMR of a root Loader entry does not prove replacement of a preset-private
349
+ bridge. Keep that scope distinction explicit and verify the actual fixed-tool
350
+ behavior before claiming delivery. Managed upgrade preserves an unchanged
351
+ `agent.cordis.yml` stamp: skill/metadata refresh alone neither creates a generation
352
+ nor justifies an immediate restart. The approved eighth tool must traverse the
353
+ same allowlist and provenance gates as the existing operations before release.
354
+
355
+ ## Private browser access
356
+
357
+ RC1 local Web authentication is independent of provider/account login. During
358
+ watch/claim, the bridge uses the official Connection startup URL to refresh an
359
+ owner-only, expiring DSHX handoff bound to Home, checkout, PID, process start and
360
+ port. The URL stays in private subprocess input; assembled stdout/stderr is
361
+ redacted. An older Connection without authenticatedUrl remains supported and
362
+ must still pass the actual unauthenticated Web proof.
363
+
364
+ Read `dshx kb cat contracts/browser-access` before browser testing. The managed
365
+ shell may run read-only `dshx browser status`. Use the no-argument fixed
366
+ `dshx_browser_open` to open this session's externally approved browser adapter.
367
+ Adapter configuration and raw bind/open commands remain external-supervisor work. A missing credential is `WEB_AUTH_REQUIRED`;
368
+ an unavailable permitted browser adapter is `BROWSER_ADAPTER_REQUIRED`. Do not
369
+ restart the Host, open a second Host/port, request account login, or switch to
370
+ another agent's browser to resolve either status. The external adapter uses its
371
+ own permitted browser context and receives private JSON on stdin. Browser
372
+ access does not prove the plugin feature works.
373
+
374
+ This works with official CLI, App, and DSHX launchers. Without Creator or a
375
+ DSHX-owned launcher, the user/launcher must privately bind the official startup
376
+ URL once per Host lifetime. Never infer credentials from an open port or request
377
+ a token in a conversation. Expired or changed-Host handoffs need refresh.
378
+
379
+
380
+ ## Installation routing and candidate scope
381
+
382
+ Creator can install supported Web plugins through the fixed new-client operation;
383
+ the managed shell does not need a `dsh` executable. Existing-plugin branch trials
384
+ follow the bundled `existing-plugin-trials.md`: candidate preparation is separate
385
+ from promotion to the claimed target. No arbitrary source-retargeting operation
386
+ is added. Explicitly preserving the installed directory requires a scoped
387
+ external handoff, not an inferred Host restart.
388
+
389
+ Delivery output names the exact `sourcePath` and limits its evidence to that
390
+ path. `SOURCE_BUILD_REQUIRED` requests a fixed check of that target; undecided
391
+ server plans point to bounded hot reload only when unrelated plan gates passed.
392
+ Host mismatches and failed gates cannot receive runtime-verification guidance.
393
+
394
+
395
+ The ninth tool is session-bound browser opening, not process control. It requires
396
+ `session-browser-open`: external setup pins a reviewed self-contained executable
397
+ snapshot using `dshx browser configure <session-id> <absolute-adapter-path>`.
398
+ The no-argument tool selects only that session's snapshot, supplies authentication
399
+ privately, and returns whitelisted browser status. Raw managed-shell browser
400
+ configure/bind/open remains denied. Setup never opens a browser; only the later
401
+ fixed call does. A changed adapter requires external review and reconfiguration.
402
+
403
+
404
+ ## Delivery continuation (0.3.7)
405
+
406
+ Fixed results lead with `outcome`: status, scope and `continueWith` actions.
407
+ A checked server plan produces `delivery.nextAction` for `dshx_hot_reload`.
408
+ For DSHX 0.7.6, only the exact evidence-only server plan is adapted to bridge
409
+ exit code 0, retaining its original `commandExitCode: 1`; unrelated errors remain
410
+ blocking. DSHX 0.7.7 returns a successful plan directly and grants no activation
411
+ or restart proof merely by planning.
412
+
413
+ Browser adapter failure retains the server delivery state and permitted next
414
+ action. Current-Host authentication errors still block dependent live proof.
415
+ An already-authenticated, task-authorized UI or a plugin command/service can
416
+ supply feature evidence without configuring this optional browser adapter.
417
+
418
+ This release uses the ten fixed tools and the native approval/guard stack.
419
+ Separate local sealed-executor experiments are not part of this package.
420
+
421
+ ## 用户确认后接管
422
+
423
+ 插件已被别的对话认领时,调用 `dshx_request_takeover({name})`。当前对话会展示原对话的实际标题、会话 ID、工作区、认领刷新时间和运行状态。用户选择“接管到当前对话”或“停止旧任务并接管”后,固定 bridge 才会暂停旧对话及其子任务的工具权限,停止并等待其后台命令和终端结束,再由 DSHX 原子转移认领。默认选择“取消”。无需找回旧对话,也无需等待 24 小时。
424
+
425
+ 确认走官方 `userQuestions` UI,独立于 `approval/request`。Approve for me 的自动允许、模型传入的布尔值和自由文本“已批准”都不能替代选项确认。确认绑定原认领快照,五分钟后失效;提交凭据只在 Host 闭包和固定 CLI 环境中传递,一次使用、有效期一分钟。原认领刷新、另一次接管或 Host 身份变化都会使旧确认失效。
426
+
427
+ 旧对话及已存在子任务的撤销记录独立于租约保存,所有普通工具调用都被拦截,保留 `dshx_status` 与重新申请接管的入口。该保护属于 Host 生命周期,跨 preset 卸载、HMR 和认领释放继续生效;不会修改会话日志锁。后台任务依照官方 jobs/terminals 的完成与资源释放约定等待,不能把“取消已请求”当成“已经停止”。
428
+
429
+ 正在激活、持有者状态无法核实、停止失败、确认取消或超时,都不会授予新会话权限。已开始的停止操作不会被自动恢复。可用外部 `dshx creator inspect <plugin> --json` 查看原认领及待处理交接;不要手删 claims 或 session.lock。`creator takeover` 是固定桥内部提交协议,缺少一次性凭据会拒绝,不能通过 `--force` 调用。
430
+
431
+ 租约到期只表示认领需要重新核验,不再自动授权第二个写入者。正常 `agent/disposed` 仍释放认领;移交中的 dispose 不得破坏正在比较的原认领。
@@ -0,0 +1,108 @@
1
+ # DSHX v0.7 alignment
2
+
3
+ Creator Mode+ 0.3.8 is aligned to stable DSHX `>=0.7.8 <0.8.0`, Creator Bridge
4
+ v2, and the official browser WebUI lifecycle. DSHX v0.7.5 makes same-Home
5
+ ownership atomic across checkouts and binds PID, process start time, Home,
6
+ profile, and root before lifecycle or update mutation.
7
+
8
+ This is a contract alignment, not a version-number exception. Before the bridge
9
+ or installer mutates anything, it verifies the DSHX package identity, stable
10
+ version range, CLI and Creator/Guardian implementation, seven-surface activation
11
+ contract, managed-shell gate, and transactional Harness Update Assistant.
12
+
13
+ The 0.3.8 release requires DSHX 0.7.8 for user-confirmed takeover, durable old-session fencing, and atomic ownership transfer. It retains the corrected client scaffolds, bounded import recovery, and external mixed-mount self-upgrades from 0.3.7 / 0.7.7.
14
+
15
+ ## Ownership matrix
16
+
17
+ | DSHX v0.7 surface | Creator Mode+ 0.3 behavior | Evidence boundary |
18
+ |---|---|---|
19
+ | Single-Home Host ownership | `dshx_status` must show one identity-bound attached/supervised same-Home Host and no collision/unknown candidate | App, direct CLI, and dshx are launchers; another port is not isolation |
20
+ | Isolated cold boot | external `verify-boot` uses a temporary Home and rejects `--keep` | It leaves the user's Host PID unchanged and does not prove live activation there |
21
+ | Session claims | `dshx_claim_plugin`; every named operation refreshes the claim | Claim success is ownership, not build or activation |
22
+ | Workspace scaffold | `dshx_scaffold` takes only id/kind; DSHX derives the immutable session workspace and owns any `my-plugins` link | Returned source path is the only edit target |
23
+ | Static/client checks | `dshx_check` | Exit 0 proves `SOURCE_BUILT` only |
24
+ | Seven activation surfaces | `dshx_activation_plan` selects exactly one of patch, manifest, preset, client, new-client, server, or artifact | Dependency installation is not activation |
25
+ | New Web client | `dshx_activate_new_client` owns link → resolution → watched transaction → current manifest | Exit 0 reaches `CLIENT_MANIFEST_PRESENT`; the page still needs reload and observation |
26
+ | Safe plugin removal | `dshx_remove_plugin` owns live-row quarantine → same-Host absence → official profile remove → target-verified symlink detach; partial RC8 removals resume from durable quarantine | Exit 0 reaches `HOST_TREE_INACTIVE` and `PROFILE_DEPENDENCY_REMOVED`; `detached-orphan-symlink` is bounded to this claim and source remains preserved |
27
+ | External bundle removal | Creator stops at boot-captured bundle evidence and hands off to external `dshx plugin remove`; DSHX owns tombstone → same-PID absence → official remove → later-boot cleanup | External-only operation; current Host is not restarted and old pages may still need refresh |
28
+ | Guardian | Session start arms external recovery; Host, official Loader, and claimed-link integrity failures use exact attribution and quarantine | Recovery does not prove render, visual, or functional correctness |
29
+ | Harness Update Assistant | A managed shell may inspect read-only `dshx update plan`; `prepare`, `verify`, `apply`, and `rollback` stay outside DSH | Candidate verified, locally applied, live runtime accepted, and production activated are different states |
30
+
31
+ ## Why the eighth tool is bounded
32
+
33
+ The approved eighth tool is `dshx_hot_reload`, not a Harness update or process command. It accepts a single claimed plugin id; the bridge derives Host/profile/port and requires the DSHX bounded-same-pid-server-hot-reload capability. Same-PID module and cleanup evidence advances delivery only to functional verification. Unknown or unsupported targets remain pending without restart authority.
34
+
35
+ DSHX v0.7.2 adds one bounded tool because whole-plugin teardown previously let a
36
+ Creator Agent delete source/profile links before removing the live watched row.
37
+ `dshx_remove_plugin` closes that lifecycle gap without accepting paths, shell, or
38
+ process control. The transactional Harness Update Assistant still does not widen
39
+ Creator Bridge v2: Harness replacement and rollback can change the process that
40
+ owns the current session, so they remain external-supervisor operations. Adding
41
+ an `update` bridge tool would erase that authority boundary. Read-only
42
+ `dshx update plan` is permitted by DSHX's managed-shell gate and is documented in
43
+ the preset skill as inventory only.
44
+ DSHX v0.7.3's external bundle transaction likewise does not widen the bridge:
45
+ it requires supervisor-owned profile/port context and may span a later App boot.
46
+ DSHX v0.7.5's Host lock, identity binding, update guard, and verifier teardown stay outside the bridge;
47
+ Creator receives status but never gains process or port input.
48
+
49
+ ## Harness compatibility
50
+
51
+ The source line covers the DSH `dsh-v0.1.0-rc.8` Creator/Guardian contracts and
52
+ the DSHX v0.7 update path through `dsh-v0.1.1-rc.2` and `dsh-v0.1.2-rc.1` to `dsh-v0.1.5-rc.2`.
53
+ The RC1 line includes relocated Standard discovery and authenticated Host proof.
54
+ `0.1.5-rc.2` is the current authenticated Web line; external plugins must pass `dshx check` with no `compat-015-*`.
55
+ Release verification against the selected checkout must include:
56
+
57
+ ```sh
58
+ npm run check
59
+ DSHX_HARNESS=/absolute/path/to/deepseek-harness npm run test:native
60
+ npm run verify:dshx -- --harness /absolute/path/to/deepseek-harness
61
+ npm run verify:harness-install -- --harness /absolute/path/to/deepseek-harness
62
+ /absolute/path/to/deepseek-harness/tools/dshx/skill/dshx/scripts/dshx.sh \
63
+ check /absolute/path/to/dsh-creator-mode-plus \
64
+ --harness /absolute/path/to/deepseek-harness
65
+ npm pack --dry-run
66
+ ```
67
+
68
+ These commands establish source, contract, and packaged-artifact readiness. They
69
+ do not establish that a running profile has loaded this release. The release
70
+ report must keep these layers separate:
71
+
72
+ ```text
73
+ SOURCE_BUILT
74
+ ARTIFACT_SYNCED
75
+ NEXT_BOOT_REGISTERED
76
+ PRESET_ROSTER_VISIBLE
77
+ PRESET_SESSION_ACTIVE
78
+ HOST_TREE_ACTIVE
79
+ CLIENT_MANIFEST_PRESENT
80
+ CLIENT_LOADED
81
+ VISUAL_BEHAVIOR_VERIFIED
82
+ ```
83
+
84
+ ## Upgrade activation
85
+
86
+ Server changes across these versions need live activation evidence, not a blanket
87
+ restart instruction. A checked server plan with `hostRestart: not-decided` returns `HOT_RELOAD_READY`
88
+ and names `dshx_hot_reload` as its next action. Unknown/failed evidence remains
89
+ pending. Planning does not authorize process control.
90
+ Run the installer with `--upgrade` outside the Agent session; unchanged preset
91
+ composition bytes retain their stamp. Root Loader module HMR and preset-private
92
+ bridge replacement are distinct scopes and need separate proof. A module or
93
+ manifest receipt still requires exercising the changed feature. Use launcher
94
+ handoff only after an evidence-backed and authorized restart decision.
95
+
96
+ The local browser-access update additionally attests `private-browser-handoff`:
97
+ identity-bound private storage, official Connection input, bounded authentication
98
+ transport, and explicit browser-adapter execution. A version string alone does
99
+ not prove these capabilities. `HTTP_AUTHENTICATED`, `BROWSER_AUTHENTICATED`, and
100
+ feature acceptance remain separate evidence.
101
+
102
+
103
+ `session-browser-open` adds the no-argument `dshx_browser_open` as the ninth
104
+ standalone bridge tool. It requires DSHX's externally configured, session-bound
105
+ adapter snapshot support. Browser authentication runs privately; Host/process
106
+ control, arbitrary paths and credentials remain outside model input.
107
+
108
+ `dshx_request_takeover({name})` asks through the current conversation’s user-question UI, then drains old work and atomically transfers ownership. This requires the `human-confirmed-creator-takeover` capability in addition to the version range.
Binary file
Binary file
Binary file
package/dshx.yml ADDED
@@ -0,0 +1,16 @@
1
+ id: dsh-creator-mode-plus
2
+ name: Creator Mode+
3
+ entry: src/index.js
4
+ marker: "[dsh-creator-mode-plus] loaded"
5
+ kind: client
6
+ profile: web
7
+ hotReload:
8
+ artifacts:
9
+ - src/index.js
10
+ - src/preset-015.js
11
+ - src/runner.js
12
+ - src/auth.js
13
+ - src/delivery.js
14
+ - src/compatibility.js
15
+ - src/safety.js
16
+ - src/takeover.js
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "dsh-creator-mode-plus",
3
+ "version": "0.3.8",
4
+ "description": "Develop, activate and verify DeepSeek Harness plugins from a Creator Mode+ conversation.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "private": false,
8
+ "main": "./src/index.js",
9
+ "exports": {
10
+ ".": "./src/index.js",
11
+ "./client": "./src/client.js",
12
+ "./package.json": "./package.json"
13
+ },
14
+ "dsh": {
15
+ "client": {
16
+ "inject": [],
17
+ "platform": "web",
18
+ "immediately": true
19
+ }
20
+ },
21
+ "scripts": {
22
+ "install:preset": "node scripts/install.mjs",
23
+ "test": "node --experimental-vm-modules --test tests/*.spec.mjs",
24
+ "check": "node --check src/index.js && node --check src/preset-015.js && node --check src/runner.js && node --check src/auth.js && node --check src/delivery.js && node --check src/safety.js && node --check src/takeover.js && node --check src/compatibility.js && node --check src/client.js && node --check scripts/install.mjs && node --check scripts/verify-dshx.mjs && node --check scripts/verify-harness-install.mjs && npm test",
25
+ "verify:dshx": "node scripts/verify-dshx.mjs",
26
+ "verify:harness-install": "node scripts/verify-harness-install.mjs",
27
+ "test:native": "node --experimental-vm-modules --test tests/native/*.spec.mjs"
28
+ },
29
+ "engines": {
30
+ "node": "^22.19.0 || >=24.0.0"
31
+ },
32
+ "dependencies": {
33
+ "yaml": "2.9.0"
34
+ },
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/aa2246740/dsh-creator-mode-plus.git"
38
+ },
39
+ "homepage": "https://github.com/aa2246740/dsh-creator-mode-plus",
40
+ "bugs": {
41
+ "url": "https://github.com/aa2246740/dsh-creator-mode-plus/issues"
42
+ },
43
+ "keywords": [
44
+ "deepseek-harness",
45
+ "dsh",
46
+ "dshx",
47
+ "creator-mode",
48
+ "plugin"
49
+ ],
50
+ "files": [
51
+ "src",
52
+ "dshx.yml",
53
+ "scripts",
54
+ "preset",
55
+ "docs/*.md",
56
+ "docs/screenshots/already-installed.png",
57
+ "docs/screenshots/install.png",
58
+ "docs/screenshots/mode-picker.gif",
59
+ "docs/screenshots/mode-picker.png",
60
+ "docs/screenshots/mode-selected.png",
61
+ "AGENTS.md",
62
+ "CHANGELOG.md",
63
+ "LICENSE",
64
+ "README.md",
65
+ "README.en.md"
66
+ ]
67
+ }
@@ -0,0 +1,2 @@
1
+ name: Creator Mode+
2
+ description: 在 DSH 对话中创建、修改并加载插件,继续验证实际功能;支持保留当前会话的热更新和故障恢复。