dsh-thinking-levels 3.0.1 → 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.md CHANGED
@@ -1,174 +1,173 @@
1
- # Installation Guide (Official DSH CLI)
2
-
3
- This guide uses only the official DSH `dsh plugin` command. The command installs the dependency into a profile and synchronizes `dsh.profile.bundles`. Do not replace it with plain `npm install`, direct `pnpm add` in the profile, or manual edits to the profile manifest.
4
-
5
- - [English installation guide](./INSTALL.md)
6
- - [中文安装指南](./INSTALL.zh.md)
7
- - [日本語インストールガイド](./INSTALL.ja.md)
8
- - [한국어 설치 안내](./INSTALL.ko.md)
9
- - [English README](./README.md)
10
- - [中文 README](./README.zh.md)
11
- - [日本語 README](./README.ja.md)
12
- - [한국어 README](./README.ko.md)
13
- - [Changelog](./CHANGELOG.md)
14
- - [日本語 changelog](./CHANGELOG.ja.md)
15
- - [한국어 changelog](./CHANGELOG.ko.md)
16
-
17
- The placeholders in this guide are:
18
-
19
- - `<profile>`: the DSH profile to modify, usually `web`;
20
- - `dsh-thinking-levels`: the npm package and runtime plugin ID;
21
- - `thinking-levels`: the Cordis composition and settings Slot ID.
22
-
23
- > **Version requirement — DSH v0.1.2 or newer.**
24
- >
25
- > Check the running version first (`dsh --version`).
26
- >
27
- > | DSH version | Action |
28
- > | --- | --- |
29
- > | ≥ 0.1.2 | Install this release. |
30
- > | < 0.1.2 | Stay on the previous plugin line (0.7.1-beta.2 or earlier). Do not run an older plugin build against DSH v0.1.2+ — upgrade the plugin instead. |
31
- >
32
- > The boundary is `0.1.2-alpha.1`, where DSH removed `@deepseek-ai/dsh-client-runtime`. This release imports `Context` from `@deepseek-ai/cordis` instead of the deleted `ClientContext`, matching the official client plugins.
33
-
34
- ## 0. Prerequisites and profile discovery
35
-
36
- ```bash
37
- echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
38
- dsh --version
39
- ls "${DSH_HOME:-$HOME/.dsh}/profiles"
40
- ```
41
-
42
- Use the profile named by your running DSH process. `web` is common, but the active `--profile` argument is authoritative.
43
-
44
- ## 1. Official installation
45
-
46
- Install the latest version:
47
-
48
- ```bash
49
- dsh plugin --profile <profile> add dsh-thinking-levels -w
50
- ```
51
-
52
- (The `-w` flag is required when the profile is a pnpm workspace root, as `web` is.)
53
-
54
- Install the current release explicitly:
55
-
56
- ```bash
57
- dsh plugin --profile <profile> add dsh-thinking-levels@0.6.0 -w
58
- ```
59
-
60
- The official CLI updates the profile dependency, lockfile, and `dsh.profile.bundles` automatically. Do not add a manual YAML row.
61
-
62
- ### Supply-chain cooling period
63
-
64
- The dsh runtime uses pnpm 11, whose `minimumReleaseAge` policy may block a freshly published
65
- version with `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`. Add the version to
66
- `minimumReleaseAgeExclude` in `~/.dsh/profiles/web/pnpm-workspace.yaml`:
67
-
68
- ```yaml
69
- minimumReleaseAgeExclude:
70
- - dsh-thinking-levels@0.6.0
71
- ```
72
-
73
- ## 2. Upgrade
74
-
75
- Upgrade to the latest registry version:
76
-
77
- ```bash
78
- dsh plugin --profile <profile> update dsh-thinking-levels -w
79
- ```
80
-
81
- Restart DSH for host changes and refresh the Web page for client changes.
82
-
83
- ## 3. Local-path / link: registration (alternative)
84
-
85
- For development or offline installs, register the plugin from a local checkout:
86
-
87
- ```bash
88
- # ~/.dsh/profiles/web/package.json dependencies:
89
- # "dsh-thinking-levels": "link:<absolute path to 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
- Or use the official CLI with a local path (no network needed):
98
-
99
- ```bash
100
- dsh plugin --profile <profile> add /absolute/path/to/dsh-thinking-levels -w
101
- ```
102
-
103
- ## 4. Verify installation
104
-
105
- Check the dependency and installed version:
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
- The version must be `0.6.0` for this release.
114
-
115
- Check the official composition:
116
-
117
- ```bash
118
- dsh --profile <profile> --dump-default-config
119
- ```
120
-
121
- It must contain:
122
-
123
- ```yaml
124
- - id: thinking-levels
125
- name: dsh-thinking-levels
126
- ```
127
-
128
- ## 5. Verify the settings card
129
-
130
- Restart DSH, then refresh the Web page. Open **Settings → Plugins → configurable plugins** and expand the **Thinking Levels** card.
131
-
132
- 1. The level picker offers the eight standard levels plus `auto`; the scheduler toggles sit below.
133
- 2. The model-capabilities block groups providers; each model row shows text/image badges and a declared context window, and expands into the per-level editor.
134
- 3. Tick a level and enter its gateway wire value (e.g. `high` → `ultra`), then press **Apply levels**. `off` left empty means "do not send".
135
- 4. The search box filters models; the official / generic presets apply to every thinking model.
136
-
137
- ## Japanese and Korean support status
138
-
139
- The plugin ships `ja` and `ko` dictionaries, but the current official DSH release exposes only `zh` and `en` through `LocaleRuntime`. On stock DSH, selecting Japanese or Korean fails with `locale "<id>" is not registered`.
140
-
141
- To use them before official support lands, maintain a DSH fork and update:
142
-
143
- - `packages/client/locale/src/locale-settings.ts`: add `ja` and `ko` to `LOCALE_IDS` (the Host preference schema derives from this list).
144
- - `packages/client/locale/src/client/index.ts`: add `{ id: 'ja', label: '日本語' }` and `{ id: 'ko', label: '한국어' }` to `LOCALES`.
145
- - Add the corresponding core dictionaries and tests, then rebuild and run the forked DSH.
146
-
147
- A plugin-only change cannot extend DSH's global locale list. Use the fork's documented build and official profile commands; do not manually edit a profile manifest.
148
-
149
- ## 6. Troubleshooting
150
-
151
- | Symptom | Action |
152
- | --- | --- |
153
- | `dsh` is not found | Install or enable the official DSH CLI. Do not simulate profile installation with plain npm or pnpm commands. |
154
- | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Add the version to `minimumReleaseAgeExclude` in the profile's `pnpm-workspace.yaml`. |
155
- | Plugin shows as "disabled/unmounted" with no error | Check the profile composition; the host must not value-depend on `@deepseek-ai/dsh-settings` (it does not). |
156
- | Client entry missing from `__DSH_BOOT__` | Confirm `exports["./client"]` exists and the host fiber was established. |
157
- | Model selector has no `Auto` | Confirm the adapter `resolveModel` wrapper ran (it re-runs on `llm/adapters-updated`). |
158
- | Settings card write fails | The value was rejected by the llm-pi-ai schema (e.g. a `reasoningEfforts` table with no thinking level). Check the entered values. |
159
- | Subagent returns `UNSUPPORTED_REASONING_EFFORT` | The target model does not advertise the level; pick a supported one or restore the provider default. |
160
- | Stale client bundle | Hard-refresh the browser (Ctrl+Shift+R) after an upgrade. |
161
-
162
- ## 7. Remove
163
-
164
- Use the official command:
165
-
166
- ```bash
167
- dsh plugin --profile <profile> remove dsh-thinking-levels -w
168
- ```
169
-
170
- Verify that the composed profile no longer contains the bundle:
171
-
172
- ```bash
173
- dsh --profile <profile> --dump-default-config
174
- ```
1
+ # Installation Guide (Official DSH CLI)
2
+
3
+ This guide uses only the official DSH `dsh plugin` command. The command installs the dependency into a profile and synchronizes `dsh.profile.bundles`. Do not replace it with plain `npm install`, direct `pnpm add` in the profile, or manual edits to the profile manifest.
4
+
5
+ - [English installation guide](./INSTALL.md)
6
+ - [中文安装指南](./INSTALL.zh.md)
7
+ - [日本語インストールガイド](./INSTALL.ja.md)
8
+ - [한국어 설치 안내](./INSTALL.ko.md)
9
+ - [English README](./README.md)
10
+ - [中文 README](./README.zh.md)
11
+ - [日本語 README](./README.ja.md)
12
+ - [한국어 README](./README.ko.md)
13
+ - [Changelog](./CHANGELOG.md)
14
+ - [日本語 changelog](./CHANGELOG.ja.md)
15
+ - [한국어 changelog](./CHANGELOG.ko.md)
16
+
17
+ The placeholders in this guide are:
18
+
19
+ - `<profile>`: the DSH profile to modify, usually `web`;
20
+ - `dsh-thinking-levels`: the npm package and runtime plugin ID;
21
+ - `thinking-levels`: the Cordis composition and settings Slot ID.
22
+
23
+ > **Version requirement — DSH v0.1.7-rc.1 or newer.**
24
+ >
25
+ > Check the running version first (`dsh --version`).
26
+ >
27
+ > | DSH version | Action |
28
+ > | --- | --- |
29
+ > | ≥ 0.1.7-rc.1 | Install this release. |
30
+ > | < 0.1.7-rc.1 | Stay on the previous plugin line (3.0.1). Do not run an older plugin build against DSH 0.1.7+ — upgrade the plugin instead. |
31
+ >
32
+ > The boundary is `0.1.7-rc.1`, where DSH removed the imperative settings registration (`settings.register` / `installSettingsSection`) and the client `settingsScope` service. This release targets the declarative 0.1.7 settings surface (`.volatile()` schema fields + `configForms`).
33
+
34
+ ## 0. Prerequisites and profile discovery
35
+
36
+ ```bash
37
+ echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
38
+ dsh --version
39
+ ls "${DSH_HOME:-$HOME/.dsh}/profiles"
40
+ ```
41
+
42
+ Use the profile named by your running DSH process. `web` is common, but the active `--profile` argument is authoritative.
43
+
44
+ ## 1. Official installation
45
+
46
+ Install the latest version:
47
+
48
+ ```bash
49
+ dsh plugin --profile <profile> add dsh-thinking-levels -w
50
+ ```
51
+
52
+ (The `-w` flag is required when the profile is a pnpm workspace root, as `web` is.)
53
+
54
+ Install the current release explicitly:
55
+
56
+ ```bash
57
+ dsh plugin --profile <profile> add dsh-thinking-levels@0.6.0 -w
58
+ ```
59
+
60
+ The official CLI updates the profile dependency, lockfile, and `dsh.profile.bundles` automatically. Do not add a manual YAML row.
61
+
62
+ ### Supply-chain cooling period
63
+
64
+ The dsh runtime uses pnpm 11, whose `minimumReleaseAge` policy may block a freshly published
65
+ version with `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`. Add the version to
66
+ `minimumReleaseAgeExclude` in `~/.dsh/profiles/web/pnpm-workspace.yaml`:
67
+
68
+ ```yaml
69
+ minimumReleaseAgeExclude:
70
+ - dsh-thinking-levels@0.6.0
71
+ ```
72
+
73
+ ## 2. Upgrade
74
+
75
+ Upgrade to the latest registry version:
76
+
77
+ ```bash
78
+ dsh plugin --profile <profile> update dsh-thinking-levels -w
79
+ ```
80
+
81
+ Restart DSH for host changes and refresh the Web page for client changes.
82
+
83
+ ## 3. Local-path / link: registration (alternative)
84
+
85
+ For development or offline installs, register the plugin from a local checkout:
86
+
87
+ ```bash
88
+ # ~/.dsh/profiles/web/package.json dependencies:
89
+ # "dsh-thinking-levels": "link:<absolute path to 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
+ Or use the official CLI with a local path (no network needed):
98
+
99
+ ```bash
100
+ dsh plugin --profile <profile> add /absolute/path/to/dsh-thinking-levels -w
101
+ ```
102
+
103
+ ## 4. Verify installation
104
+
105
+ Check the dependency and installed version:
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
+ The version must be `0.6.0` for this release.
114
+
115
+ Check the official composition:
116
+
117
+ ```bash
118
+ dsh --profile <profile> --dump-default-config
119
+ ```
120
+
121
+ It must contain:
122
+
123
+ ```yaml
124
+ - id: thinking-levels
125
+ name: dsh-thinking-levels
126
+ ```
127
+
128
+ ## 5. Verify the settings form
129
+
130
+ Restart DSH, then refresh the Web page. Open **Settings → Plugins** and find the **dsh-thinking-levels** entry — since DSH 0.1.7 the form is generated by the host from the plugin's declared `.volatile()` schema fields (there is no custom client card any more).
131
+
132
+ 1. The form shows the enable toggle, the level picker (eight standard levels plus `auto`) and the scheduler toggles (`allowDowngrade` / `allowUpgrade`).
133
+ 2. Committed changes apply to the next model request without a restart (live volatile config).
134
+ 3. The per-model capability editor (gateway wire values, llm-pi-ai) shipped with the retired card and is no longer part of this plugin — edit `llm-pi-ai` model capabilities through the official Models settings.
135
+
136
+ ## Japanese and Korean support status
137
+
138
+ The plugin ships `ja` and `ko` dictionaries, but the current official DSH release exposes only `zh` and `en` through `LocaleRuntime`. On stock DSH, selecting Japanese or Korean fails with `locale "<id>" is not registered`.
139
+
140
+ To use them before official support lands, maintain a DSH fork and update:
141
+
142
+ - `packages/client/locale/src/locale-settings.ts`: add `ja` and `ko` to `LOCALE_IDS` (the Host preference schema derives from this list).
143
+ - `packages/client/locale/src/client/index.ts`: add `{ id: 'ja', label: '日本語' }` and `{ id: 'ko', label: '한국어' }` to `LOCALES`.
144
+ - Add the corresponding core dictionaries and tests, then rebuild and run the forked DSH.
145
+
146
+ A plugin-only change cannot extend DSH's global locale list. Use the fork's documented build and official profile commands; do not manually edit a profile manifest.
147
+
148
+ ## 6. Troubleshooting
149
+
150
+ | Symptom | Action |
151
+ | --- | --- |
152
+ | `dsh` is not found | Install or enable the official DSH CLI. Do not simulate profile installation with plain npm or pnpm commands. |
153
+ | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Add the version to `minimumReleaseAgeExclude` in the profile's `pnpm-workspace.yaml`. |
154
+ | Plugin shows as "disabled/unmounted" with no error | Check the profile composition; the host must not value-depend on `@deepseek-ai/dsh-settings` (it does not). |
155
+ | Client entry missing from `__DSH_BOOT__` | Confirm `exports["./client"]` exists and the host fiber was established. |
156
+ | Model selector has no `Auto` | Confirm the adapter `resolveModel` wrapper ran (it re-runs on `llm/adapters-updated`). |
157
+ | Settings form write fails | The value was rejected by the plugin schema; align it with the declared `.volatile()` field types. |
158
+ | Subagent returns `UNSUPPORTED_REASONING_EFFORT` | The target model does not advertise the level; pick a supported one or restore the provider default. |
159
+ | Stale client bundle | Hard-refresh the browser (Ctrl+Shift+R) after an upgrade. |
160
+
161
+ ## 7. Remove
162
+
163
+ Use the official command:
164
+
165
+ ```bash
166
+ dsh plugin --profile <profile> remove dsh-thinking-levels -w
167
+ ```
168
+
169
+ Verify that the composed profile no longer contains the bundle:
170
+
171
+ ```bash
172
+ dsh --profile <profile> --dump-default-config
173
+ ```