@dsmm/dsmm 0.3.0 → 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 (166) hide show
  1. package/README.md +26 -40
  2. package/cordis.patch.yml +0 -13
  3. package/docs/agent-presets.md +26 -14
  4. package/docs/compatibility.md +19 -73
  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 -280
  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 +12 -2
  20. package/lib/child-capture.js +22 -5
  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 +27 -52
  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 +84 -24
  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 +2713 -2361
  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 +16 -20
  82. package/lib/index.js +130 -416
  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/preset-registry.js +3 -2
  97. package/lib/preset-skills.d.ts +3 -12
  98. package/lib/preset-skills.js +28 -58
  99. package/lib/profile-diagnostics.d.ts +1 -1
  100. package/lib/profile-diagnostics.js +2 -2
  101. package/lib/profile-remote.js +61 -22
  102. package/lib/profile-rpc.d.ts +4 -3
  103. package/lib/profile-rpc.js +33 -37
  104. package/lib/profile-runtime.d.ts +31 -74
  105. package/lib/profile-runtime.js +224 -639
  106. package/lib/profile-store.d.ts +18 -6
  107. package/lib/profile-store.js +104 -62
  108. package/lib/profile-types.d.ts +18 -4
  109. package/lib/profiles.d.ts +3 -1
  110. package/lib/profiles.js +9 -7
  111. package/lib/prompt-content.d.ts +1 -0
  112. package/lib/prompt-content.js +4 -1
  113. package/lib/prompts.d.ts +2 -12
  114. package/lib/prompts.js +11 -66
  115. package/lib/role-control-remote.d.ts +1 -4
  116. package/lib/role-control-remote.js +8 -36
  117. package/lib/role-control-rpc.d.ts +10 -36
  118. package/lib/role-control-rpc.js +112 -269
  119. package/lib/role-control-types.d.ts +3 -26
  120. package/lib/role-control-types.js +3 -4
  121. package/lib/role-identity.d.ts +5 -0
  122. package/lib/role-identity.js +10 -0
  123. package/lib/role-invocation.d.ts +2 -2
  124. package/lib/role-llm-runtime.js +5 -11
  125. package/lib/role-policy.d.ts +19 -50
  126. package/lib/role-policy.js +136 -508
  127. package/lib/role-providers.d.ts +5 -8
  128. package/lib/role-providers.js +20 -86
  129. package/lib/role-routing.d.ts +1 -3
  130. package/lib/role-routing.js +24 -34
  131. package/lib/role-subagents.d.ts +5 -14
  132. package/lib/role-subagents.js +148 -106
  133. package/lib/runtime-integration.d.ts +5 -78
  134. package/lib/runtime-integration.js +11 -697
  135. package/lib/session-metadata.d.ts +13 -12
  136. package/lib/session-metadata.js +6 -31
  137. package/lib/session-scope.js +2 -1
  138. package/lib/settings.d.ts +5 -18
  139. package/lib/settings.js +19 -43
  140. package/lib/state.d.ts +3 -2
  141. package/lib/state.js +26 -10
  142. package/lib/status.d.ts +1 -9
  143. package/lib/status.js +3 -55
  144. package/lib/web-fetch-address-policy.d.ts +24 -0
  145. package/lib/web-fetch-address-policy.js +189 -0
  146. package/lib/web-fetch-fakeip.d.ts +25 -0
  147. package/lib/web-fetch-fakeip.js +107 -0
  148. package/package.json +113 -103
  149. package/docs/research/deepseek-v4-pro.md +0 -74
  150. package/docs/research/oh-dsh.md +0 -96
  151. package/lib/agent-registry.d.ts +0 -36
  152. package/lib/agent-registry.js +0 -75
  153. package/lib/child-admission.d.ts +0 -40
  154. package/lib/child-admission.js +0 -151
  155. package/lib/delivery-authority.d.ts +0 -83
  156. package/lib/delivery-authority.js +0 -397
  157. package/lib/native-child-evidence.d.ts +0 -40
  158. package/lib/native-child-evidence.js +0 -104
  159. package/lib/role-runs.d.ts +0 -138
  160. package/lib/role-runs.js +0 -335
  161. package/lib/session-persistence.d.ts +0 -36
  162. package/lib/session-persistence.js +0 -304
  163. package/lib/subagent-runtime.d.ts +0 -57
  164. package/lib/subagent-runtime.js +0 -257
  165. package/prompts/deepseek-flash.md +0 -11
  166. package/prompts/deepseek-v4-pro.md +0 -14
@@ -2,9 +2,11 @@
2
2
 
3
3
  Providers, accounts and credentials remain native DSH configuration, never named-profile contents.
4
4
 
5
+ DSMM 0.3.1 targets exactly DSH `0.2.1-rc.2`. Standard calls use native prepared calls. The public Pi-AI completions seam supports self-contained literal and explicit model-mapping raw configurations; unsupported catalog-backed raw combinations are rejected without affecting standard calls.
6
+
5
7
  ## Native roots and child defaults
6
8
 
7
- Every ordinary top-level Agent keeps the native model tab's assembled provider/model/effort, including an implicit default before the first selection event. Deepwork activation, preset selection, draft Save, future-default selection and normal current-session Apply don't select a model or calibrate root effort. Only explicit **Use profile model** asks native selection to change it; later manual choices remain authoritative.
9
+ Every ordinary top-level Agent keeps the native model tab's assembled provider/model/effort, including an implicit default before the first selection event. Deepwork activation, preset selection, draft Save and future-default selection don't select a model or calibrate root effort. Live overlay Apply is unavailable. Only explicit **Use profile model** asks native selection to change it; later manual choices remain authoritative.
8
10
 
9
11
  `roleRouting` is keyed by canonical IDs such as `dsmm-reviewer`, not tool names or labels. Each entry accepts `primary`, ordered `fallbackRoutes`, `strategy`, bounded `rateLimit`, and `levels`. Omitted primary inherits the native parent route for a child. Configured primary supplies child defaults, not a root override or new selection permission. Native child AgentOptions remain explicit host authority; changing provider/model without effort clears stale configured effort.
10
12
 
@@ -25,45 +27,45 @@ Every ordinary top-level Agent keeps the native model tab's assembled provider/m
25
27
  }
26
28
  ```
27
29
 
28
- These identifiers are placeholders for resolvable routes. The native model picker and non-DSMM requests retain the owning adapter's effort validation. DSMM routes owned by the explicit raw Host composition below accept any valid effort string without changing advertised model metadata or claiming account/network health.
30
+ These identifiers are placeholders for resolvable routes. Native model selection and standard requests retain the owning adapter's exact effort validation and encoding. Raw support doesn't authorize rewriting advertised capabilities, weakening manual-choice validation or changing standard effort encoding.
29
31
 
30
- ## Host-owned raw routes
32
+ ## Native prepared calls and raw parameters
31
33
 
32
- `modelParameters.passthrough` is an ordinary Core setting, defaulting to `true`, resolved through global, explicit native profile and named/session overlays. It is independent of Deepwork enablement and does not prove that a raw executor is installed. Save and both Apply actions preserve the original JSON; each admitted Agent keeps its immutable policy.
34
+ `modelParameters.passthrough` is an ordinary Core setting, defaulting to `true`, resolved through Global, explicit native profile and admitted named overlays. It's independent of Deepwork enablement and doesn't prove that a raw executor is installed. Save and future-default selection preserve the original JSON; each admitted Agent keeps its immutable policy.
33
35
 
34
- With passthrough **ON**, applicable DSMM routes retain valid effort strings and opaque JSON through the declared raw owner. With **OFF**, opaque/custom parameters remain stored but are not sent, and neither configured `reasoningEffort` nor `reasoning_effort` overrides native defaults. SDK-standard `temperature`, `maxTokens` and `stop` retain native handling, including explicit native refusal of an unsupported option. Independent native model/effort selections remain native-owned under either policy. OFF does not force a replacement effort or erase configuration.
36
+ With passthrough **ON**, applicable routes retain bounded opaque JSON for a supported raw adapter. With **OFF**, opaque/custom parameters remain stored but aren't sent, and configured effort doesn't override native defaults. Independent native model/effort choices remain authoritative under either policy. OFF doesn't erase configuration or force replacement effort.
35
37
 
36
- `createDsmmLlmColdStartup` is an explicit Host startup composition exported by `@dsmm/dsmm`. Install its `prepare` callback through public `dsh-app-boot.boot` before Loader entries mount. Include its patches in `profileContext.overlays` **before** `readProfilePatches`, exclude its provider names from the stock `llm-pi-ai` row, and preserve the original AgentLoop configuration, including configured Agents. The factory installs the DSMM-aware runtime before constructing the single official AgentLoop. `assertReady()` refuses incomplete composition; a model name or profile flag cannot enable raw request authority.
38
+ Standard requests that the native adapter can fully express and consume use native `LlmRuntime.prepareCall`: route, defaults, validation, adapter generation and single dispatch remain native-owned. A synchronous configure callback can't change the captured route. An earlier `resolveCallConfig` query isn't a generation credential for later execution. Native catalog/model APIs remain the directory; DSMM doesn't add another model registry or scheduler.
37
39
 
38
- The provider owner requires explicit finite model declarations, an `openai-completions` endpoint, its own settings namespace and a Host-owned request-time credential resolver. Other provider owners, native catalog metadata, model discovery and native picker validation remain separate. Responses and other APIs are not supported by this raw owner. Credentials are not profile parameters; the resolver receives the named reference and cancellation signal and must not introduce an ambient fallback.
40
+ rc.2's `LlmCallConfig` doesn't carry arbitrary provider JSON, and its Pi-AI stream doesn't consume `stop`. Such custom or stop-only requests use the minimal public Pi-AI `openai-completions` adapter/payload seam. It supports self-contained literal and explicit model-mapping configurations. Catalog-backed raw combinations that can't be reliably reproduced are rejected regardless of whether the parameter source is native selection or DSMM configuration. The loop request stays frozen and isn't patched through `llm/stream`. Standard Coding remains available. Responses and other APIs aren't covered by this raw seam.
39
41
 
40
- Cold Core composition can consume `configuredModelParameterPolicy(settings)` without waiting for Deepwork. Requests with an immutable Agent admission use `resolvedModelParameterPolicy(admission)`; a child must never substitute the current parent or Host setting. Both helpers return policy data, not authorization. Provider generations recheck their live Host service identity across preparation and credential waits and immediately before payload submission.
42
+ The raw seam captures the actual registered adapter fiber, provider configuration and credential-reference generation, with native `LlmAdapter.prepareCall` model/capability checks and single dispatch. Admission, cancellation and owner generations are rechecked after awaits and before submission. Native attribution, attachments, system prompts, tool updates and error classification are preserved. Credentials aren't copied into profiles or resolved through an ambient fallback. Standard native effort encoding remains unchanged; a raw payload hook can't mutate a captured native route or widen its authority.
41
43
 
42
- Future-default Apply and idle current-session Apply preserve valid route JSON without querying model metadata, requiring a live LLM owner, or sending a completion. Provider/model existence and supported execution are checked at actual role invocation or request preparation. Root-role, preset, ownership and CAS checks remain Apply requirements. Real requests additionally require exact Agent/role admission, the child's original capture and current direct-parent delivery authority. Cold continuation preserves that original full route rather than copying a later parent profile.
44
+ Saving or selecting a future default preserves route JSON without sending a completion. Actual invocation/preparation checks provider/model support. Existing Agents use admitted parameter policy, not desired disk values or a later parent profile. Live overlay Apply and DSMM cold resume remain unavailable. **Use profile model** is a separate native selection action, not raw execution authorization.
43
45
 
44
46
  ```jsonc
45
47
  {
46
48
  "roleRouting": {
47
49
  "dsmm-doc-search": {
48
50
  "primary": {
49
- "provider": "apai", "model": "gpt-6.1-sol", "reasoningEffort": "medium",
51
+ "provider": "my-provider", "model": "search-model", "reasoningEffort": "medium",
50
52
  "temperature": 0, "full": false, "count": 0, "optional_value": null,
51
53
  "customParameters": { "rows": [false, 0, null, [], {}] }
52
54
  },
53
55
  "fallbackRoutes": [
54
- { "provider": "apai", "model": "gpt-5.6-terra", "reasoningEffort": "high", "fallback_kind": "terra" },
55
- { "provider": "apai", "model": "gpt-5.6-luna", "reasoningEffort": "high", "fallback_kind": "luna" }
56
+ { "provider": "my-provider", "model": "fallback-model-a", "reasoningEffort": "high", "fallback_kind": "a" },
57
+ { "provider": "my-provider", "model": "fallback-model-b", "reasoningEffort": "high", "fallback_kind": "b" }
56
58
  ]
57
59
  }
58
60
  }
59
61
  }
60
62
  ```
61
63
 
62
- Additional route properties are bounded plain JSON. Their original names, values and presence are preserved, including an ordinary user property named `customParameters`. Standard `reasoningEffort` maps to `reasoning_effort` for this API. Its raw alias is also accepted, but both cannot appear together. The same exclusivity applies to `maxTokens`, `max_tokens`, `max_completion_tokens` and `max_output_tokens`. A raw token field must match the declared API/model token field and satisfy the native context budget; conflicts refuse before HTTP rather than silently rewriting the value or selecting a fallback. Host messages, tools, authentication, endpoint, headers, signals, callbacks and authority fields cannot be supplied as route parameters. Host attribution headers remain authoritative.
64
+ Additional route properties are bounded plain JSON. Their names, values and presence are preserved, including an ordinary property named `customParameters`. In the supported completions seam, `reasoningEffort` and raw `reasoning_effort` are mutually exclusive. So are `maxTokens`, `max_tokens`, `max_completion_tokens` and `max_output_tokens`. A raw token field must match the actual API/model field and native context budget; conflicts refuse before HTTP rather than rewriting values or selecting a fallback. Raw JSON can't override provider/model, messages, tools, authentication, endpoint, headers, signals, callbacks or authority fields. Native attribution remains authoritative.
63
65
 
64
- Every fallback owns its full parameter set; primary-only properties never flow into a fallback. Full JSON value identity distinguishes parameter-only changes even at the same provider/model, while object key order does not. Native request headers persist the complete call configuration and must actually flush before dispatch. A persistence or admission failure cannot fall through to stock dispatch.
66
+ Every fallback owns its full parameter set; primary-only properties never flow into it. Complete JSON values distinguish parameter-only changes at the same provider/model, while key order doesn't. Missing admission or an unsupported raw adapter must not silently fall through to native dispatch with parameters removed.
65
67
 
66
- The native Root model-selection API remains its separate three-field contract. Profile Apply and the optional native model-selection action are independent operations; failure of the latter does not undo a successful profile admission.
68
+ The native Root model-selection API remains its separate provider/model/effort contract. Its capability and manual-intent checks are independent of unavailable live overlay Apply; it doesn't write a profile selection pointer.
67
69
 
68
70
  ## Invocation selection
69
71
 
@@ -89,18 +91,16 @@ Child preparation selects the primary or first resolvable configured candidate i
89
91
 
90
92
  Only provider absence established through the public registration directory, or adapter-proven `UNKNOWN_MODEL`, can advance a remaining startup candidate before accepted output/tool fragments. A generic `NO_ADAPTER` from preparation, middleware or an unready registered adapter is not absence proof. Transport, authorization, quota, payment, context and cancelled failures don't authorize model hopping. Partial text, reasoning or tool output forbids automatic retry, including same-route retry. Ordinary roots remain on their native route. See [runtime recovery](runtime-recovery.md).
91
93
 
92
- Existing Agents use immutable admitted policy, not a later draft or desired deployment. Idle session Apply creates a new root epoch for future children; existing current-format children keep their original captures. Cold continuation doesn't reconstruct original settings from the current parent or a role label. Profile storage, native persistence and ownership are separate authorities; see [profiles](profiles.md#storage-and-lifetime) and [compatibility](compatibility.md).
94
+ Existing Agents and future children use immutable admitted policy, not a later draft or desired deployment. Child initial routes don't override later accepted native manual intent or valid fallback every turn. Omitted effort clears stale explicit effort rather than retaining a prior route's value. Profile storage, native persistence and execution ownership remain separate; see [profiles](profiles.md#storage-and-lifetime) and [compatibility](compatibility.md).
93
95
 
94
- New child captures write payload version **3**, adding the exact `one-shot` or `continuable` delegation mode to the requested route, effective initial route, effort provenance and resolved parameter policy. The outer envelope/checksum and `.children/v1` storage namespace are unchanged. The 0.3.0 reader accepts only the strict version-3 shape; V1/V2, malformed, unknown-version, or identity-mismatched captures refuse without fallback, rewrite, or migration. A version-3 one-shot child cannot be cold-resumed as live or continuable.
96
+ Cold DSMM recovery without a trusted live binding refuses. Serialized captures, PluginRecord display metadata and same-name documents don't restore authority. Existing data isn't rewritten, migrated or replaced with current-parent configuration.
95
97
 
96
98
  ## Observed route versus declared route
97
99
 
98
100
  The child report compares initial route from real `invocation-capture` with live route from that child's `own-native-request-header`. Neither substitutes for the other. Missing capture is `missing-invocation-capture`; live unknown reasons include `no-own-request-header`, `invalid-own-request-header` and `not-observed`. A root header, inherited history prefix or configured primary isn't proof of the child's own executed route. Compatibility invocation projections are labeled as such, not presented as this comparison.
99
101
 
100
- ## Exact DeepSeek calibration
101
-
102
- Child-only calibration recognizes `deepseek-official/deepseek-v4-pro` and `deepseek-official/deepseek-flash` or `deepseek-account/deepseek-flash`. The Flash model ID is `deepseek-flash`, not a guessed alias. Other providers aren't calibrated by matching model text alone.
102
+ ## Generic model parameters
103
103
 
104
- Each route family retains independent Calibration (`off`, `auto`, `strict`) and DefaultReasoningEffort (`off`, `low`, `high`) settings. Auto preserves explicit effort; strict uses supported policy effort, but neither overwrites an admitted explicit role/child effort. No effort is invented without native reasoning metadata. Ordinary root effort stays native-owned. Parameter passthrough OFF does not run DSMM effort calibration. The retired `deepseekV4ProMaxReasoningPresets` and `deepseekFlashMaxReasoningPresets` fields reject with `deprecated-field`; explicitly configure levels instead, without automatic migration.
104
+ All providers use the same native capabilities, `modelParameters`, role primary/fallback/level settings and explicit invocation controls. Omitted effort remains native-owned; DSMM introduces no brand default or advertised-effort fallback. `deepseekV4ProCalibration`, `deepseekV4ProDefaultReasoningEffort`, `deepseekFlashCalibration`, `deepseekFlashDefaultReasoningEffort` and the retired MaxReasoningPresets fields reject configuration input with `deprecated-field`. Operators edit invalid configuration explicitly; historical child evidence is not rewritten.
105
105
 
106
106
  *Author's note: For an operator assigning child models; configure exact resources and verify the child's own request route rather than treating role names as model proof.*
@@ -1,6 +1,6 @@
1
1
  # Native permissions
2
2
 
3
- DSH owns approval. DSMM composes permission policy into the native tool pipeline; it doesn't add a separate approval queue, approval UI, TTL or session permit memory. This guide states the source contract, not verification of a published package, build or release.
3
+ DSMM 0.3.1 targets exactly DSH `0.2.1-rc.2`. DSH owns approval; DSMM composes policy into the native tool pipeline without a second approval queue, UI, TTL or session permit memory.
4
4
 
5
5
  ## Full access and approval
6
6
 
@@ -8,7 +8,7 @@ Full access means actual native effective standing `danger-full-access`, not a m
8
8
 
9
9
  A captured read-only child or a live, composed DSMM read-only preset has an explicit blacklist covering `write`, `edit`, `bash` and `pwsh`. Standing Full access must not bypass that ceiling; useful native reads remain available. Missing ordinary DSMM policy or classification facts do not by themselves establish a read-only role.
10
10
 
11
- The permission contract requires an actual DSH manual approval to be final for the same call and approved scope. Older DSMM rules, a changed permission revision or epoch, and DSMM internal gates must not veto it afterward. A pending native approval isn't canceled merely because a permission source changes. The one-shot delegation exception below remains an unresolved defect.
11
+ Actual DSH manual approval is final for the same call and approved scope. Older DSMM rules, a changed permission revision or epoch, and DSMM internal gates don't veto it afterward. A pending native approval isn't canceled merely because a permission source changes.
12
12
 
13
13
  A native once grant applies only to its actual call and scope. It doesn't change standing session permissions, authorize later calls or turn a narrower approval into full access. DSMM can't infer approval from model-supplied arguments or saved policy. DSH rejection and caller/native cancellation remain effective, and the original tool or OS can still fail. Permission to execute isn't a command-success guarantee.
14
14
 
@@ -22,14 +22,24 @@ The rules RPC writes Global. A native override of outside-read, web or rule poli
22
22
 
23
23
  Storage CAS and runtime adoption are separate from native call approval. Saves recheck authoritative storage and await notification before publishing synchronized policy. Notification failure leaves saved/runtime revisions visibly unsynchronized; recovery rereads storage, and conflicts preserve dirty drafts. These checks don't cancel pending native approval or override an actual approved call. New calls consume current policy, with no cross-call reuse of a once grant.
24
24
 
25
+ Configuration writes require the real native operator, exact entry/form or Root authority and a live connection/owner through every await and immediately before commit. Serialized provenance, a client loopback claim or an old registration isn't authority. Only relevant effective permission changes coordinate revocation; unrelated model/locale/display edits aren't a second approval gate. A committed write stays committed when notification or observation fails, with refresh-required/unsynchronized status. An unconfirmed native result requires reread, not blind retry.
26
+
27
+ ## Configuration drawer and exact native commands
28
+
29
+ Use **Plugins → DSMM bundle config → Permissions**. The selected Global/native-profile scope edits its sparse deployment policy; a separate Root-rules transaction writes Global only under the existing live operator, exact open Root, registration and synchronized-policy authority. A child, stale connection, read-only Host or shadowing native policy doesn't acquire a fallback Global write. Named Profiles can't grant these permissions. No duplicate Settings permission page or Conversation permission tab is registered.
30
+
31
+ `permissionControl.nativeCommands` defaults off. Exact entries match tool, executable, optional subcommand, ordered arguments, absolute Host working directory and sandbox mode. They don't use wildcards, parse an arbitrary shell command or normalize caller values into a match. New UI entries use Ask and `workspace-write`, not full access; an Allow entry can't replace downstream Ask/Deny or a role's read-only ceiling.
32
+
33
+ Observed `kind:shell` registration isn't proof of the actual executor, environment, executable or sandbox. The editor doesn't auto-certify those values. Missing/stale controller or registration identity still refuses consumption. Saving an exact rule isn't native manual approval and doesn't solve an unexplained read-only Git prompt; that investigation needs the full triggering call and approval reason.
34
+
25
35
  ## Capability limits
26
36
 
27
- ### Deferred P1: admission changes during one-shot approval
37
+ ### Running overlay changes
28
38
 
29
- If a profile selection publishes a new parent admission epoch while a DSMM one-shot delegation awaits native approval, an ensuing Allow can still be rejected with `UNAUTHORIZED` before child dispatch, even when the physical Agent, owner and tool registration are unchanged. This is a known availability defect, not a successful approval or a permission grant to later calls. Avoid changing the parent profile while approval is pending; if the call is refused, issue a fresh invocation under the current profile.
39
+ Live overlay Apply is unavailable. Save/select a future default and create a new session instead of rebinding an active parent or pending invocation. Ordinary mode controls and Use profile model retain independent capabilities; neither grants overlay authority.
30
40
 
31
- This case is excluded from temporary integration acceptance, not considered fixed. Its complete regression remains in `test/native-core-review-regressions.test.mjs` and is skipped with an explicit reason by default. Set `DSMM_TEST_DEFERRED_APPROVAL=1` to run it. Final unrestricted acceptance still requires this regression to pass without weakening cancellation, ownership or input isolation. The installed SDK and existing request-revocation protections remain unchanged.
41
+ Same-call approval, cancellation, ownership and input isolation remain effective. Don't replay a whole parent task to work around a refused call; inspect the outcome and explicitly invoke fresh work only when appropriate.
32
42
 
33
- See the [accepted risk and reevaluation conditions](deferred-native-approval-risk.md) for the bounded deferral and future DSH compatibility requirements.
43
+ See [running-overlay and approval boundaries](deferred-native-approval-risk.md).
34
44
 
35
- Permission coverage isn't proof of final inode identity or socket isolation. Colocation of `rg` with the intended execution environment isn't proven, and direct formal coverage remains partial. Native outside-read and web coverage, policy synchronization, and successful storage writes are distinct claims. None establishes complete shell filesystem/network isolation or published-artifact delivery.
45
+ Outside-read and web policies apply to their native tool surfaces. They don't provide complete filesystem/network isolation for arbitrary shell commands or replace operating-system checks on the final inode and socket target.
package/docs/profiles.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Deepwork runtime profiles
2
2
 
3
- This guide describes the built source configuration. A published `@dsmm/dsmm@0.2.0` package doesn't automatically contain uncommitted source features; check the actual artifact before using these interfaces. Package availability and Host compatibility are separate from configuration validity. See [compatibility](compatibility.md) and [releasing](releasing.md).
3
+ DSMM 0.3.1 targets exactly DSH `0.2.1-rc.2`. See [compatibility](compatibility.md) for installation boundaries.
4
4
 
5
5
  A named Deepwork profile is a runtime-policy document, not a native deployment profile or Agent preset. Open **Settings → Deepwork Profiles** to browse and edit it. Native **Plugins → DSMM** edits deployment layers instead, as described in [settings and status](settings-status.md).
6
6
 
@@ -15,9 +15,9 @@ A named Deepwork profile is a runtime-policy document, not a native deployment p
15
15
 
16
16
  Browsing doesn't activate anything. **Save profile** doesn't select or apply it, even when its ID is already selected. **Set as future default** pins the saved revision, not the dirty draft, and leaves existing Agents unchanged. **Use baseline for future sessions** clears that default without deleting documents.
17
17
 
18
- **Apply profile to current session** and **Pin baseline for current session** are separate actions. They target the native view's exact session ID, reserve a truly idle ordinary root, and require both selection CAS and the current admission epoch. Busy, maintenance-owned, disposed, replaced, child or unauthorized targets refuse; nothing is queued. A successful change updates only that root and future children. Existing children keep their original captures.
18
+ **Apply profile to current session** and **Pin baseline for current session** are unavailable in this version (`canApplyOverlay:false`, `new-session-required`). Save and select a future default, then create a new session. Nothing is queued, restarted or silently applied to the current root or its children.
19
19
 
20
- The compact Conversation header menu switches the current-session profile while preserving the native model. Its separate **Use profile model** action asks native model selection to use the current admitted immutable profile's declared main model. It doesn't apply a later saved draft. Native model-default persistence follows the Models tab; newer manual model or effort intent wins. Sessionless controls never create a session.
20
+ The compact Conversation header menu shows the current admission separately from the future default. **Use profile model** asks native model selection to use the admitted immutable configuration's declared main model, not a later saved draft. It doesn't write an overlay pointer or increment the admission epoch. Native model-default persistence follows the Models tab; newer manual model or effort intent, including same-value reselection, wins. `canSelectModel`, `canToggleMode` and `canApplyOverlay` have independent reasons: unavailable live Apply doesn't disable ordinary model selection or mode switching. Sessionless controls never create a session.
21
21
 
22
22
  ## Document format
23
23
 
@@ -47,9 +47,9 @@ A document contains exactly `version: 1`, a filename-matching `id`, optional `la
47
47
 
48
48
  The provider/model must resolve through native DSH, and an exact effort must be supported. Catalog listings are advisory, not authentication or network-health checks. Manual/unlisted routes remain editable. See [model routing](model-routing.md) for level selection and route precedence.
49
49
 
50
- Allowed runtime fields are `defaultActive`, `locale`, `roles`, `roleRouting`, `runtimePolicy`, `workflow`, `guards`, `runtimeRecovery`, `subagents.toolTopology`, and the `deepseekV4Pro`/`deepseekFlash` Calibration and DefaultReasoningEffort fields. Skills, prompt content, preset installation, LSP, session persistence, provider/account credentials, background/depth settings and `subagents.allowRouteOverride` remain deployment-only. `modules` is global-only. Unknown fields are rejected.
50
+ Allowed runtime fields are `defaultActive`, `locale`, `roles`, `roleRouting`, `modelParameters`, `runtimePolicy`, `workflow`, `guards`, `runtimeRecovery`, and `subagents.toolTopology`. Skills, prompt content, preset installation, LSP, provider/account credentials, background/depth settings and `subagents.allowRouteOverride` aren't named-profile fields. Native persistence remains Host-owned. `modules` is global-only. Unknown fields are rejected.
51
51
 
52
- `deepseekV4ProMaxReasoningPresets` and `deepseekFlashMaxReasoningPresets` are rejected with `deprecated-field`. They aren't silently ignored or migrated. Configure explicit `roleRouting[id].levels.low/high/max` instead; `normal` is the invocation default, not a configurable level entry. Orchestrator levels aren't supported.
52
+ The `deepseekV4Pro`/`deepseekFlash` Calibration, DefaultReasoningEffort and MaxReasoningPresets fields are rejected with `deprecated-field`. They aren't silently ignored or migrated. All models use native capabilities, `modelParameters` and explicit `roleRouting[id]` primary/fallback/level parameters. `normal` is the invocation default, not a configurable level entry. Orchestrator levels aren't supported.
53
53
 
54
54
  ## Inheritance and ceilings
55
55
 
@@ -65,16 +65,20 @@ Structured controls and Advanced JSONC edit the same draft. Path edits preserve
65
65
 
66
66
  The only nonblocking warning is `blank-label`: the profile ID is used for display, and the original document can still be saved and selected. Saved, draft, future-pin and current-admission warnings are distinct. Validation errors carry a stable reason, schema-safe field and, when available, JSONC offset/length and line/column. Unknown key names aren't echoed as trusted diagnostic fields. Duplicate keys, unsafe keys, malformed routes, unsupported values and retired fields block validation.
67
67
 
68
- Saves and selections require expected revisions. Cooperative writers share a lock, recheck the revision before commit, and use same-directory atomic replacement. A conflict retains the draft and prior selection: refresh and reconcile explicitly. A non-cooperating editor can still race between the final recheck and rename; this isn't a universal external-editor transaction. Failed pointer commits retain the prior selection, though an unused immutable revision may remain.
68
+ Saves and selections require expected versions. File `revision` values use `stat-v1-<mtimeNs>-<ctimeNs>` from safe file observations; they distinguish ordinary versions, not content integrity. Cooperative writers share a lock, recheck before commit, and use same-directory atomic replacement. Precommit failures retain the prior selection, though an unused snapshot may remain. Same-stat content changes and non-cooperating final-rename races are not detected or prevented by a version marker.
69
+
70
+ Successful rename is the commit point. Admission preparation finishes before rename and publication happens synchronously once. Failure to observe the final target, including replacement by another file, still returns committed success with `selectionRevision` or `revision` set to `unavailable` and `refreshRequired:true`. Refresh before another mutation; `unavailable` is not a valid expected revision. A normal save returns the version a subsequent read observes, not staging-file timestamps.
69
71
 
70
72
  ## Storage and lifetime
71
73
 
72
74
  The central store is `<resolvedDshHome>/plugins/dsmm/profiles/`, a DSMM convention. Trusted home resolution uses explicit `profileContext.home`, then `DSH_HOME`, then the official `~/.dsh` default. Shared named drafts and immutable revisions are separate from selection/session state scoped to canonical native profile identity and the actual DSMM entry ID. Reads don't create files or locks. Clients and models can't choose arbitrary roots or entry identities.
73
75
 
74
- An old `<profileContext.dir>/dsmm-profiles` library is unsupported by 0.3.0. It remains untouched and is not replaced by a same-name central document. Invalid, missing, old-format, linked, unstable, or digest-mismatched references refuse. There is no automatic copy, import, migration, rewrite, or source deletion.
76
+ Future-default selection pins an exclusive `snapshot-v1-<UUID>` file in `.revisions`; it never overwrites an older snapshot. Selection pointers keep the ID and immutable snapshot reference. Optional `sourceRevision` relates that snapshot to the saved document; missing values mean unknown, not equal. Disk selection revisions are CAS observations, not proof that an externally edited pointer has been admitted. No reference authorizes fallback to the latest draft.
77
+
78
+ An old `<profileContext.dir>/dsmm-profiles` library is unsupported. It remains untouched and is not replaced by a same-name central document. Invalid, missing, linked or unstable references refuse. File/path, size, schema and session identity checks remain mandatory. There is no automatic copy, import, migration, rewrite or source deletion.
75
79
 
76
- Startup freezes deployment and mounted capabilities before consumers install. New ordinary roots capture current valid desired deployment plus the selected immutable overlay. Existing roots, including blank ones, keep their full captures; idle profile Apply replaces only the allowed overlay on that root's old deployment baseline. `getSettings(agent)` is authoritative for an existing Agent. Cold resume creates a new live admission from current valid deployment and its committed sidecar, or the scoped future default when no sidecar exists; it doesn't restore an exited process's memory snapshot.
80
+ Startup freezes mounted capabilities before consumers install. New ordinary roots capture current valid desired deployment plus the selected immutable overlay within that ceiling. Existing roots, including blank ones, and their future children keep their admitted baseline. `getSettings(agent)` is authoritative for an existing Agent. Cold DSMM resume without a trusted live admission is unavailable; a saved sidecar, same-name document or display record can't restore execution authority. History remains preserved. Read-only observation doesn't resume a session.
77
81
 
78
- Profile Apply never changes the native root model, remounts startup services or upgrades role permissions. Deepwork mode intent is separately saved and survives profile changes. Children retain their original route/locale/authority evidence, intersected with current exact-parent authority for delivery; see [Agent presets and child control](agent-presets.md).
82
+ Saving or selecting a future default never changes the native root model, remounts startup services or upgrades role permissions. Deepwork mode intent is separate: explicit off wins over DW preset defaults and doesn't remove persona/read-only policy. Live children retain their original route, locale and authority, with exact-parent checks for control; see [Agent presets and child control](agent-presets.md).
79
83
 
80
84
  *Author's note: For a DSH operator editing named policy; save first, then choose the intended future or current-session scope explicitly.*