@klarkxy/dsh-model-hub 0.1.0-rc.1 → 0.1.0

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/README.md CHANGED
@@ -1,8 +1,49 @@
1
1
  # @klarkxy/dsh-model-hub
2
2
 
3
- Cross-plugin model settings hub for DeepSeek Harness — **development preview**.
4
- The plugin page lists and edits live model-route fields through the native
5
- settings service. This build also reports:
3
+ <!-- release-state-note -->
4
+
5
+ Cross-plugin model settings hub for DeepSeek Harness.
6
+ Open Plugins → Model Hub to search by plugin, purpose or current model and edit
7
+ models from one compact list. Changes save immediately through the owning plugin.
8
+ Open plugin pages automatically reload saved model changes. Unsaved drafts stay
9
+ in place with a conflict notice; reload explicitly discards them. Reconnecting
10
+ reloads the current settings, and subscription failures expose manual refresh.
11
+
12
+ The hub includes Current Title, Git Commit, Safe Auto and ChatGPT when their
13
+ matching updated plugins are loaded. ChatGPT uses its separate Codex model
14
+ catalog and default.
15
+
16
+ The Subagent Cast tab manages the host's subagent model allowlist: the enable
17
+ switch and adding, replacing or removing models all write straight into the
18
+ native `subagent-model-selection-settings` settings with revision conflict
19
+ protection, so the host constraint keeps applying. Each model can also
20
+ carry a free-text "task tendency"; tendencies live in
21
+ `<profile>/data/model-hub/cast.json` and are injected into the system prompt as
22
+ read-only advisory hints — the main agent consults them and still makes the final
23
+ model choice when delegating. With this tab in place, the field matrix no longer
24
+ shows a duplicate editor for these native settings.
25
+
26
+ Add a model before enabling the cast; removing its last model also disables it.
27
+ The allowlist constrains explicit subagent model choices; omitting a model still
28
+ inherits the parent session. Tendencies have their own persisted revision and
29
+ conflict checks across open pages. Existing v1 files migrate on the first
30
+ successful save. A damaged or unreadable tendency file stays untouched and
31
+ shows a recovery error; native cast controls remain available.
32
+
33
+ Third-party volatile model-route fields are also discovered through native
34
+ `settings.describe()`. Plugins storing settings elsewhere can contribute fields
35
+ using `@klarkxy/dsh-plugin-kit/model-settings`; the hub does not inspect private
36
+ storage. Discovery handles deep schemas, arrays, dictionaries and intersections.
37
+
38
+ Refresh reloads both settings and model catalogs. Failed sources remain visible,
39
+ and a rejected save requires refresh and a fresh selection. Revision checks and
40
+ owner instance IDs protect against edits from stale pages. Other settings remain
41
+ with their owner, including sibling values inside native model objects.
42
+ A completed save is acknowledged separately from refreshing the page. If that
43
+ refresh fails, the page says the change was saved and offers refresh without
44
+ repeating the write.
45
+
46
+ The diagnostic report separately answers:
6
47
 
7
48
  1. Which installed plugins expose model-route fields in their
8
49
  `settings.describe()` projection (detected via `@klarkxy/dsh-model-route`,
@@ -14,24 +55,23 @@ settings service. This build also reports:
14
55
  The report is logged and written to `<profile>/data/model-hub/probe-report.json`,
15
56
  and refreshed on every `settings/document-updated` event.
16
57
 
17
- Existing array items appear as separate rows with numeric indices. Empty
18
- collections show an informational row; add an item in the owning plugin
19
- before editing it here. Writes revalidate the target against a fresh native
20
- projection and use the descriptor revision for CAS. Follow mode preserves
21
- array elements, and unrelated settings stay with their owning plugin.
58
+ Existing native array items appear as separate rows. Empty collections show an
59
+ informational row; add an item in the owning plugin first. Restoring a native
60
+ field returns to the plugin's inherited/default settings; clearing a direct
61
+ array route preserves the element. Owner fields explain their own default mode.
22
62
 
23
- Both self-test fields are individually volatile, so the native settings
24
- projection includes them without exposing ordinary configuration. Per-day
25
- usage metering is not included in this preview.
63
+ Both self-test fields remain in the diagnostic report and are hidden from the
64
+ model selection page. Per-day usage metering is not included.
26
65
 
27
66
  ## Install
28
67
 
29
- Requires DSH 0.2.0-rc.2 or later. Install the preview channel, restart the profile, then open Plugins → Model Hub:
68
+ Requires DSH 0.2.0-rc.2 or later. Restart the profile, then open Plugins → Model Hub:
30
69
 
31
70
  ```sh
32
- dsh plugin --profile web add @klarkxy/dsh-model-hub@next
71
+ dsh plugin --profile web add @klarkxy/dsh-model-hub
33
72
  ```
34
73
 
35
74
  ## License
36
75
 
37
76
  SEE LICENSE IN LICENSE
77
+
package/cordis.patch.yml CHANGED
@@ -1,4 +1,4 @@
1
- # Verification probe stage: detection + projection questions first, UI later.
1
+ # Model settings hub; self-test fields remain diagnostic only.
2
2
  - insert:
3
3
  - id: model-hub
4
4
  name: '@klarkxy/dsh-model-hub'
@@ -1,7 +1,38 @@
1
- # @klarkxy/dsh-model-hub
1
+ # @klarkxy/dsh-model-hub
2
2
 
3
- DeepSeek Harness 跨插件模型设置枢纽——**开发预览**。插件页通过宿主设置服务
4
- 列出并编辑可实时更新的模型路由字段,同时报告:
3
+ <!-- release-state-note -->
4
+
5
+ DeepSeek Harness 跨插件模型设置枢纽。打开「插件 → 模型枢纽」,
6
+ 按插件、用途或当前模型搜索,在紧凑列表中直接选择模型,改动立即由所属插件保存。
7
+ 已经打开的插件页会自动刷新已保存的模型设置。有未保存草稿时保留草稿并提示冲突,
8
+ 显式重新加载才丢弃草稿。断线重连后重读最新设置;订阅不可用时保留手动刷新入口。
9
+
10
+ 对应更新后的插件加载时,枢纽覆盖会话标题、Git 提交、安全审核以及 ChatGPT。
11
+ ChatGPT 使用独立的 Codex 模型目录和默认模型。
12
+
13
+ 「子代理阵容」页签管理宿主的子代理模型白名单:启用开关、添加、替换或移除模型
14
+ 都直接写入原生 `subagent-model-selection-settings` 设置(带版本冲突保护),
15
+ 宿主约束照常生效。每个模型还可以标注一句「任务倾向」,倾向保存在
16
+ `<profile>/data/model-hub/cast.json`,并作为只读提示注入系统提示——主智能体
17
+ 委派子代理时参考这些倾向自行选模型,倾向不做硬约束。该页签接管后,字段总览
18
+ 不再重复显示这组原生设置。
19
+
20
+ 先添加模型才能启用阵容,移除最后一个模型时会同时关闭开关。白名单约束显式选择的
21
+ 子代理模型;不指定模型时仍继承父会话。任务倾向有独立的持久修订号,多个页面同时
22
+ 修改时检查冲突。旧 v1 文件在首次成功保存时迁移;损坏或不可读时保留原文件并显示
23
+ 恢复提示,原生阵容控制仍可使用。
24
+
25
+ 第三方插件的 volatile 模型字段仍通过原生 `settings.describe()` 发现,支持深层
26
+ schema、数组、字典和组合字段。使用其他存储方式的插件可以通过
27
+ `@klarkxy/dsh-plugin-kit/model-settings` 提供模型字段;枢纽不读取其私有存储。
28
+
29
+ 刷新会同时更新设置和模型列表。读取失败的来源保留错误说明;保存发生冲突后,
30
+ 刷新并重新选择。设置版本和插件实例标识防止旧页面覆盖新设置;提示词、回退开关
31
+ 等其他字段保持原值,包括原生模型对象内部的附加字段。
32
+ 保存确认与页面刷新分别处理;写入成功而刷新失败时,页面明确提示已保存,可单独
33
+ 刷新,不会自动重复写入。
34
+
35
+ 诊断报告另行记录:
5
36
 
6
37
  1. 已安装插件的 `settings.describe()` 投影里有哪些模型路由字段
7
38
  (通过 `@klarkxy/dsh-model-route` 检测,标记或裸形状均可)?
@@ -11,21 +42,21 @@ DeepSeek Harness 跨插件模型设置枢纽——**开发预览**。插件页
11
42
  报告会写日志,并落盘到 `<profile>/data/model-hub/probe-report.json`,
12
43
  每次 `settings/document-updated` 事件后刷新。
13
44
 
14
- 实际数组元素按数字索引显示为独立行。空集合显示提示行,需要先在所属插件中
15
- 添加元素再编辑。写入前重新检测宿主投影中的目标字段,并用描述符版本进行 CAS
16
- 校验。跟随默认模型保留数组元素,其他设置仍由所属插件维护。
45
+ 实际原生数组元素显示为独立行。空集合显示提示行,需要先在所属插件中添加元素。
46
+ 恢复原生字段时使用所属插件的继承值或默认值;清除直接数组路由时保留该元素。
47
+ 各插件提供的模型字段会说明各自的默认模式。
17
48
 
18
- 两个自检字段各自声明 volatile,让宿主投影包含它们而不扩大普通配置的可见范围。
19
- 此预览尚不包含按天用量统计。
49
+ 两个自检字段保留在诊断报告中,不出现在模型选择页。尚不包含按天用量统计。
20
50
 
21
51
  ## 安装
22
52
 
23
- 需要 DSH 0.2.0-rc.2 或更高版本。安装预发布通道,重启 profile 后打开「插件 → 模型枢纽」:
53
+ 需要 DSH 0.2.0-rc.2 或更高版本。重启 profile 后打开「插件 → 模型枢纽」:
24
54
 
25
55
  ```sh
26
- dsh plugin --profile web add @klarkxy/dsh-model-hub@next
56
+ dsh plugin --profile web add @klarkxy/dsh-model-hub
27
57
  ```
28
58
 
29
59
  ## 许可证
30
60
 
31
61
  SEE LICENSE IN LICENSE
62
+