@dsmm/dsmm 0.2.2 → 0.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 (182) hide show
  1. package/README.md +26 -42
  2. package/cordis.patch.yml +1 -0
  3. package/docs/agent-presets.md +26 -14
  4. package/docs/compatibility.md +20 -79
  5. package/docs/deferred-native-approval-risk.md +8 -12
  6. package/docs/design.md +25 -254
  7. package/docs/lsp.md +2 -2
  8. package/docs/migration-from-ocmm.md +38 -51
  9. package/docs/model-routing.md +21 -21
  10. package/docs/native-permissions.md +17 -7
  11. package/docs/profiles.md +13 -9
  12. package/docs/releasing.md +34 -240
  13. package/docs/roadmap.md +23 -254
  14. package/docs/runtime-recovery.md +29 -91
  15. package/docs/safety-guards.md +19 -16
  16. package/docs/settings-status.md +23 -11
  17. package/docs/skill-sync.md +17 -17
  18. package/docs/web-fetch-fakeip.md +82 -0
  19. package/lib/child-capture.d.ts +16 -2
  20. package/lib/child-capture.js +29 -10
  21. package/lib/client/ChildrenPanel.d.ts +1 -4
  22. package/lib/client/ChildrenPanel.js +4 -16
  23. package/lib/client/DeploymentFields.d.ts +28 -0
  24. package/lib/client/DeploymentFields.js +68 -0
  25. package/lib/client/DeploymentPage.d.ts +17 -5
  26. package/lib/client/DeploymentPage.js +79 -112
  27. package/lib/client/NativeCommandEntries.d.ts +17 -0
  28. package/lib/client/NativeCommandEntries.js +68 -0
  29. package/lib/client/PermissionsPanel.d.ts +1 -1
  30. package/lib/client/PermissionsPanel.js +8 -8
  31. package/lib/client/ProfilesSection.js +7 -5
  32. package/lib/client/RoleToolView-data.d.ts +35 -0
  33. package/lib/client/RoleToolView-data.js +52 -0
  34. package/lib/client/RoleToolView-locales.d.ts +36 -0
  35. package/lib/client/RoleToolView-locales.js +20 -0
  36. package/lib/client/RoleToolView.d.ts +10 -0
  37. package/lib/client/RoleToolView.js +47 -0
  38. package/lib/client/SessionProfiles.js +39 -15
  39. package/lib/client/children-controller.d.ts +2 -8
  40. package/lib/client/children-controller.js +1 -26
  41. package/lib/client/children-locales.d.ts +26 -51
  42. package/lib/client/children-locales.js +8 -12
  43. package/lib/client/configuration-display.d.ts +5 -0
  44. package/lib/client/configuration-display.js +11 -0
  45. package/lib/client/controller.d.ts +1 -0
  46. package/lib/client/controller.js +20 -13
  47. package/lib/client/deployment-controller.d.ts +13 -1
  48. package/lib/client/deployment-controller.js +85 -25
  49. package/lib/client/deployment-data.d.ts +1 -0
  50. package/lib/client/deployment-data.js +4 -1
  51. package/lib/client/deployment-locales.d.ts +43 -0
  52. package/lib/client/deployment-locales.js +35 -9
  53. package/lib/client/deployment-modules.d.ts +9 -0
  54. package/lib/client/deployment-modules.js +24 -0
  55. package/lib/client/deployment-workspace.d.ts +48 -0
  56. package/lib/client/deployment-workspace.js +123 -0
  57. package/lib/client/index.js +11 -74
  58. package/lib/client/locales.d.ts +7 -0
  59. package/lib/client/locales.js +12 -6
  60. package/lib/client/permission-controller.d.ts +1 -0
  61. package/lib/client/permission-controller.js +3 -2
  62. package/lib/client/permission-locales.d.ts +25 -0
  63. package/lib/client/permission-locales.js +24 -4
  64. package/lib/client/session-labels.js +4 -3
  65. package/lib/client/styles.d.ts +1 -1
  66. package/lib/client/styles.js +9 -8
  67. package/lib/client.js +2716 -2364
  68. package/lib/commands.js +2 -0
  69. package/lib/config-file-store.d.ts +3 -0
  70. package/lib/config-file-store.js +4 -2
  71. package/lib/config-revision.d.ts +5 -0
  72. package/lib/config-revision.js +11 -0
  73. package/lib/core-permission-authority.js +11 -41
  74. package/lib/deployment-config.d.ts +9 -2
  75. package/lib/deployment-config.js +35 -8
  76. package/lib/deployment-permission-rules.js +19 -7
  77. package/lib/dsh-types.d.ts +1 -1
  78. package/lib/host-llm-startup.js +3 -3
  79. package/lib/host-llm.d.ts +9 -3
  80. package/lib/host-llm.js +48 -8
  81. package/lib/index.d.ts +17 -21
  82. package/lib/index.js +131 -430
  83. package/lib/lifetime.d.ts +4 -0
  84. package/lib/lifetime.js +22 -0
  85. package/lib/live-pi-ai-owner.d.ts +1 -0
  86. package/lib/live-pi-ai-owner.js +8 -4
  87. package/lib/mode.d.ts +3 -2
  88. package/lib/mode.js +28 -41
  89. package/lib/model-routing.d.ts +2 -8
  90. package/lib/model-routing.js +59 -175
  91. package/lib/native-admission.d.ts +56 -0
  92. package/lib/native-admission.js +313 -0
  93. package/lib/native-pi-ai-wire.d.ts +3 -1
  94. package/lib/native-pi-ai-wire.js +47 -13
  95. package/lib/permission-control.d.ts +0 -3
  96. package/lib/permission-rpc.js +3 -3
  97. package/lib/preset-registry.js +3 -2
  98. package/lib/preset-skills.d.ts +3 -12
  99. package/lib/preset-skills.js +28 -58
  100. package/lib/profile-diagnostics.d.ts +1 -1
  101. package/lib/profile-diagnostics.js +2 -2
  102. package/lib/profile-remote.js +61 -22
  103. package/lib/profile-rpc.d.ts +4 -3
  104. package/lib/profile-rpc.js +39 -41
  105. package/lib/profile-runtime.d.ts +31 -74
  106. package/lib/profile-runtime.js +224 -639
  107. package/lib/profile-store.d.ts +18 -6
  108. package/lib/profile-store.js +106 -64
  109. package/lib/profile-types.d.ts +18 -4
  110. package/lib/profiles.d.ts +3 -1
  111. package/lib/profiles.js +9 -7
  112. package/lib/prompt-content.d.ts +1 -0
  113. package/lib/prompt-content.js +4 -1
  114. package/lib/prompts.d.ts +2 -12
  115. package/lib/prompts.js +11 -66
  116. package/lib/role-control-remote.d.ts +1 -4
  117. package/lib/role-control-remote.js +8 -36
  118. package/lib/role-control-rpc.d.ts +10 -36
  119. package/lib/role-control-rpc.js +112 -265
  120. package/lib/role-control-types.d.ts +3 -26
  121. package/lib/role-control-types.js +3 -4
  122. package/lib/role-identity.d.ts +5 -0
  123. package/lib/role-identity.js +10 -0
  124. package/lib/role-invocation.d.ts +2 -2
  125. package/lib/role-llm-runtime.js +5 -11
  126. package/lib/role-policy.d.ts +19 -53
  127. package/lib/role-policy.js +136 -525
  128. package/lib/role-providers.d.ts +5 -8
  129. package/lib/role-providers.js +20 -126
  130. package/lib/role-routing.d.ts +1 -3
  131. package/lib/role-routing.js +24 -34
  132. package/lib/role-subagents.d.ts +5 -14
  133. package/lib/role-subagents.js +149 -97
  134. package/lib/runtime-integration.d.ts +5 -109
  135. package/lib/runtime-integration.js +11 -779
  136. package/lib/session-metadata.d.ts +13 -12
  137. package/lib/session-metadata.js +6 -31
  138. package/lib/session-scope.js +6 -2
  139. package/lib/settings.d.ts +5 -18
  140. package/lib/settings.js +19 -43
  141. package/lib/state.d.ts +3 -2
  142. package/lib/state.js +26 -10
  143. package/lib/status.d.ts +1 -9
  144. package/lib/status.js +3 -55
  145. package/lib/web-fetch-address-policy.d.ts +24 -0
  146. package/lib/web-fetch-address-policy.js +189 -0
  147. package/lib/web-fetch-fakeip.d.ts +25 -0
  148. package/lib/web-fetch-fakeip.js +107 -0
  149. package/package.json +133 -113
  150. package/docs/research/deepseek-v4-pro.md +0 -74
  151. package/docs/research/oh-dsh.md +0 -96
  152. package/lib/child-admission.d.ts +0 -42
  153. package/lib/child-admission.js +0 -162
  154. package/lib/delivery-authority.d.ts +0 -68
  155. package/lib/delivery-authority.js +0 -260
  156. package/lib/legacy-child-policy.d.ts +0 -51
  157. package/lib/legacy-child-policy.js +0 -123
  158. package/lib/legacy-read-composition.d.ts +0 -20
  159. package/lib/legacy-read-composition.js +0 -144
  160. package/lib/legacy-read-contracts.d.ts +0 -157
  161. package/lib/legacy-read-contracts.js +0 -39
  162. package/lib/legacy-read-host.d.ts +0 -19
  163. package/lib/legacy-read-host.js +0 -67
  164. package/lib/legacy-read-integration.d.ts +0 -121
  165. package/lib/legacy-read-integration.js +0 -522
  166. package/lib/legacy-read-proxy.d.ts +0 -26
  167. package/lib/legacy-read-proxy.js +0 -237
  168. package/lib/native-child-evidence.d.ts +0 -42
  169. package/lib/native-child-evidence.js +0 -133
  170. package/lib/role-runs.d.ts +0 -135
  171. package/lib/role-runs.js +0 -304
  172. package/lib/session-persistence.d.ts +0 -35
  173. package/lib/session-persistence.js +0 -304
  174. package/lib/subagent-runtime.d.ts +0 -45
  175. package/lib/subagent-runtime.js +0 -131
  176. package/prompts/deepseek-flash.md +0 -11
  177. package/prompts/deepseek-v4-pro.md +0 -14
  178. package/scripts/cold-profile-composition.mjs +0 -329
  179. package/scripts/cold-profile-sources.mjs +0 -238
  180. package/scripts/migrate-cold-profile.mjs +0 -315
  181. package/scripts/repair-session-log.mjs +0 -476
  182. package/scripts/session-repair-native-verifier.mjs +0 -367
package/README.md CHANGED
@@ -2,43 +2,45 @@
2
2
 
3
3
  DSMM (`@dsmm/dsmm`) adds native configuration, role delegation and child controls to DeepSeek Harness. **DSMM** is the Plugins page and package title; **Deepwork** is its optional workflow module. It isn't an OpenCode compatibility layer.
4
4
 
5
- This guide describes the **local source candidate**, targeting `@deepseek-ai/dsh@0.2.0-rc.2` and Node.js 22 or later. `package.json` still says `0.2.0`, an already published registry version. The new source features described here aren't a claim that the registry artifact was updated or a new npm release was published. Use the actual local packed artifact for candidate evaluation. Package/smoke acceptance and actual Desktop activation are separate checks, not implied by this documentation.
5
+ **DSMM 0.3.1 targets exactly DSH `0.2.1-rc.2`** and Node.js 22 or later. Published `0.3.0` retains its original rc.1 package and tag identity.
6
6
 
7
- ## What the candidate provides
7
+ ## Configuration and profiles
8
8
 
9
- ### Native configuration and profiles
9
+ **Plugins → DSMM bundle config** is the deployment editor. Choose sparse Global settings or the current native profile override, then open a module drawer. Each scope has independent Save, Refresh and Discard actions. Profile writes require the exact authorized native form and revision; unavailable forms never fall back to Global writes. Core configuration and permissions remain available without a session and with Deepwork off.
10
10
 
11
- **Plugins → DSMM** edits the sparse global deployment base. The bundle and actual row Config pages also expose the native profile override when the Host supplies its authorized form. **Save Global DSMM** changes only central `config.json`; **Save current DSH profile override** changes only that exact native entry's patch. Neither save restarts the Host, cancels work or applies a named profile. Core settings remain usable without a session and with Deepwork cold-off.
11
+ Resolution is **defaults → sparse Global deployment → explicit native entry/profile → admitted named overlay**. Objects merge, arrays replace, and explicit false, empty and same-default values remain pins. Unset removes only the current layer's key. Global storage is `<resolvedDshHome>/plugins/dsmm`; home resolution uses explicit `profileContext.home`, then `DSH_HOME`, then the native `~/.dsh` default.
12
12
 
13
- **Settings → Deepwork Profiles** separates four states: editor draft, saved revision, future-default pin and current-session admission. Save doesn't activate a revision. Future-default selection leaves existing Agents alone; current-session Apply requires the exact idle ordinary root, selection CAS and admission epoch. Invalid JSONC and conflicts remain visible without discarding the draft. `blank-label` is a nonblocking warning; unknown, unsafe and retired fields still refuse.
13
+ **Settings → Deepwork Profiles** separates editor draft, saved revision, future-default pin and current-session admission. Save doesn't activate a revision. Future-default selection affects new sessions, not existing Agents or their children. Live overlay **Apply is unavailable** in rc.2: save and select a default for a new session instead. There is no queued Apply or implicit restart.
14
14
 
15
- The Conversation profile menu preserves the native model when switching profiles. Its separate **Use profile model** action reads the current admitted immutable revision, not a later saved draft. Newer native model/effort intent remains authoritative. The **Deepwork** toggle persists explicit intent, including same-default choices; DW presets default on but can be turned off without losing persona or permission boundaries. Sessionless controls don't create a session, and busy/unavailable mutations fail closed. See [profiles](docs/profiles.md) and [settings/status](docs/settings-status.md).
15
+ The Conversation menu's **Use profile model** is an independent native selection action using the admitted immutable configuration, not a later draft. The **Deepwork** toggle records explicit intent, including a same-default choice; DW presets default on, but explicit off wins without removing persona or permission boundaries. Model selection, mode switching and overlay Apply each have their own capability and refusal reason. Disabling Apply doesn't disable the other two. Sessionless controls don't create a session. See [Profiles](docs/profiles.md) and [settings/status](docs/settings-status.md).
16
16
 
17
- ### Roles, models and language
17
+ Desired configuration, mounted startup capability and actual Agent admission are separate states. Saves don't remount services or update running task policy. Global and named stores use their own CAS/atomic-write boundaries; native profile forms use native revision CAS, not a cross-layer transaction. A committed save with failed observation remains saved with refresh required. An unconfirmed native mutation requires reread, not blind retry. Writes require the actual operator and valid connection/owner lifetime through precommit.
18
18
 
19
- The inventory contains 11 base roles and 11 categories displayed as `DW …`. Only enabled Orchestrator, Builder and Planner are root-eligible; the other 19 are auxiliary. Cross-cutting defaults off. Role-disabled diagnostics distinguish required roles, startup availability, deployment enablement and actual admission. Catalog visibility isn't execution permission, and role names don't guarantee different models.
19
+ ## Roles and execution
20
20
 
21
- Delegation supports `level:"normal"` by default and explicitly configured `low`, `high` and `max` for eligible targets. Exact unsupported effort refuses rather than degrading. `subagents.toolTopology` selects per-role tools or parameterized `dsmm_role`/`dsmm_category` tools. Model-facing `route` overrides are absent unless deployment explicitly grants them; named profiles can't grant that permission. Ordinary roots retain native provider/model/effort. Child primary routes supply defaults, not unconditional overrides.
21
+ The inventory contains 11 base roles, 11 categories and fourteen configurable lazy skills. Only enabled Orchestrator, Builder and opted-in Planner are root-eligible; the rest are auxiliary. Cross-cutting defaults off. Preset discovery, root eligibility and model availability are separate checks. A role name doesn't prove a different model or grant authority.
22
22
 
23
- Named profiles can narrow enabled roles and capture visible-output `locale`: `en`, `zh-Hans`, `zh-Hant`, `ja`, `ko`, `de`, `fr`, `es`, `pt-BR`, or `ru`. A user's explicit output-language request wins. Locale doesn't change internal reasoning, UI/project language, technical IDs or exact quotations. Children keep their captured route, locale and authority after a parent profile change. See [model routing](docs/model-routing.md) and [Agent presets and child control](docs/agent-presets.md).
23
+ Official **AgentRegistry, SubagentRuntime and JSONL namespace plugins own execution and storage**. DSMM binds immutable per-Agent configuration and per-call role policy through native preset/provider composition and awaited creation. There is no custom execution owner, manual-runtime selector or persistence companion to install. `preset-skills` is an internal Agent-scoped handle, not a public Loader plugin.
24
24
 
25
- ### Child execution and controls
25
+ Role calls wait for the official activation result by default. Only native `stopReason: completed` is normal completion; failure, interruption and partial output remain distinct. After publication, cancellation uses the activation receipt's `dispose()` and waits for cleanup. If background execution is enabled, choose `run_in_background:true` **before starting**; delivery is then owned by the native parent notification path. An accepted child/message receipt isn't a completed task. A running waiting call can't be transferred to background.
26
26
 
27
- Foreground one-shot is the default. With explicitly enabled native jobs, an authorized handoff transfers the **same running native one-shot** to background, preserving its run identity rather than spawning a second child. The child panel shows real runs, direct children and a read-only descendant tree, with initial capture versus own native request route and explicit unknown/disabled states.
27
+ Supported live direct-child controls use native Queue, Steer and interrupt under exact-parent and operator authority. Descendant inspection is read-only. Availability follows actual native capabilities, not a visible button or catalog row. Unknown send outcomes must not trigger automatic resend. **DSMM cold resume is unsupported without a trusted live admission**; preserve history rather than reconstructing authority from logs, labels or current settings. See [Agent presets and child control](docs/agent-presets.md).
28
28
 
29
- Managed direct continuable children support **Queue**, **Steer** and interrupt under current exact-parent authority. Idle/cold continuation retains the durable child ID; a terminal one-shot isn't a continuable session. An inbox receipt means accepted, not completed. Unknown transport outcomes retain the draft and disable automatic resend. Refresh doesn't retry a send. These controls require the explicit ready Host runtime described below; seeing a panel or role catalog alone doesn't prove availability.
29
+ Collapsed call rows show **Call Coding** / **调用 Coding** when the target is known; child labels use **Coding: task description**. Requested identity is distinct from validated actual execution identity. Partial arguments, failures, interruptions and current-format replay retain that distinction, including nested PTC calls. Native safety refusal views take precedence.
30
30
 
31
- Native Host ownership still governs lifecycle, depth, permissions, cancellation, storage, attachments and model authentication. DSMM adds capture and delivery fences, not a replacement scheduler or a second retry dispatcher. [Runtime recovery](docs/runtime-recovery.md) describes finite, positively no-output-safe retries and per-role `startup-lock`/opt-in `rate-limit-fallback`; partial text, reasoning or tool fragments forbid replay.
31
+ ## Models and resources
32
32
 
33
- ### Workflow resources
33
+ Ordinary roots retain native provider/model/effort selection. Role calls default to `level:"normal"`; eligible targets may configure exact `low`, `high` and `max`. `subagents.toolTopology` chooses per-role or parameterized tools. Per-call `route` is absent unless deployment explicitly grants it; named profiles can't grant that permission. Child routes are initial defaults, not every-turn overrides of later native intent.
34
34
 
35
- Fourteen configurable Agent-scoped skills use metadata discovery and lazy body loading. Explicit Deepwork off hides DSMM skills without removing Host/project skills or role restrictions. Scoped shell/Git/plan/question/todo guards remain bounded by native authority. Idle continuation is separately opt-in. Debugging/DAP is an on-demand skill, not an automatic debugger service. `/deepwork [off|message]` and inspection-only `/dsmm-status [json]` are Host-adapter commands, not headless task-text commands.
35
+ Standard supported requests use native prepared calls. Raw/custom parameters and Pi-AI stop-only requests use the minimal public Pi-AI `openai-completions` payload seam for self-contained literal or explicit model-mapping configurations. Catalog-backed raw combinations that can't be reliably reproduced are rejected regardless of native or DSMM parameter source. Standard Coding remains available, and native effort encoding and advertised capabilities remain unchanged. See [model routing](docs/model-routing.md) and [bounded recovery](docs/runtime-recovery.md).
36
36
 
37
- DSMM-managed external LSP isn't enabled in this version. Its implementation, interfaces and original configuration remain, but automatic MCP mounting stays off even with `lsp.enabled:true` and DSMM's settings UI hides LSP controls. DSH's own LSP and independently configured MCP are unaffected. The retained historical manual patch isn't a supported DSMM activation entry. Existing release checks still independently validate the retained LSP interface, without making automatic integration a delivered feature. See [LSP boundary](docs/lsp.md).
37
+ Skills expose metadata first and read bodies on demand within the admitted Agent scope. Deepwork off hides DSMM skills, not Host/project resources or role restrictions. Non-DSMM ancestor resource winners remain authoritative. [Source synchronization](docs/skill-sync.md) covers packaged resources, licenses and attribution.
38
+
39
+ DSMM-managed external LSP remains disabled, including with `lsp.enabled:true`. It isn't automatically remounted by Save, restart or Deepwork activation. DSH's own LSP and independently configured MCP are unaffected. See [LSP boundary](docs/lsp.md).
38
40
 
39
41
  ## Use a local artifact
40
42
 
41
- Start with the built and packed candidate supplied by your artifact checks, not a registry reinstall of `0.2.0`. For a disposable CLI evaluation, the minimal installation step is:
43
+ Use an explicitly authorized built 0.3.1 artifact for evaluation, not the published 0.3.0 package. For a disposable CLI evaluation:
42
44
 
43
45
  ```powershell
44
46
  $env:DSH_HOME = "<disposable-test-home>"
@@ -47,32 +49,14 @@ dsh plugin --profile <test-profile> add <absolute-path-to-local-candidate.tgz>
47
49
  dsh --profile <test-profile> --dump-config
48
50
  ```
49
51
 
50
- Use an empty test home and a fresh profile. These are operator-run examples, not permission to install software or touch a real Desktop/TUI profile. Headless needs a separately configured native provider and effective `defaultActive:true` for task execution; it doesn't select Agent presets. Don't copy credentials or account records into a test. `--dump-config` shows native Loader composition, not the full global-aware DSMM admission.
51
-
52
- For a real installation, authorize the target carrier and profile separately after artifact checks. Desktop and CLI/TUI profiles are independent. Keep the existing provider/account configuration, exact effort, unrelated Loader rows and history. Desktop package handling belongs to its installation-owned carrier with the app fully quit; a standalone CLI or copied Desktop profile isn't a substitute, and package installation alone doesn't prove Electron activation.
53
-
54
- ### Explicit managed runtime startup
55
-
56
- The default `cordis.patch.yml` adds only the main DSMM entry and **doesn't replace the stock runtime**. Managed delivery requires an explicit cold overlay based on [patches/subagent-runtime.yml](patches/subagent-runtime.yml), followed by an independent restart. Verify the actual native row identity, disable the stock `subagent` row, and bind one Host-owned DSMM runtime in the same scope. Preserve native spawn/fork/model/Gateway services and copy any explicit stock capacity/depth settings into the new row.
57
-
58
- `@dsmm/dsmm/subagent-runtime` maps to `lib/runtime-integration.js`; its default export is the Host-owned startup plugin. It isn't automatic hot replacement or merely the bare runtime class. Inspect `binding`, `deliveryFenceReady` and `restartRequired` separately. A stock, missing or unready binding reports its limitation instead of claiming managed readiness. See [runtime composition](docs/settings-status.md#child-runtime-composition) and [compatibility](docs/compatibility.md).
59
-
60
- ### Configuration and capture boundaries
61
-
62
- Resolution is **defaults → sparse global deployment → explicit native entry/profile → immutable named overlay**. Objects merge, arrays replace, and unset removes only the current layer's key. Global storage is `<resolvedDshHome>/plugins/dsmm`, a DSMM convention; trusted home resolution uses explicit `profileContext.home`, then `DSH_HOME`, then the native `~/.dsh` default.
63
-
64
- Startup freezes mounted capabilities. New ordinary roots capture current valid desired deployment; existing roots, including blank ones, and their future children keep their baseline. Explicit idle profile Apply replaces only the permitted overlay on that old baseline. Existing children stay captured. Saves don't remount services or upgrade permissions; absent startup capability requires restart. Global-only `modules.deepwork.enabled` defaults true, while ordinary mode defaults off. Turning the module on from cold-off requires an explicit restart.
65
-
66
- Global writes retain byte-revision CAS, cooperative locking and final recheck; native profile saves retain their own authorization/CAS. They aren't a cross-layer transaction or protection against every non-cooperating editor. The fixed configuration RPC requires the real native operator peer, public loopback bind, writable Host and lifetime rechecks. A loopback-looking URL or client assertion doesn't grant access.
67
-
68
- Durable DSMM metadata needs explicit deployment-only `sessionPersistence` on the main entry, preserving the existing effective root/compression and disabling the exact stock JSONL row at startup. The public `./session-persistence` export is a library building block, not a second Loader entry. See [persistence compatibility](docs/compatibility.md#session-persistence-compatibility).
52
+ Use an empty test home and a fresh profile. These examples aren't authorization to install software or change a real Desktop/TUI profile. Headless task execution requires a separately configured native provider and effective `defaultActive:true`; it doesn't select Agent presets. `/deepwork [off|message]` and inspection-only `/dsmm-status [json]` belong to the Host command adapter, not headless task text. `--dump-config` shows Loader composition, not full Global-aware admission.
69
53
 
70
- ## Upgrade and safety limits
54
+ Real installation must preserve providers/accounts, credentials, unrelated Loader rows and history. No old-profile or cold-history migration is supplied. Desktop plugin installation follows publication and requires the exact rc.2 Host; it doesn't upgrade the Host. See [compatibility](docs/compatibility.md) and [release policy](docs/releasing.md).
71
55
 
72
- The experimental legacy read adapter is **off by default** and programmatic-only. `DsmmHostStartupOptions.experimentalLegacyRead` requires real closed Host collaborators through `createDsmmHostPlugin` or named `apply`'s third argument. The old `legacyRead` option isn't consumed. No YAML/JSON flag certifies Host callbacks, approvals or durability. Cross-process cleanup, pre-drain ordering and published replay aren't fully verified; missing capability stays unavailable. See [legacy boundaries](docs/compatibility.md#experimental-legacy-read).
56
+ ## Safety and network limits
73
57
 
74
- Existing exact legacy profile libraries stay read-only with their immutable pins; there is no automatic migration or same-name fallback. Retired `deepseekV4ProMaxReasoningPresets` and `deepseekFlashMaxReasoningPresets` reject with `deprecated-field`; configure explicit levels deliberately, without rewriting old fields automatically. Older auxiliary-root sessions can fail native cold resume. Preserve history and obtain direction rather than substituting a persona or resetting a session.
58
+ DSH owns approval, sandboxing, depth and cancellation. DSMM narrows authority through role, tool and exact-call checks; it doesn't create a second approval queue or reusable grants. Native once approval applies only to that call and scope. See [native permissions](docs/native-permissions.md) and [safety guards](docs/safety-guards.md).
75
59
 
76
- For earlier ocmm adapters, consult the [historical migration guide](docs/migration-from-ocmm.md). [Source synchronization](docs/skill-sync.md) covers fixed-pin resources and offline readiness. [Release policy](docs/releasing.md) covers publication evidence, which doesn't establish this candidate's Desktop/TUI activation. No user configuration, account, history or installation is automatically changed.
60
+ Search/Fetch remain explicitly selected native providers. The optional Fake-IP fetch adapter, its exact `/16` policy and network limits are documented in [Fake-IP fetch](docs/web-fetch-fakeip.md). The shell rejection source remains unknown; neither tool Allow nor disabling sandbox is a network fix.
77
61
 
78
- *Author's note: For a DSH operator evaluating the local candidate; use an isolated artifact first and authorize each real installation or compatibility repair separately.*
62
+ Retired brand-specific routing fields reject rather than migrate. Unsupported configuration and history stay untouched. [Moving from ocmm](docs/migration-from-ocmm.md) maps concepts without importing another Host's configuration or sessions.
package/cordis.patch.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  - insert:
2
2
  - id: dsmm
3
3
  name: '@dsmm/dsmm'
4
+ inject: [profileContext, agents]
4
5
  config: {}
@@ -1,6 +1,6 @@
1
1
  # Deepwork Agent presets and child control
2
2
 
3
- This guide describes built source behavior on the native DSH integration, not automatic availability in the published `@dsmm/dsmm@0.2.0` artifact. Native package composition and callable admission must both exist.
3
+ DSMM 0.3.1 targets exactly DSH `0.2.1-rc.2`. Native package composition and callable admission are separate requirements.
4
4
 
5
5
  ## Roles and composition
6
6
 
@@ -8,9 +8,13 @@ The canonical inventory is 11 base roles and 11 categories. Base roles are orche
8
8
 
9
9
  Only Orchestrator and Builder (`primary`) and Planner (`all`) are root-eligible. Planner root exposure additionally requires `presets.plannerRootEnabled: true`; it defaults false. This does not disable `roles.dsmm-planner` (default true), its native workflow provider, or its read-only delegation. Other roles are auxiliary-only (`subagent`), regardless of enablement. Native preset selection displays `DW …` labels under unchanged IDs. A role name is a responsibility, not a model choice or authority claim.
10
10
 
11
- Native `agentPresets.register({id, plugins})` registers root compositions; DSH doesn't discover them by scanning exported directories. Generated `agent-presets/` mirrors are inspection/export resources. `presets.materialize` defaults off and never selects the Host default preset. Personas, read-only restrictions and host approvals remain when explicit Deepwork off hides common workflow and DSMM skills. Complete adapted source content and resources are described in [source synchronization](skill-sync.md).
11
+ Native `agentPresets.register({id, plugins})` registers compositions for roots and role spawning; DSH doesn't discover them by scanning exported directories. rc.2 has no child-only preset field: auxiliary catalog visibility doesn't grant root eligibility, and creation/execution checks reject invalid roots. Generated `agent-presets/` mirrors are inspection/export resources. `presets.materialize` defaults off and never selects the Host default preset. Personas, read-only restrictions and host approvals remain when explicit Deepwork off hides common workflow and DSMM skills. Complete adapted source content and resources are described in [source synchronization](skill-sync.md).
12
12
 
13
- The Planner root flag follows the existing deployment `presets` scope: Global config and the current DSH entry may set it; named/session overlays cannot. The complete `presets` group is startup-pinned. Saving desired changes neither migrates running Agents nor changes the standing registry; next-root settings report `restartRequired: ["presets"]` until an independent Host restart. After restart, disabled Planner roots are not registered for native picker, definition export or mounting, and forced native/API creation or root resume is refused before prompt/provider execution. Opting in still requires the enabled module, enabled role, usable native composition and current admission; it never grants writes. Original child captures do not contain `presets`: old captured workflow Planner children retain their original route, epoch and read-only ceiling without migration or current-parent permission reconstruction. Harness's native `/plan` and its plan-mode composition remain unchanged.
13
+ Optional preset materialization writes only DSMM-owned role directories under its configured root. Ownership requires the exact role-bound marker and expected regular files; foreign directories, extra entries, links and containment escapes refuse update/removal. New directories publish by same-parent rename. A legacy marker is accepted only with the complete expected regular-file shape, never as permission to claim unrelated content. Disabling a role or materialization removes only verified owned directories. Materialized files remain export resources, not an alternative native registration mechanism.
14
+
15
+ Managed Agent scopes supply their own `harness:identity` system section. The ordinary native identity remains unchanged outside those scopes; the override doesn't grant a role, tool or permission based on its displayed name.
16
+
17
+ The Planner root flag follows deployment `presets`: Global and the current DSH entry may set it; named overlays cannot. This startup-pinned group requires an independent restart when changed. Planner can remain available for child spawning while root use is disabled. Forced creation and empty-root preset changes still require valid root admission before execution. Opting in requires the enabled module, role and usable composition; it never grants writes. Harness's native `/plan` remains collaboration state, not a permission upgrade.
14
18
 
15
19
  Standing Orchestrator/Builder compositions include native planning, compaction/pruning, question and todo rows. Planner includes planning, compaction/pruning and questions, but no todo writer. Coding/frontend/deep/complex/cross-cutting include compaction/pruning, questions and todo; other auxiliary roles add none of those rows. Native spawn can retain parent services, so this isn't a promise to strip every inherited row from short children. Effective filters and execution fences still decide access. Native `/plan` doesn't upgrade Planner permissions, and `/compact` remains a human native command.
16
20
 
@@ -25,7 +29,7 @@ Standing Orchestrator/Builder compositions include native planning, compaction/p
25
29
  | deep, complex, cross-cutting | Utility leaves and coding/frontend/hard-reasoning/creative/documenting specialists |
26
30
  | Native child Builder | Bounded utility leaves, not stage ownership |
27
31
 
28
- No child gains coordination authority from a preset label, persona or durable role string. The shared role policy checks exact live native ownership, original child capture, admitted epoch and provider/definition identity. Generic spawn can't bypass role admission in a DSMM-owned workflow. Unrelated ordinary off-mode native children retain Host behavior without acquiring DSMM delegation.
32
+ No child gains coordination authority from a preset label, persona or serialized role string. The shared policy checks exact live native ownership/admission and provider/definition identity. Each call has its own pending child correlation; awaited creation installs immutable policy before queued input executes. Generic spawn/fork can't bypass role admission in a DSMM-controlled workflow. Unrelated ordinary off-mode native children retain Host behavior without acquiring DSMM delegation.
29
33
 
30
34
  Read-only roles remain read-only independently of mode and optional guards. Planner returns complete Markdown for native review/handoff; an authorized coordinator persists it. There is no Planner writer. Native catalog visibility and role permission are separate: a schema or read-only catalog listing doesn't authorize invocation, and own-layer native schemas may remain visible even when mandatory execution fences deny them.
31
35
 
@@ -35,27 +39,35 @@ Descendants intersect parent allow-lists with requested restrictions and union d
35
39
 
36
40
  Actual per-role or parameterized tool names, target IDs and `level`/opt-in `route` parameters are documented in [model routing](model-routing.md#tool-topology-and-target-filters). Default level is normal; low/high/max require explicit target configuration. Root model selection stays native-owned. Children capture route, visible-output locale and authority at admission, not from a parent's later profile.
37
41
 
38
- Foreground one-shot is the deployment default. A one-shot waits for useful native result/output and settles; its terminal child can't be revived as a continuable conversation. Structured result capture, cancellation, storage, capacity and teardown remain native-owned.
42
+ Waiting for the official activation result is the default (`delivery:'caller'`). Only `stopReason:'completed'` is normal completion. Native output, structured result, diagnostics and partial output retain their separate meanings; interrupted or failed activation isn't reported as success. Cancellation after publication uses the activation receipt's `dispose()` and waits for cleanup, including cancellation racing with receipt creation.
39
43
 
40
- Explicit `enableRunInBackground` permits native jobs. With `backgroundMode:"one-shot"`, calls wait unless `run_in_background:true`. With opted-in `backgroundMode:"continuable"`, background continuation is the call default; `run_in_background:false` still waits for one-shot work. Continuable start requires a real native `prepareContinuable` method, not a capability flag alone. Omitted `maxDepth` delegates to the native limit; deployment depth/background settings aren't named-profile fields.
44
+ Explicit `enableRunInBackground` exposes `run_in_background`. Only `true` selects background delivery, before start, using native `delivery:'parent'`. It returns accepted child/message information, and the native activation notifies the parent on completion. A legacy `backgroundMode` value isn't a selector for another execution owner or a promise of cold continuation. Omitted `maxDepth` delegates to the native limit; deployment depth/background settings aren't named-profile fields.
41
45
 
42
- A running foreground one-shot can be handed to background jobs using the exact published run, tool call, parent session and admission epoch. This transfers the same native run, not a restarted prompt or second child. The receipt reports `background`, `already-background`, `already-settled` or `cancelled`, with the same run ID and job ID where applicable. Starting, settled, cancelled, stale or unauthorized requests don't imply a new execution.
46
+ A running waiting call can't be handed to background. There is no restart-as-handoff, second child or DSMM RoleRun/job owner. Native activation owns execution, results and disposal.
43
47
 
44
- ## Native child panel and report
48
+ ## Child reports and control interfaces
45
49
 
46
- The session-scoped Conversation child panel shows actual runs, direct children and a read-only descendant tree. IDs, activity, mode, admitted role/level, route comparison, original evidence and disabled reasons remain separate facts. Corrupt, unsupported or unavailable branches show diagnostics, not fabricated successful results. Descendant inspection doesn't grant control over non-direct children.
50
+ Child report interfaces expose actual runs, direct children and a read-only descendant tree. IDs, activity, mode, admitted role/level, route comparison, original evidence and disabled reasons remain separate facts. Corrupt, unsupported or unavailable branches report diagnostics, not fabricated success. Descendant inspection doesn't grant control over non-direct children. The current client doesn't register a separate Conversation child tab; retained interfaces or components aren't proof of a reachable panel.
47
51
 
48
- Route comparison uses real initial `invocation-capture` and the child's latest `own-native-request-header`. Missing/invalid/unobserved evidence remains unknown, never inferred from the root route, current profile or compatibility invocation projection. Original capture evidence and conservative legacy evidence expose `provenFields` and limitations; neither a role label nor an empty limitation list proves full old-configuration recovery.
52
+ Route comparison uses the live admitted `invocation-capture` and the child's latest `own-native-request-header`. Missing, invalid or unobserved evidence remains unknown; it is never inferred from a root route, current profile or role label. Display metadata isn't a cold-recovery credential.
49
53
 
50
- Human messages target only an admitted direct continuable child with current parent authority and ready delivery fencing. Entries whose observed control projection is read-only remain inspection-only; this isn't the role's tool-level read-only policy. **Queue** accepts a distinct later turn; **Steer** targets the nearest step. Idle/cold continuation keeps the same durable child ID. Native attachment and model admission validate images separately.
54
+ Human messages target only a supported live direct child with current exact-parent authority and native capabilities. Entries whose observed control projection is read-only remain inspection-only; this isn't the role's tool-level read-only policy. **Queue** accepts a distinct later turn; **Steer** targets the nearest step. An idle live child can receive another turn, but DSMM cold resume without trusted live binding is unsupported. Native attachment/model capabilities separately determine image availability.
51
55
 
52
56
  An inbox receipt means **accepted**, not executed or completed. An interrupt acknowledgment isn't completion and doesn't claim queued work was removed. If transport leaves a send outcome unknown, the draft stays visible and automatic resend is disabled. Inspect the native child conversation before explicitly allowing a new message, which could duplicate an accepted one. Refresh and reconnection never imply automatic retry.
53
57
 
54
- ## Explicit runtime and legacy boundaries
58
+ ## Invocation presentation
59
+
60
+ Native per-role and parameterized delegation call views distinguish **requested** role/category/level from **actual** validated invocation metadata. Pending raw arguments don't prove execution; error results or missing metadata don't establish actual identity. Route source and model IDs are shown only from the validated result projection, not inferred from a role name or requested route.
61
+
62
+ Collapsed rows show **调用 Coding** / **Call Coding** once a complete target is available, even while remaining arguments stream. Child labels use **Coding: task description**. Failures, interruptions and current-format replay, including nested PTC, keep the requested name without inventing actual execution. Native safety refusal views take precedence.
63
+
64
+ Arguments, result content, errors and metadata remain inspectable as JSON. Nontext results don't receive a rich preview. Calls without a usable native window use native fallback behavior. The view is presentation-only: it doesn't select a route, change approval or grant delegation authority.
65
+
66
+ ## Runtime and admission boundaries
55
67
 
56
- Managed delivery uses explicit cold-start `@dsmm/dsmm/subagent-runtime` composition and the optional [runtime patch](../patches/subagent-runtime.yml), not automatic replacement by the default bundle. Keep one provider in the same Host scope, preserve native spawn/fork/model/Gateway services, and retain explicit stock capacity/depth settings. Runtime binding, delivery readiness and restart requirement are observable separately. See [settings](settings-status.md#child-runtime-composition).
68
+ Official AgentRegistry, SubagentRuntime and JSONL namespace plugins own execution and storage. There is no custom Registry/Runtime selector, manual-runtime activation path or companion requirement. Native runtime availability and actual DSMM admission are still separate observations; seeing a catalog isn't proof of callable policy. See [settings](settings-status.md#child-runtime-composition).
57
69
 
58
- An old child without complete original capture uses conservative evidence and per-field limitations, not the current parent's settings as recovered history. The separate legacy read adapter remains default off and requires explicit trusted Host composition. Its compatibility boundary doesn't grant arbitrary writes, invented approvals or durable guarantees. See [compatibility](compatibility.md); named legacy storage and old-child admission evidence aren't the same mechanism.
70
+ Cold DSMM recovery without a trusted live binding refuses execution and preserves history. Logs, IDs, PluginRecord display data or current parent settings can't restore authority. Read-only history queries don't resume Agents. `preset-skills` is an internal handle installed and released by the admitted Agent scope, not a public plugin. See [compatibility](compatibility.md#retired-compatibility-surfaces).
59
71
 
60
72
  Native Host commands, sessions, inbox, permissions, process/cwd/model selection and transports retain ownership. DSMM supplies role admission and bounded controls, not a replacement lifecycle scheduler, generic permission bypass or automatic retry system.
61
73
 
@@ -1,102 +1,43 @@
1
1
  # DSMM compatibility and upgrade boundaries
2
2
 
3
- This document describes the **local source candidate**, not a newly published release. The manifest remains `@dsmm/dsmm@0.2.0`, which is an existing registry version; that version string doesn't prove the registry artifact contains these source features. Evaluate the actual local packed artifact. Formal package/smoke checks and authorized installed-host acceptance are separate evidence, and neither is declared complete here.
3
+ **DSMM 0.3.1 targets exactly DSH `0.2.1-rc.2`** and Node.js 22 or later. Older SDKs and automatically drifting versions aren't supported targets.
4
4
 
5
5
  ## Supported integration
6
6
 
7
- | Surface | Contract | Boundary |
8
- | --- | --- | --- |
9
- | Node.js | 22 or later | Required runtime |
10
- | DSH SDK/component peers | `0.2.0-rc.2` | Current native integration target, not a future-version guarantee |
11
- | Cordis / Schemastery | `~4.0.4` / `~3.18.4` | Declared package contracts |
12
- | Native Web UI | Plugins item/bundle/row forms, Settings Profiles and Conversation controls | Actual Host identity and capabilities still required |
13
- | Desktop source | Official `0.2.1-alpha.1` shared PluginManager/Web Host contracts | Source compatibility only, not executable/Electron activation |
14
- | CLI/headless | Native deployment configuration and delegation tools | One-shot headless doesn't select Agent presets |
15
- | TUI | Independent native deployment profile | Package installation doesn't prove every Web client control is exposed in TUI |
16
- | Managed child runtime | Explicit cold `./subagent-runtime` composition | Not installed by the default bundle |
17
- | DSMM-managed external LSP | Not enabled in this version; interfaces and original config retained | Automatic MCP mounting stays off even with `lsp.enabled:true`; DSMM settings UI hides LSP controls |
7
+ Official AgentRegistry, SubagentRuntime and JSONL namespace plugins own execution and storage. Basic role delegation uses native activation results and cancellation. There is no DSMM Registry/Runtime owner to select, manual-runtime overlay to install or persistence companion to configure. Keep the native storage root, compression and unrelated Loader entries unchanged.
18
8
 
19
- DSMM is the localized package/Core title; Deepwork names its optional module. Deepwork Profiles and `DW …` role labels don't rename package, Loader, command, role, provider or persistence IDs. Native metadata uses exported `locale/en.json` and `locale/zh.json`, not an invented manifest `displayName`.
9
+ Native Web surfaces are Plugins bundle configuration, Settings Profiles, the compact Conversation menu and delegation call views. CLI/headless use native deployment and tools; headless doesn't select Agent presets. TUI and Desktop retain their own carriers and exposed UI capabilities; Web controls aren't necessarily exposed in TUI.
20
10
 
21
- The LSP restriction doesn't affect DSH's own LSP or independently configured MCP. The retained historical manual patch isn't a supported DSMM activation entry. Existing release checks still independently validate the retained LSP interface; they don't establish automatic integration availability. See [LSP boundary](lsp.md).
11
+ `preset-skills` is internal Agent-scoped installation, not a public Loader plugin. DSMM-managed external LSP stays disabled even with stored `lsp.enabled:true`; native DSH LSP and independently configured MCP remain unaffected. See [LSP boundary](lsp.md).
22
12
 
23
- ## Stable configuration and admission
13
+ ## Configuration and actions
24
14
 
25
- Core settings remain available without a session and with Deepwork cold-off. Native Global and current-profile saves are independent: Global writes only central `config.json`; the exact native profile form writes only its own patch. Invalid or dirty input remains visible after refusal. There is no Save-all, second configuration store or implicit restart.
15
+ Core configuration and native permissions work without a session or active Deepwork. Resolution is defaults → sparse Global → explicit native entry/profile → admitted immutable named overlay. Objects merge, arrays replace, and false/empty/same-default pins remain explicit. Unset only removes the edited layer.
26
16
 
27
- The sparse resolution order is defaults → global deployment → explicit native entry/profile → admitted immutable named overlay. Explicit same-default values remain overrides, objects merge, arrays replace, and unset removes only its own layer's key. Runtime profiles may narrow `roles` and select routing, topology and visible-output locale, but can't grant deployment-only route-override permission, mount services, change accounts or replace persistence. Required-role rules don't create missing startup capability. See [profiles](profiles.md) and [settings/status](settings-status.md).
17
+ Global and exact native-profile saves are independent. Native form identity/revision and base/user provenance are required; no fallback Global write or cross-layer transaction is implied. Named documents, future-default pointers and actual admission remain separate. Desired saves don't change mounted capability or a running Agent's policy. Without a session, actual admission is unknown.
28
18
 
29
- Draft, saved revision, future-default pin and current admission are separate states. Save activates neither scope. Future-default changes leave existing Agents, including blank ones, unchanged. Current-session Apply requires an exact idle ordinary root, selection CAS and admission epoch; it commits only that root's immutable overlay on its existing deployment baseline. Existing children retain their original captures, and later children inherit the new parent admission. Busy or stale targets aren't queued.
19
+ Save and future-default selection remain available under their own authority. **Live overlay Apply is unavailable; choose a default for a new session.** Native **Use profile model** and **Deepwork mode** have independent capabilities, not Apply's disabled gate. Use profile model consumes the admitted immutable configuration and respects newer native manual model/effort intent, including same-value reselection. Ordinary roots otherwise retain native selection. See [Profiles](profiles.md) and [settings/status](settings-status.md).
30
20
 
31
- Global CAS uses actual-byte revision, cooperative locking, final recheck and atomic replacement. Native profile saves have separate native authorization/CAS, not a cross-layer transaction. These safeguards don't promise a universal transaction against non-cooperating external editors. Configuration RPC requires native invocation peer equal to the operator, public loopback bind, writable Host and owner/lifetime rechecks. Remote or unknown carriers refuse; a client `isLoopback` claim, tunnel or loopback-looking URL isn't authority.
21
+ Stores use separate CAS and atomic-write boundaries. Committed saves aren't rolled back in the response because observation/notification failed: report refresh-required or unsynchronized status. An unconfirmed native mutation requires authoritative reread before retry. Operator, connection and owner lifetime remain valid through precommit; client claims or loopback-looking URLs don't authorize writes.
32
22
 
33
- Cold resume creates a new admission using valid deployment and the exact committed sidecar, or the scoped future default when no sidecar exists. Corrupt/unavailable sidecars don't silently fall back. Clear/compact doesn't transfer choices through inferred lineage. An exact old `<profileContext.dir>/dsmm-profiles` library remains strictly read-only with its original immutable pins; central same-name documents aren't substitutes. Nothing is automatically copied or migrated.
23
+ ## Execution and recovery
34
24
 
35
- ## Models, roles and native controls
25
+ Role calls wait for native activation results by default; only `completed` is normal completion. Cancellation after publication uses activation disposal and cleanup. Enabled background execution selects `delivery: 'parent'` before start. The accepted child/message receipt and interrupt acknowledgment aren't completion. Running waiting tasks can't transfer to background.
36
26
 
37
- Ordinary roots preserve native provider/model/exact effort across activation, Save, profile Apply, later turns and cold resume. **Use profile model** is a separate explicit native action using the current admitted immutable revision. A newer manual selection wins. Locale is captured visible-output preference, subordinate to an explicit user language request, not a change to internal reasoning or technical identifiers.
27
+ Queue/Steer/interrupt apply only to supported live direct children under exact-parent/operator authority. Descendant views are read-only. Missing native capability disables that operation with a reason; unknown sends aren't automatically resent. Requested role/model data isn't actual execution identity. See [Agent presets](agent-presets.md).
38
28
 
39
- Eligible child targets use normal by default; low/high/max require explicit exact-target levels. Unsupported effort refuses without downgrade. Per-role and parameterized topologies preserve canonical target filters, definition/provider identity, role matrix, depth and permission checks at execution. Disabled roles remain diagnosable and routing-editable without becoming callable. Orchestrator isn't a child target. `modelSelectionSettings:false` remains unchanged. See [model routing](model-routing.md).
29
+ DSMM cold resume without trusted live admission is unsupported, including direct/Gateway resume paths. Configuration, PluginRecord metadata, labels or child IDs can't reconstruct authorization. Preserve readable history; don't substitute a persona, reset a session or import old data automatically. DSMM history inspection doesn't resume Agents. Native factory load/repair can precede the created guard, so refusal doesn't promise the log was never opened. Clear/compact can retain policy only with the exact live object and admission, not inferred lineage.
40
30
 
41
- Native child capture records original role, invocation route, locale and authority. Descendants intersect parent allow-lists and accumulate deny-lists. A later parent profile doesn't rewrite child history, lift startup ceilings or recover missing capture. Current exact-parent authority is checked again for delivery, so a retained child capture isn't permission to bypass a newer cutoff. Route comparison uses initial invocation capture and that child's own request header; absent evidence stays unknown.
31
+ Standard supported model calls use native prepared calls. Raw/custom and Pi-AI stop-only calls use the minimal public completions seam for self-contained literal or explicit model-mapping configurations. Catalog-backed raw combinations that can't be reliably reproduced are rejected for both native and DSMM parameter sources, without disabling standard Coding. Native effort encoding/capability metadata isn't rewritten. See [model routing](model-routing.md).
42
32
 
43
- With background explicitly enabled and native jobs available, a published running foreground one-shot can transfer to background as the **same native run**. This doesn't replay a prompt, create a second child or revive settled work. Run receipts distinguish background, already-background, already-settled and cancelled outcomes.
33
+ ## Retired compatibility surfaces
44
34
 
45
- Only an admitted direct continuable child with ready delivery fencing can accept Queue/Steer or interrupt. Descendant inspection is read-only and doesn't grant non-direct control. Idle/cold continuation keeps the durable child ID. Accepted inbox delivery isn't completion; interrupt acknowledgment isn't completion or proof queued work was removed. Unknown send outcomes retain the draft and disable automatic resend, including after refresh/reconnection. See [Agent presets and child control](agent-presets.md).
35
+ No old SDK branch, legacy-read host, cold-profile migration, session repair or custom-owner selector is a 0.3.1 activation path. Old libraries, captures and unmarked history aren't copied, rewritten, repaired or adopted by same-name fallback. Retired brand calibration/default-effort and MaxReasoningPresets fields reject with `deprecated-field`; edit configuration deliberately using generic routes and parameters.
46
36
 
47
- `startup-lock` is the default role strategy; bounded `rate-limit-fallback` is explicit. Every retry or switch requires correlated positive no-output evidence. Partial text, reasoning or tool fragments forbid replay, even on the same route. Process-local retry state isn't revived from old headers and generic failures don't authorize hopping. Native lifecycle, model authentication and cancellation stay Host-owned. See [runtime recovery](runtime-recovery.md).
37
+ Published **0.3.0 retains its rc.1 identity**, immutable tag, package, assets and version-bound receipt grammar. Historical release controls interpret those records under their original identity, not as a runtime compatibility branch.
48
38
 
49
- ## Explicit managed runtime composition
39
+ ## Installation boundaries
50
40
 
51
- The default `cordis.patch.yml` is unchanged and adds only the main DSMM entry. It doesn't replace the stock `subagents` service. Managed delivery needs the explicit cold overlay [patches/subagent-runtime.yml](../patches/subagent-runtime.yml) and an independent restart.
41
+ Evaluate an authorized built artifact in an isolated home/profile as in the [README](../README.md#use-a-local-artifact). Real Desktop/TUI/CLI plugin installation needs exact authorization and the matching rc.2 Host; it doesn't authorize upgrading the Host, touching credentials/history or copying a Desktop profile into another carrier.
52
42
 
53
- The patch targets stock ID `subagent` with name `@deepseek-ai/dsh-subagent`, disables that row, adds `@dsmm/dsmm/subagent-runtime`, and makes the main DSMM entry depend on `subagents`. Native `name` asserts the target identity; it isn't a rename. Check the actual Host composition before applying it. Preserve spawn/fork/model/Gateway services in the same scope and copy explicit stock capacity/depth configuration into the new runtime row. Keep one active runtime; don't hot-shadow or replace a running stock service.
54
-
55
- The public `./subagent-runtime` export maps to `lib/runtime-integration.js`. Its default export is `subagentRuntimePlugin`, the Host-owned startup entry that constructs the public DSMM runtime subclass. A separately constructed class isn't proof of Host admission ownership. Runtime projection separates `binding: stock | dsmm | unavailable`, `deliveryFenceReady` and `restartRequired`. Missing native history, providers or admission fencing can't be replaced by an availability flag. Core stays usable, while unavailable controls return a refusal rather than a successful-looking receipt.
56
-
57
- ## Experimental legacy read
58
-
59
- Old children without complete original capture expose conservative evidence, `provenFields` and per-field limitations. Neither the current parent's settings nor a role label proves their old configuration. Legacy child evidence and read-only legacy profile storage are separate mechanisms.
60
-
61
- The legacy read adapter is **default off**. The consumed programmatic interface is `DsmmHostStartupOptions.experimentalLegacyRead`, passed to the main package's `createDsmmHostPlugin(startup)` or named `apply(ctx, config, hostStartup)` third argument. The old `legacyRead` option isn't consumed. It isn't a deployment/profile YAML field or an RPC switch.
62
-
63
- Cold composition requires actual closed Host callbacks for composition capture, read bindings, call context, audit/retirement fault reporting and revocation. The constructor checks those collaborators; serializable assertions aren't a substitute for real Host operation/approval/audit ownership. Export resolution alone doesn't certify that a carrier supplies them.
64
-
65
- Cross-process **known-retained-owner cleanup**, **B await/pre-drain ordering** and **published replay** aren't fully verified. This adapter isn't a stable general legacy-execution or cross-process guarantee. An unproven capability remains unavailable, never supplied by a fabricated attestation, inferred approval or permissive fallback. Keep it off for the stable captured-child path; don't weaken existing Core saves, CAS, model intent or permission cutoffs to accommodate it.
66
-
67
- ## Session persistence compatibility
68
-
69
- DSH `0.2.0-rc.2`'s stock `Session.append` can't attach the `ignorable` envelope marker needed for unknown custom events. DSMM's public companion delegates to native JSONL in a separate Context and marks only validated `deepwork/mode` and `dsmm/role-policy` records. DSMM-aware readers retain them; stock readers can skip the marked records. Other event types and malformed metadata aren't broadly declared safe.
70
-
71
- Use the **main** `@dsmm/dsmm` entry's deployment-only `sessionPersistence`. The `./session-persistence` export is a library building block, not a second Loader entry. Set the unchanged effective absolute root and effective `zstd` or `none` compression, disable the exact existing native provider at startup, and wait for the companion to become ready. No root is guessed, migrated or hot-replaced. Incompatible durable providers block custom DSMM appends; ephemeral Hosts without persistence remain allowed.
72
-
73
- For a composition using the stock row below, this is a **partial template**, not a ready-to-copy replacement:
74
-
75
- ```yaml
76
- - id: session-persistence-jsonl
77
- name: '@deepseek-ai/dsh-session-persistence-jsonl'
78
- disabled: true
79
- - id: dsmm
80
- name: '@dsmm/dsmm'
81
- config:
82
- # Retain every existing DSMM config value here.
83
- sessionPersistence:
84
- root: '<unchanged-effective-absolute-root>'
85
- compression: '<unchanged-effective-zstd-or-none>'
86
- ```
87
-
88
- Native patch `config` replaces the whole object. Preserve all existing settings and unrelated rows; another provider ID or a provider-free composition requires its own exact check. Keep one main DSMM Loader source to avoid conflicting native client registrations. Binding, marked durable writes and native/stock read behavior need artifact verification; an export existing isn't proof of persistence ownership.
89
-
90
- This prevents unsafe future writes but doesn't repair existing unmarked logs. Any metadata-only repair needs separate authorization, a recoverable targeted backup and validation. Don't bypass unknown-event guards, delete history or silently reset a failed restore.
91
-
92
- ## Installing or upgrading a real Host
93
-
94
- Use a checked local candidate artifact for evaluation, following the [isolated example](../README.md#use-a-local-artifact). Installing registry `0.2.0` isn't a way to obtain these new source interfaces. Publication follows separate [release controls](releasing.md); no new npm publication or automatic Desktop installation is claimed here.
95
-
96
- Desktop and CLI/TUI use independent native deployment profiles. A separately authorized real installation must use the correct installation-owned carrier, preserve unrelated Loader rows, provider/account catalogs, role policies and UI preferences, and follow explicit startup requirements. Desktop must be fully quit for package handling. Neither a standalone CLI nor a renamed/copied Desktop profile proves supported Desktop activation. Confirm native inventory and actual UI only with authorization; don't use anonymous RPC as a shortcut.
97
-
98
- Old `deepseekV4ProMaxReasoningPresets` and `deepseekFlashMaxReasoningPresets` fields fail with `deprecated-field`. Don't silently rewrite them; explicit levels need a deliberate configuration edit. Older sessions rooted directly in now-auxiliary roles can fail native cold resume because the root preset isn't registered. Preserve their history and obtain direction rather than substituting another persona. Rollback doesn't authorize credential or history changes.
99
-
100
- No package operation here authorizes changing real Desktop/TUI configuration, accounts, credentials or history. Do not copy credentials for keyless artifact checks. Platform, packed-runtime, Web and Electron evidence aren't interchangeable; local source capability isn't a release-completion or installed-host certificate.
101
-
102
- *Author's note: For a DSH operator upgrading an existing installation; check the exact artifact and Host composition, then authorize only the intended carrier and data-preserving changes.*
43
+ Desktop plugin installation follows publication and requires the exact rc.2 Host; it doesn't authorize a Host upgrade. [Release controls](releasing.md) define publication and delivery. [Fake-IP fetch](web-fetch-fakeip.md) owns network details and limits; shell rejection remains unresolved. [Native permissions](native-permissions.md) defines approval scope.
@@ -1,19 +1,15 @@
1
- # 原生审批期间切换准入配置:已接受的暂缓风险
1
+ # 原生审批与运行中配置边界
2
2
 
3
- **状态:风险已接受,暂缓修复;不代表功能已修复。** 适用基线为 DSH `0.2.0-rc.2`,仅豁免下述场景的阶段性验收,不豁免其他测试失败或发布检查。
3
+ DSMM 0.3.1 精确面向 DSH `0.2.1-rc.2`。原生批准仅对同次调用及其批准范围有效,不扩展到其他输入或后续调用。配置来源变化不把 DSMM epoch 变成第二次审批,也不取消已经等待的原生审批。
4
4
 
5
- ## 触发条件与影响
5
+ ## 当前限制
6
6
 
7
- DSMM one-shot 委托等待原生审批期间,父 Agent 成功切换 profile 并发布新的 admission epoch;随后用户点击 Allow,DSMM 仍可能因准入代次不一致返回 `UNAUTHORIZED`。
7
+ Live overlay Apply 不可用。需要另一套 overlay 时,保存并选择未来默认,再创建新会话;不能强制重绑运行中的父 Agent 或待审批调用。现有 Agent 与子任务保留各自准入时的不可变配置。
8
8
 
9
- 实际 SDK 集成测试已复现:Agent、owner、工具定义和 provider 注册保持不变,批准发生一次,但子任务模型 HTTP 请求尚未发出。该问题是条件触发的可用性及审批语义缺陷,并非所有审批必然失败。暂缓不改变运行时权限,不引入跨调用授权,也不放宽取消、归属或请求撤销保护。
9
+ Use profile model 与普通模式操作具有独立 capability,不因 Apply 不可用而一并关闭,也不授予新的 overlay 权限。
10
10
 
11
- 临时使用时避免在审批等待期间切换父 Agent 的 profile。需要切换时,先取消待审批调用,再按当前配置重新发起委托;不要无条件重跑整个父任务。
11
+ ## 调用与生命周期
12
12
 
13
- ## 保留的验证与修复条件
13
+ 取消、精确 Agent/owner/realm、工具及 provider 身份和输入隔离仍然有效。原生 once 批准不是可复用授权,批准也不保证工具或操作系统执行成功。
14
14
 
15
- 完整回归保留在 `test/native-core-review-regressions.test.mjs`,默认以明确原因跳过;设置 `DSMM_TEST_DEFERRED_APPROVAL=1` 可重新执行。测试跳过不能计作该场景通过。
16
-
17
- 当前 one-shot 接口不公开可用于准确关联初始输入与本次启动的消息身份或 dispatch 回执。后续 DSH 版本若提供此类公开接口,或其他可验证的等效机制,应重新评估 DSMM 内部修复,优先不修改外部代码。
18
-
19
- 解除暂缓须验证:原调用在准入更新后获准并完成;采用原始调用对应的配置;后台延迟执行仍能准确关联;其他输入和后续调用不能继承豁免;取消、owner/realm、工具及 provider 身份、既有请求撤销和历史子 Agent 边界均保持有效。升级、安装、修改外部 SDK 或发布仍需单独授权。
15
+ 遇到拒绝时先检查实际结果,不无条件重跑整个父任务。未来的 live Apply 必须能绑定精确调用、配置与未决审批,保持上述权限和生命周期边界;当前版本不提供该操作。