@klarkxy/dsh-model-hub 0.0.0-stage → 0.1.0-rc.2
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/LICENSE +41 -0
- package/README.md +84 -2
- package/cordis.patch.yml +5 -0
- package/docs/README.zh-CN.md +68 -0
- package/lib/client.inner.cjs +2448 -0
- package/lib/client.inner.cjs.map +1 -0
- package/lib/client.js +2457 -0
- package/lib/index.d.ts +49 -0
- package/lib/index.js +831 -0
- package/lib/index.js.map +1 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +109 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
The Star And Thank Author License (SATA)
|
|
2
|
+
Version 2.1, September 2026
|
|
3
|
+
|
|
4
|
+
Copyright © 2026 Klarkxy(278370456@qq.com)
|
|
5
|
+
|
|
6
|
+
Project Url: https://github.com/klarkxy/dsh-plugins
|
|
7
|
+
https://github.com/klarkxy/sata-license
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
And wait, one more thing — an invitation, not a condition: it would be best if
|
|
20
|
+
you star/+1/like the project(s) in the project url section above, and thank the
|
|
21
|
+
author(s) in the Copyright section. You may, and arguably you should — but the
|
|
22
|
+
permissions above hold either way, star or no star.
|
|
23
|
+
|
|
24
|
+
Here are some suggested ways:
|
|
25
|
+
|
|
26
|
+
- Email the authors a thank-you letter, and make friends with him/her/them.
|
|
27
|
+
- Report bugs or issues.
|
|
28
|
+
- Tell friends what a wonderful project this is.
|
|
29
|
+
- And, sure, you can just express thanks in your mind without telling the world.
|
|
30
|
+
|
|
31
|
+
Contributors of this project by forking have the option to add his/her name and
|
|
32
|
+
forked project url at copyright and project url sections, but shall not delete
|
|
33
|
+
or modify anything else in these two sections.
|
|
34
|
+
|
|
35
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
36
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
37
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
38
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
39
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
40
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
41
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,85 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @klarkxy/dsh-model-hub
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- release-state-note -->
|
|
4
|
+
The [repository registry](../../README.md#plugin-lifecycle) tracks Draft → Testing → Published, moving forward only. Fixes, testing and version updates keep published packages Published; each update still passes release checks. First publication explicitly selects Testing packages and records Published only after npm archive verification. See the [release guide](../../RELEASING.md).
|
|
5
|
+
|
|
6
|
+
Cross-plugin model settings hub for DeepSeek Harness — **development preview**.
|
|
7
|
+
Open Plugins → Model Hub to search by plugin, purpose or current model and edit
|
|
8
|
+
models from one compact list. Changes save immediately through the owning plugin.
|
|
9
|
+
Open plugin pages automatically reload saved model changes. Unsaved drafts stay
|
|
10
|
+
in place with a conflict notice; reload explicitly discards them. Reconnecting
|
|
11
|
+
reloads the current settings, and subscription failures expose manual refresh.
|
|
12
|
+
|
|
13
|
+
The hub includes Current Title, Git Commit, Safe Auto and ChatGPT when their
|
|
14
|
+
matching updated plugins are loaded. ChatGPT uses its separate Codex model
|
|
15
|
+
catalog and default.
|
|
16
|
+
|
|
17
|
+
The Subagent Cast tab manages the host's subagent model allowlist: the enable
|
|
18
|
+
switch and adding, replacing or removing models all write straight into the
|
|
19
|
+
native `subagent-model-selection-settings` settings with revision conflict
|
|
20
|
+
protection, so the host constraint keeps applying. Each model can also
|
|
21
|
+
carry a free-text "task tendency"; tendencies live in
|
|
22
|
+
`<profile>/data/model-hub/cast.json` and are injected into the system prompt as
|
|
23
|
+
read-only advisory hints — the main agent consults them and still makes the final
|
|
24
|
+
model choice when delegating. With this tab in place, the field matrix no longer
|
|
25
|
+
shows a duplicate editor for these native settings.
|
|
26
|
+
|
|
27
|
+
Add a model before enabling the cast; removing its last model also disables it.
|
|
28
|
+
The allowlist constrains explicit subagent model choices; omitting a model still
|
|
29
|
+
inherits the parent session. Tendencies have their own persisted revision and
|
|
30
|
+
conflict checks across open pages. Existing v1 files migrate on the first
|
|
31
|
+
successful save. A damaged or unreadable tendency file stays untouched and
|
|
32
|
+
shows a recovery error; native cast controls remain available.
|
|
33
|
+
|
|
34
|
+
Third-party volatile model-route fields are also discovered through native
|
|
35
|
+
`settings.describe()`. Plugins storing settings elsewhere can contribute fields
|
|
36
|
+
using `@klarkxy/dsh-plugin-kit/model-settings`; the hub does not inspect private
|
|
37
|
+
storage. Discovery handles deep schemas, arrays, dictionaries and intersections.
|
|
38
|
+
|
|
39
|
+
Refresh reloads both settings and model catalogs. Failed sources remain visible,
|
|
40
|
+
and a rejected save requires refresh and a fresh selection. Revision checks and
|
|
41
|
+
owner instance IDs protect against edits from stale pages. Other settings remain
|
|
42
|
+
with their owner, including sibling values inside native model objects.
|
|
43
|
+
A completed save is acknowledged separately from refreshing the page. If that
|
|
44
|
+
refresh fails, the page says the change was saved and offers refresh without
|
|
45
|
+
repeating the write.
|
|
46
|
+
|
|
47
|
+
The diagnostic report separately answers:
|
|
48
|
+
|
|
49
|
+
1. Which installed plugins expose model-route fields in their
|
|
50
|
+
`settings.describe()` projection (detected via `@klarkxy/dsh-model-route`,
|
|
51
|
+
marker or bare shape)?
|
|
52
|
+
2. Do custom schema markers survive the host projection? The hub's own Config
|
|
53
|
+
carries two self-test fields — one marked with the custom `x-model-route`
|
|
54
|
+
key, one with schemastery's renderer-role channel.
|
|
55
|
+
|
|
56
|
+
The report is logged and written to `<profile>/data/model-hub/probe-report.json`,
|
|
57
|
+
and refreshed on every `settings/document-updated` event.
|
|
58
|
+
|
|
59
|
+
Existing native array items appear as separate rows. Empty collections show an
|
|
60
|
+
informational row; add an item in the owning plugin first. Restoring a native
|
|
61
|
+
field returns to the plugin's inherited/default settings; clearing a direct
|
|
62
|
+
array route preserves the element. Owner fields explain their own default mode.
|
|
63
|
+
|
|
64
|
+
Both self-test fields remain in the diagnostic report and are hidden from the
|
|
65
|
+
model selection page. Per-day usage metering is not included in this preview.
|
|
66
|
+
|
|
67
|
+
## Install
|
|
68
|
+
|
|
69
|
+
Requires DSH 0.2.0-rc.2 or later. Install the preview channel, restart the profile, then open Plugins → Model Hub:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
dsh plugin --profile web add @klarkxy/dsh-model-hub@next
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
SEE LICENSE IN LICENSE
|
|
78
|
+
|
|
79
|
+
## Verification
|
|
80
|
+
|
|
81
|
+
`pnpm test:e2e:model-hub` checks the registered settings page in an isolated
|
|
82
|
+
Chromium browser, including keyboard selection, conflict recovery, catalog
|
|
83
|
+
separation and desktop/mobile layout. It uses the repository's UI primitive
|
|
84
|
+
stub and a real Cordis contribution bus; it does not activate an installed
|
|
85
|
+
Desktop profile. Adapter tests use the owning services and native SettingsForms.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @klarkxy/dsh-model-hub
|
|
2
|
+
|
|
3
|
+
<!-- release-state-note -->
|
|
4
|
+
插件生命周期见[仓库状态清单](../../../README.zh-CN.md#插件生命周期):草稿 → 测试中 → 已发布,只向前推进。已发布插件的修复、测试和升版保持已发布;每次更新仍须通过发布检查。首次发布须明确选择测试中的包,并在 npm 归档验证成功后登记。详见[发布规则](../../../RELEASING.zh-CN.md)。
|
|
5
|
+
|
|
6
|
+
DeepSeek Harness 跨插件模型设置枢纽——**开发预览**。打开「插件 → 模型枢纽」,
|
|
7
|
+
按插件、用途或当前模型搜索,在紧凑列表中直接选择模型,改动立即由所属插件保存。
|
|
8
|
+
已经打开的插件页会自动刷新已保存的模型设置。有未保存草稿时保留草稿并提示冲突,
|
|
9
|
+
显式重新加载才丢弃草稿。断线重连后重读最新设置;订阅不可用时保留手动刷新入口。
|
|
10
|
+
|
|
11
|
+
对应更新后的插件加载时,枢纽覆盖会话标题、Git 提交、安全审核以及 ChatGPT。
|
|
12
|
+
ChatGPT 使用独立的 Codex 模型目录和默认模型。
|
|
13
|
+
|
|
14
|
+
「子代理阵容」页签管理宿主的子代理模型白名单:启用开关、添加、替换或移除模型
|
|
15
|
+
都直接写入原生 `subagent-model-selection-settings` 设置(带版本冲突保护),
|
|
16
|
+
宿主约束照常生效。每个模型还可以标注一句「任务倾向」,倾向保存在
|
|
17
|
+
`<profile>/data/model-hub/cast.json`,并作为只读提示注入系统提示——主智能体
|
|
18
|
+
委派子代理时参考这些倾向自行选模型,倾向不做硬约束。该页签接管后,字段总览
|
|
19
|
+
不再重复显示这组原生设置。
|
|
20
|
+
|
|
21
|
+
先添加模型才能启用阵容,移除最后一个模型时会同时关闭开关。白名单约束显式选择的
|
|
22
|
+
子代理模型;不指定模型时仍继承父会话。任务倾向有独立的持久修订号,多个页面同时
|
|
23
|
+
修改时检查冲突。旧 v1 文件在首次成功保存时迁移;损坏或不可读时保留原文件并显示
|
|
24
|
+
恢复提示,原生阵容控制仍可使用。
|
|
25
|
+
|
|
26
|
+
第三方插件的 volatile 模型字段仍通过原生 `settings.describe()` 发现,支持深层
|
|
27
|
+
schema、数组、字典和组合字段。使用其他存储方式的插件可以通过
|
|
28
|
+
`@klarkxy/dsh-plugin-kit/model-settings` 提供模型字段;枢纽不读取其私有存储。
|
|
29
|
+
|
|
30
|
+
刷新会同时更新设置和模型列表。读取失败的来源保留错误说明;保存发生冲突后,
|
|
31
|
+
刷新并重新选择。设置版本和插件实例标识防止旧页面覆盖新设置;提示词、回退开关
|
|
32
|
+
等其他字段保持原值,包括原生模型对象内部的附加字段。
|
|
33
|
+
保存确认与页面刷新分别处理;写入成功而刷新失败时,页面明确提示已保存,可单独
|
|
34
|
+
刷新,不会自动重复写入。
|
|
35
|
+
|
|
36
|
+
诊断报告另行记录:
|
|
37
|
+
|
|
38
|
+
1. 已安装插件的 `settings.describe()` 投影里有哪些模型路由字段
|
|
39
|
+
(通过 `@klarkxy/dsh-model-route` 检测,标记或裸形状均可)?
|
|
40
|
+
2. 自定义 schema 标记能否穿过宿主投影?本插件自己的 Config 带两个自检字段:
|
|
41
|
+
一个用自定义 `x-model-route` 键标记,一个用 schemastery 渲染器 role 通道。
|
|
42
|
+
|
|
43
|
+
报告会写日志,并落盘到 `<profile>/data/model-hub/probe-report.json`,
|
|
44
|
+
每次 `settings/document-updated` 事件后刷新。
|
|
45
|
+
|
|
46
|
+
实际原生数组元素显示为独立行。空集合显示提示行,需要先在所属插件中添加元素。
|
|
47
|
+
恢复原生字段时使用所属插件的继承值或默认值;清除直接数组路由时保留该元素。
|
|
48
|
+
各插件提供的模型字段会说明各自的默认模式。
|
|
49
|
+
|
|
50
|
+
两个自检字段保留在诊断报告中,不出现在模型选择页。此预览尚不包含按天用量统计。
|
|
51
|
+
|
|
52
|
+
## 安装
|
|
53
|
+
|
|
54
|
+
需要 DSH 0.2.0-rc.2 或更高版本。安装预发布通道,重启 profile 后打开「插件 → 模型枢纽」:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
dsh plugin --profile web add @klarkxy/dsh-model-hub@next
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 许可证
|
|
61
|
+
|
|
62
|
+
SEE LICENSE IN LICENSE
|
|
63
|
+
|
|
64
|
+
## 验证
|
|
65
|
+
|
|
66
|
+
`pnpm test:e2e:model-hub` 在隔离 Chromium 中通过真实注册入口检查键盘选择、冲突
|
|
67
|
+
恢复、目录隔离和桌面/手机布局。使用仓库 UI 组件替身和真实 Cordis 贡献事件,
|
|
68
|
+
不代表已激活安装中的 Desktop profile。各适配器另有所属服务及原生 SettingsForms 测试。
|