@dsmm/dsmm 0.1.4 → 0.1.5
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 +12 -12
- package/docs/compatibility.md +8 -6
- package/docs/migration-from-ocmm.md +8 -0
- package/docs/model-routing.md +19 -5
- package/docs/profiles.md +21 -9
- package/docs/releasing.md +23 -15
- package/docs/runtime-recovery.md +39 -14
- package/docs/settings-status.md +7 -7
- package/lib/client/ProfilesSection.js +7 -3
- package/lib/client/SessionProfiles.d.ts +19 -0
- package/lib/client/SessionProfiles.js +24 -0
- package/lib/client/StructuredEditor.d.ts +11 -0
- package/lib/client/StructuredEditor.js +74 -0
- package/lib/client/controller.d.ts +38 -0
- package/lib/client/controller.js +153 -11
- package/lib/client/index.d.ts +2 -0
- package/lib/client/index.js +20 -0
- package/lib/client/locales.d.ts +89 -0
- package/lib/client/locales.js +45 -2
- package/lib/client/session-labels.d.ts +8 -0
- package/lib/client/session-labels.js +13 -0
- package/lib/client/structured.d.ts +18 -0
- package/lib/client/structured.js +98 -0
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +12 -1
- package/lib/client.js +969 -74
- package/lib/commands.js +1 -0
- package/lib/dsh-types.d.ts +16 -0
- package/lib/index.js +27 -1
- package/lib/model-routing.js +93 -23
- package/lib/profile-remote.d.ts +7 -1
- package/lib/profile-remote.js +115 -2
- package/lib/profile-rpc.d.ts +9 -1
- package/lib/profile-rpc.js +99 -2
- package/lib/profile-runtime.d.ts +24 -5
- package/lib/profile-runtime.js +182 -31
- package/lib/profile-store.d.ts +19 -1
- package/lib/profile-store.js +120 -10
- package/lib/profile-types.d.ts +41 -1
- package/lib/profiles.d.ts +1 -1
- package/lib/profiles.js +34 -2
- package/lib/role-providers.js +12 -2
- package/lib/role-routing.d.ts +37 -3
- package/lib/role-routing.js +107 -35
- package/lib/routing-policy.d.ts +32 -0
- package/lib/routing-policy.js +92 -0
- package/lib/runtime-recovery.js +213 -52
- package/lib/settings.d.ts +27 -1
- package/lib/settings.js +29 -7
- package/lib/status.d.ts +9 -1
- package/lib/status.js +29 -8
- package/package.json +5 -1
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
|
+
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.
|
|
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 successor target is 0.1.
|
|
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.
|
|
8
8
|
|
|
9
9
|
## Current functionality
|
|
10
10
|
|
|
@@ -12,9 +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/effort
|
|
16
|
-
- Native Settings → Deepwork Profiles (`Deepwork 配置档`)
|
|
17
|
-
- Scoped shell/Git/plan/question/todo guards
|
|
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.
|
|
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
|
+
- Scoped shell/Git/plan/question/todo guards and separately opt-in bounded idle continuation.
|
|
18
18
|
- 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
19
|
|
|
20
20
|
The native host owns child-session controls, depth limits, permission checks, cancellation, and model authentication. DSMM does not replace those with an OpenCode retry dispatcher.
|
|
@@ -25,14 +25,14 @@ Durable session metadata requires explicit deployment-only `sessionPersistence:
|
|
|
25
25
|
|
|
26
26
|
## Install and configure
|
|
27
27
|
|
|
28
|
-
Install the exact registry version after terminal verified publication with `dsh plugin --profile <profile> add @dsmm/dsmm@0.1.
|
|
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
29
|
|
|
30
30
|
```powershell
|
|
31
31
|
pnpm --dir dsmm build
|
|
32
32
|
pnpm --dir dsmm pack --pack-destination <temporary-artifact-directory>
|
|
33
33
|
$env:DSH_HOME = "<disposable-test-home>"
|
|
34
34
|
dsh --profile <profile> --from-default-profile headless --dump-config
|
|
35
|
-
dsh plugin --profile <profile> add <absolute-path-to-dsmm-dsmm-0.1.
|
|
35
|
+
dsh plugin --profile <profile> add <absolute-path-to-dsmm-dsmm-0.1.5.tgz>
|
|
36
36
|
dsh --profile <profile> --dump-config
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -54,11 +54,11 @@ This runtime-baseline example is not the full durable-persistence patch. Native
|
|
|
54
54
|
|
|
55
55
|
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
56
|
|
|
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.
|
|
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
58
|
|
|
59
|
-
For a role-specific model, configure `roleRouting.dsmm-reviewer.primary` with native `provider`, `model`, and optional `reasoningEffort
|
|
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
60
|
|
|
61
|
-
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.
|
|
61
|
+
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
62
|
|
|
63
63
|
## Verification
|
|
64
64
|
|
|
@@ -69,7 +69,7 @@ pnpm --dir dsmm check:release
|
|
|
69
69
|
pnpm --dir dsmm smoke:docker
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
A separately authorized credentialed, packed real-model diagnostic is also available from this checkout. It is **not** the independent 0.1.
|
|
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
73
|
|
|
74
74
|
```powershell
|
|
75
75
|
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 +79,4 @@ Add `--delegate` to verify the actual `dsmm_reviewer` child persona, inherited F
|
|
|
79
79
|
|
|
80
80
|
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
81
|
|
|
82
|
-
These commands are verification procedures, not a claim they have passed for the final 0.1.
|
|
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.
|
package/docs/compatibility.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Deepwork 0.1.
|
|
1
|
+
# Deepwork 0.1.5 Compatibility and Upgrade
|
|
2
2
|
|
|
3
|
-
This document describes the 0.1.
|
|
3
|
+
This document describes the 0.1.5 source contract and required acceptance evidence. It does not claim that the final 0.1.5 artifact has passed Docker, been published, or been activated in Desktop. Historical 0.1.1 checks and the stopped 0.1.2 frozen draft are not substitute evidence for this update; the old 0.1.2 tag/artifact/draft stay untouched and unpublished.
|
|
4
4
|
|
|
5
|
-
The immutable 0.1.3 tag at `2bdea4b` is also preserved. Its run `37235817488` failed before pack/publish on pnpm 11's ignored esbuild/koffi build scripts
|
|
5
|
+
The immutable 0.1.3 tag at `2bdea4b` is also preserved. Its run `37235817488` failed before pack/publish on pnpm 11's ignored esbuild/koffi build scripts. 0.1.4's published-origin bytes and failed original verify/404 history are preserved by their separate fixed continuation controls, not rewritten by 0.1.5. The 0.1.5 gate requires fresh clean Linux installation/build evidence; existing compiled output is not a substitute.
|
|
6
6
|
|
|
7
7
|
Deepwork is the native plugin title in both exported metadata locales, with localized descriptions. Profiles are displayed as **Deepwork Profiles** / **Deepwork 配置档**, and twelve roles as `DW …`. Package `@dsmm/dsmm`, Loader `dsmm`, role/tool/provider IDs, commands, schemas and persistence vocabulary remain compatible. Native metadata-reader and actual UI evidence must prove the display names; a manifest `displayName` is not a supported substitute.
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ The installation contracts include `@deepseek-ai/cordis@~4.0.4`, `@deepseek-ai/s
|
|
|
31
31
|
| LSP/MCP | `external ocmm-lsp mcp` | optional |
|
|
32
32
|
| Runtime recovery | `process-local` | optional |
|
|
33
33
|
| Per-role model/effort/fallback policy | native request, subagent and descriptor seams | opt-in; exact configured capability required |
|
|
34
|
-
| Runtime profiles | independent drafts, immutable revisions,
|
|
34
|
+
| Runtime profiles | independent drafts, immutable revisions, global pointer and scoped CAS sidecars | global new-Agent defaults; explicit idle session epochs; cold sidecar retention |
|
|
35
35
|
| Durable DSMM metadata | deployment-only `sessionPersistence` on main DSMM entry | explicit startup integration; frozen-artifact/production acceptance pending |
|
|
36
36
|
| DeepSeek V4 Pro calibration | `deepseek-official/deepseek-v4-pro` | optional |
|
|
37
37
|
| DeepSeek V41 Flash calibration | `native DeepSeek providers/deepseek-flash` | optional |
|
|
@@ -81,7 +81,9 @@ This prevents future unsafe DSMM writes but does not repair existing unmarked lo
|
|
|
81
81
|
|
|
82
82
|
DSMM runtime profiles are independent JSONC drafts beneath the native `profileContext.dir`, not additional DSH deployment profiles. Deployment roles/skills/preset composition/LSP/provider/account/install and `sessionPersistence` settings remain restart-scoped and cannot be changed by a runtime profile. Supported runtime values can be saved into a draft explicitly; save alone never activates it or rewrites deployment configuration. Apply pins immutable bytes and updates only the minimal selection pointer. See [profiles](profiles.md).
|
|
83
83
|
|
|
84
|
-
Every existing live Agent, **including a blank Agent**, retains its admitted
|
|
84
|
+
Every existing live Agent, **including a blank Agent**, retains its admitted settings when the global default is applied/reset. Explicit current-session selection is separate: native idle maintenance and CAS/epoch checks commit only that ordinary root's sidecar before publishing its immutable admission. Existing children keep their old epoch; later genuinely owned children inherit the new one. Sidecar cold resume retains the exact pinned revision/baseline even after draft/global changes. Sessions without a sidecar keep the old global-current behavior. Corrupt/unavailable sidecars never silently fall back; native clear/compact does not transfer choices by inferred lineage.
|
|
85
|
+
|
|
86
|
+
Old profile documents remain loadable, but omitted strategy now means safer `startup-lock`: a legacy generic chain no longer causes later generic automatic hopping. `runtimeRecovery.enabled` remains parse-compatible and controls legacy continuation concerns, not the two role strategies. Explicitly opt in per role to bounded `rate-limit-fallback` where desired. Every DSMM retry, including same-route retry, requires correlated native no-output evidence; partial text, reasoning or tool fragments refuse terminally without invoking a competing always-retry owner. See [runtime recovery](runtime-recovery.md).
|
|
85
87
|
|
|
86
88
|
Older sessions directly selected into now-auxiliary roles can fail native cold resume because their root preset ID is no longer registered. This is a known native compatibility limitation, not permission to silently replace the persona, reset a session, or erase its history. Disclose it before rollout and preserve historical data; if restoring such sessions is required, stop and obtain direction rather than substituting a root. Package rollback does not authorize history or credential changes.
|
|
87
89
|
|
|
@@ -91,7 +93,7 @@ Global/system Desktop migration is the **third phase**: independent frozen-artif
|
|
|
91
93
|
|
|
92
94
|
The Linux packed-lifecycle smoke pins pnpm `12.8.1` and retains DSH's native `nodeLinker: hoisted` profile layout. On Linux Node 22, pnpm `11.9.0` with that layout and DSMM's auto-installed peer graph can print `Done` after removal without exiting; the same failure was reproduced directly without DSH, while `12.8.1` returned normally. A printed `Done` is not uninstall completion. This does not claim the same failure on Windows or modify a user's existing package manager or profile. The smoke enforces a bounded fail-closed timeout and checks actual remove/reinstall exits and profile state.
|
|
93
95
|
|
|
94
|
-
The matrix separates required 0.1.
|
|
96
|
+
The matrix separates required 0.1.5 evidence from historical CLI/configuration, source-contract and credentialed model evidence. A version string or unit test alone establishes neither native preset health nor UI/runtime behavior. Windows, Linux, Web, and macOS evidence are not interchangeable.
|
|
95
97
|
|
|
96
98
|
The independent Docker gate installs the exact frozen tarball into a fresh pinned native runtime/home and verifies root selection, actual read-only child denials, aliased-parent route preflight, runtime snapshot behavior, and the **same compiled DSMM UI** using native client/slots/RPC and real profile storage. A supported composition-owned in-process operator/Gateway carrier and test-owned browser bridge provide no-credential native component/RPC/storage proof. No user login, copied cookie, launcher token, browser state, Desktop data, account records or authentication bypass is permitted. This proof is not authenticated Desktop/Web-launch proof; actual Desktop mounting and authorized operations remain the later check.
|
|
97
99
|
|
|
@@ -52,3 +52,11 @@ The inspected pi-ai adapter exposes stable transient codes but no stable HTTP st
|
|
|
52
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.
|
|
53
53
|
|
|
54
54
|
DSH owns subagent depth and permission ceilings. DSMM does not raise the native default depth or use workflow instructions to bypass plan mode, user approval, read-only roles, or provider authentication.
|
|
55
|
+
|
|
56
|
+
## Successor 0.1.5 migration note
|
|
57
|
+
|
|
58
|
+
The mapping above is the historical 0.1.1 contract. For 0.1.5, use [runtime profiles](profiles.md), [model routing](model-routing.md) and [runtime recovery](runtime-recovery.md) as the current source contract, not as evidence of completed publication or Desktop activation. Global apply changes future unscoped Agents; an explicit idle current-session apply commits only that root's sidecar and admission epoch. Existing children keep their snapshots, later owned children inherit the new epoch, and cold resume uses an explicit immutable sidecar or, when absent, the current global default.
|
|
59
|
+
|
|
60
|
+
An omitted strategy now means `startup-lock`: primary or first native-resolvable candidate is admitted once and retained across turns. Opt into `rate-limit-fallback` per role/profile to enable threshold-ordered rate-limit switching within finite retry/delay/switch bounds. Legacy `runtimeRecovery.enabled` does not select or disable these strategies. Every automatic retry requires positively correlated no-output evidence; partial text, reasoning or tool fragments forbid retry. Older generic fallback behavior is not silently carried forward. Preserve deployment/provider/account/authentication and native history; migration does not rewrite old logs or immutable release identities.
|
|
61
|
+
|
|
62
|
+
The native user's explicit provider/model/exact effort remains authoritative over a profile's default, including effort-only changes, later turns and cold resume. Applying a profile does not silently erase that choice; configured children retain their own role-route authority. A native selection made after assembly starts applies to a later assembly, while a fresh same-value choice invalidates stale retry reservations. Profile form controls do not call native `session/selectModel` or change the native global model default.
|
package/docs/model-routing.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Explicit role policies
|
|
4
4
|
|
|
5
|
-
`roleRouting` is a map keyed by canonical DSMM role ID. It defaults to `{}`; role names alone do not select a model. It can be supplied by deployment configuration or
|
|
5
|
+
`roleRouting` is a map keyed by canonical DSMM role ID. It defaults to `{}`; role names alone do not select a model. It can be supplied by deployment configuration or a selected [runtime profile](profiles.md). The 0.1.5 contract adds independent per-role strategy and finite retry policy without embedding native account configuration. Provider authentication and the provider/model catalog remain native DSH deployment configuration, never profile-file contents. The following is a deployment baseline example:
|
|
6
6
|
|
|
7
7
|
```yaml
|
|
8
8
|
- id: dsmm
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
dsmm-builder: false
|
|
13
13
|
roleRouting:
|
|
14
14
|
dsmm-orchestrator:
|
|
15
|
+
strategy: startup-lock
|
|
15
16
|
primary:
|
|
16
17
|
provider: my-provider
|
|
17
18
|
model: primary-model
|
|
@@ -21,6 +22,11 @@
|
|
|
21
22
|
model: backup-model
|
|
22
23
|
reasoningEffort: high
|
|
23
24
|
dsmm-reviewer:
|
|
25
|
+
strategy: rate-limit-fallback
|
|
26
|
+
rateLimit:
|
|
27
|
+
maxRetries: 3
|
|
28
|
+
switchAfterRateLimits: 3
|
|
29
|
+
maxSwitches: 2
|
|
24
30
|
primary:
|
|
25
31
|
provider: my-provider
|
|
26
32
|
model: review-model
|
|
@@ -33,17 +39,25 @@
|
|
|
33
39
|
enabled: false
|
|
34
40
|
```
|
|
35
41
|
|
|
36
|
-
A `primary`
|
|
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.
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
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
|
+
|
|
46
|
+
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
|
+
|
|
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.
|
|
49
|
+
|
|
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.
|
|
51
|
+
|
|
52
|
+
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).
|
|
39
53
|
|
|
40
54
|
Each configured 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. For a native child override that changes provider/model without supplying effort, the alias likewise clears the profile-primary effort rather than carrying it onto the new route. Existing DeepSeek calibration cannot override the admitted explicit role/child effort.
|
|
41
55
|
|
|
42
56
|
Native child options keep `modelSelectionSettings:false`: this correction introduces no new model-visible selection permission or tool. DSMM's aliased native provider merges profile-primary defaults from the admitted parent snapshot with explicit native child options, then invokes the parent's native `llm.resolveCallConfig` preflight before native spawn. The trusted live-child path preserves that accepted route/effort through the final request headers instead of reapplying the profile primary. Standing preset/tool rows do not capture per-profile routes. The path preserves 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 prove live ownership or make terminal one-shot children resumable.
|
|
43
57
|
|
|
44
|
-
|
|
58
|
+
Default primary preparation does not reset an admitted fallback or an accepted native user choice. Public `session/selectModel` intentionally persists the native default in the host's background; profile-editor fields use only the advisory catalog and never call that endpoint. 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.
|
|
45
59
|
|
|
46
|
-
DSMM records a model-hidden `dsmm/role-policy`
|
|
60
|
+
DSMM records a model-hidden `dsmm/role-policy` identity for explicit routing. It hashes the admitted profile epoch, strategy/retry policy and routes while keeping the audited v1 event's exact three-key grammar. Unchanged admitted policies retain accepted routes across turns; a scoped apply changes the root's epoch and invalidates old pending reservations. Child epochs come only from child-owned history/native live ownership. Cold admissions do not resurrect an old process-local lock merely from history. This metadata does not add model-visible prompt text, create a resumable child lifecycle, or substitute for session sidecars.
|
|
47
61
|
|
|
48
62
|
On DSH 0.2.0-rc.2, durable custom metadata requires explicit deployment-only `sessionPersistence: {root, compression}` on the main DSMM Loader entry. DSMM mounts its native JSONL companion and awaits readiness before installing runtime hooks. The public `@dsmm/dsmm/session-persistence` export is a library building block, not a second package Loader source. An incompatible durable provider is rejected before DSMM appends its custom event; ephemeral Hosts without persistence remain allowed. Native `Session.append` cannot set the stock-reader `ignorable` marker itself. See [persistence compatibility](compatibility.md#session-persistence-compatibility) for preserving the effective storage settings, disabling the exact stock provider at startup, and old-log repair limits. Final frozen-artifact/production acceptance remains pending; source contracts are not release proof.
|
|
49
63
|
|
package/docs/profiles.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Deepwork runtime profiles (0.1.
|
|
1
|
+
# Deepwork runtime profiles (0.1.5 source contract)
|
|
2
2
|
|
|
3
|
-
This guide describes the 0.1.
|
|
3
|
+
This guide describes the 0.1.5 source contract. It is not evidence of a published package or completed Docker/Desktop acceptance; see [releasing](releasing.md). Deepwork is the display name; package, storage and configuration IDs retain `dsmm` for compatibility. Historical 0.1.4 release identities and continuation evidence stay immutable.
|
|
4
4
|
|
|
5
5
|
A Deepwork runtime profile is a named file containing runtime policy, not a native deployment profile or an Agent role preset. Native Settings → **Deepwork Profiles** / **Deepwork 配置档** provides create/read/edit/save, explicit apply, and reset to the deployment baseline. The native Agent preset selector remains a separate role selector, displaying `DW …` names under unchanged `dsmm-*` IDs.
|
|
6
6
|
|
|
@@ -13,6 +13,7 @@ The native `profileContext.dir` is the only storage authority. No guessed user-h
|
|
|
13
13
|
| `<profileContext.dir>/dsmm-profiles/<id>.jsonc` | Editable named draft |
|
|
14
14
|
| `<profileContext.dir>/dsmm-profiles/.revisions/<sha256>.jsonc` | Immutable exact bytes pinned by an explicit apply |
|
|
15
15
|
| `<profileContext.dir>/dsmm-profiles/.selection.json` | Minimal selection pointer: `{version: 1, id, revision}` |
|
|
16
|
+
| `<profileContext.dir>/dsmm-profiles/.sessions/<sha256(native-session-id)>.json` | Explicit session choice: exact session ID, pinned profile/baseline, CAS revision and admission epoch; no history or credentials |
|
|
16
17
|
|
|
17
18
|
IDs are filename-safe identifiers, not paths; reserved names, case collisions and link traversal are rejected. A document has exactly `version: 1`, `id`, optional `label`, and `settings`. For example, a draft named `careful.jsonc` may contain:
|
|
18
19
|
|
|
@@ -32,7 +33,9 @@ IDs are filename-safe identifiers, not paths; reserved names, case collisions an
|
|
|
32
33
|
"model": "my-existing-model",
|
|
33
34
|
"reasoningEffort": "high"
|
|
34
35
|
},
|
|
35
|
-
"fallbackRoutes": []
|
|
36
|
+
"fallbackRoutes": [],
|
|
37
|
+
"strategy": "startup-lock",
|
|
38
|
+
"rateLimit": { "maxRetries": 3, "maxTotalDelayMs": 30000 }
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
"runtimeRecovery": { "enabled": false }
|
|
@@ -40,7 +43,7 @@ IDs are filename-safe identifiers, not paths; reserved names, case collisions an
|
|
|
40
43
|
}
|
|
41
44
|
```
|
|
42
45
|
|
|
43
|
-
The example provider/model must
|
|
46
|
+
The example provider/model must be native-resolvable and advertise the specified effort. Catalog listing is advisory: a manually configured route can be resolvable while absent from the list. It introduces no provider, account or credential. Explicit `fallbackRoutes: []` disables that role's fallback chain; it is not equivalent to omitting the key and inheriting a global chain.
|
|
44
47
|
|
|
45
48
|
## Supported settings and precedence
|
|
46
49
|
|
|
@@ -48,6 +51,7 @@ The exact top-level `settings` allowlist is:
|
|
|
48
51
|
|
|
49
52
|
- `defaultActive`
|
|
50
53
|
- `roleRouting`
|
|
54
|
+
- `runtimePolicy` (optional inherited strategy and finite `rateLimit` defaults)
|
|
51
55
|
- `workflow`
|
|
52
56
|
- `guards`
|
|
53
57
|
- `runtimeRecovery`
|
|
@@ -60,9 +64,13 @@ Effective settings resolve in this order: **built-in DSMM defaults → deploymen
|
|
|
60
64
|
|
|
61
65
|
## Save versus apply
|
|
62
66
|
|
|
63
|
-
Create or open a draft in native Settings,
|
|
67
|
+
Create or open a draft in native Settings and use the role-specific primary provider/model/exact-effort controls, ordered fallback rows, strategy and bounded retry fields. Each role can choose `startup-lock` or `rate-limit-fallback` independently; blank policy fields inherit, zero is explicit, and an empty fallback chain is not inheritance. Provider/model changes clear stale explicit effort. Catalog refresh preserves configured/manual values and does not select the native/global model default. Advanced JSONC remains available for custom routes and other supported settings.
|
|
64
68
|
|
|
65
|
-
|
|
69
|
+
Saving validates the draft and preserves edited raw JSONC/comments, but does not activate it—even if the same ID is currently selected. Structured changes edit only their JSONC paths; invalid raw text remains visible and cannot be silently normalized by returning to the form. Unsaved edits must be saved or explicitly discarded before switching away.
|
|
70
|
+
|
|
71
|
+
**Apply saved profile** is a separate global-default operation. It checks the expected draft revision, validates runtime fields and native route/effort semantics, pins the draft's exact bytes in `.revisions`, and atomically commits `.selection.json`. Only after the pointer commit succeeds may the current in-memory selection change. The UI distinguishes the editable draft, selected immutable revision for future Agents, and an existing Agent's admitted snapshot. **Reset to baseline** clears the global runtime selection for future unscoped Agents; it does not delete drafts or mutate an existing Agent.
|
|
72
|
+
|
|
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.
|
|
66
74
|
|
|
67
75
|
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.
|
|
68
76
|
|
|
@@ -70,9 +78,11 @@ Storage uses bounded validated content, containment/link checks under a cross-pr
|
|
|
70
78
|
|
|
71
79
|
## Agent lifetime and restart
|
|
72
80
|
|
|
73
|
-
|
|
81
|
+
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.
|
|
74
82
|
|
|
75
|
-
|
|
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.
|
|
84
|
+
|
|
85
|
+
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.
|
|
76
86
|
|
|
77
87
|
Older sessions whose selected root ID is now auxiliary-only may fail native cold resume with an unknown preset ID. Read [compatibility](compatibility.md) before upgrading; never silently switch their persona or erase history.
|
|
78
88
|
|
|
@@ -80,4 +90,6 @@ Older sessions whose selected root ID is now auxiliary-only may fail native cold
|
|
|
80
90
|
|
|
81
91
|
Migration from 0.1.1 is explicit: save supported runtime values as a named draft, preserve deployment roles/skills/provider/account/UI rows, inspect the draft, then apply separately. No operation rewrites `cordis.patch.yml` or migrates credentials. Native RPC authorization applies on the backend as well as the UI. There are no model-visible profile-management tools, child write capabilities, anonymous endpoints or authentication bypasses.
|
|
82
92
|
|
|
83
|
-
For policy rollback,
|
|
93
|
+
For policy rollback, explicitly choose global baseline, session baseline, or a reviewed prior profile in the intended scope using current CAS/epoch values. Never overwrite an immutable revision or restore draft bytes over a later user edit. Global rollback leaves existing live Agents unchanged; scoped rollback changes only the admitted idle root and future children. Package rollback is separate and uses an exact known immutable package through the official carrier; see [releasing](releasing.md).
|
|
94
|
+
|
|
95
|
+
0.1.4 documents remain loadable without rewriting user files. Omitted strategy now means the safer `startup-lock`; a legacy generic fallback chain no longer silently hops after later generic failures. `runtimeRecovery.enabled` is not the strategy selector. Read [runtime recovery](runtime-recovery.md) before upgrading a configuration that depended on generic automatic fallback.
|
package/docs/releasing.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
# Deepwork 0.1.
|
|
1
|
+
# Deepwork 0.1.5 Release and Rollback
|
|
2
2
|
|
|
3
|
-
This is a future procedure for 0.1.
|
|
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.
|
|
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
|
+
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.
|
|
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.
|
|
6
8
|
|
|
7
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.
|
|
8
10
|
|
|
@@ -29,11 +31,11 @@ The root typecheck, test and build must pass before committing. Build before gen
|
|
|
29
31
|
|
|
30
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.
|
|
31
33
|
|
|
32
|
-
For 0.1.
|
|
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.
|
|
33
35
|
|
|
34
36
|
## Phase 1: frozen artifact and independent Docker gate
|
|
35
37
|
|
|
36
|
-
Use the dedicated `.github/workflows/dsmm-release.yml` **future tag path** for the authorized `dsmm-scoped-v0.1.
|
|
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.
|
|
37
39
|
|
|
38
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.
|
|
39
41
|
|
|
@@ -45,13 +47,19 @@ Use a fresh image/process/home and exact pinned DSH, installing the packed packa
|
|
|
45
47
|
- Save without activation; new-Agent-only apply; existing even-blank Agent retention; inherited child/recovery settings; fresh-process pinned current selection despite a subsequently edited draft; truthful cold-resume/removed auxiliary-root limitations.
|
|
46
48
|
- Existing native web/headless, session-persistence/history compatibility, LSP, sentinel and cleanup scenarios remain required; naming checks do not replace these runtime contracts.
|
|
47
49
|
|
|
50
|
+
Successor acceptance additionally requires the compiled structured editor's native catalog round-trip, comment/unrelated-setting preservation, ordered fallback controls, unlisted native-resolvable routes, and invalid raw retention. Exercise real current-session UI apply, two independent roots, sidecar CAS and fresh epochs, busy/maintenance/child refusal, old/new child isolation and same-revision reapply. Cold-resume the exact pinned sidecar after changing the global default, then compare stock native visible history and request headers. Place an owned regular profile lock **before** a second real native Loader starts; prove visible refusal and unchanged pointer/lock ownership, with a truthful observed root-roster disposition.
|
|
51
|
+
|
|
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
|
+
|
|
54
|
+
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
|
+
|
|
48
56
|
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.
|
|
49
57
|
|
|
50
58
|
## Phase 2: authorized immutable publication
|
|
51
59
|
|
|
52
|
-
Publication requires explicit authorization for the new identity. Recheck `@dsmm/dsmm@0.1.
|
|
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.
|
|
53
61
|
|
|
54
|
-
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.
|
|
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.
|
|
55
63
|
|
|
56
64
|
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`.
|
|
57
65
|
|
|
@@ -65,22 +73,22 @@ After the matching workflow terminates, run `scripts/check-dsmm-release-completi
|
|
|
65
73
|
|
|
66
74
|
```powershell
|
|
67
75
|
$env:DSH_HOME = "<fresh-task-owned-verification-home>"
|
|
68
|
-
dsh --profile dsmm-0.1.
|
|
69
|
-
dsh plugin --profile dsmm-0.1.
|
|
70
|
-
dsh plugin --profile dsmm-0.1.
|
|
71
|
-
dsh --profile dsmm-0.1.
|
|
72
|
-
npm view @dsmm/dsmm@0.1.
|
|
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/"
|
|
73
81
|
```
|
|
74
82
|
|
|
75
83
|
## Phase 3: official installed-carrier Desktop rollout
|
|
76
84
|
|
|
77
|
-
Only after terminal 0.1.
|
|
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.
|
|
78
86
|
|
|
79
|
-
Preserve base/web bundles, deployment roles/skills,
|
|
87
|
+
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.
|
|
80
88
|
|
|
81
89
|
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.
|
|
82
90
|
|
|
83
|
-
After a supported restart, verify actual Desktop package 0.1.
|
|
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.
|
|
84
92
|
|
|
85
93
|
## Rollback
|
|
86
94
|
|
package/docs/runtime-recovery.md
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
|
-
# Runtime recovery
|
|
1
|
+
# Runtime recovery and route strategies (0.1.5)
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Two independent role strategies
|
|
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
|
+
|
|
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.
|
|
8
|
+
|
|
9
|
+
| Policy field | Default | Strict integer bound |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `maxRetries` | 3 | 0–10 |
|
|
12
|
+
| `initialDelayMs` | 500 | 0–30000 |
|
|
13
|
+
| `maxDelayMs` | 10000 | 0–30000 |
|
|
14
|
+
| `maxTotalDelayMs` | 30000 | 0–120000 |
|
|
15
|
+
| `switchAfterRateLimits` | 3 | 1–10 |
|
|
16
|
+
| `maxSwitches` | 2 | 0–10 |
|
|
17
|
+
|
|
18
|
+
`maxRetries` counts requests after the first on a route; the threshold includes that first distinct failed attempt. If retry budget runs out before threshold, stop. A switch starts fresh same-route counters but consumes the admission epoch's switch cap. Malformed, unknown, fractional or nonfinite values fail instead of becoming different defaults.
|
|
19
|
+
|
|
20
|
+
## Legacy defaults and migration
|
|
21
|
+
|
|
22
|
+
The legacy continuation/configuration block remains parse-compatible, with this complete default:
|
|
6
23
|
|
|
7
24
|
```yaml
|
|
8
25
|
runtimeRecovery:
|
|
@@ -17,23 +34,31 @@ runtimeRecovery:
|
|
|
17
34
|
prompt: "Continue the current task from the durable goal or unfinished todo list. Do not repeat completed work."
|
|
18
35
|
```
|
|
19
36
|
|
|
20
|
-
`maxFallbackAttempts` and `idleContinuation.maxContinuations`
|
|
37
|
+
`maxFallbackAttempts` and `idleContinuation.maxContinuations` retain their legacy finite cap grammar. An empty `fallbackRoutes` list is valid and supplies no alternatives. The legacy `runtimeRecovery.enabled` flag is not the strategy selector and does not gate the new scoped finite RATE_LIMIT policy.
|
|
21
38
|
|
|
22
|
-
|
|
39
|
+
0.1.4 documents remain loadable without rewriting drafts, deployment patches or history. The migration is behavioral: omitted strategy now means safer `startup-lock`, so retained generic `SERVER`, `TIMEOUT`, `TRANSPORT` or status-based retry lists do not imply later automatic channel hopping. Explicitly choose `rate-limit-fallback` only where rate-limit rollover is intended. This release supplies no inferred generic-behavior opt-in. Inspect normalized effective role policy before upgrading a deployment that depended on the old automatic behavior.
|
|
23
40
|
|
|
24
|
-
|
|
41
|
+
## Role-specific chains
|
|
42
|
+
|
|
43
|
+
`roleRouting.<role>.fallbackRoutes` uses the same route shape, with optional exact native `reasoningEffort`. The resolved strategy/retry policy, not legacy enabled state, controls scoped RATE_LIMIT behavior. Configuring a chain does not enable idle continuation.
|
|
25
44
|
|
|
26
45
|
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
46
|
|
|
28
|
-
To migrate
|
|
47
|
+
To migrate explicit role chains, choose each role's strategy deliberately, keep inherited/global alternatives explicit where needed, and leave `idleContinuation.enabled:false`. Omission resolves to startup lock, not legacy generic recovery. Exact effort omission clears stale adapter-owned effort while preserving unrelated native parameters.
|
|
48
|
+
|
|
49
|
+
## Universal no-output fence and one retry owner
|
|
50
|
+
|
|
51
|
+
Every DSMM retry or switch requires positive no-output proof, even when staying on the same model. Exact Agent/admission epoch/lock generation, live attempt ID, turn/step, accepted header and committed assistant settlement must match. Dense live chunks must agree with the validated durable compact stream and its exact terminal failure. Missing, stale, mismatched, ambiguous, abandoned or duplicate evidence refuses before spending budget or waiting.
|
|
52
|
+
|
|
53
|
+
Any accepted text, reasoning, tool-call fragment, block start/end or executed tool forbids replay. Both strategies' deterministic partial-text → RATE_LIMIT and partial-tool-fragment → RATE_LIMIT cases require one provider request, zero tools and terminal refusal. Already completed earlier tools stay unchanged. Same-route retries are not exempt.
|
|
29
54
|
|
|
30
|
-
|
|
55
|
+
Inside the scoped DSMM RATE_LIMIT/unavailable branch, DSMM owns the native `agent/request-error` decision. Refusal is terminal and never falls through to native `mode:always` or another competing retry handler. Outside that branch, native host-first behavior and exact downstream result identity remain unchanged. All provider calls and step retries stay inside the native loop; DSMM neither calls a provider directly nor synthesizes a prompt, restarts a turn or replays tools.
|
|
31
56
|
|
|
32
|
-
|
|
57
|
+
Only exact native `NO_ADAPTER` or adapter-proven `UNKNOWN_MODEL` on the first actual no-output request may advance a remaining startup candidate. Contradictory 401/403/402/429 facts, authorization, quota/payment, context, cancellation, transport/server ambiguity or error-message text do not establish availability. Later generic failures cannot hop.
|
|
33
58
|
|
|
34
|
-
|
|
59
|
+
One finite abortable middleware delay may honor valid `providerRetryAfterMs` only within per-delay and total budgets. Invalid or too-large values refuse instead of causing infinite waiting or uncontrolled retry. Abort/disposal/epoch/header/provider replacement and closed/superseded boundaries cancel or invalidate pending work. No independent timer-driven request exists.
|
|
35
60
|
|
|
36
|
-
`
|
|
61
|
+
Fresh native `model/selection` intent also invalidates old reservations, even when provider/model/effort is unchanged. DSMM captures the exact typed user intent at native prompt-assembly start and correlates it with the native-selected request; a concurrently newer choice is for the next assembly, never a retrofit of the current frame. Explicit user provider/model/effort outranks profile primary/defaults on later turns and cold resume. Profile apply advances the admission epoch and policy without silently clearing native user intent. A parent's manual choice is not authority to overwrite a configured child's own role route.
|
|
37
62
|
|
|
38
63
|
## Request ordering
|
|
39
64
|
|
|
@@ -41,7 +66,7 @@ The recovery request path applies a matching pending fallback route after native
|
|
|
41
66
|
|
|
42
67
|
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.
|
|
43
68
|
|
|
44
|
-
Duplicate failure delivery cannot select a second pending
|
|
69
|
+
Duplicate failure delivery cannot select a second pending route. Closed/superseded turn/step boundaries and aborted signals cannot commit a late route. HTTP 402 never authorizes strategy rollover. No real billing/rate-limit error is manufactured for testing.
|
|
45
70
|
|
|
46
71
|
## Durable continuation
|
|
47
72
|
|
|
@@ -55,7 +80,7 @@ Steering failure consumes an attempt and produces a sanitized warn/fail-open res
|
|
|
55
80
|
|
|
56
81
|
## Cold restart
|
|
57
82
|
|
|
58
|
-
|
|
83
|
+
An explicit session sidecar pins its exact immutable profile/baseline on cold resume; absent sidecars retain the historical global-current contract. Process-local attempts, waits, counters and locks do not resurrect from old headers alone. New admission epochs fence old reservations and route folds while the audited `dsmm/role-policy` event retains its exact grammar. There is no continuation until the user/native host resumes activity. See [profiles](profiles.md).
|
|
59
84
|
|
|
60
85
|
## Subagent recovery
|
|
61
86
|
|
|
@@ -66,7 +91,7 @@ To investigate an interrupted child, use the native durable descriptor and child
|
|
|
66
91
|
## Non-goals and logging
|
|
67
92
|
|
|
68
93
|
- No fake or extended `llm/retry` events.
|
|
69
|
-
- No retry timer
|
|
94
|
+
- No independent retry timer/request engine, session aborts, or background polling; only finite abortable delay in the existing native error middleware.
|
|
70
95
|
- No cross-process automatic retry.
|
|
71
96
|
- No provider discovery or heuristic fallback chain.
|
|
72
97
|
- No provider-message parsing or classification, and no provider calls outside the host request loop.
|