dsh-subagent-default-model 1.1.1 → 1.2.1

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,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.1 (2026-09-06)
4
+
5
+ ### Fixes
6
+
7
+ - **适配 DSH 0.1.2-alpha.2+ 的 dsh-settings 结构变更**:设置段注册迁移到官方 `settings` 服务缝(`ctx.inject(["settings"], …)` → `settings.installSection`)。`@deepseek-ai/dsh-settings` 自 0.1.2-alpha.2 起移除了独立的 `installSettingsSection` / `settingsNamespace` 导出——纯净 npm cohort 宿主(`@deepseek-ai/dsh` CLI、直跑 `dsh web`、CI)上旧导入会直接模块加载失败;此前仅靠 DSH Desktop 的过渡兼容补丁续命。按模块导出有无自动选择路径:仍有旧导出(0.1.0-rc.6 / 0.1.1-rc.2 / 桌面补丁版)走旧助手,否则走官方缝,声明的 peer 区间 `^0.1.0-rc.6 || ^0.1.1-rc.2 || >=0.1.2-alpha.1 <0.2.0` 全程可装。
8
+ - **对话视图跳过 `request/header` 的 `series` reason**:DSH 0.1.2 在后续轮开启新请求系列且配置未变时追加 `reason:"series"` 帧;插件不再为其生成行,避免多轮(continuable/steer)子代理每轮多出一行冗余的「当前供应商/模型」。`initial` / `change` / `resume` 三种提示行为不变。
9
+
10
+ ### Testing
11
+
12
+ - 新增 `plugin/test/settings-install.test.mjs`:安装路径决策单测(旧助手在场→逐字委托;缺席→官方缝、消费者 ctx 保持 section owner;模块缺失→缝兜底)。
13
+ - devDependencies 升级:`@deepseek-ai/dsh-settings` `0.1.0-rc.6` → `0.1.2-rc.1`(纯净版,无旧导出),`@deepseek-ai/cordis` `^4.0.1` → `^4.0.2`——现有 default-model / failover 集成测试现在端到端运行真实官方缝路径。
14
+
15
+ ## 1.2.0 (2026-09-01)
16
+
17
+ ### Features
18
+
19
+ - **适配 DSH 0.1.2 客户端模型目录接口**:设置卡模型目录从已移除的 `connection.api.llm.models()` 迁移到 `remote.session.modelCatalog()`,继续支持供应商、模型与推理强度下拉选择。
20
+ - **设置卡正常路径回归测试**:新增真实 Client bundle 沙箱测试,验证 `settings.plugin.item` 注册、`subagent-default-model` key、Client inject 声明以及 `modelCatalog()` 成功响应解析。
21
+
22
+ ### Fixes
23
+
24
+ - **恢复插件设置卡显示**:补齐 Client bundle 依赖声明,并将设置卡的运行时服务依赖调整为 `remote.session`,避免旧 API 导致 Plugins 标签页渲染失败。
25
+ - **设置注册不再等待 subagents 服务**:Host 设置 namespace 独立注册;`subagents` 服务出现后再安装默认模型包装器,避免服务挂载顺序导致设置卡消失。
26
+ - **刷新设置 namespace 目录**:Client 卡片注册后主动刷新 `settingsScope.describe()`,避免社区插件晚注册时被设置页初次读取遗漏。
27
+ - **适配 `uiConversation` 服务名**:轨迹和对话模型提示改用 DSH 0.1.2 的 `uiConversation.events` 注册入口。
28
+
29
+ ### Compatibility
30
+
31
+ - 扩展 `@deepseek-ai/*` peer 范围以覆盖 DSH `0.1.2-alpha.1`,Client peer 均保持 optional,不阻塞独立安装。
32
+
3
33
  ## 1.1.1 (2026-08-31)
4
34
 
5
35
  ### Changed
package/lib/client.js CHANGED
@@ -14,7 +14,7 @@ window.__ModuleLoader__.load({
14
14
 
15
15
  // ── plugin icon (LD brand logo, 64px) ────────────────────────────────
16
16
  var DSM_ICON = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAXGUlEQVR4nH1bC7BdVXn+1tr7nHPvzb3JvUloSAQp0JHWoAMttKOCFrWU8irQSbCTQYG21IahnTJUUTsM0FJhZCzCSIcKImOpDkhrhQ5YC7ROB3lUBU3EyCuBFBIIedzcx3ntvTr/a621TwIns3PO3mfvddf/+v7v/9c6DvYKoYBz1cZNYfJpVBcNBm7dcIhj3TBM15VzqAE6XAWEGggVADroOl0byDW+PtRr9E732rl9r2PxOMNsrCogVE7PA0Kge4Lcz5/TGI6v00UaK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0Nk2vcfeed0dxp3Nu7h6EYr2sgOL/Aa5OuMdnE5sWAAAAAElFTkSuQmCC";
17
- var SETTINGS_CSS = ".dsm-model-settings{display:flex;flex-direction:column;gap:14px;margin:0;padding:0}.dsm-model-settings-list{display:flex;flex-direction:column;gap:10px}.dsm-model-settings-route{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:end;padding:10px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:10px;background:var(--dsw-alias-bg-layer-3,#202126)}.dsm-model-settings-field{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-select{width:100%;max-width:220px;height:32px;padding:0 28px 0 10px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px;background:var(--dsw-alias-bg-layer-2,#232529);color:var(--dsw-alias-label-primary,#e6e6e6);font:inherit;font-size:13px;line-height:1.5}.dsm-model-settings-select:focus{outline:2px solid var(--dsw-alias-state-business-primary,#5686fe);outline-offset:1px}.dsm-model-settings-select:disabled{color:var(--dsw-alias-label-tertiary,#999);cursor:default}.dsm-model-settings-remove{height:32px;min-width:32px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer;font-size:16px;line-height:1}.dsm-model-settings-remove:hover{color:var(--dsw-alias-state-error-primary,#ef4444);background:var(--dsw-alias-interactive-bg-hover-danger,rgba(242,90,90,.15))}.dsm-model-settings-options{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.dsm-model-settings-strategy{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-strategy .dsm-model-settings-select{max-width:150px}.dsm-model-settings-failover{display:flex;align-items:center;gap:6px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer}.dsm-model-settings-failover input[type=checkbox]{cursor:pointer}.dsm-failover-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#999);white-space:nowrap}.dsm-model-settings-footer{border-top:1px solid var(--dsw-alias-border-l2,#36373b);display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 0 4px}.dsm-model-settings-footer-left{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.dsm-model-settings-footer-status{flex:1;min-width:0;color:var(--dsw-alias-label-secondary,#b8b8b8);font-size:12px;line-height:1.5}.dsm-model-settings-footer-error{flex:1;min-width:0;color:var(--dsw-alias-label-error,#ef4444);font-size:12px;line-height:1.5}.dsm-btn{appearance:none;font:inherit;cursor:pointer;border:1px solid transparent;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.dsm-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:1px}.dsm-btn:disabled{opacity:.4;cursor:default}.dsm-btn-outline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:transparent}.dsm-btn-outline:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.dsm-btn-primary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.dsm-btn-primary:hover:not(:disabled){opacity:.9}.dsm-model-settings-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-plugin-card{border:1px solid var(--dsw-alias-border-l2,#36373b);background:var(--dsw-alias-bg-layer-3,#202126);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.dsm-plugin-card:hover{border-color:var(--dsw-alias-label-dimmed,#777)}.dsm-plugin-card-open{background:var(--dsw-alias-bg-layer-2,#25262b);border-color:var(--dsw-alias-label-dimmed,#777)}.dsm-plugin-card-header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:transparent;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dsm-plugin-card-header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:-2px}.dsm-plugin-card-head{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dsm-plugin-card-title{color:var(--dsw-alias-label-primary,#e6e6e6);font-size:15px;font-weight:600;line-height:1.4}.dsm-plugin-card-description{color:var(--dsw-alias-label-tertiary,#999);font-size:13px;line-height:1.5}.dsm-plugin-card-chevron{color:var(--dsw-alias-label-tertiary,#999);flex:none;display:inline-flex;transition:transform .16s}.dsm-plugin-card-chevron-open{transform:rotate(180deg)}.dsm-plugin-card-body{border-top:1px solid var(--dsw-alias-border-l2,#36373b);margin:0 16px;padding:0 0 8px}.dsm-plugin-card-body .dsm-model-settings{margin:0;padding:12px 0 0;background:transparent;border:0;border-radius:0}.dsm-plugin-card-body .dsm-model-settings-head{display:none}.dsm-plugin-card-icon{width:32px;height:32px;flex:none;border-radius:7px}.dsm-model-settings-cheer{display:inline-flex;align-items:center;gap:4px;flex:none;text-decoration:underline;text-underline-offset:2px;color:var(--dsw-alias-label-tertiary,#999);font-size:13px;line-height:1.5;transition:color .16s}.dsm-model-settings-cheer-star{font-size:12px;line-height:1;display:inline-flex}.dsm-model-settings-cheer:hover{color:var(--dsw-alias-label-primary,#e6e6e6)}.dsm-model-settings-cheer:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:2px}";
17
+ var SETTINGS_CSS = ".dsm-model-settings{display:flex;flex-direction:column;gap:14px;margin:0;padding:0}.dsm-model-settings-list{display:flex;flex-direction:column;gap:10px}.dsm-model-settings-route{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:end;padding:10px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:10px;background:var(--dsw-alias-bg-layer-3,#202126)}.dsm-model-settings-field{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-select{width:100%;max-width:220px;height:32px;padding:0 28px 0 10px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px;background:var(--dsw-alias-bg-layer-2,#232529);color:var(--dsw-alias-label-primary,#e6e6e6);font:inherit;font-size:13px;line-height:1.5}.dsm-model-settings-select:focus{outline:2px solid var(--dsw-alias-state-business-primary,#5686fe);outline-offset:1px}.dsm-model-settings-select:disabled{color:var(--dsw-alias-label-tertiary,#999);cursor:default}.dsm-model-settings-remove{height:32px;min-width:32px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer;font-size:16px;line-height:1}.dsm-model-settings-remove:hover{color:var(--dsw-alias-state-error-primary,#ef4444);background:var(--dsw-alias-interactive-bg-hover-danger,rgba(242,90,90,.15))}.dsm-model-settings-options{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.dsm-model-settings-strategy{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-strategy .dsm-model-settings-select{max-width:150px}.dsm-model-settings-failover{display:flex;align-items:center;gap:6px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer}.dsm-model-settings-failover input[type=checkbox]{cursor:pointer}.dsm-failover-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#999);white-space:nowrap}.dsm-model-settings-footer{border-top:1px solid var(--dsw-alias-border-l2,#36373b);display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 0 4px}.dsm-model-settings-footer-left{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.dsm-model-settings-footer-status{flex:1;min-width:0;color:var(--dsw-alias-label-secondary,#b8b8b8);font-size:12px;line-height:1.5}.dsm-model-settings-footer-error{flex:1;min-width:0;color:var(--dsw-alias-label-error,#ef4444);font-size:12px;line-height:1.5}.dsm-btn{appearance:none;font:inherit;cursor:pointer;border:1px solid transparent;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.dsm-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:1px}.dsm-btn:disabled{opacity:.4;cursor:default}.dsm-btn-outline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:transparent;font-weight:500}.dsm-btn-outline:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:rgba(255,255,255,.04)}.dsm-btn-primary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.dsm-btn-primary:hover:not(:disabled){opacity:.9}.dsm-model-settings-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-plugin-card{border:1px solid var(--dsw-alias-border-l2,#36373b);background:var(--dsw-alias-bg-layer-3,#202126);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.dsm-plugin-card:hover{border-color:var(--dsw-alias-label-dimmed,#777)}.dsm-plugin-card-open{background:var(--dsw-alias-bg-layer-2,#25262b);border-color:var(--dsw-alias-label-dimmed,#777)}.dsm-plugin-card-header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:transparent;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dsm-plugin-card-header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:-2px}.dsm-plugin-card-head{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dsm-plugin-card-title{color:var(--dsw-alias-label-primary,#e6e6e6);font-size:15px;font-weight:600;line-height:1.4}.dsm-plugin-card-description{color:var(--dsw-alias-label-tertiary,#999);font-size:13px;line-height:1.5}.dsm-plugin-card-chevron{color:var(--dsw-alias-label-tertiary,#999);flex:none;display:inline-flex;transition:transform .16s}.dsm-plugin-card-chevron-open{transform:rotate(180deg)}.dsm-plugin-card-body{border-top:1px solid var(--dsw-alias-border-l2,#36373b);margin:0 16px;padding:0 0 8px}.dsm-plugin-card-body .dsm-model-settings{margin:0;padding:12px 0 0;background:transparent;border:0;border-radius:0}.dsm-plugin-card-body .dsm-model-settings-head{display:none}.dsm-plugin-card-icon{width:32px;height:32px;flex:none;border-radius:7px}.dsm-model-settings-cheer{display:inline-flex;align-items:center;gap:4px;flex:none;text-decoration:underline;text-underline-offset:2px;color:var(--dsw-alias-label-tertiary,#999);font-size:13px;line-height:1.5;transition:color .16s}.dsm-model-settings-cheer-star{font-size:12px;line-height:1;display:inline-flex}.dsm-model-settings-cheer:hover{color:var(--dsw-alias-label-primary,#e6e6e6)}.dsm-model-settings-cheer:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:2px}";
18
18
 
19
19
  if (typeof document !== "undefined") {
20
20
  var cssId = "dsh-subagent-default-model/client.css";
@@ -46,6 +46,7 @@ window.__ModuleLoader__.load({
46
46
  "row.discard": "放弃修改",
47
47
  "row.cheer": "鼓励一下",
48
48
  "row.save": "保存",
49
+ "row.saving": "保存中…",
49
50
  "row.saved": "已保存",
50
51
  "row.incomplete": "请为每个模型路由选择 Provider 和 Model。",
51
52
  "row.saveFailed": "保存失败,请重试。",
@@ -74,6 +75,7 @@ window.__ModuleLoader__.load({
74
75
  "row.discard": "Discard",
75
76
  "row.cheer": "Star on GitHub",
76
77
  "row.save": "Save",
78
+ "row.saving": "Saving…",
77
79
  "row.saved": "Saved",
78
80
  "row.incomplete": "Choose a provider and model for every route.",
79
81
  "row.saveFailed": "Could not save the setting. Try again.",
@@ -260,7 +262,7 @@ window.__ModuleLoader__.load({
260
262
  toastState[1](null);
261
263
  }
262
264
  var hasIncompleteRoute = routesState[0].some(function (route) { return !route.provider || !route.model; });
263
- var saveDisabled = !snap || snap.status !== "ready" || snap.writable === false || busyState[0] || hasIncompleteRoute;
265
+ var saveDisabled = !snap || snap.status !== "ready" || snap.writable === false || busyState[0] || hasIncompleteRoute || !dirtyState[0];
264
266
  var discardDisabled = !dirtyState[0] || busyState[0];
265
267
  var routes = routesState[0].map(function (route, index) {
266
268
  var group = null;
@@ -368,11 +370,10 @@ window.__ModuleLoader__.load({
368
370
  },
369
371
  t("row.cheer"),
370
372
  React.createElement("span", { className: "dsm-model-settings-cheer-star", "aria-hidden": "true" }, "\u2605")
371
- ),
372
- savedState[0] ? React.createElement("span", { className: "dsm-model-settings-footer-status" }, t("row.saved")) : (saveErrorState[0] ? React.createElement("span", { className: "dsm-model-settings-footer-error", role: "alert" }, t("row.saveFailed")) : null)
373
+ )
373
374
  ),
374
375
  React.createElement("button", { type: "button", className: "dsm-btn dsm-btn-outline", disabled: discardDisabled, onClick: discard }, t("row.discard")),
375
- React.createElement("button", { type: "button", className: "dsm-btn dsm-btn-primary", disabled: saveDisabled, onClick: save }, busyState[0] ? t("row.save") + "\u2026" : t("row.save"))
376
+ React.createElement("button", { type: "button", className: "dsm-btn dsm-btn-primary", disabled: saveDisabled, onClick: save }, busyState[0] ? t("row.saving") : t("row.save"))
376
377
  ),
377
378
  toastState[0] ? React.createElement(Toast, { key: toastState[0].seq, text: toastState[0].text, onDone: function () { toastState[1](null); } }) : null
378
379
  );
@@ -408,10 +409,20 @@ window.__ModuleLoader__.load({
408
409
  }
409
410
 
410
411
  // ── apply: inject settings row ───────────────────────────────────────
411
- var inject = ["sessions", "connection", "slots", "locale", "settingsScope", "remote", "conversationEvents"];
412
+ var inject = ["slots", "locale", "settingsScope", "remote", "remote.session", "uiConversation"];
412
413
 
413
414
  function apply(ctx) {
414
- var api = ctx.connection.api;
415
+ // The old `connection.api.llm.models()` seat no longer exists. Resolve
416
+ // the current model-catalog remote defensively so a missing/changed seat
417
+ // degrades to an empty selector instead of crashing the Plugins tab.
418
+ var sessionRemote = typeof ctx.get === "function" ? ctx.get("remote.session") : undefined;
419
+ var loadCatalog = function () {
420
+ if (!sessionRemote || typeof sessionRemote.modelCatalog !== "function") return Promise.resolve([]);
421
+ return sessionRemote.modelCatalog().then(function (response) {
422
+ if (!response || !response.ok) return [];
423
+ return (response.value && response.value.groups) || [];
424
+ }).catch(function () { return []; });
425
+ };
415
426
 
416
427
  // Register locale for this component
417
428
  ctx.locale.register(SUBAGENT_ROW_LOCALE, "zh", SUBAGENT_ROW_ZH);
@@ -422,7 +433,7 @@ window.__ModuleLoader__.load({
422
433
  // the provider or model changes — failover switches trigger it with zero
423
434
  // host changes. Register a trajectory definition that renders that frame
424
435
  // as a compact "Current provider/model" row inside the subagent's trajectory view.
425
- if (ctx.conversationEvents && typeof ctx.conversationEvents.register === "function") {
436
+ if (ctx.uiConversation && ctx.uiConversation.events && typeof ctx.uiConversation.events.register === "function") {
426
437
  var trajectoryT = ctx.locale.bind(SUBAGENT_ROW_LOCALE);
427
438
  var modelContextDefinition = {
428
439
  kind: "trajectory-subagent-model",
@@ -456,7 +467,7 @@ window.__ModuleLoader__.load({
456
467
  };
457
468
  }
458
469
  };
459
- ctx.conversationEvents.register(modelContextDefinition);
470
+ ctx.uiConversation.events.register(modelContextDefinition);
460
471
 
461
472
  // ── chat: surface the subagent model in the conversation view ──
462
473
  // agent-loop writes a `request/header` frame with a `reason` the first
@@ -472,7 +483,13 @@ window.__ModuleLoader__.load({
472
483
  kind: "chat-subagent-model",
473
484
  target: "chat",
474
485
  match: function (event) {
475
- return event.type === "request/header" ? { id: String(event.seq), role: "start" } : null;
486
+ if (event.type !== "request/header") return null;
487
+ // DSH 0.1.2 also appends a "series" header when a follow-up
488
+ // turn starts a new request series with an UNCHANGED config:
489
+ // no route change to surface, and claiming it would add one
490
+ // redundant "Current provider/model" row per turn.
491
+ if ((event.data || {}).reason === "series") return null;
492
+ return { id: String(event.seq), role: "start" };
476
493
  },
477
494
  start: function (_context, match) {
478
495
  var event = match.event;
@@ -509,19 +526,14 @@ window.__ModuleLoader__.load({
509
526
  };
510
527
  }
511
528
  };
512
- ctx.conversationEvents.register(chatModelDefinition);
529
+ ctx.uiConversation.events.register(chatModelDefinition);
513
530
  }
514
531
 
515
532
  var subagentScope = ctx.settingsScope.bind({ namespace: SUBAGENT_MODEL_SETTINGS_NS });
516
533
  var subagentRowInjected = function () {
517
534
  return {
518
535
  settingsScope: subagentScope,
519
- loadCatalog: function () {
520
- return api.llm.models({}).then(function (r) {
521
- if (!r.result.ok) throw new Error("llm.models failed: " + r.result.error.code);
522
- return r.result.value.groups || [];
523
- });
524
- },
536
+ loadCatalog: loadCatalog,
525
537
  write: function (value) {
526
538
  return persistDefaultModels(subagentScope, value);
527
539
  }
@@ -536,6 +548,12 @@ window.__ModuleLoader__.load({
536
548
  inject: subagentRowInjected
537
549
  }, SubagentModelCard);
538
550
  });
551
+
552
+ // The Plugins tab renders the intersection of registered cards and the
553
+ // Host settings namespace directory. Community Host plugins can finish
554
+ // registration after the core mirror's first read; force one fresh read
555
+ // after claiming our card so `subagent-default-model` becomes active.
556
+ ctx.settingsScope.describe().load();
539
557
  }
540
558
 
541
559
  return { apply: apply, inject: inject };
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
- import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
2
+ import * as dshSettings from "@deepseek-ai/dsh-settings";
3
3
 
4
4
  /**
5
5
  * dsh-subagent-default-model — default model(s) for subagent delegations.
@@ -38,10 +38,45 @@ import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-sett
38
38
  */
39
39
 
40
40
  export const name = "dsh-subagent-default-model";
41
- export const inject = ["subagents"];
41
+ // Do not hard-inject `subagents` at the plugin root: DSH 0.1.2 may mount that
42
+ // service after this row. The settings section must become available
43
+ // independently; `apply()` attaches the service wrapper through `ctx.inject()`.
42
44
 
43
45
  /** Settings namespace: default model route for subagent runs without an explicit `agentOptions`. */
44
- const SUBAGENT_DEFAULT_MODEL_SETTINGS_NAMESPACE = settingsNamespace("subagent-default-model");
46
+ const SUBAGENT_DEFAULT_MODEL_SETTINGS_NAMESPACE = "subagent-default-model";
47
+
48
+ /**
49
+ * Pick the settings-section installer for the installed DSH generation.
50
+ *
51
+ * DSH 0.1.2-alpha.2 removed the standalone `installSettingsSection` /
52
+ * `settingsNamespace` exports from `@deepseek-ai/dsh-settings` in favor of
53
+ * the `ctx.settings` service seam (`settings.installSection`), and that seam
54
+ * does not exist on older hosts (`settings.register` there, reachable only
55
+ * through the legacy helper). Decide by export presence: a module that still
56
+ * ships the helper (pre-alpha.2 hosts, and DSH Desktop's transitional
57
+ * compatibility patch, where the helper merely delegates to the seam) uses
58
+ * it; otherwise wire the official seam directly. Both paths register the
59
+ * section only once the settings service mounts — the legacy helper itself
60
+ * wraps `ctx.inject(["settings"], …)` — so neither ever blocks the plugin
61
+ * root on service waves.
62
+ *
63
+ * Exported for unit tests only; not part of the plugin contract.
64
+ *
65
+ * @param module - the resolved `@deepseek-ai/dsh-settings` module namespace.
66
+ * @returns an `(ctx, ns, schema, entry, hooks)` installer for that generation.
67
+ */
68
+ export function settingsSectionInstaller(module) {
69
+ if (typeof module?.installSettingsSection === "function") {
70
+ return (ctx, ns, schema, entry, hooks) => module.installSettingsSection(ctx, ns, schema, entry, hooks);
71
+ }
72
+ return (ctx, ns, schema, entry, hooks) => {
73
+ ctx.inject(["settings"], (settingsCtx) => {
74
+ settingsCtx.settings.installSection(ctx, ns, schema, entry, hooks);
75
+ });
76
+ };
77
+ }
78
+
79
+ const INSTALL_SETTINGS_SECTION = settingsSectionInstaller(dshSettings);
45
80
  /** One model entry: a bare model id (uses the section `provider`) or an explicit `{provider, model}` pair. */
46
81
  const MODEL_ENTRY = z.union([
47
82
  z.string(),
@@ -246,29 +281,7 @@ function installFailover(ctx, state) {
246
281
  }, "dsh-subagent-default-model: failover listeners");
247
282
  }
248
283
 
249
- export function apply(ctx) {
250
- const state = {
251
- settingsSource: void 0,
252
- rrCursor: 0
253
- };
254
-
255
- // The settings seam owns its own injected lifecycle and provides a live
256
- // source thunk. Register it unconditionally so the web settings row
257
- // (`subagent-default-model` namespace) is available even when the host
258
- // `subagents` service is not yet mounted or a previous fiber already wrapped
259
- // it — the service-method guard below must never gate settings registration.
260
- installSettingsSection(ctx, SUBAGENT_DEFAULT_MODEL_SETTINGS_NAMESPACE, SUBAGENT_DEFAULT_MODEL_SETTINGS_SCHEMA, {}, {
261
- setSource: (current) => {
262
- state.settingsSource = current;
263
- },
264
- onChange: () => {}
265
- });
266
-
267
- // Subagent-only failover hooks the agent loop, not the subagents service,
268
- // so it is installed unconditionally: listeners no-op when the `failover`
269
- // section is absent/disabled or when the failing agent is the main loop.
270
- installFailover(ctx, state);
271
-
284
+ function installSubagentWrapper(ctx, state) {
272
285
  // `ctx.subagents` is a per-call Cordis traceable proxy, so reach the raw
273
286
  // service object behind it for a stable handle and to install own methods.
274
287
  const raw = ctx.subagents?.[Symbol.for("cordis.original")] ?? ctx.subagents;
@@ -300,6 +313,38 @@ export function apply(ctx) {
300
313
  if (wrappedStart !== void 0 && raw.start === wrappedStart) raw.start = originalStart;
301
314
  if (wrappedStartContinuable !== void 0 && raw.startContinuable === wrappedStartContinuable) raw.startContinuable = originalStartContinuable;
302
315
  if (raw[WRAPPED] === state) delete raw[WRAPPED];
316
+ });
317
+ }
318
+
319
+ export function apply(ctx) {
320
+ const state = {
321
+ settingsSource: void 0,
322
+ rrCursor: 0
323
+ };
324
+
325
+ // Register settings independently from the `subagents` service lifecycle.
326
+ // DSH 0.1.2 can mount that service later or in a different service wave; a
327
+ // root-level hard inject would otherwise keep this whole plugin waiting and
328
+ // hide its settings card even though the Client half is already registered.
329
+ INSTALL_SETTINGS_SECTION(ctx, SUBAGENT_DEFAULT_MODEL_SETTINGS_NAMESPACE, SUBAGENT_DEFAULT_MODEL_SETTINGS_SCHEMA, {}, {
330
+ setSource: (current) => {
331
+ state.settingsSource = current;
332
+ },
333
+ onChange: () => {}
334
+ });
335
+
336
+ // Subagent-only failover hooks the agent loop, not the subagents service,
337
+ // so it is installed unconditionally: listeners no-op when the `failover`
338
+ // section is absent/disabled or when the failing agent is the main loop.
339
+ installFailover(ctx, state);
340
+
341
+ // Attach the method wrapper only while the service exists. Cordis re-runs
342
+ // this child fiber if the provider is replaced, while settings stay served.
343
+ ctx.inject(["subagents"], (subagentCtx) => {
344
+ installSubagentWrapper(subagentCtx, state);
345
+ });
346
+
347
+ ctx.effect(() => () => {
303
348
  state.settingsSource = void 0;
304
349
  state.rrCursor = 0;
305
350
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-subagent-default-model",
3
- "version": "1.1.1",
3
+ "version": "1.2.1",
4
4
  "description": "Configure default model routes for DeepSeek Harness subagents, with single-model, round-robin, random, and per-route reasoning-effort options.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -55,7 +55,12 @@
55
55
  "client": {
56
56
  "platform": "web",
57
57
  "inject": [
58
- "@deepseek-ai/dsh-client-ui-primitives"
58
+ "@deepseek-ai/dsh-client-connection",
59
+ "@deepseek-ai/dsh-client-locale",
60
+ "@deepseek-ai/dsh-client-ui-slots",
61
+ "@deepseek-ai/dsh-client-ui-primitives",
62
+ "@deepseek-ai/dsh-client-ui-conversation",
63
+ "@deepseek-ai/dsh-client-ui-settings"
59
64
  ]
60
65
  }
61
66
  },
@@ -63,17 +68,37 @@
63
68
  "@deepseek-ai/schemastery": "^3.18.1"
64
69
  },
65
70
  "peerDependencies": {
66
- "@deepseek-ai/dsh-settings": "0.1.0-rc.6",
67
- "@deepseek-ai/dsh-subagent": "0.1.0-rc.6",
68
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6"
71
+ "@deepseek-ai/dsh-settings": "^0.1.0-rc.6 || ^0.1.1-rc.2 || >=0.1.2-alpha.1 <0.2.0",
72
+ "@deepseek-ai/dsh-subagent": "^0.1.0-rc.6 || ^0.1.1-rc.2 || >=0.1.2-alpha.1 <0.2.0",
73
+ "@deepseek-ai/dsh-client-connection": "^0.1.0-rc.6 || ^0.1.1-rc.2 || >=0.1.2-alpha.1 <0.2.0",
74
+ "@deepseek-ai/dsh-client-locale": "^0.1.0-rc.6 || ^0.1.1-rc.2 || >=0.1.2-alpha.1 <0.2.0",
75
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6 || ^0.1.1-rc.2 || >=0.1.2-alpha.1 <0.2.0",
76
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6 || ^0.1.1-rc.2 || >=0.1.2-alpha.1 <0.2.0",
77
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.6 || ^0.1.1-rc.2 || >=0.1.2-alpha.1 <0.2.0",
78
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.6 || ^0.1.1-rc.2 || >=0.1.2-alpha.1 <0.2.0"
69
79
  },
70
80
  "peerDependenciesMeta": {
81
+ "@deepseek-ai/dsh-client-connection": {
82
+ "optional": true
83
+ },
84
+ "@deepseek-ai/dsh-client-locale": {
85
+ "optional": true
86
+ },
87
+ "@deepseek-ai/dsh-client-ui-slots": {
88
+ "optional": true
89
+ },
71
90
  "@deepseek-ai/dsh-client-ui-primitives": {
72
91
  "optional": true
92
+ },
93
+ "@deepseek-ai/dsh-client-ui-conversation": {
94
+ "optional": true
95
+ },
96
+ "@deepseek-ai/dsh-client-ui-settings": {
97
+ "optional": true
73
98
  }
74
99
  },
75
100
  "devDependencies": {
76
- "@deepseek-ai/cordis": "^4.0.1",
77
- "@deepseek-ai/dsh-settings": "0.1.0-rc.6"
101
+ "@deepseek-ai/cordis": "^4.0.2",
102
+ "@deepseek-ai/dsh-settings": "0.1.2-rc.1"
78
103
  }
79
104
  }