dsh-model-visibility 0.1.2 → 0.2.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Lzh3070
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lzh3070
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md CHANGED
@@ -17,10 +17,10 @@ Installs a dedicated **Model visibility** settings section (right after 模型 /
17
17
 
18
18
  ![Model visibility section](https://raw.githubusercontent.com/Lzh3070/dsh-model-visibility/main/docs/screenshot.png)
19
19
 
20
- ## Requirements
21
-
22
- - **DeepSeek Harness ≥ 0.1.5-rc.1** (0.1.5 rebuilt the client module system; use 0.1.1 on older releases)
23
- - Node.js 22+
20
+ ## Requirements
21
+
22
+ - **DeepSeek Harness ≥ 0.2.0-rc.1** (0.2.0 rebuilt settings on volatile configuration and `configForms`; use plugin 0.1.2 on 0.1.x hosts)
23
+ - Node.js 22+
24
24
 
25
25
  ## Install
26
26
 
@@ -32,8 +32,8 @@ Restart `dsh web` to activate.
32
32
 
33
33
  ## How it works
34
34
 
35
- - **Host half** (`lib/index.js`): owns the `model-visibility` settings section through `ctx.settings.register` (the hidden list) and wraps `ctx.llm.listModels` at its source, so both the conversation selector and the settings page receive the filtered catalog. Catalog membership is advisory in the harness, so hiding a model a session already uses never breaks that session's dispatch.
36
- - **Browser half** (`lib/client.js`): registers a `settings.section` page; the catalog arrives through 0.1.5's `ctx.remote.session.modelCatalog()`, and page state is the union of the filtered catalog and the hidden entries, each hidden entry labeled by the display-name snapshot captured when it was hidden.
35
+ - **Host half** (`lib/index.js`): declares the `hidden` field `.volatile()`, so a settings-form write commits the new value into the same stable reference through the Loader (no plugin restart), and wraps `ctx.llm.listModels` at its source — both the conversation selector and the settings page receive the filtered catalog. Catalog membership is advisory in the harness, so hiding a model a session already uses never breaks that session's dispatch.
36
+ - **Browser half** (`lib/client.js`): registers a `settings.section` page; durable state rides 0.2.0's shared `ctx.configForms` form, the catalog arrives through `ctx.remote.session.modelCatalog()` and refreshes on `llm/adapters-updated`, and page state is the union of the filtered catalog and the hidden entries, each hidden entry labeled by the display-name snapshot captured when it was hidden.
37
37
 
38
38
  ## Uninstall
39
39
 
package/README.md CHANGED
@@ -17,10 +17,10 @@
17
17
 
18
18
  ![模型可见性分区页](https://raw.githubusercontent.com/Lzh3070/dsh-model-visibility/main/docs/screenshot.png)
19
19
 
20
- ## 要求
21
-
22
- - **DeepSeek Harness ≥ 0.1.5-rc.1**(0.1.5 重构了客户端模块体系,旧版本请使用 0.1.1)
23
- - Node.js 22+(构建与运行)
20
+ ## 要求
21
+
22
+ - **DeepSeek Harness ≥ 0.2.0-rc.1**(0.2.0 以 volatile 配置与 `configForms` 重构了设置体系;0.1.x 宿主请使用本插件 0.1.2)
23
+ - Node.js 22+(构建与运行)
24
24
 
25
25
  ## 安装
26
26
 
@@ -32,8 +32,8 @@ dsh plugin --profile web add dsh-model-visibility
32
32
 
33
33
  ## 工作原理
34
34
 
35
- - **宿主半**(`lib/index.js`):通过 `ctx.settings.register` 持有 `model-visibility` 设置段(隐藏列表),并在源头包装 `ctx.llm.listModels`——会话选择器与设置页拿到的目录都是过滤后的。目录成员资格在 harness 中是"建议性"的,因此隐藏一个正在使用的模型不影响其调度。
36
- - **浏览器半**(`lib/client.js`):向设置壳注册一个 `settings.section` 分区页;目录经 0.1.5 的 `ctx.remote.session.modelCatalog()` 读取,页面状态来自"过滤后目录 ∪ 隐藏条目"的并集,隐藏条目携带隐藏时抓取的显示名快照。
35
+ - **宿主半**(`lib/index.js`):`hidden` 字段声明为 `.volatile()`,设置表单写入时由 Loader 把新值原地提交进同一稳定引用(插件不重启),并在源头包装 `ctx.llm.listModels`——会话选择器与设置页拿到的目录都是过滤后的。目录成员资格在 harness 中是"建议性"的,因此隐藏一个正在使用的模型不影响其调度。
36
+ - **浏览器半**(`lib/client.js`):向设置壳注册一个 `settings.section` 分区页;持久状态经 0.2.0 的 `ctx.configForms` 共享表单读写,目录经 `ctx.remote.session.modelCatalog()` 读取并跟随 `llm/adapters-updated` 失效刷新;页面状态来自"过滤后目录 ∪ 隐藏条目"的并集,隐藏条目携带隐藏时抓取的显示名快照。
37
37
 
38
38
  ## 卸载
39
39
 
package/cordis.patch.yml CHANGED
@@ -1,6 +1,6 @@
1
- # Layer applied when a profile lists this bundle: mount the host half.
2
- # The client half is served automatically by the client module system
3
- # (the package declares dsh.client and exports ./client).
4
- - insert:
5
- - id: model-visibility
6
- name: dsh-model-visibility
1
+ # Layer applied when a profile lists this bundle: mount the host half.
2
+ # The client half is served automatically by the client module system
3
+ # (the package declares dsh.client and exports ./client).
4
+ - insert:
5
+ - id: model-visibility
6
+ name: dsh-model-visibility