@dsh-plus/subagent-model 0.3.25 → 0.3.26

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/lib/client.js CHANGED
@@ -193,7 +193,7 @@ window.__ModuleLoader__.load({
193
193
  unsaved: "未保存",
194
194
  loading: "加载中…",
195
195
  unavailable: "配置服务不可用。",
196
- readOnly: "当前部署无 settings provider,配置为只读;请编辑 settings.yaml。",
196
+ readOnly: "当前部署无 settings provider,配置为只读;请在 profile 的 cordis.patch.yml 行级配置。",
197
197
  invalidNumber: "请输入正整数。",
198
198
  collapse: "收起",
199
199
  expand: "展开",
@@ -210,7 +210,7 @@ window.__ModuleLoader__.load({
210
210
  unsaved: "Unsaved",
211
211
  loading: "Loading…",
212
212
  unavailable: "Settings service unavailable.",
213
- readOnly: "No settings provider in this deployment; config is read-only. Edit settings.yaml.",
213
+ readOnly: "No settings provider in this deployment; config is read-only. Configure it at the profile row in cordis.patch.yml.",
214
214
  invalidNumber: "Enter a positive integer.",
215
215
  collapse: "Collapse",
216
216
  expand: "Expand",
@@ -416,8 +416,7 @@ ${extra}
416
416
  //#endregion
417
417
  //#region src/ns.ts
418
418
  /**
419
- * settings 命名空间字面量(纯常量,零依赖)。沿用旧版插件命名空间,
420
- * 已存在于生产 settings.yaml 的旧配置可直接续用。
419
+ * settings 命名空间字面量(纯常量,零依赖)。
421
420
  * @module @dsh-plus/subagent-model/ns
422
421
  */
423
422
  const SETTINGS_NS = "dsh-plus-subagent-model";
@@ -478,7 +477,7 @@ ${extra}
478
477
  * 「子代理模型配置」配置卡片:经 injectPluginConfigCard 注册(插件页 plugins.row.config /
479
478
  * plugins.bundle.config,view 分发 summary/page)。
480
479
  * 外壳与基础控件走 @dsh-plus/shared/client 套件(CardChrome/CheckRow/SelectField)。
481
- * 配置读写经共享层 ctx.remote.settings 直连(0.1.7 起 settingsScope 已由 configForms
480
+ * 配置读写经共享层 ctx.remote.settings 直连(settingsScope 已由 configForms
482
481
  * 取代):value 为 schema 解析后的命名空间值
483
482
  * (enabled + entries),行集合 = 目录返回的已注册子代理 provider
484
483
  * ∪ 已配置条目,保存时全量写回 entries(未配置的新 provider 行以默认空值
package/lib/index.d.ts CHANGED
@@ -24,7 +24,7 @@ interface SubagentModelConfigInput {
24
24
  reasoningEffort?: string | null;
25
25
  }> | null;
26
26
  }
27
- /** 活动字段形态(0.1.7 loader 解析产物:volatile 字段为活动引用)。 */
27
+ /** 活动字段形态(loader 解析产物:volatile 字段为活动引用)。 */
28
28
  type SubagentModelConfigFields = VolatileFields<SubagentModelConfig>;
29
29
  declare const Config: z<SubagentModelConfigInput, SubagentModelConfigFields>;
30
30
  /** 注入子代理 AgentOptions 的结果对象:只含需要覆盖的字段。 */
package/lib/index.js CHANGED
@@ -4,15 +4,14 @@ import z from "@deepseek-ai/schemastery";
4
4
  //#region src/config.ts
5
5
  /**
6
6
  * 配置单一事实源:cordis 行级 Config(组合默认值)与 settings namespace
7
- * (用户层,经 dsh-settings-file 持久化到 $DSH_HOME/settings.yaml)共用同一
7
+ * (用户层=profile 行级覆盖层 cordis.patch.yml,热生效)共用同一
8
8
  * schemastery schema。条目按【子代理 provider 名】键控(standard preset
9
9
  * 事实映射:subagent↔spawn、subagent_fork↔fork),特殊键 `default` 作为
10
10
  * 未命中具体 provider 时的兜底(spawn/fork 共享同一路由的便捷写法)。
11
11
  *
12
- * 运行时语义(详见 delegation.ts):provider/model/reasoningEffort 显式时
13
- * 注入子代理 `request.agentOptions`——当前平台(0.1.2-rc.1)的
14
- * resolveChildAgentOptions 原生读取 provider/model/reasoningEffort 三个字段
15
- * (含冷恢复 descriptor),不再需要旧版 effort 瀑布的私有字段搬运。
12
+ * 运行时语义(详见 delegation.ts):provider/model/reasoningEffort 显式时注入
13
+ * 子代理 `request.agentOptions`——平台的 resolveChildAgentOptions 原生读取这三个
14
+ * 字段(含冷恢复 descriptor),本插件无需搬运任何私有字段。
16
15
  *
17
16
  * 与官方 subagent-model-selection 的关系:官方机制是"主代理模型可选白名单",
18
17
  * 不强制任何模型(未显式选择时子代理继承主代理路由);本插件补的是
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-plus/subagent-model",
3
- "version": "0.3.25",
3
+ "version": "0.3.26",
4
4
  "description": "dsh-plus service+ui plugin: 为 subagent/subagent_fork 等子代理按提供商配置模型与思考程度(或继承主代理)",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -19,7 +19,7 @@
19
19
  "src"
20
20
  ],
21
21
  "dependencies": {
22
- "@dsh-plus/shared": "0.1.35"
22
+ "@dsh-plus/shared": "0.1.36"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@deepseek-ai/cordis": "^4.0.5-alpha.1",
package/src/client/api.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * 自定义端点通道:仅剩「模型目录」(配置读写已迁移到共享层
3
- * ctx.remote.settings(0.1.7 起 settingsScope 已删)传输,见 scope.ts 与 card.tsx)。
3
+ * ctx.remote.settings(settingsScope 已删)传输,见 scope.ts 与 card.tsx)。
4
4
  * @module subagent-model/client/api
5
5
  */
6
6
 
@@ -2,7 +2,7 @@
2
2
  * 「子代理模型配置」配置卡片:经 injectPluginConfigCard 注册(插件页 plugins.row.config /
3
3
  * plugins.bundle.config,view 分发 summary/page)。
4
4
  * 外壳与基础控件走 @dsh-plus/shared/client 套件(CardChrome/CheckRow/SelectField)。
5
- * 配置读写经共享层 ctx.remote.settings 直连(0.1.7 起 settingsScope 已由 configForms
5
+ * 配置读写经共享层 ctx.remote.settings 直连(settingsScope 已由 configForms
6
6
  * 取代):value 为 schema 解析后的命名空间值
7
7
  * (enabled + entries),行集合 = 目录返回的已注册子代理 provider
8
8
  * ∪ 已配置条目,保存时全量写回 entries(未配置的新 provider 行以默认空值
@@ -7,8 +7,8 @@
7
7
  *
8
8
  * 类型说明:浏览器半只用到 slots/locale/remote 的很窄一面,
9
9
  * scope 与基础控件走 @dsh-plus/shared/client 套件(收编自本插件原实现)。
10
- * 0.1.2-alpha.1 起配置读写统一走 ctx.remote.settings 直连
11
- * (connection.api.settings RPC 面已移除;0.1.7 起 settingsScope 服务亦删除——
10
+ * 配置读写统一走 ctx.remote.settings 直连
11
+ * (connection.api.settings RPC 面已移除; settingsScope 服务亦删除——
12
12
  * configForms 取代,插件卡片自始直连 remote.settings);自定义端点仅剩「模型目录」(api.ts)。
13
13
  * 卡片 key/rowId 约定见 @dsh-plus/shared/client/config-slots。
14
14
  * @module @dsh-plus/subagent-model/client
package/src/config.ts CHANGED
@@ -1,14 +1,13 @@
1
1
  /**
2
2
  * 配置单一事实源:cordis 行级 Config(组合默认值)与 settings namespace
3
- * (用户层,经 dsh-settings-file 持久化到 $DSH_HOME/settings.yaml)共用同一
3
+ * (用户层=profile 行级覆盖层 cordis.patch.yml,热生效)共用同一
4
4
  * schemastery schema。条目按【子代理 provider 名】键控(standard preset
5
5
  * 事实映射:subagent↔spawn、subagent_fork↔fork),特殊键 `default` 作为
6
6
  * 未命中具体 provider 时的兜底(spawn/fork 共享同一路由的便捷写法)。
7
7
  *
8
- * 运行时语义(详见 delegation.ts):provider/model/reasoningEffort 显式时
9
- * 注入子代理 `request.agentOptions`——当前平台(0.1.2-rc.1)的
10
- * resolveChildAgentOptions 原生读取 provider/model/reasoningEffort 三个字段
11
- * (含冷恢复 descriptor),不再需要旧版 effort 瀑布的私有字段搬运。
8
+ * 运行时语义(详见 delegation.ts):provider/model/reasoningEffort 显式时注入
9
+ * 子代理 `request.agentOptions`——平台的 resolveChildAgentOptions 原生读取这三个
10
+ * 字段(含冷恢复 descriptor),本插件无需搬运任何私有字段。
12
11
  *
13
12
  * 与官方 subagent-model-selection 的关系:官方机制是"主代理模型可选白名单",
14
13
  * 不强制任何模型(未显式选择时子代理继承主代理路由);本插件补的是
@@ -71,10 +70,10 @@ const EntrySchema = z.object({
71
70
  .default(EFFORT_INHERIT),
72
71
  })
73
72
 
74
- // 0.1.7:全字段 `.volatile()`——条目进入 settings describe 视图(卡片可读写),
73
+ // 全字段 `.volatile()`——条目进入 settings describe 视图(卡片可读写),
75
74
  // loader 原位提交活动引用;输出面标注活动字段声明面(结构兼容 volatile 引用),
76
75
  // 平面消费契约保持 SubagentModelConfig 接口不变。
77
- /** 活动字段形态(0.1.7 loader 解析产物:volatile 字段为活动引用)。 */
76
+ /** 活动字段形态(loader 解析产物:volatile 字段为活动引用)。 */
78
77
  export type SubagentModelConfigFields = VolatileFields<SubagentModelConfig>
79
78
 
80
79
  export const Config: z<SubagentModelConfigInput, SubagentModelConfigFields> = z.object({
package/src/delegation.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * 运行时挂钩:子代理模型路由的注入点。
3
3
  *
4
- * 机制依据(官方 dsh-subagent 0.1.2-rc.1):子代理的模型由【创建时】的
4
+ * 机制依据(官方 dsh-subagent):子代理的模型由【创建时】的
5
5
  * AgentOptions 决定——`resolveChildAgentOptions(parent, request.agentOptions,
6
6
  * childDepth)` = 父 options 快照 + 显式 agentOptions(后者胜出),且原生读取
7
7
  * provider/model/reasoningEffort 三个字段(materialize → agents.create/resume
8
8
  * → agentLoop.options),冷恢复(continuable resume)经 descriptor 持久化保持。
9
9
  * 因此只需在 `request.agentOptions` 注入 provider/model/reasoningEffort,
10
- * 路由即命中,无需旧版 effort 瀑布的私有字段搬运。
10
+ * 路由即命中,无需搬运任何私有字段。
11
11
  *
12
12
  * 两个挂钩均幂等(Symbol 标记 + dispose 恢复),HMR 重载安全。
13
13
  * @module @dsh-plus/subagent-model/delegation
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * 或选择从主代理继承;`default` 条目可让 spawn/fork 共享同一路由。
5
5
  * 主代理显式选择的路由(官方 subagent-model-selection 的 model 字段)优先,
6
6
  * 本插件只补"未选择时的强制默认"。
7
- * 配置经 settings 用户层($DSH_HOME/settings.yaml)持久化并热生效;
7
+ * 配置经 settings 用户层(profile 行级覆盖层 cordis.patch.yml)持久化并热生效;
8
8
  * 配置 UI 位于 webui 侧边栏「插件」页的 bundle 行配置页(plugins.row.config /
9
9
  * plugins.bundle.config 两槽位,见 @dsh-plus/shared/client/config-slots);
10
10
  * 模型目录经 host webServer 同源端点下发。
package/src/ns.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  /**
2
- * settings 命名空间字面量(纯常量,零依赖)。沿用旧版插件命名空间,
3
- * 已存在于生产 settings.yaml 的旧配置可直接续用。
2
+ * settings 命名空间字面量(纯常量,零依赖)。
4
3
  * @module @dsh-plus/subagent-model/ns
5
4
  */
6
5
  export const SETTINGS_NS = 'dsh-plus-subagent-model'
package/src/service.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * SubagentModelService:子代理模型配置中枢(host 半)。
3
- * - 配置:0.1.7 volatile 活动引用(loader 解析层并入用户层,GUI 写入原位提交
3
+ * - 配置:volatile 活动引用(loader 解析层并入用户层,GUI 写入原位提交
4
4
  * 热生效);写入经 internal/config waterfall 校验(validateEntries 规则
5
5
  * (model 不能脱离 provider 等),非法即拒、不落盘)。
6
6
  * - 委托挂钩:包装 ctx.subagents.start/startContinuable,按 provider 名
@@ -39,7 +39,7 @@ export class SubagentModelService extends Service {
39
39
 
40
40
  constructor(ctx: Context, config: SubagentModelConfig | SubagentModelConfigFields) {
41
41
  super(ctx, 'subagentModel')
42
- // 0.1.7 替代 installSection/setSource:活动引用原位提交——委托挂钩
42
+ // 替代 installSection/setSource:活动引用原位提交——委托挂钩
43
43
  // 永远现取最新配置,热生效无竞态。
44
44
  this.current = () => unwrapVolatile(config)
45
45
  // 写入校验(原 installSection validate;官方 llm-pi-ai 同款 waterfall):