dsh-thinking-levels 3.4.4 → 4.0.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/README.de.md ADDED
@@ -0,0 +1,227 @@
1
+ # dsh-thinking-levels
2
+
3
+ **Rundenweise Denkstufen-Steuerung (`reasoning_effort`) für [DeepSeek Harness (dsh)](https://github.com/deepseek-ai/deepseek-harness): Wählen Sie in der Session-Modellauswahl `Auto` (eine Maske) und das Plugin plant `low` / `high` / `max` aus dem recenten Verlauf der Tool-Aufrufe, bevor der Aufwand an die API übermittelt wird — oder fixieren Sie manuell einen Wire-Level (`off` / `on` / `minimal` / `low` / `medium` / `high` / `xhigh` / `max`). Billige Tool-Runden bleiben billig; schwere Arbeiten verhungern nie ohne Reasoning.**
4
+
5
+ - [Deutsche README](./README.de.md)
6
+ - [English README](./README.md)
7
+ - [中文 README](./README.zh.md)
8
+ - [日本語 README](./README.ja.md)
9
+ - [한국어 README](./README.ko.md)
10
+ - [Installationsanleitung auf Deutsch](./INSTALL.de.md)
11
+ - [Installation guide](./INSTALL.md)
12
+ - [中文安装指南](./INSTALL.zh.md)
13
+ - [日本語インストールガイド](./INSTALL.ja.md)
14
+ - [한국어 설치 안내](./INSTALL.ko.md)
15
+ - [Changelog auf Deutsch](./CHANGELOG.de.md)
16
+ - [Changelog](./CHANGELOG.md)
17
+ - [日本語 changelog](./CHANGELOG.ja.md)
18
+ - [한국어 changelog](./CHANGELOG.ko.md)
19
+
20
+ > **v0.7.0-beta.1 (2026-09-06): die Short-Circuit-Route wird eingestellt.** Diese Version hängt nicht mehr von `dsh-llm-openai-completions` ab — Gateway-Fixes für eigene Gateways fahren über die offizielle `llm-pi-ai`-Compat-Oberfläche (erfordert **dsh ≥ v0.1.2-alpha.1**); das Adapter-Plugin sollte deinstalliert bleiben. Siehe [CHANGELOG](./CHANGELOG.md).
21
+
22
+ > **▼ Unterstützte DSH-Versionen**
23
+ >
24
+ > Diese Version (4.0.0) unterstützt ausschließlich **DSH v0.2.0-rc.1 bis < 0.2.1**.
25
+ >
26
+ > | DSH-Version | Status | Hinweise |
27
+ > | --- | --- | --- |
28
+ > | ≥ 0.2.0-rc.1 | ✅ Unterstützt | Diese Version (4.0.x): dieselbe deklarative Einstellungsoberfläche (`.volatile()`-Schemafelder, vom Host gerendert; pluginübergreifende Lese-/Schreibzugriffe über den `configForms`-Dienst), mit dem Peer-Gate neu auf das 0.2.0-rc-Segment ausgerichtet |
29
+ > | ≥ 0.1.7-rc.1 bis < 0.2.0 | ✅ Unterstützt | Nutzen Sie die 3.x-Linie (3.4.3, npm dist-tag `dsh-0.1.7`): deklarative Einstellungen — der Host rendert das Plugins-Formular aus den `.volatile()`-Schemafeldern des Plugins; pluginübergreifende Lese-/Schreibzugriffe laufen über den `configForms`-Dienst |
30
+ > | < 0.1.7-rc.1 | ⚠️ Nicht unterstützt | DSH 0.1.7 entfernte die imperative Einstellungsregistrierung und den pro Plugin kartierten Sitz, auf den frühere Linien (3.0.x und älter) setzten — bleiben Sie bei Plugin 3.0.2 für 0.1.2–0.1.6-Hosts. |
31
+ >
32
+ > Die Grenze ist `0.1.7-rc.1`, wo DSH die imperative Einstellungsregistrierung (`settings.register` / `installSettingsSection`) und den Client-Dienst `settingsScope` entfernte. Seit dieser Grenze sind laufzeitveränderbare Konfigurationsfelder im Schemastery-Schema als `.volatile()` markiert, der Host erzeugt das Einstellungsformular allein aus diesem Schema (kein Registrierungsaufruf, keine Client-Einstellungskarte), und das Plugin liest die Live-Werte pro Anfrage, angetrieben von `loader/volatile-update`. Die Linien 3.1.x–3.4.x zielen auf die deklarative Oberfläche von 0.1.7; die Linie 4.0.x ist dieselbe Oberfläche, neu ausgerichtet auf das 0.2.0-rc-Segment.
33
+
34
+ > **Versionsbereichs-Politik:** Jede Kompatibilitätslinie pinnt ihren Host-Segment eng. Linien für 0.1.x-Hosts folgen `>=0.1.x-rc.1 <0.1.(x+1)-0` (3.1.x: `>=0.1.7-rc.1 <0.1.8-0`; 3.0.x: `>=0.1.5-alpha.1 <0.1.6-0`; 2.0.x: `>=0.1.2-alpha.1 <0.1.3-0`; 1.0.0-beta: `>=0.1.0-rc.8 <0.1.2-alpha.1`); Linien für das 0.2.x-Segment folgen `>=0.2.0-rc.1 <0.2.1-0` (4.0.x: `>=0.2.0-rc.1 <0.2.1-0`). Keine Linie deklariert je eine offene Obergrenze, sodass ein Kompatibilitätsresolver eine Plugin-Linie niemals auf ein neueres Host-Segment matchen kann, für das sie nicht gebaut wurde. 0.4.0–0.6.0 trugen überhaupt keine dsh-Peer-Deklarationen und sind faktisch kompatibilitätsuntypisiert — nicht installieren.
35
+
36
+ > **Kompatibilitätshinweis:** Version `0.6.0` enthält japanische (`ja`) und koreanische (`ko`) Wörterbücher und Selektoreinträge, aber die aktuellen offiziellen DSH-Releases stellen über `LocaleRuntime` nur `zh` und `en` bereit. Auf einem unveränderten DSH schlägt die Auswahl von `ja` oder `ko` mit `locale "<id>" is not registered` fehl. Diese Sprachen funktionieren, sobald das offizielle DSH die Locale-IDs ergänzt. Fortgeschrittene Nutzer können einen DSH-Fork pflegen, der `packages/client/locale/src/locale-settings.ts` (`LOCALE_IDS`) und `packages/client/locale/src/client/index.ts` (`LOCALES`-Labels) zusammen mit den zugehörigen Kern-Wörterbüchern und Tests aktualisiert, und dann den geforkten DSH neu bauen und betreiben. Eine Änderung nur an diesem Plugin kann DSHs globale Locale-Liste nicht erweitern.
37
+
38
+ In einer mehrstufigen Tool-Kette denkt das Modell vor **jedem** Tool-Aufruf neu nach — und dieses Denken dominiert die Wanduhrzeit (eine Agent-Aufgabe mit 50 Schritten kann Minuten zwischen den Tools mit Reasoning verbringen). `dsh-thinking-levels` hängt sich in den `agent/request`-Waterfall, den dsh für jeden Schritt neu auflöst (mit `prepend` registriert, damit die Session-Modellauswahl-Assembly seine Entscheidung nicht überschreiben kann) und injiziert eine Denkstufe in die nächste Modellanfrage.
39
+
40
+ ## Vorschau
41
+
42
+ Screenshots der laufenden UI (dsh web):
43
+
44
+ <figure>
45
+ <img width="460" alt="Vom Plugin injiziertes Auto-Dropdown der Modellauswahl: Stufen Off / Low / High / Max / Auto, High aktuell ausgewählt, Auto hervorgehoben — Auto ist eine Maske, das Plugin plant low/high/max pro Schritt aus dem Tool-Verlauf." src="assets/官方模型的自动级别调整.png" />
46
+ <figcaption>Die native Modellauswahl gewinnt <strong>Auto</strong> — wählen Sie es, und das Plugin plant low/high/max pro Schritt statt eines festen Wire-Levels.</figcaption>
47
+ </figure>
48
+
49
+ <figure>
50
+ <img style="max-width:100%" alt="Denkstufen-Einstellungen (3.0.x-Karte gezeigt): Standardstufe (Auto-Planung), Schalter Aktivieren / Downgrade erlauben / Upgrade erlauben, Modellfähigkeits-Tabelle des Custom-Providers llm-pi-ai mit dem progressiven Editor pro Modell sowie Apply-to-all-Presets (Off/High/Max offizieller DeepSeek-Stil, Off/Low/Medium/High generisch)." src="assets/自动思考级别配置.png" />
51
+ <figcaption>Denkstufen-Einstellungen, 3.0.x-Karte (Screenshot als Referenz erhalten). Seit 3.1.0 / DSH 0.1.7 werden Stufe und Scheduler-Schalter als hostgeneriertes deklaratives Formular gerendert; die eigene Karte samt llm-pi-ai-Fähigkeitseditor wurde mit dem eingestellten Sitz entfernt.</figcaption>
52
+ </figure>
53
+
54
+ <figure>
55
+ <img style="max-width:100%" alt="Fähigkeits-Editor pro Modell für ein Custom-openai-completions-Modell (local-35b / Qwen3.6-35B-A3B), wie in der 3.0.x-Einstellungskarte ausgeliefert: Thinking-Modell und Vision aktiviert, Support für Think-Effort aus, Thinking-Format qwen-chat-template (automatisch ausgefüllt); kein Takeover-Schalter — das offizielle Compat-Flag liegt auf der Provider-Zeile; Kontextfenster-Limit-Presets 64K/128K/256K/400K/512K/1M mit benutzerdefinierter Eingabe." src="assets/自定义模型的思考接管-短路-上下文窗口限制.png" />
56
+ <figcaption>Fähigkeitskarte pro Modell, 3.0.x (Screenshot als Referenz erhalten). Seit 3.1.0 / DSH 0.1.7 wird der Fähigkeits-Editor nicht mehr ausgeliefert; bearbeiten Sie llm-pi-ai-Modellfähigkeiten über die offiziellen Models-Einstellungen.</figcaption>
57
+ </figure>
58
+
59
+ ## Stufen
60
+
61
+ | Stufe | Bedeutung | Ort |
62
+ |---|---|---|
63
+ | `off` | Denken deaktiviert (nur manuell — wird nie automatisch gewählt) | Modellauswahl / Standardstufe |
64
+ | `on` | Denken aktiviert (nur Toggle-only-Modelle): sendet `enable_thinking`, nie einen Think-Effort | Modellauswahl / Standardstufe |
65
+ | `minimal` | geringster Aufwand (sehr leichte Aufgaben) | Modellauswahl / Standardstufe |
66
+ | `low` | manuelle Wahl für einfache Chat-Aufgaben (billige Runden bleiben billig) | Modellauswahl / Standardstufe |
67
+ | `medium` | mittlerer Aufwand | Modellauswahl / Standardstufe |
68
+ | `high` | der offizielle Standard-Aufwand | Modellauswahl / Standardstufe |
69
+ | `xhigh` | extra hoher Aufwand | Modellauswahl / Standardstufe |
70
+ | `max` | schwere Arbeit | Modellauswahl / Standardstufe |
71
+ | `auto` | **Maske**: plant pro Schritt aus dem recenten Tool-Aufruf-Verlauf, wird vor der Übermittlung zu einem Wire-Level aufgelöst | Modellauswahl (vom Plugin injiziert) / Standardstufe |
72
+
73
+ Wire-Level-Fakten (geprüft gegen die offizielle DeepSeek-Dokumentation und dshs `llm-deepseek`-Adapter): `low` mappt 1:1 auf deepseek-v4-flash / v4-pro, während `medium` / `xhigh` auf `high` kollabieren. Der Adapter akzeptiert nur `off | low | high | max` und weist alles andere mit `UNSUPPORTED_REASONING_EFFORT` zurück — `auto` ist die Maskenschicht des Plugins, wird nie direkt an die API gesendet und vor der Injektion stets zu einem konkreten Wire-Level aufgelöst. `on` ist **kein** Effort-Level: Es wird nur von Toggle-only-Modellen (Qwen3.6-Stil) beworben und schaltet lediglich `enable_thinking` auf true — kein `reasoning_effort` wird gesendet; ein effort-fähiges Modell bewirbt nie `on`, daher wird eine manuelle `on`-Wahl dort entfernt.
74
+
75
+ ## Individuelles Wire-Mapping
76
+
77
+ Für handdeklarierte `llm-pi-ai`-Modelle mappen Sie jede Stufe auf den exakten Wert, den Ihr Gateway erwartet (von dsh-thinking-effort übernommen): haken Sie eine Stufe ab und tragen Sie ihren Wire-Wert ein, z. B. `high` → `ultra`. Das Mapping wird als `reasoningEfforts`-Tabelle des Modells in der `llm-pi-ai`-Konfiguration gespeichert, sodass die Composer-Auswahl `High` `ultra` an das Gateway sendet. Lässt man `off` leer, bedeutet das „nicht senden“.
78
+
79
+ - Offizielles Preset: `Off / High / Max` (offizieller DeepSeek-Stil)
80
+ - Generisches Preset: `Off / Low / Medium / High`
81
+
82
+ > Der visuelle Editor für dieses Mapping saß auf der Einstellungskarte des Plugins, die die DSH-0.1.7-Migration entfernte (der Sitz existiert nicht mehr). Bearbeiten Sie die `reasoningEfforts`-Tabelle stattdessen über die offizielle Models-Einstellungsoberfläche — die Host-seitige Erkennung und Injektion lesen diese Konfiguration ohnehin live.
83
+
84
+ ## Kontextfenster-Presets
85
+
86
+ Die Schnellsteuerung in der Composer-Tool-Zeile (neben der Modell-/Effort-Auswahl) bearbeitet ein **Kontextfenster-Limit**: Preset-Stufen `64K / 128K / 256K / 400K / 512K / 1M`, eine Eingabe für eigene Ganzzahlen und ein Löschen-Button. Der Wert wird in den `contextWindow`-Eintrag des `llm-pi-ai`-Modells (Ganzzahl `2000`–`1000000`) geschrieben — oder in den `llm-deepseek`-Eintrag für offizielle DeepSeek-Modelle.
87
+
88
+ Stromaufwärts konsumiert der Harness den Wert über `resolveModelInfo(...).context.contextWindow` für Kompaktions-Schwellen, Kontext-Überlauf-Erkennung und Kontextdruck-Projektionen. Da `llm-pi-ai` die Live-Konfiguration bei jeder Auflösung neu liest und der Compat-Sync die Modell-Erkennung nicht blockiert, greift eine Einstellungsänderung bei der nächsten Anfrage ohne Neustart.
89
+
90
+ Die Plugin-Konfiguration akzeptiert außerdem `models['provider/model'].contextWindow` als validierte Deklaration (Ganzzahl `2000`–`1000000`) auf der Composition/Konfigurationsoberfläche.
91
+
92
+ ## Modellbewusster Schutz (v0.5.0)
93
+
94
+ Das Plugin sendet nie einen `reasoning_effort` an ein Modell, das keinen bewirbt. Eigene
95
+ openai-completions-Routen (z. B. ein lokales Qwen3.6 ohne `reasoningEfforts`) werden über
96
+ `ctx.llm.resolveModelInfo` als non-reasoning eingestuft, und jeder Aufwand — geerbter oder
97
+ geplanter — wird **entfernt**, statt gesendet zu werden, sodass dshs pro-Anfrage-Zurückweisung
98
+ `UNSUPPORTED_REASONING_EFFORT` nicht auslösen kann. Nicht unterstützte Felder werden nie an eine
99
+ API weitergegeben, die sie nicht annehmen kann.
100
+
101
+ Versionsverhalten:
102
+
103
+ | dsh-Version | `low`-Behandlung |
104
+ |---|---|
105
+ | rc.6 (alt) | nicht nativ: die Auswahl zeigt ihn nur, wenn eine vom Konfigurierer bestätigte `models`-Übersteuerung ihn nennt; die Stufe wird dann beworben (Auswahl + Anfrage-Validierung) und unverändert durchgereicht |
106
+ | rc.7+ (neu) | nativ: das Plugin schreibt ihn weder um noch injiziert ihn erneut; eine manuelle `low`-Wahl geht unverändert durch |
107
+
108
+ Der Auto-Scheduler kann `low` weiterhin für unterstützende Modelle wählen — der Fähigkeits-Schutz oben hält ihn von Modellen fern, die ihn nicht annehmen können.
109
+
110
+ ## Auto in der Modellauswahl
111
+
112
+ Die Session-Modellauswahl (neben dem Modell) bietet jetzt **Auto** nach den Wire-Levels an (in die Modellverzeichnis-Metadaten vom Plugin injiziert):
113
+
114
+ | Auswahl in der Modellauswahl | Verhalten |
115
+ |---|---|
116
+ | **Auto** | das Plugin plant über Tool-Verlauf + die Upgrade-/Downgrade-Schalter und löst vor der Übermittlung zu `low` / `high` / `max` auf |
117
+ | `off` / `on` / `minimal` / `low` / `medium` / `high` / `xhigh` / `max` | **die manuelle Wahl gewinnt** — das Plugin greift nicht ein (`on` bleibt `on` auf Toggle-only-Modellen, wird nie zu einem Effort angehoben; effort-fähige Modelle entfernen es) |
118
+ | nicht gesetzt | die Standardstufe des Plugins greift (unten) |
119
+
120
+ ## Auto-Scheduler
121
+
122
+ Der Hub ist `high` (der offizielle Standard). `auto` plant zwischen `low` / `high` / `max`; es wählt nie `off`.
123
+
124
+ | Recent Tool-Aufrufe | Stufe |
125
+ |---|---|
126
+ | keine (frischer Prompt, reiner Chat) | `low` |
127
+ | ≥75 % einfache Tools, kleine Argumente, Downgrades erlaubt | `low` |
128
+ | gemischte / schwere Tools | `high` |
129
+ | sehr schwere Payloads, Upgrades erlaubt | `max` |
130
+
131
+ Die Planungspolitik stammt aus derselben Quelle wie [dsh-tool-turbo](https://github.com/drscrewdriver/dsh-tool-turbo) (dieselbe Simple-Tool-Whitelist / dieselben Payload-Schwellen / dieselbe 75-%-Regel).
132
+
133
+ ## Installation
134
+
135
+ Siehe [INSTALL.md](./INSTALL.de.md) für die vollständige Anleitung der offiziellen CLI (Profil-Erkennung, Upgrade, Migration, Verifikation, Fehlerbehebung). Schnellstart:
136
+
137
+ ```bash
138
+ # 1. install the plugin into a profile from npm (web shown; any profile works)
139
+ # (the web profile is a pnpm workspace root, so -w is required)
140
+ dsh plugin --profile web add dsh-thinking-levels -w
141
+ # GitHub alternative:
142
+ # dsh plugin --profile web add https://github.com/drscrewdriver/dsh-thinking-levels.git -w
143
+ # local-path alternative (no network needed):
144
+ # dsh plugin --profile web add /absolute/path/to/dsh-thinking-levels
145
+
146
+ # 2. restart dsh web (a running instance does not hot-load new bundle layers)
147
+ dsh web
148
+ ```
149
+
150
+ > Hinweis: Die dsh-Runtime nutzt pnpm 11, dessen `minimumReleaseAge`-Supply-Chain-Politik eine frisch veröffentlichte Version mit `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` blockieren kann — fügen Sie die Version zu `minimumReleaseAgeExclude` in `~/.dsh/profiles/web/pnpm-workspace.yaml` hinzu, um die Abklingzeit aufzuheben.
151
+
152
+ Manuelle `link:`-Registrierung (Alternative zu `dsh plugin add`):
153
+
154
+ ```bash
155
+ # ~/.dsh/profiles/web/package.json dependencies:
156
+ # "dsh-thinking-levels": "link:<absolute path to dsh-thinking-levels>"
157
+ # ~/.dsh/profiles/web/cordis.patch.yml:
158
+ # - insert:
159
+ # - id: thinking-levels
160
+ # name: dsh-thinking-levels
161
+ cd ~/.dsh/profiles/web && pnpm install && dsh web
162
+ ```
163
+
164
+ ## Konfiguration
165
+
166
+ Zwei Oberflächen teilen sich ein Schema:
167
+
168
+ - **Assembly** — das `config:` der Plugin-Zeile in der Profil-Composition (z. B. `cordis.yml`):
169
+ ```yaml
170
+ config:
171
+ level: auto # off | on | minimal | low | medium | high | xhigh | max | auto — the default level when the session picks nothing
172
+ allowDowngrade: true # let the scheduler drop below `high`
173
+ allowUpgrade: false # forbid the scheduler lifting to `max`
174
+ ```
175
+ - **Laufzeit** — die `.volatile()`-Konfigurationsfelder des Plugins (`enabled`, `level`, `allowDowngrade`, `allowUpgrade`): DSH 0.1.7 erzeugt das Plugins-Einstellungsformular aus dem deklarierten Schema, und bestätigte Änderungen erreichen das Plugin als Live-Konfigurationsreferenzen (`loader/volatile-update`) — sie greifen bei der nächsten Modellanfrage, ohne Neustart. (`models` bleibt ein Feld auf Konfigurierer-Ebene: bearbeiten Sie es in der Profil-Composition.)
176
+
177
+ Modellfähigkeits-Übersteuerungen (`models`, Schlüssel `provider/model`) bestätigen, was die Auto-Erkennung findet; der Konfigurierer hat das letzte Wort:
178
+
179
+ ```yaml
180
+ config:
181
+ level: auto
182
+ models:
183
+ llm-pi-ai/Qwen3.6-35B-A3B: # non-reasoning thinking model (thinking toggle + budget)
184
+ vision: false
185
+ thinking: true
186
+ efforts: false # never send reasoning_effort (stripped at request time)
187
+ llm-pi-ai/Qwen3.8-27B: # effort-capable model (rc.6-era adapter without low)
188
+ efforts: [low, high] # confirm low → advertised in the selector + passed through
189
+ ```
190
+
191
+ > Für Qwen-Thinking an/aus + Budget konfigurieren Sie stattdessen die **llm-pi-ai**-Route:
192
+ > `compat.thinkingFormat: qwen` (→ Wire-`enable_thinking` + `thinking_budget` über
193
+ > `thinkingBudgets`) oder `qwen-chat-template` (→ `chat_template_kwargs.enable_thinking`) für
194
+ > Effort-Modelle wie Qwen3.8-27B.
195
+
196
+ Standardwerte: `{ enabled: true, level: 'auto', allowDowngrade: true, allowUpgrade: false, models: {} }`.
197
+
198
+ > Semantik: Die Wahl in der Modellauswahl rangiert über der Standardstufe des Plugins. Wählen Sie `auto` (Maske) → das Plugin plant; wählen Sie einen Wire-Level → direkt angewendet; nichts wählen → der `level`-Standard des Plugins greift. `allowDowngrade` / `allowUpgrade` beschränken nur die `auto`-Planung.
199
+
200
+ ## Offizielle Compat-Oberfläche: das Short-Circuit-Tool wird eingestellt (0.7.0-beta.1)
201
+
202
+ Sobald eigene Gateways (vLLM / LM Studio / selbst gehostete OpenAI-kompatible Proxies) Thinking deklarieren, schreibt dieses Plugin die Fixes in die **offizielle `llm-pi-ai`-Compat-Oberfläche** (eingeführt in dsh ≥ **v0.1.0-rc.8**, Commit `884f7b9c41`) — [dsh-llm-openai-completions](https://github.com/drscrewdriver/dsh-llm-openai-completions) wird nicht mehr benötigt und sollte deinstalliert bleiben:
203
+
204
+ - Scannt `llm-pi-ai.providers` nach Routen, die eigene openai-completions-Gateways sind (`api: openai-completions` oder eine nicht-offizielle baseURL) **und** auf irgendeinem Modell eine `reasoningEfforts`-Tabelle deklarieren (einschließlich `modelOverrides`), und schreibt dann:
205
+ - auf Routen-Ebene `compat.supportsDeveloperRole: false` — der Systemprompt geht als `system` raus und fixiert den vLLM-/SGLang-400er `Unexpected message role`;
206
+ - auf Modellebene `compat.thinkingFormat: 'qwen-chat-template'` für Toggle-artige Thinking-Zeilen (Thinking-Tabelle ohne `supportsReasoningEffort` auf Zeilenebene) — pi-ai sendet dann `chat_template_kwargs.enable_thinking` (nackte vLLM-Server ignorieren das Top-Level-`enable_thinking` des schlichten `qwen`-Formats);
207
+ - Schritte laufen über den offiziellen Einstellungskanal (Lesen → reine Transformation → `settings.update('llm-pi-ai', …)` der ganzen Sektion), sodass dshs Schema den Schrieb **dort, wo er geschrieben wird**, validiert: ein dsh älter als rc.8 weist die Felder mit einer Log-Warnung zurück — keine stille Fehlkonfiguration; explizite Werte auf beliebiger Ebene werden nie überschrieben;
208
+ - Ausgelöst beim Plugin-Start, bei `llm/adapters-updated` und bei `llm-pi-ai`-Konfigurationsänderungen — kein manuelles Konfigurations-Editing;
209
+ - Das clientseitige Inline-`<think>`-Splitting bleibt eine **Gateway-Angelegenheit**: nacktes vLLM braucht `--reasoning-parser qwen3` (pi-ai parst nur `reasoning_content` / `reasoning` / `reasoning_text`).
210
+
211
+ # Hinweis zu Abhängigkeiten
212
+
213
+ Die Host-Hälfte hat **keine** Wertabhängigkeit von `@deepseek-ai/dsh-settings` — seit der DSH-0.1.7-Linie gibt es gar keine Einstellungsregistrierung mehr: Das Einstellungsformular wird vom Host aus dem vom Plugin deklarierten Schemastery-Schema (`.volatile()`-Felder) erzeugt, und die Client-Hälfte spricht mit dem `configForms`-Dienst, den die dsh-Runtime bereitstellt. Offizielle Pakete müssen nicht manuell ins Profil installiert werden. `dependencies` ist nur `@deepseek-ai/schemastery` (wird mit dem Paket automatisch installiert).
214
+
215
+ ## Entwicklung
216
+
217
+ ```bash
218
+ npm run lint # eslint (typescript-eslint flat config)
219
+ npm run typecheck # tsc --noEmit
220
+ npm test # vitest — 46 tests
221
+ ```
222
+
223
+ Testabdeckung: Stufenpolitik (manuelle Durchreichung inkl. der erweiterten Stufen, `on`-Clamping, Auto-Scheduler, Validierung, Simple-Tool-Grenze), der Modellfähigkeits-Schutz (`reasoningEffortSupported`, Entfernen/Durchreichen in `resolveEffortInjection`), Session-Event-Parsing (Guards, Fenster-Deckel, fehlerhafte Datensätze), das Konfigurationsschema (Defaults-Lockstep, Zurückweisung außerhalb des Bereichs, `models`-Übersteuerungen) und der offizielle Compat-Sync (Identifikation, Respekt expliziter Werte, Identitäts-Idempotenz, Schema-Gating beim Schreiben).
224
+
225
+ ## Lizenz
226
+
227
+ MIT
package/README.es.md ADDED
@@ -0,0 +1,227 @@
1
+ # dsh-thinking-levels
2
+
3
+ **Control del nivel de razonamiento (`reasoning_effort`) por ronda para [DeepSeek Harness (dsh)](https://github.com/deepseek-ai/deepseek-harness): elige `Auto` (una máscara) en el selector de modelo de la sesión y el plugin programa `low` / `high` / `max` a partir del historial reciente de llamadas a herramientas antes de enviar el effort a la API — o fija manualmente un nivel wire (el nivel que realmente se envía a la API: `off` / `on` / `minimal` / `low` / `medium` / `high` / `xhigh` / `max`). Las rondas de herramientas baratas siguen siendo baratas; el trabajo pesado nunca se queda sin razonamiento.**
4
+
5
+ - [README en español](./README.es.md)
6
+ - [English README](./README.md)
7
+ - [中文 README](./README.zh.md)
8
+ - [日本語 README](./README.ja.md)
9
+ - [한국어 README](./README.ko.md)
10
+ - [Guía de instalación en español](./INSTALL.es.md)
11
+ - [Installation guide](./INSTALL.md)
12
+ - [中文安装指南](./INSTALL.zh.md)
13
+ - [日本語インストールガイド](./INSTALL.ja.md)
14
+ - [한국어 설치 안내](./INSTALL.ko.md)
15
+ - [Changelog en español](./CHANGELOG.es.md)
16
+ - [Changelog](./CHANGELOG.md)
17
+ - [日本語 changelog](./CHANGELOG.ja.md)
18
+ - [한국어 changelog](./CHANGELOG.ko.md)
19
+
20
+ > **v0.7.0-beta.1 (2026-09-06): la vía de cortocircuito se retira.** Esta versión ya no depende de `dsh-llm-openai-completions` — las correcciones para pasarelas personalizadas viajan por la superficie compat oficial `llm-pi-ai` (requiere **dsh ≥ v0.1.2-alpha.1**); el plugin adaptador debe permanecer desinstalado. Consulta el [CHANGELOG](./CHANGELOG.md).
21
+
22
+ > **▼ Versiones de DSH admitidas**
23
+ >
24
+ > Esta versión (4.0.0) admite únicamente **DSH v0.2.0-rc.1 a < 0.2.1**.
25
+ >
26
+ > | Versión de DSH | Estado | Notas |
27
+ > | --- | --- | --- |
28
+ > | ≥ 0.2.0-rc.1 | ✅ Admitida | Esta versión (4.0.x): la misma superficie declarativa de ajustes (campos de esquema `.volatile()` renderizados por el host; lecturas/escrituras entre plugins a través del servicio `configForms`), con el gate de peer reorientado al segmento 0.2.0-rc |
29
+ > | ≥ 0.1.7-rc.1 a < 0.2.0 | ✅ Admitida | Usa la línea 3.x (3.4.3, dist-tag npm `dsh-0.1.7`): ajustes declarativos — el host renderiza el formulario Plugins a partir de los campos de esquema `.volatile()` del plugin; las lecturas/escrituras entre plugins pasan por el servicio `configForms` |
30
+ > | < 0.1.7-rc.1 | ⚠️ No admitida | DSH 0.1.7 eliminó el registro imperativo de ajustes y el asiento de tarjeta por plugin del que dependían las líneas anteriores (3.0.x y previas) — quédate en el plugin 3.0.2 para hosts 0.1.2–0.1.6. |
31
+ >
32
+ > La frontera es `0.1.7-rc.1`, donde DSH eliminó el registro imperativo de ajustes (`settings.register` / `installSettingsSection`) y el servicio cliente `settingsScope`. Desde esa frontera, los campos de configuración ajustables en tiempo de ejecución se marcan `.volatile()` en el esquema schemastery, el host genera el formulario de ajustes solo a partir de ese esquema (sin llamada de registro, sin tarjeta de ajustes en el cliente) y el plugin lee los valores en vivo en cada solicitud, guiado por `loader/volatile-update`. Las líneas 3.1.x–3.4.x apuntan a la superficie declarativa de 0.1.7; la línea 4.0.x es la misma superficie reorientada al segmento 0.2.0-rc.
33
+
34
+ > **Política de rangos de versión:** cada línea de compatibilidad fija su host estrechamente en su propio segmento. Las líneas destinadas a hosts 0.1.x siguen `>=0.1.x-rc.1 <0.1.(x+1)-0` (3.1.x: `>=0.1.7-rc.1 <0.1.8-0`; 3.0.x: `>=0.1.5-alpha.1 <0.1.6-0`; 2.0.x: `>=0.1.2-alpha.1 <0.1.3-0`; 1.0.0-beta: `>=0.1.0-rc.8 <0.1.2-alpha.1`); las líneas destinadas al segmento 0.2.x siguen `>=0.2.0-rc.1 <0.2.1-0` (4.0.x: `>=0.2.0-rc.1 <0.2.1-0`). Ninguna línea declara jamás un límite superior abierto, así un resolutor de compatibilidad nunca puede emparejar una línea de plugin con un segmento de host más reciente para el que no fue construida. Las versiones 0.4.0–0.6.0 no llevaban ninguna declaración peer de dsh y son, en la práctica, sin tipado de compatibilidad — no las instales.
35
+
36
+ > **Nota de compatibilidad:** la versión `0.6.0` incluye diccionarios y entradas de selector en japonés (`ja`) y coreano (`ko`), pero las versiones oficiales actuales de DSH solo exponen `zh` y `en` a través de `LocaleRuntime`. En un DSH de fábrica, seleccionar `ja` o `ko` falla con `locale "<id>" is not registered`. Estos idiomas funcionarán cuando el DSH oficial añada los identificadores de locale correspondientes. Los usuarios avanzados pueden mantener un fork de DSH que actualice `packages/client/locale/src/locale-settings.ts` (`LOCALE_IDS`) y `packages/client/locale/src/client/index.ts` (etiquetas de `LOCALES`), junto con los diccionarios y pruebas de núcleo correspondientes, y luego recompilar y ejecutar el DSH bifurcado. Cambiar solo este plugin no puede extender la lista global de locales de DSH.
37
+
38
+ En una cadena de herramientas de varios pasos, el modelo vuelve a pensar antes de **cada** llamada a una herramienta — y ese pensamiento domina el tiempo de reloj (una tarea de agente de 50 pasos puede gastar minutos razonando entre herramientas). `dsh-thinking-levels` se engancha al waterfall `agent/request` que dsh vuelve a resolver en cada paso (registrado con `prepend` para que el ensamblado de selección de modelo de la sesión no pueda sobrescribir su decisión) e inyecta un nivel de razonamiento en la siguiente solicitud al modelo.
39
+
40
+ ## Vista previa
41
+
42
+ Capturas de pantalla de la interfaz en vivo (dsh web):
43
+
44
+ <figure>
45
+ <img width="460" alt="Desplegable Auto del selector de modelo inyectado por el plugin: niveles Off / Low / High / Max / Auto, High seleccionado actualmente, Auto resaltado — Auto es una máscara, el plugin programa low/high/max por paso a partir del historial de herramientas." src="assets/官方模型的自动级别调整.png" />
46
+ <figcaption>El selector de modelo nativo gana <strong>Auto</strong> — elígelos y el plugin programa low/high/max por paso en lugar de un nivel wire fijo.</figcaption>
47
+ </figure>
48
+
49
+ <figure>
50
+ <img style="max-width:100%" alt="Ajustes del nivel de razonamiento (se muestra la tarjeta 3.0.x): nivel predeterminado (programación auto), interruptores habilitar / permitir-descenso / permitir-ascenso, tabla de capacidades de modelos del proveedor personalizado llm-pi-ai con el editor progresivo por modelo y presets de aplicar-a-todos (Off/High/Max estilo oficial DeepSeek, Off/Low/Medium/High genérico)." src="assets/自动思考级别配置.png" />
51
+ <figcaption>Ajustes del nivel de razonamiento, tarjeta 3.0.x (captura conservada como referencia). Desde 3.1.0 / DSH 0.1.7, el nivel y los interruptores del planificador se renderizan como un formulario declarativo generado por el host; la tarjeta personalizada y su editor de capacidades llm-pi-ai se eliminaron junto con el asiento retirado.</figcaption>
52
+ </figure>
53
+
54
+ <figure>
55
+ <img style="max-width:100%" alt="Editor de capacidades por modelo para un modelo openai-completions personalizado (local-35b / Qwen3.6-35B-A3B), tal como se enviaba en la tarjeta de ajustes 3.0.x: modelo de razonamiento y vision activados, soporte de think effort desactivado, formato de razonamiento qwen-chat-template (autocompletado); sin interruptor de takeover — la bandera compat oficial vive en la fila del proveedor; presets de límite de ventana de contexto 64K/128K/256K/400K/512K/1M con entrada personalizada." src="assets/自定义模型的思考接管-短路-上下文窗口限制.png" />
56
+ <figcaption>Tarjeta de capacidades por modelo, 3.0.x (captura conservada como referencia). Desde 3.1.0 / DSH 0.1.7, el editor de capacidades ya no se envía; edita las capacidades de los modelos `llm-pi-ai` mediante los ajustes oficiales de modelos.</figcaption>
57
+ </figure>
58
+
59
+ ## Niveles
60
+
61
+ | Nivel | Significado | Dónde |
62
+ |---|---|---|
63
+ | `off` | razonamiento desactivado (solo manual — nunca se elige automáticamente) | selector de modelo / nivel predeterminado |
64
+ | `on` | razonamiento activado (solo modelos de tipo toggle): envía `enable_thinking`, nunca un think effort | selector de modelo / nivel predeterminado |
65
+ | `minimal` | el menor esfuerzo (tareas muy ligeras) | selector de modelo / nivel predeterminado |
66
+ | `low` | elección manual para tareas de chat simples (las rondas baratas siguen siendo baratas) | selector de modelo / nivel predeterminado |
67
+ | `medium` | esfuerzo medio | selector de modelo / nivel predeterminado |
68
+ | `high` | el effort oficial predeterminado | selector de modelo / nivel predeterminado |
69
+ | `xhigh` | esfuerzo extra alto | selector de modelo / nivel predeterminado |
70
+ | `max` | trabajo pesado | selector de modelo / nivel predeterminado |
71
+ | `auto` | **máscara**: programa por paso a partir del historial reciente de llamadas a herramientas, resuelto a un nivel wire antes del envío | selector de modelo (inyectado por el plugin) / nivel predeterminado |
72
+
73
+ Hechos sobre los niveles wire (verificados contra la documentación oficial de DeepSeek y el adaptador `llm-deepseek` de dsh): en deepseek-v4-flash / v4-pro, `low` mapea 1:1, mientras que `medium` / `xhigh` colapsan sobre `high`. El adaptador acepta solo `off | low | high | max` y rechaza cualquier otra cosa con `UNSUPPORTED_REASONING_EFFORT` — `auto` es la capa de máscara del plugin, nunca enviada tal cual a la API, siempre resuelta a un nivel wire concreto antes de la inyección. `on` **no** es un nivel de effort: solo lo anuncian los modelos de tipo toggle (estilo Qwen3.6), y únicamente pone `enable_thinking` a true — no se envía ningún `reasoning_effort`; un modelo capaz de effort nunca anuncia `on`, así que una elección manual de `on` en uno se elimina.
74
+
75
+ ## Mapeo wire personalizado
76
+
77
+ Para modelos `llm-pi-ai` declarados a mano, mapea cada nivel al valor exacto que espera tu pasarela (tomado de dsh-thinking-effort): marca un nivel e introduce su valor wire, p. ej. `high` → `ultra`. El mapeo se guarda como la tabla `reasoningEfforts` del modelo en la configuración de `llm-pi-ai`, de modo que la selección `High` del Composer envía `ultra` a la pasarela. Dejar `off` vacío significa "no enviar".
78
+
79
+ - Preset oficial: `Off / High / Max` (estilo oficial DeepSeek)
80
+ - Preset genérico: `Off / Low / Medium / High`
81
+
82
+ > El editor visual de este mapeo viajaba en la tarjeta de ajustes del plugin, eliminada por la migración de DSH 0.1.7 (el asiento ya no existe). Edita la tabla `reasoningEfforts` mediante la superficie oficial de ajustes de modelos — al fin y al cabo, la detección y la inyección del host leen esa configuración en vivo.
83
+
84
+ ## Presets de ventana de contexto
85
+
86
+ El control rápido de la fila de herramientas del Composer (junto al selector de modelo/effort) edita un **límite de ventana de contexto**: paradas predefinidas `64K / 128K / 256K / 400K / 512K / 1M`, una entrada de entero personalizado y un botón de borrado. El valor se escribe en la entrada `contextWindow` del modelo `llm-pi-ai` (entero `2000`–`1000000`) — o en la entrada `llm-deepseek` para los modelos DeepSeek oficiales.
87
+
88
+ Río arriba, el harness lo consume a través de `resolveModelInfo(...).context.contextWindow` para los umbrales de compactación, la detección de desbordamiento de contexto y las proyecciones de presión de contexto. Como `llm-pi-ai` vuelve a leer la configuración en vivo en cada resolución y la sincronización compat no bloquea el descubrimiento de modelos, un cambio de ajustes surte efecto en la siguiente solicitud sin reinicio.
89
+
90
+ La configuración del plugin también acepta `models['provider/model'].contextWindow` como declaración validada (entero `2000`–`1000000`) en la superficie de composición/configuración.
91
+
92
+ ## Protección consciente del modelo (v0.5.0)
93
+
94
+ El plugin nunca envía un `reasoning_effort` a un modelo que no lo anuncia. Las rutas
95
+ openai-completions personalizadas (p. ej., un Qwen3.6 local sin `reasoningEfforts`) se clasifican
96
+ como no-razonadoras vía `ctx.llm.resolveModelInfo`, y cualquier effort — heredado o programado —
97
+ se **elimina** en lugar de enviarse, de modo que el rechazo por solicitud `UNSUPPORTED_REASONING_EFFORT`
98
+ de dsh no puede dispararse. Los campos no admitidos nunca se pasan a una API que no puede
99
+ recibirlos.
100
+
101
+ Comportamiento por versión:
102
+
103
+ | versión de dsh | manejo de `low` |
104
+ |---|---|
105
+ | rc.6 (antigua) | no nativo: el selector solo lo muestra cuando un override de `models` confirmado por el configurador lo nombra; el nivel se anuncia entonces (selector + validación de solicitud) y se pasa tal cual |
106
+ | rc.7+ (nueva) | nativo: el plugin ni lo reescribe ni lo reinyecta; una elección manual de `low` pasa sin cambios |
107
+
108
+ El planificador auto aún puede elegir `low` para los modelos que lo admiten — es la protección de capacidades de arriba la que lo mantiene alejado de los modelos que no pueden recibirlo.
109
+
110
+ ## Auto del selector de modelo
111
+
112
+ El selector de modelo de la sesión (junto al modelo) ahora ofrece **Auto** después de los niveles wire (inyectado en los metadatos del directorio de modelos por el plugin):
113
+
114
+ | Elección en el selector de modelo | Comportamiento |
115
+ |---|---|
116
+ | **Auto** | el plugin programa mediante historial de herramientas + los interruptores de ascenso/descenso y resuelve a `low` / `high` / `max` antes del envío |
117
+ | `off` / `on` / `minimal` / `low` / `medium` / `high` / `xhigh` / `max` | **gana la elección manual** — el plugin no interviene (`on` permanece `on` en modelos de tipo toggle, nunca elevado a un effort; los modelos capaces de effort lo eliminan) |
118
+ | sin elegir | se aplica el nivel predeterminado del plugin (abajo) |
119
+
120
+ ## Planificador auto
121
+
122
+ El eje es `high` (el oficial predeterminado). `auto` programa entre `low` / `high` / `max`; nunca elige `off`.
123
+
124
+ | Llamadas recientes a herramientas | Nivel |
125
+ |---|---|
126
+ | ninguna (prompt fresco, chat puro) | `low` |
127
+ | ≥75 % herramientas simples, argumentos pequeños, descensos permitidos | `low` |
128
+ | herramientas mixtas / pesadas | `high` |
129
+ | cargas muy pesadas, ascensos permitidos | `max` |
130
+
131
+ La política de programación comparte la misma fuente que [dsh-tool-turbo](https://github.com/drscrewdriver/dsh-tool-turbo) (la misma lista blanca de herramientas simples / los mismos umbrales de carga / la misma regla del 75 %).
132
+
133
+ ## Instalación
134
+
135
+ Consulta [INSTALL.md](./INSTALL.es.md) para la guía completa de la CLI oficial (descubrimiento del perfil, actualización, migración, verificación, resolución de problemas). Inicio rápido:
136
+
137
+ ```bash
138
+ # 1. install the plugin into a profile from npm (web shown; any profile works)
139
+ # (the web profile is a pnpm workspace root, so -w is required)
140
+ dsh plugin --profile web add dsh-thinking-levels -w
141
+ # GitHub alternative:
142
+ # dsh plugin --profile web add https://github.com/drscrewdriver/dsh-thinking-levels.git -w
143
+ # local-path alternative (no network needed):
144
+ # dsh plugin --profile web add /absolute/path/to/dsh-thinking-levels
145
+
146
+ # 2. restart dsh web (a running instance does not hot-load new bundle layers)
147
+ dsh web
148
+ ```
149
+
150
+ > Nota: el entorno de ejecución de dsh usa pnpm 11, cuya política de cadena de suministro `minimumReleaseAge` puede bloquear una versión recién publicada con `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` — añade la versión a `minimumReleaseAgeExclude` en `~/.dsh/profiles/web/pnpm-workspace.yaml` para levantar el periodo de enfriamiento.
151
+
152
+ Registro manual con `link:` (alternativa a `dsh plugin add`):
153
+
154
+ ```bash
155
+ # ~/.dsh/profiles/web/package.json dependencies:
156
+ # "dsh-thinking-levels": "link:<absolute path to dsh-thinking-levels>"
157
+ # ~/.dsh/profiles/web/cordis.patch.yml:
158
+ # - insert:
159
+ # - id: thinking-levels
160
+ # name: dsh-thinking-levels
161
+ cd ~/.dsh/profiles/web && pnpm install && dsh web
162
+ ```
163
+
164
+ ## Configuración
165
+
166
+ Dos superficies comparten un mismo esquema:
167
+
168
+ - **Ensamblado** — el `config:` de la fila del plugin en la composición del perfil (p. ej. `cordis.yml`):
169
+ ```yaml
170
+ config:
171
+ level: auto # off | on | minimal | low | medium | high | xhigh | max | auto — the default level when the session picks nothing
172
+ allowDowngrade: true # let the scheduler drop below `high`
173
+ allowUpgrade: false # forbid the scheduler lifting to `max`
174
+ ```
175
+ - **Tiempo de ejecución** — los campos de configuración `.volatile()` del plugin (`enabled`, `level`, `allowDowngrade`, `allowUpgrade`): DSH 0.1.7 genera el formulario de ajustes Plugins a partir del esquema declarado, y los cambios confirmados llegan al plugin como referencias de configuración en vivo (`loader/volatile-update`) — se aplican a la siguiente solicitud al modelo, sin reinicio. (`models` sigue siendo un campo a nivel de configurador: edítalo en la composición del perfil.)
176
+
177
+ Los overrides de capacidades por modelo (`models`, clave `provider/model`) confirman lo que la detección automática encuentra; la última palabra la tiene el configurador:
178
+
179
+ ```yaml
180
+ config:
181
+ level: auto
182
+ models:
183
+ llm-pi-ai/Qwen3.6-35B-A3B: # non-reasoning thinking model (thinking toggle + budget)
184
+ vision: false
185
+ thinking: true
186
+ efforts: false # never send reasoning_effort (stripped at request time)
187
+ llm-pi-ai/Qwen3.8-27B: # effort-capable model (rc.6-era adapter without low)
188
+ efforts: [low, high] # confirm low → advertised in the selector + passed through
189
+ ```
190
+
191
+ > Para el interruptor de razonamiento + presupuesto de Qwen, configura en su lugar la ruta **llm-pi-ai**:
192
+ > `compat.thinkingFormat: qwen` (→ `enable_thinking` + `thinking_budget` wire vía
193
+ > `thinkingBudgets`), o `qwen-chat-template` (→ `chat_template_kwargs.enable_thinking`) para
194
+ > modelos con effort como Qwen3.8-27B.
195
+
196
+ Valores predeterminados: `{ enabled: true, level: 'auto', allowDowngrade: true, allowUpgrade: false, models: {} }`.
197
+
198
+ > Semántica: la elección del selector de modelo prevalece sobre el nivel predeterminado del plugin. Elige `auto` (máscara) → el plugin programa; elige un nivel wire → se aplica directamente; no elijas nada → se usa el `level` predeterminado del plugin. `allowDowngrade` / `allowUpgrade` solo restringen la programación `auto`.
199
+
200
+ ## Superficie compat oficial: la herramienta de cortocircuito se retira (0.7.0-beta.1)
201
+
202
+ Cuando pasarelas personalizadas (vLLM / LM Studio / proxies compatibles con OpenAI autoalojados) declaran razonamiento, este plugin escribe las correcciones en la **superficie compat oficial `llm-pi-ai`** (introducida en dsh ≥ **v0.1.0-rc.8**, commit `884f7b9c41`) — [dsh-llm-openai-completions](https://github.com/drscrewdriver/dsh-llm-openai-completions) ya no es necesario y debe permanecer desinstalado:
203
+
204
+ - Escanea `llm-pi-ai.providers` en busca de rutas que sean pasarelas openai-completions personalizadas (`api: openai-completions` o baseURL no oficial) **y** declaren una tabla `reasoningEfforts` en cualquier modelo (incluidos `modelOverrides`), y luego escribe:
205
+ - a nivel de ruta `compat.supportsDeveloperRole: false` — el prompt del sistema sale como `system`, corrigiendo el error 400 `Unexpected message role` de vLLM / SGLang;
206
+ - a nivel de modelo `compat.thinkingFormat: 'qwen-chat-template'` en las filas de razonamiento tipo toggle (tabla de razonamiento sin `supportsReasoningEffort` a nivel de fila) — pi-ai envía entonces `chat_template_kwargs.enable_thinking` (los servidores vLLM desnudos ignoran el `enable_thinking` de primer nivel del formato `qwen` simple);
207
+ - Las escrituras pasan por el canal oficial de ajustes (lectura → transformación pura → `settings.update('llm-pi-ai', …)` de la sección completa), de modo que el esquema de dsh valida la escritura **donde se escribe**: un dsh anterior a rc.8 rechaza los campos con un aviso en el log — sin mala configuración silenciosa; los valores explícitos de cualquier capa nunca se sobrescriben;
208
+ - Se dispara al arrancar el plugin, en `llm/adapters-updated` y en los cambios de configuración de `llm-pi-ai` — sin edición manual de la configuración;
209
+ - El corte en línea de los `<think>` en el lado de la respuesta sigue siendo un **asunto de la pasarela**: un vLLM desnudo necesita `--reasoning-parser qwen3` (pi-ai solo parsea `reasoning_content` / `reasoning` / `reasoning_text`).
210
+
211
+ # Nota sobre dependencias
212
+
213
+ La mitad del host **no** tiene dependencia de valor de `@deepseek-ai/dsh-settings` — desde la línea DSH 0.1.7 no existe ningún registro de ajustes: el formulario de ajustes lo genera el host a partir del esquema schemastery declarado por el plugin (campos `.volatile()`), y la mitad cliente dialoga con el servicio `configForms` que proporciona el runtime de dsh. No hace falta instalar los paquetes oficiales en el perfil manualmente. `dependencies` es solo `@deepseek-ai/schemastery` (instalado automáticamente con el paquete).
214
+
215
+ ## Desarrollo
216
+
217
+ ```bash
218
+ npm run lint # eslint (typescript-eslint flat config)
219
+ npm run typecheck # tsc --noEmit
220
+ npm test # vitest — 46 tests
221
+ ```
222
+
223
+ Cobertura de pruebas: política de niveles (paso manual, incluidos los niveles extendidos, acotado de `on`, planificador auto, validación, frontera de herramientas simples), la protección de capacidades del modelo (`reasoningEffortSupported`, eliminación/paso de `resolveEffortInjection`), el parseo de eventos de sesión (guardas, tope de ventana, registros malformados), el esquema de configuración (sincronía de valores por defecto, rechazo fuera de rango, overrides de `models`) y la sincronización compat oficial (identificación, respeto de valores explícitos, idempotencia de identidad, validación de esquema en la escritura).
224
+
225
+ ## Licencia
226
+
227
+ MIT