dsh-thinking-levels 3.0.0 → 3.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/INSTALL.zh.md CHANGED
@@ -1,174 +1,174 @@
1
- # 安装指南(官方 DSH CLI)
2
-
3
- 本指南只使用官方 `dsh plugin` 命令。该命令会把依赖装进 profile 并同步 `dsh.profile.bundles`。不要用普通 `npm install`、在 profile 里直接 `pnpm add` 或手工编辑 profile 清单代替。
4
-
5
- - [安装指南](./INSTALL.zh.md)
6
- - [English installation guide](./INSTALL.md)
7
- - [日本語インストールガイド](./INSTALL.ja.md)
8
- - [한국어 설치 안내](./INSTALL.ko.md)
9
- - [中文 README](./README.zh.md)
10
- - [English README](./README.md)
11
- - [日本語 README](./README.ja.md)
12
- - [한국어 README](./README.ko.md)
13
- - [版本更新日志](./CHANGELOG.md)
14
- - [日本語 changelog](./CHANGELOG.ja.md)
15
- - [한국어 changelog](./CHANGELOG.ko.md)
16
-
17
- 本指南中的占位符:
18
-
19
- - `<profile>`:要修改的 DSH profile,通常是 `web`;
20
- - `dsh-thinking-levels`:npm 包名与运行时插件 ID;
21
- - `thinking-levels`:Cordis 组合条目与设置页 Slot ID。
22
-
23
- > **版本要求 —— 仅支持 DSH v0.1.2 及以上。**
24
- >
25
- > 安装前先确认版本(`dsh --version`)。
26
- >
27
- > | DSH 版本 | 操作 |
28
- > | --- | --- |
29
- > | ≥ 0.1.2 | 安装本版本。 |
30
- > | < 0.1.2 | 留在旧版插件(0.7.1-beta.2 及更早)。**不要在 v0.1.2+ 的 DSH 上运行旧版插件,请升级插件。** |
31
- >
32
- > 分界点是 `0.1.2-alpha.1`:该版本删除了 `@deepseek-ai/dsh-client-runtime`。本版本改用 `@deepseek-ai/cordis` 的 `Context`(替代已删除的 `ClientContext`),与官方客户端插件一致。
33
-
34
- ## 0. 前置检查与 profile 确认
35
-
36
- ```bash
37
- echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
38
- dsh --version
39
- ls "${DSH_HOME:-$HOME/.dsh}/profiles"
40
- ```
41
-
42
- 使用你正在运行的 DSH 进程对应的 profile。`web` 很常见,但以实际 `--profile` 参数为准。
43
-
44
- ## 1. 官方安装
45
-
46
- 安装最新版本:
47
-
48
- ```bash
49
- dsh plugin --profile <profile> add dsh-thinking-levels -w
50
- ```
51
-
52
- (当 profile 是 pnpm workspace root 时必须带 `-w`,`web` 就是。)
53
-
54
- 显式安装当前发布版:
55
-
56
- ```bash
57
- dsh plugin --profile <profile> add dsh-thinking-levels@0.6.0 -w
58
- ```
59
-
60
- 官方 CLI 会自动更新 profile 依赖、锁文件与 `dsh.profile.bundles`。不要手工追加 YAML。
61
-
62
- ### 供应链冷却期
63
-
64
- dsh 运行环境使用 pnpm 11,其 `minimumReleaseAge` 策略可能拦截刚发布的版本,报
65
- `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`。把版本加入 `~/.dsh/profiles/web/pnpm-workspace.yaml` 的
66
- `minimumReleaseAgeExclude`:
67
-
68
- ```yaml
69
- minimumReleaseAgeExclude:
70
- - dsh-thinking-levels@0.6.0
71
- ```
72
-
73
- ## 2. 升级
74
-
75
- 升级到 registry 最新版本:
76
-
77
- ```bash
78
- dsh plugin --profile <profile> update dsh-thinking-levels -w
79
- ```
80
-
81
- 宿主侧改动需重启 DSH;浏览器侧刷新 Web 页面。
82
-
83
- ## 3. 本地路径 / link: 注册(备选)
84
-
85
- 开发或离线安装时,可以从本地检出注册插件:
86
-
87
- ```bash
88
- # ~/.dsh/profiles/web/package.json dependencies 增加:
89
- # "dsh-thinking-levels": "link:<dsh-thinking-levels 的绝对路径>"
90
- # ~/.dsh/profiles/web/cordis.patch.yml:
91
- # - insert:
92
- # - id: thinking-levels
93
- # name: dsh-thinking-levels
94
- cd ~/.dsh/profiles/web && pnpm install && dsh web
95
- ```
96
-
97
- 或用官方 CLI 加本地路径(无需网络):
98
-
99
- ```bash
100
- dsh plugin --profile <profile> add /dsh-thinking-levels 的绝对路径/ -w
101
- ```
102
-
103
- ## 4. 验证安装
104
-
105
- 检查依赖与安装版本:
106
-
107
- ```bash
108
- grep -n "dsh-thinking-levels" \
109
- "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
110
- node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-thinking-levels/package.json').version"
111
- ```
112
-
113
- 本版本的版本号必须是 `0.6.0`。
114
-
115
- 检查官方组合配置:
116
-
117
- ```bash
118
- dsh --profile <profile> --dump-default-config
119
- ```
120
-
121
- 应包含:
122
-
123
- ```yaml
124
- - id: thinking-levels
125
- name: dsh-thinking-levels
126
- ```
127
-
128
- ## 5. 验证设置卡片
129
-
130
- 重启 DSH 后刷新 Web 页面。打开「设置 → 插件 → 可配置插件」,展开「思考档位」卡片。
131
-
132
- 1. 档位选择器提供 8 个标准档位加 `auto`;下方是调度开关。
133
- 2. 模型能力区按提供方分组;每个模型行显示文字/图片徽标与声明的上下文长度,展开后进入逐档编辑器。
134
- 3. 勾选档位并填写网关线上值(如 `high` → `ultra`),点击「应用档位」保存。`off` 留空表示不发送。
135
- 4. 搜索框可筛选模型;官方/通用预设一键应用到全部思考模型。
136
-
137
- ## 日语与韩语支持状态
138
-
139
- 插件自带 `ja` 与 `ko` 字典,但当前官方 DSH 只通过 `LocaleRuntime` 暴露 `zh` 和 `en`。在原版 DSH 上选择日语或韩语会报 `locale "<id>" is not registered`。
140
-
141
- 官方支持落地前要使用它们,请维护 DSH fork 并更新:
142
-
143
- - `packages/client/locale/src/locale-settings.ts`:把 `ja` 与 `ko` 加入 `LOCALE_IDS`(Host 偏好 schema 由该列表派生)。
144
- - `packages/client/locale/src/client/index.ts`:在 `LOCALES` 中加入 `{ id: 'ja', label: '日本語' }` 与 `{ id: 'ko', label: '한국어' }`。
145
- - 补齐对应的核心字典与测试,然后重新构建并运行 fork 版本。
146
-
147
- 仅修改插件无法扩展 DSH 的全局 locale 列表。请使用 fork 文档中的构建与官方 profile 命令;不要手工编辑 profile 清单。
148
-
149
- ## 6. 排查
150
-
151
- | 症状 | 处理 |
152
- | --- | --- |
153
- | 找不到 `dsh` 命令 | 安装或启用官方 DSH CLI。不要用普通 npm/pnpm 命令模拟 profile 安装。 |
154
- | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | 把版本加入 profile 的 `pnpm-workspace.yaml` 的 `minimumReleaseAgeExclude`。 |
155
- | 插件显示「已停用/未挂载」且无错误 | 检查 profile 组合;宿主不得值依赖 `@deepseek-ai/dsh-settings`(本插件没有)。 |
156
- | client 入口不在 `__DSH_BOOT__` | 确认 `exports["./client"]` 存在且 host fiber 已建立。 |
157
- | 模型选择器没有 `Auto` | 确认 adapter `resolveModel` 包装已生效(`llm/adapters-updated` 时重新包装)。 |
158
- | 设置卡片写入失败 | 值被 llm-pi-ai schema 拒绝(如 `reasoningEfforts` 表没有任何思考档位)。检查填写值。 |
159
- | 子 agent 报 `UNSUPPORTED_REASONING_EFFORT` | 目标模型未声明该档位;改用支持的档位或恢复提供方默认。 |
160
- | 浏览器显示旧 bundle | 升级后硬刷新(Ctrl+Shift+R)。 |
161
-
162
- ## 7. 卸载
163
-
164
- 使用官方命令:
165
-
166
- ```bash
167
- dsh plugin --profile <profile> remove dsh-thinking-levels -w
168
- ```
169
-
170
- 确认组合配置不再包含该 bundle:
171
-
172
- ```bash
173
- dsh --profile <profile> --dump-default-config
174
- ```
1
+ # 安装指南(官方 DSH CLI)
2
+
3
+ 本指南只使用官方 `dsh plugin` 命令。该命令会把依赖装进 profile 并同步 `dsh.profile.bundles`。不要用普通 `npm install`、在 profile 里直接 `pnpm add` 或手工编辑 profile 清单代替。
4
+
5
+ - [安装指南](./INSTALL.zh.md)
6
+ - [English installation guide](./INSTALL.md)
7
+ - [日本語インストールガイド](./INSTALL.ja.md)
8
+ - [한국어 설치 안내](./INSTALL.ko.md)
9
+ - [中文 README](./README.zh.md)
10
+ - [English README](./README.md)
11
+ - [日本語 README](./README.ja.md)
12
+ - [한국어 README](./README.ko.md)
13
+ - [版本更新日志](./CHANGELOG.md)
14
+ - [日本語 changelog](./CHANGELOG.ja.md)
15
+ - [한국어 changelog](./CHANGELOG.ko.md)
16
+
17
+ 本指南中的占位符:
18
+
19
+ - `<profile>`:要修改的 DSH profile,通常是 `web`;
20
+ - `dsh-thinking-levels`:npm 包名与运行时插件 ID;
21
+ - `thinking-levels`:Cordis 组合条目与设置页 Slot ID。
22
+
23
+ > **版本要求 —— 仅支持 DSH v0.1.7-rc.1 及以上。**
24
+ >
25
+ > 安装前先确认版本(`dsh --version`)。
26
+ >
27
+ > | DSH 版本 | 操作 |
28
+ > | --- | --- |
29
+ > | ≥ 0.1.7-rc.1 | 安装本版本。 |
30
+ > | < 0.1.7-rc.1 | 留在旧版插件(3.0.1)。**不要在 DSH 0.1.7+ 上运行旧版插件,请升级插件。** |
31
+ >
32
+ > 分界点是 `0.1.7-rc.1`:该版本删除了命令式设置注册(`settings.register` / `installSettingsSection`)与客户端 `settingsScope` 服务。本版本面向 0.1.7 声明式设置表面(`.volatile()` schema 字段 + `configForms`)。
33
+
34
+ ## 0. 前置检查与 profile 确认
35
+
36
+ ```bash
37
+ echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
38
+ dsh --version
39
+ ls "${DSH_HOME:-$HOME/.dsh}/profiles"
40
+ ```
41
+
42
+ 使用你正在运行的 DSH 进程对应的 profile。`web` 很常见,但以实际 `--profile` 参数为准。
43
+
44
+ ## 1. 官方安装
45
+
46
+ 安装最新版本:
47
+
48
+ ```bash
49
+ dsh plugin --profile <profile> add dsh-thinking-levels -w
50
+ ```
51
+
52
+ (当 profile 是 pnpm workspace root 时必须带 `-w`,`web` 就是。)
53
+
54
+ 显式安装当前发布版:
55
+
56
+ ```bash
57
+ dsh plugin --profile <profile> add dsh-thinking-levels@0.6.0 -w
58
+ ```
59
+
60
+ 官方 CLI 会自动更新 profile 依赖、锁文件与 `dsh.profile.bundles`。不要手工追加 YAML。
61
+
62
+ ### 供应链冷却期
63
+
64
+ dsh 运行环境使用 pnpm 11,其 `minimumReleaseAge` 策略可能拦截刚发布的版本,报
65
+ `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`。把版本加入 `~/.dsh/profiles/web/pnpm-workspace.yaml` 的
66
+ `minimumReleaseAgeExclude`:
67
+
68
+ ```yaml
69
+ minimumReleaseAgeExclude:
70
+ - dsh-thinking-levels@0.6.0
71
+ ```
72
+
73
+ ## 2. 升级
74
+
75
+ 升级到 registry 最新版本:
76
+
77
+ ```bash
78
+ dsh plugin --profile <profile> update dsh-thinking-levels -w
79
+ ```
80
+
81
+ 宿主侧改动需重启 DSH;浏览器侧刷新 Web 页面。
82
+
83
+ ## 3. 本地路径 / link: 注册(备选)
84
+
85
+ 开发或离线安装时,可以从本地检出注册插件:
86
+
87
+ ```bash
88
+ # ~/.dsh/profiles/web/package.json dependencies 增加:
89
+ # "dsh-thinking-levels": "link:<dsh-thinking-levels 的绝对路径>"
90
+ # ~/.dsh/profiles/web/cordis.patch.yml:
91
+ # - insert:
92
+ # - id: thinking-levels
93
+ # name: dsh-thinking-levels
94
+ cd ~/.dsh/profiles/web && pnpm install && dsh web
95
+ ```
96
+
97
+ 或用官方 CLI 加本地路径(无需网络):
98
+
99
+ ```bash
100
+ dsh plugin --profile <profile> add /dsh-thinking-levels 的绝对路径/ -w
101
+ ```
102
+
103
+ ## 4. 验证安装
104
+
105
+ 检查依赖与安装版本:
106
+
107
+ ```bash
108
+ grep -n "dsh-thinking-levels" \
109
+ "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
110
+ node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-thinking-levels/package.json').version"
111
+ ```
112
+
113
+ 本版本的版本号必须是 `0.6.0`。
114
+
115
+ 检查官方组合配置:
116
+
117
+ ```bash
118
+ dsh --profile <profile> --dump-default-config
119
+ ```
120
+
121
+ 应包含:
122
+
123
+ ```yaml
124
+ - id: thinking-levels
125
+ name: dsh-thinking-levels
126
+ ```
127
+
128
+ ## 5. 验证设置表单
129
+
130
+ 重启 DSH 后刷新 Web 页面。打开「设置 → 插件」,找到 **dsh-thinking-levels** 条目——自 DSH 0.1.7 起,表单由宿主按插件声明的 `.volatile()` schema 字段自动生成(不再有自定义客户端卡片)。
131
+
132
+ 1. 表单包含启用开关、档位选择器(8 个标准档位加 `auto`)与调度开关(`allowDowngrade` / `allowUpgrade`)。
133
+ 2. 提交的改动对下一次模型请求生效,无需重启(实时 volatile 配置)。
134
+ 3. 逐模型能力编辑器(网关线上值、llm-pi-ai)随被废除的卡片一并移除——请通过官方「模型」设置面编辑 llm-pi-ai 模型能力。
135
+ 4. 搜索框可筛选模型;官方/通用预设一键应用到全部思考模型。
136
+
137
+ ## 日语与韩语支持状态
138
+
139
+ 插件自带 `ja` 与 `ko` 字典,但当前官方 DSH 只通过 `LocaleRuntime` 暴露 `zh` 和 `en`。在原版 DSH 上选择日语或韩语会报 `locale "<id>" is not registered`。
140
+
141
+ 官方支持落地前要使用它们,请维护 DSH fork 并更新:
142
+
143
+ - `packages/client/locale/src/locale-settings.ts`:把 `ja` 与 `ko` 加入 `LOCALE_IDS`(Host 偏好 schema 由该列表派生)。
144
+ - `packages/client/locale/src/client/index.ts`:在 `LOCALES` 中加入 `{ id: 'ja', label: '日本語' }` 与 `{ id: 'ko', label: '한국어' }`。
145
+ - 补齐对应的核心字典与测试,然后重新构建并运行 fork 版本。
146
+
147
+ 仅修改插件无法扩展 DSH 的全局 locale 列表。请使用 fork 文档中的构建与官方 profile 命令;不要手工编辑 profile 清单。
148
+
149
+ ## 6. 排查
150
+
151
+ | 症状 | 处理 |
152
+ | --- | --- |
153
+ | 找不到 `dsh` 命令 | 安装或启用官方 DSH CLI。不要用普通 npm/pnpm 命令模拟 profile 安装。 |
154
+ | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | 把版本加入 profile 的 `pnpm-workspace.yaml` 的 `minimumReleaseAgeExclude`。 |
155
+ | 插件显示「已停用/未挂载」且无错误 | 检查 profile 组合;宿主不得值依赖 `@deepseek-ai/dsh-settings`(本插件没有)。 |
156
+ | client 入口不在 `__DSH_BOOT__` | 确认 `exports["./client"]` 存在且 host fiber 已建立。 |
157
+ | 模型选择器没有 `Auto` | 确认 adapter `resolveModel` 包装已生效(`llm/adapters-updated` 时重新包装)。 |
158
+ | 设置表单写入失败 | 值被插件 schema 拒绝;请对齐声明的 `.volatile()` 字段类型。 |
159
+ | 子 agent 报 `UNSUPPORTED_REASONING_EFFORT` | 目标模型未声明该档位;改用支持的档位或恢复提供方默认。 |
160
+ | 浏览器显示旧 bundle | 升级后硬刷新(Ctrl+Shift+R)。 |
161
+
162
+ ## 7. 卸载
163
+
164
+ 使用官方命令:
165
+
166
+ ```bash
167
+ dsh plugin --profile <profile> remove dsh-thinking-levels -w
168
+ ```
169
+
170
+ 确认组合配置不再包含该 bundle:
171
+
172
+ ```bash
173
+ dsh --profile <profile> --dump-default-config
174
+ ```