@dsmm/dsmm 0.1.5 → 0.1.6

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,9 +2,9 @@
2
2
 
3
3
  Deepwork adapts ocmm's deepwork workflow to DeepSeek Harness. Its package remains `@dsmm/dsmm`: 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 current `0.1.5` source contract adds structured native route controls, independently selected per-session profiles and two per-role route strategies, with human-facing **Deepwork** branding and **DW Role** display names. 0.1.5 publication and Desktop acceptance remain pending. Older tags/packages/accepted archives stay immutable, including 0.1.4's separately controlled published-origin continuation. Package, configuration, tool 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. The current `0.1.6` source contract preserves native root-model authority and adds a compact current-session profile selector alongside structured native route controls, independent session profiles and delegated-role route strategies. Human-facing names remain **Deepwork** and **DW Role**. 0.1.6 publication and Desktop acceptance remain pending. The completed 0.1.5 publication is immutable historical evidence, not proof for 0.1.6; older identities, including 0.1.4's separately controlled published-origin continuation, stay unchanged. Package, configuration, tool and role IDs retain the `dsmm` namespace.
6
6
 
7
- The immutable `dsmm-scoped-v0.1.3` tag remains at `2bdea4b`. Its CI run `37235817488` failed before packing or publication because pnpm 11 ignored the required esbuild/koffi build scripts. The later 0.1.4 origin published accepted bytes but its original verification saw a registry 404; its fixed-origin continuation preserves that failed original CI history. The successor target is 0.1.5; none of these facts authorizes rewriting earlier identities.
7
+ The immutable `dsmm-scoped-v0.1.3` tag remains at `2bdea4b`. Its CI run `37235817488` failed before packing or publication because pnpm 11 ignored the required esbuild/koffi build scripts. The later 0.1.4 origin published accepted bytes but its original verification saw a registry 404; its completed fixed-origin continuation preserves that failed original CI history. The stopped 0.1.2 frozen tag/artifact and draft Release remain untouched and unpublished. The successor target is 0.1.6; none of these facts authorizes rewriting earlier identities.
8
8
 
9
9
  ## Current functionality
10
10
 
@@ -12,8 +12,9 @@ The immutable `dsmm-scoped-v0.1.3` tag remains at `2bdea4b`. Its CI run `3723581
12
12
  - 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.
13
13
  - Twelve native roles displayed as `DW …`, with enabled DW Orchestrator, DW Builder, and DW Planner eligible for the native root Agent preset selector. The other nine roles remain auxiliary delegation roles; disabled Builder is absent from both selector and child tools. Read-only constraints are enforced through native tool composition. Models remain user-selected; Oracle names alone do not guarantee model heterogeneity.
14
14
  - 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.
15
- - Role provider/model/exact-effort controls, ordered candidates, independent per-role `startup-lock` (default) or explicit `rate-limit-fallback`, and finite correlated no-output-safe retries. Supported explicit native overrides survive for trusted live, owned, zero-prefix one-shot children. No new model-visible model-selection permission is added; exact configured efforts are not downgraded.
15
+ - Delegated-role provider/model/exact-effort controls, ordered candidates, independent per-role `startup-lock` (default) or explicit `rate-limit-fallback`, and finite correlated no-output-safe retries. Ordinary roots keep their native initial model and exact effort, not a profile-role primary; explicit native model choices remain authoritative across later turns, profile reapply and cold resume. Supported explicit overrides survive for trusted live, owned, zero-prefix one-shot children. No new model-visible model-selection permission is added; exact configured efforts are not downgraded.
16
16
  - Native Settings → Deepwork Profiles (`Deepwork 配置档`) with structured role/retry controls and byte-preserving Advanced JSONC. Global default and current-session Apply are distinct; CAS-protected sidecars pin independent immutable revisions and admission epochs. Save alone activates neither scope.
17
+ - Compact native session-header profile selector: normal switching keeps the current model. The separate explicit “Switch and use profile model” choice invokes native model selection and saves its native default, like the Models tab. A committed profile remains applied if model selection is unavailable or unconfirmed; the UI reports the separate model result and preserves newer native choices.
17
18
  - Scoped shell/Git/plan/question/todo guards and separately opt-in bounded idle continuation.
18
19
  - 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.
19
20
 
@@ -25,14 +26,14 @@ Durable session metadata requires explicit deployment-only `sessionPersistence:
25
26
 
26
27
  ## Install and configure
27
28
 
28
- Install the exact registry version after terminal verified publication with `dsh plugin --profile <profile> add @dsmm/dsmm@0.1.5`. For isolated development verification, use a built and packed artifact:
29
+ Install the exact registry version after terminal verified publication with `dsh plugin --profile <profile> add @dsmm/dsmm@0.1.6`. For isolated development verification, use a built and packed artifact:
29
30
 
30
31
  ```powershell
31
32
  pnpm --dir dsmm build
32
33
  pnpm --dir dsmm pack --pack-destination <temporary-artifact-directory>
33
34
  $env:DSH_HOME = "<disposable-test-home>"
34
35
  dsh --profile <profile> --from-default-profile headless --dump-config
35
- dsh plugin --profile <profile> add <absolute-path-to-dsmm-dsmm-0.1.5.tgz>
36
+ dsh plugin --profile <profile> add <absolute-path-to-dsmm-dsmm-0.1.6.tgz>
36
37
  dsh --profile <profile> --dump-config
37
38
  ```
38
39
 
@@ -54,9 +55,9 @@ This runtime-baseline example is not the full durable-persistence patch. Native
54
55
 
55
56
  Do not copy the old `settings.yaml` namespace or preset-discovery roots into the new host. Runtime drafts instead live at `<profileContext.dir>/dsmm-profiles/<id>.jsonc`; there is no embedded profiles object in plugin config. See [runtime profiles](docs/profiles.md), [settings/status](docs/settings-status.md), and [agent roles](docs/agent-presets.md).
56
57
 
57
- The [historical 0.1.1 migration guide](docs/migration-from-ocmm.md) explains the earlier ocmm/DSH adapter migration; use the current profile and upgrade guides above for 0.1.5 behavior.
58
+ The [historical 0.1.1 migration guide](docs/migration-from-ocmm.md) explains the earlier ocmm/DSH adapter migration; use the current profile and upgrade guides above for 0.1.6 behavior.
58
59
 
59
- For a role-specific model, configure `roleRouting.dsmm-reviewer.primary` with native `provider`, `model`, and optional `reasoningEffort`, then choose its strategy/retry policy where needed. There are no built-in provider routes or API keys. See [model routing](docs/model-routing.md) and [runtime recovery](docs/runtime-recovery.md) for admission, bounded RATE_LIMIT rollover and migration from old generic automatic fallback.
60
+ For a delegated-role model, configure `roleRouting.dsmm-reviewer.primary` with native `provider`, `model`, and optional `reasoningEffort`, then choose its strategy/retry policy where needed. These policies do not silently replace the ordinary root's native model; using a profile's main-model choice is an explicit user action. There are no built-in provider routes or API keys. See [model routing](docs/model-routing.md) and [runtime recovery](docs/runtime-recovery.md) for admission, bounded RATE_LIMIT rollover and migration from old generic automatic fallback.
60
61
 
61
62
  Without active mode or a selected DSMM Agent preset, DSMM workflow prompts and default-scoped guards do not apply. Applying a runtime profile does not select a role. Global Apply leaves existing live Agents, including blank Agents, unchanged. A separate current-session Apply reserves native idle maintenance and changes only that root's admission epoch; old children stay old, later native children inherit the new snapshot. Cold resume honors an explicit session sidecar, otherwise the current global default. Headless task text is not a slash-command adapter.
62
63
 
@@ -69,7 +70,7 @@ pnpm --dir dsmm check:release
69
70
  pnpm --dir dsmm smoke:docker
70
71
  ```
71
72
 
72
- A separately authorized credentialed, packed real-model diagnostic is also available from this checkout. It is **not** the independent 0.1.5 Docker/UI release gate; that gate must not copy credentials, sessions, Desktop configuration or browser authentication:
73
+ A separately authorized credentialed, packed real-model diagnostic is also available from this checkout. It is **not** the independent 0.1.6 Docker/UI release gate; that gate must not copy credentials, sessions, Desktop configuration or browser authentication:
73
74
 
74
75
  ```powershell
75
76
  node dsmm/scripts/live-dsh-smoke.mjs --runtime <npm-prefix-with-pinned-dsh> --package <packed-dsmm.tgz> --provider deepseek-account --credentials <existing-dsh-credentials-file> --receipt <sanitized-receipt.json>
@@ -79,4 +80,4 @@ Add `--delegate` to verify the actual `dsmm_reviewer` child persona, inherited F
79
80
 
80
81
  The test copies only native account records into a temporary home, verifies a real read/write/model round-trip, checks the exact route and DSMM prompt, and removes temporary credentials and sessions. It does not print reasoning or credentials, log into a browser, modify the original credential file, or silently use a different model. API-key testing uses `--provider deepseek-official` and an existing `DEEPSEEK_API_KEY` environment variable.
81
82
 
82
- These commands are verification procedures, not a claim they have passed for the final 0.1.5 artifact. The dedicated DSMM workflow builds a fresh CI tarball with pnpm, Docker-gates its exact bytes, and publishes through OIDC with genuine provenance; the old 0.1.2 bootstrap is not used. See [compatibility](docs/compatibility.md) and [release policy](docs/releasing.md) for terminal publication and later Desktop evidence boundaries.
83
+ These commands are verification procedures, not a claim they have passed for the final 0.1.6 artifact. The dedicated DSMM workflow builds a fresh CI tarball with pnpm, Docker-gates its exact bytes, and publishes through OIDC with genuine provenance; the old 0.1.2 bootstrap is not used. See [compatibility](docs/compatibility.md) and [release policy](docs/releasing.md) for terminal publication and later Desktop evidence boundaries.
@@ -39,15 +39,17 @@
39
39
  enabled: false
40
40
  ```
41
41
 
42
- A `primary` supplies the default role route for directly selected roots and active top-level deepwork sessions as orchestrator when no DSMM preset is selected. An explicit public native model selection is higher priority: the user's exact provider/model/effort wins, including an effort-only change, subsequent turns and cold resume. Ordinary profile apply changes defaults, strategy and admission epoch without silently erasing that native choice. DSMM captures the typed native intent at prompt-assembly start; a concurrent later choice belongs to the next assembly, not the already assembled frame. A fresh same-value selection still fences an older retry reservation.
42
+ An ordinary top-level Agent always uses the native DSH model tab's assembled provider/model/effort, including its implicit default before the first request. Enabling Deepwork, selecting a role preset, loading a profile or switching a profile normally does not replace that selection. Root requests do not replay historical model choices, calibrate the effort or automatically switch channels/models. Bounded, positively no-output-safe rate-limit retries stay on the same native route. This applies to every top-level role, not only Orchestrator.
43
+
44
+ `primary` supplies child-role defaults and is also an advisory model for an explicit **switch profile and use its model** action. That opt-in action submits through native `session/selectModel`; native projection and the actual picker reflect the accepted result. A later model-tab choice remains authoritative. Native model selection has its ordinary background-default persistence behavior; editing profile fields, saving drafts and normal profile switches never call that endpoint. DSMM captures native intent only to fence old retry work; a concurrent later choice belongs to the next assembly, not the already assembled frame.
43
45
 
44
46
  For a trusted native one-shot role alias, `primary` is also a default rather than an unconditional overwrite of explicit native child options. That live-child exception requires genuine native parent ownership and zero inherited event prefix. Root, cold/unowned child and parent-seeded fork requests cannot claim that exception. A parent's manual native choice does not replace a configured child's own role primary; genuine child-local authority remains distinct. 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. Auxiliary role policies apply through delegation, not additional root presets.
45
47
 
46
48
  Settings resolve from built-in defaults, then deployment configuration, then the admitted immutable runtime revision. Global profile apply affects newly created unscoped Agents only; explicit idle current-session apply creates a new epoch for that root and later children. Existing children retain their previous snapshot. Cold resume uses a committed session sidecar when present, otherwise the current global default. Changing a draft alone changes none of these policies; see [profiles](profiles.md). Explicit empty fallback lists remain empty instead of inheriting an omitted global chain.
47
49
 
48
- At Agent entry, native preparation chooses the primary or first resolvable configured candidate in order. This does not make a sacrificial request or claim account/network health. Missing catalog rows do not make a custom route unavailable; malformed/unsupported exact efforts remain hard errors. Apply may retain dormant unavailable alternatives when another candidate is admissible. No admissible candidate means a visible no-request refusal, never a silent native baseline.
50
+ For child Agents, native preparation chooses the primary or first resolvable configured candidate in order. This does not make a sacrificial request or claim account/network health. Missing catalog rows do not make a custom route unavailable; malformed/unsupported exact efforts remain hard errors. Apply may retain dormant unavailable alternatives when another candidate is admissible. No admissible child candidate means a visible no-request refusal, never a silent native baseline. An unrelated configured primary cannot block an ordinary root's native chosen model.
49
51
 
50
- `startup-lock` is the default, including old documents with an omitted strategy. Once admitted, it keeps the exact provider/model/effort across turns and bounded `RATE_LIMIT` retries. `rate-limit-fallback` starts identically, but distinct positively no-output-safe rate-limit failures reaching the configured threshold advance the ordered chain within finite switch/delay caps. Per-role overrides inherit only omitted fields from `runtimePolicy`; different roles and sessions never share route locks or counters. Success resets consecutive rate-limit counts. Duplicate errors do not count twice and exhausted chains never wrap to primary.
52
+ For child Agents, `startup-lock` is the default, including old documents with an omitted strategy. Once admitted, it keeps the exact provider/model/effort across turns and bounded `RATE_LIMIT` retries. `rate-limit-fallback` starts identically, but distinct positively no-output-safe rate-limit failures reaching the configured threshold advance the ordered chain within finite switch/delay caps. Per-role overrides inherit only omitted fields from `runtimePolicy`; different roles and sessions never share route locks or counters. Success resets consecutive rate-limit counts. Duplicate errors do not count twice and exhausted chains never wrap to primary. Ordinary roots retain the native model even when a child-role policy specifies fallback switching.
51
53
 
52
54
  Only an exact native `NO_ADAPTER` or adapter-proven `UNKNOWN_MODEL` failure on the first actual request, before any accepted output/tool fragment, may advance a remaining startup candidate. Later generic, transport, authorization, quota, payment, context and cancelled failures do not authorize inferred hopping. Exact rate limit is never startup unavailability. Every automatic retry or switch requires a positively correlated native attempt and its matching live/durable no-output settlement; partial text, reasoning, tool fragments or completed blocks forbid even same-route retries. See [runtime recovery](runtime-recovery.md).
53
55
 
@@ -63,7 +65,7 @@ On DSH 0.2.0-rc.2, durable custom metadata requires explicit deployment-only `se
63
65
 
64
66
  ## Legacy exact-route calibration
65
67
 
66
- DSMM calibrates only exact verified routes while deepwork mode or a selected DSMM preset is in scope:
68
+ DSMM calibrates only child Agents on exact verified routes while deepwork mode or a selected DSMM preset is in scope. Ordinary roots preserve native effort without calibration:
67
69
 
68
70
  | Route | Calibration settings | Default |
69
71
  | --- | --- | --- |
package/docs/profiles.md CHANGED
@@ -72,6 +72,8 @@ Saving validates the draft and preserves edited raw JSONC/comments, but does not
72
72
 
73
73
  **Current-session profile / Apply profile to current session** uses the actual native view's session ID, not the profile being edited or a guessed latest session. It commits only that session's sidecar under a genuine native idle-maintenance reservation. Both the expected sidecar revision and admission epoch must still match. **Pin baseline for current session** writes an explicit baseline choice without changing the global default. Sessionless Settings cannot apply to a session; busy, maintenance-owned, disposed, replaced, child or unauthorized targets refuse visibly. Cold targets are resumed only through native session authority after backend authorization and strict decoding.
74
74
 
75
+ The Conversation header has a compact, directly visible Profile dropdown. Its normal options switch only the session profile and preserve the current native model. A separately labelled opt-in option switches the profile **and uses its configured main model** through DSH's native selection endpoint, so the picker and subsequent request agree. No configured main model or a refused model selection is reported visibly; a successfully committed profile is not falsely rolled back if the separate native model operation fails. Full editing, revisions and policy diagnostics remain in Settings rather than the header.
76
+
75
77
  Save/apply requests use expected revisions. A concurrent UI save or external file edit produces a conflict instead of overwriting later bytes; reread and reconcile. Validation, missing file, revision conflict, lock/IO, authorization, or activation failures must be visible, not reported as success. Invalid/missing/linked files and digest mismatches never silently select another profile or model. Pointer failure retains the prior disk selection and current settings; an unused immutable revision may remain.
76
78
 
77
79
  Storage uses bounded validated content, containment/link checks under a cross-process writer lock, and same-directory atomic replacement. Lock timeouts are errors; stale-looking locks are not stolen. Immutable revision files are never overwritten or hand-edited. Operations accept stable IDs, not arbitrary filesystem paths. Profile summaries do not expose credentials or deployment configuration.
@@ -80,7 +82,7 @@ Storage uses bounded validated content, containment/link checks under a cross-pr
80
82
 
81
83
  Global applying or resetting affects **new unscoped Agents only**. Every existing live Agent, including a blank one, retains its admitted immutable runtime snapshot. An explicit current-session apply is different: a truly idle ordinary root receives a new immutable admission epoch after the durable sidecar commit. Even reapplying the same revision creates a new epoch. Existing children retain their captured old epoch; later genuinely owned native children inherit the new one. Other roots, the global default, completed tools and native persona/tool/skill composition remain unchanged.
82
84
 
83
- Native model selection is separate user intent, not a profile sidecar setting. The exact public native provider/model/effort choice takes priority over the profile's role default, remains on subsequent turns/cold resume, and is not silently cleared by ordinary profile apply. An effort-only or same-value native selection is still fresh intent and fences stale retry work. Parent manual choice does not overwrite a configured child's own role route. Structured profile editing never selects the native/global model default; only the user's native selection endpoint has the host's normal background-default persistence behavior.
85
+ Native model selection is separate user intent, not a profile sidecar setting. Every ordinary top-level request respects the native assembled provider/model/effort, including an implicit default with no prior selection event. Profile primary/defaults and calibration never overwrite it. An effort-only or same-value native selection still fences stale retry work. Parent model choice does not overwrite a configured child's own role route. Structured editing, save, global apply and normal session apply never select the native/global model default. Only the explicit switch-and-use-model option invokes native model selection, with the same background-default persistence behavior as the model tab; later manual model changes remain authoritative.
84
86
 
85
87
  After restart, a session with a committed sidecar admits that exact immutable revision or explicit baseline, even if its draft/global default changed. A session without a sidecar preserves the historical global-current cold-resume behavior; it does not infer a previous profile from lineage/history. Corrupt, missing, linked or digest-mismatched sidecars/revisions fail visibly instead of falling back to baseline. Sidecars add no new session event vocabulary, so stock native history readers remain authoritative. Native clear/compact changes the session identity and does not automatically transfer an old choice.
86
88
 
package/docs/releasing.md CHANGED
@@ -1,10 +1,10 @@
1
- # Deepwork 0.1.5 Release and Rollback
1
+ # Deepwork 0.1.6 Release and Rollback
2
2
 
3
- This is a future procedure for 0.1.5, not a completed-release receipt. The new identities are `@dsmm/dsmm@0.1.5`, tag `dsmm-scoped-v0.1.5`, and `dsmm-dsmm-0.1.5.tgz`. Deepwork/DW display names do not rename package or protocol IDs. Existing 0.1.1 and older releases remain immutable. The stopped 0.1.2 tag, frozen artifact and draft Release remain untouched and unpublished: do not dispatch its bootstrap publisher, finalize its draft, overwrite its bytes or move/delete/recreate its tag.
3
+ This is a future procedure for 0.1.6, not a completed-release receipt. The new identities are `@dsmm/dsmm@0.1.6`, tag `dsmm-scoped-v0.1.6`, and `dsmm-dsmm-0.1.6.tgz`. Deepwork/DW display names do not rename package or protocol IDs. Existing 0.1.1 and older releases remain immutable. The stopped 0.1.2 tag, frozen artifact and draft Release remain untouched and unpublished: do not dispatch its bootstrap publisher, finalize its draft, overwrite its bytes or move/delete/recreate its tag.
4
4
 
5
- The `dsmm-scoped-v0.1.3` tag at `2bdea4b` is immutable too. Run `37235817488` failed **before pack/publish** because pnpm 11 ignored esbuild/koffi build scripts. Preserve that tag and its historical plan; do not reroute it to the successor. 0.1.5 must obtain its own fresh source, clean Linux build, packed bytes and receipt.
5
+ The `dsmm-scoped-v0.1.3` tag at `2bdea4b` is immutable too. Run `37235817488` failed **before pack/publish** because pnpm 11 ignored esbuild/koffi build scripts. Preserve that tag and its historical plan; do not reroute it to the successor. 0.1.6 must obtain its own fresh source, clean Linux build, packed bytes and receipt.
6
6
 
7
- The completed 0.1.4 publication and its separately authorized continuation remain historical evidence: original run `37240470628/1` and continuation `37243216939/1` are not 0.1.5 proof. Their exact fourteen UI checks and nine installed compiled-file checks remain unchanged.
7
+ The completed 0.1.4 publication and its separately authorized continuation remain historical evidence: original run `37240470628/1` and continuation `37243216939/1` are not 0.1.6 proof. Their exact fourteen UI checks and nine installed compiled-file checks remain unchanged. The completed 0.1.5 publication, immutable package/tag/accepted bytes and its own terminal completion evidence also remain historical; do not republish it or relabel its receipt as 0.1.6 acceptance. New proof requirements are version-gated, never retroactively applied to either completed identity.
8
8
 
9
9
  The mandatory sequence is **fresh CI pack → independent frozen-byte Docker acceptance → verified OIDC npm/GitHub publication and terminal completion → authorized official-carrier Desktop rollout**. No global/system DSH, Desktop configuration, account/provider, credential, or real-session writes may occur before terminal verified publication. Local readiness alone does not authorize publication or migration.
10
10
 
@@ -31,11 +31,11 @@ The root typecheck, test and build must pass before committing. Build before gen
31
31
 
32
32
  Use pnpm for actual install/build/test/**pack/publish**. The `npm pack --dry-run --json` above is only the existing read-only, size-rich metadata diagnostic, not release packaging. Do not blindly substitute pnpm's differently shaped preview JSON or fabricate missing size fields. Source-checkout Docker runs are development evidence; final acceptance must use the CI-frozen artifact and expected SHA256 without building or repacking. A checker or successful install is not runtime, UI, publication or Desktop proof.
33
33
 
34
- For 0.1.5, clean Linux install/build verification must exercise the reviewed pnpm `allowBuilds` policy for exactly `esbuild@0.25.12` and `koffi@3.1.1`, with `strictDepBuilds: true`. A cached native binary or pre-existing `lib` tree cannot establish that the ignored-script failure is repaired. This is distinct from the deliberately script-free metadata dry-run above; do not weaken that diagnostic's lifecycle-script protection or approve all dependency scripts.
34
+ For 0.1.6, clean Linux install/build verification must exercise the reviewed pnpm `allowBuilds` policy for exactly `esbuild@0.25.12` and `koffi@3.1.1`, with `strictDepBuilds: true`. A cached native binary or pre-existing `lib` tree cannot establish that the ignored-script failure is repaired. This is distinct from the deliberately script-free metadata dry-run above; do not weaken that diagnostic's lifecycle-script protection or approve all dependency scripts.
35
35
 
36
36
  ## Phase 1: frozen artifact and independent Docker gate
37
37
 
38
- Use the dedicated `.github/workflows/dsmm-release.yml` **future tag path** for the authorized `dsmm-scoped-v0.1.5` push, not the old bootstrap dispatch. Tag/version, peeled source commit, control commit and event identity must agree. CI uses pinned Node 24 / pnpm 11.9.0, checks/builds the exact source, verifies generated assets, and packs **one new actual tarball** with pnpm. Inspect `dsmm-dsmm-0.1.5.tgz`, record its actual size/SHA256/SHA1/SHA512 integrity, and freeze it. Never reuse the old 0.1.2 hash/receipt/artifact.
38
+ Use the dedicated `.github/workflows/dsmm-release.yml` **future tag path** for the authorized `dsmm-scoped-v0.1.6` push, not the old bootstrap dispatch. Tag/version, peeled source commit, control commit and event identity must agree. CI uses pinned Node 24 / pnpm 11.9.0, checks/builds the exact source, verifies generated assets, and packs **one new actual tarball** with pnpm. Inspect `dsmm-dsmm-0.1.6.tgz`, record its actual size/SHA256/SHA1/SHA512 integrity, and freeze it. Never reuse the old 0.1.2 hash/receipt/artifact or any completed successor's bytes.
39
39
 
40
40
  Run the full independent Docker runner with that **explicit artifact path and expected SHA256**, required compiled-UI hook and trusted support files. It must fail closed if required inputs are missing/mismatched and must not build, repack, or silently choose another tarball. The new completed receipt's `packedSha256` must match the fresh frozen file and its run/attempt/source identity. Only these accepted unchanged bytes may proceed to publish.
41
41
 
@@ -51,15 +51,19 @@ Successor acceptance additionally requires the compiled structured editor's nati
51
51
 
52
52
  Actual native `followup/whenIdle` requests must prove primary/first-available startup locks, finite same-route rate-limit exhaustion, threshold-ordered rollover, same-profile/different-role and different-profile isolation, first-request unavailable versus partial/later refusal, and both strategies' partial-text/tool-fragment no-retry fences. Bind each real provider call to its native request header, live attempt ID, matching durable stream and settlement; successful outputs and terminal outcomes must agree. A competing native always-retry handler must remain unused and tools must not replay. The added native model-selection scenario must invoke strict public `session/selectModel`, demonstrate a route different from the Orchestrator profile primary, exact effort-only changes and subsequent-request retention, and validate the final native headers rather than an acknowledgement alone.
53
53
 
54
+ For 0.1.6, ordinary roots are native-owned: their initial provider/model/exact effort remain authoritative even before any explicit model-selection event. Profile-role primary and fallback chains apply to genuinely owned delegated children, not silently to the root. Prove this with actual native request headers before and after explicit model/effort changes, profile reapply and cold resume; retain supported explicit child overrides and native read-only permissions. Startup failure evidence must identify the failed `installProfiles` child through its public parent-fiber ownership of the actual Loader entry, preserve the native failure exit, and observe absent runtime/zero request preparations/tools; never fabricate an outer Loader failure or accept a foreign failed fiber.
55
+
56
+ Exercise the compact current-session header profile selector with a real native Session. Normal profile switching keeps the current model and native model default unchanged. The distinct explicit “Switch and use profile model” action calls native `session/selectModel` after profile commit and has the same native-default persistence consequence as the Models tab. Missing profile primary, unconfirmed model changes or a newer native choice must produce truthful feedback without undoing a committed profile or silently overriding the newer choice. Global-default Apply and draft Save retain their separate scopes. Owned component/endpoint proof does not establish authenticated Desktop or production model-picker interaction; retain explicit nonclaims for any unexercised surface.
57
+
54
58
  Bind the hook and all three support files explicitly: `profile-ui-harness-server.mjs`, `profile-ui-harness-browser.mjs`, and `profile-ui-harness-native.mjs`. The successor receipt's exact check and installed compiled-file inventories are version-gated; historical receipt grammars are not expanded. CI source/pack/publish/installed verification uses Node 24 / pnpm 11.9.0; the independent borrowed Docker runtime uses its recorded Node 22 / pnpm 12.8.1 environment. These are distinct evidence surfaces, not interchangeable build claims.
55
59
 
56
60
  The native component/RPC/storage test uses a supported composition-owned in-process carrier, not an anonymous production route or copied login. It is distinct from authenticated Desktop activation. Preserve sanitized scenario evidence and inspect the full intended diff before parent-owned authorized release operations. If any required scenario fails or the frozen bytes change, stop before publication/global migration.
57
61
 
58
62
  ## Phase 2: authorized immutable publication
59
63
 
60
- Publication requires explicit authorization for the new identity. Recheck `@dsmm/dsmm@0.1.5` and `dsmm-scoped-v0.1.5` are absent. Confirm the one-time npm Trusted Publisher registration for repository `hugefiver/ocmm`, workflow filename `dsmm-release.yml`, with direct publish allowed. If supported setup/MFA is still missing, request that step; do not add a static token fallback or recurring manual release gate. The main ocmm workflow/checker does not cover DSMM: its dedicated workflow and DSMM terminal checker do.
64
+ Publication requires explicit authorization for the new identity. Recheck `@dsmm/dsmm@0.1.6` and `dsmm-scoped-v0.1.6` are absent. Confirm the one-time npm Trusted Publisher registration for repository `hugefiver/ocmm`, workflow filename `dsmm-release.yml`, with direct publish allowed. If supported setup/MFA is still missing, request that step; do not add a static token fallback or recurring manual release gate. The main ocmm workflow/checker does not cover DSMM: its dedicated workflow and DSMM terminal checker do.
61
65
 
62
- The earlier unscoped `dsmm-v0.1.0` GitHub release, scoped 0.1.0 release and scoped 0.1.1 release stay intact. A new-release authorization covers ordinary commit/push/tag/npm/GitHub actions for 0.1.5 only, not rewriting prior publications, the old 0.1.2 draft, app upgrades, global package-manager changes or authentication workarounds.
66
+ The earlier unscoped `dsmm-v0.1.0` GitHub release, scoped 0.1.0 release and scoped 0.1.1 release stay intact. A new-release authorization covers ordinary commit/push/tag/npm/GitHub actions for 0.1.6 only, not rewriting prior publications, the old 0.1.2 draft, app upgrades, global package-manager changes or authentication workarounds. The separately authorized official-carrier DSMM upgrade still waits for terminal completion of this exact new identity.
63
67
 
64
68
  The future publish job revalidates the accepted run/attempt-bound bytes and publishes **that exact tarball with native pnpm**, public npmjs access, lifecycle scripts ignored, OIDC and genuine provenance enabled. Do not forge GitHub identity variables, use the old bootstrap's `provenance=false`, or repack after acceptance. Preserve non-canceling package-wide publication concurrency and least-permission separated jobs. Registry byte/integrity and fresh installed-package verification precede non-overwriting public GitHub finalization with the same tarball and `SHA256SUMS.txt`.
65
69
 
@@ -73,22 +77,22 @@ After the matching workflow terminates, run `scripts/check-dsmm-release-completi
73
77
 
74
78
  ```powershell
75
79
  $env:DSH_HOME = "<fresh-task-owned-verification-home>"
76
- dsh --profile dsmm-0.1.5-verify --from-default-profile headless --dump-config
77
- dsh plugin --profile dsmm-0.1.5-verify add @dsmm/dsmm@0.1.5
78
- dsh plugin --profile dsmm-0.1.5-verify list
79
- dsh --profile dsmm-0.1.5-verify --dump-config
80
- npm view @dsmm/dsmm@0.1.5 dist.integrity --registry "https://registry.npmjs.org/"
80
+ dsh --profile dsmm-0.1.6-verify --from-default-profile headless --dump-config
81
+ dsh plugin --profile dsmm-0.1.6-verify add @dsmm/dsmm@0.1.6
82
+ dsh plugin --profile dsmm-0.1.6-verify list
83
+ dsh --profile dsmm-0.1.6-verify --dump-config
84
+ npm view @dsmm/dsmm@0.1.6 dist.integrity --registry "https://registry.npmjs.org/"
81
85
  ```
82
86
 
83
87
  ## Phase 3: official installed-carrier Desktop rollout
84
88
 
85
- Only after terminal 0.1.5 completion may authorized global migration begin. First perform the separately bounded isolated real-model/tool check against the exact registry package. Coordinate a fully quit Desktop, recheck concurrent edits, and preserve a recoverable local snapshot of only task-changed package-manager/DSMM-owned files—not the entire credential or session store. Use the exact installed official Desktop carrier to install `@dsmm/dsmm@0.1.5`. It may manage packages while the app is quit; it may **not** boot/dump the reserved Desktop profile. Never substitute standalone npm DSH, a renamed/copied profile, checkout imports, `app.asar` patches, global PATH/pnpm changes, or auth bypasses.
89
+ Only after terminal 0.1.6 completion may authorized global migration begin. First perform the separately bounded isolated real-model/tool check against the exact registry package. Coordinate a fully quit Desktop, recheck concurrent edits, and preserve a recoverable local snapshot of only task-changed package-manager/DSMM-owned files—not the entire credential or session store. Use the exact installed official Desktop carrier to install `@dsmm/dsmm@0.1.6`. It may manage packages while the app is quit; it may **not** boot/dump the reserved Desktop profile. Never substitute standalone npm DSH, a renamed/copied profile, checkout imports, `app.asar` patches, global PATH/pnpm changes, or auth bypasses.
86
90
 
87
91
  Preserve base/web bundles, deployment roles/skills, all configured policies, disabled Builder, active mode, provider/model catalog, account state and UI preferences. Saving supported baseline settings as a runtime draft is explicit and reversible; it does not change structural configuration. Disclose committed-sidecar versus absent-sidecar cold resume and the unknown removed auxiliary-root ID limitation in [compatibility](compatibility.md) before rollout. Do not silently substitute personas or delete history.
88
92
 
89
93
  Any old unmarked-log repair remains a separately authorized exact private target, native-lease-held, same-directory backup-first, metadata-only operation with concurrency checks and actual installed-reader parity. The naming release does not itself authorize session edits, and an old observed digest is not permission to overwrite newer history.
90
94
 
91
- After a supported restart, verify actual Desktop package 0.1.5 activation, native Deepwork metadata, healthy selectable DW root names, retained auxiliary delegation/read-only denial, and actual Deepwork Profiles UI create/edit/save/apply/reset with independent file/pointer bytes. Verify live even-blank Agents remain unchanged on apply and current pinned selection persists across restart. Check unrelated deployment/provider/account/UI state remained intact. If authenticated native Desktop behavior cannot be observed, report that pending boundary; disk files, native metadata reads, headless tests and Docker component proof alone are insufficient for complete integration.
95
+ After a supported restart, verify actual Desktop package 0.1.6 activation, native Deepwork metadata, healthy selectable DW root names, retained auxiliary delegation/read-only denial, and actual Deepwork Profiles UI create/edit/save/apply/reset with independent file/pointer bytes. Verify live even-blank Agents remain unchanged on global Apply and current pinned selection persists across restart. Check the compact header selector and explicit model/effort authority, including normal profile switching versus explicit switch-and-use-model. Check unrelated deployment/provider/account/UI state remained intact. If authenticated native Desktop behavior cannot be observed, report that pending boundary; disk files, native metadata reads, headless tests and Docker component proof alone are insufficient for complete integration.
92
96
 
93
97
  ## Rollback
94
98
 
@@ -4,7 +4,9 @@
4
4
 
5
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.
6
6
 
7
- 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
+ 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.
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.
8
10
 
9
11
  | Policy field | Default | Strict integer bound |
10
12
  | --- | --- | --- |
@@ -42,13 +42,13 @@ Risk-based behavior scales discovery, planning, and review to uncertainty and in
42
42
 
43
43
  ## Other settings
44
44
 
45
- `roleRouting` defaults to an empty map. Each canonical role accepts optional `primary`, ordered `fallbackRoutes`, `strategy` and bounded `rateLimit` fields. Profile-level `runtimePolicy` supplies inherited strategy/retry defaults. Startup lock is the default; rate-limit rollover is explicit per role. Native catalog/form controls edit JSONC paths without changing native global model defaults. The deployment-only `roles` enable map remains separate. Unknown keys/malformed routes fail; omitted and explicit empty chains differ. See [model routing](model-routing.md) and [runtime recovery](runtime-recovery.md).
45
+ `roleRouting` defaults to an empty map. Each canonical role accepts optional `primary`, ordered `fallbackRoutes`, `strategy` and bounded `rateLimit` fields. Profile-level `runtimePolicy` supplies inherited strategy/retry defaults. Child Agents use their configured startup lock or explicit per-role rate-limit rollover. Ordinary top-level Agents instead preserve the native model tab's exact model/effort and only retry on that same route. Native catalog/form controls edit JSONC paths without changing native global model defaults. Only the explicit header option to switch a profile and use its model invokes native model selection; a normal profile switch does not. The deployment-only `roles` enable map remains separate. Unknown keys/malformed routes fail; omitted and explicit empty chains differ. See [model routing](model-routing.md) and [runtime recovery](runtime-recovery.md).
46
46
 
47
47
  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.
48
48
 
49
49
  Runtime overlays allow only `defaultActive`, `roleRouting`, `runtimePolicy`, `workflow`, `guards`, `runtimeRecovery`, and both `deepseekV4Pro*`/`deepseekFlash*` Calibration, DefaultReasoningEffort and MaxReasoningPresets fields. `roles`, `skills`, `modeName`, `promptOrder`, `section`, `presets`, `lsp`, `sessionPersistence`, native provider/account/install controls, embedded profiles and unknown fields are rejected. Defaults resolve before deployment settings, then the admitted immutable overlay. A missing global selection leaves the deployment baseline unchanged.
50
50
 
51
- 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.
51
+ Existing `deepseekV4ProCalibration`, `deepseekV4ProDefaultReasoningEffort`, and `deepseekV4ProMaxReasoningPresets` remain compatible for child Agents. 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. Ordinary root effort is always native-owned, including when a calibration setting says strict.
52
52
 
53
53
  Guard scope defaults to `deepwork-or-dsmm-agent`; shell safety and helpers remain enabled and Git writes require host approval. LSP and runtime recovery default off. Recovery caps are finite; an empty fallback list does not enable automatic model discovery or substitution.
54
54
 
@@ -60,4 +60,6 @@ Status does not perform capability/network queries, expose credentials or provid
60
60
 
61
61
  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.
62
62
 
63
+ For ordinary roots, effective status reports `startup-lock`, no applied profile primary/fallback chain, and reasoning action `native-owned`. The original child-role configuration remains available under `effectiveSettings`; it is not falsely presented as an automatic main-model override. `profileModel` in a session-profile response is only the declared model for an explicit user action, never proof that the native model has already changed.
64
+
63
65
  Status describes the receiving Agent's admitted profile/revision/epoch, resolved strategy/retry policy and actual route state separately from future global defaults. Settings and the header selector display those scopes distinctly; a global change can intentionally differ from a live Agent. `--dump-config` shows deployment composition, not proof of runtime-profile application or authenticated UI behavior.
@@ -9,16 +9,47 @@ export function SessionScope({ state, actions, t, compact = false }) {
9
9
  const selected = state.snapshot?.profiles.find((profile) => profile.id === state.sessionChoice);
10
10
  const disabled = state.busy !== null || state.pendingEditor !== null || state.sessionBusy !== null || state.dirty;
11
11
  const allowed = session !== null && session.switchAllowed && /^[a-f0-9]{64}$|^absent$/u.test(session.selection.selectionRevision);
12
- const status = state.sessionNotice === null ? "" : t(state.sessionNotice === "applied" ? "sessionApplied" : "sessionResetDone");
13
- return _jsxs("div", { className: "dsmm-session-scope", "aria-busy": state.sessionBusy !== null, "data-dsmm-session-scope": true, children: [!compact && _jsx("h3", { children: t("sessionScope") }), state.currentSessionId === null ? _jsx("p", { className: "dsmm-hint", children: t("noSession") }) : _jsxs(_Fragment, { children: [labels !== null && _jsx("p", { "data-dsmm-session-state": true, children: labels.admitted }), labels !== null && !compact && _jsx("p", { className: "dsmm-hint", "data-dsmm-session-future-default": true, children: labels.futureDefault }), session !== null && !session.switchAllowed && _jsx("p", { className: "dsmm-hint", children: t("sessionBusy", { reason: session.switchUnavailableReason ?? "unavailable" }) }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-choice`, children: t("sessionSelect") }), _jsxs("select", { id: `${prefix}-choice`, value: state.sessionChoice ?? "", disabled: disabled || !allowed, onChange: (event) => actions.chooseSessionProfile(event.currentTarget.value || null), children: [_jsx("option", { value: "", children: t("sessionBaseline") }), state.sessionChoice !== null && selected === undefined && _jsx("option", { value: state.sessionChoice, children: state.sessionChoice }), state.snapshot?.profiles.map((profile) => _jsx("option", { value: profile.id, disabled: profile.revision === null || profile.error !== undefined, children: profile.label === undefined ? profile.id : `${profile.label} (${profile.id})` }, profile.id))] })] }), state.dirty && _jsx("p", { className: "dsmm-hint", children: t("sessionDirty") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: disabled || !allowed || (state.sessionChoice !== null && selected?.revision == null), onClick: () => { void actions.applySession(); }, children: t(state.sessionBusy === "apply" ? "sessionApplying" : "sessionApply") }), !compact && _jsx(Button, { type: "button", variant: "outline", disabled: disabled || !allowed, onClick: () => { void actions.resetSession(); }, children: t(state.sessionBusy === "reset" ? "sessionResetting" : "sessionReset") }), _jsx(Button, { type: "button", variant: "outline", disabled: state.sessionBusy !== null || state.busy !== null || state.pendingEditor !== null, onClick: () => { void actions.refreshSession(); }, children: t("sessionRefresh") })] }), !compact && session?.rolePolicy !== undefined && _jsx("p", { "data-dsmm-session-policy": true, children: t("roleState", { route: session.rolePolicy.route === undefined ? t("inheritRoute") : `${session.rolePolicy.route.provider}/${session.rolePolicy.route.model}${session.rolePolicy.route.reasoningEffort === undefined ? "" : ` (${session.rolePolicy.route.reasoningEffort})`}`, strategy: session.rolePolicy.strategy, retries: session.rolePolicy.retries, failures: session.rolePolicy.rateLimitFailures, switches: session.rolePolicy.switches, delay: session.rolePolicy.totalDelayMs }) })] }), state.sessionIssue !== null && _jsx("p", { role: "alert", children: state.sessionIssue.code === "conflict" ? t("sessionConflict")
14
- : ["busy", "maintenance", "disposed", "not-owned"].includes(state.sessionIssue.code) ? t("sessionBusy", { reason: state.sessionIssue.code })
15
- : t(state.sessionIssue.code === "validation" ? "validation" : "sessionUnavailable") }), _jsx("p", { className: "dsmm-status", role: "status", "aria-live": "polite", "aria-atomic": "true", children: state.sessionBusy === "read" ? t("reading") : status })] });
12
+ const status = state.sessionNotice === null ? "" : t(state.sessionNotice === "applied-with-model" ? "sessionAppliedWithModel" : state.sessionNotice === "applied" ? "sessionApplied" : "sessionResetDone");
13
+ return _jsxs("div", { className: "dsmm-session-scope", "aria-busy": state.sessionBusy !== null, "data-dsmm-session-scope": true, children: [!compact && _jsx("h3", { children: t("sessionScope") }), state.currentSessionId === null ? _jsx("p", { className: "dsmm-hint", children: t("noSession") }) : _jsxs(_Fragment, { children: [labels !== null && _jsx("p", { "data-dsmm-session-state": true, children: labels.admitted }), labels !== null && !compact && _jsx("p", { className: "dsmm-hint", "data-dsmm-session-future-default": true, children: labels.futureDefault }), session !== null && !session.switchAllowed && _jsx("p", { className: "dsmm-hint", children: t("sessionBusy", { reason: session.switchUnavailableReason ?? "unavailable" }) }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-choice`, children: t("sessionSelect") }), _jsxs("select", { id: `${prefix}-choice`, value: state.sessionChoice ?? "", disabled: disabled || !allowed, onChange: (event) => actions.chooseSessionProfile(event.currentTarget.value || null), children: [_jsx("option", { value: "", children: t("sessionBaseline") }), state.sessionChoice !== null && selected === undefined && _jsx("option", { value: state.sessionChoice, children: state.sessionChoice }), state.snapshot?.profiles.map((profile) => _jsx("option", { value: profile.id, disabled: profile.revision === null || profile.error !== undefined, children: profile.label === undefined ? profile.id : `${profile.label} (${profile.id})` }, profile.id))] })] }), state.dirty && _jsx("p", { className: "dsmm-hint", children: t("sessionDirty") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: disabled || !allowed || (state.sessionChoice !== null && selected?.revision == null), onClick: () => { void actions.applySession(); }, children: t(state.sessionBusy === "apply" ? "sessionApplying" : "sessionApply") }), !compact && _jsx(Button, { type: "button", variant: "outline", disabled: disabled || !allowed, onClick: () => { void actions.resetSession(); }, children: t(state.sessionBusy === "reset" ? "sessionResetting" : "sessionReset") }), _jsx(Button, { type: "button", variant: "outline", disabled: state.sessionBusy !== null || state.busy !== null || state.pendingEditor !== null, onClick: () => { void actions.refreshSession(); }, children: t("sessionRefresh") })] }), !compact && session?.rolePolicy !== undefined && _jsx("p", { "data-dsmm-session-policy": true, children: t("roleState", { route: session.rolePolicy.route === undefined ? t("inheritRoute") : `${session.rolePolicy.route.provider}/${session.rolePolicy.route.model}${session.rolePolicy.route.reasoningEffort === undefined ? "" : ` (${session.rolePolicy.route.reasoningEffort})`}`, strategy: session.rolePolicy.strategy, retries: session.rolePolicy.retries, failures: session.rolePolicy.rateLimitFailures, switches: session.rolePolicy.switches, delay: session.rolePolicy.totalDelayMs }) })] }), state.sessionIssue !== null && _jsx("p", { role: "alert", children: state.sessionIssue.source === "profile-model" ? t(state.sessionIssue.code === "model-unconfigured" ? "headerNoProfileModel" : state.sessionIssue.code === "model-choice-changed" ? "headerModelChoiceChanged" : "headerModelUnconfirmed")
14
+ : state.sessionIssue.code === "conflict" ? t("sessionConflict")
15
+ : ["busy", "maintenance", "disposed", "not-owned"].includes(state.sessionIssue.code) ? t("sessionBusy", { reason: state.sessionIssue.code })
16
+ : t(state.sessionIssue.code === "validation" ? "validation" : "sessionUnavailable") }), _jsx("p", { className: "dsmm-status", role: "status", "aria-live": "polite", "aria-atomic": "true", children: state.sessionBusy === "read" ? t("reading") : status })] });
16
17
  }
17
18
  /** Additive native header contribution; never operates on a different view seat. */
18
19
  export function SessionProfiles(props) {
20
+ const prefix = useId();
19
21
  const state = props.useProfiles((snapshot) => snapshot);
20
22
  if (props.sessionId !== state.currentSessionId)
21
23
  return null;
22
- return _jsx("div", { className: "dsmm-profiles dsmm-header-profiles", children: _jsxs("details", { children: [_jsx("summary", { children: props.t("title") }), _jsx(SessionScope, { state: state, actions: props, t: props.t, compact: true })] }) });
24
+ const { t } = props;
25
+ const session = state.session;
26
+ const admission = session?.admittedSelection ?? (session?.scope === "global-default" ? undefined : session?.selection);
27
+ const unknownCaptured = session !== null && admission === undefined;
28
+ const current = session === null ? "__dsmm_session_unavailable__" : unknownCaptured ? "__dsmm_captured_default__" : admission?.selectedId ?? "";
29
+ const profiles = state.snapshot?.profiles ?? [];
30
+ const currentSaved = profiles.find((profile) => profile.id === current);
31
+ const committing = state.sessionBusy !== null;
32
+ const disabled = committing || state.busy !== null || state.pendingEditor !== null || state.dirty || state.invalidFields.length > 0
33
+ || session === null || !session.switchAllowed || state.snapshot === null;
34
+ let feedback = "";
35
+ if (state.sessionIssue !== null)
36
+ feedback = t(state.sessionIssue.source === "profile-model" ? state.sessionIssue.code === "model-unconfigured" ? "headerNoProfileModel" : state.sessionIssue.code === "model-choice-changed" ? "headerModelChoiceChanged" : "headerModelUnconfirmed" : state.sessionIssue.code === "conflict" ? "headerConflict" : "headerRefused");
37
+ else if (committing)
38
+ feedback = t(state.sessionBusy === "read" ? "headerLoading" : "headerApplying");
39
+ else if (state.dirty || state.invalidFields.length > 0 || state.pendingEditor !== null)
40
+ feedback = t("headerDraft");
41
+ else if (session === null || state.snapshot === null)
42
+ feedback = t("headerUnavailable");
43
+ else if (!session.switchAllowed)
44
+ feedback = t("headerBusy");
45
+ else if (state.sessionNotice !== null)
46
+ feedback = t(state.sessionNotice === "applied-with-model" ? "headerAppliedWithModel" : "headerApplied");
47
+ const capturedSuffix = session?.scope === "global-default" && !unknownCaptured ? ` — ${t("headerCaptured")}` : "";
48
+ return _jsxs("div", { className: "dsmm-profiles dsmm-header-profiles", "data-dsmm-header-profile": true, "aria-busy": committing, children: [_jsx("label", { htmlFor: `${prefix}-profile`, children: t("headerProfile") }), _jsxs("select", { id: `${prefix}-profile`, "aria-label": t("headerProfileLabel"), title: t("headerModelDefaultHint"), "aria-describedby": feedback === "" ? undefined : `${prefix}-feedback`, value: current, disabled: disabled, onChange: (event) => {
49
+ const value = event.currentTarget.value;
50
+ const useProfileModel = value.startsWith("@model:");
51
+ props.chooseSessionProfile((useProfileModel ? value.slice("@model:".length) : value) || null);
52
+ void props.applySession(useProfileModel ? { useProfileModel: true } : undefined);
53
+ }, children: [session === null && _jsx("option", { value: "__dsmm_session_unavailable__", disabled: true, children: t("headerUnavailable") }), unknownCaptured && _jsx("option", { value: "__dsmm_captured_default__", disabled: true, children: t("headerCaptured") }), admission?.selectedId != null && currentSaved === undefined && _jsxs("option", { value: admission.selectedId, disabled: true, children: [admission.selectedId, " \u2014 ", t("headerSavedUnavailable"), capturedSuffix] }), _jsxs("optgroup", { label: t("headerKeepModelGroup"), children: [_jsxs("option", { value: "", children: [t("sessionBaseline"), current === "" ? capturedSuffix : ""] }), profiles.map((profile) => _jsxs("option", { value: profile.id, disabled: profile.revision === null || profile.error !== undefined, children: [profile.label ?? profile.id, profile.id === current ? capturedSuffix : "", profile.error === undefined && profile.revision !== null ? "" : ` — ${t("headerSavedUnavailable")}`] }, profile.id))] }), _jsxs("optgroup", { label: t("headerUseModelGroup"), children: [_jsx("option", { value: "@model:", children: t("sessionBaseline") }), profiles.map((profile) => _jsxs("option", { value: `@model:${profile.id}`, disabled: profile.revision === null || profile.error !== undefined, children: [profile.label ?? profile.id, profile.error === undefined && profile.revision !== null ? "" : ` — ${t("headerSavedUnavailable")}`] }, profile.id))] })] }), feedback !== "" && _jsx("span", { id: `${prefix}-feedback`, role: state.sessionIssue === null ? "status" : "alert", "aria-live": "polite", children: feedback })] });
23
54
  }
24
55
  //# sourceMappingURL=SessionProfiles.js.map
@@ -1,8 +1,11 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
+ import type { HostObservable } from "@deepseek-ai/dsh-client-ui-slots";
3
+ import type { SessionEventSource } from "@deepseek-ai/dsh-api-session-controller/client";
4
+ import type { ModelDirectoryState } from "@deepseek-ai/dsh-client-ui-model-selection/client";
2
5
  import type { DsmmProfilesRemote } from "../profile-remote.js";
3
6
  import type { ProfileErrorInfo, ProfileReadResult, ProfileSnapshot } from "../profile-types.js";
4
7
  import type { SessionProfileSnapshot } from "../profile-types.js";
5
- import type { ModelCatalog } from "@deepseek-ai/dsh-api-session-controller";
8
+ import type { ModelCatalog, SessionSelectModelRequest, SessionSelectModelValue } from "@deepseek-ai/dsh-api-session-controller";
6
9
  import type { JsonPath } from "./structured.js";
7
10
  export interface ProfileEditor {
8
11
  id: string;
@@ -18,7 +21,10 @@ export interface ProfilesIssue {
18
21
  code: string;
19
22
  message?: string;
20
23
  field?: string;
21
- source?: "selection";
24
+ source?: "selection" | "profile-model";
25
+ }
26
+ export interface SessionApplyOptions {
27
+ useProfileModel?: boolean;
22
28
  }
23
29
  export interface ProfilesViewSnapshot {
24
30
  snapshot: ProfileSnapshot | null;
@@ -36,7 +42,7 @@ export interface ProfilesViewSnapshot {
36
42
  sessionChoice: string | null;
37
43
  sessionBusy: "read" | "apply" | "reset" | null;
38
44
  sessionIssue: ProfilesIssue | null;
39
- sessionNotice: "applied" | "reset" | null;
45
+ sessionNotice: "applied" | "reset" | "applied-with-model" | null;
40
46
  invalidFields: string[];
41
47
  editorEpoch: number;
42
48
  }
@@ -58,13 +64,17 @@ export interface ProfilesActions {
58
64
  refreshCatalog(): Promise<void>;
59
65
  refreshSession(): Promise<void>;
60
66
  chooseSessionProfile(id: string | null): void;
61
- applySession(): Promise<void>;
67
+ applySession(options?: SessionApplyOptions): Promise<void>;
62
68
  resetSession(): Promise<void>;
63
69
  setFieldInvalid(field: string, invalid: boolean): void;
64
70
  }
65
71
  export interface ModelCatalogRemote {
66
72
  modelCatalog(): Promise<RemoteResult<ModelCatalog>>;
67
73
  }
74
+ export interface ProfileModelSelectorRemote {
75
+ selectModel(request: SessionSelectModelRequest): Promise<RemoteResult<SessionSelectModelValue>>;
76
+ }
77
+ type ModelInteractionSource = HostObservable<Pick<ModelDirectoryState, "status">>;
68
78
  export declare const NEW_PROFILE_CONTENT = "{\n \"version\": 1,\n \"id\": \"new-profile\",\n \"label\": \"New profile\",\n \"settings\": {\n // Runtime overlay only. Omitted fields inherit the deployment baseline.\n \"defaultActive\": true\n }\n}\n";
69
79
  /** A valid external CAS conflict is reconcilable; corruption is never reset implicitly. */
70
80
  export declare function canReconcileSelection(snapshot: ProfileSnapshot | null): boolean;
@@ -79,6 +89,21 @@ export declare class ProfilesController {
79
89
  private sessionGeneration;
80
90
  private catalogGeneration;
81
91
  private catalogRemote;
92
+ private modelSelectorGeneration;
93
+ private modelSelector;
94
+ private modelSelectionSource;
95
+ private modelSelectionSessionId;
96
+ private modelSelectionGeneration;
97
+ private stopModelSelection;
98
+ private modelEvents;
99
+ private modelEventsSessionId;
100
+ private modelEventsGeneration;
101
+ private modelEventsWatermark;
102
+ private stopModelEvents;
103
+ private modelInteraction;
104
+ private modelInteractionSessionId;
105
+ private modelInteractionGeneration;
106
+ private stopModelInteraction;
82
107
  readonly store: {
83
108
  getSnapshot: () => ProfilesViewSnapshot;
84
109
  subscribe: (listener: () => void) => (() => void);
@@ -86,6 +111,10 @@ export declare class ProfilesController {
86
111
  readonly actions: ProfilesActions;
87
112
  constructor(remote: DsmmProfilesRemote);
88
113
  dispose(): void;
114
+ attachModelSelector(remote: ProfileModelSelectorRemote | null): void;
115
+ attachModelSelectionSource(sessionId: string | null, source: HostObservable<unknown> | null): void;
116
+ attachModelEventSource(sessionId: string | null, source: SessionEventSource | null): void;
117
+ attachModelInteractionSource(sessionId: string | null, source: ModelInteractionSource | null): void;
89
118
  attachCatalog(remote: ModelCatalogRemote | null): void;
90
119
  setSession(id: string | null): void;
91
120
  refreshCatalog(): Promise<void>;