@dsmm/dsmm 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +2 -2
  2. package/docs/agent-presets.md +5 -5
  3. package/docs/compatibility.md +7 -1
  4. package/docs/migration-from-ocmm.md +1 -1
  5. package/docs/releasing.md +25 -65
  6. package/docs/roadmap.md +37 -2
  7. package/docs/settings-status.md +1 -1
  8. package/lib/client/DeploymentFields.d.ts +6 -2
  9. package/lib/client/DeploymentFields.js +8 -6
  10. package/lib/client/DeploymentPage.d.ts +1 -0
  11. package/lib/client/DeploymentPage.js +4 -3
  12. package/lib/client/ProfilesSection.js +3 -3
  13. package/lib/client/RoleAvailability.js +1 -1
  14. package/lib/client/SessionProfiles.js +21 -18
  15. package/lib/client/controller.d.ts +17 -0
  16. package/lib/client/controller.js +104 -18
  17. package/lib/client/deployment-locales.js +26 -27
  18. package/lib/client/deployment-modules.js +1 -1
  19. package/lib/client/index.js +10 -2
  20. package/lib/client/locales.d.ts +6 -0
  21. package/lib/client/locales.js +148 -124
  22. package/lib/client/permission-locales.js +35 -35
  23. package/lib/client.js +645 -542
  24. package/lib/index.js +10 -5
  25. package/lib/native-admission.d.ts +18 -0
  26. package/lib/native-admission.js +174 -17
  27. package/lib/permission-control.d.ts +2 -0
  28. package/lib/permission-control.js +7 -0
  29. package/lib/permission-controller.js +2 -2
  30. package/lib/permission-native-rules.js +3 -3
  31. package/lib/preset-materializer.js +3 -3
  32. package/lib/preset-registry.d.ts +20 -2
  33. package/lib/preset-registry.js +46 -17
  34. package/lib/preset-skills.d.ts +1 -1
  35. package/lib/preset-skills.js +2 -2
  36. package/lib/profile-diagnostics.js +1 -1
  37. package/lib/profile-remote.js +1 -3
  38. package/lib/profile-rpc.js +2 -0
  39. package/lib/profile-runtime.d.ts +12 -1
  40. package/lib/profile-runtime.js +122 -10
  41. package/lib/profile-store.d.ts +2 -2
  42. package/lib/profile-store.js +8 -1
  43. package/lib/profile-types.d.ts +1 -0
  44. package/lib/role-invocation.d.ts +1 -1
  45. package/lib/role-invocation.js +2 -2
  46. package/lib/role-policy.js +2 -2
  47. package/lib/role-subagents.js +18 -4
  48. package/lib/roles.d.ts +2 -0
  49. package/lib/roles.js +2 -0
  50. package/lib/settings.d.ts +1 -3
  51. package/lib/settings.js +4 -9
  52. package/lib/skills.d.ts +1 -0
  53. package/lib/skills.js +5 -1
  54. package/package.json +37 -33
package/lib/client.js CHANGED
@@ -2692,7 +2692,7 @@ var configFields = {
2692
2692
  roles: "roles",
2693
2693
  roleRouting: "role-routing",
2694
2694
  runtimePolicy: { strategy: null, rateLimit },
2695
- presets: { materialize: null, plannerRootEnabled: null, root: null },
2695
+ presets: { materialize: null, root: null },
2696
2696
  subagents: { toolTopology: null, allowRouteOverride: null, enableRunInBackground: null, backgroundMode: null, maxDepth: null },
2697
2697
  workflow: { policy: null, strictGates: null, reviewCap: null, finalReviewPolicy: null },
2698
2698
  guards: { scope: null, shellCommandSafety: null, gitWriteGuard: null, toolOutputTruncation: { enabled: null, maxInlineBytes: null }, planFormatValidation: null, questionLabelHelper: { enabled: null, maxLabelChars: null }, todoDisciplineHelper: null },
@@ -3161,8 +3161,7 @@ function readOnlySettingsData(value) {
3161
3161
  for (const [key, value2] of Object.entries(env)) if (!/^variable-[1-9][0-9]*$/u.test(key) || value2 !== "<redacted>") fail2("private environment");
3162
3162
  }
3163
3163
  if (settings.presets !== void 0) {
3164
- const presets = object(settings.presets, ["materialize"], ["root", "plannerRootEnabled"]);
3165
- if (Object.hasOwn(presets, "plannerRootEnabled")) boolean(presets.plannerRootEnabled, "presets.plannerRootEnabled");
3164
+ const presets = object(settings.presets, ["materialize"], ["root"]);
3166
3165
  if (presets.root !== void 0 && presets.root !== "<configured>") fail2("private directory");
3167
3166
  }
3168
3167
  if (settings.runtimeRecovery !== void 0) {
@@ -3515,6 +3514,8 @@ var ProfilesController = class {
3515
3514
  catalogBusy: false,
3516
3515
  catalogUnavailable: true,
3517
3516
  currentSessionId: null,
3517
+ sessionViewEpoch: 0,
3518
+ sessionUnconfirmed: false,
3518
3519
  session: null,
3519
3520
  sessionChoice: null,
3520
3521
  sessionBusy: null,
@@ -3529,6 +3530,14 @@ var ProfilesController = class {
3529
3530
  generation = 0;
3530
3531
  disposed = false;
3531
3532
  sessionGeneration = 0;
3533
+ pendingSessionSelections = /* @__PURE__ */ new Set();
3534
+ connection = null;
3535
+ connectionBaseline;
3536
+ connectionBound = false;
3537
+ stopConnection = null;
3538
+ composerBlocks = null;
3539
+ composerReason = null;
3540
+ composerBlock = null;
3532
3541
  catalogGeneration = 0;
3533
3542
  catalogRemote = null;
3534
3543
  modelSelectorGeneration = 0;
@@ -3576,7 +3585,7 @@ var ProfilesController = class {
3576
3585
  refreshCatalog: () => this.refreshCatalog(),
3577
3586
  refreshSession: () => this.refreshSession(),
3578
3587
  chooseSessionProfile: (id2) => {
3579
- if (!this.disposed && this.current.sessionBusy === null && this.current.busy === null && !this.current.dirty) this.publish({ sessionChoice: id2, sessionNotice: null });
3588
+ if (!this.disposed && this.connectionCurrent() && !this.current.sessionUnconfirmed && this.current.sessionBusy === null && this.current.busy === null && !this.current.dirty && this.current.pendingEditor === null && this.current.invalidFields.length === 0) this.publish({ sessionChoice: id2, sessionNotice: null });
3580
3589
  },
3581
3590
  applySession: (options) => this.selectSession(false, options),
3582
3591
  resetSession: () => this.selectSession(true),
@@ -3590,6 +3599,8 @@ var ProfilesController = class {
3590
3599
  }
3591
3600
  };
3592
3601
  dispose() {
3602
+ this.releaseComposerBlock();
3603
+ this.stopConnection?.();
3593
3604
  this.disposed = true;
3594
3605
  this.generation += 1;
3595
3606
  this.sessionGeneration += 1;
@@ -3609,6 +3620,63 @@ var ProfilesController = class {
3609
3620
  this.modelSelector = null;
3610
3621
  this.listeners.clear();
3611
3622
  }
3623
+ bindConnection(source) {
3624
+ if (this.disposed) return;
3625
+ const replacement = this.connectionBound && (source !== this.connection || source?.getSnapshot() !== this.connectionBaseline);
3626
+ this.stopConnection?.();
3627
+ this.connection = source;
3628
+ this.connectionBound = true;
3629
+ this.connectionBaseline = source?.getSnapshot();
3630
+ const invalidate = () => {
3631
+ this.connectionBaseline = source?.getSnapshot();
3632
+ this.generation += 1;
3633
+ this.sessionGeneration += 1;
3634
+ this.modelSelectorGeneration += 1;
3635
+ this.publish({
3636
+ session: null,
3637
+ sessionBusy: null,
3638
+ sessionNotice: null,
3639
+ sessionUnconfirmed: false,
3640
+ sessionViewEpoch: this.current.sessionViewEpoch + 1,
3641
+ busy: null,
3642
+ issue: { kind: "transport", code: "unavailable" }
3643
+ });
3644
+ };
3645
+ if (replacement || source === null || this.connectionBaseline === void 0) invalidate();
3646
+ this.stopConnection = source?.subscribe(() => {
3647
+ invalidate();
3648
+ if (this.connectionCurrent()) {
3649
+ void this.refresh();
3650
+ void this.refreshSession();
3651
+ }
3652
+ }) ?? null;
3653
+ }
3654
+ connectionCurrent() {
3655
+ return !this.connectionBound || this.connectionBaseline !== void 0 && this.connection?.getSnapshot() === this.connectionBaseline;
3656
+ }
3657
+ attachComposerBlocks(blocks, reason) {
3658
+ if (this.disposed) return;
3659
+ this.releaseComposerBlock();
3660
+ this.composerBlocks = blocks;
3661
+ this.composerReason = reason ?? null;
3662
+ this.syncComposerBlock();
3663
+ }
3664
+ releaseComposerBlock() {
3665
+ const held = this.composerBlock;
3666
+ this.composerBlock = null;
3667
+ if (held !== null && this.composerBlocks?.storeFor(held.id) === held.store && held.store.getSnapshot() === held.block) this.composerBlocks.set(held.id, void 0);
3668
+ }
3669
+ syncComposerBlock() {
3670
+ const { currentSessionId, sessionBusy, sessionUnconfirmed, session } = this.current;
3671
+ const wanted = currentSessionId !== null && (sessionBusy === "apply" || sessionBusy === "reset" || sessionUnconfirmed || session?.refreshRequired || session?.selection.refreshRequired);
3672
+ if (!wanted || this.composerBlock?.id !== currentSessionId) this.releaseComposerBlock();
3673
+ if (!wanted || this.composerBlock !== null || this.composerBlocks === null || this.composerReason === null) return;
3674
+ const id2 = currentSessionId, store = this.composerBlocks.storeFor(id2);
3675
+ if (store.getSnapshot() !== void 0) return;
3676
+ const block = { reason: this.composerReason() };
3677
+ this.composerBlock = { id: id2, store, block };
3678
+ this.composerBlocks.set(id2, block);
3679
+ }
3612
3680
  attachModelSelector(remote) {
3613
3681
  if (this.disposed) return;
3614
3682
  this.modelSelectorGeneration += 1;
@@ -3676,7 +3744,7 @@ var ProfilesController = class {
3676
3744
  if (id2 !== this.modelSelectionSessionId) this.attachModelSelectionSource(null, null);
3677
3745
  if (id2 !== this.modelEventsSessionId) this.attachModelEventSource(null, null);
3678
3746
  if (id2 !== this.modelInteractionSessionId) this.attachModelInteractionSource(null, null);
3679
- this.publish({ currentSessionId: id2, session: null, sessionChoice: null, sessionBusy: null, sessionIssue: null, sessionNotice: null });
3747
+ this.publish({ currentSessionId: id2, sessionViewEpoch: this.current.sessionViewEpoch + 1, sessionUnconfirmed: id2 !== null && this.pendingSessionSelections.has(id2), session: null, sessionChoice: null, sessionBusy: null, sessionIssue: null, sessionNotice: null });
3680
3748
  if (id2 !== null) void this.refreshSession();
3681
3749
  }
3682
3750
  async refreshCatalog() {
@@ -3697,15 +3765,15 @@ var ProfilesController = class {
3697
3765
  }
3698
3766
  async refreshSession(preserveFeedback = false) {
3699
3767
  const id2 = this.current.currentSessionId;
3700
- if (this.disposed || id2 === null || this.current.sessionBusy !== null) return;
3768
+ if (this.disposed || !this.connectionCurrent() || id2 === null || this.current.sessionBusy !== null) return;
3701
3769
  this.modeRefreshPending = false;
3702
3770
  const generation = ++this.sessionGeneration;
3703
- const live = () => !this.disposed && generation === this.sessionGeneration && id2 === this.current.currentSessionId;
3771
+ const live = () => !this.disposed && this.connectionCurrent() && generation === this.sessionGeneration && id2 === this.current.currentSessionId;
3704
3772
  this.publish({ sessionBusy: "read", ...preserveFeedback ? {} : { sessionIssue: null, sessionNotice: null } });
3705
3773
  try {
3706
3774
  const session = await this.unwrap(this.remote.describeSession(id2));
3707
3775
  if (session.sessionId !== id2) throw { kind: "assembly", code: "unavailable" };
3708
- if (live()) this.publish({ session, sessionChoice: session.selection.selectedId });
3776
+ if (live()) this.publish({ session, sessionChoice: (session.admittedSelection ?? session.selection).selectedId, sessionUnconfirmed: this.pendingSessionSelections.has(id2) });
3709
3777
  } catch (error) {
3710
3778
  if (live()) this.publish({ sessionIssue: this.issue(error) });
3711
3779
  } finally {
@@ -3717,11 +3785,12 @@ var ProfilesController = class {
3717
3785
  }
3718
3786
  async setDeepwork(active) {
3719
3787
  const { currentSessionId: id2, session } = this.current;
3720
- if (this.disposed || id2 === null || session?.deepwork === void 0 || session.refreshRequired || session.selection.refreshRequired || session.deepwork.locked || session.canToggleMode !== true || this.current.sessionBusy !== null || this.current.busy !== null || this.remote.selectMode === void 0) return;
3788
+ if (this.disposed || !this.connectionCurrent() || this.current.sessionUnconfirmed || id2 === null || session?.deepwork === void 0 || session.refreshRequired || session.selection.refreshRequired || session.deepwork.locked || session.canToggleMode !== true || this.current.sessionBusy !== null || this.current.busy !== null || this.remote.selectMode === void 0) return;
3721
3789
  const generation = ++this.sessionGeneration;
3722
- const live = () => !this.disposed && generation === this.sessionGeneration && id2 === this.current.currentSessionId;
3790
+ const live = () => !this.disposed && this.connectionCurrent() && generation === this.sessionGeneration && id2 === this.current.currentSessionId;
3723
3791
  this.publish({ sessionBusy: "mode", sessionIssue: null, sessionNotice: null });
3724
3792
  try {
3793
+ if (!live()) return;
3725
3794
  const accepted = await this.unwrap(this.remote.selectMode(id2, {
3726
3795
  sessionId: id2,
3727
3796
  active,
@@ -3741,10 +3810,10 @@ var ProfilesController = class {
3741
3810
  }
3742
3811
  async selectSession(reset, options, modelOnly = false) {
3743
3812
  const { currentSessionId: id2, session, sessionChoice, snapshot: snapshot4 } = this.current;
3744
- if (this.disposed || id2 === null || session === null || session.refreshRequired || session.selection.refreshRequired || !writableSelectionVersion(session.selection.selectionRevision) || (modelOnly ? session.canSelectModel !== true : session.canApplyOverlay !== true || session.applyOverlayUnavailableReason === "new-session-required") || this.current.sessionBusy !== null || this.current.busy !== null || this.current.dirty || this.current.invalidFields.length > 0 || this.current.pendingEditor !== null) return;
3813
+ if (this.disposed || !this.connectionCurrent() || this.current.sessionUnconfirmed || id2 === null || session === null || session.refreshRequired || session.selection.refreshRequired || !writableSelectionVersion(session.selection.selectionRevision) || (modelOnly ? session.canSelectModel !== true : session.canApplyOverlay !== true || session.applyOverlayUnavailableReason === "new-session-required") || this.current.sessionBusy !== null || this.current.busy !== null || this.current.dirty || this.current.invalidFields.length > 0 || this.current.pendingEditor !== null) return;
3745
3814
  const selectedId = reset ? null : sessionChoice;
3746
- const revision2 = snapshot4?.profiles.find((profile) => profile.id === selectedId)?.revision;
3747
- if (!modelOnly && selectedId !== null && !isConfigRevision(revision2)) return;
3815
+ const profile = snapshot4?.profiles.find((profile2) => profile2.id === selectedId), revision2 = profile?.revision;
3816
+ if (!modelOnly && selectedId !== null && (!isConfigRevision(revision2) || profile?.error !== void 0)) return;
3748
3817
  const generation = ++this.sessionGeneration;
3749
3818
  const useProfileModel = !reset && options?.useProfileModel === true;
3750
3819
  const selector = this.modelSelector, selectorGeneration = this.modelSelectorGeneration;
@@ -3755,10 +3824,12 @@ var ProfilesController = class {
3755
3824
  const modeWatermark = eventSource === null ? -1 : modeIntentWatermark(eventSource.getSnapshot());
3756
3825
  const interaction = this.modelInteraction, interactionGeneration = this.modelInteractionGeneration;
3757
3826
  const pendingNativeChoice = interaction?.getSnapshot().status === "selecting";
3758
- const live = () => !this.disposed && generation === this.sessionGeneration && id2 === this.current.currentSessionId;
3827
+ const live = () => !this.disposed && this.connectionCurrent() && generation === this.sessionGeneration && id2 === this.current.currentSessionId;
3759
3828
  const selectorLive = () => live() && selector !== null && selector === this.modelSelector && selectorGeneration === this.modelSelectorGeneration;
3829
+ if (!modelOnly) this.pendingSessionSelections.add(id2);
3760
3830
  this.publish({ sessionBusy: reset ? "reset" : "apply", sessionIssue: null, sessionNotice: null });
3761
3831
  try {
3832
+ if (!live()) return;
3762
3833
  const accepted = await this.unwrap(modelOnly ? this.remote.describeSession(id2) : this.remote.selectSession(id2, {
3763
3834
  sessionId: id2,
3764
3835
  id: selectedId,
@@ -3769,7 +3840,11 @@ var ProfilesController = class {
3769
3840
  if (accepted.sessionId !== id2) throw { kind: "assembly", code: "unavailable" };
3770
3841
  if (modelOnly && (accepted.admissionEpoch !== session.admissionEpoch || accepted.deepwork?.revision !== session.deepwork?.revision)) throw { kind: "domain", code: "conflict" };
3771
3842
  if (!live()) return;
3772
- this.publish({ session: accepted, sessionChoice: accepted.selection.selectedId, sessionNotice: useProfileModel ? null : reset ? "reset" : "applied" });
3843
+ this.publish({
3844
+ session: accepted,
3845
+ sessionChoice: (accepted.admittedSelection ?? accepted.selection).selectedId,
3846
+ sessionNotice: useProfileModel || accepted.refreshRequired || accepted.selection.refreshRequired ? null : reset ? "reset" : "applied"
3847
+ });
3773
3848
  if (!useProfileModel || accepted.refreshRequired || accepted.selection.refreshRequired || !live()) return;
3774
3849
  if (accepted.canSelectModel !== true || !writableSelectionVersion(accepted.selection.selectionRevision)) {
3775
3850
  this.publish({ sessionIssue: { kind: "assembly", code: accepted.selectModelUnavailableReason ?? "unavailable", source: "profile-model" } });
@@ -3812,17 +3887,25 @@ var ProfilesController = class {
3812
3887
  if (live()) this.publish({ sessionIssue: { kind: "assembly", code: selectorLive() ? "model-selection-failed" : "model-service-unavailable", source: "profile-model" } });
3813
3888
  }
3814
3889
  } catch (error) {
3815
- if (live()) this.publish({ sessionIssue: this.issue(error) });
3890
+ if (live()) {
3891
+ const issue = this.issue(error);
3892
+ this.publish({ sessionIssue: issue, sessionUnconfirmed: !modelOnly && (issue.kind !== "domain" || issue.code === "cancelled") });
3893
+ }
3816
3894
  } finally {
3895
+ if (!modelOnly) this.pendingSessionSelections.delete(id2);
3817
3896
  if (live()) {
3818
3897
  this.publish({ sessionBusy: null });
3819
3898
  this.refreshObservedMode();
3899
+ } else if (!modelOnly && !this.disposed && this.connectionCurrent() && id2 === this.current.currentSessionId) {
3900
+ this.modeRefreshPending = true;
3901
+ this.refreshObservedMode();
3820
3902
  }
3821
3903
  }
3822
3904
  }
3823
3905
  publish(patch) {
3824
3906
  if (this.disposed) return;
3825
3907
  this.current = { ...this.current, ...patch };
3908
+ this.syncComposerBlock();
3826
3909
  for (const listener of this.listeners) listener();
3827
3910
  }
3828
3911
  accept(document2) {
@@ -3845,9 +3928,9 @@ var ProfilesController = class {
3845
3928
  return { kind: "assembly", code: "unavailable" };
3846
3929
  }
3847
3930
  async perform(busy, operation) {
3848
- if (this.disposed || this.current.busy !== null || this.current.sessionBusy === "apply" || this.current.sessionBusy === "reset" || this.current.pendingEditor !== null) return;
3931
+ if (this.disposed || !this.connectionCurrent() || this.current.busy !== null || this.current.sessionBusy === "apply" || this.current.sessionBusy === "reset" || this.current.pendingEditor !== null) return;
3849
3932
  const generation = ++this.generation;
3850
- const live = () => !this.disposed && generation === this.generation;
3933
+ const live = () => !this.disposed && this.connectionCurrent() && generation === this.generation;
3851
3934
  this.publish({ busy, issue: null, notice: null });
3852
3935
  try {
3853
3936
  await operation(live);
@@ -3997,69 +4080,74 @@ var ProfilesController = class {
3997
4080
  // src/client/locales.ts
3998
4081
  var NS = "settings.dsmm-profiles";
3999
4082
  var en = {
4000
- diagnosticJsonc: "Correct the JSONC syntax at the indicated location.",
4001
- diagnosticDuplicate: "Remove the duplicate field at this location.",
4083
+ sessionChooseWorkspace: "Choose a workspace to start a session, then choose its configuration before sending.",
4084
+ sessionSelectionBlock: "Finish choosing this session's configuration to continue typing.",
4085
+ sessionCommittedRefresh: "Saved. Refresh to confirm it.",
4086
+ sessionUnconfirmedRefresh: "The result is unknown. Refresh before choosing or sending again.",
4087
+ technicalDetails: "Details",
4088
+ diagnosticJsonc: "Fix the JSONC syntax at the marked location.",
4089
+ diagnosticDuplicate: "Remove the duplicate field.",
4002
4090
  diagnosticUnsafe: "Unsafe object keys are not supported; remove this field.",
4003
- diagnosticUnknown: "Remove this unsupported field. Private and installation configuration belongs in native deployment settings.",
4004
- diagnosticDeprecated: "This retired field is rejected. Configure explicit role levels instead; no migration is performed.",
4005
- diagnosticType: "Use the declared field type and bounded value.",
4006
- diagnosticValue: "Choose an explicitly supported value. Output-language choices are shown in the structured language field.",
4007
- diagnosticRoute: "Use a complete provider/model route or a nonempty exact-effort override.",
4008
- diagnosticRequired: "This role is required by the selected Deepwork policy and cannot be disabled.",
4009
- diagnosticCeiling: "A named profile cannot enable capabilities outside its captured startup/deployment ceiling.",
4010
- browseZone: "Browse saved profiles",
4011
- editZone: "Edit draft",
4012
- savedRevision: "Saved revision: {revision}",
4013
- savedInventory: "Saved profiles and diagnostics",
4014
- futurePin: "Future selection revision: {revision}",
4015
- noEditor: "Open a saved profile or create a draft to edit. Browsing does not activate a profile.",
4016
- warningMarker: "Warning · nonblocking · {code} · {field}",
4017
- blockingMarker: "Blocked · {code} · {field}",
4018
- blankLabelWarning: "The label is blank. The profile ID is used for display; the original document can still be saved and selected.",
4019
- diagnosticLocation: "JSONC line {line}, column {column}.",
4020
- savedWarnings: "Saved revision warnings",
4021
- draftWarnings: "Draft warnings",
4022
- futureWarnings: "Future-default pin warnings",
4023
- admissionWarnings: "Current-admission warnings",
4024
- warningProfile: "warning (nonblocking)",
4025
- omitLabel: "Inherit display name from ID (omit label)",
4026
- businessLocale: "Default output language",
4027
- inheritLocale: "Inherit deployment / native language",
4028
- unsupportedLocale: "Unsupported draft language — choose an allowed value",
4029
- localeHint: "Omitted locale inherits the deployment preference, then native/user language. An explicit user request wins. This never changes the interface language.",
4030
- toolTopology: "Subagent tool topology",
4031
- topologyHint: "per-role exposes role tools plus the category entry; parameterized exposes role/category entries. Omitted inherits deployment (default per-role). Background, depth and route-override permissions remain deployment-only.",
4032
- levelName: "Invocation level: {level}",
4091
+ diagnosticUnknown: "Remove this unsupported field.",
4092
+ diagnosticDeprecated: "This retired field is rejected. Configure explicit role levels instead.",
4093
+ diagnosticType: "Use the declared field type and a value in range.",
4094
+ diagnosticValue: "Choose a supported value.",
4095
+ diagnosticRoute: "Use a complete provider/model route, or a nonempty reasoning effort.",
4096
+ diagnosticRequired: "This role is required by the selected workflow policy and cannot be disabled.",
4097
+ diagnosticCeiling: "A profile cannot enable what the deployment does not allow.",
4098
+ browseZone: "Saved profiles",
4099
+ editZone: "Edit profile",
4100
+ savedRevision: "Version: {revision}",
4101
+ savedInventory: "Warnings and errors",
4102
+ futurePin: "Default version: {revision}",
4103
+ noEditor: "Choose a profile or create one to edit.",
4104
+ warningMarker: "Warning · {code} · {field}",
4105
+ blockingMarker: "Error · {code} · {field}",
4106
+ blankLabelWarning: "The label is blank, so the ID is shown instead. The profile can still be saved and selected.",
4107
+ diagnosticLocation: "Line {line}, column {column}.",
4108
+ savedWarnings: "Warnings in the saved version",
4109
+ draftWarnings: "Warnings in this draft",
4110
+ futureWarnings: "Warnings for new sessions",
4111
+ admissionWarnings: "Warnings for this session",
4112
+ warningProfile: "has warnings",
4113
+ omitLabel: "Use the ID as the name",
4114
+ businessLocale: "Output language",
4115
+ inheritLocale: "Use the app language",
4116
+ unsupportedLocale: "Choose a supported language",
4117
+ localeHint: "A request in the conversation still decides the reply language.",
4118
+ toolTopology: "Subagent tools",
4119
+ topologyHint: "per-role: one tool per role, plus one category tool. parameterized: pick the role or category in the tool arguments.",
4120
+ levelName: "Level: {level}",
4033
4121
  levelMode: "{level} override",
4034
- levelUnconfigured: "Not configured / inherit deployment level",
4035
- levelEffortOnly: "Exact effort only",
4036
- levelFullRoute: "Complete provider/model route",
4037
- normalLevel: "normal · default route (read-only alias; omission means normal)",
4038
- orchestratorLevels: "The ordinary orchestrator root has no invocation levels. Its native model is unchanged.",
4039
- levelsHint: "Levels are call resources, not workflow tiers. An unconfigured requested level is rejected; an effort-only override uses the resolved model. An explicit complete route replaces model and effort together.",
4040
- namedRole: "{name} named-profile availability",
4041
- namedRoleHint: "Omitted inherits the captured deployment ceiling. Required roles cannot be disabled; enable requests cannot lift startup or deployment restrictions. Routing remains editable even for disabled roles.",
4042
- availabilityUnknown: "Role availability metadata is unavailable. Required status and startup/deployment ceilings cannot be inferred; refresh before requesting an availability change.",
4043
- roleRequired: "Required role · {reason}",
4044
- roleOptional: "Optional role",
4045
- roleCeiling: "Startup: {startup}; deployment: {deployment}; captured admission: {admitted}.",
4122
+ levelUnconfigured: "Use the deployment level",
4123
+ levelEffortOnly: "Reasoning effort only",
4124
+ levelFullRoute: "Provider, model and effort",
4125
+ normalLevel: "normal · default route",
4126
+ orchestratorLevels: "The orchestrator has no invocation levels.",
4127
+ levelsHint: "Only configured levels can be used. Reasoning effort only keeps the configured model; a full route replaces model and effort.",
4128
+ namedRole: "Enable {name}",
4129
+ namedRoleHint: "Required roles stay enabled. Roles disabled by the deployment cannot be enabled here.",
4130
+ availabilityUnknown: "Role availability is unknown. Refresh before changing it.",
4131
+ roleRequired: "Required · {reason}",
4132
+ roleOptional: "Optional",
4133
+ roleCeiling: "Startup: {startup}; deployment: {deployment}; current: {admitted}.",
4046
4134
  roleProvenance: "Source: {source}; capture: {capture}.",
4047
- roleUnavailableReason: "Availability reason: {reason}.",
4048
- admittedRoles: "Captured role availability",
4049
- bindingUnknown: "Subagent runtime binding is unconfirmed; no delivery-readiness guarantee can be inferred from configuration.",
4050
- bindingState: "Captured subagent binding: {binding}; delivery fence: {ready}; restart required: {restart}. Fence readiness does not establish persistence or child-delegation support.",
4051
- bindingReason: "Binding reason: {reason}.",
4052
- sessionModelHint: "Apply/Baseline keep the native root model and existing children. Only Use profile model explicitly asks native model selection to change.",
4053
- savedOnlyHint: "Select the editor's saved immutable revision, not its dirty draft. Save does not select or apply it.",
4054
- centralOrigin: "Named resources: shared central store.",
4055
- legacyOrigin: "Named resources: legacy native-profile store (read-only).",
4056
- explicitOrigin: "Named resources: explicitly configured store.",
4057
- readOnlyOrigin: "This legacy store is read-only. Files are not copied or migrated; selection and current-session actions retain their own authority.",
4135
+ roleUnavailableReason: "Reason: {reason}.",
4136
+ admittedRoles: "Role availability",
4137
+ bindingUnknown: "Subagent readiness is unknown. Refresh to check.",
4138
+ bindingState: "Subagents ready: {ready}; restart needed: {restart}.",
4139
+ bindingReason: "Reason: {reason}.",
4140
+ sessionModelHint: "Choosing a profile keeps the current model. Use profile model switches it.",
4141
+ savedOnlyHint: "Save before choosing this profile.",
4142
+ centralOrigin: "Shared storage.",
4143
+ legacyOrigin: "Old read-only storage.",
4144
+ explicitOrigin: "Custom storage.",
4145
+ readOnlyOrigin: "These older profiles are read-only.",
4058
4146
  headerCompactProfiles: "Profiles · keep model",
4059
4147
  headerCompactRefresh: "Refresh",
4060
4148
  headerNoSession: "Select a session to make changes.",
4061
- sessionNewRequired: "Applying a profile or baseline requires a new session. Save and future-default selection remain available.",
4062
- sessionModuleOff: "Deepwork is unavailable within this session's captured module settings.",
4149
+ sessionNewRequired: "Start a new session to change its profile. You can still save profiles and set the default for new sessions.",
4150
+ sessionModuleOff: "Deepwork is unavailable in this session.",
4063
4151
  headerModeEnable: "Enable Deepwork",
4064
4152
  headerModeDisable: "Disable Deepwork",
4065
4153
  headerModePreset: "Deepwork · DW preset",
@@ -4068,150 +4156,151 @@ var en = {
4068
4156
  headerModeOff: "Deepwork disabled.",
4069
4157
  headerUseCurrentModel: "Use profile model",
4070
4158
  title: "Deepwork Profiles",
4071
- description: "Save independent runtime configurations and choose which one new sessions use.",
4072
- newSessions: "This saved pin is the default for future sessions only. Current admissions and existing children remain unchanged; explicit session selections retain their own authority.",
4073
- editorSelect: "Profile to edit",
4159
+ description: "Save configurations and choose the default for new sessions.",
4160
+ newSessions: "Choose the configuration new sessions use. Existing sessions stay unchanged.",
4161
+ editorSelect: "Profile",
4074
4162
  choose: "Choose a profile",
4075
4163
  newDraft: "New unsaved profile",
4076
4164
  new: "New profile",
4077
- profileId: "Profile ID (name)",
4078
- 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.",
4079
- configuration: "Runtime configuration (JSONC)",
4080
- configurationHint: "Document: version 1, matching id, optional label, and settings. Runtime overlays support role routes/levels, locale, role availability, topology, workflow, guards, recovery, calibration and default effort. Retired max-preset fields are rejected, not migrated.",
4081
- structuralHint: "Skills, prompt content, preset installation, providers/accounts, background/depth and arbitrary route permissions remain deployment-only. Never paste credentials. JSONC and structured controls edit the same draft without normalizing unrelated bytes.",
4082
- save: "Save profile",
4083
- saving: "Saving profile…",
4084
- apply: "Set as future default",
4085
- applying: "Selecting future default…",
4086
- reset: "Use baseline for future sessions",
4087
- resetting: "Resetting future default…",
4088
- refresh: "Refresh profiles",
4089
- refreshing: "Refreshing profiles…",
4090
- reload: "Reload saved profile",
4091
- loading: "Loading profiles…",
4092
- reading: "Reading profile…",
4093
- empty: "No saved profiles yet. Create a profile to start; the deployment baseline remains applied.",
4094
- baseline: "Applied to new sessions: deployment baseline.",
4095
- appliedProfile: "Applied to new sessions: {id} (revision {revision}).",
4096
- appliedInvalid: "The stored selection cannot be confirmed. Existing sessions remain unchanged. Resolve the Host diagnostic before applying or resetting a profile.",
4097
- 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.",
4098
- dirty: "Draft differs from the saved version. Save or explicitly discard before selecting it.",
4099
- savedNotApplied: "Saved source version differs from the recorded future-default source, or this profile is not selected.",
4100
- savedApplied: "Saved source version matches the recorded future-default source, not necessarily the current admission.",
4101
- versionObserved: "Metadata observed",
4102
- versionAbsent: "Not stored",
4103
- versionUnknown: "Version unavailable",
4104
- savedRelationshipUnknown: "Saved; relationship to the selected source version is unknown. Refresh to inspect current metadata.",
4105
- savedRefreshRequired: "Committed — reload the affected source before editing or selecting it again. No automatic replay.",
4106
- saved: "Saved {id}. The applied policy was not changed.",
4107
- applied: "Applied {id} for new sessions. Existing sessions were not changed.",
4108
- resetDone: "Reset to the deployment baseline for new sessions. Existing sessions were not changed.",
4109
- discardPrompt: "Discard the unsaved draft before changing the editor?",
4110
- discard: "Discard changes",
4165
+ profileId: "Profile ID",
4166
+ idHint: "1–64 lowercase letters, digits, hyphens or underscores. It cannot be changed after saving.",
4167
+ configuration: "Configuration (JSONC)",
4168
+ configurationHint: "Use version: 1, the ID above, and settings. An optional label sets the name.",
4169
+ structuralHint: "Permissions, accounts and plugins are managed in app settings.",
4170
+ save: "Save",
4171
+ saving: "Saving…",
4172
+ apply: "Set as default for new sessions",
4173
+ applying: "Setting default…",
4174
+ reset: "Use default configuration",
4175
+ resetting: "Restoring default…",
4176
+ refresh: "Refresh",
4177
+ refreshing: "Refreshing…",
4178
+ reload: "Reload saved version",
4179
+ loading: "Loading…",
4180
+ reading: "Reading…",
4181
+ empty: "No saved profiles yet. Create one to start.",
4182
+ baseline: "Default configuration",
4183
+ appliedProfile: "{id}",
4184
+ appliedInvalid: "The default selection is unconfirmed. Fix the error below and refresh. Existing sessions stay unchanged.",
4185
+ 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.",
4186
+ dirty: "Unsaved changes. Save or discard them before choosing this profile.",
4187
+ savedNotApplied: "Saved; not the default for new sessions.",
4188
+ savedApplied: "Saved; this is the default for new sessions.",
4189
+ versionObserved: "Available",
4190
+ versionAbsent: "Not saved",
4191
+ versionUnknown: "Unknown",
4192
+ savedRelationshipUnknown: "Saved; refresh to check whether it is the default.",
4193
+ savedRefreshRequired: "Saved. Reload before editing or choosing again.",
4194
+ saved: "Saved {id}.",
4195
+ applied: "New sessions will use {id}. Existing sessions stay unchanged.",
4196
+ resetDone: "New sessions will use the default configuration. Existing sessions stay unchanged.",
4197
+ discardPrompt: "Discard the unsaved draft?",
4198
+ discard: "Discard",
4111
4199
  cancel: "Cancel",
4112
- 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.",
4113
- validation: "This profile is not valid. Correct the field below; your draft is unchanged.",
4114
- io: "The Host could not commit this operation. Your draft and the prior selection were kept. Check profile storage access, refresh, then retry.",
4115
- unavailable: "The native profile service is unavailable. Your draft is kept. Refresh after the Host reconnects or Deepwork is enabled.",
4116
- 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.",
4200
+ conflict: "The saved file or selection changed elsewhere. Your draft was kept. Refresh, then reload the profile or review your draft before retrying.",
4201
+ validation: "This profile is not valid. Fix the field below; your draft is unchanged.",
4202
+ io: "Could not save. Your draft was kept. Check access to the profile storage and retry.",
4203
+ unavailable: "The configuration service is unavailable. Your draft was kept. Reconnect and refresh.",
4204
+ transport: "The connection was interrupted, so the result is unknown. Your draft was kept. Refresh before retrying.",
4117
4205
  invalidProfile: "Unavailable profile: {id}",
4118
- details: "Host diagnostic",
4119
- retry: "Resolve the diagnostic, refresh profiles, then retry.",
4120
- globalScope: "Global default for future sessions",
4121
- sessionScope: "Current native session",
4122
- sessionSelect: "Current-session profile",
4123
- globalActionHint: "Set as future default selects only the saved revision for future sessions. It does not apply to the current session.",
4206
+ details: "Details",
4207
+ retry: "Fix the issue shown, refresh, then retry.",
4208
+ globalScope: "Default for new sessions",
4209
+ sessionScope: "This session's configuration",
4210
+ sessionSelect: "This session's configuration",
4211
+ globalActionHint: "Setting the default affects new sessions only.",
4124
4212
  headerProfile: "Profile",
4125
- headerProfileLabel: "Current-session profile (header)",
4126
- headerCaptured: "captured admission · exact profile unavailable",
4127
- headerSavedUnavailable: "saved profile unavailable",
4213
+ headerProfileLabel: "This session's configuration",
4214
+ headerCaptured: "Current configuration · unknown profile",
4215
+ headerSavedUnavailable: "Saved profile unavailable",
4128
4216
  headerCurrentProfile: "Current profile: {profile}",
4129
- headerRefresh: "Refresh profiles and current-session state",
4217
+ headerRefresh: "Refresh profiles and session state",
4130
4218
  headerUseModelAction: "Use profile model: {profile}",
4131
4219
  headerLoading: "Loading profile…",
4132
4220
  headerApplying: "Applying profile…",
4133
4221
  headerApplied: "Profile applied.",
4134
- headerBusy: "Session is busy.",
4222
+ headerBusy: "The session is busy.",
4135
4223
  headerUnavailable: "Profile unavailable.",
4136
4224
  headerDraft: "Save or discard the draft in Settings.",
4137
- headerConflict: "The session profile or admission changed elsewhere. Refresh current-session state before retrying.",
4138
- headerRefused: "Profile change unconfirmed. Check Settings.",
4225
+ headerConflict: "The session configuration changed elsewhere. Refresh before retrying.",
4226
+ headerRefused: "The profile change is unconfirmed. Check Settings.",
4139
4227
  headerKeepModelGroup: "Switch profile — keep current model",
4140
4228
  headerUseModelGroup: "Switch and use profile model",
4141
- headerModelDefaultHint: "Normal switching preserves the current model. Explicit switch-and-use-model also saves the native model default, like the Models tab.",
4142
- headerNoProfileModel: "Profile applied; no main model configured. Current model kept.",
4143
- headerModelUnconfirmed: "Profile applied; model change unconfirmed. Check Models/Settings.",
4144
- headerAppliedWithModel: "Profile and native model applied.",
4145
- headerModelChoiceChanged: "Profile applied; newer native model choice kept.",
4146
- headerActivationRefused: "Profile activation was refused. Check its configuration and native model catalog.",
4229
+ headerModelDefaultHint: "Switching keeps the current model. Switch and use profile model also updates the default model, like the Models tab.",
4230
+ headerNoProfileModel: "This profile sets no model.",
4231
+ headerModelUnconfirmed: "The model change is unconfirmed. Check model settings.",
4232
+ headerAppliedWithModel: "Configuration and model applied.",
4233
+ headerModelChoiceChanged: "Your newer model choice was kept.",
4234
+ headerActionUnavailable: "Unavailable right now. Refresh to check again.",
4235
+ headerActivationRefused: "The profile could not be applied. Check its configuration and the model catalog.",
4147
4236
  headerSelectionRefused: "The profile change could not be confirmed.",
4148
4237
  headerIssueCode: "Reason: {code}.",
4149
- headerIssueField: "Configuration field: {field}.",
4150
- headerRetryHint: "Refresh profiles and current-session state, resolve the indicated issue in Settings or native Models, then retry when the session is idle.",
4151
- headerMaintenanceRefused: "Native maintenance owns this session. The previous profile is kept.",
4152
- headerBusyRefused: "The session is busy. The previous profile is kept.",
4153
- headerCancelledRefused: "The profile request was cancelled. Refresh current-session state before retrying; do not assume a change completed.",
4154
- headerUnavailableRefused: "The native session or profile service is unavailable. Reconnect and refresh before retrying.",
4155
- headerWaitRetryHint: "Wait for the native work or maintenance to finish, then Refresh and retry. No profile change is queued automatically.",
4156
- noSession: "No native session is selected. Applying to the current session is unavailable.",
4157
- sessionUnavailable: "The current session could not be confirmed. Refresh its state before retrying; the prior policy is kept.",
4158
- sessionBusy: "Switching is unavailable: {reason}. The Host must reserve a truly idle ordinary session before applying.",
4159
- sessionState: "Current admission: {profile}; scope {scope}.",
4160
- sessionBaseline: "deployment baseline",
4161
- sessionGlobalCaptured: "captured admission (exact profile identity unavailable)",
4162
- sessionAdmittedProfile: "{id} (revision {revision})",
4163
- sessionFutureDefault: "Global default for future unscoped sessions: {profile}. This does not change this session's admission.",
4164
- sessionConflict: "The session selection or admission epoch changed elsewhere. The prior display and draft are kept. Refresh current-session state before applying again.",
4165
- sessionApply: "Apply profile to current session",
4166
- sessionApplying: "Applying current-session profile…",
4167
- sessionReset: "Pin baseline for current session",
4168
- sessionResetting: "Pinning current-session baseline…",
4169
- sessionRefresh: "Refresh current-session state",
4170
- sessionApplied: "Applied the saved revision to this session only. Global default and existing children were not changed.",
4171
- sessionResetDone: "Pinned the deployment baseline for this session only. Global default was not changed.",
4172
- 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.",
4173
- sessionDirty: "Save or explicitly discard the editor draft before applying a current-session choice.",
4174
- roleState: "Admitted route {route}; strategy {strategy}; retries {retries}; rate-limit failures {failures}; switches {switches}; total delay {delay} ms.",
4175
- catalogTitle: "Native model catalog",
4176
- catalogHint: "Catalog listings are advisory, not network or account health checks. Unlisted/manual routes stay editable; refresh never changes the draft or native model default.",
4177
- catalogUnavailable: "The native catalog is unavailable. Manual provider/model/effort fields and advanced JSONC remain available.",
4238
+ headerIssueField: "Field: {field}.",
4239
+ headerRetryHint: "Refresh, fix the issue in Settings or Models, then retry while the session is idle.",
4240
+ headerMaintenanceRefused: "Another session operation is in progress. Try again shortly.",
4241
+ headerBusyRefused: "The session is running. Try again when it finishes.",
4242
+ headerCancelledRefused: "Cancelled. Refresh to confirm the current configuration.",
4243
+ headerUnavailableRefused: "Cannot read the session configuration. Reconnect and refresh.",
4244
+ headerWaitRetryHint: "Refresh and retry when the session is ready.",
4245
+ noSession: "Select a session to change its configuration.",
4246
+ sessionUnavailable: "The current session cannot be confirmed. Refresh before retrying.",
4247
+ sessionBusy: "Cannot switch: {reason}. Wait until the session is idle, then retry.",
4248
+ sessionState: "{profile}",
4249
+ sessionBaseline: "Default configuration",
4250
+ sessionGlobalCaptured: "Current configuration (profile unknown)",
4251
+ sessionAdmittedProfile: "{id}",
4252
+ sessionFutureDefault: "Default for new sessions: {profile}.",
4253
+ sessionConflict: "The session configuration changed elsewhere. Your draft was kept. Refresh before retrying.",
4254
+ sessionApply: "Use this profile",
4255
+ sessionApplying: "Applying…",
4256
+ sessionReset: "Use default configuration",
4257
+ sessionResetting: "Restoring default…",
4258
+ sessionRefresh: "Refresh session state",
4259
+ sessionApplied: "Applied to this session only. The default for new sessions and existing children stay unchanged.",
4260
+ sessionResetDone: "This session uses the default configuration. The default for new sessions stays unchanged.",
4261
+ sessionAppliedWithModel: "Applied this profile and selected its model. The global profile default was not changed.",
4262
+ sessionDirty: "Save or discard the draft before choosing a configuration for this session.",
4263
+ roleState: "Route {route}; strategy {strategy}; retries {retries}; rate-limit failures {failures}; switches {switches}; total delay {delay} ms.",
4264
+ catalogTitle: "Model catalog",
4265
+ catalogHint: "Models that are not listed can be typed in.",
4266
+ catalogUnavailable: "The model catalog is unavailable. Provider, model and effort fields still work.",
4178
4267
  catalogRefresh: "Refresh model catalog",
4179
4268
  catalogRefreshing: "Refreshing model catalog…",
4180
4269
  catalogFailure: "Provider catalog unavailable: {name} ({id}).",
4181
- profileLabel: "Profile display label",
4270
+ profileLabel: "Profile name",
4182
4271
  defaultActive: "Default Deepwork mode",
4183
- activeHint: "This default does not erase an explicit saved session mode.",
4272
+ activeHint: "A mode chosen in the session wins.",
4184
4273
  enabled: "Enabled",
4185
4274
  disabled: "Disabled",
4186
- inherit: "Inherit deployment baseline",
4187
- profileDefaults: "Profile runtime defaults",
4188
- roleSelect: "Agent role to edit",
4189
- rolesUnavailable: "Native role inventory unavailable — use advanced JSONC",
4190
- roleEnabled: "Enabled in the native deployment",
4191
- roleDisabled: "Disabled in the native deployment",
4275
+ inherit: "Use deployment baseline",
4276
+ profileDefaults: "Defaults",
4277
+ roleSelect: "Role",
4278
+ rolesUnavailable: "The role list is unavailable. Refresh or use the advanced editor.",
4279
+ roleEnabled: "Enabled in app settings",
4280
+ roleDisabled: "Disabled in app settings",
4192
4281
  strategy: "{name} strategy",
4193
4282
  inheritStrategy: "Inherit ({value})",
4194
- startupLock: "startup-lock — keep the admitted route",
4195
- rateFallback: "rate-limit-fallback — ordered rollover at threshold",
4196
- strategyHint: "Both strategies use finite, positively no-output-safe RATE_LIMIT retries. Generic, auth and quota failures do not authorize a model switch. Blank numeric fields inherit; zero is an explicit value.",
4283
+ startupLock: "Keep the starting route",
4284
+ rateFallback: "Switch after repeated rate limits",
4285
+ 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.",
4197
4286
  retryField: "{name} {field}",
4198
4287
  inheritNumber: "Inherit {value}",
4199
- retryBounds: "Integer {min}–{max}; inherited value {value}.",
4288
+ retryBounds: "Integer {min}–{max}; inherited {value}.",
4200
4289
  unknownDefault: "unavailable",
4201
4290
  retryCount: "retry count",
4202
4291
  initialDelay: "initial delay (ms)",
4203
4292
  maxDelay: "maximum delay (ms)",
4204
4293
  totalWait: "total wait budget (ms)",
4205
- switchThreshold: "rate-limit failures before switch",
4294
+ switchThreshold: "rate-limit failures before switching",
4206
4295
  maxSwitches: "maximum switches",
4207
4296
  primaryMode: "{name} primary route",
4208
- inheritRoute: "Inherit native/deployment route",
4209
- configuredRoute: "Configure primary route",
4297
+ inheritRoute: "Inherit the deployment route",
4298
+ configuredRoute: "Configure the primary route",
4210
4299
  primaryName: "{name} primary",
4211
4300
  fallbackMode: "{name} fallback chain",
4212
- inheritChain: "Inherit deployment fallback chain",
4213
- configuredChain: "Explicit ordered fallback chain",
4214
- emptyChain: "Explicitly empty chain: no configured fallback routes.",
4301
+ inheritChain: "Inherit the deployment chain",
4302
+ configuredChain: "Explicit ordered chain",
4303
+ emptyChain: "Empty chain: no fallback routes.",
4215
4304
  fallbackName: "{name} fallback {index}",
4216
4305
  addFallback: "Add fallback for {name}",
4217
4306
  removeFallback: "Remove {name}",
@@ -4219,217 +4308,223 @@ var en = {
4219
4308
  moveDown: "Move down {name}",
4220
4309
  routeProvider: "{name} provider",
4221
4310
  routeModel: "{name} model",
4222
- routeEffort: "{name} exact effort",
4223
- manualProvider: "{name} manual provider",
4224
- manualModel: "{name} manual model",
4225
- manualEffort: "{name} manual exact effort",
4226
- manual: "Enter manual identifier",
4227
- manualValue: "Manual / unlisted: {value}",
4311
+ routeEffort: "{name} effort",
4312
+ manualProvider: "{name} provider (typed)",
4313
+ manualModel: "{name} model (typed)",
4314
+ manualEffort: "{name} effort (typed)",
4315
+ manual: "Type an identifier",
4316
+ manualValue: "Not listed: {value}",
4228
4317
  unset: "not set",
4229
- effortDefault: "Native default (omit exact effort)",
4230
- 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.",
4318
+ effortDefault: "Default (no explicit effort)",
4319
+ effortChangeHint: "Changing the provider or model clears this route's reasoning effort.",
4231
4320
  advanced: "Advanced JSONC",
4232
- rawInvalid: "Structured editing is unavailable for this invalid raw draft. Correct Advanced JSONC; no fields, comments or bytes have been normalized.",
4233
- invalidNumber: "Correct this bounded integer before saving or changing roles. The invalid value has not replaced the saved draft policy."
4321
+ rawInvalid: "Fix the invalid draft in Advanced JSONC to use these controls. Your draft was kept.",
4322
+ invalidNumber: "Enter a whole number within the limits."
4234
4323
  };
4235
4324
  var zh = {
4236
- diagnosticJsonc: "请修正所示位置的 JSONC 语法。",
4237
- diagnosticDuplicate: "请删除此位置的重复字段。",
4238
- diagnosticUnsafe: "不支持不安全对象键,请删除此字段。",
4239
- diagnosticUnknown: "请删除不支持的字段。私有及安装配置应放在原生部署设置中。",
4240
- diagnosticDeprecated: "此已退休字段被拒绝,请改用明确的角色调用等级,不自动迁移。",
4241
- diagnosticType: "请使用声明的字段类型和有界数值。",
4242
- diagnosticValue: "请选择明确支持的值。允许的输出语言见结构化语言字段。",
4243
- diagnosticRoute: "请提供完整提供商与模型路由,或非空精确强度覆盖。",
4244
- diagnosticRequired: "所选 Deepwork 策略要求此角色,不可禁用。",
4245
- diagnosticCeiling: "具名配置档不能启用超出已捕获启动或部署上限的能力。",
4246
- browseZone: "浏览已保存配置档",
4247
- editZone: "编辑草稿",
4248
- savedRevision: "保存的修订:{revision}",
4249
- savedInventory: "已保存配置档与诊断",
4250
- futurePin: "未来默认选择修订:{revision}",
4251
- noEditor: "打开已保存配置档或新建草稿。浏览不会启用配置档。",
4252
- warningMarker: "警告 · 不阻断 · {code} · {field}",
4253
- blockingMarker: "已阻断 · {code} · {field}",
4254
- blankLabelWarning: "显示名称为空,使用配置档 ID 显示。原文仍可保存和选择。",
4255
- diagnosticLocation: "JSONC 第 {line} 行,第 {column} 列。",
4256
- savedWarnings: "保存修订的警告",
4257
- draftWarnings: "草稿警告",
4258
- futureWarnings: "未来默认固定修订的警告",
4259
- admissionWarnings: "当前准入的警告",
4260
- warningProfile: "警告(不阻断)",
4261
- omitLabel: "使用 ID 显示(省略 label)",
4262
- businessLocale: "默认输出语言",
4263
- inheritLocale: "继承部署或原生语言",
4264
- unsupportedLocale: "草稿语言不受支持,请选择允许值",
4265
- localeHint: "省略 locale 时继承部署偏好,再继承原生或用户语言。本次用户明确请求优先,不改变界面语言。",
4266
- toolTopology: "子 Agent 工具拓扑",
4267
- topologyHint: "per-role 暴露角色工具及类别入口;parameterized 暴露角色与类别参数化入口。省略时继承部署(默认 per-role)。后台、深度及路由覆盖权限仅可在部署中配置。",
4268
- levelName: "调用资源等级:{level}",
4325
+ sessionChooseWorkspace: "请先选择工作区新建会话,发送前再选择本次会话的配置。",
4326
+ sessionSelectionBlock: "请先完成本次会话的配置选择,然后即可继续输入。",
4327
+ sessionCommittedRefresh: "已保存,请刷新确认。",
4328
+ sessionUnconfirmedRefresh: "结果未知,请刷新后再选择或发送。",
4329
+ technicalDetails: "详情",
4330
+ diagnosticJsonc: "请修正标记位置的 JSONC 语法。",
4331
+ diagnosticDuplicate: "请删除重复字段。",
4332
+ diagnosticUnsafe: "不支持不安全的对象键,请删除该字段。",
4333
+ diagnosticUnknown: "请删除不支持的字段。",
4334
+ diagnosticDeprecated: "该字段已停用,请改用明确的角色等级。",
4335
+ diagnosticType: "请使用声明的字段类型和范围内的值。",
4336
+ diagnosticValue: "请选择支持的值。",
4337
+ diagnosticRoute: "请填写完整的提供商与模型,或非空的推理强度。",
4338
+ diagnosticRequired: "所选工作流策略要求该角色,不能禁用。",
4339
+ diagnosticCeiling: "配置不能启用部署未允许的能力。",
4340
+ browseZone: "已保存配置",
4341
+ editZone: "编辑配置",
4342
+ savedRevision: "版本:{revision}",
4343
+ savedInventory: "警告与错误",
4344
+ futurePin: "默认版本:{revision}",
4345
+ noEditor: "选择或新建配置后进行编辑。",
4346
+ warningMarker: "警告 · {code} · {field}",
4347
+ blockingMarker: "错误 · {code} · {field}",
4348
+ blankLabelWarning: "名称为空,将显示 ID。该配置仍可保存和选择。",
4349
+ diagnosticLocation: "第 {line} 行,第 {column} 列。",
4350
+ savedWarnings: "已保存版本的警告",
4351
+ draftWarnings: "此草稿的警告",
4352
+ futureWarnings: "新会话的警告",
4353
+ admissionWarnings: "本次会话的警告",
4354
+ warningProfile: "有警告",
4355
+ omitLabel: "使用 ID 作为名称",
4356
+ businessLocale: "输出语言",
4357
+ inheritLocale: "使用界面语言",
4358
+ unsupportedLocale: "请选择支持的语言",
4359
+ localeHint: "对话中的明确要求仍然决定回复语言。",
4360
+ toolTopology: "子代理工具",
4361
+ topologyHint: "per-role:每个角色一个工具,另有一个类别工具。parameterized:在工具参数中选择角色或类别。",
4362
+ levelName: "等级:{level}",
4269
4363
  levelMode: "{level} 覆盖",
4270
- levelUnconfigured: "未配置或继承部署等级",
4271
- levelEffortOnly: "仅精确推理强度",
4272
- levelFullRoute: "完整提供商与模型路由",
4273
- normalLevel: "normal · 默认路由(只读别名;省略即 normal)",
4274
- orchestratorLevels: "普通 orchestrator 根会话没有调用等级,不改变其原生模型。",
4275
- levelsHint: "等级代表调用资源,不代表流程等级。请求未配置等级会被拒绝;仅强度覆盖使用已解析模型;完整路由同时替换模型和强度。",
4276
- namedRole: "{name} 的具名配置可用性",
4277
- namedRoleHint: "省略时继承已捕获部署上限。必需角色不可禁用;启用请求不能突破启动或部署限制。禁用角色仍可编辑路由。",
4278
- availabilityUnknown: "角色可用性元数据不可用,不能猜测必需集合或启动与部署上限。请求更改可用性前请刷新。",
4279
- roleRequired: "必需角色 · {reason}",
4280
- roleOptional: "可选角色",
4281
- roleCeiling: "启动:{startup};部署:{deployment};捕获准入:{admitted}。",
4364
+ levelUnconfigured: "使用部署等级",
4365
+ levelEffortOnly: "仅推理强度",
4366
+ levelFullRoute: "提供商、模型与强度",
4367
+ normalLevel: "normal · 默认路由",
4368
+ orchestratorLevels: "orchestrator 没有调用等级。",
4369
+ levelsHint: "只有已配置的等级可用。仅强度会保留配置中的模型;完整路由会同时替换模型和强度。",
4370
+ namedRole: "启用 {name}",
4371
+ namedRoleHint: "必需角色保持启用;部署已禁用的角色无法在此启用。",
4372
+ availabilityUnknown: "角色可用性未知,请刷新后再改。",
4373
+ roleRequired: "必需 · {reason}",
4374
+ roleOptional: "可选",
4375
+ roleCeiling: "启动:{startup};部署:{deployment};当前:{admitted}。",
4282
4376
  roleProvenance: "来源:{source};捕获:{capture}。",
4283
- roleUnavailableReason: "可用性原因:{reason}。",
4284
- admittedRoles: "已捕获角色可用性",
4285
- bindingUnknown: "尚未确认子 Agent 运行时绑定,不能从配置推断投递守卫已就绪。",
4286
- bindingState: "捕获的子 Agent 绑定:{binding};投递守卫:{ready};需重启:{restart}。守卫就绪不证明持久化或 child 委派支持。",
4287
- bindingReason: "绑定原因:{reason}。",
4288
- sessionModelHint: "应用或固定基线保留原生根模型和已有子会话。只有「使用配置档模型」会明确请求原生模型切换。",
4289
- savedOnlyHint: "选择编辑器对应的已保存固定修订,而不是脏草稿。保存不会选择或应用。",
4290
- centralOrigin: "具名资源:共享中央存储。",
4291
- legacyOrigin: "具名资源:旧原生配置存储(只读)。",
4292
- explicitOrigin: "具名资源:显式指定的存储。",
4293
- readOnlyOrigin: "此旧存储只读,不复制或迁移文件;选择与当前会话操作仍使用各自的权限。",
4294
- headerCompactProfiles: "配置档 · 保留模型",
4377
+ roleUnavailableReason: "原因:{reason}。",
4378
+ admittedRoles: "角色可用性",
4379
+ bindingUnknown: "子代理就绪状态未知,请刷新确认。",
4380
+ bindingState: "子代理就绪:{ready};需重启:{restart}。",
4381
+ bindingReason: "原因:{reason}。",
4382
+ sessionModelHint: "选择配置会保留当前模型;「使用配置中的模型」才会切换。",
4383
+ savedOnlyHint: "请先保存再选择此配置。",
4384
+ centralOrigin: "共享存储。",
4385
+ legacyOrigin: "旧的只读存储。",
4386
+ explicitOrigin: "自定义存储。",
4387
+ readOnlyOrigin: "这些旧配置为只读。",
4388
+ headerCompactProfiles: "配置 · 保留模型",
4295
4389
  headerCompactRefresh: "刷新",
4296
4390
  headerNoSession: "选择会话后可更改。",
4297
- sessionNewRequired: "应用配置档或基线需要新会话。仍可保存配置档或设置未来默认。",
4298
- sessionModuleOff: "此会话捕获的模块设置不允许使用 Deepwork。",
4391
+ sessionNewRequired: "请新建会话后更改其配置。仍可保存配置或设置新会话的默认配置。",
4392
+ sessionModuleOff: "此会话无法使用 Deepwork。",
4299
4393
  headerModeEnable: "启用 Deepwork",
4300
4394
  headerModeDisable: "关闭 Deepwork",
4301
4395
  headerModePreset: "Deepwork · DW 预设",
4302
4396
  headerModeUnavailable: "Deepwork 不可用",
4303
4397
  headerModeOn: "Deepwork 已启用。",
4304
4398
  headerModeOff: "Deepwork 已关闭。",
4305
- headerUseCurrentModel: "使用配置档模型",
4306
- title: "Deepwork 配置档",
4307
- description: "保存独立的运行时配置,并选择新会话使用的配置档。",
4308
- newSessions: "此固定修订仅作为未来会话默认值。当前准入与已有子会话不变;明确的会话选择保留自己的权限。",
4309
- editorSelect: "要编辑的配置档",
4310
- choose: "选择配置档",
4311
- newDraft: "新的未保存配置档",
4312
- new: "新建配置档",
4313
- profileId: "配置档 ID(名称)",
4314
- idHint: "使用 1–64 个小写字母、数字、连字符或下划线。保存后不能修改 ID。可在 JSONC 文档中添加可选的显示名称 label。",
4315
- configuration: "运行时配置(JSONC)",
4316
- configurationHint: "文档包含 version: 1、相同 id、可选 label 和 settings。支持角色路由与调用等级、语言、角色可用性、拓扑、流程、守卫、恢复、校准与默认推理强度。已退休的最高强度预设字段会被拒绝,不自动迁移。",
4317
- structuralHint: "技能、提示内容、预设安装、提供商与账户、后台与深度及任意路由权限仅可在部署中配置。请勿粘贴凭证。JSONC 与结构化控件共享草稿,不规范化无关字节。",
4318
- save: "保存配置档",
4319
- saving: "正在保存配置档…",
4320
- apply: "设为未来默认",
4321
- applying: "正在选择未来默认…",
4322
- reset: "未来会话使用基线",
4323
- resetting: "正在重置未来默认…",
4324
- refresh: "刷新配置档",
4325
- refreshing: "正在刷新配置档…",
4326
- reload: "重新加载已保存配置档",
4327
- loading: "正在加载配置档…",
4328
- reading: "正在读取配置档…",
4329
- empty: "尚无已保存的配置档。可新建配置档;当前仍应用部署基线。",
4330
- baseline: "新会话使用:部署基线。",
4331
- appliedProfile: "新会话使用:{id}(修订 {revision})。",
4332
- appliedInvalid: "无法确认保存的选择。已有会话未改变。请先解决 Host 诊断,再应用或重置配置档。",
4333
- selectionConflict: "保存的选择已被此 Host 之外的操作修改。此 Host 的新会话仍使用上方策略。请应用已保存配置档或重置为基线以协调选择;重启将采用保存的选择。已有会话未改变。",
4334
- dirty: "草稿与保存版本不同。选择前请保存或明确丢弃。",
4335
- savedNotApplied: "保存的来源版本与未来默认记录不同,或尚未选择此配置档。",
4336
- savedApplied: "保存的来源版本与未来默认记录一致,但未必是当前准入。",
4337
- versionObserved: "已观测元数据",
4338
- versionAbsent: "未存储",
4339
- versionUnknown: "版本不可用",
4340
- savedRelationshipUnknown: "已保存;与所选来源版本的关系未知,请刷新核对当前元数据。",
4341
- savedRefreshRequired: "已提交——请重新加载受影响的来源后再编辑或选择,不会自动重放。",
4342
- saved: "已保存 {id},未改变已应用的策略。",
4343
- applied: "已为新会话应用 {id},已有会话未改变。",
4344
- resetDone: "已为新会话重置为部署基线,已有会话未改变。",
4345
- discardPrompt: "切换编辑器之前,是否丢弃未保存的草稿?",
4346
- discard: "丢弃更改",
4399
+ headerUseCurrentModel: "使用配置中的模型",
4400
+ title: "Deepwork 配置",
4401
+ description: "保存配置并选择新会话使用的默认配置。",
4402
+ newSessions: "选择新会话使用的配置,已有会话不变。",
4403
+ editorSelect: "配置",
4404
+ choose: "选择配置",
4405
+ newDraft: "未保存的新配置",
4406
+ new: "新建配置",
4407
+ profileId: "配置 ID",
4408
+ idHint: "1–64 个小写字母、数字、连字符或下划线,保存后不可修改。",
4409
+ configuration: "配置内容(JSONC)",
4410
+ configurationHint: "使用 version: 1、与上方一致的 ID 和 settings;label 可选,用于显示名称。",
4411
+ structuralHint: "权限、账户和插件在应用设置中管理。",
4412
+ save: "保存",
4413
+ saving: "正在保存…",
4414
+ apply: "设为新会话默认配置",
4415
+ applying: "正在设置…",
4416
+ reset: "使用默认配置",
4417
+ resetting: "正在恢复…",
4418
+ refresh: "刷新",
4419
+ refreshing: "正在刷新…",
4420
+ reload: "重新加载已保存版本",
4421
+ loading: "加载中…",
4422
+ reading: "读取中…",
4423
+ empty: "尚无已保存的配置,请先新建。",
4424
+ baseline: "默认配置",
4425
+ appliedProfile: "{id}",
4426
+ appliedInvalid: "默认选择未确认,请解决下方错误并刷新。已有会话不变。",
4427
+ selectionConflict: "默认配置已在别处改变,此宿主仍使用上方选择。请选择配置或默认配置来更新;重启后会采用已保存的选择。",
4428
+ dirty: "有未保存的更改,请先保存或丢弃再选择此配置。",
4429
+ savedNotApplied: "已保存,但不是新会话默认配置。",
4430
+ savedApplied: "已保存,是新会话默认配置。",
4431
+ versionObserved: "可用",
4432
+ versionAbsent: "未保存",
4433
+ versionUnknown: "未知",
4434
+ savedRelationshipUnknown: "已保存,请刷新确认是否为默认配置。",
4435
+ savedRefreshRequired: "已保存,请重新加载后再编辑或选择。",
4436
+ saved: "已保存 {id}。",
4437
+ applied: "新会话将使用 {id},已有会话不变。",
4438
+ resetDone: "新会话将使用默认配置,已有会话不变。",
4439
+ discardPrompt: "是否丢弃未保存的草稿?",
4440
+ discard: "丢弃",
4347
4441
  cancel: "取消",
4348
- conflict: "已保存文件或选择已被其他操作修改。草稿和原选择已保留。请刷新配置档,然后重新加载已保存配置档或检查草稿后重试。",
4349
- validation: "此配置档无效。请修正下方字段;草稿未改变。",
4350
- io: "Host 无法提交此操作。草稿和原选择已保留。请检查配置档存储权限,刷新后重试。",
4351
- unavailable: "原生配置档服务不可用。草稿已保留。Host 重新连接或启用 Deepwork 后请刷新。",
4352
- transport: "原生连接无法确认此操作。草稿已保留。重试之前请刷新 Host 状态;不要假定保存或应用已完成。",
4353
- invalidProfile: "不可用配置档:{id}",
4354
- details: "Host 诊断",
4355
- retry: "请解决诊断问题,刷新配置档后重试。",
4356
- globalScope: "未来会话的全局默认值",
4357
- sessionScope: "当前原生会话",
4358
- sessionSelect: "当前会话配置档",
4359
- globalActionHint: "「设为未来默认」只为未来会话选择已保存修订,不应用到当前会话。",
4360
- headerProfile: "配置档",
4361
- headerProfileLabel: "当前会话配置档(会话栏)",
4362
- headerCaptured: "已捕获准入 · 精确配置档不可用",
4363
- headerSavedUnavailable: "保存的配置档不可用",
4364
- headerCurrentProfile: "当前配置档:{profile}",
4365
- headerRefresh: "刷新配置档和当前会话状态",
4366
- headerUseModelAction: "使用配置档模型:{profile}",
4367
- headerLoading: "加载配置档…",
4368
- headerApplying: "应用配置档…",
4369
- headerApplied: "配置档已应用。",
4442
+ conflict: "已保存文件或选择在别处改变,草稿已保留。请刷新后重新加载或检查草稿再重试。",
4443
+ validation: "此配置无效,请修正下方字段;草稿未改变。",
4444
+ io: "无法保存,草稿已保留。请检查配置存储权限后重试。",
4445
+ unavailable: "配置服务暂不可用,草稿已保留。请重新连接后刷新。",
4446
+ transport: "连接中断,结果未知,草稿已保留。请刷新后再试。",
4447
+ invalidProfile: "配置不可用:{id}",
4448
+ details: "详情",
4449
+ retry: "请解决所示问题,刷新后重试。",
4450
+ globalScope: "新会话默认配置",
4451
+ sessionScope: "本次会话配置",
4452
+ sessionSelect: "本次会话配置",
4453
+ globalActionHint: "设为默认只影响新会话。",
4454
+ headerProfile: "配置",
4455
+ headerProfileLabel: "本次会话配置",
4456
+ headerCaptured: "当前配置 · 来源未知",
4457
+ headerSavedUnavailable: "已保存的配置不可用",
4458
+ headerCurrentProfile: "当前配置:{profile}",
4459
+ headerRefresh: "刷新配置和会话状态",
4460
+ headerUseModelAction: "使用配置中的模型:{profile}",
4461
+ headerLoading: "正在加载配置…",
4462
+ headerApplying: "正在应用配置…",
4463
+ headerApplied: "配置已应用。",
4370
4464
  headerBusy: "会话忙碌。",
4371
- headerUnavailable: "配置档不可用。",
4465
+ headerUnavailable: "配置不可用。",
4372
4466
  headerDraft: "请在设置中保存或丢弃草稿。",
4373
- headerConflict: "会话配置档或准入代次已在其他位置改变,请刷新当前会话状态后重试。",
4374
- headerRefused: "未确认配置档更改,请检查设置。",
4375
- headerKeepModelGroup: "切换配置档 — 保留当前模型",
4376
- headerUseModelGroup: "切换并使用配置档模型",
4377
- headerModelDefaultHint: "普通切换保留当前模型。明确切换并使用模型还会像模型页一样保存原生模型默认值。",
4378
- headerNoProfileModel: "配置档已应用,未配置主模型。当前模型已保留。",
4379
- headerModelUnconfirmed: "配置档已应用,模型更改未确认。请检查模型或设置页。",
4380
- headerAppliedWithModel: "配置档和原生模型已应用。",
4381
- headerModelChoiceChanged: "配置档已应用,已保留更新的原生模型选择。",
4382
- headerActivationRefused: "配置档启用被拒绝,请检查其配置和原生模型目录。",
4383
- headerSelectionRefused: "无法确认配置档更改。",
4467
+ headerConflict: "会话配置已在别处改变,请刷新后重试。",
4468
+ headerRefused: "配置更改未确认,请检查设置。",
4469
+ headerKeepModelGroup: "切换配置,保留当前模型",
4470
+ headerUseModelGroup: "切换配置和模型",
4471
+ headerModelDefaultHint: "普通切换保留当前模型;「切换配置和模型」也会像模型页一样更新默认模型。",
4472
+ headerNoProfileModel: "此配置未设置模型。",
4473
+ headerModelUnconfirmed: "模型更改未确认,请检查模型设置。",
4474
+ headerAppliedWithModel: "配置和模型已应用。",
4475
+ headerModelChoiceChanged: "已保留你最新选择的模型。",
4476
+ headerActionUnavailable: "此操作暂不可用,请刷新确认。",
4477
+ headerActivationRefused: "配置无法应用,请检查其配置和模型目录。",
4478
+ headerSelectionRefused: "无法确认配置更改。",
4384
4479
  headerIssueCode: "原因:{code}。",
4385
- headerIssueField: "配置字段:{field}。",
4386
- headerRetryHint: "请刷新配置档和当前会话状态,在设置或原生模型页解决所示问题,然后在会话空闲时重试。",
4387
- headerMaintenanceRefused: "原生维护正在占用此会话,原配置档已保留。",
4388
- headerBusyRefused: "会话正在运行,原配置档已保留。",
4389
- headerCancelledRefused: "配置档请求已取消,请刷新当前会话状态后重试,不要假定更改已完成。",
4390
- headerUnavailableRefused: "原生会话或配置档服务不可用,请重新连接并刷新后重试。",
4391
- headerWaitRetryHint: "请等待原生运行或维护结束,然后刷新并重试。不会自动排队应用配置档。",
4392
- noSession: "未选择原生会话。无法应用到当前会话。",
4393
- sessionUnavailable: "无法确认当前会话。重试前请刷新状态;原策略已保留。",
4394
- sessionBusy: "暂不可切换:{reason}。Host 必须先保留真正空闲的普通会话。",
4395
- sessionState: "当前准入:{profile};范围 {scope}。",
4396
- sessionBaseline: "部署基线",
4397
- sessionGlobalCaptured: "已捕获准入(精确配置档身份不可用)",
4398
- sessionAdmittedProfile: "{id}(修订 {revision})",
4399
- sessionFutureDefault: "未来没有独立选择的会话的全局默认值:{profile}。这不会改变当前会话的准入。",
4400
- sessionConflict: "会话选择或准入代次已在其他位置改变。原显示和草稿已保留。再次应用前请刷新当前会话状态。",
4401
- sessionApply: "应用配置档到当前会话",
4402
- sessionApplying: "正在应用当前会话配置档…",
4403
- sessionReset: "为当前会话固定基线",
4404
- sessionResetting: "正在固定当前会话基线…",
4405
- sessionRefresh: "刷新当前会话状态",
4406
- sessionApplied: "已仅对此会话应用保存的修订。全局默认值和已有子会话未改变。",
4407
- sessionResetDone: "已仅对此会话固定部署基线。全局默认值未改变。",
4408
- sessionDirty: "应用当前会话选择之前,请保存或明确丢弃编辑器草稿。",
4409
- sessionAppliedWithModel: "已应用此会话配置档,并明确选择其原生主模型。模型默认值像模型页一样保存;全局配置档默认值未改变。",
4410
- roleState: "准入路由 {route};策略 {strategy};重试 {retries};限流失败 {failures};切换 {switches};累计延迟 {delay} 毫秒。",
4411
- catalogTitle: "原生模型目录",
4412
- catalogHint: "目录仅供参考,不是网络或账户健康检查。未列出或手动路由仍可编辑;刷新不会改变草稿或原生模型默认值。",
4413
- catalogUnavailable: "原生模型目录不可用。仍可使用手动提供商、模型、强度字段和高级 JSONC。",
4480
+ headerIssueField: "字段:{field}。",
4481
+ headerRetryHint: "请刷新,在设置或模型页解决问题,然后在会话空闲时重试。",
4482
+ headerMaintenanceRefused: "会话正在处理其他操作,请稍后重试。",
4483
+ headerBusyRefused: "会话正在运行,请结束后重试。",
4484
+ headerCancelledRefused: "已取消,请刷新确认当前配置。",
4485
+ headerUnavailableRefused: "无法读取会话配置,请重新连接后刷新。",
4486
+ headerWaitRetryHint: "请稍后刷新并重试。",
4487
+ noSession: "选择会话后可更改配置。",
4488
+ sessionUnavailable: "无法确认当前会话,请刷新后重试。",
4489
+ sessionBusy: "暂不可切换:{reason}。请等待会话空闲后重试。",
4490
+ sessionState: "{profile}",
4491
+ sessionBaseline: "默认配置",
4492
+ sessionGlobalCaptured: "当前配置(来源未知)",
4493
+ sessionAdmittedProfile: "{id}",
4494
+ sessionFutureDefault: "新会话默认配置:{profile}。",
4495
+ sessionConflict: "会话配置已在别处改变,草稿已保留。请刷新后重试。",
4496
+ sessionApply: "使用此配置",
4497
+ sessionApplying: "正在应用…",
4498
+ sessionReset: "使用默认配置",
4499
+ sessionResetting: "正在恢复…",
4500
+ sessionRefresh: "刷新会话状态",
4501
+ sessionApplied: "已仅应用到本次会话,新会话默认配置和已有子会话不变。",
4502
+ sessionResetDone: "本次会话已使用默认配置,新会话默认配置不变。",
4503
+ sessionAppliedWithModel: "已应用此配置并选择了它的模型,全局配置默认值未改变。",
4504
+ sessionDirty: "选择本次会话配置前,请保存或丢弃草稿。",
4505
+ roleState: "路由 {route};策略 {strategy};重试 {retries};限流失败 {failures};切换 {switches};累计延迟 {delay} 毫秒。",
4506
+ catalogTitle: "模型目录",
4507
+ catalogHint: "未列出的模型可以手动输入。",
4508
+ catalogUnavailable: "模型目录不可用,提供商、模型和强度仍可填写。",
4414
4509
  catalogRefresh: "刷新模型目录",
4415
- catalogRefreshing: "正在刷新模型目录…",
4510
+ catalogRefreshing: "正在刷新…",
4416
4511
  catalogFailure: "提供商目录不可用:{name}({id})。",
4417
- profileLabel: "配置档显示名称",
4512
+ profileLabel: "配置名称",
4418
4513
  defaultActive: "默认 Deepwork 模式",
4419
- activeHint: "此默认值不会抹除已明确保存的会话模式。",
4514
+ activeHint: "会话中选择的模式优先。",
4420
4515
  enabled: "启用",
4421
4516
  disabled: "禁用",
4422
- inherit: "继承部署基线",
4423
- profileDefaults: "配置档运行时默认值",
4424
- roleSelect: "要编辑的 Agent 角色",
4425
- rolesUnavailable: "原生角色列表不可用,请使用高级 JSONC",
4426
- roleEnabled: "原生部署中已启用",
4427
- roleDisabled: "原生部署中已禁用",
4517
+ inherit: "使用部署基线",
4518
+ profileDefaults: "默认值",
4519
+ roleSelect: "角色",
4520
+ rolesUnavailable: "角色列表不可用,请刷新或使用高级编辑器。",
4521
+ roleEnabled: "应用设置中已启用",
4522
+ roleDisabled: "应用设置中已禁用",
4428
4523
  strategy: "{name} 策略",
4429
4524
  inheritStrategy: "继承({value})",
4430
- startupLock: "startup-lock — 保留准入路由",
4431
- rateFallback: "rate-limit-fallback — 达到阈值后按顺序切换",
4432
- strategyHint: "两种策略均使用有限且已证明无输出的 RATE_LIMIT 重试。普通、认证或配额失败不允许切换模型。数字留空表示继承,零是明确值。",
4525
+ startupLock: "保留起始路由",
4526
+ rateFallback: "多次限流后切换",
4527
+ strategyHint: "仅在限流且没有输出时切换模型;认证或配额错误会停止尝试。留空表示继承,零是明确值。",
4433
4528
  retryField: "{name} {field}",
4434
4529
  inheritNumber: "继承 {value}",
4435
4530
  retryBounds: "整数 {min}–{max};继承值 {value}。",
@@ -4438,35 +4533,35 @@ var zh = {
4438
4533
  initialDelay: "初始延迟(毫秒)",
4439
4534
  maxDelay: "最大单次延迟(毫秒)",
4440
4535
  totalWait: "累计等待上限(毫秒)",
4441
- switchThreshold: "切换前的限流失败次数",
4536
+ switchThreshold: "切换前的限流次数",
4442
4537
  maxSwitches: "最大切换次数",
4443
4538
  primaryMode: "{name} 主路由",
4444
- inheritRoute: "继承原生或部署路由",
4539
+ inheritRoute: "继承部署路由",
4445
4540
  configuredRoute: "配置主路由",
4446
4541
  primaryName: "{name} 主路由",
4447
4542
  fallbackMode: "{name} 备用链",
4448
4543
  inheritChain: "继承部署备用链",
4449
4544
  configuredChain: "明确的有序备用链",
4450
- emptyChain: "明确为空的备用链:没有已配置备用路由。",
4545
+ emptyChain: "空备用链:没有备用路由。",
4451
4546
  fallbackName: "{name} 备用 {index}",
4452
- addFallback: "为 {name} 添加备用路由",
4547
+ addFallback: "为 {name} 添加备用",
4453
4548
  removeFallback: "移除 {name}",
4454
4549
  moveUp: "上移 {name}",
4455
4550
  moveDown: "下移 {name}",
4456
4551
  routeProvider: "{name} 提供商",
4457
4552
  routeModel: "{name} 模型",
4458
- routeEffort: "{name} 精确强度",
4459
- manualProvider: "{name} 手动提供商",
4460
- manualModel: "{name} 手动模型",
4461
- manualEffort: "{name} 手动精确强度",
4462
- manual: "输入手动标识",
4463
- manualValue: "手动或未列出:{value}",
4553
+ routeEffort: "{name} 强度",
4554
+ manualProvider: "{name} 提供商(手动)",
4555
+ manualModel: "{name} 模型(手动)",
4556
+ manualEffort: "{name} 强度(手动)",
4557
+ manual: "输入标识",
4558
+ manualValue: "未列出:{value}",
4464
4559
  unset: "未设置",
4465
- effortDefault: "原生默认值(省略精确强度)",
4466
- effortChangeHint: "明确更改提供商或模型会清除该路由的精确强度。刷新目录会保留所有配置值;需要时请重新选择精确强度。",
4560
+ effortDefault: "默认(不指定强度)",
4561
+ effortChangeHint: "更改提供商或模型会清除该路由的推理强度。",
4467
4562
  advanced: "高级 JSONC",
4468
- rawInvalid: "原始草稿无效,暂不可结构化编辑。请修正高级 JSONC;字段、注释和字节均未自动规范化。",
4469
- invalidNumber: "保存或切换角色之前,请修正此有界整数。无效值尚未替换草稿中的策略。"
4563
+ rawInvalid: "请先在高级 JSONC 中修正草稿,再使用这些控件。草稿已保留。",
4564
+ invalidNumber: "请输入范围内的整数。"
4470
4565
  };
4471
4566
  var RETRY_FIELD_LABEL_KEYS = {
4472
4567
  maxRetries: "retryCount",
@@ -4503,9 +4598,12 @@ function RoleAvailability({ value, t }) {
4503
4598
  if (state === void 0) return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dsmm-hint", children: t("availabilityUnknown") });
4504
4599
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsmm-availability", "data-dsmm-role-availability": state.id, children: [
4505
4600
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: t(state.required ? "roleRequired" : "roleOptional", { reason: state.requiredReason ?? "—" }) }),
4506
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: t("roleCeiling", { startup: t(state.startupAvailable ? "enabled" : "disabled"), deployment: t(state.deploymentEnabled ? "enabled" : "disabled"), admitted: t(state.admitted ? "enabled" : "disabled") }) }),
4507
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dsmm-hint", children: t("roleProvenance", { source: state.source, capture: state.capture }) }),
4508
- state.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: t("roleUnavailableReason", { reason: state.reason }) })
4601
+ state.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: t("roleUnavailableReason", { reason: state.reason }) }),
4602
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("details", { children: [
4603
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("summary", { children: t("technicalDetails") }),
4604
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: t("roleCeiling", { startup: t(state.startupAvailable ? "enabled" : "disabled"), deployment: t(state.deploymentEnabled ? "enabled" : "disabled"), admitted: t(state.admitted ? "enabled" : "disabled") }) }),
4605
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dsmm-hint", children: t("roleProvenance", { source: state.source, capture: state.capture }) })
4606
+ ] })
4509
4607
  ] });
4510
4608
  }
4511
4609
 
@@ -4924,7 +5022,7 @@ function capabilityReason(reason, t) {
4924
5022
  case "new-session-required":
4925
5023
  return t("sessionNewRequired");
4926
5024
  default:
4927
- return t("headerUnavailable");
5025
+ return t("headerActionUnavailable");
4928
5026
  }
4929
5027
  }
4930
5028
  function menuIssue(issue) {
@@ -4938,8 +5036,11 @@ function SessionScope({ state, actions: actions2, t, compact = false }) {
4938
5036
  const labels = session === null ? null : sessionProfileLabels(session, t);
4939
5037
  const selected = state.snapshot?.profiles.find((profile) => profile.id === state.sessionChoice);
4940
5038
  const disabled = state.busy !== null || state.pendingEditor !== null || state.sessionBusy !== null || state.dirty || state.invalidFields.length > 0;
4941
- const current = () => actions2.readProfileView().currentSessionId === state.currentSessionId;
4942
- const ready = session !== null && !session.refreshRequired && !session.selection.refreshRequired && writableSelectionVersion(session.selection.selectionRevision);
5039
+ const current = () => {
5040
+ const live = actions2.readProfileView();
5041
+ return live.currentSessionId === state.currentSessionId && live.sessionViewEpoch === state.sessionViewEpoch && live.session === session;
5042
+ };
5043
+ const ready = session !== null && !state.sessionUnconfirmed && !session.refreshRequired && !session.selection.refreshRequired && writableSelectionVersion(session.selection.selectionRevision);
4943
5044
  const allowed = ready && session.canApplyOverlay === true && session.applyOverlayUnavailableReason !== "new-session-required";
4944
5045
  const modelAllowed = ready && session.canSelectModel === true && session.profileModel !== void 0;
4945
5046
  const status = state.sessionNotice === null ? "" : t(state.sessionNotice === "mode-on" ? "headerModeOn" : state.sessionNotice === "mode-off" ? "headerModeOff" : state.sessionNotice === "applied-with-model" ? "sessionAppliedWithModel" : state.sessionNotice === "applied" ? "sessionApplied" : "sessionResetDone");
@@ -4951,7 +5052,7 @@ function SessionScope({ state, actions: actions2, t, compact = false }) {
4951
5052
  }
4952
5053
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "dsmm-session-scope", "aria-busy": state.sessionBusy !== null, "data-dsmm-session-scope": true, children: [
4953
5054
  !compact && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { children: t("sessionScope") }),
4954
- state.currentSessionId === null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "dsmm-hint", children: t("noSession") }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5055
+ state.currentSessionId === null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "dsmm-hint", children: t("sessionChooseWorkspace") }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
4955
5056
  labels !== null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { "data-dsmm-session-state": true, children: labels.admitted }),
4956
5057
  labels !== null && !compact && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "dsmm-hint", "data-dsmm-session-future-default": true, children: labels.futureDefault }),
4957
5058
  session === null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "dsmm-hint", id: `${prefix}-overlay-reason`, children: t("sessionUnavailable") }),
@@ -4968,7 +5069,7 @@ function SessionScope({ state, actions: actions2, t, compact = false }) {
4968
5069
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "", children: t("sessionBaseline") }),
4969
5070
  state.sessionChoice !== null && selected === void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: state.sessionChoice, children: state.sessionChoice }),
4970
5071
  state.snapshot?.profiles.map((profile) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("option", { value: profile.id, disabled: !isConfigRevision(profile.revision) || profile.error !== void 0, children: [
4971
- profile.label?.trim() ? `${profile.label} (${profile.id})` : profile.id,
5072
+ profile.label?.trim() || profile.id,
4972
5073
  profileWarnings(profile.warnings).length ? ` — ${t("warningProfile")}` : ""
4973
5074
  ] }, profile.id))
4974
5075
  ] })
@@ -4979,20 +5080,25 @@ function SessionScope({ state, actions: actions2, t, compact = false }) {
4979
5080
  if (current()) void actions2.useSessionProfileModel();
4980
5081
  }, children: t("headerUseCurrentModel") }),
4981
5082
  !modelAllowed && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "dsmm-hint", id: `${prefix}-model-reason`, children: capabilityReason(session?.selectModelUnavailableReason, t) }),
4982
- session !== null && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "dsmm-availability", children: [
4983
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: binding === void 0 ? t("bindingUnknown") : t("bindingState", { binding: binding.binding, ready: t(binding.deliveryFenceReady ? "enabled" : "disabled"), restart: t(binding.restartRequired ? "enabled" : "disabled") }) }),
4984
- binding?.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: t("bindingReason", { reason: binding.reason }) })
4985
- ] }),
4986
- session?.roles !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("details", { children: [
4987
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("summary", { children: t("admittedRoles") }),
4988
- session.roles.map((role3) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "dsmm-availability", children: [
4989
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: role3.id }),
4990
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RoleAvailability, { value: role3, t })
4991
- ] }, role3.id))
5083
+ session !== null && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("details", { children: [
5084
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("summary", { children: t("technicalDetails") }),
5085
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "dsmm-availability", children: [
5086
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: binding === void 0 ? t("bindingUnknown") : t("bindingState", { binding: binding.binding, ready: t(binding.deliveryFenceReady ? "enabled" : "disabled"), restart: t(binding.restartRequired ? "enabled" : "disabled") }) }),
5087
+ binding?.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: t("bindingReason", { reason: binding.reason }) })
5088
+ ] }),
5089
+ session.roles !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("details", { children: [
5090
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("summary", { children: t("admittedRoles") }),
5091
+ session.roles.map((role3) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "dsmm-availability", children: [
5092
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: role3.id }),
5093
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RoleAvailability, { value: role3, t })
5094
+ ] }, role3.id))
5095
+ ] }),
5096
+ session.rolePolicy !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { "data-dsmm-session-policy": true, children: t("roleState", { route: session.rolePolicy.route === void 0 ? t("inheritRoute") : `${session.rolePolicy.route.provider}/${session.rolePolicy.route.model}${session.rolePolicy.route.reasoningEffort === void 0 ? "" : ` (${session.rolePolicy.route.reasoningEffort})`}`, strategy: session.rolePolicy.strategy, retries: session.rolePolicy.retries, failures: session.rolePolicy.rateLimitFailures, switches: session.rolePolicy.switches, delay: session.rolePolicy.totalDelayMs }) })
4992
5097
  ] })
4993
5098
  ] }),
4994
5099
  state.dirty && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "dsmm-hint", children: t("sessionDirty") }),
4995
- (session?.refreshRequired || session?.selection.refreshRequired) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { role: "status", children: t("savedRefreshRequired") }),
5100
+ (session?.refreshRequired || session?.selection.refreshRequired) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { role: "status", children: t("sessionCommittedRefresh") }),
5101
+ state.sessionUnconfirmed && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { role: "status", children: t("sessionUnconfirmedRefresh") }),
4996
5102
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "dsmm-actions", children: [
4997
5103
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_dsh_client_ui_primitives3.Button, { type: "button", variant: "outline", disabled: disabled || !allowed || state.sessionChoice !== null && !isConfigRevision(selected?.revision), "aria-describedby": !allowed ? `${prefix}-overlay-reason` : void 0, onClick: () => {
4998
5104
  if (current()) void actions2.applySession();
@@ -5003,8 +5109,7 @@ function SessionScope({ state, actions: actions2, t, compact = false }) {
5003
5109
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_dsh_client_ui_primitives3.Button, { type: "button", variant: "outline", disabled: state.sessionBusy !== null || state.busy !== null || state.pendingEditor !== null, onClick: () => {
5004
5110
  if (current()) void actions2.refreshSession();
5005
5111
  }, children: t("sessionRefresh") })
5006
- ] }),
5007
- !compact && session?.rolePolicy !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { "data-dsmm-session-policy": true, children: t("roleState", { route: session.rolePolicy.route === void 0 ? t("inheritRoute") : `${session.rolePolicy.route.provider}/${session.rolePolicy.route.model}${session.rolePolicy.route.reasoningEffort === void 0 ? "" : ` (${session.rolePolicy.route.reasoningEffort})`}`, strategy: session.rolePolicy.strategy, retries: session.rolePolicy.retries, failures: session.rolePolicy.rateLimitFailures, switches: session.rolePolicy.switches, delay: session.rolePolicy.totalDelayMs }) })
5112
+ ] })
5008
5113
  ] }),
5009
5114
  state.sessionIssue !== null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { role: "alert", children: state.sessionIssue.source === "profile-model" ? t(state.sessionIssue.code === "model-unconfigured" ? "headerNoProfileModel" : state.sessionIssue.code === "model-choice-changed" ? "headerModelChoiceChanged" : "headerModelUnconfirmed") : state.sessionIssue.code === "conflict" ? t("sessionConflict") : ["busy", "maintenance", "disposed", "not-owned"].includes(state.sessionIssue.code) ? t("sessionBusy", { reason: state.sessionIssue.code }) : t(state.sessionIssue.code === "validation" ? "validation" : "sessionUnavailable") }),
5010
5115
  state.sessionIssue !== null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IssueDetails, { issue: state.sessionIssue, t }),
@@ -5028,23 +5133,24 @@ function SessionProfiles(props) {
5028
5133
  const profiles = state.snapshot?.profiles ?? [];
5029
5134
  const currentSaved = profiles.find((profile) => profile.id === current);
5030
5135
  const committing = state.sessionBusy !== null;
5031
- const unavailable = id2 === null || committing || state.busy !== null || session === null || session.refreshRequired === true || session.selection.refreshRequired === true;
5136
+ const unavailable = id2 === null || committing || state.busy !== null || state.sessionUnconfirmed || session === null || session.refreshRequired === true || session.selection.refreshRequired === true;
5032
5137
  const profileDisabled = unavailable || state.pendingEditor !== null || state.dirty || state.invalidFields.length > 0 || session === null || !writableSelectionVersion(session.selection.selectionRevision);
5033
5138
  const disabled = profileDisabled || session?.canApplyOverlay !== true || session?.applyOverlayUnavailableReason === "new-session-required" || state.snapshot === null;
5034
5139
  let feedback = "";
5035
- if (state.sessionIssue !== null) feedback = t(state.sessionIssue.source === "profile-model" ? state.sessionIssue.code === "model-unconfigured" ? "headerNoProfileModel" : state.sessionIssue.code === "model-choice-changed" ? "headerModelChoiceChanged" : "headerModelUnconfirmed" : state.sessionIssue.code === "conflict" ? "headerConflict" : state.sessionIssue.code === "activation" ? "headerActivationRefused" : state.sessionIssue.code === "maintenance" ? "headerMaintenanceRefused" : state.sessionIssue.code === "busy" ? "headerBusyRefused" : state.sessionIssue.code === "cancelled" ? "headerCancelledRefused" : state.sessionIssue.code === "unavailable" || state.sessionIssue.kind === "assembly" ? "headerUnavailableRefused" : "headerSelectionRefused");
5140
+ if (state.sessionUnconfirmed) feedback = t("sessionUnconfirmedRefresh");
5141
+ else if (session?.refreshRequired || session?.selection.refreshRequired) feedback = t("sessionCommittedRefresh");
5142
+ else if (state.sessionIssue !== null) feedback = t(state.sessionIssue.source === "profile-model" ? state.sessionIssue.code === "model-unconfigured" ? "headerNoProfileModel" : state.sessionIssue.code === "model-choice-changed" ? "headerModelChoiceChanged" : "headerModelUnconfirmed" : state.sessionIssue.code === "conflict" ? "headerConflict" : state.sessionIssue.code === "activation" ? "headerActivationRefused" : state.sessionIssue.code === "maintenance" ? "headerMaintenanceRefused" : state.sessionIssue.code === "busy" ? "headerBusyRefused" : state.sessionIssue.code === "cancelled" ? "headerCancelledRefused" : state.sessionIssue.code === "unavailable" || state.sessionIssue.kind === "assembly" ? "headerUnavailableRefused" : "headerSelectionRefused");
5036
5143
  else if (committing || state.busy !== null) feedback = t(state.sessionBusy === "apply" || state.sessionBusy === "reset" ? "headerApplying" : "headerLoading");
5037
5144
  else if (state.dirty || state.invalidFields.length > 0 || state.pendingEditor !== null) feedback = t("headerDraft");
5038
- else if (id2 === null) feedback = t("headerNoSession");
5145
+ else if (id2 === null) feedback = t("sessionChooseWorkspace");
5039
5146
  else if (session === null || state.snapshot === null) feedback = t("headerUnavailable");
5040
- else if (session.refreshRequired || session.selection.refreshRequired) feedback = t("savedRefreshRequired");
5041
5147
  else if (state.sessionNotice !== null) feedback = t(state.sessionNotice === "mode-on" ? "headerModeOn" : state.sessionNotice === "mode-off" ? "headerModeOff" : state.sessionNotice === "applied-with-model" ? "headerAppliedWithModel" : "headerApplied");
5042
- const profileName = unknownCaptured ? t("headerCaptured") : admission !== void 0 && sourceRelationship(admission, currentSaved?.revision) === "current" && currentSaved?.label?.trim() ? `${currentSaved.label} (${currentSaved.id})` : admission?.selectedId ?? t("sessionBaseline");
5148
+ const profileName = unknownCaptured ? t("headerCaptured") : admission !== void 0 && sourceRelationship(admission, currentSaved?.revision) === "current" && currentSaved?.label?.trim() ? currentSaved.label : admission?.selectedId ?? t("sessionBaseline");
5043
5149
  const currentLabel = t("headerCurrentProfile", { profile: session === null ? t("headerUnavailable") : profileName });
5044
5150
  const entries = [{ type: "label", id: "@current", text: currentLabel }];
5045
5151
  for (const warning of profileWarnings(session?.warnings)) entries.push({ type: "label", id: `@warning:${warning.code}`, text: t("warningMarker", { code: warning.code, field: warning.field }) });
5046
- if (id2 === null && state.snapshot !== null) entries.push({ type: "label", id: "@future", text: t("sessionFutureDefault", { profile: state.snapshot.profiles.find((profile) => profile.id === state.snapshot.selectedId)?.label?.trim() || state.snapshot.selectedId || t("sessionBaseline") }) });
5047
- if (feedback !== "" && (state.sessionNotice === null || state.sessionIssue !== null)) entries.push({ type: "label", id: "@status", text: feedback });
5152
+ if ((id2 === null || session?.canApplyOverlay === true) && state.snapshot !== null) entries.push({ type: "label", id: "@future", text: t("sessionFutureDefault", { profile: state.snapshot.profiles.find((profile) => profile.id === state.snapshot.selectedId)?.label?.trim() || state.snapshot.selectedId || t("sessionBaseline") }) });
5153
+ if (feedback !== "" && (state.sessionNotice === null || state.sessionIssue !== null || state.sessionUnconfirmed || session?.refreshRequired || session?.selection.refreshRequired)) entries.push({ type: "label", id: "@status", text: feedback });
5048
5154
  const mode = session?.deepwork;
5049
5155
  entries.push({
5050
5156
  id: "@mode",
@@ -5054,7 +5160,7 @@ function SessionProfiles(props) {
5054
5160
  if (session !== null && session.canToggleMode !== true) entries.push({ type: "label", id: "@mode-reason", text: capabilityReason(session.toggleModeUnavailableReason, t) });
5055
5161
  const diagnostic2 = state.sessionIssue === null ? null : menuIssue(state.sessionIssue);
5056
5162
  const diagnosticText = diagnostic2 === null ? "" : t("headerIssueCode", { code: diagnostic2.code }) + (diagnostic2.field === void 0 ? "" : ` ${t("headerIssueField", { field: diagnostic2.field })}`);
5057
- const retryHint = t(diagnostic2?.code === "maintenance" || diagnostic2?.code === "busy" ? "headerWaitRetryHint" : "headerRetryHint");
5163
+ const retryHint = t(state.sessionUnconfirmed ? "sessionUnconfirmedRefresh" : diagnostic2?.code === "maintenance" || diagnostic2?.code === "busy" ? "headerWaitRetryHint" : "headerRetryHint");
5058
5164
  if (diagnostic2 !== null) entries.push({ type: "label", id: "@diagnostic", text: diagnosticText }, { type: "label", id: "@retry", text: retryHint });
5059
5165
  if (admission?.selectedId != null && currentSaved === void 0) entries.push({ id: admission.selectedId, label: `${admission.selectedId} — ${t("headerSavedUnavailable")}`, disabled: true });
5060
5166
  if (unknownCaptured) entries.push({ id: "__dsmm_captured_default__", label: t("headerCaptured"), disabled: true });
@@ -5080,12 +5186,13 @@ function SessionProfiles(props) {
5080
5186
  anchor: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_dsh_client_ui_primitives3.Button, { type: "button", size: "sm", variant: "toolbar", className: "dsmm-profile-trigger", icon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_dsh_client_ui_primitives3.IconBranchOutlineRegular, {}), "aria-label": t("headerProfileLabel"), "aria-haspopup": "menu", "aria-expanded": open, "aria-describedby": `${prefix}-feedback`, onClick: () => setOpenFor(open ? void 0 : id2) }),
5081
5187
  onClose: () => setOpenFor(void 0),
5082
5188
  onSelect: (value) => {
5083
- if (props.readProfileView().currentSessionId !== id2) return;
5189
+ const live = props.readProfileView();
5190
+ if (live.currentSessionId !== id2 || live.sessionViewEpoch !== state.sessionViewEpoch || live.session !== session) return;
5084
5191
  if (value === "@refresh") {
5085
5192
  if (committing || state.busy !== null) return;
5086
5193
  void (async () => {
5087
5194
  await props.refresh();
5088
- if (id2 !== null && props.readProfileView().currentSessionId === id2) await props.refreshSession();
5195
+ if (id2 !== null && props.readProfileView().currentSessionId === id2 && props.readProfileView().sessionViewEpoch === state.sessionViewEpoch) await props.refreshSession();
5089
5196
  })();
5090
5197
  } else {
5091
5198
  const row = entries.find((entry) => entry.id === value && !("type" in entry));
@@ -5169,10 +5276,7 @@ function ProfilesSection(props) {
5169
5276
  else if (snapshot4?.selectedId !== null && snapshot4?.selectedId !== void 0) selection = t("appliedProfile", { id: snapshot4.selectedId, revision: t(configurationVersionState(snapshot4.sourceRevision)) });
5170
5277
  const notice = state.notice === null ? "" : t(state.notice.key === "reset" ? "resetDone" : state.notice.key, { id: state.notice.id });
5171
5278
  const warnings2 = editor === null ? [] : draftWarnings(editor.content);
5172
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "dsmm-profiles", "aria-labelledby": `${prefix}-title`, "aria-busy": state.busy !== null, children: [
5173
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { id: `${prefix}-title`, children: t("title") }),
5174
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { children: t("description") }),
5175
- snapshot4?.origin !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t(snapshot4.origin === "legacy" ? "legacyOrigin" : snapshot4.origin === "central" ? "centralOrigin" : "explicitOrigin") }),
5279
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "dsmm-profiles", "aria-label": t("title"), "aria-busy": state.busy !== null, children: [
5176
5280
  readOnly && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { role: "status", className: "dsmm-hint", children: t("readOnlyOrigin") }),
5177
5281
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "dsmm-zone", "aria-labelledby": `${prefix}-browse`, "data-dsmm-zone": "browse", children: [
5178
5282
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { id: `${prefix}-browse`, children: t("browseZone") }),
@@ -5198,9 +5302,8 @@ function ProfilesSection(props) {
5198
5302
  ] }),
5199
5303
  snapshot4.profiles.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("empty") })
5200
5304
  ] }),
5201
- snapshot4 !== null && snapshot4.profiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { className: "dsmm-profile-list", "aria-label": t("savedInventory"), children: snapshot4.profiles.map((profile, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { children: [
5305
+ snapshot4 !== null && snapshot4.profiles.some((profile) => profile.error !== void 0 || profile.warnings?.length) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { className: "dsmm-profile-list", "aria-label": t("savedInventory"), children: snapshot4.profiles.filter((profile) => profile.error !== void 0 || profile.warnings?.length).map((profile, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { children: [
5202
5306
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { children: profile.label?.trim() ? `${profile.label} (${profile.id})` : profile.id }),
5203
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("savedRevision", { revision: t(configurationVersionState(profile.revision)) }) }),
5204
5307
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProfileWarnings, { warnings: profile.warnings, t }),
5205
5308
  profile.error !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IssueDetails, { issue: profile.error, t })
5206
5309
  ] }, `${index}:${profile.id}`)) }),
@@ -5224,7 +5327,6 @@ function ProfilesSection(props) {
5224
5327
  editor === null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("noEditor") }),
5225
5328
  editor !== null && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "dsmm-editor", children: [
5226
5329
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { "data-dsmm-editor-state": true, children: t(editor.refreshRequired ? "savedRefreshRequired" : state.dirty ? "dirty" : applied ? "savedApplied" : relationship === "unknown" ? "savedRelationshipUnknown" : "savedNotApplied") }),
5227
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("savedRevision", { revision: t(editor.revision === null ? "versionAbsent" : configurationVersionState(editor.revision)) }) }),
5228
5330
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "dsmm-actions", children: [
5229
5331
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives4.Button, { type: "button", variant: "primary", disabled: editorDisabled || !state.dirty || snapshot4 === null || state.invalidFields.length > 0, onClick: () => {
5230
5332
  void props.save();
@@ -5247,8 +5349,6 @@ function ProfilesSection(props) {
5247
5349
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { id: `${prefix}-id-hint`, className: "dsmm-hint", children: t("idHint") })
5248
5350
  ] }),
5249
5351
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "dsmm-catalog", children: [
5250
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { children: t("catalogTitle") }),
5251
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("catalogHint") }),
5252
5352
  state.catalogUnavailable && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("catalogUnavailable") }),
5253
5353
  state.catalog?.failures.map((failure) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("catalogFailure", { name: failure.name, id: failure.id }) }, failure.id)),
5254
5354
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives4.Button, { type: "button", variant: "outline", disabled: state.catalogBusy, onClick: () => {
@@ -5273,16 +5373,13 @@ function ProfilesSection(props) {
5273
5373
  ] }),
5274
5374
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "dsmm-zone", "aria-labelledby": `${prefix}-global`, "data-dsmm-zone": "future-default", children: [
5275
5375
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { id: `${prefix}-global`, children: t("globalScope") }),
5276
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("newSessions") }),
5376
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { id: `${prefix}-global-action`, className: "dsmm-hint", children: t("newSessions") }),
5277
5377
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { "data-dsmm-selection": true, children: selection }),
5278
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("futurePin", { revision: t(configurationVersionState(snapshot4?.selectionRevision)) }) }),
5279
5378
  snapshot4?.refreshRequired && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { role: "status", children: t("savedRefreshRequired") }),
5280
5379
  snapshot4?.selectedWarnings?.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
5281
5380
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { children: t("futureWarnings") }),
5282
5381
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProfileWarnings, { warnings: snapshot4.selectedWarnings, t })
5283
5382
  ] }) : null,
5284
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "dsmm-hint", children: t("savedOnlyHint") }),
5285
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { id: `${prefix}-global-action`, className: "dsmm-hint", children: t("globalActionHint") }),
5286
5383
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "dsmm-actions", children: [
5287
5384
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives4.Button, { type: "button", variant: "primary", "aria-describedby": `${prefix}-global-action`, disabled: editorDisabled || state.dirty || editor?.revision == null || !reconcilable || applied && !selectionConflict, onClick: () => {
5288
5385
  void props.apply();
@@ -5866,7 +5963,7 @@ function moduleFor(path) {
5866
5963
  const key = path.split(".")[0];
5867
5964
  if (["defaultActive", "modules", "modelParameters", "runtime"].includes(key)) return "run";
5868
5965
  if (["roleRouting", "runtimePolicy", "runtimeRecovery"].includes(key)) return "routes";
5869
- if (["workflow", "roles", "skills", "presets", "businessLocale", "locale", "promptOrder", "plannerRootEnabled"].includes(key)) return "workflow";
5966
+ if (["workflow", "roles", "skills", "presets", "businessLocale", "locale", "promptOrder"].includes(key)) return "workflow";
5870
5967
  if (key === "subagents") return "subagents";
5871
5968
  if (["permissionControl", "guards"].includes(key)) return "permissions";
5872
5969
  return "other";
@@ -5891,21 +5988,21 @@ var deploymentEn = {
5891
5988
  global: "DSMM Global config",
5892
5989
  globalHint: "Shared by this Home’s DSH profiles. Unset fields use built-in defaults.",
5893
5990
  profile: "Current DSH profile overrides",
5894
- profileHint: "This native entry only. Ordinary Unset fields inherit Global plus Host base pins. Native runtime uses Host base/native defaults, never Global.",
5991
+ profileHint: "This DSH profile only. Unset fields use Global and Host defaults; native runtime uses Host defaults.",
5895
5992
  profileUnavailable: "Unavailable",
5896
- unavailableForm: "Current profile is read-only: no verified writable native form at this connection, namespace and revision. Global configuration remains a separate authority.",
5993
+ unavailableForm: "This DSH profile is read-only. Reconnect and refresh to check editing access.",
5897
5994
  ceiling: "Deepwork master is Global-only; profiles and session modes cannot lift its captured ceiling.",
5898
5995
  hostUnknown: "Host bundle status: unknown (separate switch).",
5899
- boundaries: "New roots capture saved settings within startup capabilities. Save does not restart the Host; startup-only changes require a separate Host restart, which may cancel sessions.",
5996
+ boundaries: "Saved settings apply to new sessions. Changes marked restart required need a separate Host restart, which may cancel sessions.",
5900
5997
  core: "Core",
5901
5998
  coreHint: "Core-owned desired settings. Model-parameter passthrough is ordinary config, not a subplugin. The permission-control enabled flag is startup-pinned. Save does not change current-session admission; inspect desired, startup and admitted values below. Unavailable admission stays unknown.",
5902
- modelParametersHint: "Default On. Off retains saved custom/opaque model parameters without forwarding them, and DSMM reasoningEffort / reasoning_effort aliases use native defaults. Standard SDK parameters and explicit native root choices remain intact. Raw JSON and exact effort values remain editable; saving desired settings does not verify provider transport readiness.",
5999
+ modelParametersHint: "Off stops sending custom parameters and uses native reasoning defaults. Saved values and your selected model stay unchanged.",
5903
6000
  permissionControlHint: "Permission-control mounting is startup-pinned. Saved configuration does not prove runtime coverage or remove current protections. Root rules keep their independent authority inside Permissions.",
5904
6001
  modules: "Configuration modules",
5905
6002
  scope: "Configuration scope",
5906
6003
  close: "Close module",
5907
6004
  loading: "Loading configuration…",
5908
- unset: "Unset — inherit",
6005
+ unset: "Use default configuration",
5909
6006
  "module:run": "Run and modules",
5910
6007
  "module:routes": "Model routes and recovery",
5911
6008
  "module:workflow": "Workflow, roles and skills",
@@ -5917,17 +6014,17 @@ var deploymentEn = {
5917
6014
  pendingModules: "Pending modules in this scope",
5918
6015
  savedRefreshRequired: "Saved — refresh required before further edits",
5919
6016
  sessionObserved: "Current-session admission observed",
5920
- noModuleFields: "No editable schema fields for this module in the selected scope.",
6017
+ noModuleFields: "No editable settings in this scope.",
5921
6018
  leaveDraft: "Unsaved or invalid draft. Choose how to leave; nothing is saved or discarded automatically.",
5922
6019
  continueEditing: "Continue editing",
5923
6020
  keepDraft: "Keep draft and return",
5924
6021
  discardDraft: "Discard draft and leave",
5925
- rootRules: "Current Root rules",
5926
- rootRulesHint: "This transaction is separate from Global/native configuration Save. It requires an open trusted Root, writable operator authority and synchronized runtime. It never borrows Global authority to bypass a refusal.",
5927
- rootRulesUnavailable: "Root rules service unavailable. No session or authority is inferred.",
6022
+ rootRules: "Session permission rules",
6023
+ rootRulesHint: "Rules save separately. Select an open main session with editing access and synchronized permissions.",
6024
+ rootRulesUnavailable: "Permission rules unavailable. Reconnect and refresh.",
5928
6025
  nativeRuntimeHint: "Native default On; Host base pins still apply. Mounting is captured at startup. Saving stages desired configuration only; it does not start/stop providers or cancel running sessions. A separate Host restart may cancel sessions.",
5929
- nativeRuntimeReadinessHint: "Official Host services own execution and JSONL storage. This snapshot reports native execution admission readiness, not guaranteed inbox acceptance or completion. Storage is configured on the native JSONL service, not DSMM.",
5930
- unsetGroup: "Unset this group — restore inheritance",
6026
+ nativeRuntimeReadinessHint: "Task progress is available in the session.",
6027
+ unsetGroup: "Use defaults for this group",
5931
6028
  nativeRuntimeState: "Observed native runtime",
5932
6029
  nativeRuntimeBinding: "Observed runtime composition",
5933
6030
  nativeRuntimeFence: "Execution admission ready",
@@ -5940,8 +6037,8 @@ var deploymentEn = {
5940
6037
  "nativeRuntimeReason-disabled": "The saved native runtime is disabled.",
5941
6038
  "nativeRuntimeReason-pending-restart": "Saved desired state differs from the mounted native composition; restart is pending.",
5942
6039
  "nativeRuntimeReason-scope-conflict": "Native scope ownership conflicts; readiness is not confirmed.",
5943
- saveGlobal: "Save Global config",
5944
- saveProfile: "Save profile overrides",
6040
+ saveGlobal: "Save",
6041
+ saveProfile: "Save",
5945
6042
  saving: "Saving…",
5946
6043
  refresh: "Refresh",
5947
6044
  discard: "Discard and reload",
@@ -5976,14 +6073,14 @@ var deploymentEn = {
5976
6073
  versionAbsent: "Not stored",
5977
6074
  versionUnknown: "Version unavailable",
5978
6075
  advanced: "Advanced JSON",
5979
- advancedHint: "Schema keys only; omit to inherit. Arrays replace. No credentials or scripts; use existing providers.",
6076
+ advancedHint: "Use supported fields; omit to inherit. Arrays replace inherited values. Do not enter credentials or scripts.",
5980
6077
  invalid: "Invalid field. Check type, bounds and keys; draft retained.",
5981
6078
  conflict: "Revision conflict; draft retained. Review changes, then discard and reload. Refresh does not merge.",
5982
6079
  unavailable: "Scope unavailable; draft retained. Reconnect and refresh.",
5983
6080
  "not-owned": "Read-only: requires an authenticated local Host operator.",
5984
6081
  validation: "Host rejected configuration; draft retained. Check fields and merged constraints.",
5985
- transport: "Disconnected; draft retained. Reconnect and refresh.",
5986
- unconfirmed: "The native form did not confirm Save. The Host may have committed; refresh the affected source before deciding to retry. Draft retained; no automatic replay.",
6082
+ transport: "Connection lost; result unknown. Draft kept. Reconnect and refresh before retrying.",
6083
+ unconfirmed: "Save result unknown. Draft kept. Refresh before retrying.",
5987
6084
  namedIndependent: "Deepwork Profiles is a separate named JSONC runtime-resource editor in Settings. Saving here does not apply a named profile or select its model."
5988
6085
  };
5989
6086
  var deploymentZh = {
@@ -5993,21 +6090,21 @@ var deploymentZh = {
5993
6090
  global: "DSMM 全局配置",
5994
6091
  globalHint: "同一 Home 的 DSH 配置共用;未设置字段使用内建默认值。",
5995
6092
  profile: "当前 DSH 配置覆盖",
5996
- profileHint: "仅此原生实例。普通字段 Unset 后继承 Global 与 Host base 固定值;原生 runtime 仅取 Host base/原生默认值,不继承 Global。",
6093
+ profileHint: "仅影响此 DSH 配置。未设置字段使用全局与宿主默认值;原生运行时使用宿主默认值。",
5997
6094
  profileUnavailable: "不可用",
5998
- unavailableForm: "当前配置只读:连接、namespace 与版本尚无已核验的可写原生表单;Global 配置仍使用独立权限。",
6095
+ unavailableForm: "此 DSH 配置只读,请重连并刷新以检查编辑权限。",
5999
6096
  ceiling: "Deepwork 总开关仅全局可改;配置和会话模式不能突破已捕获上限。",
6000
6097
  hostUnknown: "宿主整包状态:未知(独立开关)。",
6001
- boundaries: "新根会话在启动能力内采用已保存设置。保存不重启宿主;仅启动时生效的更改需另行重启宿主,可能取消会话。",
6098
+ boundaries: "保存的设置供新会话使用。标注「需重启」的更改需另行重启宿主,可能取消会话。",
6002
6099
  core: "Core 核心配置",
6003
6100
  coreHint: "Core 所有的 desired 意图配置。模型参数透传为普通配置,非子插件;权限控制 enabled 仅启动时捕获。保存不改变当前会话准入;下方可检查意图、启动与准入值,不可用的准入仍为未知。",
6004
- modelParametersHint: "默认开启。关闭后仍保存 custom/opaque 模型参数但不发送;DSMM reasoningEffort/reasoning_effort 两种别名采用原生默认值。标准 SDK 参数与根会话原生显式选择保留。仍可编辑原始 JSON 和精确 effort 值;保存意图不代表提供商传输已就绪。",
6101
+ modelParametersHint: "关闭后停止发送自定义参数,并使用原生推理默认值;已保存的值和所选模型不变。",
6005
6102
  permissionControlHint: "权限控制挂载仅启动时捕获。保存配置不证明运行时覆盖,也不移除当前保护;Root 规则在权限模块内保持独立权限。",
6006
6103
  modules: "配置模块",
6007
- scope: "配置作用域",
6104
+ scope: "配置范围",
6008
6105
  close: "关闭模块",
6009
6106
  loading: "正在加载配置…",
6010
- unset: "Unset——继承",
6107
+ unset: "使用默认配置",
6011
6108
  "module:run": "运行与模块",
6012
6109
  "module:routes": "模型路由与恢复",
6013
6110
  "module:workflow": "工作流、角色与技能",
@@ -6019,17 +6116,17 @@ var deploymentZh = {
6019
6116
  pendingModules: "此作用域的待保存模块",
6020
6117
  savedRefreshRequired: "已保存——需刷新后继续编辑",
6021
6118
  sessionObserved: "已观测当前会话准入",
6022
- noModuleFields: "所选作用域中,此模块没有可编辑的 schema 字段。",
6119
+ noModuleFields: "此范围内没有可编辑的设置。",
6023
6120
  leaveDraft: "仍有未保存或无效草稿,请选择离开方式;不会自动保存或丢弃。",
6024
6121
  continueEditing: "继续编辑",
6025
6122
  keepDraft: "保留草稿并返回",
6026
6123
  discardDraft: "放弃草稿并离开",
6027
- rootRules: "当前 Root 规则",
6028
- rootRulesHint: "此事务与 Global/native 配置保存分开,需要已打开的可信 Root、可写 operator 权限及已同步运行时;不会借 Global 权限绕过拒绝。",
6029
- rootRulesUnavailable: "Root 规则服务不可用,不推断或创建会话和权限。",
6124
+ rootRules: "会话权限规则",
6125
+ rootRulesHint: "规则单独保存。请选择已打开的主会话,并确认有编辑权限且权限已同步。",
6126
+ rootRulesUnavailable: "权限规则不可用,请重连后刷新。",
6030
6127
  nativeRuntimeHint: "原生默认开启,Host base 固定值仍适用;挂载仅启动时捕获。保存只设置 desired,不会启动/停止提供商或取消当前会话;独立 Host 重启可能取消会话。",
6031
- nativeRuntimeReadinessHint: "执行和 JSONL 存储由官方 Host 服务负责。此快照只报告原生执行准入就绪,不保证收件箱接受或任务完成。存储配置属于原生 JSONL 服务,不属于 DSMM。",
6032
- unsetGroup: "Unset 整组——恢复继承",
6128
+ nativeRuntimeReadinessHint: "任务进度可在会话中查看。",
6129
+ unsetGroup: "整组使用默认配置",
6033
6130
  nativeRuntimeState: "已观测原生运行时",
6034
6131
  nativeRuntimeBinding: "已观测运行时组合",
6035
6132
  nativeRuntimeFence: "执行准入已就绪",
@@ -6042,8 +6139,8 @@ var deploymentZh = {
6042
6139
  "nativeRuntimeReason-disabled": "已保存的原生运行时为关闭。",
6043
6140
  "nativeRuntimeReason-pending-restart": "已保存 desired 与已挂载原生组合不同,等待独立重启。",
6044
6141
  "nativeRuntimeReason-scope-conflict": "原生 scope 所有权冲突,无法确认就绪状态。",
6045
- saveGlobal: "保存全局配置",
6046
- saveProfile: "保存当前配置覆盖",
6142
+ saveGlobal: "保存",
6143
+ saveProfile: "保存",
6047
6144
  saving: "正在保存…",
6048
6145
  refresh: "刷新",
6049
6146
  discard: "丢弃并重载",
@@ -6078,14 +6175,14 @@ var deploymentZh = {
6078
6175
  versionAbsent: "未存储",
6079
6176
  versionUnknown: "版本不可用",
6080
6177
  advanced: "高级 JSON",
6081
- advancedHint: "仅 schema 声明的键;省略为继承,数组整项替换。不填凭据或脚本,仅用已有提供商。",
6178
+ advancedHint: "仅使用支持的字段,省略表示继承;数组整体替换继承值。请勿填写凭据或脚本。",
6082
6179
  invalid: "字段无效,请核对类型、范围与键;草稿保留。",
6083
6180
  conflict: "版本冲突,草稿保留。核对后丢弃并重载;刷新不自动合并。",
6084
6181
  unavailable: "作用域不可用,草稿保留;重连后刷新。",
6085
6182
  "not-owned": "只读:需要本地宿主已认证 operator 权限。",
6086
6183
  validation: "宿主拒绝配置,草稿保留;核对字段及合并约束。",
6087
- transport: "连接中断,草稿保留;重连后刷新。",
6088
- unconfirmed: "原生表单未确认保存结果,Host 可能已提交。请先刷新受影响的来源再决定是否重试;草稿已保留,不会自动重放。",
6184
+ transport: "连接中断,结果未知,草稿已保留。请重连并刷新后再重试。",
6185
+ unconfirmed: "保存结果未知,草稿已保留。请刷新后再重试。",
6089
6186
  namedIndependent: "设置中的 Deepwork Profiles 是独立的具名 JSONC 运行时资源编辑器。在此保存不会应用具名配置或选择其模型。"
6090
6187
  };
6091
6188
  var deploymentFieldLabels = {
@@ -6111,7 +6208,6 @@ var deploymentFieldLabels = {
6111
6208
  enabled: ["Enabled", "启用"],
6112
6209
  materialize: ["Materialize presets", "物化预设"],
6113
6210
  scope: ["Guard scope", "保护范围"],
6114
- plannerRootEnabled: ["Planner main-chat preset (restart required)", "Planner 主聊天预设(需重启)"],
6115
6211
  shellCommandSafety: ["Shell command safety", "Shell 命令安全"],
6116
6212
  gitWriteGuard: ["Git write policy", "Git 写入策略"],
6117
6213
  toolOutputTruncation: ["Tool output truncation", "工具输出截断"],
@@ -6157,10 +6253,10 @@ var PERMISSIONS_NS = "settings.dsmm-permissions";
6157
6253
  var permissionEn = {
6158
6254
  title: "Permission control",
6159
6255
  rules: "Global permission rules",
6160
- nativeApproval: "Command approval uses the native prompt; ordinary Allow is once only. Deployment permission settings and exact nativeCommands are in this Permissions module. Choose Global or Current DSH profile above; Root rules below save independently.",
6161
- root: "Selected native Root session",
6162
- noRoot: "Select a trusted Root session in native session navigation. No Root is inferred from task or model text.",
6163
- child: "This is a child session. Select its Root in native session navigation to edit Global rules.",
6256
+ nativeApproval: "Approve commands in the native prompt. Allow approves only that call.",
6257
+ root: "Selected main session",
6258
+ noRoot: "Select a main session to view its permission rules.",
6259
+ child: "Select this child’s main session to edit Global rules.",
6164
6260
  unknown: "Unavailable / unknown",
6165
6261
  reading: "Reading…",
6166
6262
  busy: "Operation pending…",
@@ -6187,14 +6283,14 @@ var permissionEn = {
6187
6283
  pathScope: "Path match",
6188
6284
  exact: "Exact path",
6189
6285
  tree: "Path and descendants",
6190
- networkLimit: "SDK network boundary: allowing public web fetch does not allow private-network destinations. These web policies are not an all-shell or socket firewall.",
6191
- rulesHint: "This Save uses the trusted Root’s Global rules CAS authority. Native dynamic permission overrides can refuse this RPC: edit or Unset them in the profile scope above, then refresh Root rules. No fallback Global write bypasses a refusal. Enabled and nativeCommands use configuration Save, not this Root transaction.",
6192
- configPolicyHint: "Sparse permission settings: Global Unset restores built-in defaults; profile Unset inherits Global plus any Host base pin. Profile overrides win over Global. Arrays replace as a whole. Config Save does not bypass Root/operator/readonly checks or prove runtime synchronization; inspect saved/startup/admitted state below and refresh Permission control for live coverage.",
6193
- configRulesHint: "Persisted rule records (exact schema, including source/revision/revoked). Edit existing records or supply valid import provenance; this config editor does not mint verified operator approval. Empty array explicitly replaces inherited records; Unset restores inheritance. The Root rules editor can stamp verified operator changes when its authority is writable.",
6194
- coldHint: "Enabled is a cold switch (default On). Saving requires an independent Host restart to change mounting; it does not remove current protection. Restart may cancel sessions.",
6195
- nativeCommands: "Exact native command entries",
6196
- nativeCommandsHint: "Default Off. Each entry matches tool, executable, optional subcommand, ordered args, workingDirectory and sandboxMode exactly; no wildcards, command parsing or normalization. Allow cannot override downstream Ask/Deny or role readonly. New entries use Ask and workspace-write; no full-access grant is generated.",
6197
- registrationUnresolved: "Native command registration / executor identity is unresolved here. A trusted kind:shell tool name is not proof of a nativeCommands bash/pwsh executor, executable, environment or sandbox. Enter only independently verified exact values; nothing is auto-filled or certified by this UI. Stale scope, controller or registration is still rejected by the Host.",
6286
+ networkLimit: "Web rules cover public web tools only. Private networks, shell commands and sockets remain outside this permission.",
6287
+ rulesHint: "Saves Global rules for the selected main session. If profile overrides block saving, edit or clear them in the profile scope above, then refresh.",
6288
+ configPolicyHint: "Profile settings override Global settings. Arrays replace inherited lists. Refresh session permissions after saving to check what is effective.",
6289
+ configRulesHint: "Edit existing records or imported rules with valid provenance. Use the session rules editor for verified approvals. An empty array clears inherited records.",
6290
+ coldHint: "Changing this switch requires a Host restart. Current protection stays active until then. Restart may cancel sessions.",
6291
+ nativeCommands: "Exact command rules",
6292
+ nativeCommandsHint: "Default Off. Match the tool, executable, subcommand, ordered arguments, directory and sandbox exactly. No wildcards. Other approval, denial and read-only restrictions still apply. New entries ask for approval and use workspace-write.",
6293
+ registrationUnresolved: "Executor identity is unconfirmed. Verify the tool, executable, environment and sandbox before entering exact values.",
6198
6294
  entryId: "Entry ID",
6199
6295
  tool: "Tool (exact)",
6200
6296
  nativeExecutable: "Executable (exact)",
@@ -6209,12 +6305,12 @@ var permissionEn = {
6209
6305
  inheritedEntries: "Inherited entries; editing pins a replacement array in this layer.",
6210
6306
  explicitEntries: "Explicit replacement array in this layer.",
6211
6307
  invalidEntry: "Invalid exact entry: use unique nonblank IDs, exact nonblank strings, an absolute Host working directory, and a JSON string array. Draft retained; Save locked.",
6212
- rulesUnavailable: "Global rules are not editable until a trusted, open Root and writable local operator authority return a synchronized policy. A refusal is not an empty rules list. Edit or Unset native overrides in this module’s profile scope; there is no automatic Global-write fallback.",
6308
+ rulesUnavailable: "Editing requires an open main session, local editing permission and synchronized rules. Check profile overrides, reconnect and refresh.",
6213
6309
  invalidArgsHint: "Correct invalid argument JSON before removing rows, or explicitly Unset this entire array to restore inheritance. Other fields do not discard invalid text.",
6214
- observedPolicy: "Last observed effective policy (may include native profile overrides; not the sparse Global document)",
6215
- profileOverrideState: "Native profile override state",
6216
- profileOverrideUnknown: "Unknown from this Root rules response. Choose Current DSH profile above to inspect explicit overrides and inheritance. A failed Global rules Save does not clear or bypass them.",
6217
- matchHint: "Rules match actual canonical paths (exact/tree), the native Shell registration identity plus full command/cwd, or web kind. Rule Allow only satisfies that rule; it does not grant external writes. Different IDs add records until explicitly revoked.",
6310
+ observedPolicy: "Effective policy (including profile overrides)",
6311
+ profileOverrideState: "Profile overrides",
6312
+ profileOverrideUnknown: "Unknown. Choose Current DSH profile above to inspect overrides.",
6313
+ matchHint: "Match an exact path or directory tree, an exact shell tool/command/directory, or a web tool. Allow does not grant outside-workspace writes. Rules stay active until revoked.",
6218
6314
  source: "Actual source",
6219
6315
  recordVersion: "Record version",
6220
6316
  savedAt: "Saved at",
@@ -6222,19 +6318,19 @@ var permissionEn = {
6222
6318
  imported: "User import",
6223
6319
  active: "Active record",
6224
6320
  revoked: "Revoked record",
6225
- base: "Draft CAS source",
6226
- savedRevision: "Saved source",
6227
- runtimeRevision: "Runtime source",
6228
- runtime: "Runtime synchronization",
6321
+ base: "Draft version",
6322
+ savedRevision: "Saved version",
6323
+ runtimeRevision: "Effective version",
6324
+ runtime: "Rule synchronization",
6229
6325
  synced: "Synced",
6230
6326
  updating: "Updating",
6231
- unsynced: "Unsynced — rules saves locked",
6327
+ unsynced: "Unsynced — saving unavailable",
6232
6328
  mounted: "Startup mounted",
6233
6329
  on: "On",
6234
6330
  off: "Off",
6235
6331
  restart: "Independent restart required",
6236
- coverageTitle: "Observed trusted tool coverage",
6237
- coverage: "Last observed for this Root from trusted registrations and the native rule consumer, separately from source synchronization. Saved, synced, mounted or a matching tool name does not prove coverage. Listed registrations do not prove executor readiness, network reachability or final-body ownership.",
6332
+ coverageTitle: "Tool coverage",
6333
+ coverage: "Last observed for this main session. Executor readiness and network access must be checked separately.",
6238
6334
  coverageUnavailable: "Coverage unavailable / unknown. No trusted live observation was returned.",
6239
6335
  coverageEmpty: "No trusted tool registrations observed for this Root.",
6240
6336
  coverageRuntime: "Observed consumer state",
@@ -6258,7 +6354,7 @@ var permissionEn = {
6258
6354
  "limit:proxyAddressBinding": "Depends on the native proxy; no stronger address-binding guarantee.",
6259
6355
  "limit:shellSockets": "Depends on the native executor; no all-Shell or socket firewall.",
6260
6356
  "limit:providerAuthMcp": "Not covered by these rules.",
6261
- pathEvidence: "Path evidence: read uses its actual scoped native FS. Glob/grep's production rg executor coLocation remains unproven; trusted registration is not shared-path proof. Shell read interpretation and path checks depend on explicit native executor evidence. No final-inode, full-filesystem or socket guarantee.",
6357
+ pathEvidence: "Read checks its active filesystem. Search and shell path checks depend on the executor. Final-file identity, full filesystem confinement and socket isolation are not guaranteed.",
6262
6358
  newRule: "Add exact-match rule",
6263
6359
  editRule: "Edit rule",
6264
6360
  stage: "Stage rule",
@@ -6266,12 +6362,12 @@ var permissionEn = {
6266
6362
  stageRevoke: "Stage revocation",
6267
6363
  unstage: "Remove staged change",
6268
6364
  editor: "Rule draft",
6269
- staged: "Staged changes — not saved",
6270
- noRules: "No persisted rule records.",
6271
- save: "Save Global rules",
6365
+ staged: "Unsaved rule changes",
6366
+ noRules: "No saved rules.",
6367
+ save: "Save",
6272
6368
  discard: "Discard draft and reload",
6273
6369
  dirty: "Unsaved rules draft",
6274
- saved: "Host accepted Global rules. Check runtime synchronization below.",
6370
+ saved: "Rules saved. Check synchronization below.",
6275
6371
  "issue:not-owned": "Root/operator/readonly authority refused. Select the intended Root and refresh.",
6276
6372
  "issue:stale": "Source conflict. Draft retained. Review, then explicitly discard and reload.",
6277
6373
  "issue:cancelled": "Operation cancelled; refresh actual saved state.",
@@ -6287,10 +6383,10 @@ var permissionEn = {
6287
6383
  var permissionZh = {
6288
6384
  title: "权限控制",
6289
6385
  rules: "全局权限规则",
6290
- nativeApproval: "命令批准使用原生提示,普通 Allow 仅批准本次。部署权限配置与精确 nativeCommands 在本权限模块内;上方选择 Global 或当前 DSH 配置,下面的 Root 规则独立保存。",
6291
- root: "当前原生 Root 会话",
6292
- noRoot: "请在原生会话导航中选择可信 Root 会话;不从任务或模型文本推断 Root。",
6293
- child: "当前为 child 会话;编辑全局规则请在原生导航选择其 Root。",
6386
+ nativeApproval: "请在原生提示中批准命令;「允许」仅批准本次调用。",
6387
+ root: "所选主会话",
6388
+ noRoot: "请选择主会话以查看权限规则。",
6389
+ child: "请切换到此子会话的主会话后编辑全局规则。",
6294
6390
  unknown: "不可用/未知",
6295
6391
  reading: "正在读取…",
6296
6392
  busy: "操作处理中…",
@@ -6317,14 +6413,14 @@ var permissionZh = {
6317
6413
  pathScope: "路径匹配",
6318
6414
  exact: "精确路径",
6319
6415
  tree: "此路径及子树",
6320
- networkLimit: "SDK 网络边界:允许 public web fetch 不代表放行私网目标;这些网页策略不是全部 Shell 或 socket 的防火墙。",
6321
- rulesHint: "此保存使用可信 Root 的 Global 规则 CAS 权限。native 动态权限覆盖可能使此 RPC 拒绝:请在上方当前配置作用域编辑或 Unset 覆盖,再刷新 Root 规则。拒绝后不会改走 Global 写入绕过。enabled 与 nativeCommands 使用配置保存,不属于此 Root 事务。",
6322
- configPolicyHint: "稀疏权限配置:Global 的 Unset 恢复内建默认;当前配置的 Unset 继承 Global 及宿主 base 固定值。当前配置覆盖 Global;数组整体替换。配置保存不绕过 Root/operator/只读检查,也不证明运行时同步;请核对下方保存/启动/准入状态,并在权限控制页刷新实时覆盖。",
6323
- configRulesHint: "持久规则记录(精确 schema,包含 source/revision/revoked)。可编辑现有记录或提供合法导入来源;此配置编辑器不生成已核验 operator 批准。空数组显式替换继承记录;Unset 恢复继承。Root 规则编辑器仅在权限可写时写入已核验 operator 来源。",
6324
- coldHint: "enabled 为冷开关(默认开启),保存后需另行重启宿主才改变挂载;不会移除当前保护。重启可能取消会话。",
6325
- nativeCommands: "精确原生命令条目",
6326
- nativeCommandsHint: "默认关闭。每条精确匹配 tool、executable、可选 subcommand、有序 args、workingDirectory 与 sandboxMode;不使用通配符、不解析或归一化命令。Allow 不能覆盖下游 Ask/Deny 或角色只读。新条目使用 Ask 和 workspace-write,不生成完全访问授权。",
6327
- registrationUnresolved: "此处原生命令注册/执行器身份未解析。可信 kind:shell 工具名称不证明 nativeCommands 的 bash/pwsh 执行器、executable、环境或沙箱。仅填写独立核验的精确值;本 UI 不自动填充或认证可信身份。过期 scope、controller 或注册仍由宿主拒绝。",
6416
+ networkLimit: "网页规则仅覆盖公共网页工具,不包含私网、Shell 命令或 socket 权限。",
6417
+ rulesHint: "为所选主会话保存全局规则。若配置覆盖阻止保存,请在上方当前配置范围内编辑或清除覆盖,再刷新。",
6418
+ configPolicyHint: "当前配置优先于全局配置,数组整体替换继承列表。保存后请刷新会话权限以检查实际生效状态。",
6419
+ configRulesHint: "可编辑已有记录或带合法来源的导入规则。经核验的批准请使用会话规则编辑器。空数组会清除继承的记录。",
6420
+ coldHint: "更改此开关需重启宿主,此前保留当前保护。重启可能取消会话。",
6421
+ nativeCommands: "精确命令规则",
6422
+ nativeCommandsHint: "默认关闭。精确匹配工具、可执行程序、子命令、有序参数、目录和沙箱,不支持通配符。其他审批、拒绝和只读限制仍有效。新条目使用询问与 workspace-write。",
6423
+ registrationUnresolved: "执行器身份尚未确认,请核验工具、可执行程序、环境和沙箱后再填写精确值。",
6328
6424
  entryId: "条目 ID",
6329
6425
  tool: "工具(精确)",
6330
6426
  nativeExecutable: "可执行程序(精确)",
@@ -6339,12 +6435,12 @@ var permissionZh = {
6339
6435
  inheritedEntries: "继承的条目;编辑后在此层固定为整体替换数组。",
6340
6436
  explicitEntries: "此层显式整体替换数组。",
6341
6437
  invalidEntry: "精确条目无效:ID 需唯一且非空,精确字符串不可空,工作目录为宿主绝对路径,参数为 JSON 字符串数组。草稿保留,保存已锁定。",
6342
- rulesUnavailable: "需可信且已打开的 Root、可写的本地 operator 权限及已同步策略,才能编辑 Global 规则。拒绝不代表空规则列表。请在本模块的当前配置作用域编辑或 Unset native 覆盖;不会自动改走 Global 写入。",
6438
+ rulesUnavailable: "编辑需要已打开的主会话、本地编辑权限和已同步的规则。请检查配置覆盖,重连后刷新。",
6343
6439
  invalidArgsHint: "请修正无效参数 JSON 后再移除条目;也可显式 Unset 整个数组以恢复继承。修改其他字段不会丢弃无效文本。",
6344
- observedPolicy: "最近观测的有效策略(可能包含 native 配置覆盖,非稀疏 Global 文档)",
6345
- profileOverrideState: "Native 配置覆盖状态",
6346
- profileOverrideUnknown: "此 Root 规则响应未提供覆盖状态。请在上方选择当前 DSH 配置,核对显式覆盖与继承;Global 规则保存失败不会清除或绕过覆盖。",
6347
- matchHint: "规则匹配实际规范路径、原生 Shell 注册身份+完整命令+工作目录,或网页类型。规则 Allow 仅满足该规则,不授予外部写。不同 ID 添加记录,保留至显式撤销。",
6440
+ observedPolicy: "有效策略(含当前配置覆盖)",
6441
+ profileOverrideState: "配置覆盖",
6442
+ profileOverrideUnknown: "未知,请在上方选择当前 DSH 配置查看覆盖值。",
6443
+ matchHint: "可匹配精确路径或目录树、精确 Shell 工具与命令及目录,或网页工具。允许不授予工作区外写入权限。规则保留至撤销。",
6348
6444
  source: "实际来源",
6349
6445
  recordVersion: "记录版本",
6350
6446
  savedAt: "保存时间",
@@ -6352,19 +6448,19 @@ var permissionZh = {
6352
6448
  imported: "用户导入",
6353
6449
  active: "有效记录",
6354
6450
  revoked: "已撤销记录",
6355
- base: "草稿 CAS 来源",
6356
- savedRevision: "已保存来源",
6357
- runtimeRevision: "运行时来源",
6358
- runtime: "运行时同步",
6451
+ base: "草稿版本",
6452
+ savedRevision: "保存版本",
6453
+ runtimeRevision: "生效版本",
6454
+ runtime: "规则同步",
6359
6455
  synced: "已同步",
6360
6456
  updating: "同步中",
6361
- unsynced: "未同步——规则保存已锁定",
6457
+ unsynced: "未同步——暂不可保存",
6362
6458
  mounted: "启动时已挂载",
6363
6459
  on: "开启",
6364
6460
  off: "关闭",
6365
6461
  restart: "需要另行重启",
6366
- coverageTitle: "已观测的可信工具覆盖",
6367
- coverage: "此 Root 最近一次可信注册及原生规则 consumer 观测,与来源同步分开。已保存、已同步、已挂载或工具同名均不证明覆盖;所列注册不证明执行器就绪、网络可达或最终 body 归属。",
6462
+ coverageTitle: "工具覆盖范围",
6463
+ coverage: "所选主会话最近观测的覆盖范围,执行器就绪和网络访问需另行检查。",
6368
6464
  coverageUnavailable: "覆盖不可用/未知:未返回可信的实时观测。",
6369
6465
  coverageEmpty: "未观测到此 Root 的可信工具注册。",
6370
6466
  coverageRuntime: "已观测 consumer 状态",
@@ -6388,7 +6484,7 @@ var permissionZh = {
6388
6484
  "limit:proxyAddressBinding": "依赖原生代理,不提供更强的地址绑定保证。",
6389
6485
  "limit:shellSockets": "依赖原生执行器,不是全部 Shell 或 socket 的防火墙。",
6390
6486
  "limit:providerAuthMcp": "不在这些规则覆盖范围。",
6391
- pathEvidence: "路径证据:read 使用其实际 scope 的原生 FS。glob/grep 的生产 rg 执行器 coLocation 仍未证明;可信注册不等于共享路径证据。Shell 读取解析及路径检查依赖明确的原生执行器证据。不保证最终 inode、完整文件系统或 socket 隔离。",
6487
+ pathEvidence: "读取检查当前文件系统;搜索和 Shell 的路径检查取决于执行器。不保证最终文件身份、完整文件系统或 socket 隔离。",
6392
6488
  newRule: "添加精确匹配规则",
6393
6489
  editRule: "编辑规则",
6394
6490
  stage: "暂存规则",
@@ -6396,12 +6492,12 @@ var permissionZh = {
6396
6492
  stageRevoke: "暂存撤销",
6397
6493
  unstage: "移除暂存更改",
6398
6494
  editor: "规则草稿",
6399
- staged: "暂存更改——尚未保存",
6400
- noRules: "尚无持久化规则记录。",
6401
- save: "保存全局规则",
6495
+ staged: "未保存的规则更改",
6496
+ noRules: "尚无已保存规则。",
6497
+ save: "保存",
6402
6498
  discard: "丢弃草稿并重载",
6403
6499
  dirty: "规则草稿未保存",
6404
- saved: "宿主已接受全局规则,请核对运行时同步状态。",
6500
+ saved: "规则已保存,请核对下方同步状态。",
6405
6501
  "issue:not-owned": "Root/operator/只读权限拒绝,请选择目标 Root 后刷新。",
6406
6502
  "issue:stale": "来源冲突,草稿保留;核对后显式丢弃并重载。",
6407
6503
  "issue:cancelled": "操作已取消,请刷新实际保存状态。",
@@ -6576,21 +6672,16 @@ function displayValue(value, t) {
6576
6672
  const text5 = JSON.stringify(value);
6577
6673
  return text5.length > 120 ? `${text5.slice(0, 120)}…` : text5;
6578
6674
  }
6579
- function AdvancedField({ schema, path, controller, inherited, upper, t }) {
6675
+ function AdvancedField({ schema, path, controller, inherited, upper, expanded, onExpandedChange, t }) {
6580
6676
  const state = (0, import_react6.useSyncExternalStore)(controller.subscribe, controller.getSnapshot), id2 = (0, import_react6.useId)(), name = path.join(".");
6581
6677
  const value = at(state.draft, path), raw = state.raw[name], text5 = raw?.text ?? (value === void 0 ? "" : JSON.stringify(value, null, 2)), invalid2 = raw?.invalid === true;
6582
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("details", { className: "dsmm-deployment-group", "data-field": name, children: [
6583
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("summary", { children: [
6678
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("details", { className: "dsmm-deployment-group", "data-field": name, open: expanded, onToggle: (event) => onExpandedChange?.(event.currentTarget.open), children: [
6679
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("summary", { id: `${id2}-label`, children: [
6584
6680
  fieldLabel(path, t),
6585
6681
  " · ",
6586
6682
  t("advanced")
6587
6683
  ] }),
6588
6684
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "dsmm-field", children: [
6589
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { htmlFor: id2, children: [
6590
- fieldLabel(path, t),
6591
- " · ",
6592
- t("advanced")
6593
- ] }),
6594
6685
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "dsmm-hint", id: `${id2}-hint`, children: t("advancedHint") }),
6595
6686
  path[0] === "permissionControl" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "dsmm-hint", children: permissionText(t)("configRulesHint") }),
6596
6687
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "dsmm-hint", children: t(value === void 0 ? "inherit" : "explicit") }),
@@ -6599,7 +6690,7 @@ function AdvancedField({ schema, path, controller, inherited, upper, t }) {
6599
6690
  ": ",
6600
6691
  displayValue(upper, t)
6601
6692
  ] }),
6602
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("textarea", { id: id2, rows: 6, maxLength: 32768, value: text5, disabled: !controller.canEdit(), "aria-invalid": invalid2, "aria-describedby": `${id2}-hint ${id2}-error`, onChange: (event) => {
6693
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("textarea", { id: id2, rows: 6, maxLength: 32768, value: text5, disabled: !controller.canEdit(), "aria-labelledby": `${id2}-label`, "aria-invalid": invalid2, "aria-describedby": `${id2}-hint ${id2}-error`, onChange: (event) => {
6603
6694
  const next = event.currentTarget.value;
6604
6695
  let parsed, valid = true;
6605
6696
  try {
@@ -6651,13 +6742,18 @@ function ScalarField({ schema, path, controller, inherited, t }) {
6651
6742
  ] })
6652
6743
  ] });
6653
6744
  }
6654
- function Field({ schema, path, controller, t }) {
6745
+ function Field({ schema, path, controller, initiallyOpen = false, disclosures, t }) {
6655
6746
  if (schema.type === "transform" && schema.inner !== void 0) schema = schema.inner;
6656
6747
  const state = (0, import_react6.useSyncExternalStore)(controller.subscribe, controller.getSnapshot), snapshot4 = state.snapshot, id2 = (0, import_react6.useId)(), name = path.join(".");
6748
+ const [open, setOpen] = (0, import_react6.useState)(disclosures?.get(name) ?? initiallyOpen);
6749
+ const expand = (expanded) => {
6750
+ disclosures?.set(name, expanded);
6751
+ setOpen(expanded);
6752
+ };
6657
6753
  const explicit = at(state.draft, path), inherited = controller.layer === "global" ? at(snapshot4.defaults, path) : at(mergeLayer(mergeLayer(snapshot4.defaults, snapshot4.global), snapshot4.nativeForm?.base ?? {}), path);
6658
6754
  const choices = enumValues(schema), disabled = !controller.canEdit();
6659
6755
  if (name === "permissionControl.nativeCommands.entries") return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { "data-field": name, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NativeCommandEntries, { controller, value: explicit, inherited: inherited ?? [], disabled, onChange: (value) => controller.edit(path, value), setInvalid: (key, bad) => controller.setInvalid(key, bad), t: permissionText(t) }) });
6660
- if (schema.type === "object" && schema.fields !== void 0 && path[0] !== "roleRouting") return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("details", { className: "dsmm-deployment-group", "data-field": name, children: [
6756
+ if (schema.type === "object" && schema.fields !== void 0 && path[0] !== "roleRouting") return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("details", { className: "dsmm-deployment-group", "data-field": name, open, onToggle: (event) => expand(event.currentTarget.open), children: [
6661
6757
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("summary", { children: fieldLabel(path, t) }),
6662
6758
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
6663
6759
  name === "permissionControl" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "dsmm-hint", children: permissionText(t)("configPolicyHint") }),
@@ -6666,10 +6762,10 @@ function Field({ schema, path, controller, t }) {
6666
6762
  controller.clearRaw(name);
6667
6763
  controller.edit(path, void 0);
6668
6764
  }, children: t("unsetGroup") }),
6669
- Object.entries(schema.fields).map(([key, node]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Field, { schema: node, path: [...path, key], controller, t }, key))
6765
+ Object.entries(schema.fields).map(([key, node]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Field, { schema: node, path: [...path, key], controller, disclosures, t }, key))
6670
6766
  ] })
6671
6767
  ] });
6672
- if (!["boolean", "string", "number"].includes(schema.type) && choices === null) return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AdvancedField, { schema, path, controller, inherited, upper: controller.layer === "global" ? at(snapshot4.profile, path) : void 0, t });
6768
+ if (!["boolean", "string", "number"].includes(schema.type) && choices === null) return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AdvancedField, { schema, path, controller, inherited, upper: controller.layer === "global" ? at(snapshot4.profile, path) : void 0, expanded: open, onExpandedChange: expand, t });
6673
6769
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "dsmm-field dsmm-deployment-field", "data-field": name, children: [
6674
6770
  schema.type === "boolean" || choices !== null ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
6675
6771
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: id2, children: fieldLabel(path, t) }),
@@ -6991,8 +7087,8 @@ function ScopeSave({ controller, workspace, refreshOnly = false, t }) {
6991
7087
  ] });
6992
7088
  }
6993
7089
  function NativeRuntimeState({ value, t }) {
6994
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "dsmm-availability", "aria-label": t("nativeRuntimeState"), children: [
6995
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { children: t("nativeRuntimeState") }),
7090
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("details", { className: "dsmm-availability", children: [
7091
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("summary", { children: t("nativeRuntimeState") }),
6996
7092
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
6997
7093
  t("nativeRuntimeBinding"),
6998
7094
  ": ",
@@ -7007,8 +7103,7 @@ function NativeRuntimeState({ value, t }) {
7007
7103
  ": ",
7008
7104
  value === void 0 ? t("unknown") : t(value.restartRequired ? "on" : "off")
7009
7105
  ] }),
7010
- value?.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: t(`nativeRuntimeReason-${value.reason}`) }),
7011
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "dsmm-hint", children: t("nativeRuntimeReadinessHint") })
7106
+ value?.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: t(`nativeRuntimeReason-${value.reason}`) })
7012
7107
  ] });
7013
7108
  }
7014
7109
  function StateInspector({ controller, t }) {
@@ -7099,6 +7194,7 @@ function DeploymentPage(props) {
7099
7194
  const id2 = (0, import_react8.useId)(), heading = (0, import_react8.useRef)(null), triggers = (0, import_react8.useRef)(/* @__PURE__ */ new Map()), previous = (0, import_react8.useRef)(null);
7100
7195
  const scopeControl = (0, import_react8.useRef)(null), confirmation = (0, import_react8.useRef)(null);
7101
7196
  const resume = (0, import_react8.useRef)(null);
7197
+ const disclosures = (0, import_react8.useRef)({ global: /* @__PURE__ */ new Map(), profile: /* @__PURE__ */ new Map() });
7102
7198
  const { t } = props, snapshot4 = state.snapshot ?? core.snapshot, active = navigation.module;
7103
7199
  (0, import_react8.useEffect)(() => {
7104
7200
  if (props.view === "page") void props.core.refresh();
@@ -7129,7 +7225,6 @@ function DeploymentPage(props) {
7129
7225
  const modules = CONFIG_MODULES.filter((module2) => module2 === "state" || module2 === "permissions" || snapshot4 === null || moduleFields(snapshot4.schema, module2, "global").length + moduleFields(scopeSchema(snapshot4, "profile"), module2, "profile").length > 0);
7130
7226
  const scopeActions = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ScopeSave, { controller: active === "state" ? props.core : controller, workspace, refreshOnly: active === "state" || workspace.controller() === null, t });
7131
7227
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "dsmm-profiles dsmm-deployment", "data-dsmm-page": true, "aria-label": t("title"), children: [
7132
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: t("description") }),
7133
7228
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "dsmm-hint", children: t("boundaries") }),
7134
7229
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "dsmm-field", children: [
7135
7230
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: `${id2}-scope`, children: t("scope") }),
@@ -7165,14 +7260,14 @@ function DeploymentPage(props) {
7165
7260
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
7166
7261
  navigation.scope === "profile" && navigation.native === null ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: t("unavailableForm") }) : state.snapshot === null ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: t(state.busy ? "loading" : "unavailable") }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { "data-dsmm-layer": controller.layer, "aria-busy": state.busy, className: "dsmm-structured", children: [
7167
7262
  fields.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "dsmm-hint", children: t("noModuleFields") }),
7168
- fields.map(([key, schema]) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Field, { schema, path: [key], controller, t }, key)),
7263
+ fields.map(([key, schema]) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Field, { schema, path: [key], controller, initiallyOpen: fields.length === 1 && active !== "permissions", disclosures: disclosures.current[navigation.scope], t }, `${navigation.scope}:${key}`)),
7169
7264
  active === "run" && controller.layer === "profile" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(NativeRuntimeState, { value: state.snapshot.subagentRuntime, t })
7170
7265
  ] }),
7171
7266
  scopeActions,
7172
7267
  active === "permissions" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "dsmm-zone", children: [
7173
7268
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { children: t("rootRules") }),
7174
7269
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "dsmm-hint", children: t("rootRulesHint") }),
7175
- workspace.permissions === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: t("rootRulesUnavailable") }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PermissionsPanel, { controller: workspace.permissions, t: (key) => Object.hasOwn(permissionEn, key) ? permissionText(t)(key) : key })
7270
+ workspace.permissions === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: t("rootRulesUnavailable") }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PermissionsPanel, { controller: workspace.permissions, t: props.permissionsT ?? ((key) => Object.hasOwn(permissionEn, key) ? permissionText(t)(key) : key) })
7176
7271
  ] })
7177
7272
  ] })
7178
7273
  ] })
@@ -8613,7 +8708,7 @@ async function apply(ctx) {
8613
8708
  document.head.append(style);
8614
8709
  return () => style.remove();
8615
8710
  }, "dsmm: core styles");
8616
- const inject2 = () => ({ core, remote: coreCtx.remote.dsmmConfig, workspace });
8711
+ const inject2 = () => ({ core, remote: coreCtx.remote.dsmmConfig, workspace, permissionsT: coreCtx.locale.bind(PERMISSIONS_NS) });
8617
8712
  coreCtx.slots.inject("plugins.bundle.config", () => coreCtx.slots.register({ name: "plugins.bundle.config", key: "@dsmm/dsmm", locale: DEPLOYMENT_NS, inject: inject2 }, DeploymentPage));
8618
8713
  void coreCtx.inject(["configForms"], (formCtx) => {
8619
8714
  workspace.bindForms(formCtx.configForms);
@@ -8623,6 +8718,11 @@ async function apply(ctx) {
8623
8718
  });
8624
8719
  await ctx.inject(["remote.dsmmProfiles"], (profileCtx) => {
8625
8720
  const controller = new ProfilesController(profileCtx.remote.dsmmProfiles);
8721
+ void profileCtx.inject(["connection"], (connectionCtx) => {
8722
+ controller.bindConnection(connectionCtx.connection.generation);
8723
+ void controller.refresh();
8724
+ connectionCtx.effect(() => () => controller.bindConnection(null), "dsmm: profile connection withdrawal");
8725
+ });
8626
8726
  profiles = controller;
8627
8727
  profileCtx.effect(() => controller.store.subscribe(() => {
8628
8728
  deployment?.setSession(controller.store.getSnapshot().session);
@@ -8641,6 +8741,10 @@ async function apply(ctx) {
8641
8741
  return () => style.remove();
8642
8742
  }, "dsmm: profile styles");
8643
8743
  const t = profileCtx.locale.bind(NS);
8744
+ void profileCtx.inject(["conversation"], (conversationCtx) => {
8745
+ controller.attachComposerBlocks(conversationCtx.conversation.blocks, () => t("sessionSelectionBlock"));
8746
+ conversationCtx.effect(() => () => controller.attachComposerBlocks(null), "dsmm: profile composer block lifetime");
8747
+ });
8644
8748
  profileCtx.slots.inject("settings.section", () => profileCtx.slots.register({
8645
8749
  name: "settings.section",
8646
8750
  id: "dsmm-profiles",
@@ -8698,7 +8802,6 @@ async function apply(ctx) {
8698
8802
  modelCtx.effect(() => () => controller.attachModelInteractionSource(null, null), "dsmm: native model interaction withdrawal");
8699
8803
  });
8700
8804
  });
8701
- void controller.refresh();
8702
8805
  });
8703
8806
  }
8704
8807
  return module.exports; } });