dsh-thinking-levels 4.4.15 → 4.4.17

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/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/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Níveis de raciocínio",
4
+ "description": "Escolha Auto no seletor de modelo: o plugin programa low / high / max conforme o histórico de chamadas de ferramentas antes de enviar o effort à API. Aqui você configura o nível padrão, os limites do agendador e as capacidades por modelo (nível → valor wire enviado ao gateway)."
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,152 +1,155 @@
1
- {
2
- "name": "dsh-thinking-levels",
3
- "version": "4.4.15",
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
- }
1
+ {
2
+ "name": "dsh-thinking-levels",
3
+ "version": "4.4.17",
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
+ "README.pt.md",
29
+ "INSTALL.md",
30
+ "INSTALL.zh.md",
31
+ "INSTALL.ja.md",
32
+ "INSTALL.ko.md",
33
+ "INSTALL.fr.md",
34
+ "INSTALL.de.md",
35
+ "INSTALL.it.md",
36
+ "INSTALL.ru.md",
37
+ "INSTALL.es.md",
38
+ "INSTALL.pt.md",
39
+ "CHANGELOG.md",
40
+ "CHANGELOG.ja.md",
41
+ "CHANGELOG.ko.md",
42
+ "CHANGELOG.fr.md",
43
+ "CHANGELOG.de.md",
44
+ "CHANGELOG.it.md",
45
+ "CHANGELOG.ru.md",
46
+ "CHANGELOG.es.md",
47
+ "CHANGELOG.pt.md",
48
+ "locale"
49
+ ],
50
+ "main": "lib/index.js",
51
+ "types": "lib/index.d.ts",
52
+ "exports": {
53
+ ".": {
54
+ "types": "./lib/index.d.ts",
55
+ "default": "./lib/index.js"
56
+ },
57
+ "./thinking-level": {
58
+ "types": "./lib/thinking-level.d.ts",
59
+ "default": "./lib/thinking-level.js"
60
+ },
61
+ "./client": {
62
+ "default": "./lib/client.js"
63
+ },
64
+ "./locale/*.json": "./locale/*.json",
65
+ "./package.json": "./package.json"
66
+ },
67
+ "engines": {
68
+ "node": ">=22.19.0 || >=24.0.0",
69
+ "dsh": ">=0.1.0-rc.8 <0.3.0-0"
70
+ },
71
+ "peerDependencies": {
72
+ "@deepseek-ai/cordis": "^4.0.1",
73
+ "@deepseek-ai/dsh-api-remotes": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
74
+ "@deepseek-ai/dsh-api-session-controller": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
75
+ "@deepseek-ai/dsh-client-locale": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
76
+ "@deepseek-ai/dsh-client-ui-model-selection": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
77
+ "@deepseek-ai/dsh-client-ui-renderer": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
78
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
79
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5"
80
+ },
81
+ "peerDependenciesMeta": {
82
+ "@deepseek-ai/dsh-api-remotes": {
83
+ "optional": true
84
+ },
85
+ "@deepseek-ai/dsh-api-session-controller": {
86
+ "optional": true
87
+ },
88
+ "@deepseek-ai/dsh-client-locale": {
89
+ "optional": true
90
+ },
91
+ "@deepseek-ai/dsh-client-ui-model-selection": {
92
+ "optional": true
93
+ },
94
+ "@deepseek-ai/dsh-client-ui-renderer": {
95
+ "optional": true
96
+ },
97
+ "@deepseek-ai/dsh-client-ui-settings": {
98
+ "optional": true
99
+ },
100
+ "@deepseek-ai/dsh-client-ui-slots": {
101
+ "optional": true
102
+ }
103
+ },
104
+ "dependencies": {
105
+ "@deepseek-ai/schemastery": "^3.18.4",
106
+ "zod": "^4.4.3"
107
+ },
108
+ "devDependencies": {
109
+ "@deepseek-ai/cordis": "^4.0.4",
110
+ "@deepseek-ai/cosmokit": "^1.8.5",
111
+ "@deepseek-ai/dsh-client-locale": "0.2.1-rc.3",
112
+ "@deepseek-ai/dsh-client-store": "0.2.1-rc.3",
113
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.3",
114
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3",
115
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
116
+ "@deepseek-ai/schemastery": "^3.18.4",
117
+ "@eslint/js": "^10.0.1",
118
+ "@types/node": "^24.0.0",
119
+ "@types/react": "~18.3.1",
120
+ "eslint": "^10.8.1",
121
+ "react": "^18.2.0",
122
+ "react-test-renderer": "^18.3.1",
123
+ "tsdown": "^0.22.2",
124
+ "typescript": "^5.6.0",
125
+ "typescript-eslint": "^8.67.0",
126
+ "vitest": "^3.0.0"
127
+ },
128
+ "scripts": {
129
+ "build": "tsc -p tsconfig.build.json && tsdown",
130
+ "prepack": "npm run build",
131
+ "prepublishOnly": "npm run build",
132
+ "release:4x": "npm publish --tag dsh-0.2.0 --registry=https://registry.npmjs.org",
133
+ "typecheck": "tsc --noEmit",
134
+ "lint": "eslint src tests",
135
+ "test": "vitest run"
136
+ },
137
+ "license": "MIT",
138
+ "dsh": {
139
+ "bundle": {
140
+ "patch": "./cordis.patch.yml"
141
+ },
142
+ "client": {
143
+ "inject": [
144
+ "@deepseek-ai/dsh-api-remotes",
145
+ "@deepseek-ai/dsh-api-session-controller",
146
+ "@deepseek-ai/dsh-client-locale",
147
+ "@deepseek-ai/dsh-client-ui-model-selection",
148
+ "@deepseek-ai/dsh-client-ui-renderer",
149
+ "@deepseek-ai/dsh-client-ui-settings",
150
+ "@deepseek-ai/dsh-client-ui-slots"
151
+ ],
152
+ "platform": "web"
153
+ }
154
+ }
155
+ }