dsh-thinking-levels 4.4.14 → 4.4.16
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 +5 -1
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.it.md +1 -1
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +14 -2
- package/README.ru.md +1 -1
- package/README.zh.md +2 -2
- package/dsh.plugin.json +16 -16
- package/lib/index.js +34 -0
- package/lib/tui-command.d.ts +39 -0
- package/lib/tui-command.js +117 -0
- package/package.json +152 -152
package/CHANGELOG.md
CHANGED
package/README.de.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> **▼ Unterstützte DSH-Versionen**
|
|
23
23
|
>
|
|
24
|
-
> Diese Version
|
|
24
|
+
> Diese Version deklariert die DSH-Hosts als **eine begrenzte Spanne** — `>=0.1.0-rc.8 <0.3.0-0` — jeder rc einzeln aufgelistet, keine Bereiche oder Carets; die stabile 0.2.1 ist erst mit ihrem Erscheinen deklariert.
|
|
25
25
|
>
|
|
26
26
|
> | DSH-Version | Status | Hinweise |
|
|
27
27
|
> | --- | --- | --- |
|
package/README.es.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> **▼ Versiones de DSH admitidas**
|
|
23
23
|
>
|
|
24
|
-
> Esta versión
|
|
24
|
+
> Esta versión declara los hosts de DSH como **un rango acotado** — `>=0.1.0-rc.8 <0.3.0-0` — cada rc listado individualmente, sin rangos ni carets; la 0.2.1 estable no se declara hasta su publicación.
|
|
25
25
|
>
|
|
26
26
|
> | Versión de DSH | Estado | Notas |
|
|
27
27
|
> | --- | --- | --- |
|
package/README.fr.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> **▼ Prise en charge des versions de DSH**
|
|
23
23
|
>
|
|
24
|
-
> Cette version
|
|
24
|
+
> Cette version déclare les hôtes DSH comme **une plage bornée** — `>=0.1.0-rc.8 <0.3.0-0` — chaque rc listé individuellement, sans plages ni carets ; la 0.2.1 stable n'est pas déclarée avant sa sortie.
|
|
25
25
|
>
|
|
26
26
|
> | Version de DSH | Statut | Notes |
|
|
27
27
|
> | --- | --- | --- |
|
package/README.it.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> **▼ Versioni di DSH supportate**
|
|
23
23
|
>
|
|
24
|
-
> Questa versione
|
|
24
|
+
> Questa versione dichiara gli host DSH come **un intervallo delimitato** — `>=0.1.0-rc.8 <0.3.0-0` — ogni rc elencato singolarmente, senza range o caret; la 0.2.1 stabile non è dichiarata finché non esce.
|
|
25
25
|
>
|
|
26
26
|
> | Versione DSH | Stato | Note |
|
|
27
27
|
> | --- | --- | --- |
|
package/README.ja.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
> **互換性について:** `0.6.0` には日本語(`ja`)と韓国語(`ko`)の辞書と選択項目が含まれていますが、現在の公式 DSH は `LocaleRuntime` 経由で `zh` と `en` のみを提供しています。純正 DSH で `ja` または `ko` を選択すると `locale "<id>" is not registered` で失敗します。公式 DSH が対応 locale ID を追加するまで利用できません。上級ユーザーは DSH フォークを保守し、`packages/client/locale/src/locale-settings.ts` の `LOCALE_IDS` と `packages/client/locale/src/client/index.ts` の `LOCALES` ラベルを更新し、コア辞書とテストを追加して再ビルド・実行してください。このプラグインだけでは DSH のグローバル locale 一覧を拡張できません。
|
|
35
35
|
|
|
36
|
-
> **バージョン互換:**
|
|
36
|
+
> **バージョン互換:** 本リリースは **DSH ホストを単一の有界レンジ**で宣言:`>=0.1.0-rc.8 <0.3.0-0`——rc ごとに単列、区間/caret 不使用。0.1.7-rc.1 の境界以降、DSH は命令的な設定登録(`settings.register` / `installSettingsSection`)とクライアントの `settingsScope` サービスおよびプラグイン別カードスロットを削除し、実行時に変更できる設定フィールドは schemastery スキーマで `.volatile()` 付きとし、設定フォームはホストがスキーマから自動生成(登録呼び出しもクライアント設定カードも不要)、プラグインは `loader/volatile-update` に従ってリクエストごとに最新値を読みます——4.0.x は 0.2.0-rc セグメントの同一宣言的表面を対象とします。0.1.7-rc.1〜<0.2.0 のホストでは 3.x ライン(3.4.3、npm dist-tag `dsh-0.1.7`)を、0.1.2–0.1.6 ホストではプラグイン 3.0.2 を使用してください。
|
|
37
37
|
|
|
38
38
|
> **バージョン範囲ポリシー:** 各互換ラインはホストを自ラインのセグメントに厳密に固定します。0.1.x ホスト向けのラインは `>=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`)、0.2.x セグメント向けのラインは `>=0.2.0-rc.1 <0.2.1-0`(4.0.x:`>=0.2.0-rc.1 <0.2.1-0`)に従います。どのラインも開放的な上限を宣言しません。互換性レゾルバが未対応の新ホストセグメントにプラグインラインを誤マッチすることはありません。0.4.0–0.6.0 は dsh peer 宣言を一切持たないためインストールしないでください。
|
|
39
39
|
|
package/README.ko.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
> **호환성 참고:** `0.6.0`에는 일본어(`ja`)와 한국어(`ko`) 사전 및 선택 항목이 포함되어 있지만, 현재 공식 DSH는 `LocaleRuntime`을 통해 `zh`와 `en`만 제공합니다. 순정 DSH에서 `ja` 또는 `ko`를 선택하면 `locale "<id>" is not registered` 오류가 발생합니다. 공식 DSH가 해당 locale ID를 추가할 때까지 사용할 수 없습니다. 고급 사용자는 DSH 포크를 유지하면서 `packages/client/locale/src/locale-settings.ts`의 `LOCALE_IDS`와 `packages/client/locale/src/client/index.ts`의 `LOCALES` 라벨을 업데이트하고 핵심 사전과 테스트를 추가한 뒤 다시 빌드하여 실행할 수 있습니다. 이 플러그인만으로는 DSH의 전역 locale 목록을 확장할 수 없습니다.
|
|
35
35
|
|
|
36
|
-
> **버전 호환:** 본
|
|
36
|
+
> **버전 호환:** 본 릴리스는 **DSH 호스트를 단일 유계 범위**로 선언: `>=0.1.0-rc.8 <0.3.0-0` — rc별 단독 열거, 구간/caret 미사용. 0.1.7-rc.1 경계 이후 DSH는 명령형 설정 등록(`settings.register` / `installSettingsSection`)과 클라이언트 `settingsScope` 서비스 및 플러그인별 카드 슬롯을 제거했고, 런타임 조정 가능한 설정 필드는 schemastery 스키마에 `.volatile()`로 표시되며, 설정 폼은 호스트가 스키마에서 자동 생성(등록 호출도 클라이언트 설정 카드도 없음)하고, 플러그인은 `loader/volatile-update`에 따라 요청마다 최신 값을 읽습니다——4.0.x은 0.2.0-rc 세그먼트의 동일한 선언적 표면을 대상으로 합니다. 0.1.7-rc.1~<0.2.0 호스트에서는 3.x 라인(3.4.3, npm dist-tag `dsh-0.1.7`)을, 0.1.2–0.1.6 호스트에서는 플러그인 3.0.2을 사용하세요.
|
|
37
37
|
|
|
38
38
|
> **버전 범위 정책:** 각 호환 라인은 호스트를 자기 라인의 세그먼트에 엄격히 고정합니다. 0.1.x 호스트 대상 라인은 `>=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`)을, 0.2.x 세그먼트 대상 라인은 `>=0.2.0-rc.1 <0.2.1-0`(4.0.x: `>=0.2.0-rc.1 <0.2.1-0`)을 따릅니다. 어떤 라인도 열린 상한을 선언하지 않으므로, 호환성 리졸버가 플러그인 라인을 지원하지 않는 더 새 호스트 세그먼트에 잘못 매칭할 일이 없습니다. 0.4.0–0.6.0은 dsh peer 선언이 전혀 없으므로 설치하지 마세요.
|
|
39
39
|
|
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
> **▼ DSH version support**
|
|
35
35
|
>
|
|
36
|
-
> This release
|
|
36
|
+
> This release declares its DSH hosts as **one bounded range** — `>=0.1.0-rc.8 <0.3.0-0` — written identically at every write point (`engines.dsh` in `package.json`, `dsh.plugin.json`, and every `@deepseek-ai/dsh-*` peer). The upper bound carries the `-0` suffix on purpose: under `includePrerelease` a bare `<0.3.0` would still admit `0.3.0-rc.*`, i.e. silently claim the next, unverified host line. Any 0.2.x rc inside the window installs without a plugin republish.
|
|
37
37
|
>
|
|
38
38
|
> | DSH version | Status | Notes |
|
|
39
39
|
> | --- | --- | --- |
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
>
|
|
44
44
|
> The boundary is `0.1.7-rc.1`, where DSH removed the imperative settings registration (`settings.register` / `installSettingsSection`) and the client `settingsScope` service. Since that boundary the runtime-adjustable config fields are marked `.volatile()` in the schemastery schema, the host generates the settings form from that schema alone (no registration call, no client settings card), and the plugin reads the live values per request, driven by `loader/volatile-update`. The 3.1.x–3.4.x lines target the 0.1.7 declarative surface; the 4.0.x line is the same surface retargeted to the 0.2.0-rc segment.
|
|
45
45
|
|
|
46
|
-
> **Version-range policy:** every compatibility line pins its host segment tightly. Lines targeting 0.1.x hosts follow `>=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`); lines targeting the 0.2.x segment follow `>=0.2.0-rc.1 <0.2.1-0` (4.0.x: `>=0.2.0-rc.1 <0.2.1-0`). No line ever declares an open upper bound, so a compatibility resolver can never match a plugin line against a newer host segment it was not built for. 0.4.0–0.6.0 carried no dsh peer declarations at all and are effectively compatibility-untyped — do not install them. Since
|
|
46
|
+
> **Version-range policy:** every compatibility line pins its host segment tightly. Lines targeting 0.1.x hosts follow `>=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`); lines targeting the 0.2.x segment follow `>=0.2.0-rc.1 <0.2.1-0` (4.0.x: `>=0.2.0-rc.1 <0.2.1-0`). No line ever declares an open upper bound, so a compatibility resolver can never match a plugin line against a newer host segment it was not built for. 0.4.0–0.6.0 carried no dsh peer declarations at all and are effectively compatibility-untyped — do not install them. **Since 4.4.x the 4.x line declares a single bounded range `>=0.1.0-rc.8 <0.3.0-0`** (engines and every dsh peer identical) instead of naming rcs one by one — the range formulas above describe the historical per-segment lines.
|
|
47
47
|
|
|
48
48
|
> **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.
|
|
49
49
|
|
|
@@ -309,3 +309,15 @@ Semantics note: a pricing or policy change only affects samples booked after the
|
|
|
309
309
|
## License
|
|
310
310
|
|
|
311
311
|
MIT
|
|
312
|
+
|
|
313
|
+
## TUI 终端面(dsh-tui)
|
|
314
|
+
|
|
315
|
+
dsh-tui 不加载插件的 client 半边(面板/卡片/设置页),也调不到插件自有 RPC;工具调用只显示一行摘要。人可读、人可操作的面只剩宿主斜杠命令。输出约定:单行 ≤100 字符、总行 ≤40、无 ANSI、两空格对齐;写操作默认 dry、加 `--yes` 才执行;`--json` 输出单行 JSON。
|
|
316
|
+
|
|
317
|
+
| 命令 | 作用 |
|
|
318
|
+
|---|---|
|
|
319
|
+
| `/think` | 当前档位、source、auto/降升开关、takeover |
|
|
320
|
+
| `/think <level>` | 切换档位(默认 dry,`--yes` 落盘) |
|
|
321
|
+
| `/think auto` | 每步自动调度 |
|
|
322
|
+
|
|
323
|
+
命令由插件自己在宿主侧注册(`ctx.inject(['commands'], …)`):命令服务缺席的老宿主线上不激活、不报错。
|
package/README.ru.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> **▼ Поддерживаемые версии DSH**
|
|
23
23
|
>
|
|
24
|
-
> Этот релиз
|
|
24
|
+
> Этот релиз объявляет хосты DSH как **один ограниченный диапазон** — `>=0.1.0-rc.8 <0.3.0-0` — каждый rc перечислен отдельно, без диапазонов и carets; стабильная 0.2.1 не объявляется до её выхода.
|
|
25
25
|
>
|
|
26
26
|
> | Версия DSH | Статус | Примечания |
|
|
27
27
|
> | --- | --- | --- |
|
package/README.zh.md
CHANGED
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
|
|
34
34
|
> **兼容性说明:** `0.6.0` 已包含日本語(`ja`)和한국어(`ko`)字典及选择项,但当前官方 DSH 只通过 `LocaleRuntime` 提供 `zh` 和 `en`。在原版 DSH 中选择 `ja` 或 `ko` 会失败,并提示 `locale "<id>" is not registered`。需要等待官方 DSH 增加对应 locale ID 后才能正常使用。高级用户可以维护 DSH fork,在 `packages/client/locale/src/locale-settings.ts` 更新 `LOCALE_IDS`,在 `packages/client/locale/src/client/index.ts` 更新 `LOCALES` 标签,并补齐核心字典和测试,然后重新构建并运行 fork 版本。仅修改本插件无法扩展 DSH 的全局 locale 列表。
|
|
35
35
|
|
|
36
|
-
> **版本兼容:**
|
|
36
|
+
> **版本兼容:** 本版本把 DSH 宿主声明为**一条有界区间** —— `>=0.1.0-rc.8 <0.3.0-0`,并在每处写点写同一个串(`package.json` 的 `engines.dsh`、`dsh.plugin.json`、以及每个 `@deepseek-ai/dsh-*` peer)。上限带 `-0` 是有意为之:在 `includePrerelease` 下裸 `<0.3.0` 仍会放进 `0.3.0-rc.*`,等于悄悄声明支持下一条未验证宿主线。区间内的 0.2.x 任意 rc 无需重发插件即可安装。自 0.1.7-rc.1 边界起,DSH 移除了命令式设置注册(`settings.register` / `installSettingsSection`)与客户端 `settingsScope` 服务及每插件卡片槽位,运行时调整的配置字段在 schemastery schema 中标 `.volatile()`,设置表单由宿主按 schema 自动生成(无注册调用、无客户端设置卡片),插件按请求读取实时值(由 `loader/volatile-update` 驱动)——4.0.x 面向 0.2.0-rc 区段的同一声明式表面;0.1.7-rc.1 至 <0.2.0 的宿主请使用 3.x 线(3.4.3,npm dist-tag `dsh-0.1.7`),0.1.2–0.1.6 宿主请继续使用插件 3.0.2。
|
|
37
37
|
|
|
38
|
-
> **版本范围约定:** 每条兼容线都把宿主钉在本线自己的区段内。面向 0.1.x 宿主的线遵循 `>=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`);面向 0.2.x 区段的线遵循 `>=0.2.0-rc.1 <0.2.1-0`(4.0.x:`>=0.2.0-rc.1 <0.2.1-0`)。任何线都不声明开放的上限,兼容性解析器因此绝不会把插件线匹配到它并未适配的更新宿主区段。0.4.0–0.6.0 完全没有声明 dsh peer
|
|
38
|
+
> **版本范围约定:** 每条兼容线都把宿主钉在本线自己的区段内。面向 0.1.x 宿主的线遵循 `>=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`);面向 0.2.x 区段的线遵循 `>=0.2.0-rc.1 <0.2.1-0`(4.0.x:`>=0.2.0-rc.1 <0.2.1-0`)。任何线都不声明开放的上限,兼容性解析器因此绝不会把插件线匹配到它并未适配的更新宿主区段。0.4.0–0.6.0 完全没有声明 dsh peer 依赖,属于无兼容性标注版本——不要安装。**自 4.4.x 起,4.x 线改用单一有界区间 `>=0.1.0-rc.8 <0.3.0-0`**(engines 与每个 dsh peer 同串),不再逐 rc 点名;上面的区间公式仅描述历史上的分区段线。
|
|
39
39
|
|
|
40
40
|
在多步工具链任务中,模型在**每一次工具调用前**都会重新思考——而这个思考过程占据了绝大部分墙钟时间(一个 50 步的 agent 任务可能在工具之间花费数分钟思考)。`dsh-thinking-levels` 接入 dsh 每一步都会重新解析的 `agent/request` waterfall(以 `prepend` 置于最外层,避免被会话模型选择覆盖),向下一次模型请求注入思考档位。
|
|
41
41
|
|
package/dsh.plugin.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "dsh-external/dsh-thinking-levels",
|
|
3
|
-
"version": "4.4.
|
|
4
|
-
"main": "./lib/index.js",
|
|
5
|
-
"description": "thinking-level (reasoning_effort) control — auto-adjust per tool round, with optional manual lock and per-tool timing telemetry.",
|
|
6
|
-
"engines": {
|
|
7
|
-
"dsh": ">=0.1.
|
|
8
|
-
},
|
|
9
|
-
"contributes": {
|
|
10
|
-
"tools": [],
|
|
11
|
-
"skills": []
|
|
12
|
-
},
|
|
13
|
-
"client": {
|
|
14
|
-
"main": "./lib/client.js"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "dsh-external/dsh-thinking-levels",
|
|
3
|
+
"version": "4.4.16",
|
|
4
|
+
"main": "./lib/index.js",
|
|
5
|
+
"description": "thinking-level (reasoning_effort) control — auto-adjust per tool round, with optional manual lock and per-tool timing telemetry.",
|
|
6
|
+
"engines": {
|
|
7
|
+
"dsh": ">=0.1.0-rc.8 <0.3.0-0"
|
|
8
|
+
},
|
|
9
|
+
"contributes": {
|
|
10
|
+
"tools": [],
|
|
11
|
+
"skills": []
|
|
12
|
+
},
|
|
13
|
+
"client": {
|
|
14
|
+
"main": "./lib/client.js"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { effortOfSelection, planStrictStep, } from "./strict-step-schedule.js";
|
|
|
7
7
|
import { CONTEXT_WINDOW_MAX, CONTEXT_WINDOW_MIN } from "./context-window.js";
|
|
8
8
|
import { PI_AI_NAMESPACE, TAKEOVER_NAMESPACE_CANDIDATES, takeoverPatch, takeoverRoutesOf, withOfficialCompatFixes, } from "./takeover-sync.js";
|
|
9
9
|
import { describeSettings, readSection, readSectionOf, resolveNamespaceOf } from "./settings-read.js";
|
|
10
|
+
import { registerThinkCommand } from "./tui-command.js";
|
|
10
11
|
const effortId = z.union(['off', 'on', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max']);
|
|
11
12
|
/** Per-model capability overrides — shared verbatim by both schema faces
|
|
12
13
|
* below (the two must never drift). */
|
|
@@ -396,6 +397,39 @@ export function apply(ctx, config = DEFAULT_CONFIG) {
|
|
|
396
397
|
}
|
|
397
398
|
});
|
|
398
399
|
const current = () => resolveLiveConfig(source());
|
|
400
|
+
// ── dsh-tui 终端面:`/think` ───────────────────────────────────────────
|
|
401
|
+
// TUI 不加载 slider/tab/设置卡,HUD 也没有 effort —— 档位在终端里既看不见也改不了。
|
|
402
|
+
// 命令层只读 live config;写走 settings.update(带 revision 围栏)。
|
|
403
|
+
const thinkDeps = {
|
|
404
|
+
state: () => {
|
|
405
|
+
const live = current();
|
|
406
|
+
return {
|
|
407
|
+
enabled: live.enabled,
|
|
408
|
+
level: live.level,
|
|
409
|
+
allowDowngrade: live.allowDowngrade,
|
|
410
|
+
allowUpgrade: live.allowUpgrade,
|
|
411
|
+
takeover: live.takeover,
|
|
412
|
+
source: source() === config ? 'composition-entry' : 'registered-section',
|
|
413
|
+
};
|
|
414
|
+
},
|
|
415
|
+
write: async (level) => {
|
|
416
|
+
const settings = ctx.get?.('settings');
|
|
417
|
+
if (typeof settings?.update !== 'function') {
|
|
418
|
+
return { ok: false, reason: 'settings 服务不可用(≤0.1.6 老线请在设置页改)' };
|
|
419
|
+
}
|
|
420
|
+
// 节名用自己的 composition id;宿主改名时回落到「value 里带 level 的节」。
|
|
421
|
+
const descriptors = describeSettings(ctx);
|
|
422
|
+
const hit = descriptors?.find((entry) => entry.ns === '@deepseek-ai/dsh-thinking-levels')
|
|
423
|
+
?? descriptors?.find((entry) => typeof entry.value?.level === 'string');
|
|
424
|
+
if (hit === undefined)
|
|
425
|
+
return { ok: false, reason: '找不到本插件的设置节(未进入 profile 文档)' };
|
|
426
|
+
await settings.update(hit.ns, { level }, hit.revision);
|
|
427
|
+
return { ok: true };
|
|
428
|
+
},
|
|
429
|
+
};
|
|
430
|
+
ctx.inject?.(['commands'], (scope) => {
|
|
431
|
+
registerThinkCommand(scope, thinkDeps);
|
|
432
|
+
});
|
|
399
433
|
ctx.inject?.(['sessionProjections'], (scope) => {
|
|
400
434
|
const registry = scope.sessionProjections;
|
|
401
435
|
if (typeof registry?.stateOf !== 'function' || typeof registry.register !== 'function')
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tui-command.ts — `/think`:思考档位的 dsh-tui 终端面(宿主斜杠命令)。
|
|
3
|
+
*
|
|
4
|
+
* 背景:dsh-tui 不加载插件 client 半边(slider / family-tab / 设置卡都不执行),
|
|
5
|
+
* 也调不到插件 RPC。HUD 里只有 permission mode,没有 reasoning effort —— 所以
|
|
6
|
+
* 在 TUI 下既看不到当前档位,也没法切换。命令面把这个洞补上。
|
|
7
|
+
*
|
|
8
|
+
* 契约(.agents/plans/dsh-tui-faces/spec.md §3):单行 <=100、总行 <=40、无 ANSI、
|
|
9
|
+
* 写操作走 --yes、--json 单行输出。
|
|
10
|
+
*/
|
|
11
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
12
|
+
export type CommandKind = 'success' | 'error';
|
|
13
|
+
export interface CommandResult {
|
|
14
|
+
kind: CommandKind;
|
|
15
|
+
text: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ThinkState {
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
level: string;
|
|
20
|
+
allowDowngrade: boolean;
|
|
21
|
+
allowUpgrade: boolean;
|
|
22
|
+
takeover: boolean;
|
|
23
|
+
/** config = 组合入口的 live config;legacy-section = ≤0.1.6 注册节读取 */
|
|
24
|
+
source: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ThinkCommandDeps {
|
|
27
|
+
state(): ThinkState;
|
|
28
|
+
/** 写回档位;返回失败原因而不是抛错,命令层统一翻译成 next 行。 */
|
|
29
|
+
write(level: string): Promise<{
|
|
30
|
+
ok: boolean;
|
|
31
|
+
reason?: string;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
export declare function clip(text: string, width?: number): string;
|
|
35
|
+
export declare function renderLines(lines: string[], limit?: number): string;
|
|
36
|
+
/** 纯函数入口;写操作交给 deps.write(参数校验在这里完成)。 */
|
|
37
|
+
export declare function runThinkCommand(rawInput: string, deps: ThinkCommandDeps): Promise<CommandResult>;
|
|
38
|
+
/** 注册 `/think`:无 commands 服务时静默跳过(老线安全)。 */
|
|
39
|
+
export declare function registerThinkCommand(ctx: Context, deps: ThinkCommandDeps): void;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tui-command.ts — `/think`:思考档位的 dsh-tui 终端面(宿主斜杠命令)。
|
|
3
|
+
*
|
|
4
|
+
* 背景:dsh-tui 不加载插件 client 半边(slider / family-tab / 设置卡都不执行),
|
|
5
|
+
* 也调不到插件 RPC。HUD 里只有 permission mode,没有 reasoning effort —— 所以
|
|
6
|
+
* 在 TUI 下既看不到当前档位,也没法切换。命令面把这个洞补上。
|
|
7
|
+
*
|
|
8
|
+
* 契约(.agents/plans/dsh-tui-faces/spec.md §3):单行 <=100、总行 <=40、无 ANSI、
|
|
9
|
+
* 写操作走 --yes、--json 单行输出。
|
|
10
|
+
*/
|
|
11
|
+
import { assertEffortId, isEffortId, STANDARD_LEVELS } from "./thinking-level.js";
|
|
12
|
+
const MAX_LINES = 40;
|
|
13
|
+
const MAX_WIDTH = 100;
|
|
14
|
+
export function clip(text, width = MAX_WIDTH) {
|
|
15
|
+
const value = String(text ?? '').replace(/[\r\n]+/g, ' ').replace(/\s+$/, '');
|
|
16
|
+
return value.length <= width ? value : `${value.slice(0, width - 1)}…`;
|
|
17
|
+
}
|
|
18
|
+
export function renderLines(lines, limit = MAX_LINES) {
|
|
19
|
+
const clipped = lines.map((line) => clip(line));
|
|
20
|
+
if (clipped.length <= limit)
|
|
21
|
+
return clipped.join('\n');
|
|
22
|
+
const kept = clipped.slice(0, limit - 1);
|
|
23
|
+
return [...kept, `… 还有 ${clipped.length - kept.length} 行,加 --all 查看`].join('\n');
|
|
24
|
+
}
|
|
25
|
+
const ok = (lines) => ({ kind: 'success', text: renderLines(lines) });
|
|
26
|
+
const fail = (reason, next) => ({ kind: 'error', text: renderLines([reason, ...(next ? [` ${next}`] : [])]) });
|
|
27
|
+
function parse(rawInput) {
|
|
28
|
+
const argv = [];
|
|
29
|
+
let json = false;
|
|
30
|
+
let yes = false;
|
|
31
|
+
for (const token of String(rawInput ?? '').trim().split(/\s+/).filter(Boolean)) {
|
|
32
|
+
if (token === '--json')
|
|
33
|
+
json = true;
|
|
34
|
+
else if (token === '--yes')
|
|
35
|
+
yes = true;
|
|
36
|
+
else if (!token.startsWith('--'))
|
|
37
|
+
argv.push(token);
|
|
38
|
+
}
|
|
39
|
+
return { argv, json, yes };
|
|
40
|
+
}
|
|
41
|
+
const HELP = [
|
|
42
|
+
'think — 思考档位(reasoning effort)的终端面',
|
|
43
|
+
' /think 当前档位与开关状态',
|
|
44
|
+
` /think <level> ${STANDARD_LEVELS.join('|')}`,
|
|
45
|
+
' /think auto 每步自动调度',
|
|
46
|
+
' flags --json 单行 JSON;写操作需 --yes',
|
|
47
|
+
' note auto 的升降由档位设置控制(allowDowngrade / allowUpgrade)',
|
|
48
|
+
];
|
|
49
|
+
/** 纯函数入口;写操作交给 deps.write(参数校验在这里完成)。 */
|
|
50
|
+
export async function runThinkCommand(rawInput, deps) {
|
|
51
|
+
const { argv, json, yes } = parse(rawInput);
|
|
52
|
+
const sub = (argv[0] ?? '').trim().toLowerCase();
|
|
53
|
+
const state = deps.state();
|
|
54
|
+
const payload = (result, data) => {
|
|
55
|
+
if (!json)
|
|
56
|
+
return result;
|
|
57
|
+
const body = result.kind === 'error'
|
|
58
|
+
? { ok: false, cmd: 'think', error: { message: result.text.split('\n')[0] ?? result.text } }
|
|
59
|
+
: { ok: true, cmd: 'think', data };
|
|
60
|
+
return { kind: result.kind, text: JSON.stringify(body) };
|
|
61
|
+
};
|
|
62
|
+
const snapshot = {
|
|
63
|
+
enabled: state.enabled,
|
|
64
|
+
level: state.level,
|
|
65
|
+
auto: state.level === 'auto',
|
|
66
|
+
allowDowngrade: state.allowDowngrade,
|
|
67
|
+
allowUpgrade: state.allowUpgrade,
|
|
68
|
+
takeover: state.takeover,
|
|
69
|
+
source: state.source,
|
|
70
|
+
};
|
|
71
|
+
if (sub === '' || sub === 'status') {
|
|
72
|
+
return payload(ok([
|
|
73
|
+
`think — ${state.enabled ? state.level : 'off(插件未启用)'}`,
|
|
74
|
+
` source ${state.source}`,
|
|
75
|
+
` schedule auto=${state.level === 'auto' ? 'yes' : 'no'} downgrade=${state.allowDowngrade ? 'on' : 'off'} upgrade=${state.allowUpgrade ? 'on' : 'off'}`,
|
|
76
|
+
` takeover ${state.takeover ? 'on' : 'off'}`,
|
|
77
|
+
' set /think <level> --yes(或在 Desktop 设置页拖动滑杆)',
|
|
78
|
+
]), snapshot);
|
|
79
|
+
}
|
|
80
|
+
if (sub === 'help' || sub === '?')
|
|
81
|
+
return payload(ok(HELP), snapshot);
|
|
82
|
+
const level = sub === 'auto' ? 'auto' : sub;
|
|
83
|
+
if (!isEffortId(level)) {
|
|
84
|
+
return payload(fail(`think: 未知档位 "${sub}"`, `next: /think ${STANDARD_LEVELS.join('|')}`), snapshot);
|
|
85
|
+
}
|
|
86
|
+
// 危险动作约定:写配置默认 dry,--yes 才落盘
|
|
87
|
+
if (!yes) {
|
|
88
|
+
return payload(ok([
|
|
89
|
+
`think — dry run:将把档位从 ${state.level} 改为 ${level}`,
|
|
90
|
+
' 确认后加 --yes 执行',
|
|
91
|
+
]), { ...snapshot, pending: level });
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
assertEffortId(level, '/think');
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
return payload(fail(`think: ${error.message}`), snapshot);
|
|
98
|
+
}
|
|
99
|
+
const written = await deps.write(level);
|
|
100
|
+
if (!written.ok) {
|
|
101
|
+
return payload(fail(`think: 写入失败:${written.reason ?? '未知原因'}`, 'next: 在 Desktop 设置页手动调整,或检查 profile 的 settings 文档'), snapshot);
|
|
102
|
+
}
|
|
103
|
+
return payload(ok([`think — 已切换到 ${level}`, ' 下一回合生效(volatile 热更,无需重启)']), { ...snapshot, level });
|
|
104
|
+
}
|
|
105
|
+
/** 注册 `/think`:无 commands 服务时静默跳过(老线安全)。 */
|
|
106
|
+
export function registerThinkCommand(ctx, deps) {
|
|
107
|
+
const registry = ctx.commands;
|
|
108
|
+
if (!registry || typeof registry.register !== 'function')
|
|
109
|
+
return;
|
|
110
|
+
registry.register({
|
|
111
|
+
definitionId: 'dsh-thinking-levels',
|
|
112
|
+
name: 'think',
|
|
113
|
+
description: 'Thinking level console: show / set reasoning effort (off|on|minimal|low|medium|high|xhigh|max|auto)',
|
|
114
|
+
input: { hint: '[<level>|auto] [--yes] [--json]' },
|
|
115
|
+
handler: (invocation) => runThinkCommand(invocation?.rawInput ?? '', deps),
|
|
116
|
+
});
|
|
117
|
+
}
|
package/package.json
CHANGED
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-thinking-levels",
|
|
3
|
-
"version": "4.4.
|
|
4
|
-
"publishConfig": {
|
|
5
|
-
"registry": "https://registry.npmjs.org",
|
|
6
|
-
"access": "public",
|
|
7
|
-
"tag": "latest"
|
|
8
|
-
},
|
|
9
|
-
"description": "DSH host plugin: thinking-level (reasoning_effort) control for dsh — auto-adjust per tool round, with optional manual lock and per-tool timing telemetry.",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/drscrewdriver/dsh-thinking-levels.git"
|
|
13
|
-
},
|
|
14
|
-
"type": "module",
|
|
15
|
-
"files": [
|
|
16
|
-
"lib",
|
|
17
|
-
"cordis.patch.yml",
|
|
18
|
-
"dsh.plugin.json",
|
|
19
|
-
"README.md",
|
|
20
|
-
"README.zh.md",
|
|
21
|
-
"README.ja.md",
|
|
22
|
-
"README.ko.md",
|
|
23
|
-
"README.fr.md",
|
|
24
|
-
"README.de.md",
|
|
25
|
-
"README.it.md",
|
|
26
|
-
"README.ru.md",
|
|
27
|
-
"README.es.md",
|
|
28
|
-
"INSTALL.md",
|
|
29
|
-
"INSTALL.zh.md",
|
|
30
|
-
"INSTALL.ja.md",
|
|
31
|
-
"INSTALL.ko.md",
|
|
32
|
-
"INSTALL.fr.md",
|
|
33
|
-
"INSTALL.de.md",
|
|
34
|
-
"INSTALL.it.md",
|
|
35
|
-
"INSTALL.ru.md",
|
|
36
|
-
"INSTALL.es.md",
|
|
37
|
-
"CHANGELOG.md",
|
|
38
|
-
"CHANGELOG.ja.md",
|
|
39
|
-
"CHANGELOG.ko.md",
|
|
40
|
-
"CHANGELOG.fr.md",
|
|
41
|
-
"CHANGELOG.de.md",
|
|
42
|
-
"CHANGELOG.it.md",
|
|
43
|
-
"CHANGELOG.ru.md",
|
|
44
|
-
"CHANGELOG.es.md",
|
|
45
|
-
"locale"
|
|
46
|
-
],
|
|
47
|
-
"main": "lib/index.js",
|
|
48
|
-
"types": "lib/index.d.ts",
|
|
49
|
-
"exports": {
|
|
50
|
-
".": {
|
|
51
|
-
"types": "./lib/index.d.ts",
|
|
52
|
-
"default": "./lib/index.js"
|
|
53
|
-
},
|
|
54
|
-
"./thinking-level": {
|
|
55
|
-
"types": "./lib/thinking-level.d.ts",
|
|
56
|
-
"default": "./lib/thinking-level.js"
|
|
57
|
-
},
|
|
58
|
-
"./client": {
|
|
59
|
-
"default": "./lib/client.js"
|
|
60
|
-
},
|
|
61
|
-
"./locale/*.json": "./locale/*.json",
|
|
62
|
-
"./package.json": "./package.json"
|
|
63
|
-
},
|
|
64
|
-
"engines": {
|
|
65
|
-
"node": ">=22.19.0 || >=24.0.0",
|
|
66
|
-
"dsh": ">=0.1.
|
|
67
|
-
},
|
|
68
|
-
"peerDependencies": {
|
|
69
|
-
"@deepseek-ai/cordis": "^4.0.1",
|
|
70
|
-
"@deepseek-ai/dsh-api-remotes": "0.1.0-rc.8
|
|
71
|
-
"@deepseek-ai/dsh-api-session-controller": "0.1.0-rc.8
|
|
72
|
-
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.8
|
|
73
|
-
"@deepseek-ai/dsh-client-ui-model-selection": "0.1.0-rc.8
|
|
74
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.1.0-rc.8
|
|
75
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.8
|
|
76
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.8
|
|
77
|
-
},
|
|
78
|
-
"peerDependenciesMeta": {
|
|
79
|
-
"@deepseek-ai/dsh-api-remotes": {
|
|
80
|
-
"optional": true
|
|
81
|
-
},
|
|
82
|
-
"@deepseek-ai/dsh-api-session-controller": {
|
|
83
|
-
"optional": true
|
|
84
|
-
},
|
|
85
|
-
"@deepseek-ai/dsh-client-locale": {
|
|
86
|
-
"optional": true
|
|
87
|
-
},
|
|
88
|
-
"@deepseek-ai/dsh-client-ui-model-selection": {
|
|
89
|
-
"optional": true
|
|
90
|
-
},
|
|
91
|
-
"@deepseek-ai/dsh-client-ui-renderer": {
|
|
92
|
-
"optional": true
|
|
93
|
-
},
|
|
94
|
-
"@deepseek-ai/dsh-client-ui-settings": {
|
|
95
|
-
"optional": true
|
|
96
|
-
},
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-slots": {
|
|
98
|
-
"optional": true
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"dependencies": {
|
|
102
|
-
"@deepseek-ai/schemastery": "^3.18.4",
|
|
103
|
-
"zod": "^4.4.3"
|
|
104
|
-
},
|
|
105
|
-
"devDependencies": {
|
|
106
|
-
"@deepseek-ai/cordis": "^4.0.4",
|
|
107
|
-
"@deepseek-ai/cosmokit": "^1.8.5",
|
|
108
|
-
"@deepseek-ai/dsh-client-locale": "0.2.1-rc.3",
|
|
109
|
-
"@deepseek-ai/dsh-client-store": "0.2.1-rc.3",
|
|
110
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.3",
|
|
111
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3",
|
|
112
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
|
|
113
|
-
"@deepseek-ai/schemastery": "^3.18.4",
|
|
114
|
-
"@eslint/js": "^10.0.1",
|
|
115
|
-
"@types/node": "^24.0.0",
|
|
116
|
-
"@types/react": "~18.3.1",
|
|
117
|
-
"eslint": "^10.8.1",
|
|
118
|
-
"react": "^18.2.0",
|
|
119
|
-
"react-test-renderer": "^18.3.1",
|
|
120
|
-
"tsdown": "^0.22.2",
|
|
121
|
-
"typescript": "^5.6.0",
|
|
122
|
-
"typescript-eslint": "^8.67.0",
|
|
123
|
-
"vitest": "^3.0.0"
|
|
124
|
-
},
|
|
125
|
-
"scripts": {
|
|
126
|
-
"build": "tsc -p tsconfig.build.json && tsdown",
|
|
127
|
-
"prepack": "npm run build",
|
|
128
|
-
"prepublishOnly": "npm run build",
|
|
129
|
-
"release:4x": "npm publish --tag dsh-0.2.0 --registry=https://registry.npmjs.org",
|
|
130
|
-
"typecheck": "tsc --noEmit",
|
|
131
|
-
"lint": "eslint src tests",
|
|
132
|
-
"test": "vitest run"
|
|
133
|
-
},
|
|
134
|
-
"license": "MIT",
|
|
135
|
-
"dsh": {
|
|
136
|
-
"bundle": {
|
|
137
|
-
"patch": "./cordis.patch.yml"
|
|
138
|
-
},
|
|
139
|
-
"client": {
|
|
140
|
-
"inject": [
|
|
141
|
-
"@deepseek-ai/dsh-api-remotes",
|
|
142
|
-
"@deepseek-ai/dsh-api-session-controller",
|
|
143
|
-
"@deepseek-ai/dsh-client-locale",
|
|
144
|
-
"@deepseek-ai/dsh-client-ui-model-selection",
|
|
145
|
-
"@deepseek-ai/dsh-client-ui-renderer",
|
|
146
|
-
"@deepseek-ai/dsh-client-ui-settings",
|
|
147
|
-
"@deepseek-ai/dsh-client-ui-slots"
|
|
148
|
-
],
|
|
149
|
-
"platform": "web"
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-thinking-levels",
|
|
3
|
+
"version": "4.4.16",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"registry": "https://registry.npmjs.org",
|
|
6
|
+
"access": "public",
|
|
7
|
+
"tag": "latest"
|
|
8
|
+
},
|
|
9
|
+
"description": "DSH host plugin: thinking-level (reasoning_effort) control for dsh — auto-adjust per tool round, with optional manual lock and per-tool timing telemetry.",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/drscrewdriver/dsh-thinking-levels.git"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"files": [
|
|
16
|
+
"lib",
|
|
17
|
+
"cordis.patch.yml",
|
|
18
|
+
"dsh.plugin.json",
|
|
19
|
+
"README.md",
|
|
20
|
+
"README.zh.md",
|
|
21
|
+
"README.ja.md",
|
|
22
|
+
"README.ko.md",
|
|
23
|
+
"README.fr.md",
|
|
24
|
+
"README.de.md",
|
|
25
|
+
"README.it.md",
|
|
26
|
+
"README.ru.md",
|
|
27
|
+
"README.es.md",
|
|
28
|
+
"INSTALL.md",
|
|
29
|
+
"INSTALL.zh.md",
|
|
30
|
+
"INSTALL.ja.md",
|
|
31
|
+
"INSTALL.ko.md",
|
|
32
|
+
"INSTALL.fr.md",
|
|
33
|
+
"INSTALL.de.md",
|
|
34
|
+
"INSTALL.it.md",
|
|
35
|
+
"INSTALL.ru.md",
|
|
36
|
+
"INSTALL.es.md",
|
|
37
|
+
"CHANGELOG.md",
|
|
38
|
+
"CHANGELOG.ja.md",
|
|
39
|
+
"CHANGELOG.ko.md",
|
|
40
|
+
"CHANGELOG.fr.md",
|
|
41
|
+
"CHANGELOG.de.md",
|
|
42
|
+
"CHANGELOG.it.md",
|
|
43
|
+
"CHANGELOG.ru.md",
|
|
44
|
+
"CHANGELOG.es.md",
|
|
45
|
+
"locale"
|
|
46
|
+
],
|
|
47
|
+
"main": "lib/index.js",
|
|
48
|
+
"types": "lib/index.d.ts",
|
|
49
|
+
"exports": {
|
|
50
|
+
".": {
|
|
51
|
+
"types": "./lib/index.d.ts",
|
|
52
|
+
"default": "./lib/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./thinking-level": {
|
|
55
|
+
"types": "./lib/thinking-level.d.ts",
|
|
56
|
+
"default": "./lib/thinking-level.js"
|
|
57
|
+
},
|
|
58
|
+
"./client": {
|
|
59
|
+
"default": "./lib/client.js"
|
|
60
|
+
},
|
|
61
|
+
"./locale/*.json": "./locale/*.json",
|
|
62
|
+
"./package.json": "./package.json"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=22.19.0 || >=24.0.0",
|
|
66
|
+
"dsh": ">=0.1.0-rc.8 <0.3.0-0"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
70
|
+
"@deepseek-ai/dsh-api-remotes": ">=0.1.0-rc.8 <0.3.0-0",
|
|
71
|
+
"@deepseek-ai/dsh-api-session-controller": ">=0.1.0-rc.8 <0.3.0-0",
|
|
72
|
+
"@deepseek-ai/dsh-client-locale": ">=0.1.0-rc.8 <0.3.0-0",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-model-selection": ">=0.1.0-rc.8 <0.3.0-0",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.1.0-rc.8 <0.3.0-0",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.0-rc.8 <0.3.0-0",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.0-rc.8 <0.3.0-0"
|
|
77
|
+
},
|
|
78
|
+
"peerDependenciesMeta": {
|
|
79
|
+
"@deepseek-ai/dsh-api-remotes": {
|
|
80
|
+
"optional": true
|
|
81
|
+
},
|
|
82
|
+
"@deepseek-ai/dsh-api-session-controller": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"@deepseek-ai/dsh-client-locale": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-model-selection": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
91
|
+
"@deepseek-ai/dsh-client-ui-renderer": {
|
|
92
|
+
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"@deepseek-ai/dsh-client-ui-settings": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-slots": {
|
|
98
|
+
"optional": true
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"dependencies": {
|
|
102
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
103
|
+
"zod": "^4.4.3"
|
|
104
|
+
},
|
|
105
|
+
"devDependencies": {
|
|
106
|
+
"@deepseek-ai/cordis": "^4.0.4",
|
|
107
|
+
"@deepseek-ai/cosmokit": "^1.8.5",
|
|
108
|
+
"@deepseek-ai/dsh-client-locale": "0.2.1-rc.3",
|
|
109
|
+
"@deepseek-ai/dsh-client-store": "0.2.1-rc.3",
|
|
110
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.3",
|
|
111
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3",
|
|
112
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
|
|
113
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
114
|
+
"@eslint/js": "^10.0.1",
|
|
115
|
+
"@types/node": "^24.0.0",
|
|
116
|
+
"@types/react": "~18.3.1",
|
|
117
|
+
"eslint": "^10.8.1",
|
|
118
|
+
"react": "^18.2.0",
|
|
119
|
+
"react-test-renderer": "^18.3.1",
|
|
120
|
+
"tsdown": "^0.22.2",
|
|
121
|
+
"typescript": "^5.6.0",
|
|
122
|
+
"typescript-eslint": "^8.67.0",
|
|
123
|
+
"vitest": "^3.0.0"
|
|
124
|
+
},
|
|
125
|
+
"scripts": {
|
|
126
|
+
"build": "tsc -p tsconfig.build.json && tsdown",
|
|
127
|
+
"prepack": "npm run build",
|
|
128
|
+
"prepublishOnly": "npm run build",
|
|
129
|
+
"release:4x": "npm publish --tag dsh-0.2.0 --registry=https://registry.npmjs.org",
|
|
130
|
+
"typecheck": "tsc --noEmit",
|
|
131
|
+
"lint": "eslint src tests",
|
|
132
|
+
"test": "vitest run"
|
|
133
|
+
},
|
|
134
|
+
"license": "MIT",
|
|
135
|
+
"dsh": {
|
|
136
|
+
"bundle": {
|
|
137
|
+
"patch": "./cordis.patch.yml"
|
|
138
|
+
},
|
|
139
|
+
"client": {
|
|
140
|
+
"inject": [
|
|
141
|
+
"@deepseek-ai/dsh-api-remotes",
|
|
142
|
+
"@deepseek-ai/dsh-api-session-controller",
|
|
143
|
+
"@deepseek-ai/dsh-client-locale",
|
|
144
|
+
"@deepseek-ai/dsh-client-ui-model-selection",
|
|
145
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
146
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
147
|
+
"@deepseek-ai/dsh-client-ui-slots"
|
|
148
|
+
],
|
|
149
|
+
"platform": "web"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|