@dsmm/dsmm 0.1.6 → 0.1.8

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.
@@ -40,9 +40,9 @@ export interface ProfilesViewSnapshot {
40
40
  currentSessionId: string | null;
41
41
  session: SessionProfileSnapshot | null;
42
42
  sessionChoice: string | null;
43
- sessionBusy: "read" | "apply" | "reset" | null;
43
+ sessionBusy: "read" | "apply" | "reset" | "mode" | null;
44
44
  sessionIssue: ProfilesIssue | null;
45
- sessionNotice: "applied" | "reset" | "applied-with-model" | null;
45
+ sessionNotice: "applied" | "reset" | "applied-with-model" | "mode-on" | "mode-off" | null;
46
46
  invalidFields: string[];
47
47
  editorEpoch: number;
48
48
  }
@@ -66,6 +66,8 @@ export interface ProfilesActions {
66
66
  chooseSessionProfile(id: string | null): void;
67
67
  applySession(options?: SessionApplyOptions): Promise<void>;
68
68
  resetSession(): Promise<void>;
69
+ setDeepwork(active: boolean): Promise<void>;
70
+ useSessionProfileModel(): Promise<void>;
69
71
  setFieldInvalid(field: string, invalid: boolean): void;
70
72
  }
71
73
  export interface ModelCatalogRemote {
@@ -99,6 +101,8 @@ export declare class ProfilesController {
99
101
  private modelEventsSessionId;
100
102
  private modelEventsGeneration;
101
103
  private modelEventsWatermark;
104
+ private modeEventsWatermark;
105
+ private modeRefreshPending;
102
106
  private stopModelEvents;
103
107
  private modelInteraction;
104
108
  private modelInteractionSessionId;
@@ -118,7 +122,9 @@ export declare class ProfilesController {
118
122
  attachCatalog(remote: ModelCatalogRemote | null): void;
119
123
  setSession(id: string | null): void;
120
124
  refreshCatalog(): Promise<void>;
121
- refreshSession(): Promise<void>;
125
+ private refreshObservedMode;
126
+ refreshSession(preserveFeedback?: boolean): Promise<void>;
127
+ private setDeepwork;
122
128
  private selectSession;
123
129
  private publish;
124
130
  private accept;
@@ -7,6 +7,13 @@ function modelSelectionWatermark(window) {
7
7
  watermark = Math.max(watermark, Number(entry.event.seq));
8
8
  return watermark;
9
9
  }
10
+ function modeIntentWatermark(window) {
11
+ let watermark = -1;
12
+ for (const entry of window.entries)
13
+ if (entry.type === "event" && (entry.event.type === "deepwork/mode" || entry.event.type === "agent-preset/selected"))
14
+ watermark = Math.max(watermark, Number(entry.event.seq));
15
+ return watermark;
16
+ }
10
17
  const NEW_EDITOR = "";
11
18
  export const NEW_PROFILE_CONTENT = '{\n "version": 1,\n "id": "new-profile",\n "label": "New profile",\n "settings": {\n // Runtime overlay only. Omitted fields inherit the deployment baseline.\n "defaultActive": true\n }\n}\n';
12
19
  /** A valid external CAS conflict is reconcilable; corruption is never reset implicitly. */
@@ -36,6 +43,8 @@ export class ProfilesController {
36
43
  modelEventsSessionId = null;
37
44
  modelEventsGeneration = 0;
38
45
  modelEventsWatermark = -1;
46
+ modeEventsWatermark = -1;
47
+ modeRefreshPending = false;
39
48
  stopModelEvents = null;
40
49
  modelInteraction = null;
41
50
  modelInteractionSessionId = null;
@@ -59,6 +68,7 @@ export class ProfilesController {
59
68
  chooseSessionProfile: (id) => { if (!this.disposed && this.current.sessionBusy === null && this.current.busy === null && !this.current.dirty)
60
69
  this.publish({ sessionChoice: id, sessionNotice: null }); },
61
70
  applySession: (options) => this.selectSession(false, options), resetSession: () => this.selectSession(true),
71
+ setDeepwork: (active) => this.setDeepwork(active), useSessionProfileModel: () => this.selectSession(false, { useProfileModel: true }, true),
62
72
  setFieldInvalid: (field, invalid) => {
63
73
  if (this.disposed)
64
74
  return;
@@ -96,6 +106,7 @@ export class ProfilesController {
96
106
  this.modelEventsSessionId = sessionId;
97
107
  this.modelEvents = source;
98
108
  this.modelEventsWatermark = source === null ? -1 : modelSelectionWatermark(source.getSnapshot());
109
+ this.modeEventsWatermark = source === null ? -1 : modeIntentWatermark(source.getSnapshot());
99
110
  this.stopModelEvents = source?.subscribe(() => {
100
111
  const window = source.getSnapshot(), change = window.change;
101
112
  if (change.kind === "settle-assistant")
@@ -108,6 +119,17 @@ export class ProfilesController {
108
119
  this.modelEventsWatermark = watermark;
109
120
  this.modelEventsGeneration += 1;
110
121
  }
122
+ let modeWatermark = change.kind === "replace" ? -1 : this.modeEventsWatermark;
123
+ for (const entry of change.entries)
124
+ if (entry.type === "event" && (entry.event.type === "deepwork/mode" || entry.event.type === "agent-preset/selected"))
125
+ modeWatermark = Math.max(modeWatermark, Number(entry.event.seq));
126
+ if (modeWatermark !== this.modeEventsWatermark) {
127
+ this.modeEventsWatermark = modeWatermark;
128
+ if (sessionId === this.current.currentSessionId) {
129
+ this.modeRefreshPending = true;
130
+ this.refreshObservedMode();
131
+ }
132
+ }
111
133
  }) ?? null;
112
134
  }
113
135
  attachModelInteractionSource(sessionId, source) {
@@ -133,6 +155,7 @@ export class ProfilesController {
133
155
  if (this.disposed || id === this.current.currentSessionId)
134
156
  return;
135
157
  this.sessionGeneration += 1;
158
+ this.modeRefreshPending = false;
136
159
  if (id !== this.modelSelectionSessionId)
137
160
  this.attachModelSelectionSource(null, null);
138
161
  if (id !== this.modelEventsSessionId)
@@ -162,13 +185,18 @@ export class ProfilesController {
162
185
  this.publish({ catalogBusy: false });
163
186
  }
164
187
  }
165
- async refreshSession() {
188
+ refreshObservedMode() {
189
+ if (!this.disposed && this.modeRefreshPending && this.current.sessionBusy === null)
190
+ void this.refreshSession(true);
191
+ }
192
+ async refreshSession(preserveFeedback = false) {
166
193
  const id = this.current.currentSessionId;
167
194
  if (this.disposed || id === null || this.current.sessionBusy !== null)
168
195
  return;
196
+ this.modeRefreshPending = false;
169
197
  const generation = ++this.sessionGeneration;
170
198
  const live = () => !this.disposed && generation === this.sessionGeneration && id === this.current.currentSessionId;
171
- this.publish({ sessionBusy: "read", sessionIssue: null, sessionNotice: null });
199
+ this.publish({ sessionBusy: "read", ...(preserveFeedback ? {} : { sessionIssue: null, sessionNotice: null }) });
172
200
  try {
173
201
  const session = await this.unwrap(this.remote.describeSession(id));
174
202
  if (session.sessionId !== id)
@@ -181,18 +209,47 @@ export class ProfilesController {
181
209
  this.publish({ sessionIssue: this.issue(error) });
182
210
  }
183
211
  finally {
212
+ if (live()) {
213
+ this.publish({ sessionBusy: null });
214
+ this.refreshObservedMode();
215
+ }
216
+ }
217
+ }
218
+ async setDeepwork(active) {
219
+ const { currentSessionId: id, session } = this.current;
220
+ if (this.disposed || id === null || session?.deepwork === undefined || session.deepwork.locked || !session.switchAllowed
221
+ || this.current.sessionBusy !== null || this.current.busy !== null || this.remote.selectMode === undefined)
222
+ return;
223
+ const generation = ++this.sessionGeneration;
224
+ const live = () => !this.disposed && generation === this.sessionGeneration && id === this.current.currentSessionId;
225
+ this.publish({ sessionBusy: "mode", sessionIssue: null, sessionNotice: null });
226
+ try {
227
+ const accepted = await this.unwrap(this.remote.selectMode(id, { sessionId: id, active,
228
+ expectedModeRevision: session.deepwork.revision, expectedAdmissionEpoch: session.admissionEpoch }));
229
+ if (accepted.sessionId !== id || accepted.deepwork?.active !== active || !accepted.deepwork.explicit)
230
+ throw { kind: "assembly", code: "unavailable" };
231
+ if (live())
232
+ this.publish({ session: accepted, sessionNotice: active ? "mode-on" : "mode-off" });
233
+ }
234
+ catch (error) {
184
235
  if (live())
236
+ this.publish({ sessionIssue: this.issue(error) });
237
+ }
238
+ finally {
239
+ if (live()) {
185
240
  this.publish({ sessionBusy: null });
241
+ this.refreshObservedMode();
242
+ }
186
243
  }
187
244
  }
188
- async selectSession(reset, options) {
245
+ async selectSession(reset, options, modelOnly = false) {
189
246
  const { currentSessionId: id, session, sessionChoice, snapshot } = this.current;
190
247
  if (this.disposed || id === null || session === null || !session.switchAllowed || this.current.sessionBusy !== null
191
248
  || this.current.busy !== null || this.current.dirty || this.current.pendingEditor !== null)
192
249
  return;
193
250
  const selectedId = reset ? null : sessionChoice;
194
251
  const revision = snapshot?.profiles.find((profile) => profile.id === selectedId)?.revision;
195
- if (selectedId !== null && revision == null)
252
+ if (!modelOnly && selectedId !== null && revision == null)
196
253
  return;
197
254
  const generation = ++this.sessionGeneration;
198
255
  const useProfileModel = !reset && options?.useProfileModel === true;
@@ -201,18 +258,21 @@ export class ProfilesController {
201
258
  const modelSnapshot = modelSource?.getSnapshot();
202
259
  const eventSource = this.modelEvents, eventGeneration = this.modelEventsGeneration;
203
260
  const eventWatermark = eventSource === null ? -1 : modelSelectionWatermark(eventSource.getSnapshot());
261
+ const modeWatermark = eventSource === null ? -1 : modeIntentWatermark(eventSource.getSnapshot());
204
262
  const interaction = this.modelInteraction, interactionGeneration = this.modelInteractionGeneration;
205
263
  const pendingNativeChoice = interaction?.getSnapshot().status === "selecting";
206
264
  const live = () => !this.disposed && generation === this.sessionGeneration && id === this.current.currentSessionId;
207
265
  const selectorLive = () => live() && selector !== null && selector === this.modelSelector && selectorGeneration === this.modelSelectorGeneration;
208
266
  this.publish({ sessionBusy: reset ? "reset" : "apply", sessionIssue: null, sessionNotice: null });
209
267
  try {
210
- const accepted = await this.unwrap(this.remote.selectSession(id, {
268
+ const accepted = await this.unwrap(modelOnly ? this.remote.describeSession(id) : this.remote.selectSession(id, {
211
269
  sessionId: id, id: selectedId, ...(selectedId === null ? {} : { expectedRevision: revision }),
212
270
  expectedSelectionRevision: session.selection.selectionRevision, expectedAdmissionEpoch: session.admissionEpoch,
213
271
  }));
214
272
  if (accepted.sessionId !== id)
215
273
  throw { kind: "assembly", code: "unavailable" };
274
+ if (modelOnly && (accepted.admissionEpoch !== session.admissionEpoch || accepted.deepwork?.revision !== session.deepwork?.revision || !accepted.switchAllowed))
275
+ throw { kind: "domain", code: "conflict" };
216
276
  if (!live())
217
277
  return;
218
278
  this.publish({ session: accepted, sessionChoice: accepted.selection.selectedId, sessionNotice: useProfileModel ? null : reset ? "reset" : "applied" });
@@ -242,6 +302,7 @@ export class ProfilesController {
242
302
  return;
243
303
  }
244
304
  if (eventGeneration !== this.modelEventsGeneration || eventWatermark !== modelSelectionWatermark(eventSource.getSnapshot())
305
+ || (modelOnly && modeWatermark !== modeIntentWatermark(eventSource.getSnapshot()))
245
306
  || interactionGeneration !== this.modelInteractionGeneration || pendingNativeChoice || interaction.getSnapshot().status === "selecting") {
246
307
  this.publish({ sessionIssue: { kind: "assembly", code: "model-choice-changed", source: "profile-model" } });
247
308
  return;
@@ -266,8 +327,10 @@ export class ProfilesController {
266
327
  this.publish({ sessionIssue: this.issue(error) });
267
328
  }
268
329
  finally {
269
- if (live())
330
+ if (live()) {
270
331
  this.publish({ sessionBusy: null });
332
+ this.refreshObservedMode();
333
+ }
271
334
  }
272
335
  }
273
336
  publish(patch) {
@@ -31,6 +31,12 @@ export async function apply(ctx) {
31
31
  label: () => t("title"), locale: NS,
32
32
  inject: () => ({ hooks: { profiles: controller.store }, ...controller.actions }),
33
33
  }, ProfilesSection));
34
+ // Lowest numeric priority wins in native SlotCore. This root-scoped
35
+ // fallback never replaces ordinary native/plugin leading navigation.
36
+ profileCtx.slots.inject("conversation.header.leading", () => profileCtx.slots.register({
37
+ name: "conversation.header.leading", priority: Number.MAX_SAFE_INTEGER, locale: NS,
38
+ inject: () => ({ hooks: { profiles: controller.store }, readProfileView: controller.store.getSnapshot, ...controller.actions }),
39
+ }, SessionProfiles));
34
40
  // Optional native services have their own lifetime. Do not await them or
35
41
  // make sessionless Settings depend on a Conversation/session provider.
36
42
  void profileCtx.inject(["remote.session"], (catalogCtx) => {
@@ -70,10 +76,6 @@ export async function apply(ctx) {
70
76
  modelCtx.effect(() => source.subscribe(updateInteraction), "dsmm: native model interaction binding");
71
77
  modelCtx.effect(() => () => controller.attachModelInteractionSource(null, null), "dsmm: native model interaction withdrawal");
72
78
  });
73
- sessionCtx.slots.inject("conversation.session.header.utilities", () => sessionCtx.slots.register({
74
- name: "conversation.session.header.utilities", id: "dsmm-session-profiles", order: 30, locale: NS,
75
- inject: () => ({ hooks: { profiles: controller.store }, ...controller.actions }),
76
- }, SessionProfiles));
77
79
  });
78
80
  void controller.refresh();
79
81
  });
@@ -1,5 +1,15 @@
1
1
  export declare const NS = "settings.dsmm-profiles";
2
2
  export declare const en: {
3
+ headerCompactProfiles: string;
4
+ headerCompactRefresh: string;
5
+ headerNoSession: string;
6
+ headerModeEnable: string;
7
+ headerModeDisable: string;
8
+ headerModePreset: string;
9
+ headerModeUnavailable: string;
10
+ headerModeOn: string;
11
+ headerModeOff: string;
12
+ headerUseCurrentModel: string;
3
13
  title: string;
4
14
  description: string;
5
15
  newSessions: string;
@@ -53,6 +63,9 @@ export declare const en: {
53
63
  headerProfileLabel: string;
54
64
  headerCaptured: string;
55
65
  headerSavedUnavailable: string;
66
+ headerCurrentProfile: string;
67
+ headerRefresh: string;
68
+ headerUseModelAction: string;
56
69
  headerLoading: string;
57
70
  headerApplying: string;
58
71
  headerApplied: string;
@@ -68,6 +81,16 @@ export declare const en: {
68
81
  headerModelUnconfirmed: string;
69
82
  headerAppliedWithModel: string;
70
83
  headerModelChoiceChanged: string;
84
+ headerActivationRefused: string;
85
+ headerSelectionRefused: string;
86
+ headerIssueCode: string;
87
+ headerIssueField: string;
88
+ headerRetryHint: string;
89
+ headerMaintenanceRefused: string;
90
+ headerBusyRefused: string;
91
+ headerCancelledRefused: string;
92
+ headerUnavailableRefused: string;
93
+ headerWaitRetryHint: string;
71
94
  noSession: string;
72
95
  sessionUnavailable: string;
73
96
  sessionBusy: string;
@@ -1,5 +1,7 @@
1
1
  export const NS = "settings.dsmm-profiles";
2
2
  export const en = {
3
+ headerCompactProfiles: "Profiles · keep model", headerCompactRefresh: "Refresh", headerNoSession: "Select a session to make changes.",
4
+ headerModeEnable: "Enable Deepwork", headerModeDisable: "Disable Deepwork", headerModePreset: "Deepwork · DW preset", headerModeUnavailable: "Deepwork unavailable", headerModeOn: "Deepwork enabled.", headerModeOff: "Deepwork disabled.", headerUseCurrentModel: "Use profile model",
3
5
  title: "Deepwork Profiles", description: "Save independent runtime configurations and choose which one new sessions use.",
4
6
  newSessions: "Global apply and reset affect future unscoped sessions only. Current-session actions below are separate. A cold resume retains an explicit saved session choice; otherwise it inherits the global default.",
5
7
  editorSelect: "Profile to edit", choose: "Choose a profile", newDraft: "New unsaved profile", new: "New profile",
@@ -23,11 +25,13 @@ export const en = {
23
25
  invalidProfile: "Unavailable profile: {id}", details: "Host diagnostic", retry: "Resolve the diagnostic, refresh profiles, then retry.",
24
26
  globalScope: "Global default for future sessions", sessionScope: "Current native session", sessionSelect: "Current-session profile",
25
27
  globalActionHint: "Apply saved profile below changes the global default for future unscoped sessions only. It does not apply to the current session.",
26
- headerProfile: "Profile", headerProfileLabel: "Current-session profile (header)", headerCaptured: "captured global default", headerSavedUnavailable: "saved profile unavailable",
27
- headerLoading: "Loading profile…", headerApplying: "Applying profile…", headerApplied: "Profile applied.", headerBusy: "Session is busy.", headerUnavailable: "Profile unavailable.", headerDraft: "Save or discard the draft in Settings.", headerConflict: "Profile changed elsewhere. Refresh in Settings.", headerRefused: "Profile change unconfirmed. Check Settings.",
28
+ headerProfile: "Profile", headerProfileLabel: "Current-session profile (header)", headerCaptured: "captured global default", headerSavedUnavailable: "saved profile unavailable", headerCurrentProfile: "Current profile: {profile}", headerRefresh: "Refresh profiles and current-session state", headerUseModelAction: "Use profile model: {profile}",
29
+ headerLoading: "Loading profile…", headerApplying: "Applying profile…", headerApplied: "Profile applied.", headerBusy: "Session is busy.", headerUnavailable: "Profile unavailable.", headerDraft: "Save or discard the draft in Settings.", headerConflict: "The session profile or admission changed elsewhere. Refresh current-session state before retrying.", headerRefused: "Profile change unconfirmed. Check Settings.",
28
30
  headerKeepModelGroup: "Switch profile — keep current model", headerUseModelGroup: "Switch and use profile model", headerModelDefaultHint: "Normal switching preserves the current model. Explicit switch-and-use-model also saves the native model default, like the Models tab.",
29
31
  headerNoProfileModel: "Profile applied; no main model configured. Current model kept.", headerModelUnconfirmed: "Profile applied; model change unconfirmed. Check Models/Settings.", headerAppliedWithModel: "Profile and native model applied.",
30
32
  headerModelChoiceChanged: "Profile applied; newer native model choice kept.",
33
+ headerActivationRefused: "Profile activation was refused. Check its configuration and native model catalog.", headerSelectionRefused: "The profile change could not be confirmed.", headerIssueCode: "Reason: {code}.", headerIssueField: "Configuration field: {field}.", headerRetryHint: "Refresh profiles and current-session state, resolve the indicated issue in Settings or native Models, then retry when the session is idle.",
34
+ headerMaintenanceRefused: "Native maintenance owns this session. The previous profile is kept.", headerBusyRefused: "The session is busy. The previous profile is kept.", headerCancelledRefused: "The profile request was cancelled. Refresh current-session state before retrying; do not assume a change completed.", headerUnavailableRefused: "The native session or profile service is unavailable. Reconnect and refresh before retrying.", headerWaitRetryHint: "Wait for the native work or maintenance to finish, then Refresh and retry. No profile change is queued automatically.",
31
35
  noSession: "No native session is selected. Session Apply is disabled; global defaults and drafts remain editable.",
32
36
  sessionUnavailable: "The current session could not be confirmed. Refresh its state before retrying; the prior policy is kept.",
33
37
  sessionBusy: "Switching is unavailable: {reason}. The Host must reserve a truly idle ordinary session before applying.",
@@ -54,6 +58,8 @@ export const en = {
54
58
  advanced: "Advanced JSONC", rawInvalid: "Structured editing is unavailable for this invalid raw draft. Correct Advanced JSONC; no fields, comments or bytes have been normalized.", invalidNumber: "Correct this bounded integer before saving or changing roles. The invalid value has not replaced the saved draft policy.",
55
59
  };
56
60
  export const zh = {
61
+ headerCompactProfiles: "配置档 · 保留模型", headerCompactRefresh: "刷新", headerNoSession: "选择会话后可更改。",
62
+ headerModeEnable: "启用 Deepwork", headerModeDisable: "关闭 Deepwork", headerModePreset: "Deepwork · DW 预设", headerModeUnavailable: "Deepwork 不可用", headerModeOn: "Deepwork 已启用。", headerModeOff: "Deepwork 已关闭。", headerUseCurrentModel: "使用配置档模型",
57
63
  title: "Deepwork 配置档", description: "保存独立的运行时配置,并选择新会话使用的配置档。",
58
64
  newSessions: "全局应用和重置仅影响之后没有独立选择的新会话。下方当前会话操作相互独立。冷恢复保留明确保存的会话选择,否则继承全局默认值。",
59
65
  editorSelect: "要编辑的配置档", choose: "选择配置档", newDraft: "新的未保存配置档", new: "新建配置档",
@@ -77,10 +83,12 @@ export const zh = {
77
83
  invalidProfile: "不可用配置档:{id}", details: "Host 诊断", retry: "请解决诊断问题,刷新配置档后重试。",
78
84
  globalScope: "未来会话的全局默认值", sessionScope: "当前原生会话", sessionSelect: "当前会话配置档",
79
85
  globalActionHint: "下方应用已保存配置档仅改变未来没有独立选择的会话的全局默认值,不会应用到当前会话。",
80
- headerProfile: "配置档", headerProfileLabel: "当前会话配置档(会话栏)", headerCaptured: "已捕获的全局默认值", headerSavedUnavailable: "保存的配置档不可用",
81
- headerLoading: "加载配置档…", headerApplying: "应用配置档…", headerApplied: "配置档已应用。", headerBusy: "会话忙碌。", headerUnavailable: "配置档不可用。", headerDraft: "请在设置中保存或丢弃草稿。", headerConflict: "配置档已在其他位置改变,请在设置中刷新。", headerRefused: "未确认配置档更改,请检查设置。",
86
+ headerProfile: "配置档", headerProfileLabel: "当前会话配置档(会话栏)", headerCaptured: "已捕获的全局默认值", headerSavedUnavailable: "保存的配置档不可用", headerCurrentProfile: "当前配置档:{profile}", headerRefresh: "刷新配置档和当前会话状态", headerUseModelAction: "使用配置档模型:{profile}",
87
+ headerLoading: "加载配置档…", headerApplying: "应用配置档…", headerApplied: "配置档已应用。", headerBusy: "会话忙碌。", headerUnavailable: "配置档不可用。", headerDraft: "请在设置中保存或丢弃草稿。", headerConflict: "会话配置档或准入代次已在其他位置改变,请刷新当前会话状态后重试。", headerRefused: "未确认配置档更改,请检查设置。",
82
88
  headerKeepModelGroup: "切换配置档 — 保留当前模型", headerUseModelGroup: "切换并使用配置档模型", headerModelDefaultHint: "普通切换保留当前模型。明确切换并使用模型还会像模型页一样保存原生模型默认值。", headerNoProfileModel: "配置档已应用,未配置主模型。当前模型已保留。", headerModelUnconfirmed: "配置档已应用,模型更改未确认。请检查模型或设置页。", headerAppliedWithModel: "配置档和原生模型已应用。",
83
89
  headerModelChoiceChanged: "配置档已应用,已保留更新的原生模型选择。",
90
+ headerActivationRefused: "配置档启用被拒绝,请检查其配置和原生模型目录。", headerSelectionRefused: "无法确认配置档更改。", headerIssueCode: "原因:{code}。", headerIssueField: "配置字段:{field}。", headerRetryHint: "请刷新配置档和当前会话状态,在设置或原生模型页解决所示问题,然后在会话空闲时重试。",
91
+ headerMaintenanceRefused: "原生维护正在占用此会话,原配置档已保留。", headerBusyRefused: "会话正在运行,原配置档已保留。", headerCancelledRefused: "配置档请求已取消,请刷新当前会话状态后重试,不要假定更改已完成。", headerUnavailableRefused: "原生会话或配置档服务不可用,请重新连接并刷新后重试。", headerWaitRetryHint: "请等待原生运行或维护结束,然后刷新并重试。不会自动排队应用配置档。",
84
92
  noSession: "未选择原生会话。会话应用已禁用;仍可编辑全局默认值和草稿。", sessionUnavailable: "无法确认当前会话。重试前请刷新状态;原策略已保留。", sessionBusy: "暂不可切换:{reason}。Host 必须先保留真正空闲的普通会话。", sessionState: "会话 {id}:{profile};范围 {scope};准入代次 {epoch}。", sessionBaseline: "部署基线",
85
93
  sessionGlobalCaptured: "已捕获的全局默认值(没有明确会话覆盖)",
86
94
  sessionAdmittedProfile: "{id}(修订 {revision})", sessionFutureDefault: "未来没有独立选择的会话的全局默认值:{profile}。这不会改变当前会话的准入。",
@@ -1,3 +1,3 @@
1
1
  /** Geometry and theme aliases extracted in dsmm/DESIGN.md; scoped to this section. */
2
- export declare const PROFILE_STYLES = "\n.dsmm-profiles{width:100%;max-width:760px;min-width:0;display:flex;flex-direction:column;gap:12px;font-family:var(--dsw-font-family);font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}\n.dsmm-profiles h2{margin:0;font-size:18px;font-weight:600}\n.dsmm-profiles h3,.dsmm-profiles legend{margin:0;font-size:14px;font-weight:500;line-height:22px}\n.dsmm-profiles :is(label,legend,summary){min-width:0;max-width:100%;overflow-wrap:anywhere}\n.dsmm-profiles :is(.dsmm-structured,.dsmm-session-scope,.dsmm-catalog,.dsmm-policy-fields){min-width:0;display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles fieldset{min-width:0;margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles .dsmm-route-fields{display:flex;flex-wrap:wrap;gap:12px;min-width:0}\n.dsmm-profiles .dsmm-route-fields>.dsmm-field{flex:1 1 240px;max-width:100%}\n.dsmm-profiles .dsmm-route-fields select{width:100%}\n.dsmm-profiles summary{cursor:pointer;color:var(--dsw-alias-label-primary);min-height:32px;line-height:32px}\n.dsmm-profiles summary:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles .dsmm-advanced[open]>div{margin-top:8px}\n.dsmm-profiles.dsmm-header-profiles{width:auto;max-width:min(100%,max(0px,calc(100cqw - 24px)));flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles.dsmm-header-profiles select{width:240px;max-width:100%;flex:1 1 0}\n.dsmm-header-profiles span{min-width:0;max-width:100%;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles p{margin:0;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}\n.dsmm-profiles .dsmm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:36px;height:auto}\n.dsmm-profiles .dsmm-input{width:100%;min-width:0;box-sizing:border-box;border-color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-input input{width:100%;min-width:0;font:inherit;color:inherit}\n.dsmm-profiles select,.dsmm-profiles textarea{box-sizing:border-box;min-width:0;max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-md)}\n.dsmm-profiles select{width:240px;height:32px;padding:0 10px;text-overflow:ellipsis}\n.dsmm-profiles textarea{width:100%;padding:12px;font-family:var(--ds-font-family-code);resize:vertical;overflow:auto;white-space:pre;}\n.dsmm-profiles select:hover:not(:disabled),.dsmm-profiles textarea:hover:not(:disabled){border-color:var(--dsw-alias-label-primary)}\n.dsmm-profiles select:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}\n.dsmm-profiles :is(select,textarea,button):focus-visible,.dsmm-profiles .dsmm-input:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles :is(select,textarea):disabled{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);cursor:not-allowed}\n.dsmm-profiles .dsmm-editor,.dsmm-profiles .dsmm-confirm{min-width:0;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform)}\n.dsmm-profiles .dsmm-issue{padding:12px;border-left:4px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-issue p+p{margin-top:8px}\n.dsmm-profiles .dsmm-status{min-height:22px}\n@media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}\n";
2
+ export declare const PROFILE_STYLES = "\n.dsmm-profiles{width:100%;max-width:760px;min-width:0;display:flex;flex-direction:column;gap:12px;font-family:var(--dsw-font-family);font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}\n.dsmm-profiles h2{margin:0;font-size:18px;font-weight:600}\n.dsmm-profiles h3,.dsmm-profiles legend{margin:0;font-size:14px;font-weight:500;line-height:22px}\n.dsmm-profiles :is(label,legend,summary){min-width:0;max-width:100%;overflow-wrap:anywhere}\n.dsmm-profiles :is(.dsmm-structured,.dsmm-session-scope,.dsmm-catalog,.dsmm-policy-fields){min-width:0;display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles fieldset{min-width:0;margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles .dsmm-route-fields{display:flex;flex-wrap:wrap;gap:12px;min-width:0}\n.dsmm-profiles .dsmm-route-fields>.dsmm-field{flex:1 1 240px;max-width:100%}\n.dsmm-profiles .dsmm-route-fields select{width:100%}\n.dsmm-profiles summary{cursor:pointer;color:var(--dsw-alias-label-primary);min-height:32px;line-height:32px}\n.dsmm-profiles summary:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles .dsmm-advanced[open]>div{margin-top:8px}\n.dsmm-header-profiles{display:inline-flex;align-items:center;min-width:0;font-family:var(--dsw-font-family);color:var(--dsw-alias-label-primary)}\n.dsmm-header-profiles .dsmm-profile-trigger{width:28px;height:28px;min-height:28px;padding:6px;justify-content:center}\n.dsmm-profile-trigger:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profile-menu{font-family:var(--dsw-font-family);font-size:14px;line-height:22px;max-width:calc(100vw - 24px);color:var(--dsw-alias-label-primary)}\n.dsmm-profile-menu [role=presentation]{font:inherit;white-space:normal;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary)}\n.dsmm-profile-menu [role=menuitem]{font:inherit}\n.dsmm-profile-menu [role=menuitem]>span{white-space:normal;overflow-wrap:anywhere}\n.dsmm-profile-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n.dsmm-profiles p{margin:0;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}\n.dsmm-profiles .dsmm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:36px;height:auto}\n.dsmm-profiles .dsmm-input{width:100%;min-width:0;box-sizing:border-box;border-color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-input input{width:100%;min-width:0;font:inherit;color:inherit}\n.dsmm-profiles select,.dsmm-profiles textarea{box-sizing:border-box;min-width:0;max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-md)}\n.dsmm-profiles select{width:240px;height:32px;padding:0 10px;text-overflow:ellipsis}\n.dsmm-profiles textarea{width:100%;padding:12px;font-family:var(--ds-font-family-code);resize:vertical;overflow:auto;white-space:pre;}\n.dsmm-profiles select:hover:not(:disabled),.dsmm-profiles textarea:hover:not(:disabled){border-color:var(--dsw-alias-label-primary)}\n.dsmm-profiles select:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}\n.dsmm-profiles :is(select,textarea,button):focus-visible,.dsmm-profiles .dsmm-input:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles :is(select,textarea):disabled{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);cursor:not-allowed}\n.dsmm-profiles .dsmm-editor,.dsmm-profiles .dsmm-confirm{min-width:0;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform)}\n.dsmm-profiles .dsmm-issue{padding:12px;border-left:4px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-issue p+p{margin-top:8px}\n.dsmm-profiles .dsmm-status{min-height:22px}\n@media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}\n";
3
3
  //# sourceMappingURL=styles.d.ts.map
@@ -12,9 +12,14 @@ export const PROFILE_STYLES = `
12
12
  .dsmm-profiles summary{cursor:pointer;color:var(--dsw-alias-label-primary);min-height:32px;line-height:32px}
13
13
  .dsmm-profiles summary:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}
14
14
  .dsmm-profiles .dsmm-advanced[open]>div{margin-top:8px}
15
- .dsmm-profiles.dsmm-header-profiles{width:auto;max-width:min(100%,max(0px,calc(100cqw - 24px)));flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}
16
- .dsmm-profiles.dsmm-header-profiles select{width:240px;max-width:100%;flex:1 1 0}
17
- .dsmm-header-profiles span{min-width:0;max-width:100%;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary)}
15
+ .dsmm-header-profiles{display:inline-flex;align-items:center;min-width:0;font-family:var(--dsw-font-family);color:var(--dsw-alias-label-primary)}
16
+ .dsmm-header-profiles .dsmm-profile-trigger{width:28px;height:28px;min-height:28px;padding:6px;justify-content:center}
17
+ .dsmm-profile-trigger:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}
18
+ .dsmm-profile-menu{font-family:var(--dsw-font-family);font-size:14px;line-height:22px;max-width:calc(100vw - 24px);color:var(--dsw-alias-label-primary)}
19
+ .dsmm-profile-menu [role=presentation]{font:inherit;white-space:normal;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary)}
20
+ .dsmm-profile-menu [role=menuitem]{font:inherit}
21
+ .dsmm-profile-menu [role=menuitem]>span{white-space:normal;overflow-wrap:anywhere}
22
+ .dsmm-profile-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
18
23
  .dsmm-profiles p{margin:0;overflow-wrap:anywhere}
19
24
  .dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}
20
25
  .dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}