@dsmm/dsmm 0.3.0 → 0.3.2

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 (245) hide show
  1. package/README.md +26 -40
  2. package/cordis.patch.yml +9 -13
  3. package/docs/agent-presets.md +26 -14
  4. package/docs/compatibility.md +24 -68
  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 +25 -311
  13. package/docs/roadmap.md +52 -241
  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 +12 -2
  20. package/lib/child-capture.js +22 -5
  21. package/lib/client/ChildPermissions.d.ts +43 -0
  22. package/lib/client/ChildPermissions.js +100 -0
  23. package/lib/client/ChildrenPanel.d.ts +5 -5
  24. package/lib/client/ChildrenPanel.js +6 -18
  25. package/lib/client/DeploymentFields.d.ts +32 -0
  26. package/lib/client/DeploymentFields.js +70 -0
  27. package/lib/client/DeploymentPage.d.ts +21 -6
  28. package/lib/client/DeploymentPage.js +80 -112
  29. package/lib/client/HistoryContinuation.d.ts +7 -0
  30. package/lib/client/HistoryContinuation.js +22 -0
  31. package/lib/client/NativeCommandEntries.d.ts +17 -0
  32. package/lib/client/NativeCommandEntries.js +68 -0
  33. package/lib/client/PermissionPanelEntry.d.ts +8 -0
  34. package/lib/client/PermissionPanelEntry.js +11 -0
  35. package/lib/client/PermissionsPanel.d.ts +3 -1
  36. package/lib/client/PermissionsPanel.js +10 -9
  37. package/lib/client/ProfilesSection.js +8 -6
  38. package/lib/client/RoleAvailability.js +1 -1
  39. package/lib/client/RoleToolView-data.d.ts +35 -0
  40. package/lib/client/RoleToolView-data.js +52 -0
  41. package/lib/client/RoleToolView-locales.d.ts +36 -0
  42. package/lib/client/RoleToolView-locales.js +20 -0
  43. package/lib/client/RoleToolView.d.ts +10 -0
  44. package/lib/client/RoleToolView.js +47 -0
  45. package/lib/client/SessionProfiles.js +51 -24
  46. package/lib/client/TemporaryPermissions.d.ts +21 -0
  47. package/lib/client/TemporaryPermissions.js +94 -0
  48. package/lib/client/children-controller.d.ts +2 -8
  49. package/lib/client/children-controller.js +1 -26
  50. package/lib/client/children-locales.d.ts +27 -52
  51. package/lib/client/children-locales.js +8 -12
  52. package/lib/client/configuration-display.d.ts +5 -0
  53. package/lib/client/configuration-display.js +11 -0
  54. package/lib/client/controller.d.ts +18 -0
  55. package/lib/client/controller.js +118 -28
  56. package/lib/client/deployment-controller.d.ts +13 -1
  57. package/lib/client/deployment-controller.js +84 -24
  58. package/lib/client/deployment-data.d.ts +1 -0
  59. package/lib/client/deployment-data.js +4 -1
  60. package/lib/client/deployment-locales.d.ts +43 -0
  61. package/lib/client/deployment-locales.js +45 -19
  62. package/lib/client/deployment-modules.d.ts +9 -0
  63. package/lib/client/deployment-modules.js +24 -0
  64. package/lib/client/deployment-workspace.d.ts +48 -0
  65. package/lib/client/deployment-workspace.js +123 -0
  66. package/lib/client/history-controller.d.ts +29 -0
  67. package/lib/client/history-controller.js +111 -0
  68. package/lib/client/history-entry.d.ts +11 -0
  69. package/lib/client/history-entry.js +106 -0
  70. package/lib/client/history-locales.d.ts +95 -0
  71. package/lib/client/history-locales.js +41 -0
  72. package/lib/client/index.js +26 -76
  73. package/lib/client/locales.d.ts +13 -0
  74. package/lib/client/locales.js +104 -86
  75. package/lib/client/permission-controller.d.ts +1 -0
  76. package/lib/client/permission-controller.js +3 -2
  77. package/lib/client/permission-locales.d.ts +51 -0
  78. package/lib/client/permission-locales.js +59 -19
  79. package/lib/client/session-labels.js +4 -3
  80. package/lib/client/styles.d.ts +1 -1
  81. package/lib/client/styles.js +9 -8
  82. package/lib/client/temporary-permission-client.d.ts +20 -0
  83. package/lib/client/temporary-permission-client.js +52 -0
  84. package/lib/client/temporary-permission-entry.d.ts +6 -0
  85. package/lib/client/temporary-permission-entry.js +56 -0
  86. package/lib/client.js +5691 -3439
  87. package/lib/commands.js +2 -0
  88. package/lib/config-file-store.d.ts +3 -0
  89. package/lib/config-file-store.js +4 -2
  90. package/lib/config-revision.d.ts +5 -0
  91. package/lib/config-revision.js +11 -0
  92. package/lib/core-permission-authority.js +11 -41
  93. package/lib/deployment-config.d.ts +9 -2
  94. package/lib/deployment-config.js +35 -8
  95. package/lib/deployment-permission-rules.js +19 -7
  96. package/lib/dsh-types.d.ts +1 -1
  97. package/lib/history-candidates.d.ts +30 -0
  98. package/lib/history-candidates.js +176 -0
  99. package/lib/history-codec.d.ts +11 -0
  100. package/lib/history-codec.js +102 -0
  101. package/lib/history-contract.d.ts +44 -0
  102. package/lib/history-contract.js +2 -0
  103. package/lib/history-controller.d.ts +42 -0
  104. package/lib/history-controller.js +329 -0
  105. package/lib/history-policy.d.ts +4 -0
  106. package/lib/history-policy.js +8 -0
  107. package/lib/history-remote.d.ts +28 -0
  108. package/lib/history-remote.js +17 -0
  109. package/lib/history-rpc.d.ts +24 -0
  110. package/lib/history-rpc.js +136 -0
  111. package/lib/history-support.d.ts +15 -0
  112. package/lib/history-support.js +21 -0
  113. package/lib/history-types.d.ts +67 -0
  114. package/lib/history-types.js +2 -0
  115. package/lib/host-llm-startup.js +3 -3
  116. package/lib/host-llm.d.ts +9 -3
  117. package/lib/host-llm.js +48 -8
  118. package/lib/index.d.ts +18 -20
  119. package/lib/index.js +147 -415
  120. package/lib/lifetime.d.ts +4 -0
  121. package/lib/lifetime.js +22 -0
  122. package/lib/live-pi-ai-owner.d.ts +1 -0
  123. package/lib/live-pi-ai-owner.js +8 -4
  124. package/lib/mode.d.ts +3 -2
  125. package/lib/mode.js +28 -41
  126. package/lib/model-routing.d.ts +2 -8
  127. package/lib/model-routing.js +59 -175
  128. package/lib/native-admission.d.ts +77 -0
  129. package/lib/native-admission.js +503 -0
  130. package/lib/native-pi-ai-wire.d.ts +3 -1
  131. package/lib/native-pi-ai-wire.js +47 -13
  132. package/lib/permission-child-control.d.ts +36 -0
  133. package/lib/permission-child-control.js +164 -0
  134. package/lib/permission-control.d.ts +2 -3
  135. package/lib/permission-control.js +7 -0
  136. package/lib/permission-controller.js +2 -2
  137. package/lib/permission-exec-argv.d.ts +32 -0
  138. package/lib/permission-exec-argv.js +171 -0
  139. package/lib/permission-fs-search.js +2 -1
  140. package/lib/permission-fs.js +2 -1
  141. package/lib/permission-native-rules.js +3 -3
  142. package/lib/permission-temporary-files.d.ts +19 -0
  143. package/lib/permission-temporary-files.js +248 -0
  144. package/lib/permission-temporary-grants.d.ts +106 -0
  145. package/lib/permission-temporary-grants.js +198 -0
  146. package/lib/permission-temporary-install.d.ts +25 -0
  147. package/lib/permission-temporary-install.js +86 -0
  148. package/lib/permission-temporary-remote.d.ts +19 -0
  149. package/lib/permission-temporary-remote.js +75 -0
  150. package/lib/permission-temporary-rpc.d.ts +37 -0
  151. package/lib/permission-temporary-rpc.js +154 -0
  152. package/lib/permission-temporary-types.d.ts +47 -0
  153. package/lib/permission-temporary-types.js +2 -0
  154. package/lib/permission-temporary-web.d.ts +11 -0
  155. package/lib/permission-temporary-web.js +154 -0
  156. package/lib/permission-web.js +2 -1
  157. package/lib/preset-registry.js +3 -2
  158. package/lib/preset-skills.d.ts +3 -12
  159. package/lib/preset-skills.js +28 -58
  160. package/lib/profile-diagnostics.d.ts +1 -1
  161. package/lib/profile-diagnostics.js +2 -2
  162. package/lib/profile-remote.js +61 -22
  163. package/lib/profile-rpc.d.ts +4 -3
  164. package/lib/profile-rpc.js +35 -37
  165. package/lib/profile-runtime.d.ts +42 -74
  166. package/lib/profile-runtime.js +314 -617
  167. package/lib/profile-store.d.ts +20 -8
  168. package/lib/profile-store.js +112 -63
  169. package/lib/profile-types.d.ts +19 -4
  170. package/lib/profiles.d.ts +3 -1
  171. package/lib/profiles.js +9 -7
  172. package/lib/prompt-content.d.ts +1 -0
  173. package/lib/prompt-content.js +4 -1
  174. package/lib/prompts.d.ts +2 -12
  175. package/lib/prompts.js +11 -66
  176. package/lib/role-control-remote.d.ts +1 -4
  177. package/lib/role-control-remote.js +8 -36
  178. package/lib/role-control-rpc.d.ts +10 -36
  179. package/lib/role-control-rpc.js +112 -269
  180. package/lib/role-control-types.d.ts +3 -26
  181. package/lib/role-control-types.js +3 -4
  182. package/lib/role-identity.d.ts +5 -0
  183. package/lib/role-identity.js +10 -0
  184. package/lib/role-invocation.d.ts +3 -3
  185. package/lib/role-invocation.js +2 -2
  186. package/lib/role-llm-runtime.js +5 -11
  187. package/lib/role-policy.d.ts +19 -50
  188. package/lib/role-policy.js +136 -508
  189. package/lib/role-providers.d.ts +5 -8
  190. package/lib/role-providers.js +20 -86
  191. package/lib/role-routing.d.ts +1 -3
  192. package/lib/role-routing.js +24 -34
  193. package/lib/role-subagents.d.ts +5 -14
  194. package/lib/role-subagents.js +163 -108
  195. package/lib/runtime-integration.d.ts +5 -78
  196. package/lib/runtime-integration.js +11 -697
  197. package/lib/session-metadata.d.ts +13 -12
  198. package/lib/session-metadata.js +6 -31
  199. package/lib/session-scope.js +2 -1
  200. package/lib/settings.d.ts +5 -18
  201. package/lib/settings.js +19 -43
  202. package/lib/skills.d.ts +1 -0
  203. package/lib/skills.js +5 -1
  204. package/lib/state.d.ts +3 -2
  205. package/lib/state.js +26 -10
  206. package/lib/status.d.ts +1 -9
  207. package/lib/status.js +3 -55
  208. package/lib/web-fetch-address-policy.d.ts +24 -0
  209. package/lib/web-fetch-address-policy.js +189 -0
  210. package/lib/web-fetch-fakeip.d.ts +25 -0
  211. package/lib/web-fetch-fakeip.js +107 -0
  212. package/package.json +124 -106
  213. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-gateway@0.2.1-rc.2.patch +13291 -0
  214. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-remotes@0.2.1-rc.2.patch +9133 -0
  215. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-client-ui-approval@0.2.1-rc.2.patch +156 -0
  216. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-subagent@0.2.1-rc.2.patch +3546 -0
  217. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-user-approval@0.2.1-rc.2.patch +431 -0
  218. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-web@0.2.1-rc.2.patch +119 -0
  219. package/patches/dsh-approval-settlement/README.md +41 -0
  220. package/patches/dsh-approval-settlement/metadata.json +10 -0
  221. package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-loop@0.2.1-rc.2.patch +383 -0
  222. package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-preset-registry@0.2.1-rc.2.patch +55 -0
  223. package/patches/dsh-session-activation/@deepseek-ai__dsh-api-session-controller@0.2.1-rc.2.patch +16673 -0
  224. package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-subagent@0.2.1-rc.2.patch +29 -0
  225. package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-workspace@0.2.1-rc.2.patch +196 -0
  226. package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence-jsonl@0.2.1-rc.2.patch +35 -0
  227. package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence@0.2.1-rc.2.patch +40 -0
  228. package/docs/research/deepseek-v4-pro.md +0 -74
  229. package/docs/research/oh-dsh.md +0 -96
  230. package/lib/agent-registry.d.ts +0 -36
  231. package/lib/agent-registry.js +0 -75
  232. package/lib/child-admission.d.ts +0 -40
  233. package/lib/child-admission.js +0 -151
  234. package/lib/delivery-authority.d.ts +0 -83
  235. package/lib/delivery-authority.js +0 -397
  236. package/lib/native-child-evidence.d.ts +0 -40
  237. package/lib/native-child-evidence.js +0 -104
  238. package/lib/role-runs.d.ts +0 -138
  239. package/lib/role-runs.js +0 -335
  240. package/lib/session-persistence.d.ts +0 -36
  241. package/lib/session-persistence.js +0 -304
  242. package/lib/subagent-runtime.d.ts +0 -57
  243. package/lib/subagent-runtime.js +0 -257
  244. package/prompts/deepseek-flash.md +0 -11
  245. package/prompts/deepseek-v4-pro.md +0 -14
@@ -1,6 +1,6 @@
1
1
  # Deepwork settings and status
2
2
 
3
- These are built source contracts, not a claim that the published `@dsmm/dsmm@0.2.0` artifact contains every source feature. Named policy is covered in [profiles](profiles.md), routing in [model routing](model-routing.md), and child authority in [Agent presets](agent-presets.md).
3
+ DSMM 0.3.1 targets exactly DSH `0.2.1-rc.2`. Named policy is covered in [profiles](profiles.md), routing in [model routing](model-routing.md), and child authority in [Agent presets](agent-presets.md).
4
4
 
5
5
  ## Deployment layers and native editors
6
6
 
@@ -8,7 +8,7 @@ Effective settings resolve from **defaults → sparse global base → explicit n
8
8
 
9
9
  <a id="native-plugins-configuration-d"></a>
10
10
 
11
- **Plugins → DSMM** edits the global base through fixed `remote.dsmmConfig`. The DSMM bundle and actual row Config pages also offer the current native-profile override through the public `ConfigPageForm`. Runtime entry ID, package ID, row ID and form namespace aren't interchangeable. A profile write requires the actual namespace, descriptor revision and matching raw base/user provenance. If that identity isn't available, the profile editor is unavailable or read-only; it never falls back to Global. The standalone Plugins item has no supplied profile form.
11
+ **Plugins → DSMM bundle config** is the single deployment configuration surface, registered as `plugins.bundle.config` for `@dsmm/dsmm`. The scope selector chooses Global or current native-profile overrides; module buttons open in-area drawers. Global edits use fixed `remote.dsmmConfig`. Profile edits use the public native form resolved from the authenticated snapshot's actual namespace. Runtime entry ID, package ID, row ID and form namespace aren't interchangeable. A profile write requires the actual descriptor revision and matching raw base/user provenance. Missing or mismatched identity leaves the profile scope unavailable or read-only, never falling back to Global. Named Profiles retains its separate Settings/header entries; no duplicate permission page or Conversation configuration tabs are registered.
12
12
 
13
13
  Global and native-profile controls have independent Save, Refresh and Discard actions and revisions. There's no Save all or cross-layer transaction. Missing keys inherit, explicit same-default values pin, and Unset removes only the edited layer's key, not a higher Host pin. Plain objects merge recursively and arrays replace. Full merged validation follows sparse-layer validation; unknown/prototype keys, non-JSON values and raw volatile refs refuse.
14
14
 
@@ -20,7 +20,7 @@ LSP isn't an applicable UI setting in this version. Its implementation, interfac
20
20
 
21
21
  `dsmmConfig.describe`, `describeModules`, `describeSettings` and `save` use the existing local writable operator boundary. The native invocation peer must equal `connection.operator`, public `webServer.host` must be exactly `127.0.0.1`, and `settings.writable` must be true. A client loopback assertion, tunnel or reverse proxy isn't authority. These aren't model-visible tools and accept no arbitrary file, root or entry arguments.
22
22
 
23
- Global saves use expected actual-byte revision, cooperative locking, a final revision recheck and same-directory atomic replacement. Authority and lifetime are rechecked before commit. Native-profile saves use public form mutation and descriptor CAS, not a hash guessed to be native CAS. External non-cooperating editors can still race at the final rename boundary. A save acknowledges its layer, not adoption by every live consumer.
23
+ Global saves use expected metadata versions, cooperative locking, a final version recheck and same-directory atomic replacement. `stat-v1-<mtimeNs>-<ctimeNs>` is not a content-integrity proof. Authority and lifetime are rechecked before commit. Rename commits the save; a failed final observation returns success with `revision:"unavailable"` and `refreshRequired:true`, requiring refresh before another mutation. Native-entry versions use the actual `settings.describe` descriptor (`native-v1-<revision>`) or report unavailable. Native-profile saves retain the Host's numeric form revision CAS. External editors can still race at rename or change content without a distinguishable stat version. A save acknowledges its layer, not adoption by every live consumer.
24
24
 
25
25
  Native ConfigEditor can emit `loader/partial-dispose` during empty-pending reconciliation without actual fiber or Agent disposal. The signal alone isn't proof of a lifecycle change; consumers must observe actual lifetime and admission boundaries.
26
26
 
@@ -32,7 +32,7 @@ Native ConfigEditor can emit `loader/partial-dispose` during empty-pending recon
32
32
 
33
33
  On a mounted Host, desired-off affects new roots, not existing parents or their future children. Desired-on after cold-off remains restart-required until an independent Host restart. No hot-mount or restart queue is implied. An idle profile change doesn't absorb newer global deployment. Mode-on can't bypass an admitted off module; mode-off can replace saved on intent without pretending the module was active.
34
34
 
35
- The inspector separates merged desired, startup-mounted/captured, next-root preview, and current-session admission. Without an actual session, current admission is unknown. Host bundle enablement also remains unknown when the public interface can't observe it. Sources, capture origins, global bytes revision, native descriptor revision and named pin aren't one acknowledgment.
35
+ The inspector separates merged desired, startup-mounted/captured, next-root preview, and current-session admission. Without an actual session, current admission is unknown. Host bundle enablement also remains unknown when the public interface can't observe it. Sources, capture origins, global file version, native descriptor version and named snapshot reference aren't one acknowledgment.
36
36
 
37
37
  `presets.plannerRootEnabled` defaults false and controls only the standing DW Planner root preset, not the default-enabled workflow Planner role or Harness's native plan mode. Like the rest of `presets`, Global/native-entry settings may configure it, named overlays cannot, and desired changes require an independent restart; current Agents are not hot-migrated. See [Planner root admission](agent-presets.md#roles-and-composition) for discovery, forced creation/resume and read-only boundaries.
38
38
 
@@ -42,30 +42,42 @@ The rules RPC writes the global DSMM layer. A native override of outside-read, w
42
42
 
43
43
  The Host installs `installDeploymentPermissionRules` in its owned Core fiber with `agents` injected, the actual `DsmmDeploymentConfig`, a pure writable-Root check and an awaited notification callback. Its `initial` snapshot, `runtime` sync owner and backend are the collaborators for the permission controller and the single permissions RPC. DSH owns approval: an actual manual approval is final for that call and approved scope, without a DSMM post-approval veto from older rules, epochs or internal gates. DSMM has no independent approval queue, UI, TTL or session permit memory. The ordinary `managed-settings` module retains native SettingsForms and supplies only a scoped `configEditor.edit` façade; the root ConfigEditor and its locks, form CAS and reconciliation remain native-owned. Missing or retired ownership refuses managed saves, not an actually approved call. These source interfaces require the corresponding cold Host composition; configuration alone is not mounting evidence.
44
44
 
45
- Permission revisions are opaque tokens over the persistent global CAS and native configuration read set, not form counters or per-rule version maxima. Controlled saves reread actual storage after CAS and publish only after notification acknowledges the committed policy. No-op saves may retain the token. Notification failure exposes saved/runtime revisions as unsynchronized; recovery rereads authoritative storage. CAS, ownership and synchronization checks protect configuration writes and policy adoption, not a second call-approval gate: permission-source changes neither cancel pending native approval nor let DSMM override an actual same-call approval. New calls consume current policy. Conflicts and recovery preserve dirty editor drafts. Native and ordinary JSON rule imports receive `user-import` provenance, while rules RPC provenance comes from the live operator authority. Persistent provenance isn't native approval or a reusable grant. A native once grant doesn't widen session permissions or authorize another call, and a narrower grant isn't full access. Native rejection, caller/native cancellation and original OS failures remain possible; approval doesn't guarantee command success. Only `enabled` remains pinned to the mounted runtime; a desired OFF cannot turn off running controls before restart.
45
+ Permission revisions identify the Host profile scope and current global-file/native-descriptor versions, not configuration content integrity or per-rule version maxima. Missing native version authority refuses synchronization. Controlled saves reread storage and publish policy only after notification acknowledges it. A committed global save remains successful with refresh required when postcommit coordination fails; runtime synchronization is a separate state. Notification failure exposes saved/runtime revisions as unsynchronized; recovery rereads authoritative storage. Version, ownership and synchronization checks protect configuration writes and policy adoption, not a second call-approval gate: permission-source changes neither cancel pending native approval nor let DSMM override an actual same-call approval. New calls consume current policy. Conflicts and recovery preserve dirty editor drafts. Native and ordinary JSON rule imports receive `user-import` provenance, while rules RPC provenance comes from the live operator authority. Persistent provenance isn't native approval or a reusable grant. A native once grant doesn't widen session permissions or authorize another call, and a narrower grant isn't full access. Native rejection, caller/native cancellation and original OS failures remain possible; approval doesn't guarantee command success. Only `enabled` remains pinned to the mounted runtime; a desired OFF cannot turn off running controls before restart.
46
46
 
47
47
  Read-only configuration projections redact LSP command/arguments/cwd, preset root and recovery prompt; environment values and names aren't disclosed. Authorized sparse editor input is a separate boundary, not a status DTO. A missing projected field is absent; an unavailable layer is unknown, not an invented default.
48
48
 
49
+ Only relevant effective permission changes coordinate revocation. Unrelated locale, display or model edits don't turn an old DSMM epoch into a second approval gate. Operator, connection, source and owner lifetime are rechecked after awaits and before irreversible writes. Missing or replaced authority refuses a configuration mutation; it doesn't create a reusable approval or justify replaying an unconfirmed save.
50
+
49
51
  ## Runtime controls
50
52
 
51
- `/deepwork [off|message]` changes the receiving session's mode. Explicit intent, including a same-default choice, survives profile changes and reopen. Official minimal conversations default off; DW presets default on unless explicit intent says otherwise. Off hides common workflow/DSMM skills, not persona, read-only restrictions or host/Git permissions. Busy mutations refuse instead of queuing. Slash commands belong to the native command adapter, not headless task text.
53
+ `/deepwork [off|message]` changes the receiving session's mode. Explicit intent, including a same-default choice, is separate from profile defaults. Official minimal conversations default off; DW presets default on unless explicit intent says otherwise. Off hides common workflow/DSMM skills, not persona, read-only restrictions or host/Git permissions. Busy mutations refuse instead of queuing. Persisted intent doesn't authorize unsupported DSMM cold recovery. Slash commands belong to the native command adapter, not headless task text.
54
+
55
+ `canSelectModel`, `canToggleMode` and `canApplyOverlay` describe independent actions and refusal reasons. Live overlay Apply is unavailable (`new-session-required`); save/select a future default for a new session. This doesn't disable ordinary mode changes or **Use profile model** where their own native service, idle/session identity and manual-intent checks pass. Use profile model selects from admitted immutable configuration, doesn't write a profile pointer, and respects a newer manual choice even when its value is unchanged.
52
56
 
53
57
  `/dsmm-status` reports normalized bounded state; `/dsmm-status json` returns a defensive version-1 snapshot. Status separates admitted profile/revision/epoch, actual route state, effective settings and captured module/runtime binding. Ordinary roots report native-owned effort and keep the native model tab's route, not an applied child-role primary. `profileModel` is advisory for explicit **Use profile model**, never proof that selection already happened.
54
58
 
59
+ `dsmm-status` is reserved. Setting `modeName` to that exact value normalizes the mode command to `deepwork`, preserving the independent inspection command. Status computation doesn't select a model or contact a provider.
60
+
55
61
  `workflow.policy` accepts `risk-based` or `legacy`. Explicit policy wins. Without it, explicitly supplied `strictGates`, `reviewCap` or `finalReviewPolicy` selects legacy; otherwise risk-based is the default. Named role restrictions retain required Orchestrator/Planner/Plan Critic, plus legacy-conditional Reviewer/Oracle. They can't enable a role outside startup/deployment ceilings.
56
62
 
57
63
  `roleRouting[id].levels` accepts only explicit `low`, `high` and `max` overrides; invocation omission means `normal`. These are call resources, not workflow tiers or generated roles. `subagents.toolTopology` defaults `per-role` and may be narrowed/configured in a named overlay. Background, depth and route-override permission remain deployment-only. `subagents.allowRouteOverride` defaults false. See [routing](model-routing.md) for the exact tool and target grammar.
58
64
 
59
- `locale` is an optional visible-output preference using the supported locale IDs in [profiles](profiles.md#inheritance-and-ceilings). Omission inherits; the current user's explicit language request wins. It doesn't change UI locale or protocol vocabulary. Both retired `*MaxReasoningPresets` fields reject with `deprecated-field`; there is no automatic migration. The only nonblocking document warning is `blank-label`, with schema-safe diagnostics and source location where available.
65
+ `locale` is an optional visible-output preference using the supported locale IDs in [profiles](profiles.md#inheritance-and-ceilings). Omission inherits; the current user's explicit language request wins. It doesn't change UI locale or protocol vocabulary. Retired brand-calibration/default-effort and MaxReasoningPresets fields reject with `deprecated-field`; there is no automatic migration. See [generic model parameters](model-routing.md#generic-model-parameters). The only nonblocking document warning is `blank-label`, with schema-safe diagnostics and source location where available.
60
66
 
61
67
  ## Child runtime composition
62
68
 
63
- Default deployment uses foreground one-shot work: `enableRunInBackground:false`, `backgroundMode:"one-shot"`, and omitted `maxDepth` delegates to the native Host limit. Captured settings and actual startup capabilities determine availability. A configured flag isn't proof that jobs, persistence, continuation or delivery fencing is ready.
69
+ Default deployment waits for the native activation result: `enableRunInBackground:false`, and omitted `maxDepth` delegates to the native Host limit. Captured settings and actual native capabilities determine availability. A configured flag isn't execution or completion evidence.
70
+
71
+ Official AgentRegistry, SubagentRuntime and JSONL namespace plugins own execution and storage. DSMM adds scoped admission and policy, not a replacement Registry/Runtime, manual owner selector, companion or separate result queue.
72
+
73
+ The [bundle patch](../cordis.patch.yml) adds DSMM to the native composition. Core configuration/status/permissions don't require active Deepwork or a child task. `runtime.enabled` isn't a current owner selector. Desired source, mounted capability and actual live admission remain separate facts.
74
+
75
+ `subagentRuntime` projects native `binding: stock | unavailable`, DSMM admission readiness (`deliveryFenceReady`), restart requirement and a bounded reason. These names describe observations, not permission to replace an owner or proof that every child operation is supported. Saves retain actual native form revision/authorization and don't remount services.
64
76
 
65
- The 0.3.0 build exports `@dsmm/dsmm/agent-registry` (`./agent-registry`) and `@dsmm/dsmm/subagent-runtime` (`./subagent-runtime`) for explicit cold-start composition. The bundled [patch](../cordis.patch.yml) disables the exact stock Agent and Subagent rows and installs one DSMM owner for each service before Main. Verify settled Loader identities and actual service constructors, preserve spawn/fork/model/Gateway services and explicit capacity/depth configuration, then restart. Missing or duplicate ownership refuses; there is no hot replacement or automatic runtime selection.
77
+ Enabled background work must choose `run_in_background:true` before `startActivation`, using `delivery:'parent'`; otherwise delivery is to the waiting caller. Accepted child/message IDs aren't completed results. Running waiting calls have no handoff action. Native receipt disposal handles cancellation after publication and waits for cleanup.
66
78
 
67
- The public runtime projection reports `binding: stock | dsmm | unavailable`, `deliveryFenceReady`, `restartRequired`, and a bounded reason when applicable. Loading Core, saving settings or seeing a role catalog doesn't prove fenced delivery. Managed continuation requires the explicit ready composition. Native lifecycle, inbox, jobs and storage remain native-owned; DSMM doesn't install a second scheduler or retry controller.
79
+ Live direct-child Queue/Steer/interrupt require actual capabilities and exact parent/operator/lifetime authority. Read-only descendant inspection grants no control. Readiness loss closes DSMM execution; stale handles don't grant authority. Agent-scoped guards remain fail-closed after owner retirement. Hot replacement isn't a promise of uninterrupted live-session operation.
68
80
 
69
- 0.3.0 accepts only current version-3 child captures. Old or incomplete capture evidence refuses without falling back to current parent settings, role labels, or fabricated approval/durability guarantees. The legacy-read adapter is not exported or composed. See [compatibility](compatibility.md#retired-compatibility-surfaces).
81
+ Cold DSMM recovery without trusted live admission is unavailable. Read-only history inspection doesn't resume Agents, and logs/labels/current settings don't restore execution authority. No cold migration or automatic history rewrite is supplied. See [compatibility](compatibility.md#retired-compatibility-surfaces).
70
82
 
71
83
  *Author's note: For a DSH deployment operator; distinguish a successful configuration save from captured runtime availability before applying policy.*
@@ -1,12 +1,12 @@
1
1
  # DSMM source-content synchronization
2
2
 
3
- DSH is fixed to **0.2.0-rc.2**. Source synchronization reads the committed **DSMM-owned `source-inputs/` snapshot**, never a live or historical OCMM Root fallback. Explicit maintenance refresh captures raw bytes from the Root worktree. `source-inputs/manifest.json` records the actual full Root baseline commit and the paths whose raw Git blobs differ from that baseline, including uncommitted/untracked worktree content or checkout byte differences. The captured baseline is `3b680211feeb93508b3817546f37bee2291c402b`; raw-byte `overlayPaths` do not by themselves claim uncommitted semantic changes or a new Root commit. Generated `prompts/source/manifest.json` derives `sourceRef` from that captured baseline and retains the overlay provenance. This is full-content adaptation, not short personas. The maintenance inventory lives in `scripts/source-inventory.mjs`; the generated manifest carries the actual source → artifact → consumer, source anchors, adaptation rules, canonical role/skill inventories, attribution and exclusions. Runtime uses package-relative prepared assets only; it never requires the raw snapshot, an OCMM checkout, global SDK path or maintenance compiler. Root AGENTS, Codex bundles and user/provider/model configuration are not synchronization inputs.
3
+ DSMM 0.3.1 targets exactly **DSH 0.2.1-rc.2**. Source synchronization reads the committed **DSMM-owned `source-inputs/` snapshot**, never a live or historical OCMM Root fallback. Explicit maintenance refresh captures raw bytes from the Root worktree. `source-inputs/manifest.json` records the actual full Root baseline commit and the paths whose raw Git blobs differ from that baseline, including uncommitted/untracked worktree content or checkout byte differences. The captured baseline is `3b680211feeb93508b3817546f37bee2291c402b`; raw-byte `overlayPaths` do not by themselves claim uncommitted semantic changes or a new Root commit. Generated `prompts/source/manifest.json` derives `sourceRef` from that captured baseline and retains the overlay provenance. This is full-content adaptation, not short personas. The maintenance inventory lives in `scripts/source-inventory.mjs`; the generated manifest carries the actual source → artifact → consumer, source anchors, adaptation rules, canonical role/skill inventories, attribution and exclusions. Runtime uses package-relative prepared assets only; it never requires the raw snapshot, an OCMM checkout, global SDK path or maintenance compiler. Root AGENTS, Codex bundles and user/provider/model configuration are not synchronization inputs.
4
4
 
5
- The raw closure is limited to the two catalog TS files, `src/hooks/config.ts`, prompt-loader/model-family assembly anchors, shared shell safety, the explicitly selected v1 role/category/workflow Markdown, and the fourteen selected recursive skill resource trees. `source-inputs/root/` preserves their actual bytes; no whole-Root copy, runtime import of Root code, extra ledger or whole-repository hash is used. The one input manifest binds paths, byte lengths and SHA-256 digests for source/resource integrity. Snapshot `.gitattributes` disables Git text conversion for `root/**`; DSMM's local `.gitattributes` also preserves prepared source prompts, skill resources and `src/skills.ts` bytes through Git checkout. Excluded frontend attribution/license inputs are supplied by DSMM's existing fixed-pin recipe, not copied and falsely claimed as consumed Root inputs.
5
+ The raw closure is limited to the two catalog TS files, `src/hooks/config.ts`, prompt-loader/model-family assembly inputs, shared shell safety, the selected v1 role/category/workflow Markdown, and the fourteen recursive skill resource trees. The input manifest records paths and capture provenance, not content hashes or byte-length requirements. Local source, documentation and generated resources are not locked to recorded bytes. Required resources and safe regular-file paths are still checked. Third-party downloads retain their upstream integrity verification and attribution.
6
6
 
7
7
  ## Inventories and assembly
8
8
 
9
- Every role/category persona adapts the source default `buildLocaleGuidance` prefix for visible output. `buildDsmmLocaleGuidance` and `buildDsmmAgentGuidance` add the exact Agent's immutable captured `settings.locale`: `en`, `zh-Hans`, `zh-Hant`, `ja`, `ko`, `de`, `fr`, `es`, `pt-BR`, or `ru`. Omission inherits applicable host/user language guidance, otherwise the request/context; it is not an English default. The current user's explicit output-language request wins. Preserve code, identifiers, paths, commands, protocol fields and exact quotations; child assignments retain explicit language instructions. A later parent Apply does not rewrite an old child's captured preference. No Root session preference, private host-config lookup, internal reasoning-language guarantee or host/project locale change is supplied.
9
+ Every role/category persona adapts the source default `buildLocaleGuidance` prefix for visible output. `buildDsmmLocaleGuidance` and `buildDsmmAgentGuidance` add the exact Agent's immutable captured `settings.locale`: `en`, `zh-Hans`, `zh-Hant`, `ja`, `ko`, `de`, `fr`, `es`, `pt-BR`, or `ru`. Omission inherits applicable host/user language guidance, otherwise the request/context; it isn't an English default. The current user's explicit output-language request wins. Preserve code, identifiers, paths, commands, protocol fields and exact quotations; child assignments retain explicit language instructions. Later desired saves don't rewrite a child's admitted preference. No Root session preference, private host-config lookup, internal reasoning-language guarantee or host/project locale change is supplied.
10
10
 
11
11
  The 11 base roles come from `src/data/agents.ts`; the 11 categories come from `src/data/categories.ts`. Oracle slots reuse the full reviewer source. Builder/code-search/doc-search/media-reader have no standalone source role Markdown: their actual catalog responsibilities, source workflow and terminal TS policy are consumed, not invented personas. Existing `dsmm-creative` remains the one creative category. All 22 have stable metadata and templates; cross-cutting alone defaults off. File existence is never callable evidence.
12
12
 
@@ -20,9 +20,9 @@ The fourteen skills are brainstorming, writing-plans, requesting-code-review, re
20
20
 
21
21
  All fourteen share deployment toggles and one Agent-scoped native metadata provider. No skill body is injected, including brainstorming. Ordinary presets require active Deepwork; DW roles default on, but explicit off wins while retaining persona/access. Metadata discovery does zero body I/O. Native `get` alone reads the cancellable SKILL body; relative references/scripts/assets resolve from its directory resourceBase.
22
22
 
23
- The Stage A ancestor snapshot/precedence, incomplete-observation refusal, invocation policy and cancellation/generation/parent fencing remain unchanged. rc.2 broadcasts `skills/change` across registries but owns revision/cache per registry; broadcasts fence in-flight work, never permanently invalidate cached locators. No body/ancestor cache, notification reflection or fallback fulltext injection is added. Generated presets now compose native skill discovery/loading tools without a standing `preset-skills` provider.
23
+ Ancestor snapshot precedence, incomplete-observation refusal, invocation policy and cancellation/generation/parent fencing apply within the admitted Agent scope. Incomplete discovery isn't proof that a resource is absent; non-DSMM ancestor winners remain authoritative. rc.2 broadcasts `skills/change` across registries but owns revision/cache per registry; broadcasts fence in-flight work, never permanently invalidate cached locators. No body/ancestor cache, notification reflection or fallback fulltext injection is added. Generated presets compose native skill discovery/loading tools without a standing `preset-skills` provider.
24
24
 
25
- The published 0.1.9 `./preset-skills` export retains its minimal Config/name/inject/apply compatibility shape; apply itself registers nothing. Its module is not dead: the main entry still calls the actual `registerAgentSkills` there, with unchanged registration/lifecycle. Likewise, `renderAgentCordis` and the shared renderer retain their ignored optional skills argument in its original second position so existing enabledRoles/roleRouting callers do not shift. Native Agent configuration controls visibility. This is a bounded public compatibility ruling, not a future provider/wrapper or remaining removal blocker; no module/function has been moved to another helper.
25
+ `preset-skills.ts` is internal: admission installs `registerAgentSkills` for the exact Agent, and that scope owns invalidation and release. It isn't a public package plugin or a separate global lifecycle owner. Mode/preset changes reconcile affected resources only; reading rechecks cancellation, scope and generation before returning a body. Agent scopes remain isolated.
26
26
 
27
27
  ## Refresh, reproduce and check
28
28
 
@@ -33,18 +33,18 @@ node --experimental-strip-types scripts/source-inputs.mjs --refresh
33
33
  pnpm run sync:source # adapts the sealed snapshot; never refreshes it implicitly
34
34
  ```
35
35
 
36
- Refresh reads only the declared closure twice and compares raw bytes, path inventory and baseline provenance. A changed capture gets at most one consistency retake; continued drift fails before snapshot writes. The destination's existing parent and all ancestors must be regular directories. An existing snapshot must validate completely, including both metadata files and every raw input; dangling/live links, malformed directories, unknown entries and integrity drift are refused before mutation. Refresh writes exclusively into a new task-owned sibling candidate, loads that candidate and runs the adapter's catalog, permission/assembly anchors and adapted resource-closure checks there. It rechecks the existing snapshot before same-parent rename publication and restores the untouched original on publication failure. Unknown existing content is never deleted as a refresh repair. A failed rollback preserves the original backup and reports its location rather than cleaning it away; post-commit staging cleanup limitations are reported explicitly. Review and commit the entire refreshed snapshot, adapter changes when needed, and prepared targets together through the authorized commit owner. Missing, additional, changed, linked or non-regular snapshot inputs fail closed; source check never repairs them from Root. A stale prepared resource not in the current output inventory is a failure and must be reviewed/removed explicitly, not silently retained or deleted by sync.
36
+ Refresh reads the declared inputs and captures a consistent view before writing. It rejects unsafe paths, links, missing inputs and unknown destination content. Publication uses a task-owned candidate and preserves the original snapshot on failure; concurrent edits are not overwritten. Input edits do not require resealing a hash inventory. Explicit synchronization updates prepared outputs, while read-only checks report missing resources without comparing their content against generated bytes.
37
37
 
38
38
  CI and a cold released checkout use the tag's own adapter/generator and committed snapshot by default:
39
39
 
40
40
  ```powershell
41
41
  pnpm run sync:source # optional rebuild of prepared source targets from sealed inputs
42
- pnpm run build # coordinated build owner; offline frontend integrity gate first
42
+ pnpm run build # offline frontend resource availability check first
43
43
  pnpm run generate:roles # coordinated renderer owner, after build
44
- pnpm run check:source # read-only regenerated byte comparison plus resource gates
44
+ pnpm run check:source # read-only resource availability and path checks
45
45
  ```
46
46
 
47
- `node --experimental-strip-types scripts/sync-source-assets.mjs --check` regenerates all source-adapted bytes in memory and compares them to prepared targets without writing. It checks inputs before targets, rather than hashing targets alone or skipping source drift. `node scripts/generate-role-assets.mjs --check` separately checks renderer output. `check:source` requires both comparisons and the actual resource/fixed-pin gates; a passing source-only comparison is not full build/renderer/release completion. Prepared targets must retain their generated bytes in the released checkout, without text-conversion filters; `src/skills.ts` retains its existing surrounding source while regenerating the metadata section.
47
+ `sync-source-assets.mjs --check` and `generate-role-assets.mjs --check` check required output availability without writing or enforcing byte equality. `check:source` combines those results with resource-reference and safe-path checks. Explicit generation still renders current source inputs and writes changed outputs; it is not a content-locking gate.
48
48
 
49
49
  Direct regression checks do not emit shared `lib/` or presets:
50
50
 
@@ -52,7 +52,7 @@ Direct regression checks do not emit shared `lib/` or presets:
52
52
  node --import ./test/prompt-source-loader.mjs --test --experimental-strip-types --test-concurrency=1 test/source-inputs.test.ts test/source-sync.test.ts
53
53
  ```
54
54
 
55
- These checks commit the DSMM source snapshot and prepared targets in a disposable fixture repository, then clone and execute that checkout's generator with no Root catalog/policy/prompt/skill checkout, using only the already-installed compiler. The cold Git-only clone first refuses absent ignored frontend resources. Once the already-verified fixed-pin library is delivered, check and fresh regeneration must reproduce every adapted byte, including a text-converting checkout. Cold regeneration removes every prepared target, including the frontend index, while retaining the authored `src/skills.ts` shell and genuine fixed-pin vendor library. The replay's generated index drives recipe selection, offline vendor validation and resource closure; stale prepared index bytes cannot supply the recipe or mask missing input dependencies. Missing/drifted vendor resources remain fatal before output writes. Checks also exercise raw-input tamper/missing/extra/link refusal, resealed permission-anchor and resource-closure errors, actual metadata regeneration, prepared extra-resource refusal, bounded capture drift, metadata/ancestor link refusal without outside writes, unknown-content preservation and candidate-publication rollback. For current source/native SDK prompt/tool behavior, run `test/prompt-guidance.test.ts test/skills.test.ts` through the same in-memory loader. The resource sync and role renderer remain separate entry points; coordinate shared compiled output/preset generation with its owner. Sync writes changed artifacts only; a second run must report no differences. Do not hand-edit generated prompt/source assets, skills or presets.
55
+ Regression coverage exercises resource loading, metadata generation, missing-resource errors, unsafe-path refusal, concurrent-edit preservation and publication rollback. It does not freeze source files, generated Markdown, licenses, line endings or local resources with hashes or whole-file comparisons. The resource synchronizer and role renderer remain separate maintenance entry points.
56
56
 
57
57
  Cold rebuild needs the existing approved toolchain/dependencies and the **prepared complete frontend fixed-pin library** as well as the committed raw snapshot. Committing the raw snapshot does not deliver ignored third-party bodies. An authorized release/build owner must preserve their delivery to the cold checkout/staging surface; missing bodies or inventory fail offline with no download or older-Root fallback. Separately authorized `pnpm run sync:frontend` can materialize missing fixed-pin resources, but is never an implicit CI/build/check action. No software installation is authorized by these commands.
58
58
 
@@ -60,19 +60,19 @@ Source Markdown is kept in full, with precise anchored changes and an explicit D
60
60
 
61
61
  Role IDs remain `dsmm-<name>`. `subagents.toolTopology=per-role` exposes individual `kind=role` underscore tools plus `dsmm_category`; `parameterized` exposes `dsmm_role` and `dsmm_category` with their respective admitted target enums. Empty groups have no tool. Actual arguments are `description`, `prompt`, optional `level`, deployment-authorized/exposed `route`, and capability-exposed `run_in_background`; no template grants them. Omitted/normal preserves the default route; `roleRouting.<id>.levels` contains only configured low/high/max complete routes or effort-only choices requiring exact native preflight. A complete per-call route requires paired provider/model, drops stale effort on model changes and does not silently fall back; an effort-only override must be supported by the selected native model. Route override additionally requires captured deployment `allowRouteOverride=true`. Source tier advice never generates suffix roles or fixed max effort. Target/caller/read-only/depth authority is unchanged by topology or level. Missing required planning/review capability is reported, not bypassed. Read-only planners return complete Markdown for authorized coordinator persistence. Reviewer/Oracle independence requires different observed routes, not names.
62
62
 
63
- One-shot defaults foreground; permitted one-shot background is native-job-owned. An admitted managed continuable configuration defaults background and returns a durable child ID; explicit `run_in_background:false` starts a non-reusable one-shot. A wired user foreground handoff transfers the same existing run to native jobs without another start, after operator/session/epoch/ownership/background gates; failed preflight leaves foreground ownership/cancellation intact. Existing continuable children use exposed `send_message` for nearest-step running, idle next-turn or same-ID cold delivery and the actual native user queue/steer surface. Receipts mean inbox acceptance, not execution/review completion. A settled one-shot cannot revive. Reuse does not reselect role/level/route or replace original captured locale/authority with the parent's latest profile. Background enablement, native capacity/depth, ownership, cancellation, provider support and permissions always gate execution. No OpenCode `task_id`/resume/retry, automatic retry or guessed idempotency is supplied.
63
+ Role calls wait for the official activation result by default. Enabled background work selects `delivery:'parent'` before start using `run_in_background:true`; an accepted child/message receipt isn't execution/review completion. Running waiting calls have no handoff. Supported live children use actual native message/Queue/Steer/interrupt controls under exact-parent authority. Cold DSMM resume is unavailable without trusted live admission. Later saves don't replace a child's original locale, route or authority. No OpenCode `task_id`, guessed idempotency or automatic message resend is supplied.
64
64
 
65
- Managed message delivery requires explicit startup composition: disable the stock `subagents` registration row, bind the unique PUBLIC DSMM `SubagentRuntime` subclass, then restart. Stock cannot be unloaded/drained for hot replacement or shadowed by a parallel runtime. The assembler takes the observed `SubagentRuntimeAdmissionView`; stock/unavailable/unready states give the explicit composition/restart limitation, not a readiness promise. Native controls remain genuine SDK capabilities, but tool exposure and operator-gated user surfaces must be separately observed. Unconnected C3 tool/RPC surfaces are not announced. Legacy-conservative evidence permits useful proven capabilities under the same durable ID intersected with current normal parent authority and native boundaries; missing evidence denies that capability with a reason, neither denying all legacy children nor inheriting the parent's latest policy. Captured child epochs need not equal the parent's current epoch.
65
+ Official Registry, Runtime and JSONL namespace plugins own execution/storage. No manual-runtime selector or companion is required. The assembler takes observed `SubagentRuntimeAdmissionView` readiness plus actual tools/capabilities; a catalog or responding root isn't proof of every child control. Display metadata and old logs don't restore admission. Agent-lifetime policy remains fail-closed after owner retirement; no hot-replacement guarantee is implied.
66
66
 
67
67
  ### Runtime assembler consumer interface
68
68
 
69
69
  `buildDsmmAgentGuidance(capturedSettings, observation: DsmmPromptObservation)` is pure and installs no tools, policy, provider, RPC or locale. The integration owner registers it once in the exact admitted Agent scope, independently of the mode-gated `buildDeepworkPrompt`; do not also inject a second dynamic locale block. Use that root/child's immutable settings, never desired deployment/editor drafts or the ancestor's new admission. Persistent `buildRolePersona` contains only shared language priority, not a configured locale.
70
70
 
71
- Pass B's `callableRoleInventory` entries (`name`, `kind`, `targets`, optional `targetParameter`) **after actual admission/provider/tool filtering**, plus current policy-filtered native `ToolSchema[]`. The assembler intersects those schemas and target enums with optional observed role availability, and lists configured levels only when the schema exposes them. A role-availability row is not proof of a tool. Pass observed `DsmmInvocationView` under `invocation: {view, routeKind:'initial'|'actual'}`: initial is a preflighted start route, actual comes from native request/status after fallback; never infer either from raw args or a role name. Runtime admission, invocation (including route), and child evidence are explicitly projected to allowed output fields; structurally compatible objects' extra properties are not serialized. Evidence field/code/effect lists are closed and limitation output is bounded.
71
+ Pass `callableRoleInventory` entries (`name`, `kind`, `targets`, optional `targetParameter`) **after actual admission/provider/tool filtering**, plus current policy-filtered native `ToolSchema[]`. The assembler intersects those schemas and target enums with optional observed role availability, and lists configured levels only when the schema exposes them. A role-availability row is not proof of a tool. Pass observed `DsmmInvocationView` under `invocation: {view, routeKind:'initial'|'actual'}`: initial is a preflighted start route, actual comes from native request/status after fallback; never infer either from raw args or a role name. Runtime admission, invocation (including route), and child evidence are explicitly projected to allowed output fields; structurally compatible objects' extra properties are not serialized. Evidence field/code/effect lists are closed and limitation output is bounded.
72
72
 
73
- `capabilities.continuable` observes **new child creation**. `capabilities.managedChildDelivery` independently observes **managed parent-to-existing-continuable-child delivery under this exact Agent's authority**; omitted/false does not establish reuse, even with a ready binding and native `send_message`. Model reuse guidance requires that flag, a ready unique DSMM delivery fence and the actual exposed control. Native user queue/steer additionally requires an actually wired `nativeBrowserPrompt.surface`; its name/readiness alone does not prove delivery. Existing-child delivery does not require creation/background to be enabled. Exposed native child-to-parent reporting remains separate and retains exact-sender/adjacency semantics. Supply native jobs capability and a wired `foregroundHandoff.surface` only when supported. Optional `ChildAdmissionEvidenceView` supplies original/proven fields and precise capability limitations, never extra private state. These observations describe availability; actual target, operator/connection/session/epoch/lifetime and native permission gates remain the execution authority.
73
+ `capabilities.continuable` observes new child creation. `capabilities.nativeChildDelivery` independently observes supported live-child delivery under this Agent's authority; a ready binding alone doesn't prove reuse or a reachable browser surface. Native user Queue/Steer requires an actually wired `nativeBrowserPrompt.surface`. Child-to-parent reporting retains exact-sender/adjacency semantics. No foreground-handoff or cold-recovery capability is advertised. Observations describe availability; exact target, operator/connection/session/lifetime and native permission checks remain execution authority.
74
74
 
75
- DeepSeek V4 Pro/Flash guidance applies only to the exact verified provider/model pairs, uses adapter-advertised efforts and treats configured default effort as policy, not an observed request result. Ordinary root native model/effort and explicit preflighted invocation effort remain authoritative. Preset-derived max reasoning policy is not part of this calibration.
75
+ Request routing uses generic native capabilities and admitted `modelParameters` policy. Omitted effort remains native-owned; DSMM doesn't apply brand-calibration or brand-default-effort settings. Retired fields reject with `deprecated-field`, without automatic migration. Standard supported requests use native prepared calls. The public completions seam supports custom/Pi-AI stop parameters in 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. Standard Coding and native effort encoding remain unchanged. Source provenance and fixed-pin resource integrity remain separate from configuration-version metadata, and display records don't restore historical authority.
76
76
 
77
77
  Authored frontend router/tooling text overrides install-by-default/implicit latest behavior: inspect existing capabilities, require separate setup authorization, and report unverified evidence without hiding incomplete declared resources. Verbatim UI/UX README paths/cwd examples are superseded by the authored DSH entry: resolve the absolute native resourceBase script, require the already-active target project context, and supply an explicitly approved project-owned output-dir for persistence. The installed skill tree is never an output target; no tool cwd field or shell cd is invented. Public renderer inputs retain the old object shape with optional source metadata; only the canonical catalog requires those trusted source fields.
78
78
 
@@ -88,8 +88,8 @@ OCMM-derived modifications remain under the full package `LICENSE` (LicenseRef-A
88
88
 
89
89
  `scripts/frontend-recipe.mjs` maps every actual brand-table path (except project-original aside), all twelve taste resources plus the Stitch example, the UI/UX README/scripts/data and actual Python dependencies. Pins are Open Design `6afe7eae156bfa29251a51fd0636649c257f7444`, taste-skill `06d6028b5c623016c59ce8536f578e5a1127b499`, and UI/UX Pro Max `f32d6a61cdf0bfd57404c45854583fd19ff95088`. It never uses OMO's different pin or modifies a root/submodule checkout. Initial synchronization validates each exact Git-tree path and blob; missing paths fail explicitly. Verbatim core.py also needs app-interface, google-fonts and threejs/angular/laravel stacks: these same-pin dependencies ship alongside the source-declared web-interface mapping. Imports/data references are inspected statically, not executed.
90
90
 
91
- Body/data/Python resources and `.frontend-materialized.json` are gitignored. Actual fixed-pin Apache/MIT license files, copyright/attribution and the recipe are committed. Frontend `.npmignore` overrides its `.gitignore` so every materialized runtime resource and its provenance inventory packs. Project-original aside/design/perfection files remain tracked and cannot be overwritten by a vendor path. Source hashes are content-integrity checks against Git blobs, not a runtime receipt framework or a substitute for per-path dependency/packing checks.
91
+ Body/data/Python resources and `.frontend-materialized.json` are gitignored. License files, copyright/attribution and the recipe are committed. Frontend `.npmignore` includes the materialized runtime resources in the package. Upstream blob verification applies when downloading missing resources; offline checks do not hash or overwrite existing local files.
92
92
 
93
- `node scripts/materialize-frontend.mjs` defaults to read-only/offline check. `pnpm run build`, `check:source` and `check:release` refuse incomplete/drifted materialization without downloading. Explicit `sync:frontend` reuses complete validated content with zero requests/writes; no arbitrary destination CLI is accepted. Runtime distribution needs only package-relative resources, never an upstream checkout or network materialization.
93
+ `node scripts/materialize-frontend.mjs` defaults to read-only/offline checks for required resources, safe paths and referenced dependencies. Build and readiness checks do not enforce local content hashes. Explicit `sync:frontend` fetches missing resources without replacing existing files. Runtime distribution needs package-relative resources, not an upstream checkout or network access.
94
94
 
95
95
  **Distribution handoff:** with the authorized build toolchain and complete fixed-pin resources, run snapshot-backed `sync:source`, then coordinated build/generate/check/pack. Only deliberate Root adoption uses `source-inputs.mjs --refresh`; only separately authorized materialization uses `sync:frontend`. The raw snapshot is committed maintenance input and is not required in the npm runtime package. Prepared prompts/skills and every fixed-pin runtime resource must still be delivered; ignored status does not supply them to a cold checkout. Frozen tarballs must already carry the complete library. Default build/check does not fetch resources. Local compiled/materialized content is not proof of packed delivery. Full packed inventory and missing-resource refusal remain separate evidence from native runtime/UI capability, permission and lifecycle completion.
@@ -0,0 +1,82 @@
1
+ # 显式选择 Fake-IP HTTP fetch
2
+
3
+ `@dsmm/dsmm/web-fetch-fakeip` 是独立 Cordis 插件,向原生 `ctx.web` 注册唯一 fetch provider ID `dsmm-http-fakeip`。它使用 rc.2 包根公开的 `new HttpFetchProvider(limits, resolver)`,不替换 WebRuntime,不注册 `http`,不改变 Search、工具审批、凭据或系统网络。只有用户主动挂载并选择该 provider 时才应启用;不要将它加入 DSMM 默认插件组合。原生 `http` 和 shell 的网络限制不因此得到修复。
4
+
5
+ ## 集成与选择
6
+
7
+ DSMM 包必须具备以下依赖和发布入口,才能使用此插件:
8
+
9
+ - 运行依赖 `@deepseek-ai/dsh-web-fetch-http: 0.2.1-rc.2` 和 `ipaddr.js: ^2.5.0`。
10
+ - Host seam `@deepseek-ai/dsh-web: 0.2.1-rc.2`、`@deepseek-ai/dsh-http-proxy: 0.2.1-rc.2` 作为 peer 和开发依赖。保留现有 Cordis/timeout peers;不要另装一套 Host service。DSMM 与原生 HTTP provider 必须解析到 Host 实际使用的同一个 `dsh-http-proxy` 实例,否则预检读不到已安装的进程路由。
11
+ - 包 export `./web-fetch-fakeip`,types 指向 `./lib/web-fetch-fakeip.d.ts`,default 指向 `./lib/web-fetch-fakeip.js`。构建也需包含其内部 `web-fetch-address-policy.js`。包的 `files` 应包含本说明和来源许可证。
12
+
13
+ 在用户所选原生 profile 的 patch 中显式挂载该入口,并修改原有 web service 的 `fetchProvider`(保留其真实 entry ID 和其他配置):
14
+
15
+ ```yaml
16
+ - id: web
17
+ config:
18
+ fetchProvider: dsmm-http-fakeip
19
+ - insert:
20
+ - id: dsmm-http-fakeip
21
+ name: '@dsmm/dsmm/web-fetch-fakeip'
22
+ config: {}
23
+ ```
24
+
25
+ 这不是默认 bundle patch。若实际 web entry 不叫 `web`,使用该 profile 的实际 entry ID,不要新增第二个 web service。也可以通过原生 `DSH_WEB_FETCH_PROVIDER=dsmm-http-fakeip` 选择,但仍须显式挂载插件,并考虑原生 profile 配置的优先级。仅挂载而不选择是不安全的配置习惯:原生 WebRuntime 在只有一个可用 provider 时会自动选择它;存在多个 provider 且未选择时会报歧义。卸载插件会由原生 registry 撤销注册。
26
+
27
+ 配置项为 `maxResponseBytes`(默认 5,000,000)、`maxBodyChars`(100,000)、`timeoutMs`(30,000)、`maxRedirects`(5)、`userAgent`(原生默认值)和 `denyCidrs`(空数组)。字节/字符/超时限制必须为正有限数,超时不超过 Node timer 范围;重定向上限必须为非负整数。
28
+
29
+ `denyCidrs` 只增加本地拒绝,例如 `['198.18.0.1/16', '8.8.8.0/24']`;主机位不扩大 CIDR,前一项等价于拒绝固定 `198.18.0.0/16`。mapped IPv6 和对应 IPv4 的拒绝相互覆盖。没有任意 allow-CIDR 配置:唯一例外固定为 `198.18.0.0/16`,不是 `/15`,不是其他私网。
30
+
31
+ ## 地址与代理边界
32
+
33
+ - 系统 DNS 使用 `all: true, order: 'verbatim'`。完整答案必须非空,每项 family 和地址须有效;任一地址被拒绝即拒绝整个请求,不筛掉坏答案继续连接。
34
+ - 允许公网 unicast 和精确 Fake-IP `/16`;mapped IPv6 按内嵌 IPv4 判断。显式 deny 优先,loopback、私网、链路本地、`198.19.*` 及原生 transition/NAT64 特殊地址继续拒绝。
35
+ - IPv6 答案使用 RFC 7050 的 `ipv4only.arpa` 识别 RFC 6052 `/32 /40 /48 /56 /64 /96` 前缀,校验内嵌目的地址。发现失败、空答案或不能识别的发现答案均不放宽。内嵌 IPv4 不继承 Fake-IP 例外,显式 deny 同样生效。
36
+ - DNS 等待可以被取消;OS 中已经启动的 lookup 可能自行结束,但其结果不会被已取消请求使用。原生 provider 保持 deadline 的 timeout/caller-abort 分类。
37
+ - 入口通过公开 `proxyRouteFor()` 读取原生实际路由,不自行解释环境变量,不安装或修改代理。应走代理的 Fake-IP 或 mapped Fake-IP literal 在调用原生 provider **之前**拒绝(`WEB_FAKEIP_PROXY_UNSUPPORTED`),因为 rc.2 自带 literal 分类器会让它们跳过代理、意外直连。每次原生 resolver 调用再次预检;跳过 resolver 的代理分支不受该预检保护。
38
+ - 未配置额外 deny 的代理域名仍交给原生代理分支,由代理解析 DNS;本地 resolver 不会执行,**不承诺代理远端 DNS 满足本地地址策略**。这不是完整本地 SSRF/DNS 校验路径。需要这项保证时必须使用可控的代理策略或原生明确直连路由,不能把此插件视为修复远端 DNS。
39
+ - 配置 `denyCidrs` 时,域名若走代理就 fail closed,不隐式改直连。已知允许的 IPv4 literal 可走原生代理;其地址 deny 在入口执行。代理 IPv6 literal 保守拒绝(mapped 公网 IPv4 除外),避免代理分支跳过本地 NAT64 检查。
40
+ - 存在本地 deny,或请求目标是非 mapped IPv6 literal 时,重定向一律由原生零 hop 上限拒绝(`WEB_REDIRECT_BLOCKED`)。公开 resolver seam 不能检查后续跳转的代理分支,且进程路由可能在 DNS64 发现或响应期间变化;零跳限制确保本地 deny 和 IPv6 literal NAT64 检查不被跳过。无额外 deny 的域名、IPv4 和 mapped IPv4 literal 保留配置的原生同源重定向上限。
41
+
42
+ ## 原生传输与验证范围
43
+
44
+ 验证后的地址集合直接交给原生 transport,不伪造公网 DNS 答案,也不重写 URL。原生负责 pinned lookup、HTTP Host、TLS SNI、每次直连同源跳转的重新解析、跨 origin 拒绝、URL scheme/credentials、响应类型/字符集、字节/字符上限、非 2xx 结果、取消和 body/dispatcher 释放。此插件不另造 Undici transport。
45
+
46
+ 定向检查(从 `dsmm` 目录,依赖集成后执行):
47
+
48
+ ```powershell
49
+ node --test --experimental-strip-types --import ./test/prompt-source-loader.mjs --test-concurrency=1 test/web-fetch-address-policy.test.ts test/web-fetch-fakeip.test.ts
50
+ ```
51
+
52
+ 地址测试注入 DNS,保护精确网段两端、混合答案、mapped IPv6、NAT64、deny 和取消。注册/预检测试通过原生 WebRuntime 和真实公开代理策略检查消费链,其中替换 native `fetch` 的用例仅证明委托/调用前拒绝,不证明网络连通。
53
+
54
+ 动态路由回归使用已安装原生 provider、公开进程代理策略和禁止网络连接的 Undici MockAgent,检查 DNS64 期间切换代理后 IPv6 literal 重定向没有第二跳 dispatch,并检查其他允许目标保留同源重定向。该证据是路由/dispatch 行为验证,不是代理或 Fake-IP wire 连通证据。
55
+
56
+ 原生 HTTP 集成用例使用**刻意注入 loopback 答案**连接任务自有本地服务器,检查 pinned hostname/Host、同源重解析、跨源拒绝、大小上限和非 2xx。该测试不是生产策略,不证明 Fake-IP 网段的真实路由。TLS SNI 和真实 `198.18/16` wire 连通需要已有隔离网络/TLS 能力的另行验收;没有这种证据时只能说明 resolver/委托实现,不能宣称 Fake-IP wire 或整个网络需求完成。不改系统路由、Clash、凭据或未知 shell 拒绝层来取得测试通过。
57
+
58
+ ## 来源与许可
59
+
60
+ 地址分类及 RFC 6052/7050 提取逻辑改编自 DeepSeek 官方 tag `dsh-v0.2.1-rc.2` 的 [`packages/web/web-fetch-http/src/network.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.2.1-rc.2/packages/web/web-fetch-http/src/network.ts),通过公开 `ipaddr.js` 使用,不导入 SDK 私有路径。
61
+
62
+ MIT License
63
+
64
+ Copyright (c) 2026 DeepSeek
65
+
66
+ Permission is hereby granted, free of charge, to any person obtaining a copy
67
+ of this software and associated documentation files (the "Software"), to deal
68
+ in the Software without restriction, including without limitation the rights
69
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
70
+ copies of the Software, and to permit persons to whom the Software is
71
+ furnished to do so, subject to the following conditions:
72
+
73
+ The above copyright notice and this permission notice shall be included in all
74
+ copies or substantial portions of the Software.
75
+
76
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
77
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
78
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
79
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
80
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
81
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
82
+ SOFTWARE.
@@ -18,9 +18,15 @@ export interface ChildAuthorityCeiling {
18
18
  allowRouteOverride: boolean;
19
19
  maxDepth: number;
20
20
  }
21
- export type ChildRuntimePolicyCapture = Pick<DsmmSettings, "modules" | "roleRouting" | "runtimePolicy" | "workflow" | "guards" | "runtimeRecovery" | "defaultActive" | "deepseekV4ProCalibration" | "deepseekV4ProDefaultReasoningEffort" | "deepseekFlashCalibration" | "deepseekFlashDefaultReasoningEffort" | "skills"> & {
21
+ export type ChildRuntimePolicyCapture = Pick<DsmmSettings, "modules" | "roleRouting" | "runtimePolicy" | "workflow" | "guards" | "runtimeRecovery" | "defaultActive" | "skills"> & {
22
22
  subagents: Pick<DsmmSettings["subagents"], "enableRunInBackground" | "backgroundMode">;
23
23
  };
24
+ export type HistoricalChildRuntimePolicyCapture = ChildRuntimePolicyCapture & {
25
+ deepseekV4ProCalibration: "off" | "auto" | "strict";
26
+ deepseekFlashCalibration: "off" | "auto" | "strict";
27
+ deepseekV4ProDefaultReasoningEffort: "off" | "low" | "high";
28
+ deepseekFlashDefaultReasoningEffort: "off" | "low" | "high";
29
+ };
24
30
  interface ChildAdmissionCaptureBase {
25
31
  childSessionId: string;
26
32
  parentSessionId: string;
@@ -42,18 +48,22 @@ interface ChildAdmissionCaptureBase {
42
48
  }
43
49
  export interface ChildAdmissionCaptureV1 extends ChildAdmissionCaptureBase {
44
50
  version: 1;
51
+ runtimePolicyCapture: HistoricalChildRuntimePolicyCapture;
45
52
  }
46
53
  export interface ChildAdmissionCaptureV2 extends ChildAdmissionCaptureBase {
47
54
  version: 2;
55
+ runtimePolicyCapture: HistoricalChildRuntimePolicyCapture;
48
56
  modelParameterPolicy: ResolvedModelParameterPolicy;
49
57
  invocation: ChildAdmissionCaptureBase["invocation"] & {
50
58
  requestedRoute: DsmmModelRoute;
51
59
  effortSource: "native" | "dsmm-config";
52
60
  };
53
61
  }
54
- export interface ChildAdmissionCaptureV3 extends Omit<ChildAdmissionCaptureV2, "version"> {
62
+ export interface ChildAdmissionCaptureV3 extends ChildAdmissionCaptureBase {
55
63
  version: 3;
56
64
  delegationMode: "one-shot" | "continuable";
65
+ modelParameterPolicy: ResolvedModelParameterPolicy;
66
+ invocation: ChildAdmissionCaptureV2["invocation"];
57
67
  }
58
68
  export type ChildAdmissionCapture = ChildAdmissionCaptureV1 | ChildAdmissionCaptureV2 | ChildAdmissionCaptureV3;
59
69
  /** Trusted native folds only; never synthesized from the current parent's settings. */
@@ -1,6 +1,7 @@
1
1
  import { copyJson, freezeSettings, resolveConfig, validateSparseConfig } from "./settings.js";
2
2
  import { parseModelParameterPolicy } from "./model-parameter-policy.js";
3
3
  import { validateProfileOverlay } from "./profiles.js";
4
+ import { isProfileReference } from "./config-revision.js";
4
5
  import { DSMM_ROLE_IDS } from "./roles.js";
5
6
  import { CHILD_EVIDENCE_FIELDS } from "./child-evidence.js";
6
7
  export { CHILD_EVIDENCE_FIELDS, parseChildAdmissionEvidenceView } from "./child-evidence.js";
@@ -105,7 +106,12 @@ export function parseChildAdmissionCapture(input) {
105
106
  const pin = object(row.profilePin, ["id", "revision"]);
106
107
  if (typeof pin.id !== "string" || !/^[a-z0-9][a-z0-9_-]{0,63}$/u.test(pin.id) || /^(?:con|prn|aux|nul|com[0-9]|lpt[0-9])$/iu.test(pin.id))
107
108
  fail();
108
- epoch(pin.revision);
109
+ if (version === 3) {
110
+ if (!isProfileReference(pin.revision))
111
+ fail();
112
+ }
113
+ else
114
+ epoch(pin.revision);
109
115
  }
110
116
  const invocation = object(row.invocation, ["level", "initialRoute", "routeSource", ...version !== 1 ? ["requestedRoute", "effortSource"] : []]);
111
117
  if (typeof invocation.level !== "string" || !["normal", "low", "high", "max"].includes(invocation.level) || !DSMM_ROUTE_SOURCES.includes(invocation.routeSource))
@@ -116,11 +122,18 @@ export function parseChildAdmissionCapture(input) {
116
122
  if (invocation.effortSource !== "native" && invocation.effortSource !== "dsmm-config")
117
123
  fail();
118
124
  }
119
- const policyKeys = ["modules", "roleRouting", "runtimePolicy", "workflow", "guards", "runtimeRecovery", "defaultActive", "deepseekV4ProCalibration", "deepseekV4ProDefaultReasoningEffort", "deepseekFlashCalibration", "deepseekFlashDefaultReasoningEffort", "skills", "subagents"];
125
+ const policyKeys = ["modules", "roleRouting", "runtimePolicy", "workflow", "guards", "runtimeRecovery", "defaultActive", "skills", "subagents", ...version === 3 ? [] : HISTORICAL_POLICY_FIELDS];
120
126
  const policy = object(row.runtimePolicyCapture, policyKeys);
127
+ if (version !== 3)
128
+ for (const key of HISTORICAL_POLICY_FIELDS) {
129
+ const choices = key.endsWith("Calibration") ? ["off", "auto", "strict"] : ["off", "low", "high"];
130
+ if (typeof policy[key] !== "string" || !choices.includes(policy[key]))
131
+ fail();
132
+ }
121
133
  if (version === 1)
122
134
  validateLegacyRoutes(policy);
123
- const { modules, skills, subagents, ...overlay } = policy;
135
+ const execution = executionPolicy(policy);
136
+ const { modules, skills, subagents, ...overlay } = execution;
124
137
  validateProfileOverlay(overlay);
125
138
  object(modules, ["deepwork"]);
126
139
  boolean(object(modules.deepwork, ["enabled"]).enabled);
@@ -142,12 +155,16 @@ export function parseChildAdmissionCapture(input) {
142
155
  fail();
143
156
  if (typeof row.toolTopology !== "string" || !["per-role", "parameterized"].includes(row.toolTopology))
144
157
  fail();
145
- validateSparseConfig({ ...policy, ...(Object.hasOwn(row, "locale") ? { locale: row.locale } : {}), subagents: { ...background, toolTopology: row.toolTopology, allowRouteOverride: ceiling.allowRouteOverride, maxDepth: ceiling.maxDepth } }, true);
158
+ validateSparseConfig({ ...execution, ...(Object.hasOwn(row, "locale") ? { locale: row.locale } : {}), subagents: { ...background, toolTopology: row.toolTopology, allowRouteOverride: ceiling.allowRouteOverride, maxDepth: ceiling.maxDepth } }, true);
146
159
  for (const key of ["modules", "runtimePolicy", "workflow", "guards", "runtimeRecovery"])
147
160
  completeResolvedObject(policy[key], CAPTURE_POLICY_SHAPE[key]);
148
161
  return freezeSettings(row);
149
162
  }
150
163
  // Persisted protocol completeness is independent of current configuration defaults.
164
+ const HISTORICAL_POLICY_FIELDS = ["deepseekV4ProCalibration", "deepseekV4ProDefaultReasoningEffort", "deepseekFlashCalibration", "deepseekFlashDefaultReasoningEffort"];
165
+ function executionPolicy(policy) {
166
+ return Object.fromEntries(Object.entries(policy).filter(([key]) => !HISTORICAL_POLICY_FIELDS.includes(key)));
167
+ }
151
168
  const CAPTURE_SKILLS = ["brainstorming", "writing-plans", "requesting-code-review", "receiving-code-review", "subagent-driven-development", "dispatching-parallel-agents", "remove-ai-slops", "debugging", "frontend", "git-master", "ast-grep", "coding-agent-sessions", "init-deep", "using-git-worktrees"];
152
169
  const CAPTURE_POLICY_SHAPE = {
153
170
  modules: { deepwork: { enabled: null } },
@@ -194,7 +211,7 @@ function completeResolvedObject(input, template) {
194
211
  export function admissionFromChildCapture(input, nativeSubstrate) {
195
212
  const capture = parseChildAdmissionCapture(input);
196
213
  const { locale: _locale, ...substrate } = nativeSubstrate;
197
- const settings = resolveConfig({ ...substrate, ...capture.runtimePolicyCapture,
214
+ const settings = resolveConfig({ ...substrate, ...executionPolicy(capture.runtimePolicyCapture),
198
215
  modelParameters: { passthrough: capture.version === 1 || capture.modelParameterPolicy.mode !== "native-defaults" },
199
216
  roles: Object.fromEntries(DSMM_ROLE_IDS.map(role => [role, capture.authorityCeiling.roles.includes(role)])),
200
217
  ...(capture.locale === undefined ? {} : { locale: capture.locale }), subagents: { ...capture.runtimePolicyCapture.subagents,
@@ -0,0 +1,43 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { PropsLocale, PropsRenderSlots } from "@deepseek-ai/dsh-client-ui-slots";
3
+ import type { ConnectionHandle } from "@deepseek-ai/dsh-client-connection/client";
4
+ import type { ISessions } from "@deepseek-ai/dsh-api-session-controller/client";
5
+ import type { UiSession } from "@deepseek-ai/dsh-client-ui-session/client";
6
+ import type { RoleControlChildView } from "../role-control-types.js";
7
+ import { PERMISSIONS_NS } from "./permission-locales.js";
8
+ interface Owner {
9
+ parentSessionId: string;
10
+ child: RoleControlChildView;
11
+ }
12
+ interface Services {
13
+ sessions: ISessions;
14
+ uiSession: UiSession;
15
+ connection: ConnectionHandle;
16
+ }
17
+ type Locale = PropsLocale<typeof PERMISSIONS_NS>;
18
+ type Composer = PropsRenderSlots<"conversation.composer">;
19
+ /** Direct-child card action. Retention is Client-only; it never keeps the Host child alive. */
20
+ export declare function ChildPermissions(props: Owner & Services & Composer & Locale): import("react").JSX.Element | null;
21
+ export declare const CHILD_PERMISSION_SLOTS: {
22
+ readonly "conversation.dsmm-child-permissions": {
23
+ readonly kind: "list";
24
+ readonly scope: "root";
25
+ };
26
+ };
27
+ export declare function registerChildPermissionEntry(ctx: Context): void;
28
+ declare module "@deepseek-ai/dsh-client-ui-slots" {
29
+ interface SlotMap {
30
+ "conversation.dsmm-child-permissions": {
31
+ kind: "list";
32
+ scope: "root";
33
+ owner: Owner;
34
+ };
35
+ }
36
+ }
37
+ declare module "@deepseek-ai/dsh-api-session-controller/client" {
38
+ interface SessionReferenceSourceMap {
39
+ dsmmChildPermissions: unknown;
40
+ }
41
+ }
42
+ export {};
43
+ //# sourceMappingURL=ChildPermissions.d.ts.map