@dsmm/dsmm 0.3.2 → 0.3.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 (190) hide show
  1. package/README.md +2 -2
  2. package/agent-presets/dsmm-builder/agent.cordis.yml +1 -1
  3. package/agent-presets/dsmm-clarifier/agent.cordis.yml +1 -1
  4. package/agent-presets/dsmm-code-search/agent.cordis.yml +1 -1
  5. package/agent-presets/dsmm-coding/agent.cordis.yml +3 -2
  6. package/agent-presets/dsmm-complex/agent.cordis.yml +2 -1
  7. package/agent-presets/dsmm-creative/agent.cordis.yml +1 -1
  8. package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +1 -1
  9. package/agent-presets/dsmm-deep/agent.cordis.yml +2 -1
  10. package/agent-presets/dsmm-doc-search/agent.cordis.yml +1 -1
  11. package/agent-presets/dsmm-documenting/agent.cordis.yml +1 -1
  12. package/agent-presets/dsmm-frontend/agent.cordis.yml +4 -2
  13. package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +1 -1
  14. package/agent-presets/dsmm-media-reader/agent.cordis.yml +1 -1
  15. package/agent-presets/dsmm-normal-task/agent.cordis.yml +3 -2
  16. package/agent-presets/dsmm-oracle/agent.cordis.yml +1 -1
  17. package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +1 -1
  18. package/agent-presets/dsmm-orchestrator/agent.cordis.yml +11 -1
  19. package/agent-presets/dsmm-plan-critic/agent.cordis.yml +1 -1
  20. package/agent-presets/dsmm-planner/agent.cordis.yml +1 -1
  21. package/agent-presets/dsmm-quick/agent.cordis.yml +2 -1
  22. package/agent-presets/dsmm-research/agent.cordis.yml +1 -1
  23. package/agent-presets/dsmm-reviewer/agent.cordis.yml +1 -1
  24. package/cordis.patch.yml +0 -9
  25. package/docs/agent-presets.md +5 -5
  26. package/docs/compatibility.md +2 -6
  27. package/docs/migration-from-ocmm.md +1 -1
  28. package/docs/native-permissions.md +11 -3
  29. package/docs/roadmap.md +31 -11
  30. package/docs/runtime-recovery.md +30 -2
  31. package/docs/settings-status.md +7 -5
  32. package/docs/skill-sync.md +13 -14
  33. package/lib/client/ChildrenPanel.d.ts +1 -4
  34. package/lib/client/ChildrenPanel.js +3 -3
  35. package/lib/client/DeploymentFields.js +12 -1
  36. package/lib/client/DeploymentPage.d.ts +1 -3
  37. package/lib/client/DeploymentPage.js +30 -18
  38. package/lib/client/NativeCommandEntries.js +47 -37
  39. package/lib/client/PermissionRuleEntries.d.ts +17 -0
  40. package/lib/client/PermissionRuleEntries.js +70 -0
  41. package/lib/client/PermissionsPanel.d.ts +1 -3
  42. package/lib/client/PermissionsPanel.js +5 -4
  43. package/lib/client/children-locales.d.ts +4 -4
  44. package/lib/client/controller.js +4 -1
  45. package/lib/client/deployment-locales.d.ts +2 -2
  46. package/lib/client/deployment-locales.js +8 -9
  47. package/lib/client/deployment-modules.d.ts +5 -3
  48. package/lib/client/deployment-modules.js +4 -4
  49. package/lib/client/deployment-workspace.d.ts +4 -0
  50. package/lib/client/deployment-workspace.js +37 -11
  51. package/lib/client/index.js +2 -7
  52. package/lib/client/locales.js +131 -119
  53. package/lib/client/permission-controller.d.ts +13 -0
  54. package/lib/client/permission-controller.js +50 -23
  55. package/lib/client/permission-locales.d.ts +28 -30
  56. package/lib/client/permission-locales.js +38 -38
  57. package/lib/client/styles.d.ts +1 -1
  58. package/lib/client/styles.js +8 -8
  59. package/lib/client.js +2272 -3773
  60. package/lib/core-permission-authority.js +28 -16
  61. package/lib/index.d.ts +0 -2
  62. package/lib/index.js +11 -31
  63. package/lib/native-admission.d.ts +3 -3
  64. package/lib/native-admission.js +67 -66
  65. package/lib/permission-controller.js +1 -1
  66. package/lib/permission-fs-search.js +1 -2
  67. package/lib/permission-fs.js +1 -2
  68. package/lib/permission-native-command.js +6 -4
  69. package/lib/permission-settings.d.ts +21 -7
  70. package/lib/permission-settings.js +21 -9
  71. package/lib/permission-web.js +1 -2
  72. package/lib/preset-materializer.js +3 -3
  73. package/lib/preset-registry.d.ts +20 -2
  74. package/lib/preset-registry.js +46 -17
  75. package/lib/profile-diagnostics.js +1 -1
  76. package/lib/profile-remote.js +1 -3
  77. package/lib/role-identity.d.ts +1 -1
  78. package/lib/role-identity.js +16 -4
  79. package/lib/role-policy.d.ts +3 -0
  80. package/lib/role-policy.js +30 -6
  81. package/lib/role-subagents.js +6 -4
  82. package/lib/roles.d.ts +2 -0
  83. package/lib/roles.js +2 -0
  84. package/lib/runtime-integration.js +4 -4
  85. package/lib/settings.d.ts +1 -3
  86. package/lib/settings.js +8 -10
  87. package/lib/state.d.ts +4 -1
  88. package/lib/state.js +37 -6
  89. package/package.json +1 -5
  90. package/prompts/deepwork.md +13 -1
  91. package/prompts/source/agents/orchestrator.md +10 -0
  92. package/prompts/source/category/coding.md +2 -1
  93. package/prompts/source/category/complex.md +1 -0
  94. package/prompts/source/category/deep.md +1 -0
  95. package/prompts/source/category/frontend.md +3 -1
  96. package/prompts/source/category/normal-task.md +2 -1
  97. package/prompts/source/category/quick.md +1 -0
  98. package/prompts/source/deepwork/claude-opus-5.md +2 -0
  99. package/prompts/source/deepwork/default.md +12 -0
  100. package/prompts/source/deepwork/gemini.md +6 -1
  101. package/prompts/source/deepwork/glm.md +5 -1
  102. package/prompts/source/deepwork/gpt.md +22 -2
  103. package/prompts/source/deepwork/kimi-k27.md +2 -0
  104. package/prompts/source/deepwork/planner.md +3 -1
  105. package/prompts/source/deepwork/swe-2.md +2 -0
  106. package/prompts/source/manifest.json +3 -68
  107. package/prompts/source/shared/dsh-host-contract.md +1 -1
  108. package/skills/ast-grep/SKILL.md +1 -1
  109. package/skills/brainstorming/SKILL.md +1 -1
  110. package/skills/coding-agent-sessions/SKILL.md +1 -1
  111. package/skills/debugging/SKILL.md +1 -1
  112. package/skills/dispatching-parallel-agents/SKILL.md +1 -1
  113. package/skills/frontend/SKILL.md +1 -1
  114. package/skills/git-master/SKILL.md +1 -1
  115. package/skills/init-deep/SKILL.md +1 -1
  116. package/skills/receiving-code-review/SKILL.md +1 -1
  117. package/skills/remove-ai-slops/SKILL.md +1 -1
  118. package/skills/requesting-code-review/SKILL.md +1 -1
  119. package/skills/subagent-driven-development/SKILL.md +1 -1
  120. package/skills/using-git-worktrees/SKILL.md +1 -1
  121. package/skills/writing-plans/SKILL.md +1 -1
  122. package/lib/client/ChildPermissions.d.ts +0 -43
  123. package/lib/client/ChildPermissions.js +0 -100
  124. package/lib/client/HistoryContinuation.d.ts +0 -7
  125. package/lib/client/HistoryContinuation.js +0 -22
  126. package/lib/client/PermissionPanelEntry.d.ts +0 -8
  127. package/lib/client/PermissionPanelEntry.js +0 -11
  128. package/lib/client/TemporaryPermissions.d.ts +0 -21
  129. package/lib/client/TemporaryPermissions.js +0 -94
  130. package/lib/client/history-controller.d.ts +0 -29
  131. package/lib/client/history-controller.js +0 -111
  132. package/lib/client/history-entry.d.ts +0 -11
  133. package/lib/client/history-entry.js +0 -106
  134. package/lib/client/history-locales.d.ts +0 -95
  135. package/lib/client/history-locales.js +0 -41
  136. package/lib/client/temporary-permission-client.d.ts +0 -20
  137. package/lib/client/temporary-permission-client.js +0 -52
  138. package/lib/client/temporary-permission-entry.d.ts +0 -6
  139. package/lib/client/temporary-permission-entry.js +0 -56
  140. package/lib/history-candidates.d.ts +0 -30
  141. package/lib/history-candidates.js +0 -176
  142. package/lib/history-codec.d.ts +0 -11
  143. package/lib/history-codec.js +0 -102
  144. package/lib/history-contract.d.ts +0 -44
  145. package/lib/history-contract.js +0 -2
  146. package/lib/history-controller.d.ts +0 -42
  147. package/lib/history-controller.js +0 -329
  148. package/lib/history-policy.d.ts +0 -4
  149. package/lib/history-policy.js +0 -8
  150. package/lib/history-remote.d.ts +0 -28
  151. package/lib/history-remote.js +0 -17
  152. package/lib/history-rpc.d.ts +0 -24
  153. package/lib/history-rpc.js +0 -136
  154. package/lib/history-support.d.ts +0 -15
  155. package/lib/history-support.js +0 -21
  156. package/lib/history-types.d.ts +0 -67
  157. package/lib/history-types.js +0 -2
  158. package/lib/permission-child-control.d.ts +0 -36
  159. package/lib/permission-child-control.js +0 -164
  160. package/lib/permission-exec-argv.d.ts +0 -32
  161. package/lib/permission-exec-argv.js +0 -171
  162. package/lib/permission-temporary-files.d.ts +0 -19
  163. package/lib/permission-temporary-files.js +0 -248
  164. package/lib/permission-temporary-grants.d.ts +0 -106
  165. package/lib/permission-temporary-grants.js +0 -198
  166. package/lib/permission-temporary-install.d.ts +0 -25
  167. package/lib/permission-temporary-install.js +0 -86
  168. package/lib/permission-temporary-remote.d.ts +0 -19
  169. package/lib/permission-temporary-remote.js +0 -75
  170. package/lib/permission-temporary-rpc.d.ts +0 -37
  171. package/lib/permission-temporary-rpc.js +0 -154
  172. package/lib/permission-temporary-types.d.ts +0 -47
  173. package/lib/permission-temporary-types.js +0 -2
  174. package/lib/permission-temporary-web.d.ts +0 -11
  175. package/lib/permission-temporary-web.js +0 -154
  176. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-gateway@0.2.1-rc.2.patch +0 -13291
  177. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-remotes@0.2.1-rc.2.patch +0 -9133
  178. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-client-ui-approval@0.2.1-rc.2.patch +0 -156
  179. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-subagent@0.2.1-rc.2.patch +0 -3546
  180. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-user-approval@0.2.1-rc.2.patch +0 -431
  181. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-web@0.2.1-rc.2.patch +0 -119
  182. package/patches/dsh-approval-settlement/README.md +0 -41
  183. package/patches/dsh-approval-settlement/metadata.json +0 -10
  184. package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-loop@0.2.1-rc.2.patch +0 -383
  185. package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-preset-registry@0.2.1-rc.2.patch +0 -55
  186. package/patches/dsh-session-activation/@deepseek-ai__dsh-api-session-controller@0.2.1-rc.2.patch +0 -16673
  187. package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-subagent@0.2.1-rc.2.patch +0 -29
  188. package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-workspace@0.2.1-rc.2.patch +0 -196
  189. package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence-jsonl@0.2.1-rc.2.patch +0 -35
  190. package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence@0.2.1-rc.2.patch +0 -40
@@ -1,9 +1,12 @@
1
+ import { CONFIG_MODULES, moduleFields } from "./deployment-modules.js";
2
+ import { scopeSchema } from "./deployment-data.js";
1
3
  /** Contribution-owned memory only. Navigation never saves, applies, or rebases drafts. */
2
4
  export class DeploymentWorkspace {
3
5
  core;
4
6
  permissions;
5
7
  state = { scope: "global", module: null, pending: null, native: null, revision: 0 };
6
8
  listeners = new Set();
9
+ visited = { global: null, profile: null };
7
10
  forms = null;
8
11
  profiles = new Map();
9
12
  stopForm;
@@ -68,25 +71,47 @@ export class DeploymentWorkspace {
68
71
  this.changed({ native });
69
72
  }
70
73
  controller(scope = this.state.scope) { return scope === "global" ? this.core : this.state.native; }
74
+ /** First visit opens the first section with editable fields; afterwards the last viewed section. */
75
+ defaultSection(scope) {
76
+ const restored = this.visited[scope];
77
+ if (restored !== null)
78
+ return restored;
79
+ const snapshot = this.controller(scope)?.getSnapshot().snapshot;
80
+ if (snapshot !== null && snapshot !== undefined) {
81
+ const schema = scopeSchema(snapshot, scope);
82
+ for (const module of CONFIG_MODULES)
83
+ if (module !== "state" && moduleFields(schema, module, scope).length > 0)
84
+ return module;
85
+ }
86
+ return "state";
87
+ }
71
88
  hasPending() { return this.controller()?.getSnapshot().dirty === true || this.state.module === "permissions" && this.permissions?.store.getSnapshot().dirty === true; }
72
89
  request(destination) {
73
90
  const switched = destination.scope !== this.state.scope;
74
- const leaving = switched || this.state.module !== null && destination.module !== this.state.module;
75
- if (leaving && this.hasPending())
91
+ const leaving = switched || this.state.module !== null && destination.module !== null && destination.module !== this.state.module;
92
+ if (leaving && this.hasPending()) {
76
93
  this.changed({ pending: destination });
77
- else {
78
- this.changed({ ...destination, pending: null });
79
- if (switched)
80
- void this.controller()?.refresh();
94
+ return;
81
95
  }
96
+ const module = destination.module ?? this.defaultSection(destination.scope);
97
+ this.visited[destination.scope] = module;
98
+ this.changed({ scope: destination.scope, module, pending: null });
99
+ if (switched)
100
+ void this.controller()?.refresh();
82
101
  }
83
102
  continueEditing() { this.changed({ pending: null }); }
84
- keepAndNavigate() { const target = this.state.pending; if (target !== null) {
103
+ /** Explicitly keep every draft and move anyway; the draft stays in contribution memory. */
104
+ keepAndNavigate() {
105
+ const target = this.state.pending;
106
+ if (target === null)
107
+ return;
108
+ const module = target.module ?? this.defaultSection(target.scope);
109
+ this.visited[target.scope] = module;
85
110
  const switched = target.scope !== this.state.scope;
86
- this.changed({ ...target, pending: null });
111
+ this.changed({ scope: target.scope, module, pending: null });
87
112
  if (switched)
88
113
  void this.controller()?.refresh();
89
- } }
114
+ }
90
115
  async discardAndNavigate() {
91
116
  const destination = this.state.pending;
92
117
  if (destination === null)
@@ -98,12 +123,13 @@ export class DeploymentWorkspace {
98
123
  return;
99
124
  }
100
125
  if (this.state.module === "permissions" && this.permissions?.store.getSnapshot().dirty) {
101
- await this.permissions.refresh(this.permissions.store.getSnapshot().generation, true);
126
+ const permissions = this.permissions.store.getSnapshot();
127
+ await this.permissions.refresh(permissions.generation, true);
102
128
  if (this.permissions.store.getSnapshot().dirty)
103
129
  return;
104
130
  }
105
131
  if (this.state.pending === destination)
106
- this.changed({ ...destination, pending: null });
132
+ this.request(destination);
107
133
  }
108
134
  async save() { const controller = this.controller(); if (controller === null)
109
135
  return; await controller.save(); if (controller !== this.core && controller.getSnapshot().saved)
@@ -14,9 +14,6 @@ import { permissionClient } from "./permission-client.js";
14
14
  import { PermissionController } from "./permission-controller.js";
15
15
  import { PERMISSIONS_NS, permissionEn, permissionZh } from "./permission-locales.js";
16
16
  import { registerRoleToolViews } from "./RoleToolView.js";
17
- import { HISTORY_REMOTE } from "../history-remote.js";
18
- import { registerHistoryContinuation } from "./history-entry.js";
19
- import { registerTemporaryPermissionEntry } from "./temporary-permission-entry.js";
20
17
  export { ProfilesController, NEW_PROFILE_CONTENT } from "./controller.js";
21
18
  export { ProfilesSection } from "./ProfilesSection.js";
22
19
  export { NS, en, zh } from "./locales.js";
@@ -30,14 +27,12 @@ export { ROLE_CONTROL_REMOTE } from "../role-control-remote.js";
30
27
  export const inject = ["slots", "locale", "remote"];
31
28
  export async function apply(ctx) {
32
29
  registerRoleToolViews(ctx);
33
- await ctx.remote.$mount({ ...TYPERT_REMOTE, descriptors: [...TYPERT_REMOTE.descriptors, ...HISTORY_REMOTE.descriptors] });
30
+ await ctx.remote.$mount(TYPERT_REMOTE);
34
31
  await ctx.remote.$mount(ROLE_CONTROL_REMOTE);
35
32
  await ctx.remote.$mount(PERMISSION_REMOTE);
36
- registerHistoryContinuation(ctx);
37
33
  const permissions = new PermissionController();
38
34
  ctx.effect(() => () => permissions.dispose(), "dsmm: permission controls");
39
35
  ctx.effect(() => ctx.locale.register(PERMISSIONS_NS, { en: permissionEn, zh: permissionZh }), "dsmm: permission locale");
40
- const temporaryPermissions = registerTemporaryPermissionEntry(ctx, permissions);
41
36
  void ctx.inject(["connection"], connectionCtx => {
42
37
  const handle = connectionCtx.connection, invoke = permissionClient(handle);
43
38
  const update = () => { const generation = handle.generation.getSnapshot(); permissions.bindConnection(generation === undefined ? null : invoke, generation); };
@@ -88,7 +83,7 @@ export async function apply(ctx) {
88
83
  document.head.append(style);
89
84
  return () => style.remove();
90
85
  }, "dsmm: core styles");
91
- const inject = () => ({ core, remote: coreCtx.remote.dsmmConfig, workspace, temporaryPermissions, permissionsT: coreCtx.locale.bind(PERMISSIONS_NS) });
86
+ const inject = () => ({ core, remote: coreCtx.remote.dsmmConfig, workspace, permissionsT: coreCtx.locale.bind(PERMISSIONS_NS) });
92
87
  coreCtx.slots.inject("plugins.bundle.config", () => coreCtx.slots.register({ name: "plugins.bundle.config", key: "@dsmm/dsmm", locale: DEPLOYMENT_NS, inject }, DeploymentPage));
93
88
  // The canonical bundle owner passes only view. Namespace comes from the authenticated snapshot.
94
89
  void coreCtx.inject(["configForms"], formCtx => {
@@ -1,145 +1,157 @@
1
1
  export const NS = "settings.dsmm-profiles";
2
2
  export const en = {
3
- sessionChooseWorkspace: "Choose a workspace to start a blank session, then choose its configuration before sending.",
4
- sessionSelectionBlock: "DSMM session configuration is being confirmed. Wait for selection to finish, or refresh its state.",
5
- sessionCommittedRefresh: "Session configuration saved. Refresh to confirm it; do not apply again.",
6
- sessionUnconfirmedRefresh: "Session configuration result unconfirmed. Refresh its state before selecting or sending; do not retry the change.",
7
- technicalDetails: "Technical details",
8
- diagnosticJsonc: "Correct the JSONC syntax at the indicated location.", diagnosticDuplicate: "Remove the duplicate field at this location.", diagnosticUnsafe: "Unsafe object keys are not supported; remove this field.", diagnosticUnknown: "Remove this unsupported field. Private and installation configuration belongs in native deployment settings.", diagnosticDeprecated: "This retired field is rejected. Configure explicit role levels instead; no migration is performed.", diagnosticType: "Use the declared field type and bounded value.", diagnosticValue: "Choose an explicitly supported value. Output-language choices are shown in the structured language field.", diagnosticRoute: "Use a complete provider/model route or a nonempty exact-effort override.", diagnosticRequired: "This role is required by the selected Deepwork policy and cannot be disabled.", diagnosticCeiling: "A named profile cannot enable capabilities outside its captured startup/deployment ceiling.",
9
- browseZone: "Saved profiles", editZone: "Edit profile", savedRevision: "Saved version: {revision}", savedInventory: "Profile warnings and errors", futurePin: "Default selection version: {revision}", noEditor: "Choose a profile or create one to edit.",
10
- warningMarker: "Warning · nonblocking · {code} · {field}", blockingMarker: "Blocked · {code} · {field}", blankLabelWarning: "The label is blank. The profile ID is used for display; the original document can still be saved and selected.", diagnosticLocation: "JSONC line {line}, column {column}.",
11
- savedWarnings: "Saved profile warnings", draftWarnings: "Draft warnings", futureWarnings: "New-session default warnings", admissionWarnings: "Current-session warnings", warningProfile: "warning (nonblocking)",
12
- omitLabel: "Use ID as display name", businessLocale: "Default output language", inheritLocale: "Use deployment or native language", unsupportedLocale: "Unsupported language — choose an allowed value", localeHint: "User requests take priority. Interface language stays unchanged.",
13
- toolTopology: "Subagent tools", topologyHint: "per-role: one tool per role plus a category tool. parameterized: choose the role or category in the tool arguments.",
14
- levelName: "Invocation level: {level}", levelMode: "{level} override", levelUnconfigured: "Use deployment level", levelEffortOnly: "Reasoning effort only", levelFullRoute: "Provider, model and effort", normalLevel: "normal · default route", orchestratorLevels: "Invocation levels are unavailable for the main orchestrator.", levelsHint: "Unconfigured levels cannot be used. Effort-only keeps the configured model; a full route replaces both model and effort.",
15
- namedRole: "Enable {name}", namedRoleHint: "Required roles must stay enabled. Roles blocked by deployment settings cannot be enabled here.", availabilityUnknown: "Role availability is unknown. Refresh before changing it.", roleRequired: "Required role · {reason}", roleOptional: "Optional role", roleCeiling: "Startup: {startup}; deployment: {deployment}; captured admission: {admitted}.", roleProvenance: "Source: {source}; capture: {capture}.", roleUnavailableReason: "Availability reason: {reason}.",
16
- admittedRoles: "Role availability", bindingUnknown: "Subagent readiness is unknown. Refresh to check.", bindingState: "Subagent execution ready: {ready}; restart required: {restart}.", bindingReason: "Reason: {reason}.", sessionModelHint: "Selecting a profile keeps your current model. Use profile model changes it explicitly.", savedOnlyHint: "Save changes before selecting this profile.",
17
- centralOrigin: "Shared profile storage.", legacyOrigin: "Legacy profile storage (read-only).", explicitOrigin: "Custom profile storage.", readOnlyOrigin: "These legacy profiles are read-only.",
3
+ sessionChooseWorkspace: "Choose a workspace to start a session, then choose its configuration before sending.",
4
+ sessionSelectionBlock: "Finish choosing this session's configuration to continue typing.",
5
+ sessionCommittedRefresh: "Saved. Refresh to confirm it.",
6
+ sessionUnconfirmedRefresh: "The result is unknown. Refresh before choosing or sending again.",
7
+ technicalDetails: "Details",
8
+ diagnosticJsonc: "Fix the JSONC syntax at the marked location.", diagnosticDuplicate: "Remove the duplicate field.", diagnosticUnsafe: "Unsafe object keys are not supported; remove this field.", diagnosticUnknown: "Remove this unsupported field.", diagnosticDeprecated: "This retired field is rejected. Configure explicit role levels instead.", diagnosticType: "Use the declared field type and a value in range.", diagnosticValue: "Choose a supported value.", diagnosticRoute: "Use a complete provider/model route, or a nonempty reasoning effort.", diagnosticRequired: "This role is required by the selected workflow policy and cannot be disabled.", diagnosticCeiling: "A profile cannot enable what the deployment does not allow.",
9
+ browseZone: "Saved profiles", editZone: "Edit profile", savedRevision: "Version: {revision}", savedInventory: "Warnings and errors", futurePin: "Default version: {revision}", noEditor: "Choose a profile or create one to edit.",
10
+ warningMarker: "Warning · {code} · {field}", blockingMarker: "Error · {code} · {field}", blankLabelWarning: "The label is blank, so the ID is shown instead. The profile can still be saved and selected.", diagnosticLocation: "Line {line}, column {column}.",
11
+ savedWarnings: "Warnings in the saved version", draftWarnings: "Warnings in this draft", futureWarnings: "Warnings for new sessions", admissionWarnings: "Warnings for this session", warningProfile: "has warnings",
12
+ omitLabel: "Use the ID as the name", businessLocale: "Output language", inheritLocale: "Use the app language", unsupportedLocale: "Choose a supported language", localeHint: "A request in the conversation still decides the reply language.",
13
+ toolTopology: "Subagent tools", topologyHint: "per-role: one tool per role, plus one category tool. parameterized: pick the role or category in the tool arguments.",
14
+ levelName: "Level: {level}", levelMode: "{level} override", levelUnconfigured: "Use the deployment level", levelEffortOnly: "Reasoning effort only", levelFullRoute: "Provider, model and effort", normalLevel: "normal · default route", orchestratorLevels: "The orchestrator has no invocation levels.", levelsHint: "Only configured levels can be used. Reasoning effort only keeps the configured model; a full route replaces model and effort.",
15
+ namedRole: "Enable {name}", namedRoleHint: "Required roles stay enabled. Roles disabled by the deployment cannot be enabled here.", availabilityUnknown: "Role availability is unknown. Refresh before changing it.", roleRequired: "Required · {reason}", roleOptional: "Optional", roleCeiling: "Startup: {startup}; deployment: {deployment}; current: {admitted}.", roleProvenance: "Source: {source}; capture: {capture}.", roleUnavailableReason: "Reason: {reason}.",
16
+ admittedRoles: "Role availability", bindingUnknown: "Subagent readiness is unknown. Refresh to check.", bindingState: "Subagents ready: {ready}; restart needed: {restart}.", bindingReason: "Reason: {reason}.", sessionModelHint: "Choosing a profile keeps the current model. Use profile model switches it.", savedOnlyHint: "Save before choosing this profile.",
17
+ centralOrigin: "Shared storage.", legacyOrigin: "Old read-only storage.", explicitOrigin: "Custom storage.", readOnlyOrigin: "These older profiles are read-only.",
18
18
  headerCompactProfiles: "Profiles · keep model", headerCompactRefresh: "Refresh", headerNoSession: "Select a session to make changes.",
19
- sessionNewRequired: "Start a new session to change its profile. You can still save profiles and set the new-session default.",
19
+ sessionNewRequired: "Start a new session to change its profile. You can still save profiles and set the default for new sessions.",
20
20
  sessionModuleOff: "Deepwork is unavailable in this session.",
21
21
  headerModeEnable: "Enable Deepwork", headerModeDisable: "Disable Deepwork", headerModePreset: "Deepwork · DW preset", headerModeUnavailable: "Deepwork unavailable", headerModeOn: "Deepwork enabled.", headerModeOff: "Deepwork disabled.", headerUseCurrentModel: "Use profile model",
22
- title: "Deepwork Profiles", description: "Save configurations and choose a default for new sessions.",
23
- newSessions: "Choose a saved profile for new sessions. Existing sessions stay unchanged.",
24
- editorSelect: "Profile to edit", choose: "Choose a profile", newDraft: "New unsaved profile", new: "New profile",
25
- profileId: "Profile ID", idHint: "1–64 lowercase letters, digits, hyphens or underscores. Cannot be changed after saving.",
26
- configuration: "Configuration (JSONC)", configurationHint: "Use version: 1, the ID shown above, and settings. An optional label sets the display name.",
27
- structuralHint: "Permissions, accounts and plugins are managed in application settings. Never paste passwords or keys.",
28
- save: "Save", saving: "Saving…", apply: "Set as new-session default", applying: "Setting default…", reset: "Use default configuration", resetting: "Restoring default…",
29
- refresh: "Refresh profiles", refreshing: "Refreshing profiles…", reload: "Reload saved profile", loading: "Loading profiles…", reading: "Reading profile…",
30
- empty: "No saved profiles. Create one to get started.",
22
+ title: "Deepwork Profiles", description: "Save configurations and choose the default for new sessions.",
23
+ newSessions: "Choose the configuration new sessions use. Existing sessions stay unchanged.",
24
+ editorSelect: "Profile", choose: "Choose a profile", newDraft: "New unsaved profile", new: "New profile",
25
+ profileId: "Profile ID", idHint: "1–64 lowercase letters, digits, hyphens or underscores. It cannot be changed after saving.",
26
+ configuration: "Configuration (JSONC)", configurationHint: "Use version: 1, the ID above, and settings. An optional label sets the name.",
27
+ structuralHint: "Permissions, accounts and plugins are managed in app settings.",
28
+ save: "Save", saving: "Saving…", apply: "Set as default for new sessions", applying: "Setting default…", reset: "Use default configuration", resetting: "Restoring default…",
29
+ refresh: "Refresh", refreshing: "Refreshing…", reload: "Reload saved version", loading: "Loading…", reading: "Reading…",
30
+ empty: "No saved profiles yet. Create one to start.",
31
31
  baseline: "Default configuration", appliedProfile: "{id}",
32
- appliedInvalid: "Default selection is unconfirmed. Resolve the error below and refresh before changing it. Existing sessions stay unchanged.",
33
- selectionConflict: "The default changed elsewhere. This Host still uses the selection shown above. Select a saved profile or use default configuration to update it. Restarting adopts the stored selection.",
34
- dirty: "Unsaved changes. Save or discard before selecting this profile.", savedNotApplied: "Saved; this version is not the new-session default.", savedApplied: "Saved; this version is the new-session default.",
35
- versionObserved: "Available", versionAbsent: "Not saved", versionUnknown: "Unknown", savedRelationshipUnknown: "Saved; refresh to check the new-session default.", savedRefreshRequired: "Saved. Reload before editing or selecting again.",
36
- saved: "Saved {id}.", applied: "New sessions will use {id}. Existing sessions stay unchanged.", resetDone: "New sessions will use default configuration. Existing sessions stay unchanged.",
37
- discardPrompt: "Discard the unsaved draft before changing the editor?", discard: "Discard changes", cancel: "Cancel",
38
- 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.",
39
- validation: "This profile is not valid. Correct the field below; your draft is unchanged.",
40
- io: "Could not save. Your draft is kept. Check configuration storage access and retry.",
41
- unavailable: "Configuration service unavailable. Your draft is kept. Reconnect and refresh.",
42
- transport: "Connection interrupted; the result is unconfirmed. Your draft is kept. Refresh before retrying.",
43
- invalidProfile: "Unavailable profile: {id}", details: "Error details", retry: "Resolve the issue shown, refresh and retry.",
44
- globalScope: "New-session default configuration", sessionScope: "Current-session configuration", sessionSelect: "Current-session configuration",
45
- globalActionHint: "Set as future default selects only the saved revision for future sessions. It does not apply to the current session.",
46
- headerProfile: "Profile", headerProfileLabel: "Current-session configuration", headerCaptured: "Current configuration · profile unknown", headerSavedUnavailable: "Saved profile unavailable", headerCurrentProfile: "Current profile: {profile}", headerRefresh: "Refresh profiles and session state", headerUseModelAction: "Use profile model: {profile}",
47
- headerLoading: "Loading profile…", headerApplying: "Applying profile…", headerApplied: "Profile applied.", headerBusy: "Session is busy.", headerUnavailable: "Profile unavailable.", headerDraft: "Save or discard the draft in Settings.", headerConflict: "The session configuration changed elsewhere. Refresh before retrying.", headerRefused: "Profile change unconfirmed. Check Settings.",
48
- headerKeepModelGroup: "Switch profile — keep current model", headerUseModelGroup: "Switch and use profile model", headerModelDefaultHint: "Normal switching preserves the current model. Explicit switch-and-use-model also saves the native model default, like the Models tab.",
49
- headerNoProfileModel: "No model is set for this configuration.", headerModelUnconfirmed: "Model change unconfirmed. Check model settings.", headerAppliedWithModel: "Configuration and model applied.",
50
- headerModelChoiceChanged: "Your newer model selection was kept.",
51
- headerActionUnavailable: "This action is unavailable. Refresh to check again.",
52
- headerActivationRefused: "Profile activation was refused. Check its configuration and native model catalog.", headerSelectionRefused: "The profile change could not be confirmed.", headerIssueCode: "Reason: {code}.", headerIssueField: "Configuration field: {field}.", headerRetryHint: "Refresh profiles and current-session state, resolve the indicated issue in Settings or native Models, then retry when the session is idle.",
53
- headerMaintenanceRefused: "Another session operation is in progress. Try again shortly.", headerBusyRefused: "The session is running. Try again when it finishes.", headerCancelledRefused: "Operation cancelled. Refresh to confirm the current configuration.", headerUnavailableRefused: "Cannot read the session configuration. Reconnect and refresh.", headerWaitRetryHint: "Refresh and retry when the session is ready.",
32
+ appliedInvalid: "The default selection is unconfirmed. Fix the error below and refresh. Existing sessions stay unchanged.",
33
+ selectionConflict: "The default changed elsewhere. This Host still uses the selection above. Choose a profile or the default configuration to update it; restarting adopts the stored selection.",
34
+ dirty: "Unsaved changes. Save or discard them before choosing this profile.", savedNotApplied: "Saved; not the default for new sessions.", savedApplied: "Saved; this is the default for new sessions.",
35
+ versionObserved: "Available", versionAbsent: "Not saved", versionUnknown: "Unknown", savedRelationshipUnknown: "Saved; refresh to check whether it is the default.", savedRefreshRequired: "Saved. Reload before editing or choosing again.",
36
+ saved: "Saved {id}.", applied: "New sessions will use {id}. Existing sessions stay unchanged.", resetDone: "New sessions will use the default configuration. Existing sessions stay unchanged.",
37
+ discardPrompt: "Discard the unsaved draft?", discard: "Discard", cancel: "Cancel",
38
+ conflict: "The saved file or selection changed elsewhere. Your draft was kept. Refresh, then reload the profile or review your draft before retrying.",
39
+ validation: "This profile is not valid. Fix the field below; your draft is unchanged.",
40
+ io: "Could not save. Your draft was kept. Check access to the profile storage and retry.",
41
+ unavailable: "The configuration service is unavailable. Your draft was kept. Reconnect and refresh.",
42
+ transport: "The connection was interrupted, so the result is unknown. Your draft was kept. Refresh before retrying.",
43
+ invalidProfile: "Unavailable profile: {id}", details: "Details", retry: "Fix the issue shown, refresh, then retry.",
44
+ globalScope: "Default for new sessions", sessionScope: "This session's configuration", sessionSelect: "This session's configuration",
45
+ globalActionHint: "Setting the default affects new sessions only.",
46
+ headerProfile: "Profile", headerProfileLabel: "This session's configuration", headerCaptured: "Current configuration · unknown profile", headerSavedUnavailable: "Saved profile unavailable", headerCurrentProfile: "Current profile: {profile}", headerRefresh: "Refresh profiles and session state", headerUseModelAction: "Use profile model: {profile}",
47
+ headerLoading: "Loading profile…", headerApplying: "Applying profile…", headerApplied: "Profile applied.", headerBusy: "The session is busy.", headerUnavailable: "Profile unavailable.", headerDraft: "Save or discard the draft in Settings.", headerConflict: "The session configuration changed elsewhere. Refresh before retrying.", headerRefused: "The profile change is unconfirmed. Check Settings.",
48
+ headerKeepModelGroup: "Switch profile — keep current model", headerUseModelGroup: "Switch and use profile model", headerModelDefaultHint: "Switching keeps the current model. Switch and use profile model also updates the default model, like the Models tab.",
49
+ headerNoProfileModel: "This profile sets no model.", headerModelUnconfirmed: "The model change is unconfirmed. Check model settings.", headerAppliedWithModel: "Configuration and model applied.",
50
+ headerModelChoiceChanged: "Your newer model choice was kept.",
51
+ headerActionUnavailable: "Unavailable right now. Refresh to check again.",
52
+ headerActivationRefused: "The profile could not be applied. Check its configuration and the model catalog.", headerSelectionRefused: "The profile change could not be confirmed.", headerIssueCode: "Reason: {code}.", headerIssueField: "Field: {field}.", headerRetryHint: "Refresh, fix the issue in Settings or Models, then retry while the session is idle.",
53
+ headerMaintenanceRefused: "Another session operation is in progress. Try again shortly.", headerBusyRefused: "The session is running. Try again when it finishes.", headerCancelledRefused: "Cancelled. Refresh to confirm the current configuration.", headerUnavailableRefused: "Cannot read the session configuration. Reconnect and refresh.", headerWaitRetryHint: "Refresh and retry when the session is ready.",
54
54
  noSession: "Select a session to change its configuration.",
55
- sessionUnavailable: "Cannot confirm the current session. Refresh before retrying.",
56
- sessionBusy: "Cannot switch: {reason}. Wait for the session to be idle, then retry.",
55
+ sessionUnavailable: "The current session cannot be confirmed. Refresh before retrying.",
56
+ sessionBusy: "Cannot switch: {reason}. Wait until the session is idle, then retry.",
57
57
  sessionState: "{profile}", sessionBaseline: "Default configuration",
58
58
  sessionGlobalCaptured: "Current configuration (profile unknown)",
59
- sessionAdmittedProfile: "{id}", sessionFutureDefault: "New-session default configuration: {profile}.",
60
- sessionConflict: "The session configuration changed elsewhere. Your draft is kept. Refresh before retrying.",
59
+ sessionAdmittedProfile: "{id}", sessionFutureDefault: "Default for new sessions: {profile}.",
60
+ sessionConflict: "The session configuration changed elsewhere. Your draft was kept. Refresh before retrying.",
61
61
  sessionApply: "Use this profile", sessionApplying: "Applying…", sessionReset: "Use default configuration", sessionResetting: "Restoring default…", sessionRefresh: "Refresh session state",
62
- sessionApplied: "Applied to this session only. New-session default and existing children stay unchanged.", sessionResetDone: "This session uses default configuration. New-session default stays unchanged.",
63
- sessionAppliedWithModel: "Applied this session profile and explicitly selected its native main model. Native model-default persistence follows the Models tab; the global profile default was not changed.",
64
- sessionDirty: "Save or explicitly discard the editor draft before applying a current-session choice.",
65
- roleState: "Admitted route {route}; strategy {strategy}; retries {retries}; rate-limit failures {failures}; switches {switches}; total delay {delay} ms.",
66
- catalogTitle: "Model catalog", catalogHint: "You can enter models that are not listed.",
67
- catalogUnavailable: "The native catalog is unavailable. Manual provider/model/effort fields and advanced JSONC remain available.", catalogRefresh: "Refresh model catalog", catalogRefreshing: "Refreshing model catalog…", catalogFailure: "Provider catalog unavailable: {name} ({id}).",
68
- profileLabel: "Profile display label", defaultActive: "Default Deepwork mode", activeHint: "This default does not erase an explicit saved session mode.", enabled: "Enabled", disabled: "Disabled", inherit: "Inherit deployment baseline",
69
- profileDefaults: "Configuration defaults", roleSelect: "Agent role to edit", rolesUnavailable: "Role list unavailable. Refresh or use the advanced editor.", roleEnabled: "Enabled in application settings", roleDisabled: "Disabled in application settings",
62
+ sessionApplied: "Applied to this session only. The default for new sessions and existing children stay unchanged.", sessionResetDone: "This session uses the default configuration. The default for new sessions stays unchanged.",
63
+ sessionAppliedWithModel: "Applied this profile and selected its model. The global profile default was not changed.",
64
+ sessionDirty: "Save or discard the draft before choosing a configuration for this session.",
65
+ roleState: "Route {route}; strategy {strategy}; retries {retries}; rate-limit failures {failures}; switches {switches}; total delay {delay} ms.",
66
+ catalogTitle: "Model catalog", catalogHint: "Models that are not listed can be typed in.",
67
+ catalogUnavailable: "The model catalog is unavailable. Provider, model and effort fields still work.", catalogRefresh: "Refresh model catalog", catalogRefreshing: "Refreshing model catalog…", catalogFailure: "Provider catalog unavailable: {name} ({id}).",
68
+ profileLabel: "Profile name", defaultActive: "Default Deepwork mode", activeHint: "A mode chosen in the session wins.", enabled: "Enabled", disabled: "Disabled", inherit: "Use deployment baseline",
69
+ profileDefaults: "Defaults", roleSelect: "Role", rolesUnavailable: "The role list is unavailable. Refresh or use the advanced editor.", roleEnabled: "Enabled in app settings", roleDisabled: "Disabled in app settings",
70
70
  strategy: "{name} strategy", inheritStrategy: "Inherit ({value})", startupLock: "Keep the starting route", rateFallback: "Switch after repeated rate limits",
71
- strategyHint: "Model switches require a rate-limit failure with no output. Authentication and quota errors stop the attempt. Leave numbers blank to inherit; zero is explicit.",
72
- retryField: "{name} {field}", inheritNumber: "Inherit {value}", retryBounds: "Integer {min}–{max}; inherited value {value}.", unknownDefault: "unavailable",
73
- retryCount: "retry count", initialDelay: "initial delay (ms)", maxDelay: "maximum delay (ms)", totalWait: "total wait budget (ms)", switchThreshold: "rate-limit failures before switch", maxSwitches: "maximum switches",
74
- primaryMode: "{name} primary route", inheritRoute: "Inherit native/deployment route", configuredRoute: "Configure primary route", primaryName: "{name} primary",
75
- fallbackMode: "{name} fallback chain", inheritChain: "Inherit deployment fallback chain", configuredChain: "Explicit ordered fallback chain", emptyChain: "Explicitly empty chain: no configured fallback routes.", fallbackName: "{name} fallback {index}", addFallback: "Add fallback for {name}", removeFallback: "Remove {name}", moveUp: "Move up {name}", moveDown: "Move down {name}",
76
- routeProvider: "{name} provider", routeModel: "{name} model", routeEffort: "{name} exact effort", manualProvider: "{name} manual provider", manualModel: "{name} manual model", manualEffort: "{name} manual exact effort", manual: "Enter manual identifier", manualValue: "Manual / unlisted: {value}", unset: "not set", effortDefault: "Native default (omit exact effort)", effortChangeHint: "Changing a provider/model explicitly clears that route's exact effort. Catalog refresh preserves all configured values; choose an exact effort again if required.",
77
- advanced: "Advanced JSONC", rawInvalid: "Correct the invalid draft in Advanced JSONC to use these controls. Your draft is kept.", invalidNumber: "Enter a whole number within the limits before saving or changing roles.",
71
+ strategyHint: "Models switch only on a rate-limit failure with no output. Authentication and quota errors stop the attempt. Leave numbers blank to inherit; zero is an explicit value.",
72
+ retryField: "{name} {field}", inheritNumber: "Inherit {value}", retryBounds: "Integer {min}–{max}; inherited {value}.", unknownDefault: "unavailable",
73
+ retryCount: "retry count", initialDelay: "initial delay (ms)", maxDelay: "maximum delay (ms)", totalWait: "total wait budget (ms)", switchThreshold: "rate-limit failures before switching", maxSwitches: "maximum switches",
74
+ primaryMode: "{name} primary route", inheritRoute: "Inherit the deployment route", configuredRoute: "Configure the primary route", primaryName: "{name} primary",
75
+ fallbackMode: "{name} fallback chain", inheritChain: "Inherit the deployment chain", configuredChain: "Explicit ordered chain", emptyChain: "Empty chain: no fallback routes.", fallbackName: "{name} fallback {index}", addFallback: "Add fallback for {name}", removeFallback: "Remove {name}", moveUp: "Move up {name}", moveDown: "Move down {name}",
76
+ routeProvider: "{name} provider", routeModel: "{name} model", routeEffort: "{name} effort", manualProvider: "{name} provider (typed)", manualModel: "{name} model (typed)", manualEffort: "{name} effort (typed)", manual: "Type an identifier", manualValue: "Not listed: {value}", unset: "not set", effortDefault: "Default (no explicit effort)", effortChangeHint: "Changing the provider or model clears this route's reasoning effort.",
77
+ advanced: "Advanced JSONC", rawInvalid: "Fix the invalid draft in Advanced JSONC to use these controls. Your draft was kept.", invalidNumber: "Enter a whole number within the limits.",
78
78
  };
79
79
  export const zh = {
80
- sessionChooseWorkspace: "请先选择工作区创建空白会话,再选择本次配置后发送。",
81
- sessionSelectionBlock: "正在确认 DSMM 本次会话配置。请等待选择完成,或刷新会话状态。",
82
- sessionCommittedRefresh: "本次会话配置已保存,请刷新确认,不要再次应用。",
83
- sessionUnconfirmedRefresh: "本次会话配置结果待确认。请刷新状态后再选择或发送,不要重试更改。",
84
- technicalDetails: "技术详情",
85
- diagnosticJsonc: "请修正所示位置的 JSONC 语法。", diagnosticDuplicate: "请删除此位置的重复字段。", diagnosticUnsafe: "不支持不安全对象键,请删除此字段。", diagnosticUnknown: "请删除不支持的字段。私有及安装配置应放在原生部署设置中。", diagnosticDeprecated: "此已退休字段被拒绝,请改用明确的角色调用等级,不自动迁移。", diagnosticType: "请使用声明的字段类型和有界数值。", diagnosticValue: "请选择明确支持的值。允许的输出语言见结构化语言字段。", diagnosticRoute: "请提供完整提供商与模型路由,或非空精确强度覆盖。", diagnosticRequired: "所选 Deepwork 策略要求此角色,不可禁用。", diagnosticCeiling: "具名配置档不能启用超出已捕获启动或部署上限的能力。",
86
- browseZone: "已保存配置", editZone: "编辑配置", savedRevision: "保存版本:{revision}", savedInventory: "配置警告与错误", futurePin: "默认选择版本:{revision}", noEditor: "选择配置或新建配置后编辑。",
87
- warningMarker: "警告 · 不阻断 · {code} · {field}", blockingMarker: "已阻断 · {code} · {field}", blankLabelWarning: "显示名称为空,使用配置档 ID 显示。原文仍可保存和选择。", diagnosticLocation: "JSONC 第 {line} 行,第 {column} 列。",
88
- savedWarnings: "已保存配置的警告", draftWarnings: "草稿警告", futureWarnings: "新会话默认配置的警告", admissionWarnings: "本次会话的警告", warningProfile: "警告(不阻断)",
89
- omitLabel: "使用 ID 作为显示名称", businessLocale: "默认输出语言", inheritLocale: "使用部署或原生语言", unsupportedLocale: "语言不受支持,请选择允许值", localeHint: "用户明确要求的语言优先,界面语言不变。",
90
- toolTopology: "子代理工具", topologyHint: "per-role:每个角色一个工具,另有类别工具。parameterized:通过工具参数选择角色或类别。",
91
- levelName: "调用等级:{level}", levelMode: "{level} 覆盖", levelUnconfigured: "使用部署等级", levelEffortOnly: "仅推理强度", levelFullRoute: "提供商、模型与强度", normalLevel: "normal · 默认路由", orchestratorLevels: "主 orchestrator 不支持调用等级。", levelsHint: "未配置的等级不可使用。仅强度覆盖保留配置中的模型;完整路由同时替换模型和强度。",
92
- namedRole: "启用 {name}", namedRoleHint: "必需角色必须保持启用;部署设置禁止的角色无法在此启用。", availabilityUnknown: "角色可用性未知,请刷新后再更改。", roleRequired: "必需角色 · {reason}", roleOptional: "可选角色", roleCeiling: "启动:{startup};部署:{deployment};捕获准入:{admitted}。", roleProvenance: "来源:{source};捕获:{capture}。", roleUnavailableReason: "可用性原因:{reason}。",
93
- admittedRoles: "角色可用性", bindingUnknown: "子代理就绪状态未知,请刷新确认。", bindingState: "子代理执行就绪:{ready};需重启:{restart}。", bindingReason: "原因:{reason}。", sessionModelHint: "选择配置时保留当前模型;「使用配置中的模型」会明确切换模型。", savedOnlyHint: "选择此配置前请保存更改。",
94
- centralOrigin: "共享配置存储。", legacyOrigin: "旧配置存储(只读)。", explicitOrigin: "自定义配置存储。", readOnlyOrigin: "这些旧配置只读。",
95
- headerCompactProfiles: "配置档 · 保留模型", headerCompactRefresh: "刷新", headerNoSession: "选择会话后可更改。",
96
- sessionNewRequired: "请新建会话后选择配置。仍可保存配置或设置新会话默认配置。",
80
+ sessionChooseWorkspace: "请先选择工作区新建会话,发送前再选择本次会话的配置。",
81
+ sessionSelectionBlock: "请先完成本次会话的配置选择,然后即可继续输入。",
82
+ sessionCommittedRefresh: "已保存,请刷新确认。",
83
+ sessionUnconfirmedRefresh: "结果未知,请刷新后再选择或发送。",
84
+ technicalDetails: "详情",
85
+ diagnosticJsonc: "请修正标记位置的 JSONC 语法。", diagnosticDuplicate: "请删除重复字段。", diagnosticUnsafe: "不支持不安全的对象键,请删除该字段。", diagnosticUnknown: "请删除不支持的字段。", diagnosticDeprecated: "该字段已停用,请改用明确的角色等级。", diagnosticType: "请使用声明的字段类型和范围内的值。", diagnosticValue: "请选择支持的值。", diagnosticRoute: "请填写完整的提供商与模型,或非空的推理强度。", diagnosticRequired: "所选工作流策略要求该角色,不能禁用。", diagnosticCeiling: "配置不能启用部署未允许的能力。",
86
+ browseZone: "已保存配置", editZone: "编辑配置", savedRevision: "版本:{revision}", savedInventory: "警告与错误", futurePin: "默认版本:{revision}", noEditor: "选择或新建配置后进行编辑。",
87
+ warningMarker: "警告 · {code} · {field}", blockingMarker: "错误 · {code} · {field}", blankLabelWarning: "名称为空,将显示 ID。该配置仍可保存和选择。", diagnosticLocation: "第 {line} 行,第 {column} 列。",
88
+ savedWarnings: "已保存版本的警告", draftWarnings: "此草稿的警告", futureWarnings: "新会话的警告", admissionWarnings: "本次会话的警告", warningProfile: "有警告",
89
+ omitLabel: "使用 ID 作为名称", businessLocale: "输出语言", inheritLocale: "使用界面语言", unsupportedLocale: "请选择支持的语言", localeHint: "对话中的明确要求仍然决定回复语言。",
90
+ toolTopology: "子代理工具", topologyHint: "per-role:每个角色一个工具,另有一个类别工具。parameterized:在工具参数中选择角色或类别。",
91
+ levelName: "等级:{level}", levelMode: "{level} 覆盖", levelUnconfigured: "使用部署等级", levelEffortOnly: "仅推理强度", levelFullRoute: "提供商、模型与强度", normalLevel: "normal · 默认路由", orchestratorLevels: "orchestrator 没有调用等级。", levelsHint: "只有已配置的等级可用。仅强度会保留配置中的模型;完整路由会同时替换模型和强度。",
92
+ namedRole: "启用 {name}", namedRoleHint: "必需角色保持启用;部署已禁用的角色无法在此启用。", availabilityUnknown: "角色可用性未知,请刷新后再改。", roleRequired: "必需 · {reason}", roleOptional: "可选", roleCeiling: "启动:{startup};部署:{deployment};当前:{admitted}。", roleProvenance: "来源:{source};捕获:{capture}。", roleUnavailableReason: "原因:{reason}。",
93
+ admittedRoles: "角色可用性", bindingUnknown: "子代理就绪状态未知,请刷新确认。", bindingState: "子代理就绪:{ready};需重启:{restart}。", bindingReason: "原因:{reason}。", sessionModelHint: "选择配置会保留当前模型;「使用配置中的模型」才会切换。", savedOnlyHint: "请先保存再选择此配置。",
94
+ centralOrigin: "共享存储。", legacyOrigin: "旧的只读存储。", explicitOrigin: "自定义存储。", readOnlyOrigin: "这些旧配置为只读。",
95
+ headerCompactProfiles: "配置 · 保留模型", headerCompactRefresh: "刷新", headerNoSession: "选择会话后可更改。",
96
+ sessionNewRequired: "请新建会话后更改其配置。仍可保存配置或设置新会话的默认配置。",
97
97
  sessionModuleOff: "此会话无法使用 Deepwork。",
98
98
  headerModeEnable: "启用 Deepwork", headerModeDisable: "关闭 Deepwork", headerModePreset: "Deepwork · DW 预设", headerModeUnavailable: "Deepwork 不可用", headerModeOn: "Deepwork 已启用。", headerModeOff: "Deepwork 已关闭。", headerUseCurrentModel: "使用配置中的模型",
99
- title: "Deepwork 配置", description: "保存配置并选择新会话的默认配置。",
100
- newSessions: "选择已保存的配置供新会话使用,已有会话不变。",
101
- editorSelect: "要编辑的配置", choose: "选择配置", newDraft: "未保存的新配置", new: "新建配置",
99
+ title: "Deepwork 配置", description: "保存配置并选择新会话使用的默认配置。",
100
+ newSessions: "选择新会话使用的配置,已有会话不变。",
101
+ editorSelect: "配置", choose: "选择配置", newDraft: "未保存的新配置", new: "新建配置",
102
102
  profileId: "配置 ID", idHint: "1–64 个小写字母、数字、连字符或下划线,保存后不可修改。",
103
- configuration: "配置内容(JSONC)", configurationHint: "使用 version: 1、与上方一致的 id,以及 settings;label 可填写显示名称。",
104
- structuralHint: "权限、账户、插件等由应用设置管理。请勿粘贴密码或密钥。",
105
- save: "保存", saving: "正在保存…", apply: "设为新会话默认配置", applying: "正在设置默认配置…", reset: "使用默认配置", resetting: "正在恢复默认配置…",
106
- refresh: "刷新配置", refreshing: "正在刷新…", reload: "重新加载已保存配置", loading: "正在加载…", reading: "正在读取…",
107
- empty: "尚无已保存的配置,请先新建配置。",
103
+ configuration: "配置内容(JSONC)", configurationHint: "使用 version: 1、与上方一致的 ID 和 settings;label 可选,用于显示名称。",
104
+ structuralHint: "权限、账户和插件在应用设置中管理。",
105
+ save: "保存", saving: "正在保存…", apply: "设为新会话默认配置", applying: "正在设置…", reset: "使用默认配置", resetting: "正在恢复…",
106
+ refresh: "刷新", refreshing: "正在刷新…", reload: "重新加载已保存版本", loading: "加载中…", reading: "读取中…",
107
+ empty: "尚无已保存的配置,请先新建。",
108
108
  baseline: "默认配置", appliedProfile: "{id}",
109
- appliedInvalid: "默认选择未确认,请解决下方错误并刷新后再更改。已有会话不变。",
110
- selectionConflict: "默认选择已在其他位置改变,此宿主仍使用上方选择。请选择已保存的配置或使用默认配置进行更新;重启将采用存储中的选择。",
111
- dirty: "有未保存的更改,选择此配置前请保存或丢弃。", savedNotApplied: "已保存,此版本尚未设为新会话默认配置。", savedApplied: "已保存,此版本已设为新会话默认配置。",
112
- versionObserved: "可用", versionAbsent: "未保存", versionUnknown: "未知", savedRelationshipUnknown: "已保存,请刷新确认新会话默认配置。", savedRefreshRequired: "已保存,请重新加载后再编辑或选择。",
109
+ appliedInvalid: "默认选择未确认,请解决下方错误并刷新。已有会话不变。",
110
+ selectionConflict: "默认配置已在别处改变,此宿主仍使用上方选择。请选择配置或默认配置来更新;重启后会采用已保存的选择。",
111
+ dirty: "有未保存的更改,请先保存或丢弃再选择此配置。", savedNotApplied: "已保存,但不是新会话默认配置。", savedApplied: "已保存,是新会话默认配置。",
112
+ versionObserved: "可用", versionAbsent: "未保存", versionUnknown: "未知", savedRelationshipUnknown: "已保存,请刷新确认是否为默认配置。", savedRefreshRequired: "已保存,请重新加载后再编辑或选择。",
113
113
  saved: "已保存 {id}。", applied: "新会话将使用 {id},已有会话不变。", resetDone: "新会话将使用默认配置,已有会话不变。",
114
- discardPrompt: "切换编辑器之前,是否丢弃未保存的草稿?", discard: "丢弃更改", cancel: "取消",
115
- conflict: "已保存文件或选择已被其他操作修改。草稿和原选择已保留。请刷新配置档,然后重新加载已保存配置档或检查草稿后重试。",
116
- validation: "此配置档无效。请修正下方字段;草稿未改变。",
117
- io: "无法保存。草稿已保留,请检查配置存储权限后重试。",
118
- unavailable: "配置服务暂不可用。草稿已保留,请重新连接后刷新。",
119
- transport: "连接中断,操作结果待确认。草稿已保留,请先刷新状态。",
120
- invalidProfile: "配置不可用:{id}", details: "错误详情", retry: "请处理所示问题,刷新后重试。",
114
+ discardPrompt: "是否丢弃未保存的草稿?", discard: "丢弃", cancel: "取消",
115
+ conflict: "已保存文件或选择在别处改变,草稿已保留。请刷新后重新加载或检查草稿再重试。",
116
+ validation: "此配置无效,请修正下方字段;草稿未改变。",
117
+ io: "无法保存,草稿已保留。请检查配置存储权限后重试。",
118
+ unavailable: "配置服务暂不可用,草稿已保留。请重新连接后刷新。",
119
+ transport: "连接中断,结果未知,草稿已保留。请刷新后再试。",
120
+ invalidProfile: "配置不可用:{id}", details: "详情", retry: "请解决所示问题,刷新后重试。",
121
121
  globalScope: "新会话默认配置", sessionScope: "本次会话配置", sessionSelect: "本次会话配置",
122
- globalActionHint: "「设为未来默认」只为未来会话选择已保存修订,不应用到当前会话。",
123
- headerProfile: "配置", headerProfileLabel: "本次会话配置", headerCaptured: "当前配置 · 来源未知", headerSavedUnavailable: "已保存的配置不可用", headerCurrentProfile: "本次配置:{profile}", headerRefresh: "刷新配置和会话状态", headerUseModelAction: "使用配置中的模型:{profile}",
124
- headerLoading: "加载配置…", headerApplying: "应用配置…", headerApplied: "配置已应用。", headerBusy: "会话忙碌。", headerUnavailable: "配置不可用。", headerDraft: "请在设置中保存或丢弃草稿。", headerConflict: "会话配置已在其他位置改变,请刷新后重试。", headerRefused: "配置更改未确认,请检查设置。",
125
- headerKeepModelGroup: "切换配置,保留当前模型", headerUseModelGroup: "切换配置和模型", headerModelDefaultHint: "使用配置中的模型也会更新默认模型。", headerNoProfileModel: "此配置未指定模型。", headerModelUnconfirmed: "模型更改尚未确认,请检查模型设置。", headerAppliedWithModel: "配置和模型已应用。",
122
+ globalActionHint: "设为默认只影响新会话。",
123
+ headerProfile: "配置", headerProfileLabel: "本次会话配置", headerCaptured: "当前配置 · 来源未知", headerSavedUnavailable: "已保存的配置不可用", headerCurrentProfile: "当前配置:{profile}", headerRefresh: "刷新配置和会话状态", headerUseModelAction: "使用配置中的模型:{profile}",
124
+ headerLoading: "正在加载配置…", headerApplying: "正在应用配置…", headerApplied: "配置已应用。", headerBusy: "会话忙碌。", headerUnavailable: "配置不可用。", headerDraft: "请在设置中保存或丢弃草稿。", headerConflict: "会话配置已在别处改变,请刷新后重试。", headerRefused: "配置更改未确认,请检查设置。",
125
+ headerKeepModelGroup: "切换配置,保留当前模型", headerUseModelGroup: "切换配置和模型", headerModelDefaultHint: "普通切换保留当前模型;「切换配置和模型」也会像模型页一样更新默认模型。",
126
+ headerNoProfileModel: "此配置未设置模型。", headerModelUnconfirmed: "模型更改未确认,请检查模型设置。", headerAppliedWithModel: "配置和模型已应用。",
126
127
  headerModelChoiceChanged: "已保留你最新选择的模型。",
127
128
  headerActionUnavailable: "此操作暂不可用,请刷新确认。",
128
- headerActivationRefused: "配置档启用被拒绝,请检查其配置和原生模型目录。", headerSelectionRefused: "无法确认配置档更改。", headerIssueCode: "原因:{code}。", headerIssueField: "配置字段:{field}。", headerRetryHint: "请刷新配置档和当前会话状态,在设置或原生模型页解决所示问题,然后在会话空闲时重试。",
129
- headerMaintenanceRefused: "会话正在处理其他操作,请稍后重试。", headerBusyRefused: "会话正在运行,请结束后重试。", headerCancelledRefused: "操作已取消,请刷新以确认当前配置。", headerUnavailableRefused: "无法读取会话配置,请重新连接后刷新。", headerWaitRetryHint: "请稍后刷新并重试。",
130
- noSession: "选择会话后可更改配置。", sessionUnavailable: "无法确认当前会话,请刷新后重试。", sessionBusy: "暂不可切换:{reason}。请等待会话空闲后重试。", sessionState: "{profile}", sessionBaseline: "默认配置",
129
+ headerActivationRefused: "配置无法应用,请检查其配置和模型目录。", headerSelectionRefused: "无法确认配置更改。", headerIssueCode: "原因:{code}。", headerIssueField: "字段:{field}。", headerRetryHint: "请刷新,在设置或模型页解决问题,然后在会话空闲时重试。",
130
+ headerMaintenanceRefused: "会话正在处理其他操作,请稍后重试。", headerBusyRefused: "会话正在运行,请结束后重试。", headerCancelledRefused: "已取消,请刷新确认当前配置。", headerUnavailableRefused: "无法读取会话配置,请重新连接后刷新。", headerWaitRetryHint: "请稍后刷新并重试。",
131
+ noSession: "选择会话后可更改配置。",
132
+ sessionUnavailable: "无法确认当前会话,请刷新后重试。",
133
+ sessionBusy: "暂不可切换:{reason}。请等待会话空闲后重试。",
134
+ sessionState: "{profile}", sessionBaseline: "默认配置",
131
135
  sessionGlobalCaptured: "当前配置(来源未知)",
132
136
  sessionAdmittedProfile: "{id}", sessionFutureDefault: "新会话默认配置:{profile}。",
133
- sessionConflict: "会话配置已在其他位置改变,草稿已保留。请刷新后重试。",
134
- sessionApply: "使用此配置", sessionApplying: "正在应用…", sessionReset: "使用默认配置", sessionResetting: "正在恢复默认配置…", sessionRefresh: "刷新会话状态", sessionApplied: "已应用到本次会话,新会话默认配置和已有子会话不变。", sessionResetDone: "本次会话已使用默认配置,新会话默认配置不变。", sessionDirty: "选择本次会话配置前,请保存或丢弃草稿。",
135
- sessionAppliedWithModel: "已应用此会话配置档,并明确选择其原生主模型。模型默认值像模型页一样保存;全局配置档默认值未改变。",
136
- roleState: "准入路由 {route};策略 {strategy};重试 {retries};限流失败 {failures};切换 {switches};累计延迟 {delay} 毫秒。",
137
- catalogTitle: "模型目录", catalogHint: "可手动输入目录中未列出的模型。", catalogUnavailable: "模型目录不可用,可手动输入提供商、模型和推理强度。", catalogRefresh: "刷新模型目录", catalogRefreshing: "正在刷新模型目录…", catalogFailure: "提供商目录不可用:{name}({id})。",
138
- profileLabel: "配置名称", defaultActive: "默认 Deepwork 模式", activeHint: "会话中明确选择的模式优先。", enabled: "启用", disabled: "禁用", inherit: "使用上层设置", profileDefaults: "配置默认值", roleSelect: "要编辑的角色", rolesUnavailable: "角色列表暂不可用,请刷新或使用高级编辑器。", roleEnabled: "应用设置已启用", roleDisabled: "应用设置已禁用",
139
- strategy: "{name} 策略", inheritStrategy: "继承({value})", startupLock: "保留起始路由", rateFallback: "多次限流后切换", strategyHint: "仅在限流且没有输出时切换模型;认证或配额错误会停止尝试。数字留空表示继承,零为明确值。", retryField: "{name} {field}", inheritNumber: "继承 {value}", retryBounds: "整数 {min}–{max};继承值 {value}。", unknownDefault: "不可用",
140
- retryCount: "重试次数", initialDelay: "初始延迟(毫秒)", maxDelay: "最大单次延迟(毫秒)", totalWait: "累计等待上限(毫秒)", switchThreshold: "切换前的限流失败次数", maxSwitches: "最大切换次数",
141
- primaryMode: "{name} 主路由", inheritRoute: "继承原生或部署路由", configuredRoute: "配置主路由", primaryName: "{name} 主路由", fallbackMode: "{name} 备用链", inheritChain: "继承部署备用链", configuredChain: "明确的有序备用链", emptyChain: "明确为空的备用链:没有已配置备用路由。", fallbackName: "{name} 备用 {index}", addFallback: "为 {name} 添加备用路由", removeFallback: "移除 {name}", moveUp: "上移 {name}", moveDown: "下移 {name}",
142
- routeProvider: "{name} 提供商", routeModel: "{name} 模型", routeEffort: "{name} 精确强度", manualProvider: "{name} 手动提供商", manualModel: "{name} 手动模型", manualEffort: "{name} 手动精确强度", manual: "输入手动标识", manualValue: "手动或未列出:{value}", unset: "未设置", effortDefault: "原生默认值(省略精确强度)", effortChangeHint: "更改提供商或模型会清除该路由的推理强度,需要时请重新选择。", advanced: "高级 JSONC", rawInvalid: "请在高级 JSONC 中修正草稿后使用这些控件,草稿已保留。", invalidNumber: "保存或切换角色前,请输入范围内的整数。",
137
+ sessionConflict: "会话配置已在别处改变,草稿已保留。请刷新后重试。",
138
+ sessionApply: "使用此配置", sessionApplying: "正在应用…", sessionReset: "使用默认配置", sessionResetting: "正在恢复…", sessionRefresh: "刷新会话状态",
139
+ sessionApplied: "已仅应用到本次会话,新会话默认配置和已有子会话不变。", sessionResetDone: "本次会话已使用默认配置,新会话默认配置不变。",
140
+ sessionAppliedWithModel: "已应用此配置并选择了它的模型,全局配置默认值未改变。",
141
+ sessionDirty: "选择本次会话配置前,请保存或丢弃草稿。",
142
+ roleState: "路由 {route};策略 {strategy};重试 {retries};限流失败 {failures};切换 {switches};累计延迟 {delay} 毫秒。",
143
+ catalogTitle: "模型目录", catalogHint: "未列出的模型可以手动输入。",
144
+ catalogUnavailable: "模型目录不可用,提供商、模型和强度仍可填写。", catalogRefresh: "刷新模型目录", catalogRefreshing: "正在刷新…", catalogFailure: "提供商目录不可用:{name}({id})。",
145
+ profileLabel: "配置名称", defaultActive: "默认 Deepwork 模式", activeHint: "会话中选择的模式优先。", enabled: "启用", disabled: "禁用", inherit: "使用部署基线",
146
+ profileDefaults: "默认值", roleSelect: "角色", rolesUnavailable: "角色列表不可用,请刷新或使用高级编辑器。", roleEnabled: "应用设置中已启用", roleDisabled: "应用设置中已禁用",
147
+ strategy: "{name} 策略", inheritStrategy: "继承({value})", startupLock: "保留起始路由", rateFallback: "多次限流后切换",
148
+ strategyHint: "仅在限流且没有输出时切换模型;认证或配额错误会停止尝试。留空表示继承,零是明确值。",
149
+ retryField: "{name} {field}", inheritNumber: "继承 {value}", retryBounds: "整数 {min}–{max};继承值 {value}。", unknownDefault: "不可用",
150
+ retryCount: "重试次数", initialDelay: "初始延迟(毫秒)", maxDelay: "最大单次延迟(毫秒)", totalWait: "累计等待上限(毫秒)", switchThreshold: "切换前的限流次数", maxSwitches: "最大切换次数",
151
+ primaryMode: "{name} 主路由", inheritRoute: "继承部署路由", configuredRoute: "配置主路由", primaryName: "{name} 主路由",
152
+ fallbackMode: "{name} 备用链", inheritChain: "继承部署备用链", configuredChain: "明确的有序备用链", emptyChain: "空备用链:没有备用路由。", fallbackName: "{name} 备用 {index}", addFallback: "为 {name} 添加备用", removeFallback: "移除 {name}", moveUp: "上移 {name}", moveDown: "下移 {name}",
153
+ routeProvider: "{name} 提供商", routeModel: "{name} 模型", routeEffort: "{name} 强度", manualProvider: "{name} 提供商(手动)", manualModel: "{name} 模型(手动)", manualEffort: "{name} 强度(手动)", manual: "输入标识", manualValue: "未列出:{value}", unset: "未设置", effortDefault: "默认(不指定强度)", effortChangeHint: "更改提供商或模型会清除该路由的推理强度。",
154
+ advanced: "高级 JSONC", rawInvalid: "请先在高级 JSONC 中修正草稿,再使用这些控件。草稿已保留。", invalidNumber: "请输入范围内的整数。",
143
155
  };
144
156
  export const RETRY_FIELD_LABEL_KEYS = {
145
157
  maxRetries: "retryCount", initialDelayMs: "initialDelay", maxDelayMs: "maxDelay",
@@ -14,9 +14,13 @@ export interface PermissionView {
14
14
  sessionId: string | null;
15
15
  scope: "unknown" | "root" | "child";
16
16
  connected: boolean;
17
+ /** Visible first load or explicit refresh only; background revalidation never sets it. */
17
18
  reading: boolean;
19
+ /** Silent background revalidation of an already trusted snapshot; not a busy state. */
20
+ revalidating: boolean;
18
21
  busy: "save" | null;
19
22
  rules: PermissionRulesSaveResult | null;
23
+ /** Last observed C state; only a successful clean read/save may become the mutation baseline. */
20
24
  base: PermissionRulesSaveResult["snapshot"] | null;
21
25
  draft: PermissionDraft | null;
22
26
  rulesIssue: PermissionIssue | null;
@@ -36,12 +40,16 @@ export declare class PermissionController {
36
40
  private timer?;
37
41
  private watchers;
38
42
  private disposed;
43
+ /** A successful read/save exists for the current scope fence; not mutation authority. */
44
+ private observed;
39
45
  readonly store: {
40
46
  getSnapshot: () => PermissionView;
41
47
  subscribe: (listener: () => void) => (() => void);
42
48
  };
43
49
  private publish;
44
50
  private cancel;
51
+ /** An observed snapshot exists; background work must stay invisible until it changes what is possible. */
52
+ private trusted;
45
53
  private fence;
46
54
  bindConnection(invoke: PermissionInvoker | null, generation?: unknown): void;
47
55
  bindScope(sessionId: string | null, owner: object | null, scope: PermissionView["scope"]): void;
@@ -51,9 +59,14 @@ export declare class PermissionController {
51
59
  private schedule;
52
60
  private issue;
53
61
  private synchronized;
62
+ /** A background request in flight never disables editing or saving; only its own save/authority does. */
54
63
  canEdit(generation: number): boolean;
55
64
  canSave(generation: number): boolean;
65
+ /** User-triggered refresh: visible busy state on this transaction only. */
56
66
  refresh(generation: number, discard?: boolean): Promise<void>;
67
+ /** Watch-driven revalidation. Invisible once a trusted snapshot exists. */
68
+ private revalidate;
69
+ private load;
57
70
  edit(generation: number, patch: Partial<PermissionDraft>): void;
58
71
  stageRule(generation: number): void;
59
72
  stageRevoke(generation: number, id: string): void;