dsh-thinking-levels 1.0.0-beta.1 → 2.0.0-beta.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/CHANGELOG.md CHANGED
@@ -8,44 +8,28 @@ All notable changes to `dsh-thinking-levels` are documented here.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
- ### Fixed — legacy line renumbered to 1.x — 1.0.0-beta.1
12
-
13
- - **The composer context-window control crashed its slot on every render.** `ContextQuick`
14
- called the session standard seat as a bare getter (`useSession()`). Every renderer standard
15
- seat is a `useSyncExternalStoreWithSelector` *selector hook* bound by `bindSnapshotSelector`,
16
- so the call reached the shim with `selector === undefined` and threw
17
- `TypeError: l is not a function`, taking the whole `conversation.input.right` entry down on
18
- each render. The control now reads the session `useConversation` seat through a stable
19
- module-level selector (`ConversationSnapshot.views.get('trajectory')`) — the view that
20
- actually carries the request ledger. The previous code read `session.views.get('trajectory')`
21
- on the *session* snapshot, a field `SessionSnapshot` never had, so it could not have resolved
22
- a model even without the crash.
23
- - **A harness line without that seat renders nothing** instead of a dead control: the
24
- capability check is a separate outer component, so the seat hook itself is only ever called
25
- inside a component that was handed a real hook (hook order stays stable either way).
26
- - **The popover is now one slider row.** The preset button grid is gone: a preset slider
27
- (64K / 128K / 256K / 400K / 512K / 1M) writes once per gesture (pointer release, key release,
28
- blur), next to the committed value, a collapsed custom-integer editor (`⋯`) and Clear. The
29
- trigger pill shows the value only — no `ctx` prefix, no hint paragraph (the full hint stays on
30
- the pill's `title`). Copy is localized in all four dictionaries.
31
- - **Version renumbering: the line is now the major digit.** This legacy line (DSH < 0.1.2)
32
- moves to **1.x**, the mainline (DSH 0.1.2+) to **2.x**, so an installed version states which
33
- harness segment it serves. npm dist-tags keep their roles: `compat` = this line, `beta` =
34
- the mainline. Nothing else changes for existing installs; a `0.7.x` range simply does not
35
- match `1.x`, so the switch is explicit.
36
- - **No harness-side changes on this line.** DSH 0.1.0/0.1.1 has no model-menu child slot, so
37
- the quick control stays in the composer tool row it was always registered into.
38
-
39
- ### Changed — compat line narrowed to DSH < 0.1.2-alpha.1 — 0.7.1-beta.3
40
-
41
- - **`engines.dsh` gained an upper bound**: `>=0.1.0-rc.8` → `>=0.1.0-rc.8 <0.1.2-alpha.1`.
42
- The open-ended range claimed every later release, but `@deepseek-ai/dsh-client-runtime`
43
- was deleted wholesale in DSH `0.1.2-alpha.1` (commit `be531688f3`) and this line still
44
- imports `ClientContext` from it. The bound now blocks a wrong install.
45
- - **Two npm lines, never overwriting each other.** `compat` = this line (DSH 0.1.0/0.1.1);
46
- `beta` = the 0.1.2+ line from `0.7.2` onward, which takes `Context` from
47
- `@deepseek-ai/cordis`. Moving to DSH 0.1.2+ means switching tags, not upgrading in place.
48
- - **No code change.** Only engines, version and docs differ from `0.7.1-beta.2`.
11
+ ### Breaking — DSH v0.1.2+ only (`dsh-client-runtime` removal) — 0.7.2-beta.1
12
+
13
+ - **`engines.dsh` is now `>=0.1.2-alpha.1 <0.2.0-0`.** `@deepseek-ai/dsh-client-runtime`
14
+ was deleted wholesale in `0.1.2-alpha.1` (commit `be531688f3`); that release is the hard
15
+ segment boundary. The previous plugin line (`0.7.1-beta.2` and earlier) keeps serving
16
+ DSH 0.1.0 / 0.1.1.
17
+ - **`ClientContext` is gone.** `src/client/index.ts` now imports
18
+ `Context as ClientContext` from `@deepseek-ai/cordis`, matching every official client
19
+ plugin. `@deepseek-ai/dsh-client-runtime` is removed from `peerDependencies`,
20
+ `peerDependenciesMeta` and `devDependencies`, so it no longer blocks install.
21
+ - **`src/types/contracts.d.ts` loses the ambient
22
+ `declare module '@deepseek-ai/dsh-client-runtime/client'` mirror.** `SettingsScope`
23
+ gains the `base` / `user` / `revision` snapshot fields and `bind` takes an optional
24
+ `decode`; the `SlotsFace` mirror stays (the real `SlotRegistry` in
25
+ `@deepseek-ai/dsh-client-ui-renderer` supplies it at runtime).
26
+ - **`dsh.client.inject` lists `@deepseek-ai/dsh-client-ui-renderer`**, the package that
27
+ provides the `slots` service this plugin registers into.
28
+ - **Localized registration split by overload.** The bulk
29
+ `register(ns, dicts)` form is typed to the built-in locale ids (`zh` / `en` only), so
30
+ the shipped `ja` / `ko` dictionaries now go through the single-locale
31
+ `register(ns, locale, dict)` overload and are disposed together. Behaviour is
32
+ unchanged; the call now typechecks against the real locale package.
49
33
 
50
34
  ### Removed
51
35
 
@@ -62,6 +46,39 @@ All notable changes to `dsh-thinking-levels` are documented here.
62
46
  has its own tests (`tests/session-events.spec.ts`, `tests/thinking-level.spec.ts`) and
63
47
  was untouched.
64
48
 
49
+ ### Fixed — mainline renumbered to 2.x — 2.0.0-beta.1
50
+
51
+ - **The context-window quick control crashed its slot on every render.** `ContextQuick`
52
+ called the session standard seat as a bare getter (`useSession()`). Every renderer standard
53
+ seat is a `useSyncExternalStoreWithSelector` *selector hook* bound by `bindSnapshotSelector`
54
+ (`@deepseek-ai/dsh-client-ui-renderer`), so the call reached the shim with
55
+ `selector === undefined` and threw `TypeError: l is not a function`: the
56
+ `conversation.input.right` entry died and the slot error boundary rethrew it on each render.
57
+ The same component also read `session.views.get('trajectory')`, a field `SessionSnapshot`
58
+ never carried (views belong to `ConversationSnapshot`), so it could not have resolved a model
59
+ even without the crash. The active model now comes from the session `useTrajectory` seat
60
+ through a stable module-level selector over the request ledger.
61
+ - **The control moved into the model menu card.** It registers into
62
+ `conversation.input.model.section` — the strip ui-model-selection renders under the Model /
63
+ Reasoning-effort rows — as a compact slider row: a preset slider (64K / 128K / 256K / 400K /
64
+ 512K / 1M) that writes once per gesture (pointer release, key release, blur), the committed
65
+ value, a collapsed custom-integer editor and Clear. The copy is down to the row label, the
66
+ value and Clear. The composer-row pill is gone; the settings card keeps the full per-model
67
+ editor. The row appears on harnesses whose model seat declares that child slot (added in
68
+ `packages/client/ui-model-selection`); on older harnesses the registration stays pending and
69
+ the settings card remains the editor.
70
+ - **`dsh.plugin.json` version synced** with `package.json`; the 0.7.2-beta.1 tarball had
71
+ shipped it as 0.7.1-beta.2.
72
+ - **Version renumbering: the line is now the major digit.** This mainline (DSH 0.1.2+) moves
73
+ to **2.x**, the legacy line (DSH < 0.1.2, branch `compat/dsh-0.1.1`) to **1.x**, so an
74
+ installed version states which harness segment it serves. npm dist-tags keep their roles:
75
+ `beta` = this line, `compat` = the legacy line. Nothing else changes for existing installs;
76
+ a `0.7.x` range simply does not match `2.x`, so the switch is explicit.
77
+ - **The model-menu row needs a harness that declares the seat.** `conversation.input.model.section`
78
+ is added to `packages/client/ui-model-selection` (declaration + `renderSlot` call); until a
79
+ harness release carries it, the registration stays pending and the settings card remains the
80
+ editor. No released harness has it today.
81
+
65
82
  ## [0.7.0] — 2026-09-09
66
83
 
67
84
  > **Stable release.** The short-circuit route is retired; all gateway fixes now ride the official `llm-pi-ai` compat surface (dsh ≥ **v0.1.0-rc.8**). This version also includes the context-window presets from the earlier 0.7.0 draft.
package/INSTALL.md CHANGED
@@ -20,6 +20,17 @@ The placeholders in this guide are:
20
20
  - `dsh-thinking-levels`: the npm package and runtime plugin ID;
21
21
  - `thinking-levels`: the Cordis composition and settings Slot ID.
22
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
+
23
34
  ## 0. Prerequisites and profile discovery
24
35
 
25
36
  ```bash
package/INSTALL.zh.md CHANGED
@@ -20,6 +20,17 @@
20
20
  - `dsh-thinking-levels`:npm 包名与运行时插件 ID;
21
21
  - `thinking-levels`:Cordis 组合条目与设置页 Slot ID。
22
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
+
23
34
  ## 0. 前置检查与 profile 确认
24
35
 
25
36
  ```bash
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  **Per-round thinking-level (`reasoning_effort`) control for [DeepSeek Harness (dsh)](https://github.com/deepseek-ai/deepseek-harness): pick `Auto` (a mask) in the session model selector and the plugin schedules `low` / `high` / `max` from the recent tool-call history before submitting the API effort — or fix a wire level (`off` / `on` / `minimal` / `low` / `medium` / `high` / `xhigh` / `max`) manually. Cheap tool rounds stay cheap; heavy work never starves.**
4
4
 
5
5
  - [English README](./README.md)
6
- > **v0.7.0-beta.1 (2026-09-06): the short-circuit route is retired.** This release no longer depends on `dsh-llm-openai-completions` — custom-gateway fixes ride the official `llm-pi-ai` compat surface (requires **dsh ≥ v0.1.0-rc.8**); keep the adapter plugin uninstalled. See the [CHANGELOG](./CHANGELOG.md).
6
+ > **v0.7.0-beta.1 (2026-09-06): the short-circuit route is retired.** This release no longer depends on `dsh-llm-openai-completions` — custom-gateway fixes ride the official `llm-pi-ai` compat surface (requires **dsh ≥ v0.1.2-alpha.1**); keep the adapter plugin uninstalled. See the [CHANGELOG](./CHANGELOG.md).
7
7
 
8
8
  - [中文 README](./README.zh.md)
9
9
  - [日本語 README](./README.ja.md)
@@ -16,23 +16,16 @@
16
16
  - [日本語 changelog](./CHANGELOG.ja.md)
17
17
  - [한국어 changelog](./CHANGELOG.ko.md)
18
18
 
19
- > # ⚠️ LEGACY BRANCH — `compat/dsh-0.1.1`
19
+ > **▼ DSH version support**
20
20
  >
21
- > **This branch is the frozen old-version line. It is not the mainline.**
21
+ > This release supports **DSH v0.1.2 or newer** only.
22
22
  >
23
- > - **Mainline**: `master` — the DSH 0.1.2+ line, where versions move forward.
24
- > - **This branch**: `compat/dsh-0.1.1` — the DSH 0.1.0 / 0.1.1 line, published under the npm `compat` tag only. It receives no feature work; it exists so old DSH installs keep working.
25
- >
26
- > **▼ DSH version support — compat line**
27
- >
28
- > This release (`0.7.1-beta.x`) supports **DSH < 0.1.2-alpha.1** (the 0.1.0 / 0.1.1 lines) only.
29
- >
30
- > | DSH version | Status | Install |
23
+ > | DSH version | Status | Notes |
31
24
  > | --- | --- | --- |
32
- > | < 0.1.2-alpha.1 | ✅ Supported (this line) | `npm i dsh-thinking-levels@compat` |
33
- > | ≥ 0.1.2-alpha.1 | ❌ **Not supported** | Use `npm i dsh-thinking-levels@beta` (0.7.2+) instead |
25
+ > | ≥ 0.1.2-alpha.1 | ✅ Supported | Covers the 0.1.2 / 0.1.3 / 0.1.4 / 0.1.5 lines |
26
+ > | < 0.1.2-alpha.1 | ⚠️ Not recommended | 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. |
34
27
  >
35
- > The boundary is `0.1.2-alpha.1`, where DSH removed `@deepseek-ai/dsh-client-runtime`. This line still imports `ClientContext` from it, so it cannot build or run against 0.1.2+; `engines.dsh` is narrowed to `>=0.1.0-rc.8 <0.1.2-alpha.1` to block a wrong install. `compat` is the 0.1.0/0.1.1 line; `beta` is the 0.1.2+ line, which takes `Context` from `@deepseek-ai/cordis`. The two lines never overwrite each other.
28
+ > 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.
36
29
 
37
30
  > **Compatibility note:** Version `0.6.0` includes Japanese (`ja`) and Korean (`ko`) dictionaries and selector entries, but the current official DSH releases expose only `zh` and `en` through `LocaleRuntime`. On stock DSH, selecting `ja` or `ko` fails with `locale "<id>" is not registered`. These languages will work after official DSH adds the locale IDs. Advanced users can use a DSH fork that updates `packages/client/locale/src/locale-settings.ts` (`LOCALE_IDS`) and `packages/client/locale/src/client/index.ts` (`LOCALES` labels), together with the corresponding core dictionaries and tests, then rebuild and run the forked DSH. Changing this plugin alone cannot extend DSH's global locale list.
38
31
 
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-thinking-levels",
3
- "version": "1.0.0-beta.1",
3
+ "version": "2.0.0-beta.1",
4
4
  "main": "./lib/index.js",
5
5
  "description": "thinking-level (reasoning_effort) control — auto-adjust per tool round, with optional manual lock and per-tool timing telemetry.",
6
6
  "engines": {