dsh-model-switch 0.4.45 → 0.4.47

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## v0.4.47
2
+
3
+ 两件用户可见修正(撤卡 + 计划卡换模型),均为热修。
4
+
5
+ - **设置页撤下「记忆蒸馏模型」卡片与供应商分组第五行**:该能力此前只有界面,路由未证实会改变 `dsh-prime-memory` 的实际蒸馏调用(见 `docs/route-verification.md` 的 memory 行与 `docs/prime-memory.md` 的负结果)。适配层 `src/prime-memory-compat.ts` 与 `memoryProvider` / `memoryModel` 设置字段**保留休眠**,等虚拟探针记录到 L1/L2/L3 命中配置路由后再恢复 UI(开关 `MEMORY_CAPABILITY_UI`);分组说明文案同步收回到「压缩、自动审查、会话命名、子代理」四项。
6
+ - **计划审阅卡换模型后点「拒绝」/「讨论」,会话仍用旧模型**:卡片内的执行模型选择器只写草稿,唯一提交点原本只在「接受」路径。现在四个出口(接受 / 拒绝 / 讨论 / 作为目标执行)统一先提交草稿再执行 —— `commitThen()` 复用 `approvePlanReview` 的「未变更短路、提交被拒则不答复」;提交被拒时卡片保持打开并显示原因,不再静默回退旧模型。
7
+ - **测试**:计划卡新增 3 例(拒绝时提交、提交被拒保持打开且不答复、讨论前提交),`tests/picker/plan-review-card.spec.tsx` 32 例全绿;`pnpm run check` 全绿。
8
+ - **规则固化**:`AGENTS.md` 新增「Lab 验证:全程虚拟请求/虚拟答复,零真实额度」;`tools/route-probe.mjs` 增加 `--preset`(`classifier-allow` / `classifier-deny` / `title` / `memory` / `plan`)与 `--tool` 工具调用回放;每日巡检 prompt 同步该约束。
9
+ - **未在本次完成**(按计划随后续版本走):记忆蒸馏路由落地与虚拟实测、DSH `0.2.1-rc.4` 的验证与声明、Auto review 与 automode 分类器的虚拟实测。
10
+
11
+ ## v0.4.46
12
+
13
+ 设置页「记忆蒸馏模型」的说明补上生效条件:**改完需重启一次 DSH**(该插件在启动时读取路由)。文案与实际行为对齐,避免再次出现"界面显示已改、实际调用没变"的误解。
14
+
1
15
  ## v0.4.45
2
16
 
3
17
  「记忆蒸馏模型」现在真的会生效——方式是**改成静态路由并重启一次**,而不是运行时热切换。
package/lib/client.js CHANGED
@@ -1743,7 +1743,7 @@ window.__ModuleLoader__.load({
1743
1743
  const compactionChoices = deriveRouteChoices(groups, compactionDraft);
1744
1744
  const compactionOn = routePairConfigured(compaction.value);
1745
1745
  const titleChoices = deriveRouteChoices(groups, titleDraft);
1746
- const memoryChoices = deriveRouteChoices(groups, memoryDraft);
1746
+ deriveRouteChoices(groups, memoryDraft);
1747
1747
  const titleOn = routePairConfigured(sessionTitle.value);
1748
1748
  const catalogSeed = firstCatalogRoute(groups);
1749
1749
  const synced = [
@@ -2030,7 +2030,7 @@ window.__ModuleLoader__.load({
2030
2030
  const groupCompactionChoices = deriveRouteChoices(groups, groupCompaction);
2031
2031
  const groupAutoReviewChoices = deriveRouteChoices(groups, groupAutoReview);
2032
2032
  const groupTitleChoices = deriveRouteChoices(groups, groupTitle);
2033
- const groupMemoryChoices = deriveRouteChoices(groups, groupMemory);
2033
+ deriveRouteChoices(groups, groupMemory);
2034
2034
  const groupSubagentChoices = deriveRouteChoices(groups, groupSubagent);
2035
2035
  const groupSubMatched = matchCatalogModel(groups.find((group) => group.id === (groupDraft?.subagentProvider ?? ""))?.models ?? [], groupDraft?.subagentModel ?? "");
2036
2036
  const groupSubEfforts = (() => {
@@ -2597,66 +2597,7 @@ window.__ModuleLoader__.load({
2597
2597
  })
2598
2598
  ] })
2599
2599
  }),
2600
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RouteCard, {
2601
- title: props.t("memory"),
2602
- summary: memoryDraft === void 0 ? props.t("loading") : routePairConfigured(memoryDraft) ? routeName(groups, memoryDraft) : props.t("memoryFollow"),
2603
- hint: props.t("memoryHelp"),
2604
- note: groupNote(props.t, groupPins.memory),
2605
- icon: "memory",
2606
- open: open === "memory",
2607
- onToggle: () => {
2608
- toggle("memory");
2609
- },
2610
- children: memoryDraft === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
2611
- className: ModelSwitchSettings_module_css_default.hint,
2612
- children: props.t("loading")
2613
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
2614
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
2615
- className: ModelSwitchSettings_module_css_default.hint,
2616
- children: props.t("memoryRouteHelp")
2617
- }),
2618
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2619
- className: ModelSwitchSettings_module_css_default.formGrid,
2620
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
2621
- label: props.t("provider"),
2622
- value: memoryDraft.provider ?? "",
2623
- disabled: busy !== void 0 || !memory.writable,
2624
- choices: memoryChoices.providers,
2625
- onChange: (provider) => {
2626
- const first = groups.find((group) => group.id === provider)?.models[0];
2627
- setMemoryDraft({
2628
- provider,
2629
- ...first === void 0 ? {} : { model: first.id }
2630
- });
2631
- }
2632
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
2633
- label: props.t("model"),
2634
- value: memoryDraft.model ?? "",
2635
- disabled: busy !== void 0 || !memory.writable,
2636
- choices: memoryChoices.models,
2637
- onChange: (model) => {
2638
- setMemoryDraft({
2639
- ...memoryDraft,
2640
- model
2641
- });
2642
- }
2643
- })]
2644
- }),
2645
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Actions, {
2646
- t: props.t,
2647
- busy: busy === "memory",
2648
- disabled: busy !== void 0 || !memory.writable,
2649
- ...message?.route === "memory" ? { message: message.text } : {},
2650
- onCancel: () => {
2651
- resetMemory();
2652
- setMessage(void 0);
2653
- },
2654
- onSave: () => {
2655
- run("memory", () => props.saveCapability("memory", pairOps(memoryDraft)));
2656
- }
2657
- })
2658
- ] })
2659
- })
2600
+ null
2660
2601
  ]
2661
2602
  }),
2662
2603
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
@@ -3012,55 +2953,7 @@ window.__ModuleLoader__.load({
3012
2953
  }
3013
2954
  })]
3014
2955
  }),
3015
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3016
- className: ModelSwitchSettings_module_css_default.rowCard,
3017
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3018
- className: ModelSwitchSettings_module_css_default.rowCopy,
3019
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3020
- className: ModelSwitchSettings_module_css_default.rowTitle,
3021
- children: props.t("memory")
3022
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3023
- className: ModelSwitchSettings_module_css_default.hint,
3024
- children: groupMemory === void 0 ? props.t("memoryFollow") : routeName(groups, groupMemory)
3025
- })]
3026
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstantSwitch, {
3027
- checked: groupMemory !== void 0,
3028
- disabled: groupControlsDisabled || groupMemory === void 0 && catalogSeed === void 0,
3029
- label: props.t("memory"),
3030
- onChange: (value) => {
3031
- if (value) enableGroupCapability("memory");
3032
- else disableGroupCapability("memory");
3033
- }
3034
- })]
3035
- }),
3036
- groupMemory === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3037
- className: ModelSwitchSettings_module_css_default.formGrid,
3038
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3039
- label: props.t("provider"),
3040
- value: groupMemory.provider,
3041
- disabled: groupControlsDisabled,
3042
- choices: groupMemoryChoices.providers,
3043
- onChange: (provider) => {
3044
- const first = groups.find((item) => item.id === provider)?.models[0];
3045
- setGroupDraft((draft) => draft === void 0 ? draft : {
3046
- ...draft,
3047
- memoryProvider: provider,
3048
- memoryModel: first?.id ?? ""
3049
- });
3050
- }
3051
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3052
- label: props.t("model"),
3053
- value: groupMemory.model,
3054
- disabled: groupControlsDisabled,
3055
- choices: groupMemoryChoices.models,
3056
- onChange: (model) => {
3057
- setGroupDraft((draft) => draft === void 0 ? draft : {
3058
- ...draft,
3059
- memoryModel: model
3060
- });
3061
- }
3062
- })]
3063
- }),
2956
+ null,
3064
2957
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3065
2958
  className: ModelSwitchSettings_module_css_default.rowCard,
3066
2959
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -3203,13 +3096,13 @@ window.__ModuleLoader__.load({
3203
3096
  titleRouteHelp: "命名请求固定使用这里的 Provider/模型(不带推理强度);关闭时跟随会话模型。保存后立即对下一次命名生效,不会中断正在进行的命名,会话日志记录的也是实际使用的模型。",
3204
3097
  memory: "记忆蒸馏模型",
3205
3098
  memoryFollow: "跟随记忆插件默认",
3206
- memoryHelp: "为 dsh-prime-memory 的记忆蒸馏指定路由;两个字段都留空时跟随该插件自己的默认模型。",
3207
- memoryRouteHelp: "按部署默认供应商的配置组解析;该供应商没有组时使用这里填写的平面默认。只改它的内存配置,不写入它的设置。",
3099
+ memoryHelp: "为 dsh-prime-memory 的记忆蒸馏指定路由;两个字段都留空时跟随该插件自己的默认模型。改完需重启一次 DSH 才生效(该插件在启动时读取路由)。",
3100
+ memoryRouteHelp: "按部署默认供应商的配置组解析;该供应商没有组时使用这里填写的平面默认。写入该行的静态路由(llm.provider/llm.model),启动时生效。",
3208
3101
  providerGroups: "供应商配置组",
3209
3102
  providerGroupsCard: "按供应商预设路由",
3210
3103
  providerGroupsSummary: "使用该供应商的会话自动采用对应组",
3211
- providerGroupsHelp: "为压缩、自动审查、会话命名、记忆蒸馏与子代理按供应商分别保存路由。",
3212
- providerGroupsBodyHelp: "每个供应商保存一组压缩、自动审查、会话命名与子代理路由。会话自身的供应商与该组一致时,这五项能力(含记忆蒸馏)按组实时解析,未固定项回落到上方卡片里的全局设置。切换某个会话的模型不会写入任何全局设置,因此不同供应商的多个会话并行时互不影响,会话中切换供应商后下一次调用也会立即跟随新供应商的配置组。",
3104
+ providerGroupsHelp: "为压缩、自动审查、会话命名与子代理按供应商分别保存路由。",
3105
+ providerGroupsBodyHelp: "每个供应商保存一组压缩、自动审查、会话命名与子代理路由。会话自身的供应商与该组一致时,这四项能力按组实时解析,未固定项回落到上方卡片里的全局设置。切换某个会话的模型不会写入任何全局设置,因此不同供应商的多个会话并行时互不影响,会话中切换供应商后下一次调用也会立即跟随新供应商的配置组。",
3213
3106
  providerGroupPick: "选择供应商以编辑其配置组。",
3214
3107
  providerGroupDelete: "删除该组",
3215
3108
  groupOverridesLabel: "组覆盖:{pins};无组时用上方默认值",
@@ -3290,13 +3183,13 @@ window.__ModuleLoader__.load({
3290
3183
  titleRouteHelp: "Naming requests use exactly this provider/model (no reasoning effort); when off they follow the session model. A saved change applies to the very next title, never interrupts a running one, and the session log records the route actually used.",
3291
3184
  memory: "Memory distillation model",
3292
3185
  memoryFollow: "Follows the memory plugin default",
3293
- memoryHelp: "Pin the distillation route for dsh-prime-memory. Both fields empty keeps that plugin on its own default model.",
3294
- memoryRouteHelp: "Resolved from the deployment default provider group; without a group the flat pair here applies. Applied in memory only, never written into that plugin settings.",
3186
+ memoryHelp: "Pin the distillation route for dsh-prime-memory. Both fields empty keeps that plugin on its own default model. Restart DSH once after changing it — that plugin reads the route at start.",
3187
+ memoryRouteHelp: "Resolved from the deployment default provider group; without a group the flat pair here applies. Written as that row’s static route (llm.provider/llm.model), which applies at start.",
3295
3188
  providerGroups: "Provider groups",
3296
3189
  providerGroupsCard: "Per-provider route presets",
3297
3190
  providerGroupsSummary: "Sessions using that provider adopt this group",
3298
- providerGroupsHelp: "Save compaction, auto-review, session-naming, memory distillation, and subagent routes per provider.",
3299
- providerGroupsBodyHelp: "Each provider stores one route group for compaction, auto review, session naming, and subagents. A session running on that provider resolves all five capabilities (memory distillation included) from the group and falls back to the cards above when a row is off. Switching a session’s model writes no global setting, so parallel sessions on different providers never affect each other, and mid-session provider switches take effect on the very next call.",
3191
+ providerGroupsHelp: "Save compaction, auto-review, session-naming, and subagent routes per provider.",
3192
+ providerGroupsBodyHelp: "Each provider stores one route group for compaction, auto review, session naming, and subagents. A session running on that provider resolves all four capabilities from the group and falls back to the cards above when a row is off. Switching a session’s model writes no global setting, so parallel sessions on different providers never affect each other, and mid-session provider switches take effect on the very next call.",
3300
3193
  providerGroupPick: "Pick a provider to edit its group.",
3301
3194
  providerGroupDelete: "Delete group",
3302
3195
  groupOverridesLabel: "Group overrides: {pins}; without a group the default above applies",
@@ -3382,6 +3275,21 @@ window.__ModuleLoader__.load({
3382
3275
  const code = codeOf(cause) ?? (cause instanceof Error ? codeOf(cause.cause) : void 0);
3383
3276
  return code === void 0 ? message : `${code}: ${message}`;
3384
3277
  }
3278
+ /**
3279
+ * Commit the execution model a Plan card holds, then run its exit.
3280
+ *
3281
+ * Shared by every exit (approve, keep, discuss, run-as-goal): the card's picker
3282
+ * is a draft, so an exit that skipped this call left the session on the model
3283
+ * the review opened with. An unchanged selection short-circuits without a
3284
+ * second commit, and a refused commit returns `false` **without** running the
3285
+ * exit, so the caller can keep the card open and show the error.
3286
+ *
3287
+ * @param args.select - commits one selection onto the session.
3288
+ * @param args.selection - the execution model the card currently holds.
3289
+ * @param args.current - the session's committed selection, for the short-circuit.
3290
+ * @param args.answer - the exit to run once the commit landed.
3291
+ * @returns whether the exit ran.
3292
+ */
3385
3293
  async function approvePlanReview(args) {
3386
3294
  const current = args.current;
3387
3295
  if (!(current !== void 0 && current !== null && current.provider === args.selection.provider && current.model === args.selection.model && current.reasoningEffort === args.selection.reasoningEffort ? { committed: true } : await args.select(args.selection)).committed) return false;
@@ -5229,18 +5137,40 @@ window.__ModuleLoader__.load({
5229
5137
  blocked,
5230
5138
  error
5231
5139
  }, available, executionAllowed);
5232
- /** Approve this review after committing its execution model; a refused commit keeps the Plan pending. */
5233
- const approveWith = async (model) => {
5140
+ /**
5141
+ * Commit one execution model, then run the card exit.
5142
+ *
5143
+ * The picker on this card only holds a **draft** (`onDraftChange`), so a
5144
+ * model chosen here reaches the session only when something commits it. That
5145
+ * used to be Approve alone: keeping the plan or withdrawing to the composer
5146
+ * silently discarded the change and the conversation continued on the
5147
+ * previous model. Every exit now runs through this helper instead.
5148
+ *
5149
+ * @param model - the execution model to commit; `undefined` means the card
5150
+ * has not resolved a picker yet, so the exit runs uncommitted.
5151
+ * @param act - the exit to perform once the commit landed.
5152
+ * @returns nothing; a refused commit throws so the card stays open with the
5153
+ * error, exactly like a refused approval, instead of dropping the choice.
5154
+ */
5155
+ const commitThen = async (model, act) => {
5156
+ if (model === void 0) {
5157
+ await act();
5158
+ return;
5159
+ }
5234
5160
  if (!await approvePlanReview({
5235
5161
  select,
5236
5162
  selection: model,
5237
5163
  current: snapshot.current,
5238
- answer: () => respondAnswer(matched, review.id, review.approve.label, t("plan.responseRejected"), true)
5164
+ answer: act
5239
5165
  })) {
5240
5166
  const message = getDirectorySnapshot().error;
5241
5167
  throw new Error(message === null ? t("plan.modelFailed") : t("error.action", { message }));
5242
5168
  }
5243
5169
  };
5170
+ /** Commit whatever the picker currently holds, then run the exit. */
5171
+ const commitDraftThen = (act) => commitThen(execution, act);
5172
+ /** Approve this review after committing its execution model; a refused commit keeps the Plan pending. */
5173
+ const approveWith = (model) => commitThen(model, () => respondAnswer(matched, review.id, review.approve.label, t("plan.responseRejected"), true));
5244
5174
  const onApprove = () => {
5245
5175
  if (execution === void 0 || !executionAllowed || !available || busy || blocked) return;
5246
5176
  settle(async () => {
@@ -5382,7 +5312,9 @@ window.__ModuleLoader__.load({
5382
5312
  disabled: busy,
5383
5313
  onClick: () => {
5384
5314
  settle(async () => {
5385
- await discussPlan(cancelTurn, matched.sessionId, () => respondDismiss(matched, t("plan.cancelRejected"), t("plan.dismissUnsupported")));
5315
+ await commitDraftThen(async () => {
5316
+ await discussPlan(cancelTurn, matched.sessionId, () => respondDismiss(matched, t("plan.cancelRejected"), t("plan.dismissUnsupported")));
5317
+ });
5386
5318
  }, true);
5387
5319
  },
5388
5320
  children: t("plan.discuss")
@@ -5393,7 +5325,7 @@ window.__ModuleLoader__.load({
5393
5325
  disabled: busy || blocked,
5394
5326
  title: decline.description ?? t("plan.keep"),
5395
5327
  onClick: () => {
5396
- settle(() => respondAnswer(matched, review.id, decline.label, t("plan.responseRejected"), false, feedback.trim()));
5328
+ settle(() => commitDraftThen(() => respondAnswer(matched, review.id, decline.label, t("plan.responseRejected"), false, feedback.trim())));
5397
5329
  },
5398
5330
  children: t("plan.keep")
5399
5331
  }),
package/lib/index.js CHANGED
@@ -999,6 +999,21 @@ function selectPlanReview(owner) {
999
999
  if (interaction === void 0 || interaction.kind !== "question" && interaction.kind !== "plan-review") return null;
1000
1000
  return planReviewOf(interaction.questions) === void 0 ? null : interaction;
1001
1001
  }
1002
+ /**
1003
+ * Commit the execution model a Plan card holds, then run its exit.
1004
+ *
1005
+ * Shared by every exit (approve, keep, discuss, run-as-goal): the card's picker
1006
+ * is a draft, so an exit that skipped this call left the session on the model
1007
+ * the review opened with. An unchanged selection short-circuits without a
1008
+ * second commit, and a refused commit returns `false` **without** running the
1009
+ * exit, so the caller can keep the card open and show the error.
1010
+ *
1011
+ * @param args.select - commits one selection onto the session.
1012
+ * @param args.selection - the execution model the card currently holds.
1013
+ * @param args.current - the session's committed selection, for the short-circuit.
1014
+ * @param args.answer - the exit to run once the commit landed.
1015
+ * @returns whether the exit ran.
1016
+ */
1002
1017
  async function approvePlanReview(args) {
1003
1018
  const current = args.current;
1004
1019
  if (!(current !== void 0 && current !== null && current.provider === args.selection.provider && current.model === args.selection.model && current.reasoningEffort === args.selection.reasoningEffort ? { committed: true } : await args.select(args.selection)).committed) return false;
@@ -44,13 +44,13 @@ export declare const zh: {
44
44
  readonly titleRouteHelp: "命名请求固定使用这里的 Provider/模型(不带推理强度);关闭时跟随会话模型。保存后立即对下一次命名生效,不会中断正在进行的命名,会话日志记录的也是实际使用的模型。";
45
45
  readonly memory: "记忆蒸馏模型";
46
46
  readonly memoryFollow: "跟随记忆插件默认";
47
- readonly memoryHelp: "为 dsh-prime-memory 的记忆蒸馏指定路由;两个字段都留空时跟随该插件自己的默认模型。";
48
- readonly memoryRouteHelp: "按部署默认供应商的配置组解析;该供应商没有组时使用这里填写的平面默认。只改它的内存配置,不写入它的设置。";
47
+ readonly memoryHelp: "为 dsh-prime-memory 的记忆蒸馏指定路由;两个字段都留空时跟随该插件自己的默认模型。改完需重启一次 DSH 才生效(该插件在启动时读取路由)。";
48
+ readonly memoryRouteHelp: "按部署默认供应商的配置组解析;该供应商没有组时使用这里填写的平面默认。写入该行的静态路由(llm.provider/llm.model),启动时生效。";
49
49
  readonly providerGroups: "供应商配置组";
50
50
  readonly providerGroupsCard: "按供应商预设路由";
51
51
  readonly providerGroupsSummary: "使用该供应商的会话自动采用对应组";
52
- readonly providerGroupsHelp: "为压缩、自动审查、会话命名、记忆蒸馏与子代理按供应商分别保存路由。";
53
- readonly providerGroupsBodyHelp: "每个供应商保存一组压缩、自动审查、会话命名与子代理路由。会话自身的供应商与该组一致时,这五项能力(含记忆蒸馏)按组实时解析,未固定项回落到上方卡片里的全局设置。切换某个会话的模型不会写入任何全局设置,因此不同供应商的多个会话并行时互不影响,会话中切换供应商后下一次调用也会立即跟随新供应商的配置组。";
52
+ readonly providerGroupsHelp: "为压缩、自动审查、会话命名与子代理按供应商分别保存路由。";
53
+ readonly providerGroupsBodyHelp: "每个供应商保存一组压缩、自动审查、会话命名与子代理路由。会话自身的供应商与该组一致时,这四项能力按组实时解析,未固定项回落到上方卡片里的全局设置。切换某个会话的模型不会写入任何全局设置,因此不同供应商的多个会话并行时互不影响,会话中切换供应商后下一次调用也会立即跟随新供应商的配置组。";
54
54
  readonly providerGroupPick: "选择供应商以编辑其配置组。";
55
55
  readonly providerGroupDelete: "删除该组";
56
56
  readonly groupOverridesLabel: "组覆盖:{pins};无组时用上方默认值";
@@ -30,6 +30,21 @@ export interface PlanCommitOutcome {
30
30
  * @returns The message, prefixed with the nearest available code.
31
31
  */
32
32
  export declare function planErrorText(cause: unknown): string;
33
+ /**
34
+ * Commit the execution model a Plan card holds, then run its exit.
35
+ *
36
+ * Shared by every exit (approve, keep, discuss, run-as-goal): the card's picker
37
+ * is a draft, so an exit that skipped this call left the session on the model
38
+ * the review opened with. An unchanged selection short-circuits without a
39
+ * second commit, and a refused commit returns `false` **without** running the
40
+ * exit, so the caller can keep the card open and show the error.
41
+ *
42
+ * @param args.select - commits one selection onto the session.
43
+ * @param args.selection - the execution model the card currently holds.
44
+ * @param args.current - the session's committed selection, for the short-circuit.
45
+ * @param args.answer - the exit to run once the commit landed.
46
+ * @returns whether the exit ran.
47
+ */
33
48
  export declare function approvePlanReview(args: {
34
49
  select: (selection: ModelSelection) => Promise<PlanCommitOutcome>;
35
50
  selection: ModelSelection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-model-switch",
3
- "version": "0.4.45",
3
+ "version": "0.4.47",
4
4
  "description": "Explicit model routing plus composer/Plan picker for DeepSeek Harness",
5
5
  "repository": {
6
6
  "type": "git",