@dsmm/dsmm 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  DSMM adapts ocmm's deepwork workflow to DeepSeek Harness. It is a DSH-native Cordis bundle, not an OpenCode compatibility layer.
4
4
 
5
- This package targets `@deepseek-ai/dsh@0.2.0-rc.2`, the npm `latest` resolved on 2026-10-03. The first scoped release is `@dsmm/dsmm@0.1.0`; local readiness checks alone do not represent a published release. Runtime settings and role IDs retain the `dsmm` namespace.
5
+ This package targets `@deepseek-ai/dsh@0.2.0-rc.2`, the npm `latest` resolved on 2026-10-03. Version `0.1.1` adds explicit role model/effort policies and role-aware fallbacks to the first scoped `0.1.0` release. Local readiness checks alone do not represent a published release. Runtime settings and role IDs retain the `dsmm` namespace.
6
6
 
7
7
  ## Current functionality
8
8
 
@@ -10,6 +10,7 @@ This package targets `@deepseek-ai/dsh@0.2.0-rc.2`, the npm `latest` resolved on
10
10
  - Seven scoped core workflow skills synchronized with current ocmm: risk-based discovery, complex-work planning and criticism, bounded implementation, evidence-led review, parallel execution, and behavior-preserving cleanup.
11
11
  - Twelve native roles, including Builder, Creative, Reviewer, Oracle, and second-priority Oracle. Read-only role constraints are enforced through native tool composition. Models remain user-selected; Oracle names alone do not guarantee model heterogeneity.
12
12
  - Exact-route V41 Flash calibration for `deepseek-official/deepseek-flash` and `deepseek-account/deepseek-flash`, preserving V4 Pro settings. Runtime selects only adapter-advertised reasoning efforts.
13
+ - Restart-scoped `roleRouting` for fixed role provider/model/effort selection on direct presets and delegated children; exact configured efforts are not silently downgraded. Ordered role fallbacks use the existing opt-in host-first recovery controller.
13
14
  - Scoped shell/Git/plan/question/todo guards, optional host-first fallback and bounded continuation.
14
15
  - Optional external `ocmm-lsp mcp` integration with nine tools including atomic `format`. Debugging/DAP is an on-demand skill, not additional LSP tools or automatic prompt injection.
15
16
 
@@ -17,14 +18,14 @@ The native host owns child-session controls, depth limits, permission checks, ca
17
18
 
18
19
  ## Install and configure
19
20
 
20
- Install the exact registry version after publication with `dsh plugin --profile <profile> add @dsmm/dsmm@0.1.0`. For isolated local verification, use a built and packed artifact:
21
+ Install the exact registry version after publication with `dsh plugin --profile <profile> add @dsmm/dsmm@0.1.1`. For isolated local verification, use a built and packed artifact:
21
22
 
22
23
  ```powershell
23
24
  pnpm --dir dsmm build
24
25
  pnpm --dir dsmm pack --pack-destination <temporary-artifact-directory>
25
26
  $env:DSH_HOME = "<disposable-test-home>"
26
27
  dsh --profile <profile> --from-default-profile headless --dump-config
27
- dsh plugin --profile <profile> add <absolute-path-to-dsmm-dsmm-0.1.0.tgz>
28
+ dsh plugin --profile <profile> add <absolute-path-to-dsmm-dsmm-0.1.1.tgz>
28
29
  dsh --profile <profile> --dump-config
29
30
  ```
30
31
 
@@ -44,6 +45,8 @@ On DSH 0.2, restart-scoped settings belong to the profile's `cordis.patch.yml`:
44
45
 
45
46
  Do not copy the old `settings.yaml` namespace or preset-discovery roots into the new host. See [migration](docs/migration-from-ocmm.md), [settings/status](docs/settings-status.md), and [agent roles](docs/agent-presets.md).
46
47
 
48
+ For a role-specific model, configure `roleRouting.dsmm-reviewer.primary` with native `provider`, `model`, and optional `reasoningEffort`. There are no built-in provider routes or API keys. See [model routing](docs/model-routing.md) for policy precedence and [runtime recovery](docs/runtime-recovery.md) for the opt-in fallback gate.
49
+
47
50
  Without active mode or a selected DSMM preset, DSMM workflow prompts and default-scoped guards do not apply. Headless task text is not a slash-command adapter.
48
51
 
49
52
  ## Verification
@@ -40,7 +40,7 @@
40
40
  - id: subagent-dsmm-planner
41
41
  name: '@deepseek-ai/dsh-tool-subagent'
42
42
  config:
43
- provider: 'spawn'
43
+ provider: 'dsmm-role-planner'
44
44
  toolName: 'dsmm_planner'
45
45
  modelSelectionSettings: false
46
46
  backgroundMode: 'one-shot'
@@ -56,7 +56,7 @@
56
56
  - id: subagent-dsmm-plan-critic
57
57
  name: '@deepseek-ai/dsh-tool-subagent'
58
58
  config:
59
- provider: 'spawn'
59
+ provider: 'dsmm-role-plan-critic'
60
60
  toolName: 'dsmm_plan_critic'
61
61
  modelSelectionSettings: false
62
62
  backgroundMode: 'one-shot'
@@ -72,7 +72,7 @@
72
72
  - id: subagent-dsmm-builder
73
73
  name: '@deepseek-ai/dsh-tool-subagent'
74
74
  config:
75
- provider: 'spawn'
75
+ provider: 'dsmm-role-builder'
76
76
  toolName: 'dsmm_builder'
77
77
  modelSelectionSettings: false
78
78
  backgroundMode: 'one-shot'
@@ -81,7 +81,7 @@
81
81
  - id: subagent-dsmm-reviewer
82
82
  name: '@deepseek-ai/dsh-tool-subagent'
83
83
  config:
84
- provider: 'spawn'
84
+ provider: 'dsmm-role-reviewer'
85
85
  toolName: 'dsmm_reviewer'
86
86
  modelSelectionSettings: false
87
87
  backgroundMode: 'one-shot'
@@ -97,7 +97,7 @@
97
97
  - id: subagent-dsmm-oracle
98
98
  name: '@deepseek-ai/dsh-tool-subagent'
99
99
  config:
100
- provider: 'spawn'
100
+ provider: 'dsmm-role-oracle'
101
101
  toolName: 'dsmm_oracle'
102
102
  modelSelectionSettings: false
103
103
  backgroundMode: 'one-shot'
@@ -111,7 +111,7 @@
111
111
  - id: subagent-dsmm-oracle-2nd
112
112
  name: '@deepseek-ai/dsh-tool-subagent'
113
113
  config:
114
- provider: 'spawn'
114
+ provider: 'dsmm-role-oracle-2nd'
115
115
  toolName: 'dsmm_oracle_2nd'
116
116
  modelSelectionSettings: false
117
117
  backgroundMode: 'one-shot'
@@ -125,7 +125,7 @@
125
125
  - id: subagent-dsmm-creative
126
126
  name: '@deepseek-ai/dsh-tool-subagent'
127
127
  config:
128
- provider: 'spawn'
128
+ provider: 'dsmm-role-creative'
129
129
  toolName: 'dsmm_creative'
130
130
  modelSelectionSettings: false
131
131
  backgroundMode: 'one-shot'
@@ -139,7 +139,7 @@
139
139
  - id: subagent-dsmm-code-search
140
140
  name: '@deepseek-ai/dsh-tool-subagent'
141
141
  config:
142
- provider: 'spawn'
142
+ provider: 'dsmm-role-code-search'
143
143
  toolName: 'dsmm_code_search'
144
144
  modelSelectionSettings: false
145
145
  backgroundMode: 'one-shot'
@@ -156,7 +156,7 @@
156
156
  - id: subagent-dsmm-doc-search
157
157
  name: '@deepseek-ai/dsh-tool-subagent'
158
158
  config:
159
- provider: 'spawn'
159
+ provider: 'dsmm-role-doc-search'
160
160
  toolName: 'dsmm_doc_search'
161
161
  modelSelectionSettings: false
162
162
  backgroundMode: 'one-shot'
@@ -175,7 +175,7 @@
175
175
  - id: subagent-dsmm-clarifier
176
176
  name: '@deepseek-ai/dsh-tool-subagent'
177
177
  config:
178
- provider: 'spawn'
178
+ provider: 'dsmm-role-clarifier'
179
179
  toolName: 'dsmm_clarifier'
180
180
  modelSelectionSettings: false
181
181
  backgroundMode: 'one-shot'
@@ -192,7 +192,7 @@
192
192
  - id: subagent-dsmm-media-reader
193
193
  name: '@deepseek-ai/dsh-tool-subagent'
194
194
  config:
195
- provider: 'spawn'
195
+ provider: 'dsmm-role-media-reader'
196
196
  toolName: 'dsmm_media_reader'
197
197
  modelSelectionSettings: false
198
198
  backgroundMode: 'one-shot'
@@ -45,7 +45,7 @@
45
45
  - id: subagent-dsmm-planner
46
46
  name: '@deepseek-ai/dsh-tool-subagent'
47
47
  config:
48
- provider: 'spawn'
48
+ provider: 'dsmm-role-planner'
49
49
  toolName: 'dsmm_planner'
50
50
  modelSelectionSettings: false
51
51
  backgroundMode: 'one-shot'
@@ -61,7 +61,7 @@
61
61
  - id: subagent-dsmm-plan-critic
62
62
  name: '@deepseek-ai/dsh-tool-subagent'
63
63
  config:
64
- provider: 'spawn'
64
+ provider: 'dsmm-role-plan-critic'
65
65
  toolName: 'dsmm_plan_critic'
66
66
  modelSelectionSettings: false
67
67
  backgroundMode: 'one-shot'
@@ -77,7 +77,7 @@
77
77
  - id: subagent-dsmm-builder
78
78
  name: '@deepseek-ai/dsh-tool-subagent'
79
79
  config:
80
- provider: 'spawn'
80
+ provider: 'dsmm-role-builder'
81
81
  toolName: 'dsmm_builder'
82
82
  modelSelectionSettings: false
83
83
  backgroundMode: 'one-shot'
@@ -86,7 +86,7 @@
86
86
  - id: subagent-dsmm-reviewer
87
87
  name: '@deepseek-ai/dsh-tool-subagent'
88
88
  config:
89
- provider: 'spawn'
89
+ provider: 'dsmm-role-reviewer'
90
90
  toolName: 'dsmm_reviewer'
91
91
  modelSelectionSettings: false
92
92
  backgroundMode: 'one-shot'
@@ -102,7 +102,7 @@
102
102
  - id: subagent-dsmm-oracle
103
103
  name: '@deepseek-ai/dsh-tool-subagent'
104
104
  config:
105
- provider: 'spawn'
105
+ provider: 'dsmm-role-oracle'
106
106
  toolName: 'dsmm_oracle'
107
107
  modelSelectionSettings: false
108
108
  backgroundMode: 'one-shot'
@@ -116,7 +116,7 @@
116
116
  - id: subagent-dsmm-oracle-2nd
117
117
  name: '@deepseek-ai/dsh-tool-subagent'
118
118
  config:
119
- provider: 'spawn'
119
+ provider: 'dsmm-role-oracle-2nd'
120
120
  toolName: 'dsmm_oracle_2nd'
121
121
  modelSelectionSettings: false
122
122
  backgroundMode: 'one-shot'
@@ -130,7 +130,7 @@
130
130
  - id: subagent-dsmm-creative
131
131
  name: '@deepseek-ai/dsh-tool-subagent'
132
132
  config:
133
- provider: 'spawn'
133
+ provider: 'dsmm-role-creative'
134
134
  toolName: 'dsmm_creative'
135
135
  modelSelectionSettings: false
136
136
  backgroundMode: 'one-shot'
@@ -144,7 +144,7 @@
144
144
  - id: subagent-dsmm-code-search
145
145
  name: '@deepseek-ai/dsh-tool-subagent'
146
146
  config:
147
- provider: 'spawn'
147
+ provider: 'dsmm-role-code-search'
148
148
  toolName: 'dsmm_code_search'
149
149
  modelSelectionSettings: false
150
150
  backgroundMode: 'one-shot'
@@ -161,7 +161,7 @@
161
161
  - id: subagent-dsmm-doc-search
162
162
  name: '@deepseek-ai/dsh-tool-subagent'
163
163
  config:
164
- provider: 'spawn'
164
+ provider: 'dsmm-role-doc-search'
165
165
  toolName: 'dsmm_doc_search'
166
166
  modelSelectionSettings: false
167
167
  backgroundMode: 'one-shot'
@@ -180,7 +180,7 @@
180
180
  - id: subagent-dsmm-clarifier
181
181
  name: '@deepseek-ai/dsh-tool-subagent'
182
182
  config:
183
- provider: 'spawn'
183
+ provider: 'dsmm-role-clarifier'
184
184
  toolName: 'dsmm_clarifier'
185
185
  modelSelectionSettings: false
186
186
  backgroundMode: 'one-shot'
@@ -197,7 +197,7 @@
197
197
  - id: subagent-dsmm-media-reader
198
198
  name: '@deepseek-ai/dsh-tool-subagent'
199
199
  config:
200
- provider: 'spawn'
200
+ provider: 'dsmm-role-media-reader'
201
201
  toolName: 'dsmm_media_reader'
202
202
  modelSelectionSettings: false
203
203
  backgroundMode: 'one-shot'
@@ -6,7 +6,9 @@ DSMM defines twelve unsuffixed normal roles: orchestrator, planner, plan-critic,
6
6
 
7
7
  DSH 0.2's `agentPresets.register({ id, plugins })` is the native preset registry. When the host composes `agentPresets` (such as the Web profile), DSMM registers enabled roles as complete plugin compositions: persona, instructions, filesystem/search/web tools, seven bundled workflow skills, on-demand debugging, and role-specific subagent tools where appropriate. Directly selected read-only roles receive an Agent-scoped native `tools.restrict({ deny: ['write', 'edit'] })`; shell tools are not composed into those presets. The orchestrator and builder include native `@deepseek-ai/dsh-tool-subagent` instances whose `persona` and `toolFilter` actually shape each child. Read-only child filters allow repository reads/search, with web tools for doc/media roles; media image reading is available only when that tool exists in the host catalog. The provider must support persona, tool filtering and the host's depth/permission limits.
8
8
 
9
- The DSH headless one-shot runner does **not** mount or select agent presets. When its startup bundle includes `@deepseek-ai/dsh-headless`, DSMM instead mounts the same role-specific subagent instances on each root Agent's tool plane. The tools remain schema-stable for DeepSeek Flash's addition-only tool catalog, but DSMM's monotonic guard rejects owned role-tool calls unless deepwork is active or a DSMM role preset is selected. Headless default sessions therefore keep their original model, tools and DSMM opt-in boundary. Role children inherit the parent's model in both headless and Web presets: DSH's standing `modelSelectionSettings` would re-register subagent tools in each child's own scope, bypassing its inherited-tool filter. DSMM keeps that setting off to enforce read-only roles. Configure a separate host tool/provider with its own verified child filter if external Oracle heterogeneity is required. DSH controls approval, sandbox, cancellation and child depth; DSMM never bypasses those controls.
9
+ The DSH headless one-shot runner does **not** mount or select agent presets. When its startup bundle includes `@deepseek-ai/dsh-headless`, DSMM instead mounts the same role-specific subagent instances on each root Agent's tool plane. The tools remain schema-stable for DeepSeek Flash's addition-only tool catalog, but DSMM's monotonic guard rejects owned role-tool calls unless deepwork is active or a DSMM role preset is selected. Without configured role routing, native model inheritance and the DSMM opt-in boundary are unchanged.
10
+
11
+ Since 0.1.1, `roleRouting` can supply fixed child `agentOptions` and direct-role request policy without dynamic model selection. Native spawn aliases retain trusted role identity in the child's durable descriptor, so two children inheriting the same parent preset can still have different routes and fallback chains. A missing or unknown child identity is not guessed from persona text. DSH's standing `modelSelectionSettings` would re-register subagent tools in each child's own scope, bypassing its inherited-tool filter; DSMM therefore keeps it false. Changing a model never enables extra tools. DSH controls approval, sandbox, cancellation and child depth; DSMM never bypasses those controls.
10
12
 
11
13
  Only enabled role IDs are registered, materialized and exposed as child tools. The canonical role has no suffix. DSH-specific high/low/max model tiers require an explicit profile composition or subagent model choice: no suffix presets are generated by default, and any separately declared tier must preserve the canonical role persona, readonly filter and other constraints. A profile declaration is not proof of a callable tool: inspect the running tool schema or preset registry diagnostic.
12
14
 
@@ -1,4 +1,4 @@
1
- # DSMM v1.0 Compatibility
1
+ # DSMM 0.1.1 Compatibility
2
2
 
3
3
  ## Compatibility authority
4
4
 
@@ -6,7 +6,7 @@ The current migration targets `@deepseek-ai/dsh@0.2.0-rc.2`, the official npm la
6
6
 
7
7
  DSH 0.1.1-rc.2 was the historical baseline; it is not the authority for this updated working tree. Installation ranges are not proof of compatibility with future releases.
8
8
 
9
- The installation contracts are `@deepseek-ai/cordis@~4.0.4`, `@deepseek-ai/schemastery@~3.18.4`, and `@deepseek-ai/dsh-attachment`, `@deepseek-ai/dsh-brand`, `@deepseek-ai/dsh-invariants`, `@deepseek-ai/dsh-llm`, and `@deepseek-ai/dsh-timeout` pinned to `0.2.0-rc.2`.
9
+ The installation contracts include `@deepseek-ai/cordis@~4.0.4`, `@deepseek-ai/schemastery@~3.18.4`, and the package's declared DSH component peers pinned to `0.2.0-rc.2`. Role identity additionally consumes the native `@deepseek-ai/dsh-subagent` public contract; a child lifecycle or descriptor is not reimplemented.
10
10
 
11
11
  ## Compatibility matrix
12
12
 
@@ -24,6 +24,7 @@ The installation contracts are `@deepseek-ai/cordis@~4.0.4`, `@deepseek-ai/schem
24
24
  | TUI | `DSH 0.2.0-rc.2` | unavailable |
25
25
  | LSP/MCP | `external ocmm-lsp mcp` | optional |
26
26
  | Runtime recovery | `process-local` | optional |
27
+ | Per-role model/effort/fallback policy | native request, subagent and descriptor seams | opt-in; exact configured capability required |
27
28
  | DeepSeek V4 Pro calibration | `deepseek-official/deepseek-v4-pro` | optional |
28
29
  | DeepSeek V41 Flash calibration | `native DeepSeek providers/deepseek-flash` | optional |
29
30
 
@@ -44,3 +45,5 @@ The matrix separates observed CLI/configuration and source-contract evidence fro
44
45
  LSP/MCP and runtime recovery are disabled by default. V4 Pro calibration remains limited to the exact `deepseek-official/deepseek-v4-pro` route. V41 Flash calibration recognizes only `deepseek-official/deepseek-flash` and `deepseek-account/deepseek-flash`, whose native DSH catalog label is `DeepSeek-V41-Flash`; similarly named third-party models do not match.
45
46
 
46
47
  A credentialed smoke must prove the actual selected request route, DSMM prompt, successful tools, and subsequent model response without substituting another model. Account and API-key authentication are distinct; an AAPI key is not assumed valid for the official endpoint. No publication, browser/UI, untested OS, or future-release claim follows from these checks.
48
+
49
+ Desktop package management uses the installation-owned `dsh.cmd` only while the app is fully quit. Even that carrier cannot boot or dump the reserved Desktop profile. Installation/manifest checks and isolated native model tests do not prove actual Electron-host activation: use an authorized native inventory or the desktop UI, never an anonymous RPC workaround.
@@ -1,6 +1,6 @@
1
- # Migrating from ocmm to DSMM v1.0
1
+ # Migrating from ocmm to DSMM 0.1.1
2
2
 
3
- DSMM is a DSH-native Cordis bundle, not an OpenCode compatibility layer; .opencode/ocmm.jsonc cannot be copied into DSH. This guide describes the updated, unpublished working tree targeting DSH 0.2.0-rc.2, not a full host-feature parity claim.
3
+ DSMM is a DSH-native Cordis bundle, not an OpenCode compatibility layer; .opencode/ocmm.jsonc cannot be copied into DSH. This guide describes the 0.1.1 routing surface targeting DSH 0.2.0-rc.2, not a full host-feature parity claim.
4
4
 
5
5
  ## Hard boundary
6
6
 
@@ -13,10 +13,10 @@ Model selection, authentication, permissions, session ownership, and package loa
13
13
  | Deepwork gates | Risk-scaled discovery; authorized bounded implementation proceeds; complex behavior uses planner → critic → implementation; completion requires relevant evidence. | equivalent core intent |
14
14
  | Seven workflow skills | Current workflow intent adapted to native DSH tools, scopes, authorization, and review ownership. | equivalent core intent |
15
15
  | Twelve role presets | Native definitions plus role-specific delegation composition, including builder, creative, reviewer, oracle, and oracle-2nd. | redesigned for DSH |
16
- | Model routing and DeepSeek calibration | Exact native V41 Flash routes and preserved V4 Pro configuration, adapter-advertised effort only. | redesigned for DSH |
16
+ | Per-role model/effort and DeepSeek calibration | Explicit `roleRouting`, fixed native child options, direct-role request policy, exact configured efforts, and compatible legacy calibration. | redesigned for DSH |
17
17
  | Safety guards | Native pre/post tool policies; host approval/cancellation remain authoritative. | redesigned for DSH |
18
18
  | LSP/MCP | Optional external ocmm-lsp with nine tools including atomic format; debugging/DAP is a separate on-demand skill. | optional/manual |
19
- | Runtime fallback | Host-first, opt-in, explicitly configured routes with cancellation, duplicate, and step fences. | redesigned for DSH |
19
+ | Runtime fallback | Host-first, opt-in role/global ordered chains with exact efforts, cancellation, duplicate, and step fences. | redesigned for DSH |
20
20
  | Idle continuation | Separately enabled, bounded steering from durable unfinished work. | redesigned for DSH |
21
21
  | Subagent interruption recovery | Native durable child/session control and explicit continuation; no guessed task IDs, synthesized parent messages, or independent automatic retry dispatcher. | redesigned for DSH |
22
22
  | Settings/status | Restart-scoped Loader plugin config and normalized read-only status; old settings namespaces need explicit migration. | redesigned for DSH |
@@ -41,6 +41,12 @@ The role set includes `dsmm-orchestrator`, `dsmm-planner`, `dsmm-plan-critic`, `
41
41
  7. Enable optional LSP/MCP only with a usable external ocmm-lsp executable; recovery stays disabled unless explicitly configured.
42
42
  8. Validate the packed profile and the real specified model's read/write/tool-result round-trip before changing your default workflow.
43
43
 
44
+ Model IDs belong to their native provider routes: `deepseek-account/deepseek-flash` and a custom `hoo/deepseek-v4.1-flash` are distinct routes. Configure custom routes through DSH's pi-ai adapter, using credential references rather than literal keys. Provider SDK identity alone is not wire-protocol proof. For the inspected Anthropic gateway, terminal `/v1` must be removed from its source SDK baseURL to retain the same native request path; adaptive thinking compatibility and exact high/max declarations preserve effort. This rule is not a global URL rewrite for other protocols.
45
+
46
+ Translate source agents into canonical `roleRouting` entries with primary and ordered fallback efforts. Keep explicit disabled roles disabled. A source `explore` alias to code-search maps to `dsmm-code-search`, not a new role/tool. Missing source model capabilities require discovery and actual validation; do not copy another version's vision capabilities or silently replace the media model. The checkout migration helper defaults to a sanitized dry run; applying credentials/profile changes is explicit and requires concurrency/backup safeguards.
47
+
48
+ The inspected pi-ai adapter exposes stable transient codes but no stable HTTP status. The migration candidate explicitly opts in to `RATE_LIMIT`, `SERVER`, `TIMEOUT`, and `TRANSPORT` through `runtimeRecovery.retryOnCodes`, after native host retries decline. Authentication, quota, and invalid-request failures are not included. Package recovery defaults remain unchanged.
49
+
44
50
  ## Coexistence and cutover
45
51
 
46
52
  Keep the existing OpenCode configuration until the DSH profile has independently passed its required evidence. Headless configuration uses profile files and `--dump-config`; command-capable hosts execute `/deepwork` and `/dsmm-status` through the command adapter, not by sending those strings as model tasks.
@@ -1,5 +1,50 @@
1
1
  # Model routing
2
2
 
3
+ ## Explicit role policies (0.1.1)
4
+
5
+ `roleRouting` is a restart-scoped map keyed by canonical DSMM role ID. It defaults to `{}`; role names alone do not select a model. Provider authentication and route declarations remain native DSH configuration.
6
+
7
+ ```yaml
8
+ - id: dsmm
9
+ config:
10
+ defaultActive: true
11
+ roles:
12
+ dsmm-builder: false
13
+ roleRouting:
14
+ dsmm-orchestrator:
15
+ primary:
16
+ provider: my-provider
17
+ model: primary-model
18
+ reasoningEffort: high
19
+ fallbackRoutes:
20
+ - provider: my-provider
21
+ model: backup-model
22
+ reasoningEffort: high
23
+ dsmm-reviewer:
24
+ primary:
25
+ provider: my-provider
26
+ model: review-model
27
+ reasoningEffort: max
28
+ fallbackRoutes: []
29
+ runtimeRecovery:
30
+ enabled: true
31
+ fallbackRoutes: []
32
+ idleContinuation:
33
+ enabled: false
34
+ ```
35
+
36
+ A `primary` is an explicit fixed role policy, not merely a model-menu default. It applies to a directly selected role, a trusted role-tool child, and an active top-level deepwork session as orchestrator when no DSMM preset is selected. Remove or change the policy to use a different native session route. Unconfigured/disabled roles, unrecognized children, and out-of-scope sessions do not acquire another role's policy. Disabled-role configuration may be retained but does not create a callable role.
37
+
38
+ Each route requires a nonempty provider and model together. An optional named `reasoningEffort` is a native adapter ID, not an OpenCode variant translation. The exact configured effort must be supported; unsupported `max` fails rather than being substituted with `high`. A changed route without effort clears incompatible inherited effort and lets the native adapter resolve its default. Existing DeepSeek calibration cannot override an explicit role effort.
39
+
40
+ Fixed native child options keep `modelSelectionSettings:false`. DSMM-owned aliases of the native spawn provider preserve native persona/tool filters, depth, permissions, cancellation, and one-shot lifecycle. Child identity comes from its own durable native subagent descriptor, not a parent preset, persona text, or a model-visible role label. Descriptor identity can be reconstructed after reload; it does not make terminal one-shot children resumable.
41
+
42
+ Primary selection does not reset an admitted fallback or a host-owned durable route change. Final native request headers are authoritative, not an intermediate middleware snapshot. See [runtime recovery](runtime-recovery.md) for role/global chain precedence and retry fences.
43
+
44
+ DSMM records a model-hidden `dsmm/role-policy` metadata epoch for explicit routing. Unchanged policies retain accepted routes across turns and reloads; changing the primary effort or fallback policy invalidates the old selection and applies the new primary. Child epochs are read only from child-owned history, never an inherited ancestor. This metadata does not add model-visible prompt text or create a resumable child lifecycle.
45
+
46
+ ## Legacy exact-route calibration
47
+
3
48
  DSMM calibrates only exact verified routes while deepwork mode or a selected DSMM preset is in scope:
4
49
 
5
50
  | Route | Calibration settings | Default |
@@ -11,6 +56,6 @@ The Flash model ID is `deepseek-flash` (catalog name `DeepSeek-V41-Flash`), not
11
56
 
12
57
  `off` leaves the request unchanged. `auto` fills an omitted reasoning effort while preserving an explicit upstream effort. `strict` may replace an upstream effort only when configured and when the final route's `llm.resolveModelInfo` advertises a permitted value. The chosen effort is `max → high → valid default → unchanged` for a max-designated role; otherwise it is `desired → valid default → unchanged`. No effort is invented when the model has no reasoning metadata. The provider and host retain temperature and tool/reasoning-content serialization ownership.
13
58
 
14
- The selected preset comes from the latest valid selection event or session header. A role-specific child has its own persona and tool filter but inherits the parent preset identity and route; a role label alone cannot trigger external-model routing or prove heterogeneity. DSMM's built-in role tools keep native per-call model selection off so a standing Web preset cannot remount tools inside a restricted child scope; an explicitly configured separate host tool must preserve that same safety boundary when selecting a different model. Runtime recovery chooses any final route before this calibration middleware evaluates it.
59
+ The selected preset comes from the latest valid selection event or session header. Without an explicit role policy, native children retain normal model inheritance; a role label alone cannot prove heterogeneity. The max-to-high negotiation above applies only to legacy calibration, never to an explicit role effort. Runtime recovery chooses any final route before calibration evaluates it.
15
60
 
16
61
  The capability-failure warning is sanitized to route and desired effort; it includes no prompt, credentials, response body or request headers. The actual persisted request header, not an outer middleware probe's earlier snapshot, is authoritative for the resolved effort.
package/docs/releasing.md CHANGED
@@ -1,4 +1,4 @@
1
- # DSMM 0.1.0 Release and Rollback
1
+ # DSMM 0.1.1 Release and Rollback
2
2
 
3
3
  ## Preflight
4
4
 
@@ -24,23 +24,25 @@ The DSMM test, build, checker, pack, and Docker checks cover the package surface
24
24
 
25
25
  The first scoped package is `@dsmm/dsmm@0.1.0`, with the distinct tag `dsmm-scoped-v0.1.0`. The prior `dsmm-v0.1.0` GitHub release remains immutable; its unscoped npm publication was rejected by the registry's package-name similarity policy. Do not rename or replace that old release's artifacts. Publication requires explicit authorization; the root release workflow has no DSMM lane. The authorized first-release bootstrap uses the maintainer's authenticated npm account with access to the `dsmm` organization to publish the reviewed tarball. npm Trusted Publishing is a future CI option, not an authentication claim for this bootstrap. Release authorization covers normal commit, push, tag, npm publication and GitHub Release steps for this scoped identity only; it does not authorize rewriting existing publications or adding unrelated release lanes.
26
26
 
27
- Pack once from the tested committed checkout, then freeze `dsmm-dsmm-0.1.0.tgz`. Run real Flash verification against this exact file and require its receipt's `packedSha256` to match the frozen artifact SHA256. Rehash before publication; never repack after that test. Publish with `npm publish <reviewed-dsmm-dsmm-0.1.0.tgz> --access public --registry=https://registry.npmjs.org/`, and attach the same tarball plus `SHA256SUMS.txt` to the new GitHub Release. Record the tag's peeled commit, npm integrity and downloaded asset checksums. A DSMM release is complete only when these identities agree and a fresh registry-installed profile loads successfully; the root ocmm completion checker does not cover DSMM.
27
+ The authorized follow-up feature version is `@dsmm/dsmm@0.1.1`, tag `dsmm-scoped-v0.1.1`. Keep both 0.1.0 identities intact. Before its publication, additionally verify direct/child role routes, exact efforts, native host-first fallback ordering, read-only routed children, and real configured gateway acceptance; an inherited-Flash smoke alone cannot prove the new role configuration.
28
+
29
+ Pack once from the tested committed checkout, then freeze `dsmm-dsmm-0.1.1.tgz`. Run real Flash and role-routing verification against this exact file and require each receipt's `packedSha256` to match the frozen artifact SHA256. Rehash before publication; never repack after that test. Publish with `npm publish <reviewed-dsmm-dsmm-0.1.1.tgz> --access public --registry=https://registry.npmjs.org/`, and attach the same tarball plus `SHA256SUMS.txt` to the new GitHub Release. Record the tag's peeled commit, npm integrity and downloaded asset checksums. A DSMM release is complete only when these identities agree and a fresh registry-installed profile loads successfully; the root ocmm completion checker does not cover DSMM.
28
30
 
29
31
  Treat both identities as immutable: never overwrite an npm version and never move, delete, or recreate an immutable tag. Readiness documentation and a local tarball do not authorize a publish.
30
32
 
31
33
  ## Post-publication verification
32
34
 
33
- After an authorized publication, use a fresh isolated `DSH_HOME` and registry install the exact `@dsmm/dsmm@0.1.0` version into a new profile process. Initialize the headless profile first. Check the plugin list and `--dump-config` from that profile, then use available host adapter status where the host exposes it; `/deepwork` and `/dsmm-status` are not headless task text. Confirm scoped root and `@dsmm/dsmm/preset-skills` exports resolve from the installed package while the Loader settings row remains `id: dsmm`.
35
+ After an authorized publication, use a fresh isolated `DSH_HOME` and registry install the exact `@dsmm/dsmm@0.1.1` version into a new profile process. Initialize the headless profile first. Check the plugin list and `--dump-config` from that profile, then use available host adapter status where the host exposes it; `/deepwork` and `/dsmm-status` are not headless task text. Confirm scoped root and `@dsmm/dsmm/preset-skills` exports resolve from the installed package while the Loader settings row remains `id: dsmm`.
34
36
 
35
37
  Record the package integrity reported by the registry alongside the version, tarball identity, profile name, and verification time. The evidence must show that the installed package resolves from the registry rather than the working tree.
36
38
 
37
39
  ```powershell
38
- $env:DSH_HOME = "$env:TEMP\dsmm-0.1.0-verify"
39
- dsh --profile dsmm-0.1.0-verify --from-default-profile headless --dump-config
40
- dsh plugin --profile dsmm-0.1.0-verify add @dsmm/dsmm@0.1.0
41
- dsh plugin --profile dsmm-0.1.0-verify list
42
- dsh --profile dsmm-0.1.0-verify --dump-config
43
- npm view @dsmm/dsmm@0.1.0 dist.integrity --registry "https://registry.npmjs.org/"
40
+ $env:DSH_HOME = "$env:TEMP\dsmm-0.1.1-verify"
41
+ dsh --profile dsmm-0.1.1-verify --from-default-profile headless --dump-config
42
+ dsh plugin --profile dsmm-0.1.1-verify add @dsmm/dsmm@0.1.1
43
+ dsh plugin --profile dsmm-0.1.1-verify list
44
+ dsh --profile dsmm-0.1.1-verify --dump-config
45
+ npm view @dsmm/dsmm@0.1.1 dist.integrity --registry "https://registry.npmjs.org/"
44
46
  ```
45
47
 
46
48
  ## Rollback
package/docs/roadmap.md CHANGED
@@ -186,7 +186,7 @@ Expose dsmm settings ergonomically in dsh web-compatible surfaces while keeping
186
186
 
187
187
  ## v1.0 — Stable dsmm release
188
188
 
189
- Status: initial package release selected as dsmm 0.1.0; the v1.0 stable milestone remains future work.
189
+ 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.
190
190
 
191
191
  ### Goal
192
192
 
@@ -19,6 +19,14 @@ runtimeRecovery:
19
19
 
20
20
  `maxFallbackAttempts` and `idleContinuation.maxContinuations` are finite integer caps floored and clamped to `0..10`. An empty `fallbackRoutes` list is valid and supplies no provider/model fallback. When runtime recovery is disabled (`enabled` is false), recovery is isolated: it does not disable or alter DSMM prompts, skills, guards, LSP, or model routing.
21
21
 
22
+ ## Role-specific chains (0.1.1)
23
+
24
+ `roleRouting.<role>.fallbackRoutes` uses the same route shape, with optional exact native `reasoningEffort`. The existing `runtimeRecovery.enabled` gate is required for both role and global fallback; configuring a primary or a chain does not implicitly enable recovery or idle continuation.
25
+
26
+ 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.
27
+
28
+ To migrate only explicit ocmm role chains, set `runtimeRecovery.enabled:true`, keep its global `fallbackRoutes:[]`, and leave `idleContinuation.enabled:false`. This deliberately enables role fallback without enabling a generic model chain or autonomous continuation. Provider retry remains host-owned.
29
+
22
30
  ## Host retry and fallback routes
23
31
 
24
32
  The host `agent/request-error` decision wins by identity. DSMM calls downstream first and acts only after the host declines to retry. It classifies failures using exact integer status membership and lowercased exact code membership only; it performs no message parsing or provider-message classification.
@@ -29,9 +37,9 @@ For a host-declined, retryable failure, the failed provider must match the lates
29
37
 
30
38
  ## Request ordering
31
39
 
32
- The default recovery `agent/request` listener is downstream of the prepend model routing listener. It first receives the downstream request configuration, then applies a matching pending fallback route and removes stale adapter-owned `reasoningEffort`. All other downstream fields are preserved.
40
+ 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.
33
41
 
34
- The outer model routing listener sees the final route. It calibrates reasoning only for a supported exact V4 Pro or native V41 Flash route; a fallback does not broaden the existing matches. A route change removes stale adapter-owned reasoning effort; DSMM does not set temperature or create a second capability registry, and the final adapter remains responsible for supported call parameters.
42
+ 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.
35
43
 
36
44
  Duplicate failure delivery cannot select a second pending fallback. Closed or superseded turn/step boundaries, aborted signals, and expired pending routes are ignored. HTTP 402 requires explicit membership in `retryOnStatusCodes`; generic retry-code membership cannot silently authorize a paid-route change. No real billing/rate-limit error is manufactured for testing.
37
45
 
@@ -38,6 +38,8 @@ Risk-based behavior scales discovery, planning, and review to uncertainty and in
38
38
 
39
39
  ## Other settings
40
40
 
41
+ `roleRouting` defaults to an empty restart-scoped map. Each canonical role accepts an optional fixed `primary` and an optional ordered `fallbackRoutes` list of `{provider, model, reasoningEffort?}`. It is separate from the boolean `roles` enable map. Unknown role keys and malformed explicit routes fail closed; omitted chains and explicit empty chains have different meanings. See [model routing](model-routing.md) and [runtime recovery](runtime-recovery.md).
42
+
41
43
  The public schema and exported `DEFAULT_DSMM_SETTINGS` are the complete defaults. Seven core skill toggles and all twelve role toggles default on; effective application is scoped to active mode or a selected DSMM role, not global task policy. Managed preset-directory materialization remains off by default and is an export facility rather than native discovery.
42
44
 
43
45
  Existing `deepseekV4ProCalibration`, `deepseekV4ProDefaultReasoningEffort`, and `deepseekV4ProMaxReasoningPresets` remain compatible. Flash has independent corresponding `deepseekFlash*` settings; calibration modes are off/auto/strict. Auto preserves explicit effort, strict chooses supported policy effort, and unsupported capabilities never justify guessed parameters.
@@ -49,3 +51,5 @@ Guard scope defaults to `deepwork-or-dsmm-agent`; shell safety and helpers remai
49
51
  The snapshot reports `mode`, `route`, `calibration`, `runtimeRecovery`, and `effectiveSettings`. Route flags distinguish exact V4 Pro and V41 Flash matches. Desired policy effort is not a claim that an adapter advertised or applied it.
50
52
 
51
53
  Status does not perform capability/network queries, expose credentials or provider errors, or report process-local pending retries. Model calibration is enforced in the actual request waterfall, not by status or prompt text.
54
+
55
+ Configured role policy/chain and the actual persisted current route are distinct facts. The normalized settings snapshot defensively copies nested role routes and lists; configuration presence is not a claim of successful provider authentication or a completed fallback.
@@ -1,13 +1,21 @@
1
+ import type { DsmmRoleId } from "./roles.js";
2
+ export interface DsmmRolePolicyEventData {
3
+ version: 1;
4
+ role: DsmmRoleId;
5
+ policy: string | null;
6
+ }
1
7
  declare module "@deepseek-ai/dsh-session/types" {
2
8
  interface SessionEventMap {
3
9
  "deepwork/mode": {
4
10
  active: boolean;
5
11
  };
12
+ "dsmm/role-policy": DsmmRolePolicyEventData;
6
13
  }
7
14
  }
8
15
  export interface DeepworkSessionEventMap {
9
16
  "deepwork/mode": {
10
17
  active: boolean;
11
18
  };
19
+ "dsmm/role-policy": DsmmRolePolicyEventData;
12
20
  }
13
21
  //# sourceMappingURL=dsh-events.d.ts.map
@@ -18,6 +18,7 @@ export interface DshSessionHeader {
18
18
  origin?: string;
19
19
  }
20
20
  export interface DshSession {
21
+ inheritedEventCount?: number;
21
22
  events?: readonly DshSessionEvent[];
22
23
  snapshotEvents?(): readonly DshSessionEvent[];
23
24
  header?: DshSessionHeader;
@@ -25,12 +26,14 @@ export interface DshSession {
25
26
  append(type: "deepwork/mode", payload: {
26
27
  active: boolean;
27
28
  }): unknown | Promise<unknown>;
29
+ append(type: "dsmm/role-policy", payload: import("./dsh-events.js").DsmmRolePolicyEventData): unknown | Promise<unknown>;
28
30
  }
29
31
  export interface DshAgent {
30
32
  session: DshSession;
31
33
  options?: {
32
34
  provider?: string;
33
35
  model?: string;
36
+ reasoningEffort?: string;
34
37
  };
35
38
  steer?(message: unknown): unknown | Promise<unknown>;
36
39
  inject?(message: unknown): unknown | Promise<unknown>;
@@ -277,6 +280,7 @@ export interface PreStepDecision {
277
280
  [key: string]: unknown;
278
281
  }
279
282
  export interface DshContext {
283
+ subagents?: import("./role-providers.js").DsmmSubagentRegistry;
280
284
  settings?: DshSettingsRegistry;
281
285
  systemPrompt?: DshSystemPromptRegistry;
282
286
  skills?: DshSkillRegistry;
package/lib/index.d.ts CHANGED
@@ -18,13 +18,15 @@ export type { DeepseekReasoningEffort } from "./model-routing.js";
18
18
  export { classifyRecoveryFailure, foldAttemptedRecoveryRoutes, foldDurableRecoveryWork, selectFallbackRoute } from "./recovery-policy.js";
19
19
  export type { DurableRecoveryWork, RecoveryFailureDecision } from "./recovery-policy.js";
20
20
  export { registerRuntimeRecovery } from "./runtime-recovery.js";
21
- export { resolveSelectedAgentPreset } from "./session-scope.js";
21
+ export { childOwnedSessionEvents, resolveEffectiveDsmmRole, resolveSelectedAgentPreset } from "./session-scope.js";
22
+ export { roleFromProviderName, roleProviderName, registerRoleProviders } from "./role-providers.js";
23
+ export { effectiveRoleFallbackRoutes } from "./role-routing.js";
22
24
  export { DSMM_STATUS_COMMAND, registerDsmmStatusCommand } from "./commands.js";
23
25
  export { DSMM_STATUS_VERSION, createDsmmStatusSnapshot, formatDsmmStatus } from "./status.js";
24
26
  export type { DsmmStatusSnapshot } from "./status.js";
25
27
  export type { AgentRequestErrorFrame, AgentRequestFrame, AgentTurnStoppingFrame, DshEpochHeader, DshGoalChangeEventData, DshGoalSnapshot, DshLlmCallConfig, DshLlmFailure, DshModelReasoningInfo, DshReasoningEffortInfo, DshRequestErrorAction, DshRequestHeaderEventData, DshResolvedModelInfo, DshStepBoundaryEventData, DshTodoItem, DshTodoWriteEventData } from "./dsh-types.js";
26
- export { DSMM_SKILL_NAMES, DEFAULT_DSMM_SETTINGS, MVP_SKILL_NAMES, isRoleEnabled, resolveConfig, registerSettings } from "./settings.js";
27
- export type { DeepseekCalibration, DeepseekDefaultReasoningEffort, DsmmFinalReviewPolicy, DsmmGitWritePolicy, DsmmGuardScope, DsmmGuardSettings, DsmmPluginConfig, DsmmRecoveryRoute, DsmmRuntimeRecoverySettings, DsmmSettings, DsmmSkillName, DsmmWorkflowSettings, MvpSkillName } from "./settings.js";
28
+ export { DSMM_SKILL_NAMES, DEFAULT_DSMM_SETTINGS, MVP_SKILL_NAMES, isRoleEnabled, resolveConfig, resolveRoleRouting, registerSettings } from "./settings.js";
29
+ export type { DeepseekCalibration, DeepseekDefaultReasoningEffort, DsmmFinalReviewPolicy, DsmmGitWritePolicy, DsmmGuardScope, DsmmGuardSettings, DsmmPluginConfig, DsmmModelRoute, DsmmRoleRoutingConfig, DsmmRoleRouting, DsmmRecoveryRoute, DsmmRuntimeRecoverySettings, DsmmSettings, DsmmSkillName, DsmmWorkflowSettings, MvpSkillName } from "./settings.js";
28
30
  export { DEEPWORK_MODE_EVENT, DeepworkModeController, hasOpenTurn, isDeepworkActive } from "./state.js";
29
31
  export declare function apply(ctx: DshContext, config?: Config): void;
30
32
  export default apply;
package/lib/index.js CHANGED
@@ -6,6 +6,7 @@ import { registerRuntimeRecovery } from "./runtime-recovery.js";
6
6
  import { reconcileRolePresets, resolveManagedPresetRoot } from "./preset-materializer.js";
7
7
  import { registerHeadlessRoleTools } from "./role-subagents.js";
8
8
  import { registerRolePresets } from "./preset-registry.js";
9
+ import { registerRoleProviders } from "./role-providers.js";
9
10
  import { DSMM_CONFIG_SCHEMA, registerSettings } from "./settings.js";
10
11
  import { DeepworkModeController } from "./state.js";
11
12
  export const name = "dsmm";
@@ -19,10 +20,12 @@ export { classifyModelFamily } from "./model-family.js";
19
20
  export { desiredDeepseekEffort, isDeepseekV4ProRoute, registerModelRouting, selectAdvertisedEffort } from "./model-routing.js";
20
21
  export { classifyRecoveryFailure, foldAttemptedRecoveryRoutes, foldDurableRecoveryWork, selectFallbackRoute } from "./recovery-policy.js";
21
22
  export { registerRuntimeRecovery } from "./runtime-recovery.js";
22
- export { resolveSelectedAgentPreset } from "./session-scope.js";
23
+ export { childOwnedSessionEvents, resolveEffectiveDsmmRole, resolveSelectedAgentPreset } from "./session-scope.js";
24
+ export { roleFromProviderName, roleProviderName, registerRoleProviders } from "./role-providers.js";
25
+ export { effectiveRoleFallbackRoutes } from "./role-routing.js";
23
26
  export { DSMM_STATUS_COMMAND, registerDsmmStatusCommand } from "./commands.js";
24
27
  export { DSMM_STATUS_VERSION, createDsmmStatusSnapshot, formatDsmmStatus } from "./status.js";
25
- export { DSMM_SKILL_NAMES, DEFAULT_DSMM_SETTINGS, MVP_SKILL_NAMES, isRoleEnabled, resolveConfig, registerSettings } from "./settings.js";
28
+ export { DSMM_SKILL_NAMES, DEFAULT_DSMM_SETTINGS, MVP_SKILL_NAMES, isRoleEnabled, resolveConfig, resolveRoleRouting, registerSettings } from "./settings.js";
26
29
  export { DEEPWORK_MODE_EVENT, DeepworkModeController, hasOpenTurn, isDeepworkActive } from "./state.js";
27
30
  export function apply(ctx, config = {}) {
28
31
  const controller = new DeepworkModeController(ctx);
@@ -37,6 +40,7 @@ export function apply(ctx, config = {}) {
37
40
  readyCtx.inject(["commands"], installCommands);
38
41
  else
39
42
  installCommands(readyCtx);
43
+ registerRoleProviders(readyCtx, getReadySettings);
40
44
  registerRolePresets(readyCtx, getReadySettings);
41
45
  const settings = getReadySettings();
42
46
  const root = resolveManagedPresetRoot(settings);