@klarkxy/dsh-model-hub 0.1.0 → 0.1.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/README.md CHANGED
@@ -1,77 +1,32 @@
1
- # @klarkxy/dsh-model-hub
1
+ # Model Hub
2
2
 
3
3
  <!-- release-state-note -->
4
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.
5
+ [简体中文](docs/README.zh-CN.md)
11
6
 
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.
7
+ See and change the models used by your DeepSeek Harness plugins from one page, and manage which models subagents may use.
15
8
 
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:
9
+ ## Install
47
10
 
48
- 1. Which installed plugins expose model-route fields in their
49
- `settings.describe()` projection (detected via `@klarkxy/dsh-model-route`,
50
- marker or bare shape)?
51
- 2. Do custom schema markers survive the host projection? The hub's own Config
52
- carries two self-test fields — one marked with the custom `x-model-route`
53
- key, one with schemastery's renderer-role channel.
11
+ ```sh
12
+ dsh plugin --profile web add @klarkxy/dsh-model-hub
13
+ ```
54
14
 
55
- The report is logged and written to `<profile>/data/model-hub/probe-report.json`,
56
- and refreshed on every `settings/document-updated` event.
15
+ Replace `web` with your profile name and restart the profile.
57
16
 
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.
17
+ ## Use
62
18
 
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.
19
+ Open **Plugins → Model Hub**.
65
20
 
66
- ## Install
21
+ - **Fields**: every model setting exposed by installed plugins, such as Auto Title, Git Commit, Safe Auto, and ChatGPT. Search by plugin, purpose, or current model, then pick a new model. Changes are saved by the plugin that owns the setting.
22
+ - **Subagent Cast**: turn the subagent model allowlist on or off and add, replace, or remove models. You can give each model a short task tendency; the main agent reads it as a hint when choosing a subagent model, not as a rule.
67
23
 
68
- Requires DSH 0.2.0-rc.2 or later. Restart the profile, then open Plugins → Model Hub:
24
+ ## Limits
69
25
 
70
- ```sh
71
- dsh plugin --profile web add @klarkxy/dsh-model-hub
72
- ```
26
+ - Only plugins that expose model settings appear.
27
+ - If a setting changed elsewhere, refresh and choose again.
28
+ - No usage statistics.
73
29
 
74
30
  ## License
75
31
 
76
- SEE LICENSE IN LICENSE
77
-
32
+ [SATA License 2.1](LICENSE)
@@ -1,62 +1,32 @@
1
- # @klarkxy/dsh-model-hub
1
+ # 模型枢纽
2
2
 
3
3
  <!-- release-state-note -->
4
4
 
5
- DeepSeek Harness 跨插件模型设置枢纽。打开「插件 → 模型枢纽」,
6
- 按插件、用途或当前模型搜索,在紧凑列表中直接选择模型,改动立即由所属插件保存。
7
- 已经打开的插件页会自动刷新已保存的模型设置。有未保存草稿时保留草稿并提示冲突,
8
- 显式重新加载才丢弃草稿。断线重连后重读最新设置;订阅不可用时保留手动刷新入口。
5
+ [English](../README.md)
9
6
 
10
- 对应更新后的插件加载时,枢纽覆盖会话标题、Git 提交、安全审核以及 ChatGPT。
11
- ChatGPT 使用独立的 Codex 模型目录和默认模型。
7
+ 在一个页面查看并修改各个 DeepSeek Harness 插件使用的模型,也可以管理子代理可用的模型。
12
8
 
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
- 诊断报告另行记录:
9
+ ## 安装
36
10
 
37
- 1. 已安装插件的 `settings.describe()` 投影里有哪些模型路由字段
38
- (通过 `@klarkxy/dsh-model-route` 检测,标记或裸形状均可)?
39
- 2. 自定义 schema 标记能否穿过宿主投影?本插件自己的 Config 带两个自检字段:
40
- 一个用自定义 `x-model-route` 键标记,一个用 schemastery 渲染器 role 通道。
11
+ ```sh
12
+ dsh plugin --profile web add @klarkxy/dsh-model-hub
13
+ ```
41
14
 
42
- 报告会写日志,并落盘到 `<profile>/data/model-hub/probe-report.json`,
43
- 每次 `settings/document-updated` 事件后刷新。
15
+ 把 `web` 换成你的 profile 名,安装后重启 profile。
44
16
 
45
- 实际原生数组元素显示为独立行。空集合显示提示行,需要先在所属插件中添加元素。
46
- 恢复原生字段时使用所属插件的继承值或默认值;清除直接数组路由时保留该元素。
47
- 各插件提供的模型字段会说明各自的默认模式。
17
+ ## 使用
48
18
 
49
- 两个自检字段保留在诊断报告中,不出现在模型选择页。尚不包含按天用量统计。
19
+ 打开「插件 → 模型枢纽」。
50
20
 
51
- ## 安装
21
+ - **字段总览**:列出已安装插件提供的模型设置,例如自动标题、Git 提交、安全自动和 ChatGPT。可以按插件、用途或当前模型搜索,再选择新模型;改动由对应插件保存。
22
+ - **子代理阵容**:开关子代理模型白名单,添加、替换或移除模型。每个模型可以写一句「任务倾向」,主智能体选择子代理模型时会参考它,但不强制。
52
23
 
53
- 需要 DSH 0.2.0-rc.2 或更高版本。重启 profile 后打开「插件 → 模型枢纽」:
24
+ ## 限制
54
25
 
55
- ```sh
56
- dsh plugin --profile web add @klarkxy/dsh-model-hub
57
- ```
26
+ - 只显示提供了模型设置的插件。
27
+ - 设置在别处被改动时,刷新后重新选择。
28
+ - 不提供用量统计。
58
29
 
59
30
  ## 许可证
60
31
 
61
- SEE LICENSE IN LICENSE
62
-
32
+ [SATA License 2.1](../LICENSE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@klarkxy/dsh-model-hub",
3
- "version": "0.1.0",
4
- "description": "View and edit model fields exposed by DSH plugin settings on one page.",
3
+ "version": "0.1.1",
4
+ "description": "Change the models used by DSH plugins and subagents from one page.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
7
7
  "engines": {
@@ -49,8 +49,8 @@
49
49
  "test": "vitest run --root ../.. --config vitest.editor-plugins.config.ts --maxWorkers=2 plugins/dsh-model-hub/src"
50
50
  },
51
51
  "dependencies": {
52
- "@klarkxy/dsh-model-route": "0.2.1",
53
- "@klarkxy/dsh-plugin-kit": "0.3.1"
52
+ "@klarkxy/dsh-model-route": "0.2.2",
53
+ "@klarkxy/dsh-plugin-kit": "0.3.2"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@deepseek-ai/cordis": ">=4.0.4",
@@ -106,6 +106,6 @@
106
106
  },
107
107
  "homepage": "https://klarkxy.github.io/dsh-plugins/plugins/model-hub/",
108
108
  "dshRelease": {
109
- "contentHash": "de2069c3c5b3a381572577abe536fb28d14b0973d8187e495f01aa5e7077c5a7"
109
+ "contentHash": "7d5599b268149f0ac2f929af5611893374a4977f8fa9aa308f18133ab53a194a"
110
110
  }
111
111
  }