@dsmm/dsmm 0.3.8 → 0.3.10
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 +9 -5
- package/agent-presets/dsmm-builder/agent.cordis.yml +6 -6
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-code-search/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-coding/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-complex/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-creative/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-deep/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-documenting/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-frontend/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-oracle/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +8 -8
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-planner/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-quick/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-research/agent.cordis.yml +10 -10
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +10 -10
- package/docs/agent-presets.md +2 -2
- package/docs/compatibility.md +2 -2
- package/docs/deferred-native-approval-risk.md +1 -1
- package/docs/design.md +1 -1
- package/docs/lsp.md +6 -2
- package/docs/maintenance.md +65 -0
- package/docs/model-routing.md +1 -1
- package/docs/native-permissions.md +25 -7
- package/docs/profiles.md +1 -1
- package/docs/releasing.md +51 -32
- package/docs/roadmap.md +3 -3
- package/docs/runtime-recovery.md +1 -1
- package/docs/safety-guards.md +1 -1
- package/docs/settings-status.md +3 -1
- package/lib/client/DeploymentFields.js +9 -6
- package/lib/client/NativeCommandEntries.d.ts +6 -6
- package/lib/client/NativeCommandEntries.js +38 -37
- package/lib/client/PermissionRuleEntries.js +3 -1
- package/lib/client/children-locales.d.ts +1 -1
- package/lib/client/deployment-locales.d.ts +2 -0
- package/lib/client/deployment-locales.js +2 -0
- package/lib/client/permission-locales.d.ts +4 -0
- package/lib/client/permission-locales.js +12 -10
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +11 -0
- package/lib/client.js +179 -132
- package/lib/guards.d.ts +1 -1
- package/lib/guards.js +12 -21
- package/lib/lsp.js +1 -1
- package/lib/permission-control.d.ts +8 -2
- package/lib/permission-control.js +48 -14
- package/lib/permission-controller.d.ts +4 -0
- package/lib/permission-controller.js +142 -7
- package/lib/permission-native-command.d.ts +5 -1
- package/lib/permission-native-command.js +35 -5
- package/lib/permission-native-rules.d.ts +3 -2
- package/lib/permission-native-rules.js +9 -4
- package/lib/permission-settings.d.ts +31 -1
- package/lib/permission-settings.js +24 -3
- package/lib/permission-shell.d.ts +1 -1
- package/lib/permission-shell.js +2 -2
- package/lib/roles.js +2 -2
- package/lib/settings.js +2 -2
- package/package.json +38 -38
- package/patches/ocmm-lsp-mcp.example.cordis.patch.yml +1 -1
- package/prompts/deepwork.md +2 -2
- package/prompts/source/shared/dsh-host-contract.md +2 -2
- package/prompts/source/shared/locale.md +2 -2
- package/prompts/source/terminal/builder.md +2 -2
- package/prompts/source/terminal/clarifier.md +6 -6
- package/prompts/source/terminal/code-search.md +6 -6
- package/prompts/source/terminal/coding.md +6 -6
- package/prompts/source/terminal/complex.md +6 -6
- package/prompts/source/terminal/creative.md +6 -6
- package/prompts/source/terminal/cross-cutting.md +6 -6
- package/prompts/source/terminal/deep.md +6 -6
- package/prompts/source/terminal/doc-search.md +6 -6
- package/prompts/source/terminal/documenting.md +6 -6
- package/prompts/source/terminal/frontend.md +6 -6
- package/prompts/source/terminal/hard-reasoning.md +6 -6
- package/prompts/source/terminal/media-reader.md +6 -6
- package/prompts/source/terminal/normal-task.md +6 -6
- package/prompts/source/terminal/oracle-2nd.md +6 -6
- package/prompts/source/terminal/oracle.md +6 -6
- package/prompts/source/terminal/orchestrator.md +4 -4
- package/prompts/source/terminal/plan-critic.md +6 -6
- package/prompts/source/terminal/planner.md +6 -6
- package/prompts/source/terminal/quick.md +6 -6
- package/prompts/source/terminal/research.md +6 -6
- package/prompts/source/terminal/reviewer.md +6 -6
- package/skills/ast-grep/SKILL.md +3 -3
- package/skills/ast-grep/SOURCE +1 -1
- package/skills/ast-grep/install.ps1 +1 -1
- package/skills/ast-grep/install.sh +1 -1
- package/skills/ast-grep/scripts/ast_grep_helper.py +10 -10
- package/skills/ast-grep/tests/smoke.sh +11 -11
- package/skills/ast-grep/tests/test_resolver.py +4 -23
- package/skills/brainstorming/SKILL.md +3 -3
- package/skills/coding-agent-sessions/NOTICE.md +2 -2
- package/skills/coding-agent-sessions/SKILL.md +3 -3
- package/skills/debugging/SKILL.md +3 -3
- package/skills/debugging/references/methodology/03-flaky-triage.md +1 -1
- package/skills/debugging/references/scripts/dap.mjs +3 -3
- package/skills/debugging/references/tools/playwright-cli.md +3 -3
- package/skills/dispatching-parallel-agents/SKILL.md +3 -3
- package/skills/frontend/ATTRIBUTION.md +4 -4
- package/skills/frontend/SKILL.md +3 -3
- package/skills/frontend/references/perfection/README.md +4 -4
- package/skills/frontend/references/perfection/react-perf-tooling.md +4 -4
- package/skills/git-master/SKILL.md +3 -3
- package/skills/git-master/agents/openai.yaml +1 -1
- package/skills/init-deep/SKILL.md +3 -3
- package/skills/receiving-code-review/SKILL.md +3 -3
- package/skills/remove-ai-slops/SKILL.md +3 -3
- package/skills/requesting-code-review/SKILL.md +3 -3
- package/skills/subagent-driven-development/SKILL.md +3 -3
- package/skills/using-git-worktrees/SKILL.md +4 -4
- package/skills/writing-plans/SKILL.md +3 -3
- package/docs/migration-from-ocmm.md +0 -57
- package/docs/skill-sync.md +0 -94
- package/prompts/source/manifest.json +0 -3168
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
<
|
|
9
|
+
<dsmm-locale-guidance>
|
|
10
10
|
Language and locale:
|
|
11
11
|
- This shared resource supplies no configured locale; preserve this exact Agent's captured locale and applicable host/user language guidance when supplied.
|
|
12
12
|
- When neither captured locale nor applicable host/user language guidance is supplied, infer the preferred visible-output language from the current request and conversation context. This does not configure reasoning language or the host/project locale.
|
|
13
13
|
- If the user mixes languages, use the language that best matches the current request.
|
|
14
14
|
- Preserve code, identifiers, file paths, commands, protocol names, quotes, and user-requested wording in their original language when accuracy requires it.
|
|
15
15
|
- If the user explicitly asks for a different output language for a specific answer, follow that local request unless it conflicts with higher-priority instructions.
|
|
16
|
-
</
|
|
16
|
+
</dsmm-locale-guidance>
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
46
|
<dsmm-host-contract>
|
|
47
|
-
Use the current DSH 0.2.1-rc.2 catalog: read/glob/grep for files, web_search/web_fetch for external facts, write/edit and the actual bash/pwsh for authorized edits and execution, and native skill invocation for triggered skills. Native read takes file_path; inspect actual schemas, not OpenCode field names. Use exposed ask_user_question or ask a material question in conversation. Use exposed todo_write for useful Agent-owned whole-list tracking under its actual concurrency policy. Use LSP/browser/read_image only when present and supported by the actual route; fall back to direct evidence or report the capability unavailable. No Task/todowrite/compress/Context7 MCP API is assumed; host compaction is not
|
|
47
|
+
Use the current DSH 0.2.1-rc.2 catalog: read/glob/grep for files, web_search/web_fetch for external facts, write/edit and the actual bash/pwsh for authorized edits and execution, and native skill invocation for triggered skills. Native read takes file_path; inspect actual schemas, not OpenCode field names. Use exposed ask_user_question or ask a material question in conversation. Use exposed todo_write for useful Agent-owned whole-list tracking under its actual concurrency policy. Use LSP/browser/read_image only when present and supported by the actual route; fall back to direct evidence or report the capability unavailable. No Task/todowrite/compress/Context7 MCP API is assumed; host compaction is not a model-facing compression tool.
|
|
48
48
|
Logical source role names map to IDs dsmm-<name> (explore is only the code-search alias). Inspect this Agent's actual admitted tool inventory: per-role exposes individual role tools plus dsmm_category; parameterized exposes dsmm_role/dsmm_category and their permitted target enums. description/prompt are assignment inputs; optional level, route and run_in_background depend on the actual schema and captured admission. Omitted/normal retains the default route; low/high/max requires that target's configured complete route or effort-only override, with exact native preflight. route additionally needs deployment allowRouteOverride=true; no suffix role/tool or arbitrary effort is inferred. Layout/level never changes target/read-only/depth/ownership authority. A read-only planner returns complete Markdown for authorized coordinator persistence, never through file/shell writes or a child proxy.
|
|
49
49
|
One-shot defaults foreground and is never revived after settlement. When enabled and admitted, native jobs own one-shot background; a managed continuable configuration defaults background and returns a durable child ID, while explicit run_in_background:false starts a non-reusable one-shot. Existing continuable children use actual exposed send_message for running/idle/same-ID cold delivery and actual native user queue/steer; acceptance is not completion. Original child route/locale/authority remains captured and intersects current exact-parent authority, not parent-new-policy inheritance. Legacy conservative evidence permits useful proven capabilities and denies missing-evidence capabilities with reasons. A foreground handoff, only through an actually wired user control, moves the existing run to native-job ownership without another start; no static text declares a new tool or RPC. Managed delivery requires disabling the stock subagents row and binding the unique PUBLIC DSMM SubagentRuntime subclass at explicit startup, then restart. Stock cannot be hot-replaced. Background/capacity/depth/ownership/cancellation remain mandatory. Native continuation is not task_id/resume/retry.
|
|
50
|
-
The native main model picker, explicit user route and catalog are authoritative. Model guidance calibrates behavior only; it does not select
|
|
50
|
+
The native main model picker, explicit user route and catalog are authoritative. Model guidance calibrates behavior only; it does not select a provider/model, grant permissions, declare external independence or change advertised effort. Oracle independence requires a different model was explicitly selected and verified in the actual route. Default inventory has no synthetic tiers or additional Oracle slots.
|
|
51
51
|
Follow the current user's explicit visible-output language request, then this Agent's immutable captured locale when supplied, then applicable host/user language guidance or current request/context. All DSMM roles/categories follow this priority even with common mode off. Preserve identifiers, code, paths, commands, protocol fields and exact quotes; child assignments retain explicit language requests. This contract copies no Root locale/configuration, promises no internal reasoning language and changes neither host UI nor project locale.
|
|
52
52
|
Role persona and access remain when Deepwork is explicitly off; common workflow and DSMM skills do not. Git/install/login/destructive actions need exact authorization regardless of mode. All delegation guidance is intersected with enabled roles, mounted capabilities, inherited permissions and native depth; runtime policy enforces those ceilings, not these static texts.
|
|
53
53
|
</dsmm-host-contract>
|
|
54
54
|
|
|
55
55
|
---
|
|
56
56
|
|
|
57
|
-
<
|
|
57
|
+
<dsmm-shell-command-safety>
|
|
58
58
|
# Shell Command Safety
|
|
59
59
|
|
|
60
60
|
- Keep terminal commands short and inspectable. Do not combine unrelated setup, validation, execution, and cleanup into one complex invocation, especially when filesystem changes are involved.
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
- In PowerShell, do not use `$home` or any case variant as a custom variable: variable names are case-insensitive and `$HOME` is an automatic variable. Use a specific, purpose-named variable instead.
|
|
63
63
|
- Treat recursive or batch deletion as a fail-closed operation. Prefer an exact literal target. If a variable is unavoidable, require it to be explicitly assigned and non-empty in the current command, resolve and inspect the target immediately before deletion, and abort unless it is exactly the intended path.
|
|
64
64
|
- Never recursively or batch-delete a filesystem root, the user home, the workspace, an ancestor of the workspace, or an unexpected parent directory. Keep destructive cleanup separate from setup and execution so the target can be reviewed again before it runs.
|
|
65
|
-
</
|
|
65
|
+
</dsmm-shell-command-safety>
|
|
66
66
|
|
|
67
|
-
<
|
|
67
|
+
<dsmm-subagent-compression-policy>
|
|
68
68
|
## Subagent Compression Policy
|
|
69
69
|
Apply this policy only when the current execution is a subagent session and a `compress` tool is available.
|
|
70
70
|
If `compress` is unavailable, do not propose, simulate, or attempt compression.
|
|
@@ -95,16 +95,16 @@
|
|
|
95
95
|
- Trustworthy estimates indicate approximately 130k or more current context, at least 50k removable closed context, and either a real capacity signal or about ten additional model turns.
|
|
96
96
|
These constraints do not prohibit a bounded follow-up under either common path when its own conditions are met.
|
|
97
97
|
If any estimate is unavailable, do not invent it; only this additional path becomes unavailable, while the common paths (the emergency and completed >100k exploration paths) remain independently available under their own conditions. A single completed tool call is not a phase boundary.
|
|
98
|
-
</
|
|
98
|
+
</dsmm-subagent-compression-policy>
|
|
99
99
|
|
|
100
|
-
<
|
|
100
|
+
<dsmm-delegation-contract>
|
|
101
101
|
## Delegation Contract (Authoritative)
|
|
102
102
|
Use direct tools first. Delegate only when direct tools are insufficient and a separate bounded research result materially improves completion.
|
|
103
103
|
Allowed utility targets: `code-search`, `explore`, `doc-search`, `research`, `media-reader`.
|
|
104
104
|
`quick` is forbidden because this read-only role must not modify work by proxy. Planning, review, coordination, and implementation workflow agents are also forbidden.
|
|
105
105
|
Return the completed plan or findings to the caller. Formal planner dispatch, the `plan-critic` loop, review dispatch, and final acceptance review are orchestrator-owned.
|
|
106
106
|
This contract overrides any skill, model calibration, generated-adapter compatibility text, or other prompt layer that suggests broader delegation.
|
|
107
|
-
</
|
|
107
|
+
</dsmm-delegation-contract>
|
|
108
108
|
|
|
109
109
|
The source delegation allowance is conditional on actual native callability and the caller's inherited authority; formal workflow stages belong to the trusted root/stage owner. No static text grants a tool or overrides an execution restriction.
|
|
110
110
|
- id: agent-instructions
|
package/docs/agent-presets.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deepwork Agent presets and child control
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`. Native package composition and callable admission are separate requirements.
|
|
4
4
|
|
|
5
5
|
## Roles and composition
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ The canonical inventory is 11 base roles and 11 categories. Base roles are orche
|
|
|
8
8
|
|
|
9
9
|
Only the Orchestrator (`dsmm-orchestrator`) is a selectable standing root, and it is the only composition DSMM registers with the native preset registry. Every other role is an internal delegation target: no role preset is registered for it, and a delegated child shares its parent's standing composition while the admitted invocation carries its role, identity and restrictions. `roles.*` controls delegation availability; disabling a role removes its callable tool and admission entirely. Native preset selection displays `DW …` labels under unchanged IDs. A role name is a responsibility, not a model choice or authority claim.
|
|
10
10
|
|
|
11
|
-
Native `agentPresets.register({id, plugins})` publishes only the selectable dispatcher composition; DSH doesn't discover presets by scanning exported directories. The native export roster lists only the dispatcher, and creation/execution checks reject every non-dispatcher DSMM root. Generated `agent-presets/` mirrors are inspection/export resources. `presets.materialize` defaults off, publishes only the dispatcher preset directory and never selects the Host default preset. Personas, read-only restrictions and host approvals remain when explicit Deepwork off hides common workflow and DSMM skills.
|
|
11
|
+
Native `agentPresets.register({id, plugins})` publishes only the selectable dispatcher composition; DSH doesn't discover presets by scanning exported directories. The native export roster lists only the dispatcher, and creation/execution checks reject every non-dispatcher DSMM root. Generated `agent-presets/` mirrors are inspection/export resources. `presets.materialize` defaults off, publishes only the dispatcher preset directory and never selects the Host default preset. Personas, read-only restrictions and host approvals remain when explicit Deepwork off hides common workflow and DSMM skills. Maintained source content, generation and resource provenance are described in [maintenance](maintenance.md).
|
|
12
12
|
|
|
13
13
|
Optional preset materialization writes only the DSMM-owned dispatcher preset directory under its configured root. Ownership requires the exact role-bound marker and expected regular files; foreign directories, extra entries, links and containment escapes refuse update/removal. New directories publish by same-parent rename. A legacy marker is accepted only with the complete expected regular-file shape, never as permission to claim unrelated content. Reconciling removes verified owned directories of every non-dispatcher role, including ones published by earlier versions. Materialized files remain export resources, not an alternative native registration mechanism.
|
|
14
14
|
|
package/docs/compatibility.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DSMM compatibility and upgrade boundaries
|
|
2
2
|
|
|
3
|
-
**DSMM 0.3.
|
|
3
|
+
**DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`** and Node.js 22 or later. Older SDKs and automatically drifting versions aren't supported targets.
|
|
4
4
|
|
|
5
5
|
## Supported integration
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ Standard supported model calls use native prepared calls. Raw/custom and Pi-AI s
|
|
|
38
38
|
|
|
39
39
|
## Retired compatibility surfaces
|
|
40
40
|
|
|
41
|
-
No old SDK branch, legacy-read host, cold-profile migration, session repair or custom-owner selector is a 0.3.
|
|
41
|
+
No old SDK branch, legacy-read host, cold-profile migration, session repair or custom-owner selector is a 0.3.10 activation path. Old libraries, captures and unmarked history aren't copied, rewritten, repaired or adopted by same-name fallback. Retired brand calibration/default-effort and MaxReasoningPresets fields reject with `deprecated-field`; edit configuration deliberately using generic routes and parameters.
|
|
42
42
|
|
|
43
43
|
Published **0.3.0 retains its rc.1 identity**, immutable tag, package, assets and version-bound receipt grammar. Historical release controls interpret those records under their original identity, not as a runtime compatibility branch.
|
|
44
44
|
|
package/docs/design.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DSMM native architecture
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`. It supplies Core configuration and native permission integration plus optional Deepwork roles, routing and skills.
|
|
4
4
|
|
|
5
5
|
## Composition and authority
|
|
6
6
|
|
package/docs/lsp.md
CHANGED
|
@@ -4,9 +4,11 @@ This version doesn't enable DSMM-managed external LSP. The integration implement
|
|
|
4
4
|
|
|
5
5
|
The default `cordis.patch.yml` doesn't add an MCP client row. This restriction applies only to DSMM's automatic integration: it doesn't disable DSH's own LSP services or an MCP server independently configured by the operator. DSMM doesn't download servers or native binaries.
|
|
6
6
|
|
|
7
|
+
The manual integration uses the `ocmm-lsp` executable published by the `ocmm` npm package. DSMM does not contain the LSP source, Rust/native build, platform-package matrix, or LSP release workflow, and does not declare `ocmm` as a package dependency. The operator must separately provide the published `ocmm` package and its matching optional `ocmm-lsp-*` platform package in the Host execution environment; installs that omit optional dependencies cannot provide the native binary. No source checkout or parent-repository `dist/` path is a supported fallback.
|
|
8
|
+
|
|
7
9
|
## Retained manual example
|
|
8
10
|
|
|
9
|
-
The
|
|
11
|
+
The retained [manual patch](../patches/ocmm-lsp-mcp.example.cordis.patch.yml) remains available as a native-host configuration reference, not a supported DSMM activation entry for this version. Independently managed MCP composition remains the operator's responsibility, including npm package availability, executable resolution, namespace uniqueness and native lifecycle ownership.
|
|
10
12
|
|
|
11
13
|
The retained example describes:
|
|
12
14
|
|
|
@@ -17,6 +19,8 @@ The retained example describes:
|
|
|
17
19
|
- `failOnStartupError: true`
|
|
18
20
|
- `toolCallTimeoutMs: 60000`
|
|
19
21
|
|
|
22
|
+
`ocmm-lsp` above is the npm package's declared executable. An explicit absolute command override may be used by the Host, but DSMM does not discover a sibling checkout, compile the binary, or publish an alternative LSP artifact.
|
|
23
|
+
|
|
20
24
|
## Retained tool interface
|
|
21
25
|
|
|
22
26
|
An independently mounted native MCP client using `serverName: dsmm_lsp` uses the following tool names. This inventory describes the retained interface, not tools automatically available from DSMM in this version:
|
|
@@ -35,6 +39,6 @@ An independently mounted native MCP client using `serverName: dsmm_lsp` uses the
|
|
|
35
39
|
|
|
36
40
|
DSMM's read-only role restrictions don't grant rename or format permission. The retained `lspRuntime` status interface reports bounded state, diagnostic codes and tool names, not executable paths, arguments or environment values. Tool discovery alone doesn't prove language-server availability or a successful symbol query.
|
|
37
41
|
|
|
38
|
-
DSMM 0.3.
|
|
42
|
+
DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`. Automatic external LSP mounting isn't delivered; the retained interface inventory isn't an activation path.
|
|
39
43
|
|
|
40
44
|
DSH's native definition/references/implementation/hover surface isn't a promise of diagnostics, rename or format. The retained external interface above doesn't expand that native scope. Independently managed MCP users must verify actual executable and language-server availability; DSMM doesn't certify or repair that environment.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# DSMM maintenance
|
|
2
|
+
|
|
3
|
+
DSMM is maintained as a standalone project. `src/`, `prompts/`, and `skills/` are
|
|
4
|
+
the authoritative source trees. Builds, tests, generators and package checks must
|
|
5
|
+
not read a parent or sibling repository.
|
|
6
|
+
|
|
7
|
+
## Toolchain
|
|
8
|
+
|
|
9
|
+
Use Node.js 24 for CI/release and pnpm 11.9.0. The package still supports Node.js
|
|
10
|
+
22 or later at runtime and targets exactly DSH `0.2.1-rc.2`. Do not change the npm
|
|
11
|
+
name `@dsmm/dsmm`, package version, or DSH dependency line as part of routine
|
|
12
|
+
maintenance unless the release or compatibility scope explicitly requires it.
|
|
13
|
+
|
|
14
|
+
Common checks:
|
|
15
|
+
|
|
16
|
+
```powershell
|
|
17
|
+
pnpm run typecheck
|
|
18
|
+
pnpm run build
|
|
19
|
+
pnpm run test:run
|
|
20
|
+
pnpm run check:frontend
|
|
21
|
+
pnpm run check:roles
|
|
22
|
+
pnpm pack --pack-destination <approved-output-directory>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`pnpm test` remains the convenient build-plus-test command. Dependency installation
|
|
26
|
+
and lockfile maintenance are separate authorized operations.
|
|
27
|
+
|
|
28
|
+
## Generated role assets
|
|
29
|
+
|
|
30
|
+
`src/roles.ts`, `src/prompts.ts`, and `prompts/source/` supply the maintained role
|
|
31
|
+
and workflow content. After changing inputs that affect rendered presets or the
|
|
32
|
+
base Deepwork prompt, run `pnpm run generate:roles`. CI uses
|
|
33
|
+
`pnpm run check:roles` and fails if `agent-presets/` or `prompts/deepwork.md` is
|
|
34
|
+
stale. Generated assets are package resources, not an alternate source of truth.
|
|
35
|
+
|
|
36
|
+
## Frontend resources and provenance
|
|
37
|
+
|
|
38
|
+
The full `skills/frontend/` tree is maintained in this repository and shipped in
|
|
39
|
+
the npm package. `scripts/frontend-recipe.mjs`, fixed upstream commits,
|
|
40
|
+
`skills/frontend/.frontend-materialized.json`, and
|
|
41
|
+
`skills/frontend/ATTRIBUTION.md` define its provenance and integrity boundary.
|
|
42
|
+
Third-party licenses and notices remain with their resources.
|
|
43
|
+
|
|
44
|
+
Ordinary build and `check:frontend` are offline. They require the complete local
|
|
45
|
+
resource set and never download or replace files. `pnpm run sync:frontend` is the
|
|
46
|
+
only network materialization command; use it only with explicit authorization. It
|
|
47
|
+
fetches missing files from the fixed commits, verifies Git blob identities and
|
|
48
|
+
license blobs, and refuses unsafe destinations. Review and commit the resulting
|
|
49
|
+
resource and inventory changes together.
|
|
50
|
+
|
|
51
|
+
## LSP dependency boundary
|
|
52
|
+
|
|
53
|
+
DSMM retains only configuration and smoke-test integration for `ocmm-lsp mcp`.
|
|
54
|
+
The executable, native binaries, platform packages and their release lifecycle are
|
|
55
|
+
provided by the published `ocmm` npm package. Do not copy LSP source, native build
|
|
56
|
+
logic or platform publication into this repository. Dependency and lockfile
|
|
57
|
+
maintenance must ensure the published package and matching optional platform
|
|
58
|
+
package are available without relying on a sibling checkout.
|
|
59
|
+
|
|
60
|
+
## Release
|
|
61
|
+
|
|
62
|
+
Pull requests and branch pushes run `.github/workflows/ci.yml` and never publish.
|
|
63
|
+
Only an exact `v<package-version>` tag can enter `.github/workflows/release.yml`.
|
|
64
|
+
See [releasing](releasing.md) for immutable publication rules and npm Trusted
|
|
65
|
+
Publishing prerequisites.
|
package/docs/model-routing.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Providers, accounts and credentials remain native DSH configuration, never named-profile contents.
|
|
4
4
|
|
|
5
|
-
DSMM 0.3.
|
|
5
|
+
DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`. Standard calls use native prepared calls. The public Pi-AI completions seam supports self-contained literal and explicit model-mapping raw configurations; unsupported catalog-backed raw combinations are rejected without affecting standard calls.
|
|
6
6
|
|
|
7
7
|
## Native roots and child defaults
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Native permissions
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`. DSH owns approval; DSMM composes policy into the native tool pipeline without a second approval queue, UI, TTL or session permit memory.
|
|
4
4
|
|
|
5
5
|
## Full access and approval
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ A captured read-only child or a live, composed DSMM read-only preset has an expl
|
|
|
10
10
|
|
|
11
11
|
Actual DSH manual approval is final for the same call and approved scope. Older DSMM rules, a changed permission revision or epoch, and DSMM internal gates don't veto it afterward. A pending native approval isn't canceled merely because a permission source changes.
|
|
12
12
|
|
|
13
|
-
A native once grant applies only to its actual call and scope. It doesn't change standing session permissions, authorize later calls or turn a narrower approval into full access.
|
|
13
|
+
A native once grant applies only to its actual call and scope. It doesn't change standing session permissions, authorize later calls or turn a narrower approval into full access. Model-supplied arguments aren't approval; a matching simple allowlist entry selects an automatic answer for the current native request, not a reusable grant. Native policy `never` refuses before the rc2 answerer and cannot be overridden by it. Caller/native cancellation remains effective, and the original tool or OS can still fail. Permission to execute isn't a command-success guarantee.
|
|
14
14
|
|
|
15
15
|
## Settings and synchronization
|
|
16
16
|
|
|
@@ -24,21 +24,31 @@ Storage CAS and runtime adoption are separate from native call approval. Saves r
|
|
|
24
24
|
|
|
25
25
|
Configuration writes require the real native operator, exact entry/form or Root authority and a live connection/owner through every await and immediately before commit. Serialized provenance, a client loopback claim or an old registration isn't authority. Only relevant effective permission changes coordinate revocation; unrelated model/locale/display edits aren't a second approval gate. A committed write stays committed when notification or observation fails, with refresh-required/unsynchronized status. An unconfirmed native result requires reread, not blind retry.
|
|
26
26
|
|
|
27
|
+
## Trusted read-only calls
|
|
28
|
+
|
|
29
|
+
Trusted native `read`, `glob` and `grep` calls do not request outside-read approval, inside or outside the workspace. This includes saved `outsideReads: ask` and `outside-read` entries with `action: ask`. DSMM continues reading these settings without rewriting user configuration. Missing FS/path or co-location facts do not turn `allow`, `ask` or `inherit` into a read approval.
|
|
30
|
+
|
|
31
|
+
Existing deny policy and path-rule matching remain effective. Outside standing Full access, a relevant deny fails closed when the required containment or path facts cannot be proved; an unknown backend is not proof that a target is inside the workspace. Standing Full access retains its definite-blacklist behavior described above.
|
|
32
|
+
|
|
33
|
+
The same outside-read behavior applies to the existing shell read branch only when the native adapter supplies a current, trusted `readCapability` for the actual executable and environment. A tool name, command name or workspace cwd is not read-only proof. Independent shell command rules, unknown-command behavior and web/Git policy are unchanged.
|
|
34
|
+
|
|
35
|
+
This removes only DSMM outside-read asks. Independent downstream asks, denials and cancellation still apply, including third-party tools with familiar names. Native read-only restrictions, role/tool/RPC ceilings and exact registration, body, arguments, Agent and invocation-token bindings remain in force. A native once approval still belongs only to its original call.
|
|
36
|
+
|
|
27
37
|
## Configuration drawer and command rules
|
|
28
38
|
|
|
29
39
|
Use **Plugins → DSMM bundle config → Permissions**. The selected Global/native-profile scope edits its sparse deployment policy; a separate Root-rules transaction writes Global only under the existing live operator, exact open Root, registration and synchronized-policy authority. A child, stale connection, read-only Host or shadowing native policy doesn't acquire a fallback Global write. Named Profiles can't grant these permissions. No duplicate Settings permission page or Conversation permission tab is registered.
|
|
30
40
|
|
|
31
41
|
A trusted, writable native Root can manage Global rules without DSMM role admission, including when it predates Core mounting and currently uses the user-selectable `dsmm-orchestrator` composition. Qualification uses the current native composition, never a historical preset label; auxiliary, read-only and unknown `dsmm-` compositions remain ineligible without admission. Rule management does not grant DSMM role execution rights. Captured DSMM objects still require current admission and role checks, and retired captures cannot fall back to ordinary native authority.
|
|
32
42
|
|
|
33
|
-
`permissionControl.nativeCommands` defaults off.
|
|
43
|
+
`permissionControl.nativeCommands` defaults off. Entries in `permissionControl.nativeCommands.entries` accept simple command/subcommand pattern strings (e.g. `git`, `git status`, `go test`) or legacy object entries (`NativeCommandEntry`). Legacy entries are preserved losslessly without silent conversion or authorization widening.
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
In the UI, new command entries are entered simply as command strings with Add and Remove actions. There are no ID, tool, cwd, sandbox or action selectors, and no repetitive override or explanation lines. Saved legacy structured entries display a compact read-only summary showing the command and identifiable constraints (tool, working directory, ask/sandbox differences viewable in collapsible details) plus a delete button.
|
|
36
46
|
|
|
37
|
-
|
|
47
|
+
Simple command rules support literal command and subcommand prefixes (such as `git`, `git status`, `go test`) and optional alternatives (`go build|test`). A match takes priority over DSMM command ask/deny and legacy command entries, automatically approving native `danger-full-access` for that invocation. Unmatched commands follow the ordinary policy path. Shell chaining, pipes, redirects and complex shell syntax do not match. Current invocation identity, cancellation and role/tool eligibility remain required; the grant does not change the session's standing sandbox.
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
An additional outer middleware may request approval after the pre-execution pipeline has returned. When that request has no exact execution association, it retains native approval handling; DSMM does not infer authorization from a shared call ID, signal or tool name.
|
|
40
50
|
|
|
41
|
-
New UI entries
|
|
51
|
+
New UI entries require a valid, non-empty command pattern before saving; empty or invalid drafts lock the Save button. Removing a row discards that row's draft and reindexes the remaining raw drafts cleanly; Unset restores default configuration in Global scope and inherits Global configuration in Profile scope.
|
|
42
52
|
|
|
43
53
|
Observed `kind:shell` registration isn't proof of the actual executor, environment, executable or sandbox. The editor doesn't auto-certify those values. Missing/stale controller or registration identity still refuses consumption. Saving a rule isn't native manual approval and doesn't solve an unexplained read-only Git prompt; that investigation needs the full triggering call and approval reason.
|
|
44
54
|
|
|
@@ -53,3 +63,11 @@ Same-call approval, cancellation, ownership and input isolation remain effective
|
|
|
53
63
|
See [running-overlay and approval boundaries](deferred-native-approval-risk.md).
|
|
54
64
|
|
|
55
65
|
Outside-read and web policies apply to their native tool surfaces. They don't provide complete filesystem/network isolation for arbitrary shell commands or replace operating-system checks on the final inode and socket target.
|
|
66
|
+
|
|
67
|
+
### Workspace and system-temp modifications
|
|
68
|
+
|
|
69
|
+
DSMM does not add a path-range approval layer to native write/edit or ordinary shell modifications, including targets in workspace and system-temp subdirectories. Explicit command/Git rules, role/tool restrictions and native or third-party approval decisions remain effective. A temp path does not automatically approve an independent request.
|
|
70
|
+
|
|
71
|
+
Native write/edit retain their FS intents, observation/version checks, atomic modification and backend-provided sandbox escalation. Shell execution retains the native executor, standing sandbox and explicit call-scoped escalation. DSMM does not infer every command's effects from its cwd, raise the sandbox mode because a temp path appears in its arguments, or automatically replay a denied command.
|
|
72
|
+
|
|
73
|
+
Actual write access remains backend-dependent: the stock Windows shell sandbox uses a private temp directory, not the entire shared system temp, and stock LocalFS does not itself enforce sandbox write scopes. DSMM neither changes system-temp ACLs nor supplies a replacement sandbox or FS isolation layer. Absence of an extra DSMM approval does not prove that a backend permits a write or requires approval for every outside write.
|
package/docs/profiles.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deepwork runtime profiles
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`. See [compatibility](compatibility.md) for installation boundaries.
|
|
4
4
|
|
|
5
5
|
A named Deepwork profile is a runtime-policy document, not a native deployment profile or Agent preset. Open **Settings → Deepwork Profiles** to browse and edit it. Native **Plugins → DSMM** edits deployment layers instead, as described in [settings and status](settings-status.md).
|
|
6
6
|
|
package/docs/releasing.md
CHANGED
|
@@ -1,34 +1,53 @@
|
|
|
1
1
|
# DSMM release
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
npm
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
##
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
3
|
+
The standalone repository publishes from `.github/workflows/release.yml` when a
|
|
4
|
+
`vX.Y.Z` tag is pushed. The tag must equal `v` plus the exact `package.json`
|
|
5
|
+
version. The workflow never rewrites package metadata from a tag.
|
|
6
|
+
|
|
7
|
+
## External setup
|
|
8
|
+
|
|
9
|
+
Before publication, npm Trusted Publishing must be configured for `@dsmm/dsmm`
|
|
10
|
+
with these exact values:
|
|
11
|
+
|
|
12
|
+
- provider: GitHub Actions
|
|
13
|
+
- repository: `hugefiver/dsmm`
|
|
14
|
+
- workflow filename: `release.yml`
|
|
15
|
+
- permission: publish
|
|
16
|
+
|
|
17
|
+
The npm package and maintainer ownership must already exist. The workflow uses
|
|
18
|
+
GitHub's OIDC token and does not use a long-lived npm token. Repository Actions
|
|
19
|
+
must also permit the workflow's job-scoped `contents: write` permission so it can
|
|
20
|
+
create a GitHub Release.
|
|
21
|
+
|
|
22
|
+
## Verification and publication
|
|
23
|
+
|
|
24
|
+
The read-only verification job uses Node.js 24 and pnpm 11.9.0, installs the
|
|
25
|
+
standalone lockfile with `--frozen-lockfile`, then runs the build, source
|
|
26
|
+
typecheck, tests, offline frontend resource check, generated-role consistency
|
|
27
|
+
check, and package creation. It uploads an exact three-file artifact containing
|
|
28
|
+
the packed tarball, `SHA256SUMS.txt`, and an identity record bound to the tag,
|
|
29
|
+
commit, run and attempt.
|
|
30
|
+
|
|
31
|
+
The dependent publication job has `contents: write` and `id-token: write`. It
|
|
32
|
+
doesn't check out the repository, install project dependencies, or execute project
|
|
33
|
+
code. It downloads the artifact, rechecks its exact file set, checksum, workflow
|
|
34
|
+
identity and packed npm name/version, and then rechecks both publication surfaces.
|
|
35
|
+
Only the tarball and `SHA256SUMS.txt` become GitHub Release assets.
|
|
36
|
+
|
|
37
|
+
Before building and again immediately before publication, the workflow refuses a
|
|
38
|
+
tag/version mismatch, an npm version that already exists, or an existing GitHub
|
|
39
|
+
Release for the tag. npm publication uses `--provenance`, public access, the public
|
|
40
|
+
registry, disabled lifecycle scripts and no fetch retries. GitHub Release creation
|
|
41
|
+
uses the same tarball and `SHA256SUMS.txt`; no overwrite option is used.
|
|
42
|
+
Concurrency is serialized without cancelling an in-progress release.
|
|
43
|
+
|
|
44
|
+
## Failure handling
|
|
45
|
+
|
|
46
|
+
npm and GitHub Release are distinct immutable publication surfaces. A failure
|
|
47
|
+
after either surface is published is a partial release, not authorization to move
|
|
48
|
+
or recreate the tag, republish the npm version, or replace an asset. Report the
|
|
49
|
+
exact workflow result and use a separately authorized new version/tag.
|
|
50
|
+
|
|
51
|
+
Publication does not install DSMM. Installation requires matching DSH
|
|
52
|
+
`0.2.1-rc.2` and separate authorization, and must preserve accounts, credentials,
|
|
53
|
+
history and unrelated configuration.
|
package/docs/roadmap.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Version policy
|
|
4
4
|
|
|
5
|
-
**DSMM 0.3.
|
|
5
|
+
**DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`.** Each DSMM version targets the published DSH RC or stable release selected for that version. Older SDKs and old configuration schemas aren't runtime compatibility targets. Loading sessions created by DSMM `0.2.x` is a required compatibility target, separate from retaining old runtime implementations or execution behavior. A newer upstream release requires deliberate reassessment, not an automatic dependency or runtime switch.
|
|
6
6
|
|
|
7
7
|
Published `0.3.0` retains its original rc.1 package, tag, assets and version-bound release identity.
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ Sessions created by DSMM `0.2.x` must remain loadable under the supported curren
|
|
|
40
40
|
- Retired presets, plugins, metadata or admission formats require interpretation, migration or an explicit degraded mode rather than whole-session rejection solely because the old implementation is unavailable. This does not require restoring the old SDK or execution owner.
|
|
41
41
|
- Continued execution may use current roles, routing, configuration and permission semantics. Explain material differences and request fresh authorization where necessary; never treat historical metadata or approvals as current authority. When continuation is unavailable, retain the loaded history and expose the specific limitation separately.
|
|
42
42
|
- Preserve original records. Any necessary migration must protect user data with a recoverable original and concurrent-write safeguards; never discard history merely to make loading succeed. Corrupt or genuinely unreadable data must produce a specific diagnostic rather than silently removing the session.
|
|
43
|
-
- Acceptance covers opening representative `0.2.x` root and child histories, retaining titles/list entries and readable content, and separating continuation restrictions from loading. These are pending compatibility requirements, not claims that `0.3.
|
|
43
|
+
- Acceptance covers opening representative `0.2.x` root and child histories, retaining titles/list entries and readable content, and separating continuation restrictions from loading. These are pending compatibility requirements, not claims that `0.3.10` already fulfills them.
|
|
44
44
|
|
|
45
45
|
## Working-tree implementation: profile selection before the first message
|
|
46
46
|
|
|
@@ -95,4 +95,4 @@ Existing [Fake-IP fetch](web-fetch-fakeip.md) protections remain in force.
|
|
|
95
95
|
|
|
96
96
|
## Publication and Desktop installation
|
|
97
97
|
|
|
98
|
-
0.3.
|
|
98
|
+
0.3.10 publication uses the version-bound [release controls](releasing.md). Desktop plugin installation follows publication, uses the Desktop-owned carrier and requires exact DSH `0.2.1-rc.2`. Installation doesn't authorize upgrading the Host, changing credentials or real sessions, altering unrelated configuration, or restarting active work. An incompatible Host or required data migration blocks installation rather than expanding its scope.
|
package/docs/runtime-recovery.md
CHANGED
package/docs/safety-guards.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DSMM Safety Guards
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`. Its guards use `tools/pre-execute` for allow, deny and ask decisions, and `tools/post-execute` for accepted-result truncation. They don't use OpenCode hook names or mutate tool arguments. Deployment overrides belong in the `id: dsmm` Loader entry's `config` object, not a settings.yaml namespace.
|
|
4
4
|
|
|
5
5
|
## Scope
|
|
6
6
|
|
package/docs/settings-status.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deepwork settings and status
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.10 targets exactly DSH `0.2.1-rc.2`. 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
|
|
|
@@ -42,6 +42,8 @@ The inspector separates merged desired, startup-mounted/captured, next-root prev
|
|
|
42
42
|
|
|
43
43
|
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.
|
|
44
44
|
|
|
45
|
+
When enabled, simple command strings in `permissionControl.nativeCommands.entries` take priority over DSMM command rules and legacy command entries: a match skips their ask/deny decisions and automatically approves native `danger-full-access` for that invocation. Unmatched calls retain the ordinary policy path. The grant does not change the session's standing sandbox or transfer to another call; current invocation identity, cancellation and role/tool eligibility still apply. Native approval policy `never` cannot be overridden through the rc2 answerer. Legacy object entries retain their stored scope and behavior when no simple string matches.
|
|
46
|
+
|
|
45
47
|
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.
|
|
46
48
|
|
|
47
49
|
Permission revisions identify the Host profile scope and current global-file/native-descriptor versions, not configuration content integrity or per-rule version maxima. Missing native version authority refuses synchronization. Controlled saves reread storage and publish policy only after notification acknowledges it. A committed global save remains successful with refresh required when postcommit coordination fails; runtime synchronization is a separate state. Notification failure exposes saved/runtime revisions as unsynchronized; recovery rereads authoritative storage. Version, 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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState, useSyncExternalStore } from "react";
|
|
3
3
|
import { Button, Input } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
4
|
-
import { at, enumValues,
|
|
4
|
+
import { at, enumValues, mergeLayer, parseAdvanced, validateEditorValue } from "./deployment-data.js";
|
|
5
5
|
import { deploymentFieldLabels } from "./deployment-locales.js";
|
|
6
6
|
import { permissionEn, permissionZh } from "./permission-locales.js";
|
|
7
7
|
import { NativeCommandEntries } from "./NativeCommandEntries.js";
|
|
@@ -32,7 +32,8 @@ export function displayValue(value, t) {
|
|
|
32
32
|
export function AdvancedField({ schema, path, controller, inherited, upper, expanded, onExpandedChange, t }) {
|
|
33
33
|
const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), id = useId(), name = path.join(".");
|
|
34
34
|
const value = at(state.draft, path), raw = state.raw[name], text = raw?.text ?? (value === undefined ? "" : JSON.stringify(value, null, 2)), invalid = raw?.invalid === true;
|
|
35
|
-
|
|
35
|
+
const unsetLabel = controller.layer === "global" ? t("useDefaults") : t("restoreInheritance");
|
|
36
|
+
return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: expanded, onToggle: event => onExpandedChange?.(event.currentTarget.open), children: [_jsxs("summary", { id: `${id}-label`, children: [fieldLabel(path, t), " \u00B7 ", t("advanced")] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("p", { className: "dsmm-hint", id: `${id}-hint`, children: t("advancedHint") }), path[0] === "permissionControl" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("configRulesHint") }), _jsx("textarea", { id: id, rows: 6, maxLength: 32768, value: text, disabled: !controller.canEdit(), "aria-labelledby": `${id}-label`, "aria-invalid": invalid, "aria-describedby": `${id}-hint ${id}-error`, onChange: event => {
|
|
36
37
|
const next = event.currentTarget.value;
|
|
37
38
|
let parsed, valid = true;
|
|
38
39
|
try {
|
|
@@ -46,19 +47,20 @@ export function AdvancedField({ schema, path, controller, inherited, upper, expa
|
|
|
46
47
|
controller.setRaw(name, next, !valid);
|
|
47
48
|
if (valid)
|
|
48
49
|
controller.edit(path, parsed);
|
|
49
|
-
} }), _jsx("p", { id: `${id}-error`, className: "dsmm-hint", children: invalid ? t("invalid") : "" }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: !controller.canEdit() || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children:
|
|
50
|
+
} }), _jsx("p", { id: `${id}-error`, className: "dsmm-hint", children: invalid ? t("invalid") : "" }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: !controller.canEdit() || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children: unsetLabel }), _jsxs("details", { children: [_jsx("summary", { children: t("inherit") }), _jsx("pre", { children: JSON.stringify(inherited, null, 2) })] }), _jsxs("details", { children: [_jsx("summary", { children: "schema" }), _jsx("pre", { children: JSON.stringify(schema, null, 2) })] })] })] });
|
|
50
51
|
}
|
|
51
52
|
export function ScalarField({ schema, path, controller, inherited, t }) {
|
|
52
53
|
const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), id = useId(), name = path.join(".");
|
|
53
54
|
const value = at(state.draft, path), raw = state.raw[name], bad = raw?.invalid === true;
|
|
54
55
|
const units = name === "guards.toolOutputTruncation.maxInlineBytes" ? ` · ${permissionText(t)("unitBytes")}` : name === "guards.questionLabelHelper.maxLabelChars" ? ` · ${permissionText(t)("unitChars")}` : "";
|
|
56
|
+
const unsetLabel = controller.layer === "global" ? t("useDefaults") : t("restoreInheritance");
|
|
55
57
|
return _jsxs(_Fragment, { children: [_jsx("label", { htmlFor: id, children: fieldLabel(path, t) }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Input, { className: "dsmm-input", id: id, type: "text", inputMode: schema.type === "number" ? "decimal" : undefined, value: raw?.text ?? String(value ?? inherited ?? ""), disabled: !controller.canEdit(), "aria-invalid": bad, "aria-describedby": `${id}-error`, onChange: event => {
|
|
56
58
|
const text = event.currentTarget.value, candidate = schema.type === "number" ? Number(text) : text;
|
|
57
59
|
const valid = (schema.type !== "number" || text.trim() !== "") && validateEditorValue(candidate, schema);
|
|
58
60
|
controller.setRaw(name, text, !valid);
|
|
59
61
|
if (valid)
|
|
60
62
|
controller.edit(path, candidate);
|
|
61
|
-
} }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: !controller.canEdit() || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children:
|
|
63
|
+
} }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: !controller.canEdit() || value === undefined && raw === undefined, onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children: unsetLabel })] }), _jsxs("p", { id: `${id}-error`, className: "dsmm-hint", children: [bad ? t("invalid") : "", schema.type === "number" && (schema.min !== undefined || schema.max !== undefined) ? ` ${schema.min ?? "—"} – ${schema.max ?? "—"}` : "", units] })] });
|
|
62
64
|
}
|
|
63
65
|
export function Field({ schema, path, controller, initiallyOpen = false, disclosures, t }) {
|
|
64
66
|
if (schema.type === "transform" && schema.inner !== undefined)
|
|
@@ -66,6 +68,7 @@ export function Field({ schema, path, controller, initiallyOpen = false, disclos
|
|
|
66
68
|
const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), snapshot = state.snapshot, id = useId(), name = path.join(".");
|
|
67
69
|
const [open, setOpen] = useState(disclosures?.get(name) ?? initiallyOpen);
|
|
68
70
|
const expand = (expanded) => { disclosures?.set(name, expanded); setOpen(expanded); };
|
|
71
|
+
const unsetLabel = controller.layer === "global" ? t("useDefaults") : t("restoreInheritance");
|
|
69
72
|
const unsetGroup = (event) => {
|
|
70
73
|
// The group action lives in the title row; prevent the disclosure's own activation
|
|
71
74
|
// instead of swallowing key events, so Enter/Space each activate this button once.
|
|
@@ -90,9 +93,9 @@ export function Field({ schema, path, controller, initiallyOpen = false, disclos
|
|
|
90
93
|
if (name === "permissionControl.rules")
|
|
91
94
|
return _jsx("div", { "data-field": name, children: _jsx(PermissionRuleEntries, { controller: controller, value: explicit, inherited: (inherited ?? []), disabled: disabled, onChange: value => controller.edit(path, value), expanded: open, onExpandedChange: expand, t: permissionText(t) }) });
|
|
92
95
|
if (schema.type === "object" && schema.fields !== undefined && path[0] !== "roleRouting")
|
|
93
|
-
return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: open, onToggle: event => expand(event.currentTarget.open), children: [_jsx("summary", { className: "dsmm-group-summary-row", children: _jsxs("span", { className: "dsmm-group-summary", children: [_jsx("span", { className: "dsmm-group-summary-label", children: fieldLabel(path, t) }), _jsx(Button, { type: "button", variant: "outline", className: "dsmm-group-summary-action", "data-dsmm-unset": name, hidden: !open, disabled: disabled || explicit === undefined && !Object.keys(state.raw).some(key => key === name || key.startsWith(`${name}.`)), onClick: unsetGroup, children:
|
|
96
|
+
return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: open, onToggle: event => expand(event.currentTarget.open), children: [_jsx("summary", { className: "dsmm-group-summary-row", children: _jsxs("span", { className: "dsmm-group-summary", children: [_jsx("span", { className: "dsmm-group-summary-label", children: fieldLabel(path, t) }), _jsx(Button, { type: "button", variant: "outline", className: "dsmm-group-summary-action", "data-dsmm-unset": name, hidden: !open, disabled: disabled || explicit === undefined && !Object.keys(state.raw).some(key => key === name || key.startsWith(`${name}.`)), onClick: unsetGroup, children: unsetLabel })] }) }), _jsxs("div", { children: [name === "permissionControl" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("configPolicyHint") }), Object.entries(schema.fields).map(([key, node]) => _jsx(Field, { schema: node, path: [...path, key], controller: controller, disclosures: disclosures, t: t }, key))] })] });
|
|
94
97
|
if (!["boolean", "string", "number"].includes(schema.type) && choices === null)
|
|
95
98
|
return _jsx(AdvancedField, { schema: schema, path: path, controller: controller, inherited: inherited, upper: controller.layer === "global" ? at(snapshot.profile, path) : undefined, expanded: open, onExpandedChange: expand, t: t });
|
|
96
|
-
return _jsxs("div", { className: "dsmm-field dsmm-deployment-field", "data-field": name, children: [schema.type === "boolean" || choices !== null ? _jsxs(_Fragment, { children: [_jsx("label", { htmlFor: id, children: fieldLabel(path, t) }), _jsxs("select", { id: id, disabled: disabled, value: explicit === undefined ? "inherit" : JSON.stringify(explicit), onChange: event => controller.edit(path, event.currentTarget.value === "inherit" ? undefined : JSON.parse(event.currentTarget.value)), children: [_jsx("option", { value: "inherit", children: `${
|
|
99
|
+
return _jsxs("div", { className: "dsmm-field dsmm-deployment-field", "data-field": name, children: [schema.type === "boolean" || choices !== null ? _jsxs(_Fragment, { children: [_jsx("label", { htmlFor: id, children: fieldLabel(path, t) }), _jsxs("select", { id: id, disabled: disabled, value: explicit === undefined ? "inherit" : JSON.stringify(explicit), onChange: event => controller.edit(path, event.currentTarget.value === "inherit" ? undefined : JSON.parse(event.currentTarget.value)), children: [_jsx("option", { value: "inherit", children: `${unsetLabel} · ${displayValue(inherited, t)}` }), (choices ?? [true, false]).map(choice => _jsx("option", { value: JSON.stringify(choice), children: displayValue(choice, t) }, String(choice)))] })] }) : _jsx(ScalarField, { schema: schema, path: path, controller: controller, inherited: inherited, t: t }), name === "modelParameters.passthrough" && _jsx("p", { className: "dsmm-hint", children: t("modelParametersHint") }), name === "permissionControl.enabled" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("coldHint") })] });
|
|
97
100
|
}
|
|
98
101
|
//# sourceMappingURL=DeploymentFields.js.map
|