@dsmm/dsmm 0.3.11 → 0.3.12

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 (53) hide show
  1. package/README.md +1 -1
  2. package/docs/agent-presets.md +4 -4
  3. package/docs/compatibility.md +10 -4
  4. package/docs/deferred-native-approval-risk.md +1 -1
  5. package/docs/design.md +15 -5
  6. package/docs/lsp.md +1 -1
  7. package/docs/model-routing.md +6 -6
  8. package/docs/native-permissions.md +1 -1
  9. package/docs/profiles.md +36 -5
  10. package/docs/roadmap.md +3 -3
  11. package/docs/runtime-recovery.md +5 -5
  12. package/docs/safety-guards.md +1 -1
  13. package/docs/settings-status.md +3 -3
  14. package/lib/child-capture.d.ts +9 -0
  15. package/lib/child-capture.js +24 -1
  16. package/lib/client/ProfilesSection.js +65 -13
  17. package/lib/client/RoleToolView-data.d.ts +4 -4
  18. package/lib/client/RoleToolView-data.js +3 -1
  19. package/lib/client/RoleToolView-locales.d.ts +7 -4
  20. package/lib/client/RoleToolView-locales.js +10 -6
  21. package/lib/client/RoleToolView.js +20 -5
  22. package/lib/client/SessionProfiles.d.ts +5 -1
  23. package/lib/client/SessionProfiles.js +13 -9
  24. package/lib/client/StructuredEditor.d.ts +32 -0
  25. package/lib/client/StructuredEditor.js +75 -23
  26. package/lib/client/controller.d.ts +10 -0
  27. package/lib/client/controller.js +44 -14
  28. package/lib/client/locales.d.ts +36 -0
  29. package/lib/client/locales.js +47 -17
  30. package/lib/client/session-labels.js +4 -1
  31. package/lib/client/structured.d.ts +4 -0
  32. package/lib/client/structured.js +16 -1
  33. package/lib/client/styles.d.ts +1 -1
  34. package/lib/client/styles.js +19 -1
  35. package/lib/client.js +762 -303
  36. package/lib/host-llm.js +3 -3
  37. package/lib/index.js +1 -1
  38. package/lib/model-routing.d.ts +3 -2
  39. package/lib/model-routing.js +28 -7
  40. package/lib/native-admission.d.ts +2 -0
  41. package/lib/native-admission.js +106 -34
  42. package/lib/profile-runtime.d.ts +11 -0
  43. package/lib/profile-runtime.js +48 -13
  44. package/lib/profile-store.d.ts +4 -1
  45. package/lib/profile-store.js +37 -14
  46. package/lib/role-control-rpc.js +18 -5
  47. package/lib/role-llm-runtime.js +10 -1
  48. package/lib/role-policy.d.ts +4 -3
  49. package/lib/role-policy.js +6 -6
  50. package/lib/role-providers.js +1 -0
  51. package/lib/runtime-recovery.d.ts +2 -2
  52. package/lib/runtime-recovery.js +7 -4
  53. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  DSMM (`@dsmm/dsmm`) adds native configuration, role delegation and child controls to DeepSeek Harness. **DSMM** is the Plugins page and package title; **Deepwork** is its optional workflow module. It isn't an OpenCode compatibility layer.
4
4
 
5
- **DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`** and Node.js 22 or later. The maintained source repository is [hugefiver/dsmm](https://github.com/hugefiver/dsmm).
5
+ **DSMM 0.3.12 targets exactly DSH `0.2.1-rc.2`** and Node.js 22 or later. The maintained source repository is [hugefiver/dsmm](https://github.com/hugefiver/dsmm).
6
6
 
7
7
  ## Configuration and profiles
8
8
 
@@ -1,6 +1,6 @@
1
1
  # Deepwork Agent presets and child control
2
2
 
3
- DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`. Native package composition and callable admission are separate requirements.
3
+ DSMM 0.3.12 targets exactly DSH `0.2.1-rc.2`. Native package composition and callable admission are separate requirements.
4
4
 
5
5
  ## Roles and composition
6
6
 
@@ -33,7 +33,7 @@ No child gains coordination authority from a preset label, persona or serialized
33
33
 
34
34
  Read-only roles remain read-only independently of mode and optional guards. Planner returns complete Markdown for native review/handoff; an authorized coordinator persists it. There is no Planner writer. Native catalog visibility and role permission are separate: a schema or read-only catalog listing doesn't authorize invocation, and own-layer native schemas may remain visible even when mandatory execution fences deny them.
35
35
 
36
- Descendants intersect parent allow-lists with requested restrictions and union deny-lists, using frozen captures. Existing native filters still execute. Reinstallation, direct aliases, continuable starts and cold resumes don't enlarge original authority. A named profile can narrow enabled roles but can't lift startup/deployment ceilings; required roles and conditional legacy review rules are covered in [profiles](profiles.md#inheritance-and-ceilings).
36
+ Descendants intersect current parent capability ceilings with native/requested restrictions and union deny-lists. Existing native filters still execute. Cold resume rebuilds DSMM restrictions from current role/configuration and exact parent authority rather than restoring an old runtime snapshot. A named profile cannot lift startup/deployment or native ceilings; required roles are covered in [profiles](profiles.md#inheritance-and-ceilings).
37
37
 
38
38
  ## Invocation and lifecycle
39
39
 
@@ -51,7 +51,7 @@ Child report interfaces expose actual runs, direct children and a read-only desc
51
51
 
52
52
  Route comparison uses the live admitted `invocation-capture` and the child's latest `own-native-request-header`. Missing, invalid or unobserved evidence remains unknown; it is never inferred from a root route, current profile or role label. Display metadata isn't a cold-recovery credential.
53
53
 
54
- Human messages target only a supported live direct child with current exact-parent authority and native capabilities. Entries whose observed control projection is read-only remain inspection-only; this isn't the role's tool-level read-only policy. **Queue** accepts a distinct later turn; **Steer** targets the nearest step. An idle live child can receive another turn, but DSMM cold resume without trusted live binding is unsupported. Native attachment/model capabilities separately determine image availability.
54
+ Human messages target supported direct children with current exact-parent authority and native capabilities. **Queue** accepts a distinct later turn; **Steer** targets the nearest step. A cold continuable child enters the native recovery path and obtains a fresh role admission. Listing and interrupt do not activate cold children. Inspection-only descendant controls are separate from tool-level readonly policy. Native attachment/model preflight can still limit image continuation; see [compatibility](compatibility.md#native-history-composition).
55
55
 
56
56
  An inbox receipt means **accepted**, not executed or completed. An interrupt acknowledgment isn't completion and doesn't claim queued work was removed. If transport leaves a send outcome unknown, the draft stays visible and automatic resend is disabled. Inspect the native child conversation before explicitly allowing a new message, which could duplicate an accepted one. Refresh and reconnection never imply automatic retry.
57
57
 
@@ -67,7 +67,7 @@ Arguments, result content, errors and metadata remain inspectable as JSON. Nonte
67
67
 
68
68
  Official AgentRegistry, SubagentRuntime and JSONL namespace plugins own execution and storage. There is no custom Registry/Runtime selector, manual-runtime activation path or companion requirement. Native runtime availability and actual DSMM admission are still separate observations; seeing a catalog isn't proof of callable policy. See [settings](settings-status.md#child-runtime-composition).
69
69
 
70
- Cold DSMM recovery without a trusted live binding refuses execution and preserves history. Logs, IDs, PluginRecord display data or current parent settings can't restore authority. Read-only history queries don't resume Agents. `preset-skills` is an internal handle installed and released by the admitted Agent scope, not a public plugin. See [compatibility](compatibility.md#retired-compatibility-surfaces).
70
+ Cold recovery requires verified native root/child identity and creates a new exact-object admission. Logs, IDs and display data alone cannot restore authority. Missing old captures do not block a valid native DSMM child. Read-only history queries never resume Agents. `preset-skills` is installed and released by the admitted Agent scope, not a public plugin. See [compatibility](compatibility.md#native-history-composition).
71
71
 
72
72
  Native Host commands, sessions, inbox, permissions, process/cwd/model selection and transports retain ownership. DSMM supplies role admission and bounded controls, not a replacement lifecycle scheduler, generic permission bypass or automatic retry system.
73
73
 
@@ -1,6 +1,6 @@
1
1
  # DSMM compatibility and upgrade boundaries
2
2
 
3
- **DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`** and Node.js 22 or later. Older SDKs and automatically drifting versions aren't supported targets.
3
+ **DSMM 0.3.12 targets exactly DSH `0.2.1-rc.2`** and Node.js 22 or later. Older SDKs and automatically drifting versions aren't supported targets.
4
4
 
5
5
  ## Supported integration
6
6
 
@@ -16,7 +16,7 @@ Core configuration and native permissions work without a session or active Deepw
16
16
 
17
17
  Global and exact native-profile saves are independent. Native form identity/revision and base/user provenance are required; no fallback Global write or cross-layer transaction is implied. Named documents, future-default pointers and actual admission remain separate. Desired saves don't change mounted capability or a running Agent's policy. Without a session, actual admission is unknown.
18
18
 
19
- Save and future-default selection remain available under their own authority. **Live overlay Apply is unavailable; choose a default for a new session.** Native **Use profile model** and **Deepwork mode** have independent capabilities, not Apply's disabled gate. Use profile model consumes the admitted immutable configuration and respects newer native manual model/effort intent, including same-value reselection. Ordinary roots otherwise retain native selection. See [Profiles](profiles.md) and [settings/status](settings-status.md).
19
+ Save and future-default selection remain available under their own authority. Native **Use profile model** and **Deepwork mode** have independent capabilities. Use profile model consumes the admitted configuration and respects newer native manual model/effort intent, including same-value reselection. Root requests retain native assembled selection/defaults; refreshing an admission does not implicitly select its profile primary or authorize a root fallback channel. See [Profiles](profiles.md) and [settings/status](settings-status.md).
20
20
 
21
21
  Stores use separate CAS and atomic-write boundaries. Committed saves aren't rolled back in the response because observation/notification failed: report refresh-required or unsynchronized status. An unconfirmed native mutation requires authoritative reread before retry. Operator, connection and owner lifetime remain valid through precommit; client claims or loopback-looking URLs don't authorize writes.
22
22
 
@@ -26,11 +26,17 @@ Stores use separate CAS and atomic-write boundaries. Committed saves aren't roll
26
26
 
27
27
  DSMM runs against the unpatched native DSH packages: it installs no Host-side patches and injects no bootstrap flags. Historical sessions stay readable through native history surfaces, and a persisted DSMM session resumes with a fresh admission built from the current deployment; persisted mode choices remain user intent, while old delegation authority never survives.
28
28
 
29
+ Root and native continuable-child activations load current DSMM prompts/skills/roles and the selected profile ID's latest valid content. Explicit baseline and global-default sources remain distinct. Old immutable revisions and runtime captures are not required for a valid native DSMM descriptor. Missing identity or conflicting/unsafe selection metadata refuses; missing or invalid current named content does not fall back. Parent ownership, catalog/own descriptor, provider, independent composition, readonly/filter/depth and cancellation boundaries are validated before publication. Resident Agents do not hot-switch. Settled one-shot children stay non-resumable.
30
+
31
+ DSH `0.2.1-rc.2` still checks image capabilities against historical `agent.options` before request routing in affected root model-switch and cold-child flows. Text requests can use a current available route while images fail because the historical model is missing or lacks image support. DSH exposes no public atomic route/options update for that preflight; DSMM leaves the refusal intact and does not modify readonly options or fake capabilities. Resolution requires a public route-aware preflight or supported pre-activation options hook. Recheck both root and child scenarios during each authorized DSH upgrade.
32
+
33
+ Native continuation replays persisted persona and toolFilter. Current DSMM role tools do not store a persona override, so their role prompt is freshly installed. A historical format embedding a complete DSMM prompt into a native persona registration cannot be replaced through the available DSMM-owned registration interfaces. Such native content/filter restrictions remain effective; an independent historical preset that no longer resolves fails explicitly. A later Host public interface for replacing that owned persona/composition, with native restrictions preserved, is required before claiming that format fully refreshed. Labels or model-produced role text alone never supply missing native/host-owned role identity.
34
+
29
35
  ### Execution ownership
30
36
 
31
37
  Role calls wait for native activation results by default; only `completed` is normal completion. Cancellation after publication uses activation disposal and cleanup. Enabled background execution selects `delivery: 'parent'` before start. The accepted child/message receipt and interrupt acknowledgment aren't completion. Running waiting tasks can't transfer to background.
32
38
 
33
- Queue/Steer/interrupt apply only to supported live direct children under exact-parent/operator authority. Descendant views are read-only. Missing native capability disables that operation with a reason; unknown sends aren't automatically resent. Requested role/model data isn't actual execution identity. See [Agent presets](agent-presets.md).
39
+ Queue/Steer can enter native cold continuation for supported direct children under exact-parent/operator authority. Listing and interrupt do not wake children; descendant views remain read-only. A cold prompt availability means continuation can be attempted, not that a model has executed. Missing native capability disables the operation; unknown sends aren't automatically resent. See [Agent presets](agent-presets.md).
34
40
 
35
41
  Resuming a persisted DSMM session builds a fresh admission from the current deployment and validates its mounted composition again; configuration, PluginRecord metadata, labels or child IDs never reconstruct authorization. A resumed child without its exact live parent stays refused: delegated authority exists only on the live parent that admitted it. Preserve readable history; don't substitute a persona, reset a session or import old data automatically. Native factory load/repair can precede the created guard, so a refusal doesn't promise the log was never opened. Clear/compact can retain policy only with the exact live object and admission, not inferred lineage.
36
42
 
@@ -38,7 +44,7 @@ Standard supported model calls use native prepared calls. Raw/custom and Pi-AI s
38
44
 
39
45
  ## Retired compatibility surfaces
40
46
 
41
- No old SDK branch, legacy-read host, cold-profile migration, session repair or custom-owner selector is a 0.3.11 activation path. Old libraries, captures and unmarked history aren't copied, rewritten, repaired or adopted by same-name fallback. Retired brand calibration/default-effort and MaxReasoningPresets fields reject with `deprecated-field`; edit configuration deliberately using generic routes and parameters.
47
+ No old SDK branch, legacy-read host, cold-profile migration, session repair or custom-owner selector is a 0.3.12 activation path. Old libraries, captures and unmarked history aren't copied, rewritten, repaired or adopted by same-name fallback. Retired brand calibration/default-effort and MaxReasoningPresets fields reject with `deprecated-field`; edit configuration deliberately using generic routes and parameters.
42
48
 
43
49
  Published **0.3.0 retains its rc.1 identity**, immutable tag, package, assets and version-bound receipt grammar. Historical release controls interpret those records under their original identity, not as a runtime compatibility branch.
44
50
 
@@ -1,6 +1,6 @@
1
1
  # 原生审批与运行中配置边界
2
2
 
3
- DSMM 0.3.11 精确面向 DSH `0.2.1-rc.2`。原生批准仅对同次调用及其批准范围有效,不扩展到其他输入或后续调用。配置来源变化不把 DSMM epoch 变成第二次审批,也不取消已经等待的原生审批。
3
+ DSMM 0.3.12 精确面向 DSH `0.2.1-rc.2`。原生批准仅对同次调用及其批准范围有效,不扩展到其他输入或后续调用。配置来源变化不把 DSMM epoch 变成第二次审批,也不取消已经等待的原生审批。
4
4
 
5
5
  ## 当前限制
6
6
 
package/docs/design.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # DSMM native architecture
2
2
 
3
- DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`. It supplies Core configuration and native permission integration plus optional Deepwork roles, routing and skills.
3
+ DSMM 0.3.12 targets exactly DSH `0.2.1-rc.2`. It supplies Core configuration and native permission integration plus optional Deepwork roles, routing and skills.
4
+
5
+ ## Native integration boundary
6
+
7
+ DSMM implements its own configuration, roles, prompts and routing through existing public DSH extension interfaces. Missing Host capabilities are not implemented by replacing DSH components, patching DSH code, modifying private runtime state or bypassing native validation. Native session lifecycle, model selection, tools, sandbox and approval remain owned by DSH.
8
+
9
+ DSMM registration, configuration and routing-order defects are corrected within DSMM. A limitation that also occurs when DSH itself switches models remains native behavior, including image-input preflight that still observes a historical model. DSMM does not take over that preflight or falsify model capabilities to compensate. Such limits are documented separately from implemented DSMM behavior and do not block independent DSMM fixes or count as verified functionality.
10
+
11
+ For each required feature limited by the Host, record the affected behavior, the evaluated DSH version, the missing public capability and the conditions needed to implement it. During subsequent DSH version updates, recheck those conditions against the new public interfaces and verify the actual behavior. Implement the feature within DSMM's native integration boundary when support becomes available; otherwise keep the limitation explicit. Update the relevant design or compatibility documentation to describe the current limitation and its resolution criteria, rather than retaining a development log.
4
12
 
5
13
  ## Composition and authority
6
14
 
@@ -8,7 +16,7 @@ Official AgentRegistry, SubagentRuntime, AgentLoop and JSONL namespace plugins o
8
16
 
9
17
  The data flow is configuration source → complete immutable candidate → Agent admission → native request/tool execution → activation/catalog → client projection. Configuration and display metadata can't flow backward to grant execution permission.
10
18
 
11
- Each role invocation captures its exact parent, ToolExecution, definition/provider identities, frozen settings and route before calling native `startActivation`. A short-lived pending record correlates the unique child with awaited `agent/created`. That listener installs scoped policy, skills and routing before queued input is released, then publishes the live admission. It runs after Registry publication; initialization failure is rolled back by the native factory, not treated as an unpublished creation. Pending state isn't a second execution queue.
19
+ Each new role invocation captures its exact parent, ToolExecution, definition/provider identities, frozen settings and route before calling native `startActivation`. A short-lived pending record correlates the unique child with awaited `agent/created`. Native continuation instead validates the exact live parent, direct-child catalog, own descriptor and current provider; it does not fabricate a pending tool call or wait for the manager's later resident activation. The listener installs scoped policy, skills and routing before queued input is released, then publishes admission. Initialization failure is rolled back by the native factory. An independent native child preset is validated in its own current composition, not forced to equal the parent's preset.
12
20
 
13
21
  Preset discovery, root eligibility and model availability are independent. Auxiliary presets aren't valid roots even if a native picker displays them. Empty-root preset changes require a valid execution-before-input binding; mismatched composition refuses at step/request/tool boundaries. Generic spawn/fork can't bypass a controlled parent's role admission. Ordinary non-DSMM off-mode paths don't gain DSMM authority.
14
22
 
@@ -18,7 +26,7 @@ Agent-scoped guards retain lifetime checks after plugin retirement. Native activ
18
26
 
19
27
  Settings resolve as defaults → sparse Global → explicit native entry/profile → admitted named overlay. Objects merge, arrays replace, and explicit false, empty and same-default values remain pins. Unset affects only its own layer.
20
28
 
21
- Core remains available without a session or active Deepwork. Desired source values, mounted startup ceilings and actual Agent admission are distinct. New roots capture valid desired configuration within mounted ceilings. Existing Agents and their children don't absorb later saves. Without a session, admission is unknown.
29
+ Core remains available without a session or active Deepwork. Desired source values, mounted startup ceilings and actual Agent admission are distinct. Every root or continuable role-child activation captures current valid configuration within mounted ceilings. A resident Agent does not absorb later saves; freshly delegated children capture their parent's admission, while cold continuations resolve current content within the parent's actual authority. Without a session, admission is unknown.
22
30
 
23
31
  Global, native form, named document and selection pointer have independent CAS boundaries. Global/store writes retain prepare, atomic commit and observation stages; native writes retain the public ConfigEditor/form transaction. Operator, connection, entry and lifetime are checked after awaits and before irreversible writes. A committed write with failed notification/observation stays committed with refresh-required or unsynchronized status. An unconfirmed native mutation requires reread before retry.
24
32
 
@@ -36,14 +44,16 @@ Collapsed invocation rows show `调用 Coding` / `Call Coding`; native child lab
36
44
 
37
45
  Waiting calls use native `delivery: 'caller'` and consume the activation result; only `completed` is normal completion. Publication-time cancellation uses the receipt's `dispose()` and waits for cleanup. Background must be chosen before start with `delivery: 'parent'`; accepted child/message IDs aren't completion. Running waiting calls can't be handed off to background.
38
46
 
39
- Live direct-child Queue/Steer/interrupt require exact ownership, admission, operator and actual native capabilities. Unknown delivery outcomes aren't automatically resent. Cold DSMM resume without trusted live binding refuses execution while preserving history. DSMM read-only history queries don't call resume; native factory load/repair may precede the created guard, so refusal isn't a no-log-open guarantee.
47
+ Direct-child Queue/Steer require exact ownership, parent admission, operator and native continuable catalog evidence. A cold prompt enters native continuation and obtains a new admission before executing. Interrupt and read-only list/describe never wake children. Unknown delivery outcomes aren't automatically resent. Native factory load/repair may precede the created guard, so refusal isn't a no-log-open guarantee.
40
48
 
41
- Ordinary roots retain native model selection. Role normal and explicit low/high/max routes use generic capabilities and immutable parameter policy. Standard supported calls use native prepared calls. Raw/custom parameters and Pi-AI stop-only calls use the minimal public completions payload seam for self-contained literal or explicit model-mapping configurations. Catalog-backed raw combinations that can't be reliably reproduced are rejected for both native and DSMM parameter sources. Standard Coding and native effort encoding remain unchanged. [Model routing](model-routing.md) and [runtime recovery](runtime-recovery.md) define the boundaries.
49
+ Roots retain native assembled model and effort, including before an explicit selection event; an admitted profile primary is available to the explicit native model-selection action, not an implicit root override. Role children use current invocation routing, with their own explicit native selection taking priority during continuation preflight. Recovery and role routing prepare the request inside the existing DSMM LLM owner's preflight, before parameter projection and final capture. No post-capture hook replaces the exact proposal. Standard supported calls use native prepared calls; raw/custom calls retain the existing supported Pi-AI seam. [Model routing](model-routing.md) and [runtime recovery](runtime-recovery.md) define the boundaries.
42
50
 
43
51
  Fourteen skills use Agent-scoped metadata discovery and lazy bodies, preserving non-DSMM ancestor winners and cancellation/invalidation semantics. `preset-skills` is an internal admission-owned handle, not a public plugin or global lifecycle owner. Deepwork off removes workflow/DSMM skills, not mandatory persona/read-only/tool policy.
44
52
 
45
53
  ## Limits
46
54
 
55
+ On DSH `0.2.1-rc.2`, native image preflight can still inspect old `agent.options` before request routing, both for root model switches and cold children reconstructed from historical descriptor models. Text restoration uses the refreshed DSMM route; image continuation may fail when the old model is unavailable or lacks image support. There is no public atomic preflight-route/options refresh interface. DSMM does not modify readonly options or falsify model capabilities. A later Host version must expose a supported route-aware preflight boundary, and upgrades must recheck root and child image behavior. Native persisted persona/toolFilter registrations and unresolved independent presets remain Host-owned; see [compatibility](compatibility.md#native-history-composition).
56
+
47
57
  Native approval remains final for its exact call/scope, not a reusable permission. Relevant policy changes coordinate revocation; unrelated display/model saves aren't second approval gates. See [native permissions](native-permissions.md).
48
58
 
49
59
  Network behavior and limits are specified in [Fake-IP fetch](web-fetch-fakeip.md); shell rejection remains unlocated. LSP automatic mounting stays disabled; DSH's native LSP and independent MCP remain unchanged. See [LSP boundary](lsp.md).
package/docs/lsp.md CHANGED
@@ -39,6 +39,6 @@ An independently mounted native MCP client using `serverName: dsmm_lsp` uses the
39
39
 
40
40
  DSMM's read-only role restrictions don't grant rename or format permission. The retained `lspRuntime` status interface reports bounded state, diagnostic codes and tool names, not executable paths, arguments or environment values. Tool discovery alone doesn't prove language-server availability or a successful symbol query.
41
41
 
42
- DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`. Automatic external LSP mounting isn't delivered; the retained interface inventory isn't an activation path.
42
+ DSMM 0.3.12 targets exactly DSH `0.2.1-rc.2`. Automatic external LSP mounting isn't delivered; the retained interface inventory isn't an activation path.
43
43
 
44
44
  DSH's native definition/references/implementation/hover surface isn't a promise of diagnostics, rename or format. The retained external interface above doesn't expand that native scope. Independently managed MCP users must verify actual executable and language-server availability; DSMM doesn't certify or repair that environment.
@@ -2,13 +2,13 @@
2
2
 
3
3
  Providers, accounts and credentials remain native DSH configuration, never named-profile contents.
4
4
 
5
- DSMM 0.3.11 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.
5
+ DSMM 0.3.12 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
6
 
7
7
  ## Native roots and child defaults
8
8
 
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.
9
+ Every root retains native assembled provider/model/effort, including implicit defaults before the first `model/selection` event. Activating Deepwork, choosing a preset, saving/selecting a profile or refreshing a cold admission does not implicitly apply a root primary. **Use profile model** is the explicit native selection action against admitted configuration; later manual choices remain authoritative. Root retry preserves the exact native downstream configuration and never switches to a profile fallback channel automatically.
10
10
 
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.
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. Explicit host options on new delegation retain their priority. Historical descriptor options are reconstruction defaults, not a new override of current DSMM routing. A cold child resolves its invocation again, taking its own explicit native selection before configured-route preparation; a configured model that will not be used is not a preflight dependency. Ancestor selections, labels and old request defaults are not child selection intent.
12
12
 
13
13
  ```jsonc
14
14
  {
@@ -41,7 +41,7 @@ rc.2's `LlmCallConfig` doesn't carry arbitrary provider JSON, and its Pi-AI stre
41
41
 
42
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.
43
43
 
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.
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, while native reactivation resolves current configuration. **Use profile model** is a separate native selection action, not raw execution authorization.
45
45
 
46
46
  ```jsonc
47
47
  {
@@ -91,9 +91,9 @@ Child preparation selects the primary or first resolvable configured candidate i
91
91
 
92
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).
93
93
 
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).
94
+ Resident Agents and freshly delegated children use immutable admitted policy, not a later draft or desired deployment. Cold continuation obtains current policy at its new activation. Child initial routes don't override later accepted native manual intent or valid fallback every turn. Omitted effort clears stale explicit effort. Profile storage, native persistence and execution ownership remain separate; see [profiles](profiles.md#storage-and-lifetime) and [compatibility](compatibility.md).
95
95
 
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.
96
+ Native cold restoration establishes a new exact-Agent admission from current configuration and verified native ownership, not from serialized runtime authority. Old capture metadata may supply profile ID and explicit level intent only. A missing capture does not block a native DSMM descriptor. New epochs isolate historical route locks and retry counters. The existing DSMM owner performs admission → recovery preparation → role routing → parameter/model validation → final snapshot/capture → native `prepareCall`; stock-only integrations use the same preparation body once. Exact proposal, Agent, scope, signal and single-consumption checks remain mandatory.
97
97
 
98
98
  ## Observed route versus declared route
99
99
 
@@ -1,6 +1,6 @@
1
1
  # Native permissions
2
2
 
3
- DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`. DSH owns approval; DSMM composes policy into the native tool pipeline without a second approval queue or UI. DSMM command-rule approval memory is limited to the exact live Agent and is distinct from native once grants.
3
+ DSMM 0.3.12 targets exactly DSH `0.2.1-rc.2`. DSH owns approval; DSMM composes policy into the native tool pipeline without a second approval queue or UI. DSMM command-rule approval memory is limited to the exact live Agent and is distinct from native once grants.
4
4
 
5
5
  ## Full access and approval
6
6
 
package/docs/profiles.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Deepwork runtime profiles
2
2
 
3
- DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`. See [compatibility](compatibility.md) for installation boundaries.
3
+ DSMM 0.3.12 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
 
@@ -10,15 +10,46 @@ A named Deepwork profile is a runtime-policy document, not a native deployment p
10
10
  | --- | --- |
11
11
  | Draft | Unsaved JSONC in the editor, including invalid input and comments |
12
12
  | Saved revision | Validated bytes in the named document; Save changes only these bytes |
13
- | Future-default pin | An immutable saved revision selected for new unscoped Agents |
13
+ | Future-default selection | A named profile ID or deployment baseline selected for subsequent activations |
14
14
  | Current admission | The actual session's captured settings, profile revision and admission epoch |
15
15
 
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.
16
+ Browsing doesn't activate anything. **Save profile** doesn't select it or change a resident Agent. **Set as future default** records the named ID and an archival saved revision, never a dirty draft. Subsequent activations read that ID's latest valid saved content. **Use baseline for future sessions** clears that default without deleting documents.
17
17
 
18
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
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
+ ## Named profiles interface layout
23
+
24
+ The redesigned Named Profiles page (`.dsmm-profiles.dsmm-named-profiles`) organizes editing into a scannable single-column layout:
25
+
26
+ 1. **Header browse row** — Select profile, New draft, and Refresh inventory buttons alongside a real-time status badge (`data-dsmm-editor-state`) tracking dirty, saved, refresh-required, and applied states.
27
+ 2. **Effective summary card** — Visible summary of future default (with inline Set as future default button) and current session admission (with a quick-locate button targeting the session settings section).
28
+ 3. **Secondary actions** — Collapsed disclosure containing future default reset ("新会话使用插件默认" / "Use baseline for future sessions") and current-session scope controls.
29
+ 4. **Basic settings** — Flat, uncollapsed section in normal flow:
30
+ - Profile name (`label`) with optional omit action.
31
+ - Profile ID (`id`), locked for saved revisions.
32
+ - Orchestrator primary model (`roleRouting.dsmm-orchestrator.primary` only), with provider/model/effort selection and a clear notice that this primary model governs the main coordinating agent.
33
+ - Business output language (`settings.locale`).
34
+ - Deepwork default active (`settings.defaultActive`).
35
+ - If raw JSONC syntax is invalid, a clear notice is shown here with a button to expand and focus the JSONC source.
36
+ 5. **Advanced settings** — Collapsed `<details>` disclosure:
37
+ - Role models & availability: Per-role primary route, invocation levels (`low`, `high`, `max`), and ordered fallbacks with add/remove/move actions. For `dsmm-orchestrator`, explains that the primary model is configured in Basic settings with a jump button. Switching roles preserves invalid numeric drafts and keeps saving blocked until those fields are corrected or explicitly discarded.
38
+ - Retry policy: Strategy selection and rate-limit numeric overrides.
39
+ - Profile defaults: Default strategy and rate-limit bounds.
40
+ - Git write protection: Sparse `settings.guards.gitWriteGuard` (`ask` | `deny` | `off`) and `settings.guards.gitWriteScope` (`all-writes` | `high-risk`). When guard is `off`, the scope control is disabled with an explanatory note ("保护已关闭,检查范围暂不生效"), while Unset/inherit remains accessible.
41
+ - Subagent tools: Per-role tool topology configuration.
42
+ 6. **Advanced JSONC source editor** — Collapsed `<details className="dsmm-advanced">` disclosure:
43
+ - Full JSONC source editor preserving comments, whitespace, and unprojected parameters.
44
+ - User-triggered validation refusals expand disclosures and select the exact UTF-16 character range with reduced-motion support.
45
+ 7. **Save bar** — In normal document flow at the bottom:
46
+ - Status message and blocking issues.
47
+ - Save button (enabled only when dirty and valid).
48
+ - Discard button (triggers confirmation when dirty or when invalid fields exist).
49
+ - Reload button (available when clean).
50
+
51
+ Discard confirmation tracks the initiating control and restores focus to that control (falling back to the profile selector) on cancellation or Escape. Blocking validation errors, read-only notices, and unavailable service reasons always remain visible in normal flow outside collapsed disclosures. Save increments the editor epoch without resetting user disclosure open/close states.
52
+
22
53
  ## Document format
23
54
 
24
55
  A document contains exactly `version: 1`, a filename-matching `id`, optional `label`, and `settings`. IDs contain 1 to 64 lowercase ASCII letters, digits, hyphens or underscores, start with a letter or digit, and can't be Windows reserved names. Labels are bounded text without control characters.
@@ -73,11 +104,11 @@ Successful rename is the commit point. Admission preparation finishes before ren
73
104
 
74
105
  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.
75
106
 
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.
107
+ Selection writes retain an exclusive archival `snapshot-v1-<UUID>` file in `.revisions` and a pointer with the profile ID. Pointer identity/CAS reads do not interpret that archival snapshot. An activation resolves the selected ID's latest saved content; missing old revisions or retired runtime fields in old captures do not prevent this. Missing, unsafe or invalid current content fails explicitly, without baseline or arbitrary-profile fallback. Disk selection revisions and the actual admission's content revision/epoch are separate observations.
77
108
 
78
109
  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.
79
110
 
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.
111
+ Startup freezes mounted capabilities before consumers install. Root reactivation preserves an explicit named ID or baseline choice; without an explicit session choice it uses the current global selection. A native continuable child uses its own trusted selection or inherits its parent's selection source, resolving latest content at activation. Current deployment/module/role restrictions and the live parent's actual authority remain ceilings. `getSettings(agent)` remains immutable for a residency. Native IDs, history and tasks survive; old grants, captures, retry state and approvals do not. Read-only observation never resumes a session.
81
112
 
82
113
  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).
83
114
 
package/docs/roadmap.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Version policy
4
4
 
5
- **DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`.** Each DSMM version targets the published DSH RC or stable release selected for that version. Older SDKs and old configuration schemas aren't runtime compatibility targets. Loading sessions created by DSMM `0.2.x` is a required compatibility target, separate from retaining old runtime implementations or execution behavior. A newer upstream release requires deliberate reassessment, not an automatic dependency or runtime switch.
5
+ **DSMM 0.3.12 targets exactly DSH `0.2.1-rc.2`.** Each DSMM version targets the published DSH RC or stable release selected for that version. Older SDKs and old configuration schemas aren't runtime compatibility targets. Loading sessions created by DSMM `0.2.x` is a required compatibility target, separate from retaining old runtime implementations or execution behavior. A newer upstream release requires deliberate reassessment, not an automatic dependency or runtime switch.
6
6
 
7
7
  Published `0.3.0` retains its original rc.1 package, tag, assets and version-bound release identity.
8
8
 
@@ -40,7 +40,7 @@ Sessions created by DSMM `0.2.x` must remain loadable under the supported curren
40
40
  - Retired presets, plugins, metadata or admission formats require interpretation, migration or an explicit degraded mode rather than whole-session rejection solely because the old implementation is unavailable. This does not require restoring the old SDK or execution owner.
41
41
  - Continued execution may use current roles, routing, configuration and permission semantics. Explain material differences and request fresh authorization where necessary; never treat historical metadata or approvals as current authority. When continuation is unavailable, retain the loaded history and expose the specific limitation separately.
42
42
  - Preserve original records. Any necessary migration must protect user data with a recoverable original and concurrent-write safeguards; never discard history merely to make loading succeed. Corrupt or genuinely unreadable data must produce a specific diagnostic rather than silently removing the session.
43
- - Acceptance covers opening representative `0.2.x` root and child histories, retaining titles/list entries and readable content, and separating continuation restrictions from loading. These are pending compatibility requirements, not claims that `0.3.11` already fulfills them.
43
+ - Acceptance covers opening representative `0.2.x` root and child histories, retaining titles/list entries and readable content, and separating continuation restrictions from loading. These are pending compatibility requirements, not claims that `0.3.12` already fulfills them.
44
44
 
45
45
  ## Working-tree implementation: profile selection before the first message
46
46
 
@@ -95,4 +95,4 @@ Existing [Fake-IP fetch](web-fetch-fakeip.md) protections remain in force.
95
95
 
96
96
  ## Publication and Desktop installation
97
97
 
98
- 0.3.11 publication uses the version-bound [release controls](releasing.md). Desktop plugin installation follows publication, uses the Desktop-owned carrier and requires exact DSH `0.2.1-rc.2`. Installation doesn't authorize upgrading the Host, changing credentials or real sessions, altering unrelated configuration, or restarting active work. An incompatible Host or required data migration blocks installation rather than expanding its scope.
98
+ 0.3.12 publication uses the version-bound [release controls](releasing.md). Desktop plugin installation follows publication, uses the Desktop-owned carrier and requires exact DSH `0.2.1-rc.2`. Installation doesn't authorize upgrading the Host, changing credentials or real sessions, altering unrelated configuration, or restarting active work. An incompatible Host or required data migration blocks installation rather than expanding its scope.
@@ -1,6 +1,6 @@
1
1
  # Runtime recovery and route strategies
2
2
 
3
- DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`.
3
+ DSMM 0.3.12 targets exactly DSH `0.2.1-rc.2`.
4
4
 
5
5
  ## Independent role strategies
6
6
 
@@ -8,7 +8,7 @@ Each role may use `startup-lock` (default) or explicit `rate-limit-fallback`. `r
8
8
 
9
9
  Child preparation admits the primary or first resolvable configured candidate in order without a sacrificial completion. A catalog isn't an authentication/network-health check. `startup-lock` retains the admitted route for bounded safe rate-limit retries. `rate-limit-fallback` may advance its ordered chain after the configured threshold. Success resets consecutive counts, duplicate failure delivery doesn't count twice, and exhausted chains don't wrap.
10
10
 
11
- Ordinary roots retain native assembled provider/model/effort, even before the first selection event. Role/global primary and fallback chains don't automatically replace that route. **Use profile model** is a separate explicit selection action against admitted immutable configuration, not a retry or overlay Apply.
11
+ Root model and effort remain native-owned even without an explicit selection event. Role/global primaries and fallback chains never implicitly replace that route. **Use profile model** is an explicit native selection action against admitted configuration, not a retry or overlay Apply. A role child's own native selection is resolved before configured-primary preflight when it resumes; its historical descriptor default does not replace that selection.
12
12
 
13
13
  | Policy field | Default | Strict integer bound |
14
14
  | --- | --- | --- |
@@ -49,11 +49,11 @@ Native history loading, reading, promotion, explicit/declarative restoration and
49
49
 
50
50
  DSMM uses public serial `agent/created` callbacks for fresh admission. A role's first creation requires its exact pending parent/provider/invocation, standing composition, scope, tool filter and depth ceiling. Role binding precedes Agent-scoped installation; publication rechecks current owner, exact parent, cancellation and composition after installation. Fresh ordinary children of a non-controlled admitted parent inherit its captured configuration and tool ceiling without acquiring a role invocation.
51
51
 
52
- Native `resume` doesn't enroll a reconstructed Agent in DSMM admission. Historical descriptors, role/preset labels, mode events and profile selections don't grant current DSMM role qualification. Fresh roots use current `prepareRoot` and root eligibility checks; saved profile-selection `admissionEpoch` and disk CAS retain their configuration-selection meaning, not execution authority. Old retry, approval and pending-call state isn't restored.
52
+ Native root resume and supported continuable children obtain fresh admission during awaited `agent/created`. Root selection identity and current named content are read separately. A child requires its exact admitted live parent, native direct catalog, own continuable descriptor and current role provider. Own independent composition is validated separately from a new pending invocation's shared composition. Old retry, approval and pending-call state isn't restored; settled one-shot children remain non-resumable.
53
53
 
54
- Restricted-role continuation can lose DSMM-specific readonly, tool-filter and depth captures on restoration. The current Host doesn't provide a supported guarantee of safe DSMM restricted-role continuation across restoration, unload/reinstall or restart. That capability is deferred; a restored native request isn't proof of valid DSMM role admission or preserved restrictions. This limitation doesn't block native restoration or ordinary configuration/UI saves.
54
+ Restricted-role continuation recomputes current readonly, delegation and depth ceilings, intersecting the parent's actual capabilities and native filters/sandbox. The child's admitted maximum depth is the narrower of current configuration and its resident parent's admitted ceiling; subsequent delegation consumes that same bound. A disabled role or module refuses role activation rather than becoming an unrestricted native child. Failed/cancelled installation rolls back through the native factory; old objects remain revoked even after the same ID is activated again. Root and child image preflight and old native persona limitations are documented in [compatibility](compatibility.md#native-history-composition).
55
55
 
56
- Official Registry, Runtime and JSONL plugins own lifecycle and storage. DSMM live captures and callbacks retain their exact Agent and current owner checks; Agent-scoped guards remain fail-closed after that owner retires. They don't enroll other Agents or revoke native history globally. Ordinary unadmitted native tool calls, including managed shell calls, retain native approval/sandbox behavior and applicable permission rules through exact live registry, realm and lifetime checks, without acquiring DSMM role or configuration-write rights. Retired exact DSMM captures cannot use that native path. DSMM-specific entry points still require their applicable live admission and permission ceilings; native restoration doesn't provision those rights. No descriptor authorization ledger, persisted grant, cold migration, automatic history rewrite or cross-process automatic retry is provided.
56
+ Official Registry, Runtime and JSONL plugins own lifecycle and storage. DSMM callbacks retain exact Agent and current owner checks; Agent-scoped guards remain fail-closed after that owner retires. Ordinary unadmitted native tool calls retain native approval/sandbox and applicable permission rules without acquiring DSMM role or configuration-write rights. Retired DSMM objects cannot use that native path. Restoration grants role capability only through the fresh validated admission above, never through serialized grants. No descriptor authorization ledger, cold migration, automatic history rewrite or cross-process automatic retry is provided.
57
57
 
58
58
  Diagnostics omit request/provider bodies, credentials and goal/todo text.
59
59
 
@@ -1,6 +1,6 @@
1
1
  # DSMM Safety Guards
2
2
 
3
- DSMM 0.3.11 targets exactly DSH `0.2.1-rc.2`. Its guards use `tools/pre-execute` for allow, deny and ask decisions, and `tools/post-execute` for accepted-result truncation. They don't use OpenCode hook names or mutate tool arguments. Deployment overrides belong in the `id: dsmm` Loader entry's `config` object, not a settings.yaml namespace.
3
+ DSMM 0.3.12 targets exactly DSH `0.2.1-rc.2`. Its guards use `tools/pre-execute` for allow, deny and ask decisions, and `tools/post-execute` for accepted-result truncation. They don't use OpenCode hook names or mutate tool arguments. Deployment overrides belong in the `id: dsmm` Loader entry's `config` object, not a settings.yaml namespace.
4
4
 
5
5
  ## Scope
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Deepwork settings and status
2
2
 
3
- DSMM 0.3.11 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).
3
+ DSMM 0.3.12 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
 
@@ -32,7 +32,7 @@ Native ConfigEditor can emit `loader/partial-dispose` during empty-pending recon
32
32
 
33
33
  `modules.deepwork.enabled` is a global-only ceiling and defaults true; ordinary `defaultActive` defaults false. Native profile overrides and named/session overlays can't enable the module. Cold-off leaves Core storage, captures/CAS, configuration/status and mandatory native permissions available, without mounting DW role/routing/recovery substrate. DSMM-managed LSP stays off independently of this module ceiling. Static preset files aren't proof of callable roles.
34
34
 
35
- 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.
35
+ On a mounted Host, desired-off affects new root admissions and cold role continuations, not existing residencies or freshly delegated children inheriting a parent's admission. 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.
36
36
 
37
37
  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.
38
38
 
@@ -82,6 +82,6 @@ Enabled background work must choose `run_in_background:true` before `startActiva
82
82
 
83
83
  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.
84
84
 
85
- Native history loading, reading, promotion, explicit/declarative restoration and durable restoration after provider unregistration remain native-owned, without a global DSMM gate. Reconstruction doesn't enroll the new Agent as a DSMM role; historical metadata isn't current role authorization. Fresh root admission and blank configuration selection preserve profile-selection epochs and disk CAS; first role creation retains exact pending, parent/provider, readonly, tool-filter and depth checks. Exact admitted live objects and DSMM entry points remain guarded after owner retirement. Preserving DSMM fine-grained role restrictions across restoration isn't guaranteed on this Host and is deferred, not reported ready; restored native execution isn't verified DSMM restricted-role continuation. This limitation doesn't block configuration/UI saves. Read-only history inspection doesn't itself resume Agents. No cold migration, persistent grant or automatic history rewrite is supplied. See [runtime recovery](runtime-recovery.md#cold-resume-and-lifetime).
85
+ Native history loading and lifecycle remain Host-owned. A restored root or valid continuable role child obtains a fresh admission using current content and role policy; persisted choice revision and actual admission revision/epoch remain separate. First creation retains exact pending-call checks, while continuation validates native own identity, direct parent/catalog, current provider and composition. Readonly, filters, depth and cancellation remain enforced. Old objects and owner closures stay revoked, and old approvals/retry budgets are not restored. Read-only inspection never wakes Agents, and no automatic history rewrite is supplied. See [runtime recovery](runtime-recovery.md#cold-resume-and-lifetime) and the precise [Host limitations](compatibility.md#native-history-composition).
86
86
 
87
87
  *Author's note: For a DSH deployment operator; distinguish a successful configuration save from captured runtime availability before applying policy.*
@@ -66,6 +66,15 @@ export interface ChildAdmissionCaptureV3 extends ChildAdmissionCaptureBase {
66
66
  invocation: ChildAdmissionCaptureV2["invocation"];
67
67
  }
68
68
  export type ChildAdmissionCapture = ChildAdmissionCaptureV1 | ChildAdmissionCaptureV2 | ChildAdmissionCaptureV3;
69
+ export interface ChildAdmissionIdentity {
70
+ childSessionId: string;
71
+ parentSessionId: string;
72
+ role: DsmmRoleId;
73
+ profileId: string | null;
74
+ level: DsmmInvocationLevel;
75
+ }
76
+ /** Runtime snapshots are not authority or configuration inputs for a new activation. */
77
+ export declare function parseChildAdmissionIdentity(input: unknown): ChildAdmissionIdentity;
69
78
  /** Trusted native folds only; never synthesized from the current parent's settings. */
70
79
  export interface LegacyChildEvidence {
71
80
  version: 1;
@@ -1,6 +1,6 @@
1
1
  import { copyJson, freezeSettings, resolveConfig, validateSparseConfig } from "./settings.js";
2
2
  import { parseModelParameterPolicy } from "./model-parameter-policy.js";
3
- import { validateProfileOverlay } from "./profiles.js";
3
+ import { validateProfileOverlay, validateProfileId } from "./profiles.js";
4
4
  import { isProfileReference } from "./config-revision.js";
5
5
  import { DSMM_ROLE_IDS } from "./roles.js";
6
6
  import { CHILD_EVIDENCE_FIELDS } from "./child-evidence.js";
@@ -8,6 +8,29 @@ export { CHILD_EVIDENCE_FIELDS, parseChildAdmissionEvidenceView } from "./child-
8
8
  import { DSMM_ROUTE_SOURCES } from "./profile-types.js";
9
9
  import { normalizeModelRouteJson } from "./route-json.js";
10
10
  export { DSMM_ROUTE_SOURCES } from "./profile-types.js";
11
+ /** Runtime snapshots are not authority or configuration inputs for a new activation. */
12
+ export function parseChildAdmissionIdentity(input) {
13
+ if (!input || typeof input !== "object" || Array.isArray(input))
14
+ fail();
15
+ const row = input;
16
+ if (row.version !== 1 && row.version !== 2 && row.version !== 3)
17
+ fail();
18
+ text(row.childSessionId, 256);
19
+ text(row.parentSessionId, 256);
20
+ role(row.role);
21
+ if (row.childSessionId === row.parentSessionId)
22
+ fail();
23
+ const pin = row.profilePin === null ? null : object(row.profilePin, ["id", "revision"]);
24
+ if (pin)
25
+ validateProfileId(pin.id);
26
+ if (!row.invocation || typeof row.invocation !== "object")
27
+ fail();
28
+ const level = row.invocation.level;
29
+ if (level !== "normal" && level !== "low" && level !== "high" && level !== "max")
30
+ fail();
31
+ return { childSessionId: row.childSessionId, parentSessionId: row.parentSessionId, role: row.role,
32
+ profileId: pin === null ? null : pin.id, level: level };
33
+ }
11
34
  function fail() { throw new TypeError("Invalid child admission data"); }
12
35
  function object(value, required, optional = []) {
13
36
  if (value === null || typeof value !== "object" || Array.isArray(value))