@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
package/docs/roadmap.md CHANGED
@@ -1,267 +1,36 @@
1
- # dsmm Roadmap
1
+ # DSMM roadmap
2
2
 
3
- Date: 2026-08-21
3
+ ## Version policy
4
4
 
5
- ## Version principles
5
+ **DSMM 0.3.1 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, old configuration schemas and historical session formats aren't compatibility targets; existing data remains untouched. A newer upstream release requires deliberate reassessment, not an automatic dependency or runtime switch.
6
6
 
7
- - Each version must produce a working dsh-native increment.
8
- - Deepwork remains opt-in through a dsmm-provided dsh custom mode unless the user explicitly enables auto-entry in settings.
9
- - Configuration comes before breadth: every major feature must have an enable/disable or tuning surface.
10
- - ocmm parity is phased after the MVP proves dsh package, mode, and settings mechanics.
7
+ Published `0.3.0` retains its original rc.1 package, tag, assets and version-bound release identity.
11
8
 
12
- ## v0.1 — MVP custom mode bundle
9
+ ## Current capabilities
13
10
 
14
- ### Goal
11
+ Official AgentRegistry, SubagentRuntime and JSONL namespace plugins own execution and storage. DSMM supplies immutable admission, roles, routing and scoped policy without a custom execution owner, persistence companion or manual-runtime selector. Coding delegation consumes native activation results and cancellation; live direct-child controls use native ownership and capabilities, while descendant inspection remains read-only.
15
12
 
16
- Create the smallest useful dsmm dsh bundle: installable, mode-scoped, configurable, and calibrated for DeepSeek V4 Pro when enabled.
13
+ Deployment configuration uses native Plugins forms and separate sparse Global/native-profile layers. Named Profiles preserve draft, saved revision, future default and current admission as distinct states. Global/store CAS, native form revisions, filesystem protection, operator authority and RPC lifetime checks retain their own boundaries. Desired values don't update mounted services or running task policy. Save/future-default selection, model selection, mode changes and overlay Apply have independent capabilities.
17
14
 
18
- ### Deliverables
15
+ Agent-scoped skills expose metadata and load bodies lazily, preserving non-DSMM ancestor winners. Standard model calls use native prepared calls. The minimal public Pi-AI completions seam supports raw/custom and stop-only parameters 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 calls and native effort encoding remain unchanged.
19
16
 
20
- - `package.json` with `dsh.bundle.patch`.
21
- - `cordis.patch.yml` that inserts dsmm rows without replacing dsh base behavior.
22
- - Host plugin entry that registers dsmm settings and prompt/mode contributions.
23
- - `deepwork` custom mode implementation, modelled on dsh plan-mode semantics because current public dsh docs expose `@deepseek-ai/dsh-plan-mode` rather than a generic arbitrary-mode package.
24
- - `/deepwork [off|message]` command if the current dsh command service supports it; otherwise documented profile-level activation fallback.
25
- - Minimal deepwork prompt text adapted from ocmm.
26
- - Minimal skill set:
27
- - brainstorming
28
- - writing-plans
29
- - requesting-code-review
30
- - receiving-code-review
31
- - Documented settings namespace.
32
- - Docker smoke test instructions for installing into a disposable dsh profile.
17
+ Native call views show the target in collapsed rows, distinguish requested from actual identity, and retain that distinction for partial output, failure, interruption and current-format replay/PTC. Child labels use `Coding: task description`.
33
18
 
34
- ### Acceptance
19
+ ## Remaining capability boundaries
35
20
 
36
- - `dsh plugin add ./dsmm` or packed equivalent activates the dsmm bundle in a disposable profile.
37
- - A dsh session outside `deepwork` mode does not receive dsmm workflow instructions.
38
- - A dsh session inside `deepwork` mode receives the dsmm workflow section.
39
- - Switching the mode off restores ordinary dsh prompt behavior.
40
- - Settings can disable DeepSeek V4 Pro calibration without removing the bundle.
21
+ | Capability | Current behavior | Requirement for broader support |
22
+ | --- | --- | --- |
23
+ | Live overlay Apply | Unavailable. Save/select a future default for a new session; ordinary model and mode actions retain independent capabilities. | Exact configuration/call/approval binding without cross-call authority reuse. See [approval boundaries](deferred-native-approval-risk.md). |
24
+ | Running-call background handoff | Unavailable. Select waiting or native parent delivery before starting; don't restart a task to simulate transfer. | A supported same-activation ownership/delivery handoff. |
25
+ | DSMM cold resume | Refuses execution without trusted live admission and preserves history. Display metadata can't restore authority. | Native identity and trustworthy configuration/permission binding across close/reopen and record loss. |
26
+ | Non-disruptive hot update | No uninterrupted live-session guarantee. Retire admissions and let native owners cancel/dispose owned work; guards remain fail-closed. | Native lifecycle support that preserves active task/approval boundaries. |
27
+ | Catalog-backed raw combinations | Rejected where the complete composition can't be reliably reproduced, regardless of native or DSMM parameter source. Standard calls aren't affected. | A public seam that can reproduce the full catalog composition and preserve native capability/effort semantics. |
28
+ | Repeated read-only Git approval | Keep native approval; don't expand Allow rules based on an unexplained prompt. | Exact triggering command, working directory and approval reason. |
29
+ | Shell Fake-IP access | Rejection source remains unknown; don't guess a sandbox or permission change. | Concrete command/error/runner evidence identifying the actual rejection layer. See [network boundaries](web-fetch-fakeip.md). |
30
+ | External LSP | DSMM automatic mounting isn't delivered. DSH native definition/references/implementation/hover and independently configured MCP remain separate. | Supported APIs and explicit permissions for additional operations; no automatic external remount or scope expansion. |
41
31
 
42
- ## v0.2 — Role and agent preset parity
32
+ Search/Fetch retain the explicitly configured native provider. DSMM doesn't automatically enable a direct API, change credentials or forward the recent human question. HTTP Fake-IP behavior and network limits are maintained in [Fake-IP fetch](web-fetch-fakeip.md).
43
33
 
44
- ### Goal
34
+ ## Publication and Desktop installation
45
35
 
46
- Port ocmm's role model into dsh-native agent presets.
47
-
48
- ### Deliverables
49
-
50
- - Orchestrator, planner, plan-critic, reviewer, doc-search, code-search, clarifier, and media-reader role prompts.
51
- - Initial oracle/oracle-2nd mapping if the current dsh agent model supports external-model review lanes.
52
- - Role-specific prompt scoping so dsmm mode does not leak into unrelated agents.
53
- - Settings to enable or disable individual role presets.
54
-
55
- ### Acceptance
56
-
57
- - A dsmm orchestrator session can route to planner/reviewer/search roles through dsh-native mechanisms.
58
- - Disabled role presets are absent from model-facing choices.
59
-
60
- ## v0.3 — Workflow skill completeness
61
-
62
- Status: completed in the v0.3 implementation. dsmm now bundles the full seven-skill workflow set and exposes mode-scoped workflow policy settings for strict gates, review caps, and final review routing.
63
-
64
- ### Goal
65
-
66
- Bring the deepwork workflow to practical parity for planning and review flows.
67
-
68
- ### Deliverables
69
-
70
- - Add remaining workflow skills:
71
- - subagent-driven-development
72
- - dispatching-parallel-agents
73
- - remove-ai-slops
74
- - Skill provider layout compatible with dsh skill discovery.
75
- - Skill settings for enabling strict gates, review caps, and final review policy.
76
- - Prompt sync notes for maintaining ocmm/dsmm workflow text.
77
-
78
- ### Acceptance
79
-
80
- - The mode can guide a user from brainstorm to plan to review using dsmm skills.
81
- - A user can disable any non-core skill through settings.
82
-
83
- ## v0.4 — Safety and guard layer
84
-
85
- Status: implemented in the v0.4 implementation. The guard layer is covered by settings defaults/overrides, guard decision tests, prompt asset tests, Docker smoke asset checks, and the Docker smoke script.
86
-
87
- ### Goal
88
-
89
- Port the highest-value ocmm safety policies into dsh tool events.
90
-
91
- ### Deliverables
92
-
93
- - Shell command safety for PowerShell and POSIX-like shells.
94
- - Git write guard with explicit permission requirements.
95
- - Tool-output truncation policy.
96
- - Basic plan-format validation.
97
- - Question-label and todo-discipline helpers if dsh exposes compatible surfaces.
98
-
99
- ### Acceptance
100
-
101
- - Implemented guard behavior is scoped to dsmm mode or dsmm-managed agents by default, with `always` and `off` settings coverage.
102
- - Every implemented guard has a settings toggle and documented `[dsmm safety]` failure message in `docs/safety-guards.md`.
103
-
104
- ## LSP boundary for this version
105
-
106
- DSMM-managed external LSP isn't enabled in this version and has no scheduled delivery here. The implementation, interfaces, original configuration and historical manual patch are retained, but `lsp.enabled:true` doesn't activate automatic MCP mounting and LSP controls are hidden in DSMM's settings UI. DSH's own LSP and independently configured MCP remain unaffected. Existing release checks still independently validate the retained LSP interface; they don't make automatic integration a delivered feature. See [LSP boundary](lsp.md).
107
-
108
- ## v0.6 — Model routing and DeepSeek V4 Pro calibration
109
-
110
- Status: implemented in v0.6 with provider-aware family classification, exact-route DeepSeek V4 Pro prompt/request calibration, preset-derived max reasoning, adapter capability negotiation, and pinned DSH `agent/request` waterfall coverage.
111
-
112
- ### Goal
113
-
114
- Port ocmm's model-family routing and add dsh-native DeepSeek V4 Pro tuning.
115
-
116
- ### Deliverables
117
-
118
- - Model-family classifier adapted from ocmm.
119
- - Variant-to-reasoning policy for dsh `ctx.llm` or `agent/request` seams.
120
- - DeepSeek V4 Pro settings:
121
- - calibration off/auto/strict
122
- - default reasoning effort
123
- - max reasoning trigger categories
124
- - tool-call reasoning retention checks where the dsh adapter exposes them
125
- - Tests for routing decisions.
126
-
127
- ### Acceptance
128
-
129
- - DeepSeek V4 Pro deepwork sessions default to high reasoning for complex work.
130
- - Max reasoning is reserved for configured high-rigor task classes.
131
- - Non-DeepSeek models do not receive DeepSeek-specific prompt overlays.
132
-
133
- ## v0.7 — Runtime recovery
134
-
135
- Status: implemented in v0.7 with host-first request-error policy, bounded configured route fallback reconstructed from durable request headers, opt-in todo/goal continuation, documented subagent recovery boundaries, and pinned DSH rc.2 packaged-runtime coverage.
136
-
137
- ### Goal
138
-
139
- Rebuild ocmm's runtime recovery features using dsh-native sessions and events.
140
-
141
- ### Deliverables
142
-
143
- - Session error classification.
144
- - Retry/fallback policy.
145
- - Idle continuation policy for dsmm-managed tasks.
146
- - Interrupted subagent recovery notes or implementation, depending on dsh event support.
147
-
148
- ### Acceptance
149
-
150
- - Recovery events are durable or reconstructable from dsh session logs.
151
- - Users can disable runtime recovery while keeping prompts and skills active.
152
-
153
- ## v0.8 — UI/settings polish
154
-
155
- Status: implemented in v0.8 with a fixed `/dsmm-status [json]` host command, deterministic defensive status snapshots, normalized file-based settings documentation for Web/headless/future TUI use, and pinned DSH rc.2 packaged-command coverage.
156
-
157
- ### Goal
158
-
159
- Expose dsmm settings ergonomically in dsh web-compatible surfaces while keeping headless support.
160
-
161
- ### Deliverables
162
-
163
- - Optional client/settings panel if dsh client plugin APIs are stable.
164
- - Human-readable mode status and active calibration indicators.
165
- - Documentation for web/headless/TUI profiles.
166
-
167
- ### Acceptance
168
-
169
- - Headless users can configure dsmm through files.
170
- - Web users can inspect effective dsmm settings without editing YAML manually.
171
-
172
- ## Planned directions: Adaptive invocation, Profiles, and child lifecycle
173
-
174
- Status: **draft directions awaiting detailed planning.** Some underlying capabilities already exist; confirm each gap against the implementation and published package before defining work. These themes aren't the next npm version or a single release batch. The published package version `0.2.0` is separate from the older roadmap stage numbers, which remain unchanged.
175
-
176
- ### Goal and boundaries
177
-
178
- Let a caller select suitable resources for one role invocation, make Profiles easier to understand, and support task-appropriate delegation and child interaction. This section records candidate goals, not approval to change behavior, public APIs or safety policy.
179
-
180
- All directions preserve role identity, read-only, tool-filter, depth and permission boundaries, the root native model, immutable revisions and session admission authority. No role enumeration, schema fields or state machine is defined here. Future settings, tools, visible status, prompt guidance and documentation must agree on the eventual contract.
181
-
182
- ### Directions
183
-
184
- #### Role invocation and routing
185
-
186
- - Configure multiple resource levels for each eligible role and choose a level for one invocation without duplicating the role. Omission keeps the existing effective route. Whether that default is named `normal`, whether a level declares a complete route or a local effort override, and the override precedence remain to be defined.
187
- - Show the level actually used in human-readable invocation status. Under either delegation layout, an explicitly authorized provider/model/`reasoningEffort` override applies only to that invocation: it doesn't persist, rewrite the role preset or change the root native model.
188
- - Plan to remove `deepseekV4ProMaxReasoningPresets` and `deepseekFlashMaxReasoningPresets`, including their consuming paths. Old configurations need a clear diagnostic or an explicit migration; the choice is pending, and silent ignoring isn't acceptable.
189
- - Keep resource level, adapter `reasoningEffort` and workflow process distinct. Retain the goal of reducing pointless process for small tasks, but a low resource level doesn't automatically cancel verification. Whether process needs a separate setting remains open.
190
-
191
- #### Delegation-tool topology
192
-
193
- Retain two candidate layouts: per-workflow-role tools plus one merged category-parameter tool, or two parameterized tools separating workflow roles from categories. This changes entry points, not the identity or permissions of the selected targets. Tool names, role/category classification and the default layout remain open.
194
-
195
- Both layouts need clear invocation guidance matching the actual callable inventory and parameters, not guidance only for the split layout.
196
-
197
- #### Locale
198
-
199
- A global/profile language preference should apply consistently to visible planning and conversation from applicable DSMM roles. Define its inheritance path, supported values and precedence against the user's current language request; report unsupported values clearly. This preference isn't the host UI locale and doesn't change role identity, permissions or routing.
200
-
201
- Prompt guidance may express an intended thinking language, but can't promise an unobservable internal reasoning language. Preserve code, identifiers, paths, commands, protocol names and quotations in their original form.
202
-
203
- #### Profiles experience and policy
204
-
205
- Distinguish the native deployment profile, a named Deepwork runtime profile and an agent role preset. These are conceptual labels, not new configuration fields. Here, "global default" means the named-profile default in the current runtime/deployment-entry scope, not deployment-wide `config.json` or a default shared by every native profile.
206
-
207
- **Presentation.** User feedback describes controls and explanations as crowded, with existing status cues insufficient or scattered, not wholly absent. Make browsing, an unsaved draft and its saved revision, the global-default pin for future sessions, and the current session's admitted pin and epoch easy to distinguish. With no session, show current-session information as unavailable rather than guessing.
208
-
209
- Saving isn't selecting the global default or explicitly applying to the current session. Explain these actions, including baseline/reset actions, and show why an action is disabled. Keep long explanations available on demand without hiding blocking reasons or the existence of warnings. Primary actions should remain reachable in a narrow panel. Preserve the native model catalog and Advanced JSONC capabilities without fixing a particular layout. Presentation changes alone don't change document format, storage, revisions, CAS or admission semantics.
210
-
211
- **Agent availability.** Consider allowing a named runtime profile to disable optional agents and their DSMM-owned functionality, tools and delegation choices. Define the DW-required set before deciding which agents can't be disabled; report disallowed attempts explicitly. This policy can narrow, never exceed, deployment availability. It doesn't rewrite native deployment switches, affect other profiles or promise physical unloading of all inherited Host services. Make disabled-agent reasons visible.
212
-
213
- Saving or changing the future-session default doesn't automatically change already-admitted sessions. Preserve explicit Apply as a capability governed by existing session authority; define its interaction with this policy rather than removing it or treating it as an implicit save effect.
214
-
215
- **Diagnostics and tolerance.** Some load/save/apply diagnostics already exist. Improve their precision and availability at configuration surfaces: identify the specific field and reason, with sanitized output that doesn't expose secrets. Retain the user's goal of loading profiles with inconsequential problems as a candidate warning policy, with warnings continuously visible in profile state. Which problems qualify remains open; unknown fields and legacy fields aren't tolerated by default. Don't weaken permission, routing, version, revision or integrity rejection, silently ignore defects, or automatically rewrite the original file.
216
-
217
- #### Background and child lifecycle
218
-
219
- Retain four goals: model-chosen background delegation, user-requested foreground-to-background transition, reuse of an existing child, and messages to a running child. Some `run_in_background`, jobs, continuable-child and `send_message` foundations exist. Check what the published package actually exposes and where gaps remain instead of treating all four as missing.
220
-
221
- Autonomous background choice must respect configuration limits and native ownership, capacity, depth and cancellation boundaries. Define continuable follow-up separately from revival of a terminated one-shot child or recovery across a cold restart; message delivery timing also needs confirmation. An existing child doesn't gain new permissions when its parent changes profile. These goals don't introduce an independent retry scheduler.
222
-
223
- ### Candidate acceptance
224
-
225
- These are future acceptance targets, not claims of current delivery. Items with pending semantics become assessable only after those decisions are defined.
226
-
227
- - **Levels, overrides and legacy fields:** configured levels select the effective model/effort for one invocation; omission preserves the existing route, and visible status names the actual level. Authorized overrides don't persist or alter the root native model. The two max-reasoning preset fields have no consuming paths after removal, and old configurations receive the agreed diagnostic or explicit migration. Resource selection alone doesn't waive verification.
228
- - **Topology:** both candidate layouts can be selected, with invocation guidance matching their callable inventory and parameters. Entry-point changes preserve target role identity and permissions; exact names, classification and default require definition first.
229
- - **Locale:** supported preferences follow the defined global/profile and current-request precedence consistently across applicable visible role output. Unsupported values are diagnosed; preserved literals aren't translated, and no internal-reasoning or host-UI-language guarantee is implied.
230
- - **Profile UI states:** browsing, draft/saved revision, future-session default pin and current admitted pin/epoch are distinguishable. No-session state is explicit; save, default selection, Apply and baseline actions have clear effects and visible disabled reasons. Narrow panels retain usable controls, catalog and Advanced JSONC access, with blocking reasons and warning presence visible and existing storage/CAS/admission semantics intact.
231
- - **Agent disabling:** once the required set and policy are defined, optional-agent disabling narrows admitted availability within deployment limits, with attributable disabled reasons. Required-agent rejection remains explicit. Saves/default changes don't mutate admitted sessions; explicit Apply follows existing authority and doesn't grant old children new permissions.
232
- - **Diagnostics and tolerance:** field-specific, sanitized diagnostics are available where profiles are configured. Any approved inconsequential defect remains a visible warning while the profile is usable; undefined classes, including unknown or legacy fields, gain no implicit tolerance. Protected rejection and original files remain intact.
233
- - **Child lifecycle:** verify all four goals through the published invocation surface: autonomous background choice, user foreground-to-background transition, existing-child reuse and running-child messaging. Defined continuation and delivery semantics respect ownership, capacity, depth, cancellation and permissions, without an independent retry scheduler.
234
-
235
- ### Pending decisions
236
-
237
- - **Invocation contract:** eligible roles and level composition/default naming; full-route versus effort-only precedence; a separate process preference, if needed; diagnostic versus explicit migration for legacy fields; topology names, classification and default.
238
- - **Language and Profiles policy:** locale values, inheritance and current-request precedence; the DW-required agent set and optional-agent disabling under explicit Apply authority; which inconsequential defects can receive persistent warnings without weakening protected rejection.
239
- - **Child interaction:** published-package exposure and remaining gaps; autonomous background ownership/capacity/cancellation policy; foreground transition semantics; continuable reuse versus terminated or cold-restart recovery; message timing.
240
-
241
- ## v1.0 — Stable dsmm release
242
-
243
- ### Planned: abstract capabilities and Plugins management
244
-
245
- **Planned, not implemented.** Introduce default, reusable capability policies and a Plugins management surface with global/profile/role-scoped enablement and tuning, rather than hard-coding another role-specific switch framework. The current role-sized native standard defaults are a bounded composition increment, not that management API or UI.
246
-
247
- The design must bind each source baseline to an actually inspected version and frozen revision, distinguish Host services from role-owned rows and inherited native child composition, and retain fail-closed read-only/tool/delegation policy when new tools appear. DSH rc.2 is not claimed to provide preset `extends` or automatic standard inheritance. Saves should affect newly admitted roots, without remounting existing roots or rewriting their captured runtime services; any future profile policy must preserve the existing native model, caller-filter, immutable admission and module-off boundaries. No new schema, configuration controls or UI source implement these switches in this increment.
248
-
249
- Status: the initial scoped package is `@dsmm/dsmm@0.1.0`; `0.1.1` adds native per-role model/effort policies and ordered role fallbacks. The v1.0 stable milestone remains future work and does not imply all OpenCode hooks or client surfaces are compatible.
250
-
251
- ### Goal
252
-
253
- Publish dsmm as a stable dsh plugin with documented compatibility and migration paths.
254
-
255
- ### Deliverables
256
-
257
- - npm-ready package.
258
- - dsh compatibility matrix.
259
- - Docker integration checks.
260
- - Migration guide from ocmm.
261
- - Release checklist and rollback notes.
262
-
263
- ### Acceptance
264
-
265
- - Fresh users can install dsmm into a new dsh profile and run deepwork mode from the documented steps.
266
- - Existing ocmm users can understand which features are equivalent, redesigned, or unavailable.
267
- - The release process does not require global dsh configuration mutation.
36
+ 0.3.1 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,114 +1,52 @@
1
- # Runtime recovery and route strategies (0.1.5)
1
+ # Runtime recovery and route strategies
2
2
 
3
- ## Two independent role strategies
3
+ DSMM 0.3.1 targets exactly DSH `0.2.1-rc.2`.
4
4
 
5
- Every enabled DSMM role in each profile independently selects `startup-lock` (default) or `rate-limit-fallback`. Optional `runtimePolicy` supplies inherited defaults; a role's `strategy` / `rateLimit` overrides only explicit fields. Different profiles can assign different strategies to the same role. No profile contains native account/auth configuration.
5
+ ## Independent role strategies
6
6
 
7
- For child Agents, native preparation admits the primary or first resolvable ordered candidate without sending a sacrificial completion. Catalog listing is advisory, not account/network health. `startup-lock` then retains that exact route/effort across turns and bounded RATE_LIMIT retries. `rate-limit-fallback` may advance the ordered chain after its threshold of distinct safe RATE_LIMIT failures. Success resets consecutive counts; duplicate delivery does not count twice and exhausted chains never wrap.
7
+ Each role may use `startup-lock` (default) or explicit `rate-limit-fallback`. `runtimePolicy` supplies inherited defaults; role `strategy` / `rateLimit` overrides only explicit fields. Profiles contain no native accounts or credentials.
8
8
 
9
- Ordinary top-level Agents always honor the native model tab's assembled provider/model/effort, even before a first explicit selection event. Their finite, positively no-output-safe RATE_LIMIT retries stay on that route; role/global primary and fallback chains do not automatically replace it. Roots are never legacy-calibrated. Switching a profile normally preserves the native model; only the explicit switch-and-use-profile-model action submits a native model selection and updates the picker.
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
+
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.
10
12
 
11
13
  | Policy field | Default | Strict integer bound |
12
14
  | --- | --- | --- |
13
- | `maxRetries` | 3 | 0–10 |
14
- | `initialDelayMs` | 500 | 0–30000 |
15
- | `maxDelayMs` | 10000 | 0–30000 |
16
- | `maxTotalDelayMs` | 30000 | 0–120000 |
17
- | `switchAfterRateLimits` | 3 | 1–10 |
18
- | `maxSwitches` | 2 | 0–10 |
19
-
20
- `maxRetries` counts requests after the first on a route; the threshold includes that first distinct failed attempt. If retry budget runs out before threshold, stop. A switch starts fresh same-route counters but consumes the admission epoch's switch cap. Malformed, unknown, fractional or nonfinite values fail instead of becoming different defaults.
21
-
22
- ## Legacy defaults and migration
23
-
24
- The legacy continuation/configuration block remains parse-compatible, with this complete default:
25
-
26
- ```yaml
27
- runtimeRecovery:
28
- enabled: false
29
- retryOnStatusCodes: [429, 500, 502, 503, 504]
30
- retryOnCodes: []
31
- fallbackRoutes: []
32
- maxFallbackAttempts: 2
33
- idleContinuation:
34
- enabled: false
35
- maxContinuations: 3
36
- prompt: "Continue the current task from the durable goal or unfinished todo list. Do not repeat completed work."
37
- ```
38
-
39
- `maxFallbackAttempts` and `idleContinuation.maxContinuations` retain their legacy finite cap grammar. An empty `fallbackRoutes` list is valid and supplies no alternatives. The legacy `runtimeRecovery.enabled` flag is not the strategy selector and does not gate the new scoped finite RATE_LIMIT policy.
40
-
41
- 0.1.4 documents remain loadable without rewriting drafts, deployment patches or history. The migration is behavioral: omitted strategy now means safer `startup-lock`, so retained generic `SERVER`, `TIMEOUT`, `TRANSPORT` or status-based retry lists do not imply later automatic channel hopping. Explicitly choose `rate-limit-fallback` only where rate-limit rollover is intended. This release supplies no inferred generic-behavior opt-in. Inspect normalized effective role policy before upgrading a deployment that depended on the old automatic behavior.
42
-
43
- ## Role-specific chains
44
-
45
- `roleRouting.<role>.fallbackRoutes` uses the same route shape, with optional exact native `reasoningEffort`. The resolved strategy/retry policy, not legacy enabled state, controls scoped RATE_LIMIT behavior. Configuring a chain does not enable idle continuation.
46
-
47
- For a known enabled role, an explicitly supplied chain takes precedence over the global list. `[]` suppresses global fallback for that role; an omitted chain preserves legacy global behavior. Routes retain configured order and deduplicate by provider/model identity, so changing effort does not create additional retry opportunities. Unrecognized children never inherit their parent's role chain.
48
-
49
- To migrate explicit role chains, choose each role's strategy deliberately, keep inherited/global alternatives explicit where needed, and leave `idleContinuation.enabled:false`. Omission resolves to startup lock, not legacy generic recovery. Exact effort omission clears stale adapter-owned effort while preserving unrelated native parameters.
50
-
51
- ## Universal no-output fence and one retry owner
52
-
53
- Every DSMM retry or switch requires positive no-output proof, even when staying on the same model. Exact Agent/admission epoch/lock generation, live attempt ID, turn/step, accepted header and committed assistant settlement must match. Dense live chunks must agree with the validated durable compact stream and its exact terminal failure. Missing, stale, mismatched, ambiguous, abandoned or duplicate evidence refuses before spending budget or waiting.
54
-
55
- Any accepted text, reasoning, tool-call fragment, block start/end or executed tool forbids replay. Both strategies' deterministic partial-text → RATE_LIMIT and partial-tool-fragment → RATE_LIMIT cases require one provider request, zero tools and terminal refusal. Already completed earlier tools stay unchanged. Same-route retries are not exempt.
56
-
57
- Inside the scoped DSMM RATE_LIMIT/unavailable branch, DSMM owns the native `agent/request-error` decision. Refusal is terminal and never falls through to native `mode:always` or another competing retry handler. Outside that branch, native host-first behavior and exact downstream result identity remain unchanged. All provider calls and step retries stay inside the native loop; DSMM neither calls a provider directly nor synthesizes a prompt, restarts a turn or replays tools.
58
-
59
- Only exact native `NO_ADAPTER` or adapter-proven `UNKNOWN_MODEL` on the first actual no-output request may advance a remaining startup candidate. Contradictory 401/403/402/429 facts, authorization, quota/payment, context, cancellation, transport/server ambiguity or error-message text do not establish availability. Later generic failures cannot hop.
60
-
61
- One finite abortable middleware delay may honor valid `providerRetryAfterMs` only within per-delay and total budgets. Invalid or too-large values refuse instead of causing infinite waiting or uncontrolled retry. Abort/disposal/epoch/header/provider replacement and closed/superseded boundaries cancel or invalidate pending work. No independent timer-driven request exists.
62
-
63
- Fresh native `model/selection` intent also invalidates old reservations, even when provider/model/effort is unchanged. DSMM captures the exact typed user intent at native prompt-assembly start and correlates it with the native-selected request; a concurrently newer choice is for the next assembly, never a retrofit of the current frame. Explicit user provider/model/effort outranks profile primary/defaults on later turns and cold resume. Profile apply advances the admission epoch and policy without silently clearing native user intent. A parent's manual choice is not authority to overwrite a configured child's own role route.
64
-
65
- ## Request ordering
66
-
67
- The recovery request path applies a matching pending fallback route after native request selection. A named fallback effort is preserved exactly; omission clears stale adapter-owned `reasoningEffort`. All unrelated downstream fields are preserved. Explicit role primary policy must not replace the admitted fallback on that or a later request in the same recovery scope.
68
-
69
- Model routing evaluates the final route. Legacy calibration still recognizes only exact V4 Pro or native V41 Flash routes; a fallback does not broaden those matches. Explicit configured efforts bypass legacy degradation and are checked through the native model capability seam. DSMM does not set temperature or create a second capability registry, and the final adapter remains responsible for supported call parameters.
15
+ | `maxRetries` | 3 | 0 to 10 |
16
+ | `initialDelayMs` | 500 | 0 to 30000 |
17
+ | `maxDelayMs` | 10000 | 0 to 30000 |
18
+ | `maxTotalDelayMs` | 30000 | 0 to 120000 |
19
+ | `switchAfterRateLimits` | 3 | 1 to 10 |
20
+ | `maxSwitches` | 2 | 0 to 10 |
70
21
 
71
- Duplicate failure delivery cannot select a second pending route. Closed/superseded turn/step boundaries and aborted signals cannot commit a late route. HTTP 402 never authorizes strategy rollover. No real billing/rate-limit error is manufactured for testing.
22
+ `maxRetries` counts requests after the first on a route; the threshold includes the first distinct failure. Exhausted retry budget stops the attempt even before the switch threshold. Switches consume a finite scope budget. Invalid values refuse instead of becoming different defaults.
72
23
 
73
- ## Durable continuation
24
+ `roleRouting.<role>.fallbackRoutes` owns its full route/parameter sets. Explicit `[]` suppresses inherited alternatives; omission inherits the applicable chain. A fallback doesn't inherit primary-only parameters. Omitted effort clears stale explicit effort. `runtimeRecovery.enabled` isn't the role strategy selector, and retained generic status/code lists don't authorize arbitrary transport/server retries or channel hopping.
74
25
 
75
- Idle continuation is separately opt-in. It is eligible only for an active deepwork session or selected DSMM preset when the signal is not aborted and the durable state shows either a latest current-turn todo with `pending` or `in_progress` status, or a latest active goal. The cap is per live agent and turn, so each live agent/turn pair gets at most `maxContinuations` steering attempts.
26
+ ## Positive no-output proof and native execution
76
27
 
77
- The continuation uses this exact user message:
28
+ Every automatic retry or switch needs correlated positive no-output evidence from native `agent/request-error` and `agent/assistant-stream`. Missing, stale, ambiguous or mismatched Agent, admission, request, turn/step or generation evidence refuses replay. Partial text, reasoning or tool-call fragments forbid automatic replay, including same-route retries. Already executed tools aren't rerun.
78
29
 
79
- > Continue the current task from the durable goal or unfinished todo list. Do not repeat completed work.
30
+ Only public registration-directory proof of provider absence or adapter-proven `UNKNOWN_MODEL` may advance startup candidates without accepted output. A generic `NO_ADAPTER` from middleware or an unready registered adapter isn't absence proof. Authorization, payment/quota, context, cancellation and ambiguous transport/server failures don't authorize hopping; error wording isn't proof.
80
31
 
81
- Steering failure consumes an attempt and produces a sanitized warn/fail-open result: it never rejects turn shutdown. DSMM emits only fixed sanitized warnings: `dsmm runtime recovery could not evaluate fallback; preserving the host request-error decision` and `dsmm runtime recovery continuation steering failed for turn <turn>`.
32
+ Fallback decisions stay in the native request loop. DSMM doesn't create another request scheduler, invoke providers independently, synthesize retry prompts or restart turns. Native adapter retry and DSMM candidate policy must remain bounded together. Where native evidence can't establish a reliable no-output boundary, report automatic fallback unavailable and require explicit retry rather than guessing.
82
33
 
83
- ## Cold restart
34
+ An abortable middleware delay can honor valid `providerRetryAfterMs` only within per-delay and total budgets. Cancellation, owner/provider retirement, closed turn/step boundaries or superseded intent invalidate pending work before another dispatch. Duplicate errors can't reserve a second fallback.
84
35
 
85
- An explicit session sidecar pins its exact immutable profile/baseline on cold resume; absent sidecars retain the historical global-current contract. Process-local attempts, waits, counters and locks do not resurrect from old headers alone. New admission epochs fence old reservations and route folds while the audited `dsmm/role-policy` event retains its exact grammar. There is no continuation until the user/native host resumes activity. See [profiles](profiles.md).
36
+ Native model selection, including same-value reselection, is new intent. Assembly captures that intent for the request; a concurrently newer selection belongs to the next assembly, not a retrofit. Child initial routes are defaults, not every-turn overrides of accepted native intent or valid fallback. Existing Agents consume admitted policy, not later saved desired configuration. See [model routing](model-routing.md).
86
37
 
87
- ## Subagent recovery
38
+ ## Live continuation and activation
88
39
 
89
- Continuable child sessions differ from one-shot children: a continuable child has a known session that can be resumed deliberately, while a one-shot child has no safe automatic follow-up contract. `subagent/end` is live-only diagnostic information, not a durable recovery trigger.
40
+ Idle continuation is separately opt-in under `runtimeRecovery.idleContinuation`; it doesn't follow from a fallback chain. It requires an eligible active live Agent and unfinished durable goal/todo evidence, with a finite per-Agent/turn cap. Steering failure consumes an attempt and doesn't reject turn shutdown. It grants no extra tool or role authority.
90
41
 
91
- To investigate an interrupted child, use the native durable descriptor and child control/session surfaces. Explicitly continue a known continuable child only when the host/user has the required context; one-shot role tools are not continuable sessions. DSMM never synthesizes a parent prompt, parent session, or task ID, and it does not automatically follow up a child or parent. Native delegation depth and permission restrictions remain authoritative; DSMM does not raise the host's default depth.
42
+ Role delegation uses official activation. Waiting uses `delivery:'caller'`; only native `completed` is normal completion. Failure, partial output and cancellation remain visible. After publication, cancellation uses the receipt's `dispose()` and awaits cleanup. Background must be selected before start with `delivery:'parent'`; an accepted child/message receipt isn't completion. Running waiting calls can't be transferred to background.
92
43
 
93
- ## Non-goals and logging
44
+ Supported exact live children may receive Queue/Steer or interrupt through native controls, subject to current direct-parent/operator authority and actual capabilities. Inbox acceptance and interrupt acknowledgment aren't completion. Unknown sends aren't automatically retried. Read-only descendant inspection grants no control.
94
45
 
95
- - No fake or extended `llm/retry` events.
96
- - No independent retry timer/request engine, session aborts, or background polling; only finite abortable delay in the existing native error middleware.
97
- - No cross-process automatic retry.
98
- - No provider discovery or heuristic fallback chain.
99
- - No provider-message parsing or classification, and no provider calls outside the host request loop.
100
- - No automatic child followup. No automatic parent followup.
46
+ ## Cold resume and lifetime
101
47
 
102
- Warnings are fixed and sanitized; they omit request bodies, provider error bodies, credentials, todo text, goal text, and arbitrary exception details.
48
+ DSMM cold resume without trusted live admission is unsupported. Old headers, configuration sidecars, role labels or PluginRecord display data don't revive retry state, policy or execution authority. Preserve history instead of copying current settings into it. DSMM read-only history queries don't call resume. Native factory load/repair may occur before the created guard rejects execution, so refusal isn't a guarantee that the log was never opened.
103
49
 
104
- ## Native C consumption
50
+ Official Registry, Runtime and JSONL plugins own lifecycle and storage. DSMM scoped guards retain retirement checks; hot unload/reinstall doesn't promise uninterrupted live-session replacement. No custom owner, companion, cold migration or cross-process automatic retry is provided.
105
51
 
106
- Consumers use `getSettings(agent)`/admission epoch, not desired disk values. Saving
107
- desired recovery off does not cancel an old admitted parent or its future children;
108
- new ordinary roots capture the new policy. Exact live registry membership rejects
109
- late disposed assistant/error/turn-stopping evidence before it can reserve retry
110
- or steer. Native generation/turn/step/no-output ownership and finite budgets remain
111
- the same controller; no parallel scheduler, queue, retry prompt or OCMM event-name
112
- translation is added. Generic native retry ownership is unchanged. Continuable
113
- message/interrupt/cold resume and native jobs cancellation are public native control
114
- paths, not runtime-recovery retries or a fake one-shot task-id continuation.
52
+ Diagnostics omit request/provider bodies, credentials and goal/todo text.
@@ -1,6 +1,6 @@
1
1
  # DSMM Safety Guards
2
2
 
3
- DSMM uses DSH 0.2-native safety guards on the tools pipeline. The guards use `tools/pre-execute` for allow, deny, and ask decisions, and `tools/post-execute` for accepted-result truncation. They do not use OpenCode hook names and do not mutate tool arguments. Profile configuration belongs in the `id: dsmm` Loader entry's `config` object, not the removed settings.yaml namespace.
3
+ DSMM 0.3.1 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
 
@@ -9,19 +9,22 @@ The default scope is `deepwork-or-dsmm-agent`: helpers apply when the agent is i
9
9
  ## Settings
10
10
 
11
11
  ```yaml
12
- dsmm:
13
- guards:
14
- scope: deepwork-or-dsmm-agent
15
- shellCommandSafety: true
16
- gitWriteGuard: ask
17
- toolOutputTruncation:
18
- enabled: true
19
- maxInlineBytes: 12000
20
- planFormatValidation: true
21
- questionLabelHelper:
22
- enabled: true
23
- maxLabelChars: 30
24
- todoDisciplineHelper: true
12
+ - id: dsmm
13
+ name: '@dsmm/dsmm'
14
+ config:
15
+ # Retain other existing DSMM values when editing the native entry.
16
+ guards:
17
+ scope: deepwork-or-dsmm-agent
18
+ shellCommandSafety: true
19
+ gitWriteGuard: ask
20
+ toolOutputTruncation:
21
+ enabled: true
22
+ maxInlineBytes: 12000
23
+ planFormatValidation: true
24
+ questionLabelHelper:
25
+ enabled: true
26
+ maxLabelChars: 30
27
+ todoDisciplineHelper: true
25
28
  ```
26
29
 
27
30
  ## Failure messages
@@ -48,7 +51,7 @@ Known write operations are `add`, `am`, `apply`, `branch`, `checkout`, `cherry-p
48
51
 
49
52
  DSMM's pre-execute handler runs before downstream handlers. Its own deny wins immediately. For its own ask, DSMM calls downstream and returns the ask only when downstream allowed the call; a downstream ask or deny is preserved. This keeps another safety policy's stricter decision intact rather than replacing it with DSMM's request. Structured-value replacements, errors, and blocked post-tool results are not truncated into apparently successful text.
50
53
 
51
- Workflow and role instructions also prefer short shell operations and repository-native tools, prohibit cross-shell destructive path composition, require exact path checks before recursive deletion, and prohibit autonomous Git writes. These instructions complement—not replace—the host sandbox and approval pipeline. Read-only role authority is bound to exact live Agent ownership/admission, not a persona label. Native caller filters remain intact. Agent admission restricts inherited tools and installs monotonic execution guards; own-layer definitions are identity-fenced, including a re-registered `read` impersonating a safe operation. rc.2 has no public hide-own-layer filter: a registration may remain displayed, but forbidden/unadmitted invocation must fail. Native sandbox/approval/observation remain authoritative.
54
+ Workflow and role instructions also prefer short shell operations and repository-native tools, prohibit cross-shell destructive path composition, require exact path checks before recursive deletion, and prohibit autonomous Git writes. These instructions complement, not replace, the host sandbox and approval pipeline. Read-only role authority is bound to exact live Agent ownership/admission, not a persona label. Native caller filters remain intact. Agent admission restricts inherited tools and installs monotonic execution guards; own-layer definitions are identity-fenced, including a re-registered `read` impersonating a safe operation. rc.2 has no public hide-own-layer filter: a registration may remain displayed, but forbidden/unadmitted invocation must fail. Native sandbox/approval/observation remain authoritative.
52
55
 
53
56
  ## Plan mutation validation
54
57
 
@@ -56,4 +59,4 @@ Plan validation recognizes `docs/superpowers/plans/*.md` and `.omo/plans/*.md` b
56
59
 
57
60
  On rc.2, protected `edit` has no proven authorized complete pre-commit document preview. When enabled, this helper returns typed pre-execute denial with `unsupported-full-preview`, after checking public edit argument shape. Use an authorized complete-document write instead. DSMM never reads the target with Node FS, proactively invokes native read, refreshes observation/CAS, parses opaque target identity, accepts caller content as a fake preview, or treats a truncated line view/new-string fragment as the final document. This is a fail-closed unsupported seam, not successful format validation or N/A. Native matching/CAS remain untouched; ordinary non-plan edits remain native. Helper off makes no final-document formatting guarantee and does not lift role/host permissions.
58
61
 
59
- Planner main/child roles return complete Markdown for native `exit_plan_mode` review; `/plan` is collaboration state, not a sandbox or upgrade. An authorized coordinator persists through native write. Tests retain the original private-checklist regression, with zero target reads/body executions, no leaked sentinel and unchanged bytes, plus actual native complete writes, stronger denial, stale version and ordinary unique-match/replace-all coverage.
62
+ Planner main/child roles return complete Markdown for native `exit_plan_mode` review; `/plan` is collaboration state, not a sandbox or upgrade. An authorized coordinator persists through native write. A failed format check doesn't grant permission to read private targets or bypass native matching/CAS.