@dsmm/dsmm 0.1.0 → 0.1.4

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 (104) hide show
  1. package/README.md +26 -12
  2. package/agent-presets/dsmm-builder/agent.cordis.yml +25 -23
  3. package/agent-presets/dsmm-builder/preset.yml +1 -1
  4. package/agent-presets/dsmm-clarifier/agent.cordis.yml +4 -2
  5. package/agent-presets/dsmm-clarifier/preset.yml +1 -1
  6. package/agent-presets/dsmm-code-search/agent.cordis.yml +4 -2
  7. package/agent-presets/dsmm-code-search/preset.yml +1 -1
  8. package/agent-presets/dsmm-creative/agent.cordis.yml +3 -1
  9. package/agent-presets/dsmm-creative/preset.yml +1 -1
  10. package/agent-presets/dsmm-doc-search/agent.cordis.yml +4 -2
  11. package/agent-presets/dsmm-doc-search/preset.yml +1 -1
  12. package/agent-presets/dsmm-media-reader/agent.cordis.yml +4 -2
  13. package/agent-presets/dsmm-media-reader/preset.yml +1 -1
  14. package/agent-presets/dsmm-oracle/agent.cordis.yml +3 -1
  15. package/agent-presets/dsmm-oracle/preset.yml +1 -1
  16. package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +3 -1
  17. package/agent-presets/dsmm-oracle-2nd/preset.yml +1 -1
  18. package/agent-presets/dsmm-orchestrator/agent.cordis.yml +26 -24
  19. package/agent-presets/dsmm-orchestrator/preset.yml +2 -2
  20. package/agent-presets/dsmm-plan-critic/agent.cordis.yml +4 -2
  21. package/agent-presets/dsmm-plan-critic/preset.yml +1 -1
  22. package/agent-presets/dsmm-planner/agent.cordis.yml +4 -2
  23. package/agent-presets/dsmm-planner/preset.yml +1 -1
  24. package/agent-presets/dsmm-reviewer/agent.cordis.yml +4 -2
  25. package/agent-presets/dsmm-reviewer/preset.yml +1 -1
  26. package/docs/agent-presets.md +17 -5
  27. package/docs/compatibility.md +68 -12
  28. package/docs/migration-from-ocmm.md +10 -4
  29. package/docs/model-routing.md +50 -1
  30. package/docs/profiles.md +83 -0
  31. package/docs/releasing.md +59 -18
  32. package/docs/roadmap.md +1 -1
  33. package/docs/runtime-recovery.md +10 -2
  34. package/docs/settings-status.md +16 -4
  35. package/lib/client/ProfilesSection.d.ts +11 -0
  36. package/lib/client/ProfilesSection.js +62 -0
  37. package/lib/client/controller.d.ts +77 -0
  38. package/lib/client/controller.js +198 -0
  39. package/lib/client/index.d.ts +11 -0
  40. package/lib/client/index.js +34 -0
  41. package/lib/client/locales.d.ts +56 -0
  42. package/lib/client/locales.js +48 -0
  43. package/lib/client/styles.d.ts +3 -0
  44. package/lib/client/styles.js +25 -0
  45. package/lib/client.js +1930 -0
  46. package/lib/commands.d.ts +3 -3
  47. package/lib/commands.js +4 -4
  48. package/lib/dsh-events.d.ts +8 -0
  49. package/lib/dsh-types.d.ts +8 -0
  50. package/lib/guards.d.ts +2 -2
  51. package/lib/guards.js +3 -2
  52. package/lib/index.d.ts +16 -6
  53. package/lib/index.js +77 -21
  54. package/lib/mode.d.ts +2 -2
  55. package/lib/mode.js +1 -1
  56. package/lib/model-routing.d.ts +2 -2
  57. package/lib/model-routing.js +44 -4
  58. package/lib/preset-materializer.js +2 -2
  59. package/lib/preset-registry.js +4 -2
  60. package/lib/profile-remote.d.ts +31 -0
  61. package/lib/profile-remote.js +106 -0
  62. package/lib/profile-rpc.d.ts +27 -0
  63. package/lib/profile-rpc.js +90 -0
  64. package/lib/profile-runtime.d.ts +44 -0
  65. package/lib/profile-runtime.js +159 -0
  66. package/lib/profile-store.d.ts +42 -0
  67. package/lib/profile-store.js +478 -0
  68. package/lib/profile-types.d.ts +40 -0
  69. package/lib/profile-types.js +2 -0
  70. package/lib/profiles.d.ts +26 -0
  71. package/lib/profiles.js +237 -0
  72. package/lib/prompts.d.ts +2 -2
  73. package/lib/prompts.js +4 -4
  74. package/lib/recovery-policy.js +1 -1
  75. package/lib/role-providers.d.ts +13 -0
  76. package/lib/role-providers.js +94 -0
  77. package/lib/role-routing.d.ts +15 -0
  78. package/lib/role-routing.js +147 -0
  79. package/lib/role-subagents.d.ts +2 -2
  80. package/lib/role-subagents.js +6 -4
  81. package/lib/roles.d.ts +9 -4
  82. package/lib/roles.js +54 -36
  83. package/lib/runtime-recovery.d.ts +2 -2
  84. package/lib/runtime-recovery.js +36 -17
  85. package/lib/session-metadata.d.ts +13 -0
  86. package/lib/session-metadata.js +34 -0
  87. package/lib/session-persistence.d.ts +35 -0
  88. package/lib/session-persistence.js +304 -0
  89. package/lib/session-scope.d.ts +6 -1
  90. package/lib/session-scope.js +23 -0
  91. package/lib/settings.d.ts +20 -2
  92. package/lib/settings.js +127 -39
  93. package/lib/state.d.ts +1 -0
  94. package/lib/state.js +4 -0
  95. package/lib/status.d.ts +11 -2
  96. package/lib/status.js +52 -13
  97. package/locale/en.json +6 -0
  98. package/locale/zh.json +6 -0
  99. package/package.json +67 -15
  100. package/patches/agent-presets-root.example.cordis.patch.yml +6 -10
  101. package/prompts/deepseek-v4-pro.md +1 -1
  102. package/prompts/deepwork.md +3 -3
  103. package/scripts/repair-session-log.mjs +476 -0
  104. package/scripts/session-repair-native-verifier.mjs +367 -0
package/docs/roadmap.md CHANGED
@@ -186,7 +186,7 @@ Expose dsmm settings ergonomically in dsh web-compatible surfaces while keeping
186
186
 
187
187
  ## v1.0 — Stable dsmm release
188
188
 
189
- Status: initial package release selected as dsmm 0.1.0; the v1.0 stable milestone remains future work.
189
+ Status: the initial scoped package is `@dsmm/dsmm@0.1.0`; `0.1.1` adds native per-role model/effort policies and ordered role fallbacks. The v1.0 stable milestone remains future work and does not imply all OpenCode hooks or client surfaces are compatible.
190
190
 
191
191
  ### Goal
192
192
 
@@ -19,6 +19,14 @@ runtimeRecovery:
19
19
 
20
20
  `maxFallbackAttempts` and `idleContinuation.maxContinuations` are finite integer caps floored and clamped to `0..10`. An empty `fallbackRoutes` list is valid and supplies no provider/model fallback. When runtime recovery is disabled (`enabled` is false), recovery is isolated: it does not disable or alter DSMM prompts, skills, guards, LSP, or model routing.
21
21
 
22
+ ## Role-specific chains (0.1.1)
23
+
24
+ `roleRouting.<role>.fallbackRoutes` uses the same route shape, with optional exact native `reasoningEffort`. The existing `runtimeRecovery.enabled` gate is required for both role and global fallback; configuring a primary or a chain does not implicitly enable recovery or idle continuation.
25
+
26
+ For a known enabled role, an explicitly supplied chain takes precedence over the global list. `[]` suppresses global fallback for that role; an omitted chain preserves legacy global behavior. Routes retain configured order and deduplicate by provider/model identity, so changing effort does not create additional retry opportunities. Unrecognized children never inherit their parent's role chain.
27
+
28
+ To migrate only explicit ocmm role chains, set `runtimeRecovery.enabled:true`, keep its global `fallbackRoutes:[]`, and leave `idleContinuation.enabled:false`. This deliberately enables role fallback without enabling a generic model chain or autonomous continuation. Provider retry remains host-owned.
29
+
22
30
  ## Host retry and fallback routes
23
31
 
24
32
  The host `agent/request-error` decision wins by identity. DSMM calls downstream first and acts only after the host declines to retry. It classifies failures using exact integer status membership and lowercased exact code membership only; it performs no message parsing or provider-message classification.
@@ -29,9 +37,9 @@ For a host-declined, retryable failure, the failed provider must match the lates
29
37
 
30
38
  ## Request ordering
31
39
 
32
- The default recovery `agent/request` listener is downstream of the prepend model routing listener. It first receives the downstream request configuration, then applies a matching pending fallback route and removes stale adapter-owned `reasoningEffort`. All other downstream fields are preserved.
40
+ The recovery request path applies a matching pending fallback route after native request selection. A named fallback effort is preserved exactly; omission clears stale adapter-owned `reasoningEffort`. All unrelated downstream fields are preserved. Explicit role primary policy must not replace the admitted fallback on that or a later request in the same recovery scope.
33
41
 
34
- The outer model routing listener sees the final route. It calibrates reasoning only for a supported exact V4 Pro or native V41 Flash route; a fallback does not broaden the existing matches. A route change removes stale adapter-owned reasoning effort; DSMM does not set temperature or create a second capability registry, and the final adapter remains responsible for supported call parameters.
42
+ Model routing evaluates the final route. Legacy calibration still recognizes only exact V4 Pro or native V41 Flash routes; a fallback does not broaden those matches. Explicit configured efforts bypass legacy degradation and are checked through the native model capability seam. DSMM does not set temperature or create a second capability registry, and the final adapter remains responsible for supported call parameters.
35
43
 
36
44
  Duplicate failure delivery cannot select a second pending fallback. Closed or superseded turn/step boundaries, aborted signals, and expired pending routes are ignored. HTTP 402 requires explicit membership in `retryOnStatusCodes`; generic retry-code membership cannot silently authorize a paid-route change. No real billing/rate-limit error is manufactured for testing.
37
45
 
@@ -1,14 +1,16 @@
1
- # Settings and status
1
+ # Deepwork settings and status
2
2
 
3
3
  ## Commands and inspection
4
4
 
5
5
  `/deepwork [off|message]` changes the receiving session's mode. `/dsmm-status` reports bounded normalized state; `/dsmm-status json` returns a defensive JSON snapshot with version 1. Other input returns `Usage: /dsmm-status [json]`.
6
6
 
7
+ Human-facing status/mode copy uses Deepwork. The technical commands, JSON fields, namespace and configurable `modeName` remain unchanged in 0.1.4.
8
+
7
9
  Commands belong to the native command adapter. Headless task text is not a slash-command invocation.
8
10
 
9
- ## DSH 0.2 configuration
11
+ ## DSH 0.2 deployment configuration
10
12
 
11
- DSMM's configuration remains **restart-scoped** and is resolved from the Loader plugin entry. The removed `settings.register()` service and old `$DSH_HOME/settings.yaml` namespace are not used by DSH 0.2. Copy the desired DSMM values manually into the profile's `cordis.patch.yml`, restart, and inspect `--dump-config` and status:
13
+ The Loader plugin entry remains the deployment baseline. Structural fields are **restart-scoped**; the 0.1.4 source contract includes runtime-only file overlays for newly admitted Agents. The removed `settings.register()` service and old `$DSH_HOME/settings.yaml` namespace are not used by DSH 0.2. Copy deployment values into the profile's `cordis.patch.yml`, restart, and inspect `--dump-config` and status:
12
14
 
13
15
  ```yaml
14
16
  - id: dsmm
@@ -28,7 +30,9 @@ DSMM's configuration remains **restart-scoped** and is resolved from the Loader
28
30
  enabled: false
29
31
  ```
30
32
 
31
- DSH's new SettingsForms only projects explicitly volatile fields; DSMM does not silently turn restart-only values into live references merely to display a settings form. There is no custom settings panel.
33
+ The 0.1.4 source contract includes the additive native Settings **Deepwork Profiles** / **Deepwork 配置档** section through the native client/authorized RPC surface. It is not a volatile SettingsForms projection and does not turn structural fields into live references. Create/read/edit/save/apply/reset operate on independent files under `<profileContext.dir>/dsmm-profiles/`; neither a Settings schema nor these docs prove completed Desktop activation. See [runtime profiles](profiles.md) for the exact allowlist, file formats and pending acceptance boundary.
34
+
35
+ Save changes only the draft. Explicit apply pins an immutable revision and changes settings for **new Agents only**; existing live Agents, including blank Agents, retain their admitted snapshots. Children and recovery inherit the parent snapshot. After restart, cold-resumed sessions use the current selection, not historical per-session settings. Reset restores the deployment baseline for future Agents and leaves drafts intact.
32
36
 
33
37
  ## Workflow compatibility
34
38
 
@@ -38,8 +42,12 @@ Risk-based behavior scales discovery, planning, and review to uncertainty and in
38
42
 
39
43
  ## Other settings
40
44
 
45
+ `roleRouting` defaults to an empty map, configured in the deployment baseline or a selected runtime profile. Each canonical role accepts an optional fixed `primary` and an optional ordered `fallbackRoutes` list of `{provider, model, reasoningEffort?}`. It is separate from the deployment-only boolean `roles` enable map. Unknown role keys and malformed explicit routes fail closed; omitted chains and explicit empty chains have different meanings. See [model routing](model-routing.md) and [runtime recovery](runtime-recovery.md).
46
+
41
47
  The public schema and exported `DEFAULT_DSMM_SETTINGS` are the complete defaults. Seven core skill toggles and all twelve role toggles default on; effective application is scoped to active mode or a selected DSMM role, not global task policy. Managed preset-directory materialization remains off by default and is an export facility rather than native discovery.
42
48
 
49
+ Runtime overlays allow only `defaultActive`, `roleRouting`, `workflow`, `guards`, `runtimeRecovery`, and both `deepseekV4Pro*`/`deepseekFlash*` Calibration, DefaultReasoningEffort and MaxReasoningPresets fields. `roles`, `skills`, `modeName`, `promptOrder`, `section`, `presets`, `lsp`, `sessionPersistence`, native provider/account/install controls, embedded profiles and unknown fields are rejected. Defaults resolve before deployment settings, then the selected immutable overlay. A missing selection leaves the deployment baseline unchanged.
50
+
43
51
  Existing `deepseekV4ProCalibration`, `deepseekV4ProDefaultReasoningEffort`, and `deepseekV4ProMaxReasoningPresets` remain compatible. Flash has independent corresponding `deepseekFlash*` settings; calibration modes are off/auto/strict. Auto preserves explicit effort, strict chooses supported policy effort, and unsupported capabilities never justify guessed parameters.
44
52
 
45
53
  Guard scope defaults to `deepwork-or-dsmm-agent`; shell safety and helpers remain enabled and Git writes require host approval. LSP and runtime recovery default off. Recovery caps are finite; an empty fallback list does not enable automatic model discovery or substitution.
@@ -49,3 +57,7 @@ Guard scope defaults to `deepwork-or-dsmm-agent`; shell safety and helpers remai
49
57
  The snapshot reports `mode`, `route`, `calibration`, `runtimeRecovery`, and `effectiveSettings`. Route flags distinguish exact V4 Pro and V41 Flash matches. Desired policy effort is not a claim that an adapter advertised or applied it.
50
58
 
51
59
  Status does not perform capability/network queries, expose credentials or provider errors, or report process-local pending retries. Model calibration is enforced in the actual request waterfall, not by status or prompt text.
60
+
61
+ Configured role policy/chain and the actual persisted current route are distinct facts. The normalized settings snapshot defensively copies nested role routes and lists; configuration presence is not a claim of successful provider authentication or a completed fallback.
62
+
63
+ Status describes the receiving Agent's admitted settings; the profile UI's current selection describes future Agents. These can intentionally differ. `--dump-config` shows deployment composition, not proof of runtime-profile application or authenticated UI behavior.
@@ -0,0 +1,11 @@
1
+ import type { InjectFace, PropsLocale } from "@deepseek-ai/dsh-client-ui-slots";
2
+ import type { ProfilesActions, ProfilesController } from "./controller.js";
3
+ export type ProfilesInjected = ProfilesActions & {
4
+ hooks: {
5
+ profiles: ProfilesController["store"];
6
+ };
7
+ };
8
+ export type ProfilesSectionProps = InjectFace<ProfilesInjected> & PropsLocale<"settings.dsmm-profiles">;
9
+ /** One native settings.section; policy selection is never coupled to browsing. */
10
+ export declare function ProfilesSection(props: ProfilesSectionProps): import("react").JSX.Element;
11
+ //# sourceMappingURL=ProfilesSection.d.ts.map
@@ -0,0 +1,62 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useId, useRef } from "react";
3
+ import { Button, Input } from "@deepseek-ai/dsh-client-ui-primitives";
4
+ import { canReconcileSelection } from "./controller.js";
5
+ function issueKey(issue) {
6
+ if (issue.source === "selection")
7
+ return issue.code === "conflict" ? "selectionConflict" : "appliedInvalid";
8
+ if (issue.kind === "assembly")
9
+ return "unavailable";
10
+ if (issue.kind === "transport")
11
+ return "transport";
12
+ return issue.code === "conflict" || issue.code === "validation" ? issue.code : "io";
13
+ }
14
+ /** One native settings.section; policy selection is never coupled to browsing. */
15
+ export function ProfilesSection(props) {
16
+ const { t } = props;
17
+ const state = props.useProfiles((snapshot) => snapshot);
18
+ const prefix = useId();
19
+ const selectRef = useRef(null);
20
+ const inputRef = useRef(null);
21
+ const editorRef = useRef(null);
22
+ const cancelRef = useRef(null);
23
+ const hadConfirmation = useRef(false);
24
+ const disabled = state.busy !== null || state.pendingEditor !== null;
25
+ const snapshot = state.snapshot;
26
+ const editor = state.editor;
27
+ const reconcilable = canReconcileSelection(snapshot);
28
+ const selectionConflict = reconcilable && snapshot?.selectionError?.code === "conflict";
29
+ const invalid = state.issue?.kind === "domain" && state.issue.code === "validation";
30
+ const idInvalid = invalid && state.issue?.field === "id";
31
+ useEffect(() => {
32
+ if (state.pendingEditor !== null) {
33
+ cancelRef.current?.focus();
34
+ hadConfirmation.current = true;
35
+ }
36
+ else if (hadConfirmation.current) {
37
+ selectRef.current?.focus();
38
+ hadConfirmation.current = false;
39
+ }
40
+ }, [state.pendingEditor]);
41
+ useEffect(() => {
42
+ if (state.issue?.kind === "domain" && state.issue.code === "validation") {
43
+ if (state.issue.field === "id")
44
+ inputRef.current?.focus();
45
+ else
46
+ editorRef.current?.focus();
47
+ }
48
+ }, [state.issue]);
49
+ const applied = editor?.revision !== null && editor?.id === snapshot?.selectedId && editor?.revision === snapshot?.appliedRevision;
50
+ let selection = t("baseline");
51
+ if (snapshot?.selectionError !== undefined && !selectionConflict)
52
+ selection = t("appliedInvalid");
53
+ else if (snapshot?.selectedId !== null && snapshot?.selectedId !== undefined)
54
+ selection = t("appliedProfile", { id: snapshot.selectedId, revision: snapshot.appliedRevision?.slice(0, 12) ?? "—" });
55
+ const notice = state.notice === null ? "" : t(state.notice.key === "reset" ? "resetDone" : state.notice.key, { id: state.notice.id });
56
+ 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") }), _jsx("p", { className: "dsmm-hint", children: t("newSessions") }), _jsx("p", { "data-dsmm-selection": true, children: selection }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: disabled || 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") }), _jsx(Button, { type: "button", variant: "outline", disabled: disabled || !reconcilable || (snapshot?.selectedId === null && !selectionConflict), onClick: () => { void props.reset(); }, children: t(state.busy === "reset" ? "resetting" : "reset") })] }), 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)
57
+ 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 === undefined ? profile.id : `${profile.label} (${profile.id})`, profile.error === undefined ? "" : ` — ${t("invalidProfile", { id: profile.id })}`] }, `${index}:${profile.id}`))] }), snapshot.profiles.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("empty") })] }), state.pendingEditor !== null && _jsxs("div", { className: "dsmm-confirm", role: "group", "aria-labelledby": `${prefix}-confirm`, onKeyDown: (event) => { if (event.key === "Escape") {
58
+ event.preventDefault();
59
+ props.cancelDiscard();
60
+ } }, 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") })] })] }), editor !== null && _jsxs("div", { className: "dsmm-editor", children: [_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: disabled || 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-field", children: [_jsx("label", { htmlFor: `${prefix}-content`, children: t("configuration") }), _jsx("textarea", { ref: editorRef, id: `${prefix}-content`, rows: 12, spellCheck: false, value: editor.content, disabled: disabled, "aria-invalid": (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") })] }), _jsx("p", { "data-dsmm-editor-state": true, children: t(state.dirty ? "dirty" : applied ? "savedApplied" : "savedNotApplied") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "primary", disabled: disabled || !state.dirty || snapshot === null, onClick: () => { void props.save(); }, children: t(state.busy === "save" ? "saving" : "save") }), _jsx(Button, { type: "button", variant: "outline", disabled: disabled || state.dirty || editor.revision === null || !reconcilable || (applied && !selectionConflict), onClick: () => { void props.apply(); }, children: t(state.busy === "apply" ? "applying" : "apply") }), editor.revision !== null && _jsx(Button, { type: "button", variant: "outline", disabled: disabled, onClick: () => { void props.reload(); }, children: t("reload") })] })] }), state.issue !== null && _jsxs("div", { className: "dsmm-issue", id: `${prefix}-issue`, role: "alert", children: [_jsx("p", { children: t(issueKey(state.issue)) }), state.issue.kind === "domain" && state.issue.message !== undefined && _jsxs("p", { children: [t("details"), ": ", state.issue.message] })] }), snapshot?.selectionError !== undefined && _jsxs("div", { className: "dsmm-issue", children: [_jsxs("p", { children: [t("details"), ": ", snapshot.selectionError.message] }), _jsx("p", { children: t(selectionConflict ? "selectionConflict" : "retry") })] }), _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 })] });
61
+ }
62
+ //# sourceMappingURL=ProfilesSection.js.map
@@ -0,0 +1,77 @@
1
+ import type { DsmmProfilesRemote } from "../profile-remote.js";
2
+ import type { ProfileErrorInfo, ProfileReadResult, ProfileSnapshot } from "../profile-types.js";
3
+ export interface ProfileEditor {
4
+ id: string;
5
+ content: string;
6
+ revision: string | null;
7
+ }
8
+ export interface ProfilesNotice {
9
+ key: "saved" | "applied" | "reset";
10
+ id?: string;
11
+ }
12
+ export interface ProfilesIssue {
13
+ kind: "domain" | "transport" | "assembly";
14
+ code: string;
15
+ message?: string;
16
+ field?: string;
17
+ source?: "selection";
18
+ }
19
+ export interface ProfilesViewSnapshot {
20
+ snapshot: ProfileSnapshot | null;
21
+ editor: ProfileEditor | null;
22
+ dirty: boolean;
23
+ busy: "refresh" | "read" | "save" | "apply" | "reset" | null;
24
+ issue: ProfilesIssue | null;
25
+ notice: ProfilesNotice | null;
26
+ pendingEditor: string | null;
27
+ }
28
+ export interface ProfilesActions {
29
+ refresh(): Promise<void>;
30
+ open(id: string): Promise<void>;
31
+ create(): Promise<void>;
32
+ reload(): Promise<void>;
33
+ editId(id: string): void;
34
+ editContent(content: string): void;
35
+ save(): Promise<void>;
36
+ apply(): Promise<void>;
37
+ reset(): Promise<void>;
38
+ discardAndOpen(): Promise<void>;
39
+ cancelDiscard(): void;
40
+ }
41
+ export declare const NEW_PROFILE_CONTENT = "{\n \"version\": 1,\n \"id\": \"new-profile\",\n \"label\": \"New profile\",\n \"settings\": {\n // Runtime overlay only. Omitted fields inherit the deployment baseline.\n \"defaultActive\": true\n }\n}\n";
42
+ /** A valid external CAS conflict is reconcilable; corruption is never reset implicitly. */
43
+ export declare function canReconcileSelection(snapshot: ProfileSnapshot | null): boolean;
44
+ /** Stable native Store seat, with no filesystem or transport authority. */
45
+ export declare class ProfilesController {
46
+ private readonly remote;
47
+ private current;
48
+ private accepted;
49
+ private listeners;
50
+ private generation;
51
+ private disposed;
52
+ readonly store: {
53
+ getSnapshot: () => ProfilesViewSnapshot;
54
+ subscribe: (listener: () => void) => (() => void);
55
+ };
56
+ readonly actions: ProfilesActions;
57
+ constructor(remote: DsmmProfilesRemote);
58
+ dispose(): void;
59
+ private publish;
60
+ private accept;
61
+ private unwrap;
62
+ private issue;
63
+ private perform;
64
+ refresh(): Promise<void>;
65
+ open(id: string): Promise<void>;
66
+ reload(): Promise<void>;
67
+ private loadEditor;
68
+ discardAndOpen(): Promise<void>;
69
+ private editId;
70
+ private editContent;
71
+ save(): Promise<void>;
72
+ apply(): Promise<void>;
73
+ reset(): Promise<void>;
74
+ private acceptSelection;
75
+ }
76
+ export type { ProfileErrorInfo, ProfileReadResult };
77
+ //# sourceMappingURL=controller.d.ts.map
@@ -0,0 +1,198 @@
1
+ import { applyEdits, modify } from "jsonc-parser";
2
+ import { isProfileId } from "../profile-remote.js";
3
+ const NEW_EDITOR = "";
4
+ export const NEW_PROFILE_CONTENT = '{\n "version": 1,\n "id": "new-profile",\n "label": "New profile",\n "settings": {\n // Runtime overlay only. Omitted fields inherit the deployment baseline.\n "defaultActive": true\n }\n}\n';
5
+ /** A valid external CAS conflict is reconcilable; corruption is never reset implicitly. */
6
+ export function canReconcileSelection(snapshot) {
7
+ return snapshot !== null && (snapshot.selectionRevision === "absent" || /^[a-f0-9]{64}$/u.test(snapshot.selectionRevision))
8
+ && (snapshot.selectionError === undefined || snapshot.selectionError.code === "conflict");
9
+ }
10
+ /** Stable native Store seat, with no filesystem or transport authority. */
11
+ export class ProfilesController {
12
+ remote;
13
+ current = { snapshot: null, editor: null, dirty: false, busy: null, issue: null, notice: null, pendingEditor: null };
14
+ accepted = null;
15
+ listeners = new Set();
16
+ generation = 0;
17
+ disposed = false;
18
+ store = {
19
+ getSnapshot: () => this.current,
20
+ subscribe: (listener) => {
21
+ this.listeners.add(listener);
22
+ return () => { this.listeners.delete(listener); };
23
+ },
24
+ };
25
+ actions = {
26
+ refresh: () => this.refresh(), open: (id) => this.open(id), create: () => this.open(NEW_EDITOR), reload: () => this.reload(),
27
+ editId: (id) => this.editId(id), editContent: (content) => this.editContent(content),
28
+ save: () => this.save(), apply: () => this.apply(), reset: () => this.reset(),
29
+ discardAndOpen: () => this.discardAndOpen(), cancelDiscard: () => this.publish({ pendingEditor: null }),
30
+ };
31
+ constructor(remote) {
32
+ this.remote = remote;
33
+ }
34
+ dispose() { this.disposed = true; this.generation += 1; this.listeners.clear(); }
35
+ publish(patch) {
36
+ if (this.disposed)
37
+ return;
38
+ this.current = { ...this.current, ...patch };
39
+ for (const listener of this.listeners)
40
+ listener();
41
+ }
42
+ accept(document) {
43
+ this.accepted = { ...document };
44
+ this.publish({ editor: { ...document }, dirty: false, pendingEditor: null });
45
+ }
46
+ async unwrap(request, field) {
47
+ const result = await request;
48
+ if (result.ok)
49
+ return result.value;
50
+ if (result.error.code === "dsmm-profiles/refused") {
51
+ throw { kind: "domain", ...result.error.details };
52
+ }
53
+ if (["gateway/input-invalid", "gateway/arguments-invalid"].includes(String(result.error.code))) {
54
+ throw { kind: "domain", code: "validation", field, message: "The native Host rejected a request field. Check the profile ID and document size before retrying." };
55
+ }
56
+ throw { kind: "transport", code: result.error.code };
57
+ }
58
+ issue(error) {
59
+ if (typeof error === "object" && error !== null && "kind" in error && (error.kind === "domain" || error.kind === "transport"))
60
+ return error;
61
+ return { kind: "assembly", code: "unavailable" };
62
+ }
63
+ async perform(busy, operation) {
64
+ if (this.disposed || this.current.busy !== null || this.current.pendingEditor !== null)
65
+ return;
66
+ const generation = ++this.generation;
67
+ const live = () => !this.disposed && generation === this.generation;
68
+ this.publish({ busy, issue: null, notice: null });
69
+ try {
70
+ await operation(live);
71
+ }
72
+ catch (error) {
73
+ if (live())
74
+ this.publish({ issue: this.issue(error) });
75
+ }
76
+ finally {
77
+ if (live())
78
+ this.publish({ busy: null });
79
+ }
80
+ }
81
+ async refresh() {
82
+ await this.perform("refresh", async (live) => {
83
+ const snapshot = await this.unwrap(this.remote.describe());
84
+ if (live())
85
+ this.publish({ snapshot });
86
+ });
87
+ }
88
+ async open(id) {
89
+ if (this.disposed || this.current.busy !== null || this.current.pendingEditor !== null)
90
+ return;
91
+ if (id !== NEW_EDITOR && this.current.editor?.id === id)
92
+ return;
93
+ if (this.current.dirty) {
94
+ this.publish({ pendingEditor: id });
95
+ return;
96
+ }
97
+ await this.loadEditor(id);
98
+ }
99
+ async reload() {
100
+ const editor = this.current.editor;
101
+ if (editor === null || editor.revision === null || this.current.busy !== null || this.current.pendingEditor !== null)
102
+ return;
103
+ if (this.current.dirty) {
104
+ this.publish({ pendingEditor: editor.id });
105
+ return;
106
+ }
107
+ await this.loadEditor(editor.id);
108
+ }
109
+ async loadEditor(id) {
110
+ if (id === NEW_EDITOR) {
111
+ this.accepted = null;
112
+ this.publish({ editor: { id: "new-profile", content: NEW_PROFILE_CONTENT, revision: null }, dirty: true, issue: null, notice: null, pendingEditor: null });
113
+ return;
114
+ }
115
+ await this.perform("read", async (live) => {
116
+ const document = await this.unwrap(this.remote.read(id), "id");
117
+ if (live())
118
+ this.accept(document);
119
+ });
120
+ }
121
+ async discardAndOpen() {
122
+ const wanted = this.current.pendingEditor;
123
+ if (wanted === null || this.current.busy !== null)
124
+ return;
125
+ this.publish({ pendingEditor: null });
126
+ // Only explicit confirmation clears a draft; a failed read restores it.
127
+ const previous = this.current.editor;
128
+ const accepted = this.accepted;
129
+ await this.loadEditor(wanted);
130
+ if (this.current.issue !== null && previous !== null) {
131
+ this.accepted = accepted;
132
+ this.publish({ editor: previous, dirty: true });
133
+ }
134
+ }
135
+ editId(id) {
136
+ const editor = this.current.editor;
137
+ if (editor === null || editor.revision !== null || this.current.busy !== null || this.current.pendingEditor !== null)
138
+ return;
139
+ let content = editor.content;
140
+ try {
141
+ content = applyEdits(content, modify(content, ["id"], id, { formattingOptions: { insertSpaces: true, tabSize: 2 } }));
142
+ }
143
+ catch { /* Keep invalid JSONC intact; the Host explains validation on save. */ }
144
+ this.publish({ editor: { ...editor, id, content }, dirty: true, issue: null, notice: null });
145
+ }
146
+ editContent(content) {
147
+ const editor = this.current.editor;
148
+ if (editor === null || this.current.busy !== null || this.current.pendingEditor !== null)
149
+ return;
150
+ this.publish({ editor: { ...editor, content }, dirty: this.accepted === null || this.accepted.content !== content || this.accepted.id !== editor.id, issue: null, notice: null });
151
+ }
152
+ async save() {
153
+ const editor = this.current.editor;
154
+ if (editor === null || !this.current.dirty || this.current.snapshot === null || this.current.busy !== null || this.current.pendingEditor !== null)
155
+ return;
156
+ if (!isProfileId(editor.id)) {
157
+ this.publish({ issue: { kind: "domain", code: "validation", field: "id" }, notice: null });
158
+ return;
159
+ }
160
+ await this.perform("save", async (live) => {
161
+ const document = await this.unwrap(this.remote.save({ id: editor.id, content: editor.content, expectedRevision: editor.revision }), "content");
162
+ if (!live())
163
+ return;
164
+ this.accept(document);
165
+ // The accepted response proves save; applying remains a separate commit.
166
+ const old = this.current.snapshot;
167
+ const profiles = old.profiles.filter((item) => item.id !== document.id);
168
+ profiles.push({ id: document.id, revision: document.revision, ...(document.label === undefined ? {} : { label: document.label }) });
169
+ profiles.sort((a, b) => a.id.localeCompare(b.id));
170
+ this.publish({ snapshot: { ...old, profiles }, notice: { key: "saved", id: document.id } });
171
+ });
172
+ }
173
+ async apply() {
174
+ const { editor, snapshot, dirty } = this.current;
175
+ if (editor?.revision == null || !canReconcileSelection(snapshot) || dirty)
176
+ return;
177
+ await this.perform("apply", async (live) => {
178
+ const accepted = await this.unwrap(this.remote.select({ id: editor.id, expectedRevision: editor.revision, expectedSelectionRevision: snapshot.selectionRevision }));
179
+ if (live())
180
+ this.acceptSelection(accepted, { key: "applied", id: accepted.selectedId ?? undefined });
181
+ });
182
+ }
183
+ async reset() {
184
+ const snapshot = this.current.snapshot;
185
+ if (!canReconcileSelection(snapshot))
186
+ return;
187
+ await this.perform("reset", async (live) => {
188
+ const accepted = await this.unwrap(this.remote.select({ id: null, expectedSelectionRevision: snapshot.selectionRevision }));
189
+ if (live())
190
+ this.acceptSelection(accepted, { key: "reset" });
191
+ });
192
+ }
193
+ acceptSelection(snapshot, notice) {
194
+ this.publish({ snapshot, notice: snapshot.selectionError === undefined ? notice : null,
195
+ issue: snapshot.selectionError === undefined ? null : { kind: "domain", ...snapshot.selectionError, source: "selection" } });
196
+ }
197
+ }
198
+ //# sourceMappingURL=controller.js.map
@@ -0,0 +1,11 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ export { ProfilesController, NEW_PROFILE_CONTENT } from "./controller.js";
3
+ export type { ProfilesActions, ProfilesViewSnapshot, ProfilesIssue } from "./controller.js";
4
+ export { ProfilesSection } from "./ProfilesSection.js";
5
+ export type { ProfilesSectionProps, ProfilesInjected } from "./ProfilesSection.js";
6
+ export { NS, en, zh } from "./locales.js";
7
+ export { TYPERT_REMOTE } from "../profile-remote.js";
8
+ /** No self-dependency on a namespace that this contribution has not mounted. */
9
+ export declare const inject: readonly ["slots", "locale", "remote"];
10
+ export declare function apply(ctx: Context): Promise<void>;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,34 @@
1
+ import { TYPERT_REMOTE } from "../profile-remote.js";
2
+ import { ProfilesController } from "./controller.js";
3
+ import { NS, en, zh } from "./locales.js";
4
+ import { ProfilesSection } from "./ProfilesSection.js";
5
+ import { PROFILE_STYLES } from "./styles.js";
6
+ export { ProfilesController, NEW_PROFILE_CONTENT } from "./controller.js";
7
+ export { ProfilesSection } from "./ProfilesSection.js";
8
+ export { NS, en, zh } from "./locales.js";
9
+ export { TYPERT_REMOTE } from "../profile-remote.js";
10
+ /** No self-dependency on a namespace that this contribution has not mounted. */
11
+ export const inject = ["slots", "locale", "remote"];
12
+ export async function apply(ctx) {
13
+ await ctx.remote.$mount(TYPERT_REMOTE);
14
+ await ctx.inject(["remote.dsmmProfiles"], (profileCtx) => {
15
+ const controller = new ProfilesController(profileCtx.remote.dsmmProfiles);
16
+ profileCtx.effect(() => () => controller.dispose(), "dsmm: profile editor");
17
+ profileCtx.effect(() => profileCtx.locale.register(NS, { en, zh }), "dsmm: profile locale");
18
+ profileCtx.effect(() => {
19
+ const style = document.createElement("style");
20
+ style.dataset.dsmmProfiles = "";
21
+ style.textContent = PROFILE_STYLES;
22
+ document.head.append(style);
23
+ return () => style.remove();
24
+ }, "dsmm: profile styles");
25
+ const t = profileCtx.locale.bind(NS);
26
+ profileCtx.slots.inject("settings.section", () => profileCtx.slots.register({
27
+ name: "settings.section", id: "dsmm-profiles", order: 30,
28
+ label: () => t("title"), locale: NS,
29
+ inject: () => ({ hooks: { profiles: controller.store }, ...controller.actions }),
30
+ }, ProfilesSection));
31
+ void controller.refresh();
32
+ });
33
+ }
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,56 @@
1
+ export declare const NS = "settings.dsmm-profiles";
2
+ export declare const en: {
3
+ title: string;
4
+ description: string;
5
+ newSessions: string;
6
+ editorSelect: string;
7
+ choose: string;
8
+ newDraft: string;
9
+ new: string;
10
+ profileId: string;
11
+ idHint: string;
12
+ configuration: string;
13
+ configurationHint: string;
14
+ structuralHint: string;
15
+ save: string;
16
+ saving: string;
17
+ apply: string;
18
+ applying: string;
19
+ reset: string;
20
+ resetting: string;
21
+ refresh: string;
22
+ refreshing: string;
23
+ reload: string;
24
+ loading: string;
25
+ reading: string;
26
+ empty: string;
27
+ baseline: string;
28
+ appliedProfile: string;
29
+ appliedInvalid: string;
30
+ selectionConflict: string;
31
+ dirty: string;
32
+ savedNotApplied: string;
33
+ savedApplied: string;
34
+ saved: string;
35
+ applied: string;
36
+ resetDone: string;
37
+ discardPrompt: string;
38
+ discard: string;
39
+ cancel: string;
40
+ conflict: string;
41
+ validation: string;
42
+ io: string;
43
+ unavailable: string;
44
+ transport: string;
45
+ invalidProfile: string;
46
+ details: string;
47
+ retry: string;
48
+ };
49
+ export type ProfilesLocaleKey = keyof typeof en;
50
+ export declare const zh: Record<ProfilesLocaleKey, string>;
51
+ declare module "@deepseek-ai/dsh-client-ui-slots" {
52
+ interface LocaleNamespaceMap {
53
+ "settings.dsmm-profiles": ProfilesLocaleKey;
54
+ }
55
+ }
56
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1,48 @@
1
+ export const NS = "settings.dsmm-profiles";
2
+ export const en = {
3
+ title: "Deepwork Profiles", description: "Save independent runtime configurations and choose which one new sessions use.",
4
+ newSessions: "Apply and reset affect new sessions only. Existing sessions, including blank sessions, keep their current policy. A cold resume uses the currently applied policy.",
5
+ editorSelect: "Profile to edit", choose: "Choose a profile", newDraft: "New unsaved profile", new: "New profile",
6
+ profileId: "Profile ID (name)", idHint: "Use 1–64 lowercase letters, digits, hyphens or underscores. The ID cannot be changed after saving. Add an optional display label in the JSONC document.",
7
+ configuration: "Runtime configuration (JSONC)", configurationHint: "Document: version 1, matching id, optional label, and settings. Supported runtime settings: defaultActive, roleRouting, workflow, guards, runtimeRecovery, and both DeepSeek families’ calibration, default-effort and max-preset policies.",
8
+ structuralHint: "Roles, skills, mode names, prompt order/content, preset installation, LSP, providers and accounts belong in native deployment configuration, not profiles. Routing may reference an existing provider; never paste credentials.",
9
+ save: "Save profile", saving: "Saving profile…", apply: "Apply saved profile", applying: "Applying profile…", reset: "Reset to baseline", resetting: "Resetting to baseline…",
10
+ refresh: "Refresh profiles", refreshing: "Refreshing profiles…", reload: "Reload saved profile", loading: "Loading profiles…", reading: "Reading profile…",
11
+ empty: "No saved profiles yet. Create a profile to start; the deployment baseline remains applied.",
12
+ baseline: "Applied to new sessions: deployment baseline.", appliedProfile: "Applied to new sessions: {id} (revision {revision}).",
13
+ appliedInvalid: "The stored selection cannot be confirmed. Existing sessions remain unchanged. Resolve the Host diagnostic before applying or resetting a profile.",
14
+ selectionConflict: "The stored selection changed outside this Host. This Host still uses the policy shown above for new sessions. Apply a saved profile or reset to baseline to reconcile it; restarting adopts the stored selection. Existing sessions stay unchanged.",
15
+ dirty: "Unsaved changes. Save before applying; saving alone does not apply this profile.", savedNotApplied: "Saved profile; this revision is not applied to new sessions.", savedApplied: "This saved revision is applied to new sessions.",
16
+ saved: "Saved {id}. The applied policy was not changed.", applied: "Applied {id} for new sessions. Existing sessions were not changed.", resetDone: "Reset to the deployment baseline for new sessions. Existing sessions were not changed.",
17
+ discardPrompt: "Discard the unsaved draft before changing the editor?", discard: "Discard changes", cancel: "Cancel",
18
+ conflict: "The saved file or selection changed elsewhere. Your draft and the prior selection were kept. Refresh profiles, then reload the saved profile or review your draft before retrying.",
19
+ validation: "This profile is not valid. Correct the field below; your draft is unchanged.",
20
+ io: "The Host could not commit this operation. Your draft and the prior selection were kept. Check profile storage access, refresh, then retry.",
21
+ unavailable: "The native profile service is unavailable. Your draft is kept. Refresh after the Host reconnects or Deepwork is enabled.",
22
+ transport: "The native connection could not confirm this operation. Your draft is kept. Refresh the Host state before retrying; do not assume a save or apply completed.",
23
+ invalidProfile: "Unavailable profile: {id}", details: "Host diagnostic", retry: "Resolve the diagnostic, refresh profiles, then retry.",
24
+ };
25
+ export const zh = {
26
+ title: "Deepwork 配置档", description: "保存独立的运行时配置,并选择新会话使用的配置档。",
27
+ newSessions: "应用和重置仅影响新会话。已有会话(包括空白会话)保留原策略。冷恢复使用当前已应用的策略。",
28
+ editorSelect: "要编辑的配置档", choose: "选择配置档", newDraft: "新的未保存配置档", new: "新建配置档",
29
+ profileId: "配置档 ID(名称)", idHint: "使用 1–64 个小写字母、数字、连字符或下划线。保存后不能修改 ID。可在 JSONC 文档中添加可选的显示名称 label。",
30
+ configuration: "运行时配置(JSONC)", configurationHint: "文档包含 version: 1、相同的 id、可选 label 和 settings。支持 defaultActive、roleRouting、workflow、guards、runtimeRecovery,以及两个 DeepSeek 系列的校准、默认推理强度和最高强度预设策略。",
31
+ structuralHint: "角色、技能、模式名称、提示顺序或内容、预设安装、LSP、提供商和账户由原生部署配置管理,不属于配置档。路由可引用已有提供商;请勿粘贴凭证。",
32
+ save: "保存配置档", saving: "正在保存配置档…", apply: "应用已保存配置档", applying: "正在应用配置档…", reset: "重置为基线", resetting: "正在重置为基线…",
33
+ refresh: "刷新配置档", refreshing: "正在刷新配置档…", reload: "重新加载已保存配置档", loading: "正在加载配置档…", reading: "正在读取配置档…",
34
+ empty: "尚无已保存的配置档。可新建配置档;当前仍应用部署基线。",
35
+ baseline: "新会话使用:部署基线。", appliedProfile: "新会话使用:{id}(修订 {revision})。",
36
+ appliedInvalid: "无法确认保存的选择。已有会话未改变。请先解决 Host 诊断,再应用或重置配置档。",
37
+ selectionConflict: "保存的选择已被此 Host 之外的操作修改。此 Host 的新会话仍使用上方策略。请应用已保存配置档或重置为基线以协调选择;重启将采用保存的选择。已有会话未改变。",
38
+ dirty: "有未保存的更改。请先保存再应用;仅保存不会应用此配置档。", savedNotApplied: "已保存;此修订尚未应用到新会话。", savedApplied: "此已保存修订已应用到新会话。",
39
+ saved: "已保存 {id},未改变已应用的策略。", applied: "已为新会话应用 {id},已有会话未改变。", resetDone: "已为新会话重置为部署基线,已有会话未改变。",
40
+ discardPrompt: "切换编辑器之前,是否丢弃未保存的草稿?", discard: "丢弃更改", cancel: "取消",
41
+ conflict: "已保存文件或选择已被其他操作修改。草稿和原选择已保留。请刷新配置档,然后重新加载已保存配置档或检查草稿后重试。",
42
+ validation: "此配置档无效。请修正下方字段;草稿未改变。",
43
+ io: "Host 无法提交此操作。草稿和原选择已保留。请检查配置档存储权限,刷新后重试。",
44
+ unavailable: "原生配置档服务不可用。草稿已保留。Host 重新连接或启用 Deepwork 后请刷新。",
45
+ transport: "原生连接无法确认此操作。草稿已保留。重试之前请刷新 Host 状态;不要假定保存或应用已完成。",
46
+ invalidProfile: "不可用配置档:{id}", details: "Host 诊断", retry: "请解决诊断问题,刷新配置档后重试。",
47
+ };
48
+ //# sourceMappingURL=locales.js.map
@@ -0,0 +1,3 @@
1
+ /** Geometry and theme aliases extracted in dsmm/DESIGN.md; scoped to this section. */
2
+ export declare const PROFILE_STYLES = "\n.dsmm-profiles{width:100%;max-width:760px;min-width:0;display:flex;flex-direction:column;gap:12px;font-family:var(--dsw-font-family);font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}\n.dsmm-profiles h2{margin:0;font-size:18px;font-weight:600}\n.dsmm-profiles p{margin:0;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}\n.dsmm-profiles .dsmm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles .dsmm-actions>button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:36px;height:auto}\n.dsmm-profiles .dsmm-input{width:100%;min-width:0;box-sizing:border-box;border-color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-input input{width:100%;min-width:0;font:inherit;color:inherit}\n.dsmm-profiles select,.dsmm-profiles textarea{box-sizing:border-box;min-width:0;max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-md)}\n.dsmm-profiles select{width:240px;height:32px;padding:0 10px;text-overflow:ellipsis}\n.dsmm-profiles textarea{width:100%;padding:12px;font-family:var(--ds-font-family-code);resize:vertical;overflow:auto;white-space:pre;}\n.dsmm-profiles select:hover:not(:disabled),.dsmm-profiles textarea:hover:not(:disabled){border-color:var(--dsw-alias-label-primary)}\n.dsmm-profiles select:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}\n.dsmm-profiles :is(select,textarea,button):focus-visible,.dsmm-profiles .dsmm-input:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles :is(select,textarea):disabled{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);cursor:not-allowed}\n.dsmm-profiles .dsmm-editor,.dsmm-profiles .dsmm-confirm{min-width:0;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform)}\n.dsmm-profiles .dsmm-issue{padding:12px;border-left:4px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-issue p+p{margin-top:8px}\n.dsmm-profiles .dsmm-status{min-height:22px}\n@media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}\n";
3
+ //# sourceMappingURL=styles.d.ts.map