@dsmm/dsmm 0.2.0 → 0.3.0
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 +37 -67
- package/agent-presets/dsmm-builder/agent.cordis.yml +10 -2015
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +24 -343
- package/agent-presets/dsmm-code-search/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-coding/agent.cordis.yml +19 -438
- package/agent-presets/dsmm-complex/agent.cordis.yml +23 -1009
- package/agent-presets/dsmm-creative/agent.cordis.yml +25 -442
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +29 -1013
- package/agent-presets/dsmm-deep/agent.cordis.yml +24 -1008
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-documenting/agent.cordis.yml +26 -439
- package/agent-presets/dsmm-frontend/agent.cordis.yml +21 -440
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +22 -441
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +19 -438
- package/agent-presets/dsmm-oracle/agent.cordis.yml +25 -340
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +25 -340
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +29 -2025
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +24 -341
- package/agent-presets/dsmm-planner/agent.cordis.yml +14 -344
- package/agent-presets/dsmm-quick/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-research/agent.cordis.yml +23 -8
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +25 -340
- package/cordis.patch.yml +14 -0
- package/docs/agent-presets.md +36 -52
- package/docs/compatibility.md +47 -110
- package/docs/deferred-native-approval-risk.md +19 -0
- package/docs/design.md +2 -2
- package/docs/lsp.md +11 -21
- package/docs/migration-from-ocmm.md +2 -2
- package/docs/model-routing.md +84 -59
- package/docs/native-permissions.md +35 -0
- package/docs/profiles.md +40 -87
- package/docs/releasing.md +123 -2
- package/docs/roadmap.md +71 -17
- package/docs/settings-status.md +34 -169
- package/docs/skill-sync.md +52 -15
- package/lib/agent-registry.d.ts +36 -0
- package/lib/agent-registry.js +75 -0
- package/lib/child-admission-contract.d.ts +37 -0
- package/lib/child-admission-contract.js +2 -0
- package/lib/child-admission.d.ts +40 -0
- package/lib/child-admission.js +151 -0
- package/lib/child-capture.d.ts +85 -0
- package/lib/child-capture.js +205 -0
- package/lib/child-evidence.d.ts +17 -0
- package/lib/child-evidence.js +43 -0
- package/lib/client/ChildrenPanel.d.ts +43 -0
- package/lib/client/ChildrenPanel.js +82 -0
- package/lib/client/DeploymentPage.js +15 -8
- package/lib/client/EditableChoice.d.ts +17 -0
- package/lib/client/EditableChoice.js +49 -0
- package/lib/client/PermissionsPanel.d.ts +14 -0
- package/lib/client/PermissionsPanel.js +46 -0
- package/lib/client/ProfilesSection.js +30 -15
- package/lib/client/RoleAvailability.d.ts +7 -0
- package/lib/client/RoleAvailability.js +19 -0
- package/lib/client/SessionProfiles.js +27 -9
- package/lib/client/StructuredEditor.js +15 -7
- package/lib/client/children-controller.d.ts +98 -0
- package/lib/client/children-controller.js +296 -0
- package/lib/client/children-locales.d.ts +367 -0
- package/lib/client/children-locales.js +69 -0
- package/lib/client/controller.d.ts +6 -1
- package/lib/client/controller.js +14 -8
- package/lib/client/deployment-controller.js +1 -1
- package/lib/client/deployment-data.d.ts +2 -1
- package/lib/client/deployment-data.js +34 -5
- package/lib/client/deployment-locales.d.ts +4 -0
- package/lib/client/deployment-locales.js +11 -2
- package/lib/client/diagnostics.d.ts +14 -0
- package/lib/client/diagnostics.js +53 -0
- package/lib/client/index.d.ts +4 -0
- package/lib/client/index.js +96 -2
- package/lib/client/locales.d.ts +54 -0
- package/lib/client/locales.js +34 -16
- package/lib/client/permission-client.d.ts +16 -0
- package/lib/client/permission-client.js +38 -0
- package/lib/client/permission-controller.d.ts +62 -0
- package/lib/client/permission-controller.js +149 -0
- package/lib/client/permission-locales.d.ts +114 -0
- package/lib/client/permission-locales.js +75 -0
- package/lib/client/session-labels.js +4 -4
- package/lib/client/structured.js +19 -5
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +20 -0
- package/lib/client.js +5780 -1679
- package/lib/core-permission-authority.d.ts +18 -0
- package/lib/core-permission-authority.js +255 -0
- package/lib/core-permissions.d.ts +8 -0
- package/lib/core-permissions.js +33 -0
- package/lib/delivery-authority.d.ts +83 -0
- package/lib/delivery-authority.js +397 -0
- package/lib/deployment-config.d.ts +23 -0
- package/lib/deployment-config.js +61 -40
- package/lib/deployment-permission-rules.d.ts +55 -0
- package/lib/deployment-permission-rules.js +306 -0
- package/lib/dsh-types.d.ts +10 -4
- package/lib/guards.d.ts +1 -1
- package/lib/guards.js +29 -8
- package/lib/host-llm-startup.d.ts +41 -0
- package/lib/host-llm-startup.js +65 -0
- package/lib/host-llm.d.ts +92 -0
- package/lib/host-llm.js +325 -0
- package/lib/index.d.ts +15 -4
- package/lib/index.js +288 -48
- package/lib/live-pi-ai-owner.d.ts +18 -0
- package/lib/live-pi-ai-owner.js +144 -0
- package/lib/llm-runtime.d.ts +11 -0
- package/lib/llm-runtime.js +21 -0
- package/lib/managed-settings.d.ts +5 -0
- package/lib/managed-settings.js +14 -0
- package/lib/model-parameter-policy.d.ts +11 -0
- package/lib/model-parameter-policy.js +27 -0
- package/lib/model-routing.js +28 -17
- package/lib/modules.d.ts +13 -5
- package/lib/modules.js +17 -1
- package/lib/native-child-evidence.d.ts +40 -0
- package/lib/native-child-evidence.js +104 -0
- package/lib/native-pi-ai-wire.d.ts +37 -0
- package/lib/native-pi-ai-wire.js +261 -0
- package/lib/native-scope.js +1 -1
- package/lib/permission-bash.d.ts +6 -0
- package/lib/permission-bash.js +7 -0
- package/lib/permission-control.d.ts +73 -0
- package/lib/permission-control.js +205 -0
- package/lib/permission-controller.d.ts +68 -0
- package/lib/permission-controller.js +317 -0
- package/lib/permission-errors.d.ts +7 -0
- package/lib/permission-errors.js +21 -0
- package/lib/permission-fs-search.d.ts +5 -0
- package/lib/permission-fs-search.js +7 -0
- package/lib/permission-fs.d.ts +5 -0
- package/lib/permission-fs.js +7 -0
- package/lib/permission-native-access.d.ts +11 -0
- package/lib/permission-native-access.js +6 -0
- package/lib/permission-native-command.d.ts +10 -0
- package/lib/permission-native-command.js +93 -0
- package/lib/permission-native-rules.d.ts +75 -0
- package/lib/permission-native-rules.js +278 -0
- package/lib/permission-pwsh.d.ts +6 -0
- package/lib/permission-pwsh.js +7 -0
- package/lib/permission-remote.d.ts +26 -0
- package/lib/permission-remote.js +53 -0
- package/lib/permission-rpc.d.ts +29 -0
- package/lib/permission-rpc.js +152 -0
- package/lib/permission-rules.d.ts +115 -0
- package/lib/permission-rules.js +256 -0
- package/lib/permission-settings.d.ts +45 -0
- package/lib/permission-settings.js +48 -0
- package/lib/permission-shell.d.ts +38 -0
- package/lib/permission-shell.js +150 -0
- package/lib/permission-web.d.ts +5 -0
- package/lib/permission-web.js +7 -0
- package/lib/preset-registry.js +36 -25
- package/lib/profile-diagnostics.d.ts +45 -0
- package/lib/profile-diagnostics.js +148 -0
- package/lib/profile-locale.d.ts +3 -0
- package/lib/profile-locale.js +2 -0
- package/lib/profile-remote.d.ts +8 -0
- package/lib/profile-remote.js +163 -39
- package/lib/profile-rpc.d.ts +4 -3
- package/lib/profile-rpc.js +20 -16
- package/lib/profile-runtime.d.ts +40 -1
- package/lib/profile-runtime.js +368 -93
- package/lib/profile-store.d.ts +11 -0
- package/lib/profile-store.js +143 -11
- package/lib/profile-types.d.ts +70 -1
- package/lib/profile-types.js +1 -0
- package/lib/profiles.d.ts +16 -2
- package/lib/profiles.js +156 -79
- package/lib/prompt-content.js +1 -1
- package/lib/prompts.d.ts +37 -2
- package/lib/prompts.js +111 -9
- package/lib/recovery-policy.js +20 -7
- package/lib/role-control-remote.d.ts +38 -0
- package/lib/role-control-remote.js +211 -0
- package/lib/role-control-rpc.d.ts +51 -0
- package/lib/role-control-rpc.js +381 -0
- package/lib/role-control-types.d.ts +92 -0
- package/lib/role-control-types.js +8 -0
- package/lib/role-invocation.d.ts +47 -0
- package/lib/role-invocation.js +135 -0
- package/lib/role-llm-runtime.d.ts +17 -0
- package/lib/role-llm-runtime.js +62 -0
- package/lib/role-llm.d.ts +31 -0
- package/lib/role-llm.js +66 -0
- package/lib/role-policy.d.ts +46 -8
- package/lib/role-policy.js +421 -61
- package/lib/role-providers.d.ts +2 -2
- package/lib/role-providers.js +27 -72
- package/lib/role-routing.d.ts +11 -2
- package/lib/role-routing.js +42 -25
- package/lib/role-runs.d.ts +138 -0
- package/lib/role-runs.js +335 -0
- package/lib/role-subagents.d.ts +58 -3
- package/lib/role-subagents.js +179 -56
- package/lib/roles.d.ts +5 -6
- package/lib/roles.js +10 -39
- package/lib/route-json.d.ts +19 -0
- package/lib/route-json.js +129 -0
- package/lib/routing-policy.d.ts +2 -0
- package/lib/routing-policy.js +12 -2
- package/lib/runtime-integration.d.ts +81 -0
- package/lib/runtime-integration.js +702 -0
- package/lib/runtime-recovery.js +18 -8
- package/lib/session-persistence.d.ts +2 -1
- package/lib/session-persistence.js +1 -1
- package/lib/session-scope.js +4 -1
- package/lib/settings.d.ts +47 -13
- package/lib/settings.js +217 -82
- package/lib/skills.js +2 -2
- package/lib/status.d.ts +10 -1
- package/lib/status.js +11 -8
- package/lib/subagent-runtime.d.ts +57 -0
- package/lib/subagent-runtime.js +257 -0
- package/package.json +149 -89
- package/patches/subagent-runtime.yml +15 -0
- package/prompts/deepseek-flash.md +1 -1
- package/prompts/deepseek-v4-pro.md +2 -2
- package/prompts/deepwork.md +27 -18
- package/prompts/source/agents/clarifier.md +5 -3
- package/prompts/source/agents/orchestrator.md +18 -9
- package/prompts/source/agents/plan-critic.md +5 -1
- package/prompts/source/agents/planner.md +4 -2
- package/prompts/source/agents/reviewer.md +6 -0
- package/prompts/source/category/complex.md +4 -4
- package/prompts/source/category/creative.md +6 -4
- package/prompts/source/category/cross-cutting.md +10 -8
- package/prompts/source/category/deep.md +5 -3
- package/prompts/source/category/documenting.md +7 -1
- package/prompts/source/category/frontend.md +2 -2
- package/prompts/source/category/hard-reasoning.md +3 -3
- package/prompts/source/category/research.md +4 -2
- package/prompts/source/deepwork/claude-opus-5.md +2 -2
- package/prompts/source/deepwork/codex.md +1 -1
- package/prompts/source/deepwork/default.md +22 -15
- package/prompts/source/deepwork/gemini.md +23 -16
- package/prompts/source/deepwork/glm.md +21 -14
- package/prompts/source/deepwork/gpt.md +12 -6
- package/prompts/source/deepwork/planner.md +8 -5
- package/prompts/source/manifest.json +178 -63
- package/prompts/source/shared/dsh-host-contract.md +5 -3
- package/prompts/source/shared/locale.md +2 -2
- package/prompts/source/terminal/orchestrator.md +1 -1
- package/skills/ast-grep/SKILL.md +7 -4
- package/skills/brainstorming/SKILL.md +43 -22
- package/skills/coding-agent-sessions/SKILL.md +7 -4
- package/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -46
- package/skills/coding-agent-sessions/scripts/tests/test_pi_family_scanners.py +130 -130
- package/skills/debugging/SKILL.md +14 -9
- package/skills/debugging/references/methodology/00-setup.md +14 -62
- package/skills/debugging/references/methodology/02-investigate.md +4 -4
- package/skills/debugging/references/methodology/03-flaky-triage.md +3 -3
- package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +2 -14
- package/skills/debugging/references/methodology/06-fix.md +6 -6
- package/skills/debugging/references/methodology/08-qa.md +5 -5
- package/skills/debugging/references/methodology/09-cleanup.md +15 -153
- package/skills/debugging/references/methodology/partial-runtime-evidence.md +3 -16
- package/skills/debugging/references/runtimes/bundled-js-binary.md +1 -16
- package/skills/debugging/references/runtimes/native-binary.md +9 -54
- package/skills/debugging/references/runtimes/node.md +4 -15
- package/skills/debugging/references/runtimes/python.md +3 -15
- package/skills/debugging/references/runtimes/rust.md +2 -18
- package/skills/debugging/references/tools/dap.md +1 -1
- package/skills/debugging/references/tools/ghidra.md +4 -15
- package/skills/debugging/references/tools/playwright-cli.md +3 -15
- package/skills/debugging/references/tools/pwntools.md +4 -16
- package/skills/dispatching-parallel-agents/SKILL.md +18 -16
- package/skills/frontend/SKILL.md +7 -4
- package/skills/frontend/references/design/react-dev-tooling-skill.md +1 -1
- package/skills/git-master/SKILL.md +7 -4
- package/skills/init-deep/SKILL.md +7 -4
- package/skills/receiving-code-review/SKILL.md +17 -12
- package/skills/remove-ai-slops/SKILL.md +39 -38
- package/skills/requesting-code-review/SKILL.md +19 -17
- package/skills/requesting-code-review/code-reviewer.md +13 -1
- package/skills/subagent-driven-development/SKILL.md +29 -26
- package/skills/subagent-driven-development/implementer-prompt.md +29 -11
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +6 -1
- package/skills/using-git-worktrees/SKILL.md +7 -4
- package/skills/writing-plans/SKILL.md +29 -24
- package/skills/writing-plans/plan-document-reviewer-prompt.md +10 -1
- package/scripts/repair-session-log.mjs +0 -476
- package/scripts/session-repair-native-verifier.mjs +0 -367
package/docs/settings-status.md
CHANGED
|
@@ -1,206 +1,71 @@
|
|
|
1
1
|
# Deepwork settings and status
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
These are built source contracts, not a claim that the published `@dsmm/dsmm@0.2.0` artifact contains every source feature. Named policy is covered in [profiles](profiles.md), routing in [model routing](model-routing.md), and child authority in [Agent presets](agent-presets.md).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Deployment layers and native editors
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Effective settings resolve from **defaults → sparse global base → explicit native entry/profile override → admitted immutable named overlay**. The global base is `<resolvedDshHome>/plugins/dsmm/config.json`; a missing file is an empty layer. This is DSMM's storage convention, not a mandated Host layout. Trusted home resolution uses explicit `profileContext.home`, then `DSH_HOME`, then the official home default.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
<a id="native-plugins-configuration-d"></a>
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
**Plugins → DSMM** edits the global base through fixed `remote.dsmmConfig`. The DSMM bundle and actual row Config pages also offer the current native-profile override through the public `ConfigPageForm`. Runtime entry ID, package ID, row ID and form namespace aren't interchangeable. A profile write requires the actual namespace, descriptor revision and matching raw base/user provenance. If that identity isn't available, the profile editor is unavailable or read-only; it never falls back to Global. The standalone Plugins item has no supplied profile form.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Global and native-profile controls have independent Save, Refresh and Discard actions and revisions. There's no Save all or cross-layer transaction. Missing keys inherit, explicit same-default values pin, and Unset removes only the edited layer's key, not a higher Host pin. Plain objects merge recursively and arrays replace. Full merged validation follows sparse-layer validation; unknown/prototype keys, non-JSON values and raw volatile refs refuse.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Native structural controls and bounded schema-aware Advanced JSON cover applicable deployment settings. Advanced input is strict JSON, not named-document JSONC. Invalid text and conflicts stay visible. Refresh preserves dirty input and its original revision; explicit discard/reload rebases it. Connection replacement, disconnection, entry replacement and disposal fence old writes. Saving doesn't restart, cancel, apply a named profile or respawn LSP.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
`DSMM_CONFIG_SCHEMA` remains the plain sparse public ABI. Native Loader `Config` uses the separate `DSMM_NATIVE_CONFIG_SCHEMA`, with flat optional volatile transport fields. Full business defaults and validation apply after layer resolution, not as transport defaults. Legacy raw flat callers keep every explicit value, including a value equal to the built-in default. The removed `settings.register()` namespace and old `$DSH_HOME/settings.yaml` aren't DSMM storage interfaces.
|
|
20
|
-
|
|
21
|
-
Direct public `Config(input)` calls return plain flat data and require complete explicit model-route pairs, preserving `resolveConfig(Config(input))`. Native Cordis consumes the same Config object's Standard Schema protocol to obtain sparse volatile refs. Sparse deployment-layer validation can inherit primary members across global/native layers; their full merge is revalidated. No schema-expanded defaults or resolved refs are used to infer raw presence.
|
|
22
|
-
|
|
23
|
-
The snapshot's `profile` is the assembled explicit native entry layer, which can include bundle/home/CLI pins; it isn't a claim that every field came from the editable profile file. When available, `nativeForm.base`/`user` retain the public redacted descriptor provenance and `nativeFormRevision` is its actual CAS. Higher host pins cannot be cleared by profile unset; native ConfigEditor rejects a write whose result is overridden by another host layer. DSMM doesn't inspect private layers or evaluate `!!js` to guess presence.
|
|
24
|
-
|
|
25
|
-
The following is an explicit native profile override, not the global file format. Keep existing values when editing a Cordis patch; its `config` replaces the row's config object:
|
|
26
|
-
|
|
27
|
-
```yaml
|
|
28
|
-
- id: dsmm
|
|
29
|
-
config:
|
|
30
|
-
defaultActive: true
|
|
31
|
-
modeName: deepwork
|
|
32
|
-
workflow:
|
|
33
|
-
policy: risk-based
|
|
34
|
-
deepseekFlashCalibration: auto
|
|
35
|
-
deepseekFlashDefaultReasoningEffort: high
|
|
36
|
-
deepseekFlashMaxReasoningPresets:
|
|
37
|
-
- dsmm-plan-critic
|
|
38
|
-
- dsmm-reviewer
|
|
39
|
-
runtimeRecovery:
|
|
40
|
-
enabled: false
|
|
41
|
-
lsp:
|
|
42
|
-
enabled: false
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Plain objects merge recursively and arrays replace whole arrays. Missing keys inherit; an empty object doesn't erase inherited children. Valid explicit `false`, `0`, `""` and `[]` aren't omission. Unset removes a key only from the edited layer: profile unset restores global inheritance, global unset restores defaults. `null` is accepted only where the field schema permits it. Unknown/prototype keys, non-JSON values, cycles and raw volatile refs are rejected; the complete merged desired settings are validated before startup or admission.
|
|
46
|
-
|
|
47
|
-
Native Settings **Deepwork Profiles** / **Deepwork 配置档** remains separate from plugin Config. New named drafts and revisions share `<resolvedDshHome>/plugins/dsmm/profiles/`; selection/session state is scoped by canonical native profile identity and actual DSMM entry ID. An existing current-profile legacy library is strictly read-only, with its original immutable pins retained and its origin shown in the named editor. See [runtime profiles](profiles.md) for formats and origin rules. Neither Web evidence nor these backend contracts proves Electron activation.
|
|
48
|
-
|
|
49
|
-
Save changes only the draft. Global Apply pins an immutable revision for **new unscoped Agents only**; existing even-blank Agents retain their admissions. The separate current-session selector uses the native view's actual session ID and idle maintenance/CAS/epoch fences. It changes only that ordinary root and future children; old children retain their old epoch. Cold resume honors an explicit sidecar or, when absent, the current global default. Global reset and session baseline pinning are distinct and leave drafts intact.
|
|
50
|
-
|
|
51
|
-
Here, “global Apply/default” means the runtime's scoped named-profile selection, not the shared global deployment file.
|
|
52
|
-
|
|
53
|
-
### Global module ceiling (D0)
|
|
54
|
-
|
|
55
|
-
The only recognized module is `deepwork`, controlled by `modules.deepwork.enabled` **only in the global `config.json` layer**:
|
|
56
|
-
|
|
57
|
-
```json
|
|
58
|
-
{"modules":{"deepwork":{"enabled":false}}}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Missing/unset means `true`, preserving existing availability; ordinary-session `defaultActive` still defaults to `false`. This is an allowed upper bound, not a session-mode override and not a pin for every other global field. Native profile/volatile Config, direct legacy flat Config, named profiles and session overlays reject `modules`; unknown module IDs/fields and nonboolean enabled values refuse. Internally resolved/captured settings include the field without becoming an external profile input.
|
|
62
|
-
|
|
63
|
-
Core remains installed and usable when Deepwork is off: fixed global configuration read/save, profile storage and immutable captures/CAS, status and mandatory identity/read-only/filter/native-permission fences. A cold-off startup does not register DW persona/common/calibration/workflow skills, role providers/aliases/controls, materialize presets, or mount DW routing/recovery/LSP. It does not delete bundled assets, presets or user data, or withdraw host/project skills, tools, LSP or subagents. A static DW preset may remain visible in the native filesystem picker; choosing it refuses before prompt-body/model execution. Unknown DSMM standing roots also refuse.
|
|
64
|
-
|
|
65
|
-
With `guards.scope:"always"`, configured shell safety and Git deny/approval gates remain Core safety, including on a cold-off ordinary root. `guards.scope:"off"` retains its existing optional-guard semantics; mandatory identity/native permissions still apply. DW plan/todo/question/output helpers remain unavailable while the module is off. Genuine native foreign children receive Core identity admission from their exact live parent and captured epoch, without installing DW role tools or granting a generic-spawn bypass to a DW-authorized parent.
|
|
66
|
-
|
|
67
|
-
Startup captures the actual DW substrate once. Each new ordinary root admits **latest valid global desired ∩ startup-mounted substrate ∩ existing policy**. Saving off on a mounted Host leaves old busy/idle parents and their future children on their exact captures, while new roots are off. Their generic/directed skills, standing presets, role aliases, continuable resume and mode-on requests cannot bypass the ceiling. Mode-on reports unavailable; saved historical mode intent is retained but never reported effective while the admitted module is off. Idle profile/mode changes only update that root's overlay/intent and do not absorb newer module state. Saving on after cold-off changes desired/pending only: no mount, reconciliation, disposal, cancellation, process launch or restart queue. New roots remain off/restart-required until an independently authorized Host restart. Restoring on does not rebind old off roots.
|
|
68
|
-
|
|
69
|
-
For later Config consumers, `DSMM_MODULE_DESCRIPTORS` and `DsmmModuleState` (exported from the package root) are plain static first-party data, not dynamic third-party JS/provider/installer APIs. The additive, no-argument `dsmmConfig.describeModules` uses the same local writable operator authority as `describe`/`save` and reads the latest valid global state; it is not opened to unauthorized read-only carriers. It returns descriptor `{id,label,key}`, global/default desired source, `startupMounted`, `admitted` (`null` without an Agent), next-root admission/reason and pending/reason. `hostBundleEnabled` is explicitly `"unknown"`: installed files, loaded DSMM core, desired DW availability, mounted substrate, admitted module and active mode are different facts.
|
|
70
|
-
|
|
71
|
-
`getSettings.moduleStates(agent)`, the optional session-profile response `modules`, and status `modules` project the receiving Agent's capture. `desired.capture` distinguishes `current-global`, `admission` and `startup`: a synchronous admission/status snapshot does not claim to have reread current disk state. D's UI combines the authorized current-global projection with the actual session projection instead of treating captured state as current desired. Native profile form revision/CAS remains separate; there is neither a Root-path RPC nor a cross-layer atomic save.
|
|
72
|
-
|
|
73
|
-
### Native Plugins configuration (D)
|
|
74
|
-
|
|
75
|
-
Open native **Plugins → DSMM**, or the installed **DSMM** bundle's page and its
|
|
76
|
-
actual **Configure DSMM** row. The item registers `plugins.item`; bundle and row
|
|
77
|
-
contributions use `plugins.bundle.config` (`@dsmm/dsmm`) and
|
|
78
|
-
`plugins.row.config` (`@dsmm/dsmm#<actual-row-id>`). The public page props are
|
|
79
|
-
`view: summary | page` plus optional `form`, not an invented standalone editor.
|
|
80
|
-
Bundle pages do not automatically supply a form: DSMM obtains only the server-
|
|
81
|
-
verified actual entry namespace's public ConfigForms seat. Row pages match their
|
|
82
|
-
supplied native form's namespace, revision and exact base/user metadata. If that
|
|
83
|
-
identity cannot be proved, profile controls are unavailable/readonly; they never
|
|
84
|
-
fall back to writing Global. Other instances are not cross-written.
|
|
85
|
-
|
|
86
|
-
The two editors have independent save/refresh/discard actions:
|
|
87
|
-
|
|
88
|
-
- **Global DSMM** uses fixed `dsmmConfig.save(expectedRevision, edits)` and the
|
|
89
|
-
actual-byte global revision. A save touches only `config.json`, retaining
|
|
90
|
-
untouched sparse fields. It is independently discoverable with no conversation,
|
|
91
|
-
named-profile client service or mounted DW substrate.
|
|
92
|
-
- **Current DSH profile override** uses the actual native form `mutate` with its
|
|
93
|
-
descriptor revision, never its schema-expanded `value` as raw presence. Only
|
|
94
|
-
changed fields and explicit unsets are sent. Existing startup-only
|
|
95
|
-
`sessionPersistence` is retained unchanged, not made editable or relocated.
|
|
96
|
-
- Roles/skills, calibration, workflow/review, guards, routing/retry/recovery,
|
|
97
|
-
subagent depth/background, preset materialization and LSP have native structural
|
|
98
|
-
controls or bounded Advanced JSON for complete applicable field coverage.
|
|
99
|
-
Advanced accepts strict JSON up to 32768 characters, closed known schema,
|
|
100
|
-
duplicate/prototype-key rejection and immediate error feedback. Sparse primary
|
|
101
|
-
members can inherit lower-layer members; the full merged value is validated.
|
|
102
|
-
New providers/accounts/models are not installed or configured here. The existing
|
|
103
|
-
native catalog/picker and independent named JSONC editor retain model authority.
|
|
104
|
-
- Missing keys **inherit**; explicit same-default values are **default pins**.
|
|
105
|
-
Unset removes only this layer, not higher Host pins. Modules' master is only in
|
|
106
|
-
Global; profile/named/session controls cannot bypass the ceiling. Only the
|
|
107
|
-
static known `deepwork` descriptor exists, not a registry/marketplace API.
|
|
108
|
-
|
|
109
|
-
Module summary and the field-source disclosure separate **merged desired**,
|
|
110
|
-
**startup-mounted/captured**, **next-root preview** (using the same admission
|
|
111
|
-
preparation) and **current session admission**. Without an actual session, current
|
|
112
|
-
admission is unknown; host bundle enablement stays unknown when not observable.
|
|
113
|
-
Named/global/profile/default source and capture are distinct from raw CAS values.
|
|
114
|
-
Cold-off desired-on shows pending independent restart, not success at hot mounting.
|
|
115
|
-
Mounted-on desired-off affects new roots, not old parents/future children.
|
|
116
|
-
|
|
117
|
-
Read-only `describeSession.configuration`, successful current-session selection,
|
|
118
|
-
and `describeSettings` desired/startup/next-root layers use a Host-side defensive
|
|
119
|
-
projection, not raw runtime settings or browser-only masking. LSP command,
|
|
120
|
-
arguments and working directory, preset root and recovery continuation prompt
|
|
121
|
-
use fixed `<configured>` markers; environment names are anonymous `variable-N`
|
|
122
|
-
keys and values are `<redacted>`. Environment source/capture metadata is aggregated
|
|
123
|
-
under `lsp.env` (mixed origins remain `mixed`), so even key names are not disclosed.
|
|
124
|
-
The strict result codecs reject raw private values in those read-only layers.
|
|
125
|
-
Actual `getSettings(agent)`, captured admissions and stored configuration are
|
|
126
|
-
unchanged. Raw sparse Global/profile/native-form editor input remains available
|
|
127
|
-
only through its existing C0 authorized editor boundary; it is not a status DTO.
|
|
128
|
-
|
|
129
|
-
The inspector sorts the union of safe desired/startup/next-root/admitted values
|
|
130
|
-
and source/capture paths, including fields present only in a named overlay. A
|
|
131
|
-
missing field is **Absent**, not an invented built-in value; unavailable layers
|
|
132
|
-
are **Unknown**. Startup sources come from the captured deployment when available.
|
|
133
|
-
An actual session shows its ID, epoch and scope; a known session without its
|
|
134
|
-
configuration projection is distinct from having no session. Apply and Baseline
|
|
135
|
-
return the already-committed in-memory admission immediately, without a post-commit
|
|
136
|
-
disk read or another validation that could reverse the successful transaction.
|
|
137
|
-
Global refresh does not silently rebind or refresh a session admission. Dirty
|
|
138
|
-
drafts/conflicts visibly remain separate from these captured revisions.
|
|
139
|
-
|
|
140
|
-
Refresh preserves dirty edits and their original revision. A stale revision is a
|
|
141
|
-
visible conflict; explicit **Discard draft and reload** alone rebases. Invalid
|
|
142
|
-
numeric/JSON input stays visible and disables save. Entry changes, disconnection,
|
|
143
|
-
connection-generation replacement and disposal fence old writes; no retry/rebase
|
|
144
|
-
loop or common Save-all is used. Errors are localized sanitized allowlisted
|
|
145
|
-
messages, never raw paths/arguments/environment/provider tokens; saving/success
|
|
146
|
-
uses accessible busy/polite live feedback and native keyboard/focus behavior.
|
|
17
|
+
LSP isn't an applicable UI setting in this version. Its implementation, interfaces and original configuration remain, but DSMM settings hide LSP controls and automatic MCP mounting stays off even with stored `lsp.enabled:true`. Neither a save nor a restart enables it. DSH's own LSP and independently configured MCP are unaffected; the retained historical manual patch isn't a supported DSMM activation entry. See [LSP boundary](lsp.md).
|
|
147
18
|
|
|
148
19
|
### Save authority and concurrency
|
|
149
20
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Reads create no directory, lock or config file. Saves use bounded safe file access, the actual bytes' SHA256 revision (or a distinct absent revision), a cooperative writer lock, final revision recheck and same-directory temporary-file rename. Stale or invalid input fails closed instead of overwriting it. Non-cooperating external editors can still race between the final recheck and rename; this isn't a universal external-editor transaction.
|
|
153
|
-
|
|
154
|
-
Global save changes only `config.json`: no profile patch, Loader reload/patch/dispose, cancellation or automatic profile apply. Native profile saves use only the volatile transport, with native authorization and entry CAS. The two layers have separate revisions and no cross-layer transaction. A save response acknowledges that layer, not that every running consumer has adopted it.
|
|
155
|
-
|
|
156
|
-
**Native signal distinction:** the rc.2 ConfigEditor/Include forced empty-pending reconciliation path emits the compatibility `loader/partial-dispose` signal even when it doesn't update or dispose a fiber. The real regression observes that signal while proving retained refs/fiber/services, zero actual scope/Agent disposals or updates, and completion of the original busy request. The signal alone isn't a lifecycle acknowledgment; no SDK patch, signal filtering or automatic restart hides it. Consumers must use actual lifetime/admission boundaries rather than treating this signal as disposal proof.
|
|
21
|
+
`dsmmConfig.describe`, `describeModules`, `describeSettings` and `save` use the existing local writable operator boundary. The native invocation peer must equal `connection.operator`, public `webServer.host` must be exactly `127.0.0.1`, and `settings.writable` must be true. A client loopback assertion, tunnel or reverse proxy isn't authority. These aren't model-visible tools and accept no arbitrary file, root or entry arguments.
|
|
157
22
|
|
|
158
|
-
|
|
23
|
+
Global saves use expected actual-byte revision, cooperative locking, a final revision recheck and same-directory atomic replacement. Authority and lifetime are rechecked before commit. Native-profile saves use public form mutation and descriptor CAS, not a hash guessed to be native CAS. External non-cooperating editors can still race at the final rename boundary. A save acknowledges its layer, not adoption by every live consumer.
|
|
159
24
|
|
|
160
|
-
|
|
25
|
+
Native ConfigEditor can emit `loader/partial-dispose` during empty-pending reconciliation without actual fiber or Agent disposal. The signal alone isn't proof of a lifecycle change; consumers must observe actual lifetime and admission boundaries.
|
|
161
26
|
|
|
162
|
-
|
|
27
|
+
<a id="global-module-ceiling-d0"></a>
|
|
163
28
|
|
|
164
|
-
##
|
|
29
|
+
## Availability and capture
|
|
165
30
|
|
|
166
|
-
`
|
|
31
|
+
`modules.deepwork.enabled` is a global-only ceiling and defaults true; ordinary `defaultActive` defaults false. Native profile overrides and named/session overlays can't enable the module. Cold-off leaves Core storage, captures/CAS, configuration/status and mandatory native permissions available, without mounting DW role/routing/recovery substrate. DSMM-managed LSP stays off independently of this module ceiling. Static preset files aren't proof of callable roles.
|
|
167
32
|
|
|
168
|
-
|
|
33
|
+
On a mounted Host, desired-off affects new roots, not existing parents or their future children. Desired-on after cold-off remains restart-required until an independent Host restart. No hot-mount or restart queue is implied. An idle profile change doesn't absorb newer global deployment. Mode-on can't bypass an admitted off module; mode-off can replace saved on intent without pretending the module was active.
|
|
169
34
|
|
|
170
|
-
|
|
35
|
+
The inspector separates merged desired, startup-mounted/captured, next-root preview, and current-session admission. Without an actual session, current admission is unknown. Host bundle enablement also remains unknown when the public interface can't observe it. Sources, capture origins, global bytes revision, native descriptor revision and named pin aren't one acknowledgment.
|
|
171
36
|
|
|
172
|
-
`
|
|
37
|
+
`presets.plannerRootEnabled` defaults false and controls only the standing DW Planner root preset, not the default-enabled workflow Planner role or Harness's native plan mode. Like the rest of `presets`, Global/native-entry settings may configure it, named overlays cannot, and desired changes require an independent restart; current Agents are not hot-migrated. See [Planner root admission](agent-presets.md#roles-and-composition) for discovery, forced creation/resume and read-only boundaries.
|
|
173
38
|
|
|
174
|
-
|
|
39
|
+
`permissionControl.enabled` defaults true independently of Deepwork. Permission settings are deployment-only: Global and native-profile settings may save them, while named/session overlays cannot. Only `enabled` is startup-pinned: live saves do not remount or change its admitted value, including for newly created roots; a difference is reported as `permissionControl.enabled` restart-required. A separate cold start captures the new toggle. Dynamic outside-read, web and persistent rules require runtime revision synchronization rather than restart. OFF does not disable Core guards, readonly, native sandbox/approval or tool filters. Configuration and startup admission do not establish that a permission executor is mounted or synchronized. Actual native standing `danger-full-access` is full access: DSMM adds no ask, downgrade, path permit or refusal for unknown operations or missing classification facts. Only a deterministically matched existing explicit deny blacklist may produce a native pre-approval denial. A requested mode or configured command target alone isn't effective native authority. See [native permissions](native-permissions.md).
|
|
175
40
|
|
|
176
|
-
|
|
41
|
+
The rules RPC writes the global DSMM layer. A native override of outside-read, web or rule policy refuses that RPC save; edit or unset the native override instead. An enabled-only native override does not shadow dynamic policy. Ordinary configuration Save still writes its chosen layer, and the runtime uses the resolved global/native policy rather than assuming every global edit wins.
|
|
177
42
|
|
|
178
|
-
|
|
43
|
+
The Host installs `installDeploymentPermissionRules` in its owned Core fiber with `agents` injected, the actual `DsmmDeploymentConfig`, a pure writable-Root check and an awaited notification callback. Its `initial` snapshot, `runtime` sync owner and backend are the collaborators for the permission controller and the single permissions RPC. DSH owns approval: an actual manual approval is final for that call and approved scope, without a DSMM post-approval veto from older rules, epochs or internal gates. DSMM has no independent approval queue, UI, TTL or session permit memory. The ordinary `managed-settings` module retains native SettingsForms and supplies only a scoped `configEditor.edit` façade; the root ConfigEditor and its locks, form CAS and reconciliation remain native-owned. Missing or retired ownership refuses managed saves, not an actually approved call. These source interfaces require the corresponding cold Host composition; configuration alone is not mounting evidence.
|
|
179
44
|
|
|
180
|
-
|
|
45
|
+
Permission revisions are opaque tokens over the persistent global CAS and native configuration read set, not form counters or per-rule version maxima. Controlled saves reread actual storage after CAS and publish only after notification acknowledges the committed policy. No-op saves may retain the token. Notification failure exposes saved/runtime revisions as unsynchronized; recovery rereads authoritative storage. CAS, ownership and synchronization checks protect configuration writes and policy adoption, not a second call-approval gate: permission-source changes neither cancel pending native approval nor let DSMM override an actual same-call approval. New calls consume current policy. Conflicts and recovery preserve dirty editor drafts. Native and ordinary JSON rule imports receive `user-import` provenance, while rules RPC provenance comes from the live operator authority. Persistent provenance isn't native approval or a reusable grant. A native once grant doesn't widen session permissions or authorize another call, and a narrower grant isn't full access. Native rejection, caller/native cancellation and original OS failures remain possible; approval doesn't guarantee command success. Only `enabled` remains pinned to the mounted runtime; a desired OFF cannot turn off running controls before restart.
|
|
181
46
|
|
|
182
|
-
|
|
47
|
+
Read-only configuration projections redact LSP command/arguments/cwd, preset root and recovery prompt; environment values and names aren't disclosed. Authorized sparse editor input is a separate boundary, not a status DTO. A missing projected field is absent; an unavailable layer is unknown, not an invented default.
|
|
183
48
|
|
|
184
|
-
|
|
49
|
+
## Runtime controls
|
|
185
50
|
|
|
186
|
-
`
|
|
51
|
+
`/deepwork [off|message]` changes the receiving session's mode. Explicit intent, including a same-default choice, survives profile changes and reopen. Official minimal conversations default off; DW presets default on unless explicit intent says otherwise. Off hides common workflow/DSMM skills, not persona, read-only restrictions or host/Git permissions. Busy mutations refuse instead of queuing. Slash commands belong to the native command adapter, not headless task text.
|
|
187
52
|
|
|
188
|
-
|
|
53
|
+
`/dsmm-status` reports normalized bounded state; `/dsmm-status json` returns a defensive version-1 snapshot. Status separates admitted profile/revision/epoch, actual route state, effective settings and captured module/runtime binding. Ordinary roots report native-owned effort and keep the native model tab's route, not an applied child-role primary. `profileModel` is advisory for explicit **Use profile model**, never proof that selection already happened.
|
|
189
54
|
|
|
190
|
-
|
|
55
|
+
`workflow.policy` accepts `risk-based` or `legacy`. Explicit policy wins. Without it, explicitly supplied `strictGates`, `reviewCap` or `finalReviewPolicy` selects legacy; otherwise risk-based is the default. Named role restrictions retain required Orchestrator/Planner/Plan Critic, plus legacy-conditional Reviewer/Oracle. They can't enable a role outside startup/deployment ceilings.
|
|
191
56
|
|
|
192
|
-
|
|
57
|
+
`roleRouting[id].levels` accepts only explicit `low`, `high` and `max` overrides; invocation omission means `normal`. These are call resources, not workflow tiers or generated roles. `subagents.toolTopology` defaults `per-role` and may be narrowed/configured in a named overlay. Background, depth and route-override permission remain deployment-only. `subagents.allowRouteOverride` defaults false. See [routing](model-routing.md) for the exact tool and target grammar.
|
|
193
58
|
|
|
194
|
-
|
|
59
|
+
`locale` is an optional visible-output preference using the supported locale IDs in [profiles](profiles.md#inheritance-and-ceilings). Omission inherits; the current user's explicit language request wins. It doesn't change UI locale or protocol vocabulary. Both retired `*MaxReasoningPresets` fields reject with `deprecated-field`; there is no automatic migration. The only nonblocking document warning is `blank-label`, with schema-safe diagnostics and source location where available.
|
|
195
60
|
|
|
196
|
-
|
|
61
|
+
## Child runtime composition
|
|
197
62
|
|
|
198
|
-
|
|
63
|
+
Default deployment uses foreground one-shot work: `enableRunInBackground:false`, `backgroundMode:"one-shot"`, and omitted `maxDepth` delegates to the native Host limit. Captured settings and actual startup capabilities determine availability. A configured flag isn't proof that jobs, persistence, continuation or delivery fencing is ready.
|
|
199
64
|
|
|
200
|
-
|
|
65
|
+
The 0.3.0 build exports `@dsmm/dsmm/agent-registry` (`./agent-registry`) and `@dsmm/dsmm/subagent-runtime` (`./subagent-runtime`) for explicit cold-start composition. The bundled [patch](../cordis.patch.yml) disables the exact stock Agent and Subagent rows and installs one DSMM owner for each service before Main. Verify settled Loader identities and actual service constructors, preserve spawn/fork/model/Gateway services and explicit capacity/depth configuration, then restart. Missing or duplicate ownership refuses; there is no hot replacement or automatic runtime selection.
|
|
201
66
|
|
|
202
|
-
|
|
67
|
+
The public runtime projection reports `binding: stock | dsmm | unavailable`, `deliveryFenceReady`, `restartRequired`, and a bounded reason when applicable. Loading Core, saving settings or seeing a role catalog doesn't prove fenced delivery. Managed continuation requires the explicit ready composition. Native lifecycle, inbox, jobs and storage remain native-owned; DSMM doesn't install a second scheduler or retry controller.
|
|
203
68
|
|
|
204
|
-
|
|
69
|
+
0.3.0 accepts only current version-3 child captures. Old or incomplete capture evidence refuses without falling back to current parent settings, role labels, or fabricated approval/durability guarantees. The legacy-read adapter is not exported or composed. See [compatibility](compatibility.md#retired-compatibility-surfaces).
|
|
205
70
|
|
|
206
|
-
|
|
71
|
+
*Author's note: For a DSH deployment operator; distinguish a successful configuration save from captured runtime availability before applying policy.*
|
package/docs/skill-sync.md
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
# DSMM source-content synchronization
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DSH is fixed to **0.2.0-rc.2**. Source synchronization reads the committed **DSMM-owned `source-inputs/` snapshot**, never a live or historical OCMM Root fallback. Explicit maintenance refresh captures raw bytes from the Root worktree. `source-inputs/manifest.json` records the actual full Root baseline commit and the paths whose raw Git blobs differ from that baseline, including uncommitted/untracked worktree content or checkout byte differences. The captured baseline is `3b680211feeb93508b3817546f37bee2291c402b`; raw-byte `overlayPaths` do not by themselves claim uncommitted semantic changes or a new Root commit. Generated `prompts/source/manifest.json` derives `sourceRef` from that captured baseline and retains the overlay provenance. This is full-content adaptation, not short personas. The maintenance inventory lives in `scripts/source-inventory.mjs`; the generated manifest carries the actual source → artifact → consumer, source anchors, adaptation rules, canonical role/skill inventories, attribution and exclusions. Runtime uses package-relative prepared assets only; it never requires the raw snapshot, an OCMM checkout, global SDK path or maintenance compiler. Root AGENTS, Codex bundles and user/provider/model configuration are not synchronization inputs.
|
|
4
|
+
|
|
5
|
+
The raw closure is limited to the two catalog TS files, `src/hooks/config.ts`, prompt-loader/model-family assembly anchors, shared shell safety, the explicitly selected v1 role/category/workflow Markdown, and the fourteen selected recursive skill resource trees. `source-inputs/root/` preserves their actual bytes; no whole-Root copy, runtime import of Root code, extra ledger or whole-repository hash is used. The one input manifest binds paths, byte lengths and SHA-256 digests for source/resource integrity. Snapshot `.gitattributes` disables Git text conversion for `root/**`; DSMM's local `.gitattributes` also preserves prepared source prompts, skill resources and `src/skills.ts` bytes through Git checkout. Excluded frontend attribution/license inputs are supplied by DSMM's existing fixed-pin recipe, not copied and falsely claimed as consumed Root inputs.
|
|
4
6
|
|
|
5
7
|
## Inventories and assembly
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Every role/category persona adapts the source default `buildLocaleGuidance` prefix for visible output. `buildDsmmLocaleGuidance` and `buildDsmmAgentGuidance` add the exact Agent's immutable captured `settings.locale`: `en`, `zh-Hans`, `zh-Hant`, `ja`, `ko`, `de`, `fr`, `es`, `pt-BR`, or `ru`. Omission inherits applicable host/user language guidance, otherwise the request/context; it is not an English default. The current user's explicit output-language request wins. Preserve code, identifiers, paths, commands, protocol fields and exact quotations; child assignments retain explicit language instructions. A later parent Apply does not rewrite an old child's captured preference. No Root session preference, private host-config lookup, internal reasoning-language guarantee or host/project locale change is supplied.
|
|
8
10
|
|
|
9
11
|
The 11 base roles come from `src/data/agents.ts`; the 11 categories come from `src/data/categories.ts`. Oracle slots reuse the full reviewer source. Builder/code-search/doc-search/media-reader have no standalone source role Markdown: their actual catalog responsibilities, source workflow and terminal TS policy are consumed, not invented personas. Existing `dsmm-creative` remains the one creative category. All 22 have stable metadata and templates; cross-cutting alone defaults off. File existence is never callable evidence.
|
|
10
12
|
|
|
11
|
-
`src/prompt-content.ts` is a content-only package loader
|
|
13
|
+
`src/prompt-content.ts` is a content-only package loader with no settings/model-routing runtime dependency. Role/category bodies, shared language priority and source `terminalPromptSuffixFor` policies assemble into persona once. Category `<model-calibration>` blocks are removed from persistent persona and selected separately. `src/prompts.ts` also keeps calibration assembly independent of the provider/routing graph. The active common section preserves the full default workflow; model guidance is additive and subordinate to persona, permissions and output contract. Planner adds its source doctrine; Opus 5/5.5 calibration is orchestrator-only; GPT/Codex gets the shared GPT layer once; Gemini/GLM, exact Kimi Code aliases and SWE-2 retain their applicable full source guidance. The v1 Codex variant is adapted tool compatibility, not a separate Codex host or adapter behavior stack.
|
|
14
|
+
|
|
15
|
+
The current Root sources preserve final-state artifacts and functional/interface regression evidence, orchestrator-owned complex product planning, direct routine non-product work, bounded useful delegation, and material-relevance evidence reuse. DSMM retains those requirements in full while adapting native read-only planner persistence, lazy skill loading, tool topology, per-invocation resource selection and lifecycle authority. Common mode off withdraws workflow/DSMM skills only; persona, read-only, Git authorization and scoped language guidance remain independent.
|
|
12
16
|
|
|
13
|
-
The fourteen skills are brainstorming, writing-plans, requesting-code-review, receiving-code-review, subagent-driven-development, dispatching-parallel-agents, remove-ai-slops, debugging, frontend, git-master, ast-grep, coding-agent-sessions, init-deep, and using-git-worktrees. **Actual canonical remove-ai-slops is `skills/remove-ai-slops`**, not a nonexistent v1 copy or generated Codex/DSMM summary. Its ten
|
|
17
|
+
The fourteen skills are brainstorming, writing-plans, requesting-code-review, receiving-code-review, subagent-driven-development, dispatching-parallel-agents, remove-ai-slops, debugging, frontend, git-master, ast-grep, coding-agent-sessions, init-deep, and using-git-worktrees. **Actual canonical remove-ai-slops is `skills/remove-ai-slops`**, not a nonexistent v1 copy or generated Codex/DSMM summary. Its ten categories protect final valid requirements and committed contracts with passing functional/interface evidence, not uncommitted transition behavior or descriptive-text locks. Routine maintenance resolves directly; coordination stays in session. Arbitrary batches, LOC splitting, redundant tests, forced status tokens and unauthorized Git restore are adapted to bounded evidence-led cleanup and corrections of task-owned edits.
|
|
14
18
|
|
|
15
19
|
## Lazy native resources
|
|
16
20
|
|
|
@@ -20,22 +24,55 @@ The Stage A ancestor snapshot/precedence, incomplete-observation refusal, invoca
|
|
|
20
24
|
|
|
21
25
|
The published 0.1.9 `./preset-skills` export retains its minimal Config/name/inject/apply compatibility shape; apply itself registers nothing. Its module is not dead: the main entry still calls the actual `registerAgentSkills` there, with unchanged registration/lifecycle. Likewise, `renderAgentCordis` and the shared renderer retain their ignored optional skills argument in its original second position so existing enabledRoles/roleRouting callers do not shift. Native Agent configuration controls visibility. This is a bounded public compatibility ruling, not a future provider/wrapper or remaining removal blocker; no module/function has been moved to another helper.
|
|
22
26
|
|
|
23
|
-
##
|
|
27
|
+
## Refresh, reproduce and check
|
|
24
28
|
|
|
25
|
-
Use existing Node/TypeScript/pnpm.
|
|
29
|
+
Use existing Node/TypeScript/pnpm. To deliberately adopt reviewed Root worktree changes, run from `dsmm/` with the existing complete fixed-pin frontend library:
|
|
26
30
|
|
|
27
31
|
```powershell
|
|
28
|
-
|
|
29
|
-
pnpm run sync:
|
|
30
|
-
pnpm run sync:source # records validated frontend provenance in the manifest
|
|
31
|
-
pnpm run build
|
|
32
|
-
pnpm run generate:roles
|
|
33
|
-
pnpm run check:source
|
|
32
|
+
node --experimental-strip-types scripts/source-inputs.mjs --refresh
|
|
33
|
+
pnpm run sync:source # adapts the sealed snapshot; never refreshes it implicitly
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Refresh reads only the declared closure twice and compares raw bytes, path inventory and baseline provenance. A changed capture gets at most one consistency retake; continued drift fails before snapshot writes. The destination's existing parent and all ancestors must be regular directories. An existing snapshot must validate completely, including both metadata files and every raw input; dangling/live links, malformed directories, unknown entries and integrity drift are refused before mutation. Refresh writes exclusively into a new task-owned sibling candidate, loads that candidate and runs the adapter's catalog, permission/assembly anchors and adapted resource-closure checks there. It rechecks the existing snapshot before same-parent rename publication and restores the untouched original on publication failure. Unknown existing content is never deleted as a refresh repair. A failed rollback preserves the original backup and reports its location rather than cleaning it away; post-commit staging cleanup limitations are reported explicitly. Review and commit the entire refreshed snapshot, adapter changes when needed, and prepared targets together through the authorized commit owner. Missing, additional, changed, linked or non-regular snapshot inputs fail closed; source check never repairs them from Root. A stale prepared resource not in the current output inventory is a failure and must be reviewed/removed explicitly, not silently retained or deleted by sync.
|
|
37
|
+
|
|
38
|
+
CI and a cold released checkout use the tag's own adapter/generator and committed snapshot by default:
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
pnpm run sync:source # optional rebuild of prepared source targets from sealed inputs
|
|
42
|
+
pnpm run build # coordinated build owner; offline frontend integrity gate first
|
|
43
|
+
pnpm run generate:roles # coordinated renderer owner, after build
|
|
44
|
+
pnpm run check:source # read-only regenerated byte comparison plus resource gates
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`node --experimental-strip-types scripts/sync-source-assets.mjs --check` regenerates all source-adapted bytes in memory and compares them to prepared targets without writing. It checks inputs before targets, rather than hashing targets alone or skipping source drift. `node scripts/generate-role-assets.mjs --check` separately checks renderer output. `check:source` requires both comparisons and the actual resource/fixed-pin gates; a passing source-only comparison is not full build/renderer/release completion. Prepared targets must retain their generated bytes in the released checkout, without text-conversion filters; `src/skills.ts` retains its existing surrounding source while regenerating the metadata section.
|
|
48
|
+
|
|
49
|
+
Direct regression checks do not emit shared `lib/` or presets:
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
node --import ./test/prompt-source-loader.mjs --test --experimental-strip-types --test-concurrency=1 test/source-inputs.test.ts test/source-sync.test.ts
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
These checks commit the DSMM source snapshot and prepared targets in a disposable fixture repository, then clone and execute that checkout's generator with no Root catalog/policy/prompt/skill checkout, using only the already-installed compiler. The cold Git-only clone first refuses absent ignored frontend resources. Once the already-verified fixed-pin library is delivered, check and fresh regeneration must reproduce every adapted byte, including a text-converting checkout. Cold regeneration removes every prepared target, including the frontend index, while retaining the authored `src/skills.ts` shell and genuine fixed-pin vendor library. The replay's generated index drives recipe selection, offline vendor validation and resource closure; stale prepared index bytes cannot supply the recipe or mask missing input dependencies. Missing/drifted vendor resources remain fatal before output writes. Checks also exercise raw-input tamper/missing/extra/link refusal, resealed permission-anchor and resource-closure errors, actual metadata regeneration, prepared extra-resource refusal, bounded capture drift, metadata/ancestor link refusal without outside writes, unknown-content preservation and candidate-publication rollback. For current source/native SDK prompt/tool behavior, run `test/prompt-guidance.test.ts test/skills.test.ts` through the same in-memory loader. The resource sync and role renderer remain separate entry points; coordinate shared compiled output/preset generation with its owner. Sync writes changed artifacts only; a second run must report no differences. Do not hand-edit generated prompt/source assets, skills or presets.
|
|
56
|
+
|
|
57
|
+
Cold rebuild needs the existing approved toolchain/dependencies and the **prepared complete frontend fixed-pin library** as well as the committed raw snapshot. Committing the raw snapshot does not deliver ignored third-party bodies. An authorized release/build owner must preserve their delivery to the cold checkout/staging surface; missing bodies or inventory fail offline with no download or older-Root fallback. Separately authorized `pnpm run sync:frontend` can materialize missing fixed-pin resources, but is never an implicit CI/build/check action. No software installation is authorized by these commands.
|
|
58
|
+
|
|
59
|
+
Source Markdown is kept in full, with precise anchored changes and an explicit DSH resource/authority boundary. Native read/glob/grep, web_search/web_fetch, write/edit, bash/pwsh and skill invocation are the tools mapped here; native read uses `file_path`. Exposed `todo_write` replaces the owning Agent's whole content/status list under its actual parallel policy; exposed `ask_user_question` provides questions, otherwise conversation does. LSP, image/browser, documentation services and native controls remain actual-catalog/route capabilities. Host compaction is not OCMM `compress`. No Task, todowrite, compress or Context7 MCP interface is invented. Template fields describe an assignment, not callable parameters. Native delegation groups preserve root/stage-owner Builder versus bounded child Builder, strict-leaf research, read-only utility restrictions and local-coordinator specialists; runtime policy enforces these boundaries.
|
|
60
|
+
|
|
61
|
+
Role IDs remain `dsmm-<name>`. `subagents.toolTopology=per-role` exposes individual `kind=role` underscore tools plus `dsmm_category`; `parameterized` exposes `dsmm_role` and `dsmm_category` with their respective admitted target enums. Empty groups have no tool. Actual arguments are `description`, `prompt`, optional `level`, deployment-authorized/exposed `route`, and capability-exposed `run_in_background`; no template grants them. Omitted/normal preserves the default route; `roleRouting.<id>.levels` contains only configured low/high/max complete routes or effort-only choices requiring exact native preflight. A complete per-call route requires paired provider/model, drops stale effort on model changes and does not silently fall back; an effort-only override must be supported by the selected native model. Route override additionally requires captured deployment `allowRouteOverride=true`. Source tier advice never generates suffix roles or fixed max effort. Target/caller/read-only/depth authority is unchanged by topology or level. Missing required planning/review capability is reported, not bypassed. Read-only planners return complete Markdown for authorized coordinator persistence. Reviewer/Oracle independence requires different observed routes, not names.
|
|
62
|
+
|
|
63
|
+
One-shot defaults foreground; permitted one-shot background is native-job-owned. An admitted managed continuable configuration defaults background and returns a durable child ID; explicit `run_in_background:false` starts a non-reusable one-shot. A wired user foreground handoff transfers the same existing run to native jobs without another start, after operator/session/epoch/ownership/background gates; failed preflight leaves foreground ownership/cancellation intact. Existing continuable children use exposed `send_message` for nearest-step running, idle next-turn or same-ID cold delivery and the actual native user queue/steer surface. Receipts mean inbox acceptance, not execution/review completion. A settled one-shot cannot revive. Reuse does not reselect role/level/route or replace original captured locale/authority with the parent's latest profile. Background enablement, native capacity/depth, ownership, cancellation, provider support and permissions always gate execution. No OpenCode `task_id`/resume/retry, automatic retry or guessed idempotency is supplied.
|
|
64
|
+
|
|
65
|
+
Managed message delivery requires explicit startup composition: disable the stock `subagents` registration row, bind the unique PUBLIC DSMM `SubagentRuntime` subclass, then restart. Stock cannot be unloaded/drained for hot replacement or shadowed by a parallel runtime. The assembler takes the observed `SubagentRuntimeAdmissionView`; stock/unavailable/unready states give the explicit composition/restart limitation, not a readiness promise. Native controls remain genuine SDK capabilities, but tool exposure and operator-gated user surfaces must be separately observed. Unconnected C3 tool/RPC surfaces are not announced. Legacy-conservative evidence permits useful proven capabilities under the same durable ID intersected with current normal parent authority and native boundaries; missing evidence denies that capability with a reason, neither denying all legacy children nor inheriting the parent's latest policy. Captured child epochs need not equal the parent's current epoch.
|
|
66
|
+
|
|
67
|
+
### Runtime assembler consumer interface
|
|
68
|
+
|
|
69
|
+
`buildDsmmAgentGuidance(capturedSettings, observation: DsmmPromptObservation)` is pure and installs no tools, policy, provider, RPC or locale. The integration owner registers it once in the exact admitted Agent scope, independently of the mode-gated `buildDeepworkPrompt`; do not also inject a second dynamic locale block. Use that root/child's immutable settings, never desired deployment/editor drafts or the ancestor's new admission. Persistent `buildRolePersona` contains only shared language priority, not a configured locale.
|
|
70
|
+
|
|
71
|
+
Pass B's `callableRoleInventory` entries (`name`, `kind`, `targets`, optional `targetParameter`) **after actual admission/provider/tool filtering**, plus current policy-filtered native `ToolSchema[]`. The assembler intersects those schemas and target enums with optional observed role availability, and lists configured levels only when the schema exposes them. A role-availability row is not proof of a tool. Pass observed `DsmmInvocationView` under `invocation: {view, routeKind:'initial'|'actual'}`: initial is a preflighted start route, actual comes from native request/status after fallback; never infer either from raw args or a role name. Runtime admission, invocation (including route), and child evidence are explicitly projected to allowed output fields; structurally compatible objects' extra properties are not serialized. Evidence field/code/effect lists are closed and limitation output is bounded.
|
|
72
|
+
|
|
73
|
+
`capabilities.continuable` observes **new child creation**. `capabilities.managedChildDelivery` independently observes **managed parent-to-existing-continuable-child delivery under this exact Agent's authority**; omitted/false does not establish reuse, even with a ready binding and native `send_message`. Model reuse guidance requires that flag, a ready unique DSMM delivery fence and the actual exposed control. Native user queue/steer additionally requires an actually wired `nativeBrowserPrompt.surface`; its name/readiness alone does not prove delivery. Existing-child delivery does not require creation/background to be enabled. Exposed native child-to-parent reporting remains separate and retains exact-sender/adjacency semantics. Supply native jobs capability and a wired `foregroundHandoff.surface` only when supported. Optional `ChildAdmissionEvidenceView` supplies original/proven fields and precise capability limitations, never extra private state. These observations describe availability; actual target, operator/connection/session/epoch/lifetime and native permission gates remain the execution authority.
|
|
37
74
|
|
|
38
|
-
|
|
75
|
+
DeepSeek V4 Pro/Flash guidance applies only to the exact verified provider/model pairs, uses adapter-advertised efforts and treats configured default effort as policy, not an observed request result. Ordinary root native model/effort and explicit preflighted invocation effort remain authoritative. Preset-derived max reasoning policy is not part of this calibration.
|
|
39
76
|
|
|
40
77
|
Authored frontend router/tooling text overrides install-by-default/implicit latest behavior: inspect existing capabilities, require separate setup authorization, and report unverified evidence without hiding incomplete declared resources. Verbatim UI/UX README paths/cwd examples are superseded by the authored DSH entry: resolve the absolute native resourceBase script, require the already-active target project context, and supply an explicitly approved project-owned output-dir for persistence. The installed skill tree is never an output target; no tool cwd field or shell cd is invented. Public renderer inputs retain the old object shape with optional source metadata; only the canonical catalog requires those trusted source fields.
|
|
41
78
|
|
|
@@ -55,4 +92,4 @@ Body/data/Python resources and `.frontend-materialized.json` are gitignored. Act
|
|
|
55
92
|
|
|
56
93
|
`node scripts/materialize-frontend.mjs` defaults to read-only/offline check. `pnpm run build`, `check:source` and `check:release` refuse incomplete/drifted materialization without downloading. Explicit `sync:frontend` reuses complete validated content with zero requests/writes; no arbitrary destination CLI is accepted. Runtime distribution needs only package-relative resources, never an upstream checkout or network materialization.
|
|
57
94
|
|
|
58
|
-
**
|
|
95
|
+
**Distribution handoff:** with the authorized build toolchain and complete fixed-pin resources, run snapshot-backed `sync:source`, then coordinated build/generate/check/pack. Only deliberate Root adoption uses `source-inputs.mjs --refresh`; only separately authorized materialization uses `sync:frontend`. The raw snapshot is committed maintenance input and is not required in the npm runtime package. Prepared prompts/skills and every fixed-pin runtime resource must still be delivered; ignored status does not supply them to a cold checkout. Frozen tarballs must already carry the complete library. Default build/check does not fetch resources. Local compiled/materialized content is not proof of packed delivery. Full packed inventory and missing-resource refusal remain separate evidence from native runtime/UI capability, permission and lifecycle completion.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import { AgentRegistry } from "@deepseek-ai/dsh-agent";
|
|
3
|
+
import type { Agent, AgentHandle, CreateAgentOptions, ResumeAgentOptions } from "@deepseek-ai/dsh-agent";
|
|
4
|
+
import type { SessionId } from "@deepseek-ai/dsh-session";
|
|
5
|
+
import { SubagentError } from "@deepseek-ai/dsh-subagent";
|
|
6
|
+
export interface ManagedCreation {
|
|
7
|
+
readonly registry: AgentRegistry;
|
|
8
|
+
readonly parent: Agent;
|
|
9
|
+
readonly childId: SessionId;
|
|
10
|
+
readonly kind: "fresh" | "cold";
|
|
11
|
+
readonly delegationMode?: "one-shot" | "continuable";
|
|
12
|
+
readonly owner: object;
|
|
13
|
+
readonly ownerSignal?: AbortSignal;
|
|
14
|
+
entered(agent: Agent): void;
|
|
15
|
+
claimed: boolean;
|
|
16
|
+
child?: Agent;
|
|
17
|
+
retired: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function managedCancellation(reason: unknown): SubagentError;
|
|
20
|
+
export declare function isManagedCancellation(error: unknown): boolean;
|
|
21
|
+
export declare const exactRegistry: (registry: AgentRegistry) => AgentRegistry;
|
|
22
|
+
export declare function duringManagedCreation<T>(operation: ManagedCreation, run: () => T): T;
|
|
23
|
+
export declare function currentManagedCreation(): ManagedCreation | undefined;
|
|
24
|
+
export declare function duringActivationOwnership<T>(signal: AbortSignal, run: () => T): T;
|
|
25
|
+
export declare function activationOwnerSignal(): AbortSignal | undefined;
|
|
26
|
+
/** Startup-only agents provider. Factory, traced caller, ownership and handles stay native. */
|
|
27
|
+
export declare class DsmmAgentRegistry extends AgentRegistry {
|
|
28
|
+
readonly managedLifetime: AbortController;
|
|
29
|
+
constructor(ctx: Context);
|
|
30
|
+
create(options: CreateAgentOptions): Promise<AgentHandle>;
|
|
31
|
+
resume(options: ResumeAgentOptions): Promise<AgentHandle>;
|
|
32
|
+
enter(agent: Agent, owner: Agent | undefined): () => void;
|
|
33
|
+
private creation;
|
|
34
|
+
}
|
|
35
|
+
export default DsmmAgentRegistry;
|
|
36
|
+
//# sourceMappingURL=agent-registry.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { symbols } from "@deepseek-ai/cordis";
|
|
3
|
+
import { AgentRegistry } from "@deepseek-ai/dsh-agent";
|
|
4
|
+
import { SubagentError } from "@deepseek-ai/dsh-subagent";
|
|
5
|
+
import { scopeLifetime } from "./delivery-authority.js";
|
|
6
|
+
const creations = new AsyncLocalStorage();
|
|
7
|
+
const holders = new AsyncLocalStorage();
|
|
8
|
+
const cancellations = new WeakSet();
|
|
9
|
+
export function managedCancellation(reason) {
|
|
10
|
+
const error = new SubagentError("Managed activation owner cancelled", "ABORTED", { cause: reason });
|
|
11
|
+
cancellations.add(error);
|
|
12
|
+
return error;
|
|
13
|
+
}
|
|
14
|
+
export function isManagedCancellation(error) { return typeof error === "object" && error !== null && cancellations.has(error); }
|
|
15
|
+
export const exactRegistry = (registry) => Reflect.get(registry, symbols.original) ?? registry;
|
|
16
|
+
export function duringManagedCreation(operation, run) { return creations.run(operation, run); }
|
|
17
|
+
export function currentManagedCreation() { return creations.getStore(); }
|
|
18
|
+
export function duringActivationOwnership(signal, run) { return holders.run(signal, run); }
|
|
19
|
+
export function activationOwnerSignal() { return holders.getStore(); }
|
|
20
|
+
/** Startup-only agents provider. Factory, traced caller, ownership and handles stay native. */
|
|
21
|
+
export class DsmmAgentRegistry extends AgentRegistry {
|
|
22
|
+
managedLifetime = new AbortController();
|
|
23
|
+
constructor(ctx) {
|
|
24
|
+
if (ctx.get("agents") !== undefined)
|
|
25
|
+
throw new SubagentError("DSMM agents requires one startup provider; restart to change it.", "DUPLICATE_PROVIDER");
|
|
26
|
+
super(ctx);
|
|
27
|
+
scopeLifetime(ctx, "dsmm.agents: retire managed residency", () => this.managedLifetime.abort());
|
|
28
|
+
}
|
|
29
|
+
create(options) {
|
|
30
|
+
return this.creation("fresh", options.sessionId, options.parentAgent, options.signal, signal => super.create(signal === options.signal ? options : { ...options, signal }));
|
|
31
|
+
}
|
|
32
|
+
resume(options) {
|
|
33
|
+
return this.creation("cold", options.resumeSessionId, options.parentAgent, options.signal, signal => super.resume(signal === options.signal ? options : { ...options, signal }));
|
|
34
|
+
}
|
|
35
|
+
enter(agent, owner) {
|
|
36
|
+
const detach = super.enter(agent, owner);
|
|
37
|
+
const operation = creations.getStore();
|
|
38
|
+
if (operation?.claimed && operation.registry === exactRegistry(this) && operation.parent === owner && operation.childId === agent.id) {
|
|
39
|
+
try {
|
|
40
|
+
operation.entered(agent);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
detach();
|
|
44
|
+
throw error;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return detach;
|
|
48
|
+
}
|
|
49
|
+
async creation(kind, id, parent, source, run) {
|
|
50
|
+
const operation = creations.getStore();
|
|
51
|
+
if (operation !== undefined && operation.registry === exactRegistry(this) && operation.parent === parent
|
|
52
|
+
&& operation.childId === id && operation.kind === kind) {
|
|
53
|
+
if (operation.claimed || operation.retired || this.managedLifetime.signal.aborted || source === undefined) {
|
|
54
|
+
throw new SubagentError("Managed creation requires its exact unused operation", "UNAUTHORIZED");
|
|
55
|
+
}
|
|
56
|
+
operation.claimed = true;
|
|
57
|
+
}
|
|
58
|
+
if (source === undefined)
|
|
59
|
+
return run(source);
|
|
60
|
+
// Creation-only cancellation must not end an accepted root or native child residency.
|
|
61
|
+
const relay = new AbortController();
|
|
62
|
+
const abort = () => relay.abort(source.reason);
|
|
63
|
+
source.addEventListener("abort", abort, { once: true });
|
|
64
|
+
if (source.aborted)
|
|
65
|
+
abort();
|
|
66
|
+
try {
|
|
67
|
+
return await run(relay.signal);
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
source.removeEventListener("abort", abort);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export default DsmmAgentRegistry;
|
|
75
|
+
//# sourceMappingURL=agent-registry.js.map
|