@dsmm/dsmm 0.3.1 → 0.3.3

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.
Files changed (54) hide show
  1. package/README.md +2 -2
  2. package/docs/agent-presets.md +5 -5
  3. package/docs/compatibility.md +7 -1
  4. package/docs/migration-from-ocmm.md +1 -1
  5. package/docs/releasing.md +25 -65
  6. package/docs/roadmap.md +37 -2
  7. package/docs/settings-status.md +1 -1
  8. package/lib/client/DeploymentFields.d.ts +6 -2
  9. package/lib/client/DeploymentFields.js +8 -6
  10. package/lib/client/DeploymentPage.d.ts +1 -0
  11. package/lib/client/DeploymentPage.js +4 -3
  12. package/lib/client/ProfilesSection.js +3 -3
  13. package/lib/client/RoleAvailability.js +1 -1
  14. package/lib/client/SessionProfiles.js +21 -18
  15. package/lib/client/controller.d.ts +17 -0
  16. package/lib/client/controller.js +104 -18
  17. package/lib/client/deployment-locales.js +26 -27
  18. package/lib/client/deployment-modules.js +1 -1
  19. package/lib/client/index.js +10 -2
  20. package/lib/client/locales.d.ts +6 -0
  21. package/lib/client/locales.js +148 -124
  22. package/lib/client/permission-locales.js +35 -35
  23. package/lib/client.js +645 -542
  24. package/lib/index.js +10 -5
  25. package/lib/native-admission.d.ts +18 -0
  26. package/lib/native-admission.js +174 -17
  27. package/lib/permission-control.d.ts +2 -0
  28. package/lib/permission-control.js +7 -0
  29. package/lib/permission-controller.js +2 -2
  30. package/lib/permission-native-rules.js +3 -3
  31. package/lib/preset-materializer.js +3 -3
  32. package/lib/preset-registry.d.ts +20 -2
  33. package/lib/preset-registry.js +46 -17
  34. package/lib/preset-skills.d.ts +1 -1
  35. package/lib/preset-skills.js +2 -2
  36. package/lib/profile-diagnostics.js +1 -1
  37. package/lib/profile-remote.js +1 -3
  38. package/lib/profile-rpc.js +2 -0
  39. package/lib/profile-runtime.d.ts +12 -1
  40. package/lib/profile-runtime.js +122 -10
  41. package/lib/profile-store.d.ts +2 -2
  42. package/lib/profile-store.js +8 -1
  43. package/lib/profile-types.d.ts +1 -0
  44. package/lib/role-invocation.d.ts +1 -1
  45. package/lib/role-invocation.js +2 -2
  46. package/lib/role-policy.js +2 -2
  47. package/lib/role-subagents.js +18 -4
  48. package/lib/roles.d.ts +2 -0
  49. package/lib/roles.js +2 -0
  50. package/lib/settings.d.ts +1 -3
  51. package/lib/settings.js +4 -9
  52. package/lib/skills.d.ts +1 -0
  53. package/lib/skills.js +5 -1
  54. package/package.json +37 -33
package/README.md CHANGED
@@ -18,13 +18,13 @@ Desired configuration, mounted startup capability and actual Agent admission are
18
18
 
19
19
  ## Roles and execution
20
20
 
21
- The inventory contains 11 base roles, 11 categories and fourteen configurable lazy skills. Only enabled Orchestrator, Builder and opted-in Planner are root-eligible; the rest are auxiliary. Cross-cutting defaults off. Preset discovery, root eligibility and model availability are separate checks. A role name doesn't prove a different model or grant authority.
21
+ The inventory contains 11 base roles, 11 categories and fourteen configurable lazy skills. Only the Orchestrator is a selectable standing root and the only registered native preset; every other role is an internal delegation target whose children share the parent's standing composition. Cross-cutting defaults off. Preset discovery, root eligibility and model availability are separate checks. A role name doesn't prove a different model or grant authority.
22
22
 
23
23
  Official **AgentRegistry, SubagentRuntime and JSONL namespace plugins own execution and storage**. DSMM binds immutable per-Agent configuration and per-call role policy through native preset/provider composition and awaited creation. There is no custom execution owner, manual-runtime selector or persistence companion to install. `preset-skills` is an internal Agent-scoped handle, not a public Loader plugin.
24
24
 
25
25
  Role calls wait for the official activation result by default. Only native `stopReason: completed` is normal completion; failure, interruption and partial output remain distinct. After publication, cancellation uses the activation receipt's `dispose()` and waits for cleanup. If background execution is enabled, choose `run_in_background:true` **before starting**; delivery is then owned by the native parent notification path. An accepted child/message receipt isn't a completed task. A running waiting call can't be transferred to background.
26
26
 
27
- Supported live direct-child controls use native Queue, Steer and interrupt under exact-parent and operator authority. Descendant inspection is read-only. Availability follows actual native capabilities, not a visible button or catalog row. Unknown send outcomes must not trigger automatic resend. **DSMM cold resume is unsupported without a trusted live admission**; preserve history rather than reconstructing authority from logs, labels or current settings. See [Agent presets and child control](docs/agent-presets.md).
27
+ Supported live direct-child controls use native Queue, Steer and interrupt under exact-parent and operator authority. Descendant inspection is read-only. Availability follows actual native capabilities, not a visible button or catalog row. Unknown send outcomes must not trigger automatic resend. **Resuming a persisted DSMM session builds a fresh admission from the current deployment**: history stays readable user intent, while delegation authority and child residency are never reconstructed from logs, labels or current settings. See [Agent presets and child control](docs/agent-presets.md).
28
28
 
29
29
  Collapsed call rows show **Call Coding** / **调用 Coding** when the target is known; child labels use **Coding: task description**. Requested identity is distinct from validated actual execution identity. Partial arguments, failures, interruptions and current-format replay retain that distinction, including nested PTC calls. Native safety refusal views take precedence.
30
30
 
@@ -6,15 +6,15 @@ DSMM 0.3.1 targets exactly DSH `0.2.1-rc.2`. Native package composition and call
6
6
 
7
7
  The canonical inventory is 11 base roles and 11 categories. Base roles are orchestrator, builder, reviewer, oracle, oracle-2nd, doc-search, code-search, planner, clarifier, plan-critic and media-reader. Categories are frontend, creative, hard-reasoning, research, quick, coding, normal-task, complex, deep, documenting and cross-cutting. IDs are `dsmm-<source-name>`; `explore` is a code-search compatibility alias, not another role. Cross-cutting defaults disabled; other canonical items default enabled.
8
8
 
9
- Only Orchestrator and Builder (`primary`) and Planner (`all`) are root-eligible. Planner root exposure additionally requires `presets.plannerRootEnabled: true`; it defaults false. This does not disable `roles.dsmm-planner` (default true), its native workflow provider, or its read-only delegation. Other roles are auxiliary-only (`subagent`), regardless of enablement. Native preset selection displays `DW …` labels under unchanged IDs. A role name is a responsibility, not a model choice or authority claim.
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})` registers compositions for roots and role spawning; DSH doesn't discover them by scanning exported directories. rc.2 has no child-only preset field: auxiliary catalog visibility doesn't grant root eligibility, and creation/execution checks reject invalid roots. Generated `agent-presets/` mirrors are inspection/export resources. `presets.materialize` defaults off 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. Complete adapted source content and resources are described in [source synchronization](skill-sync.md).
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. Complete adapted source content and resources are described in [source synchronization](skill-sync.md).
12
12
 
13
- Optional preset materialization writes only DSMM-owned role directories 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. Disabling a role or materialization removes only verified owned directories. Materialized files remain export resources, not an alternative native registration mechanism.
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
 
15
15
  Managed Agent scopes supply their own `harness:identity` system section. The ordinary native identity remains unchanged outside those scopes; the override doesn't grant a role, tool or permission based on its displayed name.
16
16
 
17
- The Planner root flag follows deployment `presets`: Global and the current DSH entry may set it; named overlays cannot. This startup-pinned group requires an independent restart when changed. Planner can remain available for child spawning while root use is disabled. Forced creation and empty-root preset changes still require valid root admission before execution. Opting in requires the enabled module, role and usable composition; it never grants writes. Harness's native `/plan` remains collaboration state, not a permission upgrade.
17
+ Root admission is not configurable per role: the dispatcher is the only standing root. A blank preset switch to any other DSMM role is refused because no such preset is registered, and the admitted composition stays in place. Forced creation and empty-root preset changes still require valid root admission before execution. Opting into Deepwork requires the enabled module, role and usable composition; it never grants writes. Harness's native `/plan` remains collaboration state, not a permission upgrade.
18
18
 
19
19
  Standing Orchestrator/Builder compositions include native planning, compaction/pruning, question and todo rows. Planner includes planning, compaction/pruning and questions, but no todo writer. Coding/frontend/deep/complex/cross-cutting include compaction/pruning, questions and todo; other auxiliary roles add none of those rows. Native spawn can retain parent services, so this isn't a promise to strip every inherited row from short children. Effective filters and execution fences still decide access. Native `/plan` doesn't upgrade Planner permissions, and `/compact` remains a human native command.
20
20
 
@@ -22,7 +22,7 @@ Standing Orchestrator/Builder compositions include native planning, compaction/p
22
22
 
23
23
  | Admitted identity | Permitted logical children, intersected with native authority |
24
24
  | --- | --- |
25
- | Trusted root/stage-owner Orchestrator or Builder | Authorized workflow/execution roles; owns formal planning, criticism and acceptance |
25
+ | Trusted root/stage-owner Orchestrator, or a delegated stage-owner Builder | Authorized workflow/execution roles; owns formal planning, criticism and acceptance |
26
26
  | quick, code-search, doc-search, research, media-reader | None; research remains a leaf |
27
27
  | Planner, clarifier, plan-critic, Reviewer/Oracle | Read-only code-search, doc-search, research, media-reader |
28
28
  | coding, normal-task, frontend, creative, hard-reasoning, documenting | Bounded utility leaves |
@@ -22,11 +22,17 @@ Stores use separate CAS and atomic-write boundaries. Committed saves aren't roll
22
22
 
23
23
  ## Execution and recovery
24
24
 
25
+ ### Native history composition
26
+
27
+ DSMM runs against the unpatched native DSH packages: it installs no Host-side patches and injects no bootstrap flags. Historical sessions stay readable through native history surfaces, and a persisted DSMM session resumes with a fresh admission built from the current deployment; persisted mode choices remain user intent, while old delegation authority never survives.
28
+
29
+ ### Execution ownership
30
+
25
31
  Role calls wait for native activation results by default; only `completed` is normal completion. Cancellation after publication uses activation disposal and cleanup. Enabled background execution selects `delivery: 'parent'` before start. The accepted child/message receipt and interrupt acknowledgment aren't completion. Running waiting tasks can't transfer to background.
26
32
 
27
33
  Queue/Steer/interrupt apply only to supported live direct children under exact-parent/operator authority. Descendant views are read-only. Missing native capability disables that operation with a reason; unknown sends aren't automatically resent. Requested role/model data isn't actual execution identity. See [Agent presets](agent-presets.md).
28
34
 
29
- DSMM cold resume without trusted live admission is unsupported, including direct/Gateway resume paths. Configuration, PluginRecord metadata, labels or child IDs can't reconstruct authorization. Preserve readable history; don't substitute a persona, reset a session or import old data automatically. DSMM history inspection doesn't resume Agents. Native factory load/repair can precede the created guard, so refusal doesn't promise the log was never opened. Clear/compact can retain policy only with the exact live object and admission, not inferred lineage.
35
+ Resuming a persisted DSMM session builds a fresh admission from the current deployment and validates its mounted composition again; configuration, PluginRecord metadata, labels or child IDs never reconstruct authorization. A resumed child without its exact live parent stays refused: delegated authority exists only on the live parent that admitted it. Preserve readable history; don't substitute a persona, reset a session or import old data automatically. Native factory load/repair can precede the created guard, so a refusal doesn't promise the log was never opened. Clear/compact can retain policy only with the exact live object and admission, not inferred lineage.
30
36
 
31
37
  Standard supported model calls use native prepared calls. Raw/custom and Pi-AI stop-only calls use the minimal public completions seam for self-contained literal or explicit model-mapping configurations. Catalog-backed raw combinations that can't be reliably reproduced are rejected for both native and DSMM parameter sources, without disabling standard Coding. Native effort encoding/capability metadata isn't rewritten. See [model routing](model-routing.md).
32
38
 
@@ -9,7 +9,7 @@ Model selection, authentication, permissions, session ownership and package load
9
9
  | ocmm area | DSMM contract |
10
10
  | --- | --- |
11
11
  | Deepwork workflow | Risk-based discovery and planning adapted to native tools. Complex product behavior retains orchestrator-owned planning/criticism; bounded routine work doesn't require a ceremonial approval loop. |
12
- | Roles and categories | 11 base roles and 11 categories with canonical `dsmm-*` IDs. Cross-cutting defaults off. Only enabled Orchestrator, Builder and opted-in Planner are standing-root eligible. |
12
+ | Roles and categories | 11 base roles and 11 categories with canonical `dsmm-*` IDs. Cross-cutting defaults off. Only the Orchestrator is standing-root eligible; other roles are internal delegation targets. |
13
13
  | Skills | Fourteen configurable lazy native skills, discovered through metadata and loaded through `get`/`resourceBase`, not full bodies injected every turn. |
14
14
  | Model routing | Generic native capabilities, `modelParameters`, role primary/fallback routes and explicit invocation levels. Ordinary root model/effort stays native-owned. |
15
15
  | Settings | Sparse Global/native deployment layers plus independent named Profiles. Save, future default, mode and native model selection have independent capabilities; live overlay Apply is unavailable. |
package/docs/releasing.md CHANGED
@@ -1,74 +1,34 @@
1
- # DSMM source readiness and release
1
+ # DSMM release
2
2
 
3
- DSMM uses `.github/workflows/dsmm-release.yml` and the controls under `dsmm/scripts/`. The root ocmm completion checker is not its completion authority. This document defines the current working-source contract; it does not authorize a commit, push, tag, workflow dispatch, publication or installation.
3
+ Push a `dsmm-scoped-vX.Y.Z` tag to trigger `.github/workflows/dsmm-release.yml`.
4
+ The workflow sets the DSMM package version from the tag, builds DSMM, packs it once,
5
+ publishes that archive to npm, and attaches it to the matching GitHub Release.
4
6
 
5
- ## Source and package boundary
7
+ ## Build and publication
6
8
 
7
- `@dsmm/dsmm@0.3.1` targets exactly DSH `0.2.1-rc.2`, tag `dsmm-scoped-v0.3.1` and archive `dsmm-dsmm-0.3.1.tgz`. Its runtime composition uses the official `@deepseek-ai/dsh-agent`, `@deepseek-ai/dsh-subagent` and `@deepseek-ai/dsh-session-persistence-jsonl` packages at that exact version. The published `0.3.0` tag, archive and release policy retain their original rc.1 identity and custom-owner acceptance grammar; they are historical evidence, not a policy fallback for 0.3.1. Public runtime requires Node.js 22 or later.
9
+ The workflow uses Node.js 24 and pnpm 11.9.0. It installs the locked dependencies,
10
+ materializes the declared frontend resources, builds DSMM and generates its role
11
+ assets. It does not build root OCMM, its native LSP binary or the Codex adapter.
8
12
 
9
- The 0.3.1 release contract does not freeze a guessed compiled-file inventory. It requires the main, client, preset-skill, package metadata and locale resources, validates every declared public module/resource target against the packed archive, and follows relative module imports to delivered targets. Additional public entries are admitted only through this resolvable manifest contract. Retired custom-owner entries (`./agent-registry`, `./subagent-runtime`, `./session-persistence` and `./legacy-read-host`) are not valid 0.3.1 public entries. Historical release metadata and compiled inventories remain version-bound.
13
+ The tag path does not invoke custom release contracts, version allowlists,
14
+ Docker acceptance, bootstrap imports, recovery selectors or receipt controllers.
15
+ The target runtime remains exactly DSH `0.2.1-rc.2`; publishing DSMM does not upgrade DSH.
10
16
 
11
- ## Build-only release preparation
17
+ npm publication uses GitHub Actions Trusted Publishing and provenance. Lifecycle
18
+ scripts are disabled for publication. GitHub Release receives the same packed
19
+ archive retained by the workflow. Published package versions and Release assets
20
+ are not overwritten.
12
21
 
13
- The exact 0.3.1 release lane builds and packs without running test suites, test typechecks, source-content comparisons, Docker/browser acceptance or fresh-install tests. Compilation and resource generation remain required. This exception is not a future-version range: unreviewed versions remain rejected. Use the existing approved toolchain and platform-matching dependencies; do not change root ocmm/LSP versions or the unrelated Codex adapter for a DSMM release.
22
+ ## Completion
14
23
 
15
- A cold checkout may lack ignored frontend resources. Explicitly authorized preparation uses:
24
+ Inspect the workflow run for the exact tag. npm publication and GitHub Release
25
+ delivery are separate steps: success at npm does not prove GitHub delivery.
26
+ Report a failed or partial publication as such; do not move its tag or overwrite
27
+ published artifacts to repair it in place.
16
28
 
17
- ```powershell
18
- node dsmm/scripts/materialize-frontend.mjs --sync
19
- pnpm run build
20
- pnpm --dir dsmm build
21
- pnpm --dir dsmm generate:roles
22
- ```
29
+ ## Installation
23
30
 
24
- Only explicit `--sync` fetches declared immutable upstream resources and verifies their provenance. Existing local resource bodies are not locked by file-content hashes. Normal build/check commands remain offline. [Source synchronization](skill-sync.md) describes presence, closure, attribution and path-safety requirements. Build output is not runtime verification.
25
-
26
- Release preparation resolves the trusted tag, peeled product source, workflow/control commit, event and fixed run/attempt. Pack once from the selected source checkout with pinned pnpm between the source guards. Freeze that exact tarball; never substitute a development package, repack accepted bytes or adopt another run's receipt.
27
-
28
- For exact 0.3.1, `freeze` does not require a native `--receipt`. It produces an `artifact-integrity-only` receipt from the actual package bytes, recording `sourceChecks`, native acceptance and fresh installation as `NOT_RUN_RELEASE_POLICY`. The existing receipt asset filename is a transport identity, not a claim that Docker tests ran. Package digests, tag/run identity, official runtime dependency pins, genuine provenance and non-overwrite protection remain mandatory. Exact 0.3.0 retains its own historical build-only identity; earlier versions retain their native acceptance requirements.
29
-
30
- ## Current npm publication completion
31
-
32
- The working-source topology `split-publication-v1` has six jobs: `import-bootstrap`, `prepare`, `publish`, `prepare-recovery-022`, `publish-recovery-022` and `github-release`. The selected prepare/publish pair must succeed and the other pair must be skipped. Bootstrap import succeeds only for bootstrap and is otherwise skipped. Missing or duplicate jobs, wrong identity, cancelled workflow or an unsuccessful selected publisher cannot complete.
33
-
34
- The guarded publisher uses the unchanged accepted tarball, ignored lifecycle scripts, GitHub Actions OIDC and genuine provenance. Static-token fallback, forged CI identity, implicit publish retry and package overwrite are forbidden.
35
-
36
- After an authorized matching run terminates, use its trusted control checkout and a new receipt path:
37
-
38
- ```powershell
39
- node dsmm/scripts/check-dsmm-release-completion.mjs terminal-publication --run-id <run> --run-attempt <attempt> --control-sha <trusted-control-head> --receipt <new-publication-receipt.json>
40
- ```
41
-
42
- Only exit 0 with `mode: npm-publication` and `outcome: COMPLETED` proves npm publication complete. The checker binds repository, workflow ID/path, trusted ancestry, event/ref, package/tag/peeled source, accepted bytes and checksums to the successful selected publisher. Ordinary source equals control; fixed recovery keeps separate product and control identities.
43
-
44
- This topology has no post-publication `verify` job, registry-proof artifact, registry readback or fresh registry reinstall. It records workflow and `github-release` conclusions separately. Successful npm publication does not imply a complete public GitHub Release or passing functional tests.
45
-
46
- ## Independent GitHub Release delivery
47
-
48
- `github-release` depends on both prepare/publish pairs with cancellation and selected-success/other-skipped guards. Empty or dual accepted-artifact outputs refuse before download. Transport creates only an absent draft and uploads the original tarball, integrity/acceptance receipt and `SHA256SUMS.txt`.
49
-
50
- `transport --output <new-file>` records the draft and asset IDs created by that invocation. `finalize --transport <file>` binds those IDs to accepted source/control/run/attempt and package digests, validates all three assets/checksums and the remote tag, then makes only that draft public. It cannot adopt another Release, overwrite assets or repair partial delivery. The fixed historical bootstrap draft is the sole policy exception.
51
-
52
- Exit 1 (`FAILED`) or 2 (`UNRESOLVED`) requires reporting the partial or unknown state. Preserve tags, packages, assets and receipts. Do not move/delete/recreate a tag, repack, overwrite, adopt another run's proof or repair in place. A new version or same-identity rerun requires separate authorization. Report GitHub delivery failure independently of npm publication.
53
-
54
- ## Historical proof and restricted recovery
55
-
56
- Historical five-job and seven-job `split-recovery-022-v1` runs keep their own `terminal` completion requirements, including their original verification surfaces. Use the exact released checkout and run identity:
57
-
58
- ```powershell
59
- node dsmm/scripts/check-dsmm-release-completion.mjs terminal --run-id <run> --run-attempt <attempt> --control-sha <released-control-head> --receipt <new-terminal-receipt.json>
60
- ```
61
-
62
- New six-job controls cannot retrospectively reinterpret an earlier run. Historical metadata, exports, native receipt grammars, provenance, assets and job identities remain version-bound. Existing 0.3.0 and new 0.3.1 integrity-only receipts never establish native or browser execution.
63
-
64
- The restricted `recovery=unpublished-0.2.2` selector binds original workflow `374825007`, run `38822000490`, attempt `1`, failed prepare, skipped other jobs and no accepted artifact. It requires the original immutable tag/source and complete authenticated absence of npm and public/draft Release publication at entry and immediately before publish. **An already published version is ineligible.** Unknown selectors or extra inputs refuse; omitted/empty dispatch retains the frozen bootstrap policy.
65
-
66
- Recovery uses independent control and original-product checkouts. `assert-source`, `pack` and recovery `freeze` require `--source-root`. Provenance names the actual new dispatch/control commit, while the receipt separately binds `productSourceSha` and `attestedControlSha`. No control repair is copied into the fixed product artifact.
67
-
68
- Independent registry verification is reserved for historical or explicitly requested checks. Metadata, archive and provenance share the version's deadline: normally 120,000 ms, at most 300,000 ms explicitly; historical 0.1.9 alone permits twenty minutes. Only post-publication HTTP 404 reads may wait. Other transport, byte, provenance or identity failures refuse. Absence checks remain single-shot. Legacy finalization requires `--verification`.
69
-
70
- ## Installation and rollback
71
-
72
- Publication does not authorize installation, migration, login or session repair. Desktop and CLI/TUI profiles are independent. Separately authorized installation uses the target carrier/profile and preserves providers, accounts, native model/effort, unrelated Loader rows, roles, UI preferences and history. Package installation is not proof of Electron activation.
73
-
74
- Runtime rollback explicitly selects a reviewed prior configuration under revision and ownership checks. Package rollback uses supported carrier operations and an exact immutable version. Neither operation may overwrite later drafts, restore credentials, sign out, delete sessions or perform broad cleanup. Scoped and old unscoped bundles must not compete for the same `dsmm` entry. Clean only exact task-owned temporary resources.
31
+ Publication does not install the plugin. Desktop and CLI/TUI profiles have
32
+ independent carriers. Installation requires matching DSH `0.2.1-rc.2` and separate
33
+ authorization; it must preserve accounts, credentials, history and unrelated
34
+ configuration. Restarting active Desktop work requires authorization.
package/docs/roadmap.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Version policy
4
4
 
5
- **DSMM 0.3.1 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, old configuration schemas and historical session formats aren't compatibility targets; existing data remains untouched. A newer upstream release requires deliberate reassessment, not an automatic dependency or runtime switch.
5
+ **DSMM 0.3.1 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
 
@@ -20,9 +20,10 @@ Native call views show the target in collapsed rows, distinguish requested from
20
20
 
21
21
  | Capability | Current behavior | Requirement for broader support |
22
22
  | --- | --- | --- |
23
+ | Profile selection in a new session | The working tree supports choosing a profile or deployment defaults before the first turn. | Preserve first-request, child-routing and draft behavior through supported native Client integration. |
23
24
  | Live overlay Apply | Unavailable. Save/select a future default for a new session; ordinary model and mode actions retain independent capabilities. | Exact configuration/call/approval binding without cross-call authority reuse. See [approval boundaries](deferred-native-approval-risk.md). |
24
25
  | Running-call background handoff | Unavailable. Select waiting or native parent delivery before starting; don't restart a task to simulate transfer. | A supported same-activation ownership/delivery handoff. |
25
- | DSMM cold resume | Refuses execution without trusted live admission and preserves history. Display metadata can't restore authority. | Native identity and trustworthy configuration/permission binding across close/reopen and record loss. |
26
+ | DSMM cold resume | Patched Host supports read-only history and explicit continuation with fresh admission. Native Client/bootstrap/navigation enforce generation-bound preparation. | Verify the complete browser/Desktop carrier and socket-retry paths before claiming supported deployment. |
26
27
  | Non-disruptive hot update | No uninterrupted live-session guarantee. Retire admissions and let native owners cancel/dispose owned work; guards remain fail-closed. | Native lifecycle support that preserves active task/approval boundaries. |
27
28
  | Catalog-backed raw combinations | Rejected where the complete composition can't be reliably reproduced, regardless of native or DSMM parameter source. Standard calls aren't affected. | A public seam that can reproduce the full catalog composition and preserve native capability/effort semantics. |
28
29
  | Repeated read-only Git approval | Keep native approval; don't expand Allow rules based on an unexplained prompt. | Exact triggering command, working directory and approval reason. |
@@ -31,6 +32,40 @@ Native call views show the target in collapsed rows, distinguish requested from
31
32
 
32
33
  Search/Fetch retain the explicitly configured native provider. DSMM doesn't automatically enable a direct API, change credentials or forward the recent human question. HTTP Fake-IP behavior and network limits are maintained in [Fake-IP fetch](web-fetch-fakeip.md).
33
34
 
35
+ ## Planned: loading sessions created by DSMM 0.2.x
36
+
37
+ Sessions created by DSMM `0.2.x` must remain loadable under the supported current DSH runtime. Changed execution behavior is acceptable; blanket refusal to load an old session is not.
38
+
39
+ - Opening a historical session must preserve its list entry, title and readable conversation, including messages and tool results. An unavailable execution capability must not make the session disappear or prevent history from loading.
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
+ - 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
+ - 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.1` already fulfills them.
44
+
45
+ ## Working-tree implementation: profile selection before the first message
46
+
47
+ - Allow selecting a saved profile or the default configuration on the new-session page, including when a blank session has already been created.
48
+ - Show the selected profile immediately and use its settings for the first request and subsequent delegated work. Keep the user's unsent draft when changing the selection.
49
+ - Keep the choice for this session separate from the default for future sessions. Changing one must not silently change the other.
50
+ - Determine availability from whether execution has begun, rather than disabling every session with the same restriction. Preserve permission checks and protect active work when a conversation has already started.
51
+ - Verify that a user can open a new session, change its profile and send the first message with the selected settings. Do not show a “new session required” instruction on a page where that action is itself unavailable.
52
+
53
+ ## Working-tree implementation: simpler DSMM settings
54
+
55
+ - Expand drawers containing only one section by default so their controls are immediately visible. Keep multi-section drawers easy to scan and navigate.
56
+ - Remove all redundant copy: repeated headings, explanations already conveyed by a control, implementation details and “not X, but Y” comparisons.
57
+ - Use familiar, consistent names across settings and session menus. Prefer direct wording such as “本次会话配置”, “新会话默认配置”, “使用默认配置” and “保存”; keep internal terms such as admission, overlay, mounted state and CAS out of normal interface copy.
58
+ - Keep only information needed to make a choice or act: what a setting affects, when it takes effect, important permission/data consequences and a concise recovery action when something fails. Place optional technical diagnostics behind a details disclosure.
59
+ - Review every drawer and its empty, disabled, saved and error states. Users must be able to find the controls and understand their choices without reading implementation explanations; preserve keyboard access and accessible labels.
60
+
61
+ ## Working-tree implementation: dispatcher-only native presets
62
+
63
+ - Register only the dispatcher as a selectable native preset. Delegation targets are not registered compositions: a delegated child shares its parent's standing composition, and the admitted invocation carries its role, identity and restrictions.
64
+ - Blank preset switches to any other DSMM role are refused by the native registry; the admitted composition keeps executing.
65
+ - DSMM installs no Host package patches. Persisted sessions resume with a fresh admission from the current deployment: history stays readable user intent, while delegation authority and child residency are never reconstructed from logs.
66
+
67
+ Existing [Fake-IP fetch](web-fetch-fakeip.md) protections remain in force.
68
+
34
69
  ## Publication and Desktop installation
35
70
 
36
71
  0.3.1 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.
@@ -34,7 +34,7 @@ On a mounted Host, desired-off affects new roots, not existing parents or their
34
34
 
35
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 file version, native descriptor version and named snapshot reference aren't one acknowledgment.
36
36
 
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.
37
+ `presets` only carries materialization settings (`materialize`, optional `root`). The dispatcher is the only standing root; there is no per-role root switch, and named overlays cannot configure presets. See [roles and composition](agent-presets.md#roles-and-composition) for the selection roster, forced creation/resume and read-only boundaries.
38
38
 
39
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).
40
40
 
@@ -6,12 +6,14 @@ type Locale = PropsLocale<"plugins.dsmm">;
6
6
  export declare const permissionText: (t: Locale["t"]) => (key: PermissionLocaleKey) => string;
7
7
  export declare function fieldLabel(path: readonly string[], t: Locale["t"]): string;
8
8
  export declare function displayValue(value: unknown, t: Locale["t"]): string;
9
- export declare function AdvancedField({ schema, path, controller, inherited, upper, t }: Locale & {
9
+ export declare function AdvancedField({ schema, path, controller, inherited, upper, expanded, onExpandedChange, t }: Locale & {
10
10
  schema: DeploymentSchemaNode;
11
11
  path: string[];
12
12
  controller: DeploymentController;
13
13
  inherited: unknown;
14
14
  upper: unknown;
15
+ expanded?: boolean;
16
+ onExpandedChange?: (expanded: boolean) => void;
15
17
  }): import("react").JSX.Element;
16
18
  export declare function ScalarField({ schema, path, controller, inherited, t }: Locale & {
17
19
  schema: DeploymentSchemaNode;
@@ -19,10 +21,12 @@ export declare function ScalarField({ schema, path, controller, inherited, t }:
19
21
  controller: DeploymentController;
20
22
  inherited: unknown;
21
23
  }): import("react").JSX.Element;
22
- export declare function Field({ schema, path, controller, t }: Locale & {
24
+ export declare function Field({ schema, path, controller, initiallyOpen, disclosures, t }: Locale & {
23
25
  schema: DeploymentSchemaNode;
24
26
  path: string[];
25
27
  controller: DeploymentController;
28
+ initiallyOpen?: boolean;
29
+ disclosures?: Map<string, boolean>;
26
30
  }): import("react").JSX.Element;
27
31
  export {};
28
32
  //# sourceMappingURL=DeploymentFields.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useId, useSyncExternalStore } from "react";
2
+ import { useId, useState, useSyncExternalStore } from "react";
3
3
  import { Button, Input } from "@deepseek-ai/dsh-client-ui-primitives";
4
4
  import { at, enumValues, equal, mergeLayer, parseAdvanced, validateEditorValue } from "./deployment-data.js";
5
5
  import { deploymentFieldLabels } from "./deployment-locales.js";
@@ -21,10 +21,10 @@ export function displayValue(value, t) {
21
21
  const text = JSON.stringify(value);
22
22
  return text.length > 120 ? `${text.slice(0, 120)}…` : text;
23
23
  }
24
- export function AdvancedField({ schema, path, controller, inherited, upper, t }) {
24
+ export function AdvancedField({ schema, path, controller, inherited, upper, expanded, onExpandedChange, t }) {
25
25
  const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), id = useId(), name = path.join(".");
26
26
  const value = at(state.draft, path), raw = state.raw[name], text = raw?.text ?? (value === undefined ? "" : JSON.stringify(value, null, 2)), invalid = raw?.invalid === true;
27
- return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, children: [_jsxs("summary", { children: [fieldLabel(path, t), " \u00B7 ", t("advanced")] }), _jsxs("div", { className: "dsmm-field", children: [_jsxs("label", { htmlFor: id, children: [fieldLabel(path, t), " \u00B7 ", t("advanced")] }), _jsx("p", { className: "dsmm-hint", id: `${id}-hint`, children: t("advancedHint") }), path[0] === "permissionControl" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("configRulesHint") }), _jsx("p", { className: "dsmm-hint", children: t(value === undefined ? "inherit" : "explicit") }), upper !== undefined && _jsxs("p", { className: "dsmm-hint", children: [t("profileSource"), ": ", displayValue(upper, t)] }), _jsx("textarea", { id: id, rows: 6, maxLength: 32768, value: text, disabled: !controller.canEdit(), "aria-invalid": invalid, "aria-describedby": `${id}-hint ${id}-error`, onChange: event => {
27
+ 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("p", { className: "dsmm-hint", children: t(value === undefined ? "inherit" : "explicit") }), upper !== undefined && _jsxs("p", { className: "dsmm-hint", children: [t("profileSource"), ": ", displayValue(upper, t)] }), _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 => {
28
28
  const next = event.currentTarget.value;
29
29
  let parsed, valid = true;
30
30
  try {
@@ -51,18 +51,20 @@ export function ScalarField({ schema, path, controller, inherited, t }) {
51
51
  controller.edit(path, candidate);
52
52
  } }), _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: t("unset") })] }), _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 ?? "—"}` : ""] })] });
53
53
  }
54
- export function Field({ schema, path, controller, t }) {
54
+ export function Field({ schema, path, controller, initiallyOpen = false, disclosures, t }) {
55
55
  if (schema.type === "transform" && schema.inner !== undefined)
56
56
  schema = schema.inner;
57
57
  const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot), snapshot = state.snapshot, id = useId(), name = path.join(".");
58
+ const [open, setOpen] = useState(disclosures?.get(name) ?? initiallyOpen);
59
+ const expand = (expanded) => { disclosures?.set(name, expanded); setOpen(expanded); };
58
60
  const explicit = at(state.draft, path), inherited = controller.layer === "global" ? at(snapshot.defaults, path) : at(mergeLayer(mergeLayer(snapshot.defaults, snapshot.global), snapshot.nativeForm?.base ?? {}), path);
59
61
  const choices = enumValues(schema), disabled = !controller.canEdit();
60
62
  if (name === "permissionControl.nativeCommands.entries")
61
63
  return _jsx("div", { "data-field": name, children: _jsx(NativeCommandEntries, { controller: controller, value: explicit, inherited: (inherited ?? []), disabled: disabled, onChange: value => controller.edit(path, value), setInvalid: (key, bad) => controller.setInvalid(key, bad), t: permissionText(t) }) });
62
64
  if (schema.type === "object" && schema.fields !== undefined && path[0] !== "roleRouting")
63
- return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, children: [_jsx("summary", { children: fieldLabel(path, t) }), _jsxs("div", { children: [name === "permissionControl" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("configPolicyHint") }), _jsx("p", { className: "dsmm-hint", children: t(explicit === undefined ? "inherit" : "explicit") }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: disabled || explicit === undefined && !Object.keys(state.raw).some(key => key === name || key.startsWith(`${name}.`)), onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children: t("unsetGroup") }), Object.entries(schema.fields).map(([key, node]) => _jsx(Field, { schema: node, path: [...path, key], controller: controller, t: t }, key))] })] });
65
+ return _jsxs("details", { className: "dsmm-deployment-group", "data-field": name, open: open, onToggle: event => expand(event.currentTarget.open), children: [_jsx("summary", { children: fieldLabel(path, t) }), _jsxs("div", { children: [name === "permissionControl" && _jsx("p", { className: "dsmm-hint", children: permissionText(t)("configPolicyHint") }), _jsx("p", { className: "dsmm-hint", children: t(explicit === undefined ? "inherit" : "explicit") }), _jsx(Button, { type: "button", variant: "outline", "data-dsmm-unset": name, disabled: disabled || explicit === undefined && !Object.keys(state.raw).some(key => key === name || key.startsWith(`${name}.`)), onClick: () => { controller.clearRaw(name); controller.edit(path, undefined); }, children: t("unsetGroup") }), Object.entries(schema.fields).map(([key, node]) => _jsx(Field, { schema: node, path: [...path, key], controller: controller, disclosures: disclosures, t: t }, key))] })] });
64
66
  if (!["boolean", "string", "number"].includes(schema.type) && choices === null)
65
- return _jsx(AdvancedField, { schema: schema, path: path, controller: controller, inherited: inherited, upper: controller.layer === "global" ? at(snapshot.profile, path) : undefined, t: t });
67
+ 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 });
66
68
  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: `${t("unset")} · ${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") }), explicit !== undefined && _jsx("p", { className: "dsmm-hint", children: t(equal(explicit, at(snapshot.defaults, path)) ? "defaultPin" : "explicit") }), controller.layer === "profile" && at(snapshot.nativeForm?.base, path) !== undefined && _jsx("p", { className: "dsmm-hint", children: t("hostPin") }), controller.layer === "global" && at(snapshot.profile, path) !== undefined && _jsxs("p", { className: "dsmm-hint", children: [t("profileSource"), ": ", displayValue(at(snapshot.profile, path), t), " \u00B7 ", t("explicit")] })] });
67
69
  }
68
70
  //# sourceMappingURL=DeploymentFields.js.map
@@ -12,6 +12,7 @@ export interface DeploymentPageProps extends Locale {
12
12
  remote: DsmmConfigRemote;
13
13
  workspace?: DeploymentWorkspace;
14
14
  permissions?: PermissionController;
15
+ permissionsT?: PropsLocale<"settings.dsmm-permissions">["t"];
15
16
  forms?: ConfigForms;
16
17
  }
17
18
  export declare function ScopeSave({ controller, workspace, refreshOnly, t }: Locale & {
@@ -14,7 +14,7 @@ export function ScopeSave({ controller, workspace, refreshOnly = false, t }) {
14
14
  return _jsxs("section", { className: "dsmm-scope-save", "aria-label": t(refreshOnly ? "refresh" : "saveScope"), children: [_jsx("p", { className: "dsmm-status", role: "status", "aria-live": "polite", children: refreshOnly ? state.busy ? t("loading") : "" : state.busy ? t("saving") : state.refreshRequired ? t("savedRefreshRequired") : state.saved ? t("saved") : state.dirty ? t("dirty") : "" }), !refreshOnly && pending.length > 0 && _jsxs("p", { children: [t("pendingModules"), ": ", pending.map(module => t(moduleTitle(module))).join(" · ")] }), state.issue !== null && _jsx("p", { className: "dsmm-issue", role: "alert", children: t(state.issue) }), !refreshOnly && state.invalidFields.length > 0 && _jsx("p", { className: "dsmm-issue", role: "alert", children: t("invalid") }), controller.layer === "profile" && !controller.canWriteProfile() && _jsx("p", { className: "dsmm-hint", children: t("unavailableForm") }), _jsxs("div", { className: "dsmm-actions", children: [!refreshOnly && _jsx(Button, { type: "button", variant: "primary", disabled: !controller.canSave(), onClick: () => void (workspace?.save() ?? controller.save()), children: t(controller.layer === "global" ? "saveGlobal" : "saveProfile") }), _jsx(Button, { type: "button", variant: "outline", disabled: state.busy, onClick: () => void controller.refresh(), children: t("refresh") }), !refreshOnly && _jsx(Button, { type: "button", variant: "outline", disabled: state.busy || !state.dirty && state.issue === null && !state.refreshRequired, onClick: () => void controller.refresh(true), children: t("discard") })] })] });
15
15
  }
16
16
  export function NativeRuntimeState({ value, t }) {
17
- return _jsxs("section", { className: "dsmm-availability", "aria-label": t("nativeRuntimeState"), children: [_jsx("h3", { children: t("nativeRuntimeState") }), _jsxs("p", { children: [t("nativeRuntimeBinding"), ": ", t(value?.binding === "stock" ? "nativeRuntimeStock" : value?.binding === "unavailable" ? "nativeRuntimeUnavailable" : "unknown")] }), _jsxs("p", { children: [t("nativeRuntimeFence"), ": ", value === undefined ? t("unknown") : t(value.deliveryFenceReady ? "on" : "off"), " \u00B7 ", t("nativeRuntimeRestart"), ": ", value === undefined ? t("unknown") : t(value.restartRequired ? "on" : "off")] }), value?.reason !== undefined && _jsx("p", { children: t(`nativeRuntimeReason-${value.reason}`) }), _jsx("p", { className: "dsmm-hint", children: t("nativeRuntimeReadinessHint") })] });
17
+ return _jsxs("details", { className: "dsmm-availability", children: [_jsx("summary", { children: t("nativeRuntimeState") }), _jsxs("p", { children: [t("nativeRuntimeBinding"), ": ", t(value?.binding === "stock" ? "nativeRuntimeStock" : value?.binding === "unavailable" ? "nativeRuntimeUnavailable" : "unknown")] }), _jsxs("p", { children: [t("nativeRuntimeFence"), ": ", value === undefined ? t("unknown") : t(value.deliveryFenceReady ? "on" : "off"), " \u00B7 ", t("nativeRuntimeRestart"), ": ", value === undefined ? t("unknown") : t(value.restartRequired ? "on" : "off")] }), value?.reason !== undefined && _jsx("p", { children: t(`nativeRuntimeReason-${value.reason}`) })] });
18
18
  }
19
19
  export function StateInspector({ controller, t }) {
20
20
  const { snapshot, session, dirty, issue } = useSyncExternalStore(controller.subscribe, controller.getSnapshot);
@@ -35,6 +35,7 @@ export function DeploymentPage(props) {
35
35
  const id = useId(), heading = useRef(null), triggers = useRef(new Map()), previous = useRef(null);
36
36
  const scopeControl = useRef(null), confirmation = useRef(null);
37
37
  const resume = useRef(null);
38
+ const disclosures = useRef({ global: new Map(), profile: new Map() });
38
39
  const { t } = props, snapshot = state.snapshot ?? core.snapshot, active = navigation.module;
39
40
  useEffect(() => { if (props.view === "page")
40
41
  void props.core.refresh(); }, [props.core, props.view]);
@@ -70,7 +71,7 @@ export function DeploymentPage(props) {
70
71
  const fields = snapshot === null || active === null ? [] : moduleFields(scopeSchema(snapshot, controller.layer), active, controller.layer);
71
72
  const modules = CONFIG_MODULES.filter(module => module === "state" || module === "permissions" || snapshot === null || moduleFields(snapshot.schema, module, "global").length + moduleFields(scopeSchema(snapshot, "profile"), module, "profile").length > 0);
72
73
  const scopeActions = _jsx(ScopeSave, { controller: active === "state" ? props.core : controller, workspace: workspace, refreshOnly: active === "state" || workspace.controller() === null, t: t });
73
- return _jsxs("section", { className: "dsmm-profiles dsmm-deployment", "data-dsmm-page": true, "aria-label": t("title"), children: [_jsx("p", { children: t("description") }), _jsx("p", { className: "dsmm-hint", children: t("boundaries") }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-scope`, children: t("scope") }), _jsxs("select", { ref: scopeControl, id: `${id}-scope`, value: navigation.scope, disabled: state.busy || navigation.pending !== null, onChange: event => {
74
+ return _jsxs("section", { className: "dsmm-profiles dsmm-deployment", "data-dsmm-page": true, "aria-label": t("title"), children: [_jsx("p", { className: "dsmm-hint", children: t("boundaries") }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${id}-scope`, children: t("scope") }), _jsxs("select", { ref: scopeControl, id: `${id}-scope`, value: navigation.scope, disabled: state.busy || navigation.pending !== null, onChange: event => {
74
75
  const scope = event.currentTarget.value;
75
76
  if (scope === "global" || scope === "profile")
76
77
  workspace.request({ scope, module: active });
@@ -86,7 +87,7 @@ export function DeploymentPage(props) {
86
87
  workspace.continueEditing();
87
88
  else
88
89
  workspace.request({ scope: navigation.scope, module: null });
89
- }, children: [_jsxs("div", { className: "dsmm-drawer-heading", children: [_jsx("h2", { id: `${id}-heading`, ref: heading, tabIndex: -1, children: t(moduleTitle(active)) }), _jsx(Button, { type: "button", variant: "outline", disabled: state.busy, onClick: () => workspace.request({ scope: navigation.scope, module: null }), children: t("close") })] }), active === "state" ? _jsxs(_Fragment, { children: [_jsx(StateInspector, { controller: props.core, t: t }), scopeActions] }) : _jsxs(_Fragment, { children: [navigation.scope === "profile" && navigation.native === null ? _jsx("p", { children: t("unavailableForm") }) : state.snapshot === null ? _jsx("p", { children: t(state.busy ? "loading" : "unavailable") }) : _jsxs("div", { "data-dsmm-layer": controller.layer, "aria-busy": state.busy, className: "dsmm-structured", children: [fields.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("noModuleFields") }), fields.map(([key, schema]) => _jsx(Field, { schema: schema, path: [key], controller: controller, t: t }, key)), active === "run" && controller.layer === "profile" && _jsx(NativeRuntimeState, { value: state.snapshot.subagentRuntime, t: t })] }), scopeActions, active === "permissions" && _jsxs("section", { className: "dsmm-zone", children: [_jsx("h3", { children: t("rootRules") }), _jsx("p", { className: "dsmm-hint", children: t("rootRulesHint") }), workspace.permissions === undefined ? _jsx("p", { children: t("rootRulesUnavailable") }) : _jsx(PermissionsPanel, { controller: workspace.permissions, t: key => Object.hasOwn(permissionEn, key) ? permissionText(t)(key) : key })] })] })] })] }), navigation.pending !== null && _jsxs("section", { className: "dsmm-confirm", role: "group", "aria-label": t("leaveDraft"), onKeyDown: event => { if (event.key === "Escape" && !event.defaultPrevented) {
90
+ }, children: [_jsxs("div", { className: "dsmm-drawer-heading", children: [_jsx("h2", { id: `${id}-heading`, ref: heading, tabIndex: -1, children: t(moduleTitle(active)) }), _jsx(Button, { type: "button", variant: "outline", disabled: state.busy, onClick: () => workspace.request({ scope: navigation.scope, module: null }), children: t("close") })] }), active === "state" ? _jsxs(_Fragment, { children: [_jsx(StateInspector, { controller: props.core, t: t }), scopeActions] }) : _jsxs(_Fragment, { children: [navigation.scope === "profile" && navigation.native === null ? _jsx("p", { children: t("unavailableForm") }) : state.snapshot === null ? _jsx("p", { children: t(state.busy ? "loading" : "unavailable") }) : _jsxs("div", { "data-dsmm-layer": controller.layer, "aria-busy": state.busy, className: "dsmm-structured", children: [fields.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("noModuleFields") }), fields.map(([key, schema]) => _jsx(Field, { schema: schema, path: [key], controller: controller, initiallyOpen: fields.length === 1 && active !== "permissions", disclosures: disclosures.current[navigation.scope], t: t }, `${navigation.scope}:${key}`)), active === "run" && controller.layer === "profile" && _jsx(NativeRuntimeState, { value: state.snapshot.subagentRuntime, t: t })] }), scopeActions, active === "permissions" && _jsxs("section", { className: "dsmm-zone", children: [_jsx("h3", { children: t("rootRules") }), _jsx("p", { className: "dsmm-hint", children: t("rootRulesHint") }), workspace.permissions === undefined ? _jsx("p", { children: t("rootRulesUnavailable") }) : _jsx(PermissionsPanel, { controller: workspace.permissions, t: props.permissionsT ?? (key => Object.hasOwn(permissionEn, key) ? permissionText(t)(key) : key) })] })] })] })] }), navigation.pending !== null && _jsxs("section", { className: "dsmm-confirm", role: "group", "aria-label": t("leaveDraft"), onKeyDown: event => { if (event.key === "Escape" && !event.defaultPrevented) {
90
91
  event.preventDefault();
91
92
  workspace.continueEditing();
92
93
  } }, children: [_jsx("p", { children: t("leaveDraft") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { ref: confirmation, type: "button", variant: "primary", onClick: () => workspace.continueEditing(), children: t("continueEditing") }), _jsx(Button, { type: "button", variant: "outline", onClick: () => workspace.keepAndNavigate(), children: t("keepDraft") }), _jsx(Button, { type: "button", variant: "outline", disabled: state.busy, onClick: () => void workspace.discardAndNavigate(), children: t("discardDraft") })] })] })] });
@@ -76,10 +76,10 @@ export function ProfilesSection(props) {
76
76
  selection = t("appliedProfile", { id: snapshot.selectedId, revision: t(configurationVersionState(snapshot.sourceRevision)) });
77
77
  const notice = state.notice === null ? "" : t(state.notice.key === "reset" ? "resetDone" : state.notice.key, { id: state.notice.id });
78
78
  const warnings = editor === null ? [] : draftWarnings(editor.content);
79
- return _jsxs("section", { className: "dsmm-profiles", "aria-labelledby": `${prefix}-title`, "aria-busy": state.busy !== null, children: [_jsx("h2", { id: `${prefix}-title`, children: t("title") }), _jsx("p", { children: t("description") }), snapshot?.origin !== undefined && _jsx("p", { className: "dsmm-hint", children: t(snapshot.origin === "legacy" ? "legacyOrigin" : snapshot.origin === "central" ? "centralOrigin" : "explicitOrigin") }), readOnly && _jsx("p", { role: "status", className: "dsmm-hint", children: t("readOnlyOrigin") }), _jsxs("section", { className: "dsmm-zone", "aria-labelledby": `${prefix}-browse`, "data-dsmm-zone": "browse", children: [_jsx("h3", { id: `${prefix}-browse`, children: t("browseZone") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: editorDisabled || snapshot === null, onClick: () => { void props.create(); }, children: t("new") }), _jsx(Button, { type: "button", variant: "outline", disabled: disabled, onClick: () => { void props.refresh(); }, children: t(state.busy === "refresh" ? "refreshing" : "refresh") })] }), snapshot !== null && _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-select`, children: t("editorSelect") }), _jsxs("select", { ref: selectRef, id: `${prefix}-select`, disabled: disabled, value: editor?.revision == null ? "" : editor.id, onChange: (event) => { if (event.currentTarget.value)
80
- void props.open(event.currentTarget.value); }, children: [_jsx("option", { value: "", children: t(editor?.revision === null ? "newDraft" : "choose") }), snapshot.profiles.map((profile, index) => _jsxs("option", { value: profile.id, children: [profile.label?.trim() ? `${profile.label} (${profile.id})` : profile.id, profile.error === undefined ? "" : ` — ${t("invalidProfile", { id: profile.id })}`, profile.warnings?.length ? ` — ${t("warningProfile")}` : ""] }, `${index}:${profile.id}`))] }), snapshot.profiles.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("empty") })] }), snapshot !== null && snapshot.profiles.length > 0 && _jsx("ul", { className: "dsmm-profile-list", "aria-label": t("savedInventory"), children: snapshot.profiles.map((profile, index) => _jsxs("li", { children: [_jsx("p", { children: profile.label?.trim() ? `${profile.label} (${profile.id})` : profile.id }), _jsx("p", { className: "dsmm-hint", children: t("savedRevision", { revision: t(configurationVersionState(profile.revision)) }) }), _jsx(ProfileWarnings, { warnings: profile.warnings, t: t }), profile.error !== undefined && _jsx(IssueDetails, { issue: profile.error, t: t })] }, `${index}:${profile.id}`)) }), state.pendingEditor !== null && _jsxs("div", { className: "dsmm-confirm", role: "group", "aria-labelledby": `${prefix}-confirm`, onKeyDown: (event) => { if (event.key === "Escape") {
79
+ return _jsxs("section", { className: "dsmm-profiles", "aria-label": t("title"), "aria-busy": state.busy !== null, children: [readOnly && _jsx("p", { role: "status", className: "dsmm-hint", children: t("readOnlyOrigin") }), _jsxs("section", { className: "dsmm-zone", "aria-labelledby": `${prefix}-browse`, "data-dsmm-zone": "browse", children: [_jsx("h3", { id: `${prefix}-browse`, children: t("browseZone") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: editorDisabled || snapshot === null, onClick: () => { void props.create(); }, children: t("new") }), _jsx(Button, { type: "button", variant: "outline", disabled: disabled, onClick: () => { void props.refresh(); }, children: t(state.busy === "refresh" ? "refreshing" : "refresh") })] }), snapshot !== null && _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-select`, children: t("editorSelect") }), _jsxs("select", { ref: selectRef, id: `${prefix}-select`, disabled: disabled, value: editor?.revision == null ? "" : editor.id, onChange: (event) => { if (event.currentTarget.value)
80
+ void props.open(event.currentTarget.value); }, children: [_jsx("option", { value: "", children: t(editor?.revision === null ? "newDraft" : "choose") }), snapshot.profiles.map((profile, index) => _jsxs("option", { value: profile.id, children: [profile.label?.trim() ? `${profile.label} (${profile.id})` : profile.id, profile.error === undefined ? "" : ` — ${t("invalidProfile", { id: profile.id })}`, profile.warnings?.length ? ` — ${t("warningProfile")}` : ""] }, `${index}:${profile.id}`))] }), snapshot.profiles.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("empty") })] }), snapshot !== null && snapshot.profiles.some(profile => profile.error !== undefined || profile.warnings?.length) && _jsx("ul", { className: "dsmm-profile-list", "aria-label": t("savedInventory"), children: snapshot.profiles.filter(profile => profile.error !== undefined || profile.warnings?.length).map((profile, index) => _jsxs("li", { children: [_jsx("p", { children: profile.label?.trim() ? `${profile.label} (${profile.id})` : profile.id }), _jsx(ProfileWarnings, { warnings: profile.warnings, t: t }), profile.error !== undefined && _jsx(IssueDetails, { issue: profile.error, t: t })] }, `${index}:${profile.id}`)) }), state.pendingEditor !== null && _jsxs("div", { className: "dsmm-confirm", role: "group", "aria-labelledby": `${prefix}-confirm`, onKeyDown: (event) => { if (event.key === "Escape") {
81
81
  event.preventDefault();
82
82
  props.cancelDiscard();
83
- } }, children: [_jsx("p", { id: `${prefix}-confirm`, children: t("discardPrompt") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", onClick: () => { void props.discardAndOpen(); }, children: t("discard") }), _jsx(Button, { ref: cancelRef, type: "button", variant: "primary", onClick: props.cancelDiscard, children: t("cancel") })] })] })] }), _jsxs("section", { className: "dsmm-zone", "aria-labelledby": `${prefix}-edit`, "data-dsmm-zone": "edit", children: [_jsx("h3", { id: `${prefix}-edit`, children: t("editZone") }), editor === null && _jsx("p", { className: "dsmm-hint", children: t("noEditor") }), editor !== null && _jsxs("div", { className: "dsmm-editor", children: [_jsx("p", { "data-dsmm-editor-state": true, children: t(editor.refreshRequired ? "savedRefreshRequired" : state.dirty ? "dirty" : applied ? "savedApplied" : relationship === "unknown" ? "savedRelationshipUnknown" : "savedNotApplied") }), _jsx("p", { className: "dsmm-hint", children: t("savedRevision", { revision: t(editor.revision === null ? "versionAbsent" : configurationVersionState(editor.revision)) }) }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "primary", disabled: editorDisabled || !state.dirty || snapshot === null || state.invalidFields.length > 0, onClick: () => { void props.save(); }, children: t(state.busy === "save" ? "saving" : "save") }), editor.revision !== null && _jsx(Button, { type: "button", variant: "outline", disabled: disabled, onClick: () => { void props.reload(); }, children: t("reload") })] }), warnings.length > 0 && _jsxs("div", { children: [_jsx("p", { children: t("draftWarnings") }), _jsx(ProfileWarnings, { warnings: warnings, t: t })] }), editor.warnings?.length ? _jsxs("div", { children: [_jsx("p", { children: t("savedWarnings") }), _jsx(ProfileWarnings, { warnings: editor.warnings, t: t })] }) : null, _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-id`, children: t("profileId") }), _jsx(Input, { ref: inputRef, id: `${prefix}-id`, className: "dsmm-input", value: editor.id, disabled: editorDisabled || editor.revision !== null, "aria-invalid": idInvalid || undefined, "aria-describedby": `${prefix}-id-hint${idInvalid ? ` ${prefix}-issue` : ""}`, onChange: (event) => props.editId(event.currentTarget.value) }), _jsx("p", { id: `${prefix}-id-hint`, className: "dsmm-hint", children: t("idHint") })] }), _jsxs("div", { className: "dsmm-catalog", children: [_jsx("h3", { children: t("catalogTitle") }), _jsx("p", { className: "dsmm-hint", children: t("catalogHint") }), state.catalogUnavailable && _jsx("p", { className: "dsmm-hint", children: t("catalogUnavailable") }), state.catalog?.failures.map((failure) => _jsx("p", { className: "dsmm-hint", children: t("catalogFailure", { name: failure.name, id: failure.id }) }, failure.id)), _jsx(Button, { type: "button", variant: "outline", disabled: state.catalogBusy, onClick: () => { void props.refreshCatalog(); }, children: t(state.catalogBusy ? "catalogRefreshing" : "catalogRefresh") })] }), _jsx(StructuredEditor, { state: state, actions: props, disabled: editorDisabled, t: t }, `structured:${state.editorEpoch}`), _jsxs("details", { ref: advancedRef, className: "dsmm-advanced", children: [_jsx("summary", { children: t("advanced") }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-content`, children: t("configuration") }), _jsx("textarea", { ref: editorRef, id: `${prefix}-content`, rows: 12, spellCheck: false, value: editor.content, readOnly: readOnly, disabled: editorDisabled, "aria-invalid": rawInvalid || (invalid && !idInvalid) || undefined, "aria-describedby": `${prefix}-content-hint ${prefix}-structural-hint${invalid && !idInvalid ? ` ${prefix}-issue` : ""}`, onChange: (event) => props.editContent(event.currentTarget.value) }), _jsx("p", { id: `${prefix}-content-hint`, className: "dsmm-hint", children: t("configurationHint") }), _jsx("p", { id: `${prefix}-structural-hint`, className: "dsmm-hint", children: t("structuralHint") })] })] }, `advanced:${state.editorEpoch}`)] }), state.issue !== null && _jsxs("div", { className: "dsmm-issue", id: `${prefix}-issue`, role: "alert", children: [_jsx("p", { children: t(issueKey(state.issue)) }), _jsx(IssueDetails, { issue: state.issue, t: t })] })] }), _jsxs("section", { className: "dsmm-zone", "aria-labelledby": `${prefix}-global`, "data-dsmm-zone": "future-default", children: [_jsx("h3", { id: `${prefix}-global`, children: t("globalScope") }), _jsx("p", { className: "dsmm-hint", children: t("newSessions") }), _jsx("p", { "data-dsmm-selection": true, children: selection }), _jsx("p", { className: "dsmm-hint", children: t("futurePin", { revision: t(configurationVersionState(snapshot?.selectionRevision)) }) }), snapshot?.refreshRequired && _jsx("p", { role: "status", children: t("savedRefreshRequired") }), snapshot?.selectedWarnings?.length ? _jsxs("div", { children: [_jsx("p", { children: t("futureWarnings") }), _jsx(ProfileWarnings, { warnings: snapshot.selectedWarnings, t: t })] }) : null, _jsx("p", { className: "dsmm-hint", children: t("savedOnlyHint") }), _jsx("p", { id: `${prefix}-global-action`, className: "dsmm-hint", children: t("globalActionHint") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "primary", "aria-describedby": `${prefix}-global-action`, disabled: editorDisabled || state.dirty || editor?.revision == null || !reconcilable || (applied && !selectionConflict), onClick: () => { void props.apply(); }, children: t(state.busy === "apply" ? "applying" : "apply") }), _jsx(Button, { type: "button", variant: "outline", disabled: editorDisabled || !reconcilable || (snapshot?.selectedId === null && !selectionConflict), onClick: () => { void props.reset(); }, children: t(state.busy === "reset" ? "resetting" : "reset") })] }), snapshot?.selectionError !== undefined && _jsxs("div", { className: "dsmm-issue", children: [_jsx("p", { children: t(selectionConflict ? "selectionConflict" : "retry") }), _jsx(IssueDetails, { issue: snapshot.selectionError, t: t })] })] }), _jsx("section", { className: "dsmm-zone", "aria-label": t("sessionScope"), "data-dsmm-zone": "current-session", children: _jsx(SessionScope, { state: state, actions: props, t: t }) }), _jsx("p", { className: "dsmm-status", role: "status", "aria-live": "polite", "aria-atomic": "true", children: state.busy === "refresh" && snapshot === null ? t("loading") : state.busy === "read" ? t("reading") : notice })] });
83
+ } }, children: [_jsx("p", { id: `${prefix}-confirm`, children: t("discardPrompt") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", onClick: () => { void props.discardAndOpen(); }, children: t("discard") }), _jsx(Button, { ref: cancelRef, type: "button", variant: "primary", onClick: props.cancelDiscard, children: t("cancel") })] })] })] }), _jsxs("section", { className: "dsmm-zone", "aria-labelledby": `${prefix}-edit`, "data-dsmm-zone": "edit", children: [_jsx("h3", { id: `${prefix}-edit`, children: t("editZone") }), editor === null && _jsx("p", { className: "dsmm-hint", children: t("noEditor") }), editor !== null && _jsxs("div", { className: "dsmm-editor", children: [_jsx("p", { "data-dsmm-editor-state": true, children: t(editor.refreshRequired ? "savedRefreshRequired" : state.dirty ? "dirty" : applied ? "savedApplied" : relationship === "unknown" ? "savedRelationshipUnknown" : "savedNotApplied") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "primary", disabled: editorDisabled || !state.dirty || snapshot === null || state.invalidFields.length > 0, onClick: () => { void props.save(); }, children: t(state.busy === "save" ? "saving" : "save") }), editor.revision !== null && _jsx(Button, { type: "button", variant: "outline", disabled: disabled, onClick: () => { void props.reload(); }, children: t("reload") })] }), warnings.length > 0 && _jsxs("div", { children: [_jsx("p", { children: t("draftWarnings") }), _jsx(ProfileWarnings, { warnings: warnings, t: t })] }), editor.warnings?.length ? _jsxs("div", { children: [_jsx("p", { children: t("savedWarnings") }), _jsx(ProfileWarnings, { warnings: editor.warnings, t: t })] }) : null, _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-id`, children: t("profileId") }), _jsx(Input, { ref: inputRef, id: `${prefix}-id`, className: "dsmm-input", value: editor.id, disabled: editorDisabled || editor.revision !== null, "aria-invalid": idInvalid || undefined, "aria-describedby": `${prefix}-id-hint${idInvalid ? ` ${prefix}-issue` : ""}`, onChange: (event) => props.editId(event.currentTarget.value) }), _jsx("p", { id: `${prefix}-id-hint`, className: "dsmm-hint", children: t("idHint") })] }), _jsxs("div", { className: "dsmm-catalog", children: [state.catalogUnavailable && _jsx("p", { className: "dsmm-hint", children: t("catalogUnavailable") }), state.catalog?.failures.map((failure) => _jsx("p", { className: "dsmm-hint", children: t("catalogFailure", { name: failure.name, id: failure.id }) }, failure.id)), _jsx(Button, { type: "button", variant: "outline", disabled: state.catalogBusy, onClick: () => { void props.refreshCatalog(); }, children: t(state.catalogBusy ? "catalogRefreshing" : "catalogRefresh") })] }), _jsx(StructuredEditor, { state: state, actions: props, disabled: editorDisabled, t: t }, `structured:${state.editorEpoch}`), _jsxs("details", { ref: advancedRef, className: "dsmm-advanced", children: [_jsx("summary", { children: t("advanced") }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-content`, children: t("configuration") }), _jsx("textarea", { ref: editorRef, id: `${prefix}-content`, rows: 12, spellCheck: false, value: editor.content, readOnly: readOnly, disabled: editorDisabled, "aria-invalid": rawInvalid || (invalid && !idInvalid) || undefined, "aria-describedby": `${prefix}-content-hint ${prefix}-structural-hint${invalid && !idInvalid ? ` ${prefix}-issue` : ""}`, onChange: (event) => props.editContent(event.currentTarget.value) }), _jsx("p", { id: `${prefix}-content-hint`, className: "dsmm-hint", children: t("configurationHint") }), _jsx("p", { id: `${prefix}-structural-hint`, className: "dsmm-hint", children: t("structuralHint") })] })] }, `advanced:${state.editorEpoch}`)] }), state.issue !== null && _jsxs("div", { className: "dsmm-issue", id: `${prefix}-issue`, role: "alert", children: [_jsx("p", { children: t(issueKey(state.issue)) }), _jsx(IssueDetails, { issue: state.issue, t: t })] })] }), _jsxs("section", { className: "dsmm-zone", "aria-labelledby": `${prefix}-global`, "data-dsmm-zone": "future-default", children: [_jsx("h3", { id: `${prefix}-global`, children: t("globalScope") }), _jsx("p", { id: `${prefix}-global-action`, className: "dsmm-hint", children: t("newSessions") }), _jsx("p", { "data-dsmm-selection": true, children: selection }), snapshot?.refreshRequired && _jsx("p", { role: "status", children: t("savedRefreshRequired") }), snapshot?.selectedWarnings?.length ? _jsxs("div", { children: [_jsx("p", { children: t("futureWarnings") }), _jsx(ProfileWarnings, { warnings: snapshot.selectedWarnings, t: t })] }) : null, _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "primary", "aria-describedby": `${prefix}-global-action`, disabled: editorDisabled || state.dirty || editor?.revision == null || !reconcilable || (applied && !selectionConflict), onClick: () => { void props.apply(); }, children: t(state.busy === "apply" ? "applying" : "apply") }), _jsx(Button, { type: "button", variant: "outline", disabled: editorDisabled || !reconcilable || (snapshot?.selectedId === null && !selectionConflict), onClick: () => { void props.reset(); }, children: t(state.busy === "reset" ? "resetting" : "reset") })] }), snapshot?.selectionError !== undefined && _jsxs("div", { className: "dsmm-issue", children: [_jsx("p", { children: t(selectionConflict ? "selectionConflict" : "retry") }), _jsx(IssueDetails, { issue: snapshot.selectionError, t: t })] })] }), _jsx("section", { className: "dsmm-zone", "aria-label": t("sessionScope"), "data-dsmm-zone": "current-session", children: _jsx(SessionScope, { state: state, actions: props, t: t }) }), _jsx("p", { className: "dsmm-status", role: "status", "aria-live": "polite", "aria-atomic": "true", children: state.busy === "refresh" && snapshot === null ? t("loading") : state.busy === "read" ? t("reading") : notice })] });
84
84
  }
85
85
  //# sourceMappingURL=ProfilesSection.js.map
@@ -14,6 +14,6 @@ export function RoleAvailability({ value, t }) {
14
14
  const state = roleAvailability(value);
15
15
  if (state === undefined)
16
16
  return _jsx("p", { className: "dsmm-hint", children: t("availabilityUnknown") });
17
- return _jsxs("div", { className: "dsmm-availability", "data-dsmm-role-availability": state.id, children: [_jsx("p", { children: t(state.required ? "roleRequired" : "roleOptional", { reason: state.requiredReason ?? "—" }) }), _jsx("p", { children: t("roleCeiling", { startup: t(state.startupAvailable ? "enabled" : "disabled"), deployment: t(state.deploymentEnabled ? "enabled" : "disabled"), admitted: t(state.admitted ? "enabled" : "disabled") }) }), _jsx("p", { className: "dsmm-hint", children: t("roleProvenance", { source: state.source, capture: state.capture }) }), state.reason !== undefined && _jsx("p", { children: t("roleUnavailableReason", { reason: state.reason }) })] });
17
+ return _jsxs("div", { className: "dsmm-availability", "data-dsmm-role-availability": state.id, children: [_jsx("p", { children: t(state.required ? "roleRequired" : "roleOptional", { reason: state.requiredReason ?? "—" }) }), state.reason !== undefined && _jsx("p", { children: t("roleUnavailableReason", { reason: state.reason }) }), _jsxs("details", { children: [_jsx("summary", { children: t("technicalDetails") }), _jsx("p", { children: t("roleCeiling", { startup: t(state.startupAvailable ? "enabled" : "disabled"), deployment: t(state.deploymentEnabled ? "enabled" : "disabled"), admitted: t(state.admitted ? "enabled" : "disabled") }) }), _jsx("p", { className: "dsmm-hint", children: t("roleProvenance", { source: state.source, capture: state.capture }) })] })] });
18
18
  }
19
19
  //# sourceMappingURL=RoleAvailability.js.map