@songtonyli/dsh-cli 0.1.50 → 0.1.51
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.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +207 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ workspace and no build step. Native packages that ship one build per platform
|
|
|
26
26
|
ripgrep, the PTY backend's addons, sharp, koffi, and the Landlock launcher — are
|
|
27
27
|
ordinary optional dependencies, so npm resolves the right one for your machine.
|
|
28
28
|
|
|
29
|
-
Requires Node `^22.19.0 || >=24.0.0`. Version 0.1.
|
|
29
|
+
Requires Node `^22.19.0 || >=24.0.0`. Version 0.1.51; `dsh --version`
|
|
30
30
|
also reports the harness build the package was assembled from.
|
|
31
31
|
|
|
32
32
|
## License
|
package/bin/dsh.mjs
CHANGED
|
@@ -18,7 +18,7 @@ const argv = process.argv.slice(2)
|
|
|
18
18
|
// version this package publishes. Reporting only one of the two would make an
|
|
19
19
|
// ordinary `npm install @songtonyli/dsh-cli@x` look like it installed something else.
|
|
20
20
|
if (argv.length === 1 && (argv[0] === '--version' || argv[0] === '-V')) {
|
|
21
|
-
console.log('@songtonyli/dsh-cli 0.1.
|
|
21
|
+
console.log('@songtonyli/dsh-cli 0.1.51 (deepseek-harness 0.1.7-rc.2)')
|
|
22
22
|
process.exit(0)
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"micromark-extension-gfm": "^3.0.0",
|
|
48
48
|
"micromark-util-sanitize-uri": "^2.0.1",
|
|
49
49
|
"simple-icons": "16.31.0",
|
|
50
|
-
"@deepseek-ai/dsh-util-workspace-path": "0.1.7-rc.2",
|
|
51
50
|
"@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
|
|
52
51
|
"@deepseek-ai/dsh-util-code-language": "0.1.7-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.1.7-rc.2",
|
|
53
53
|
"@deepseek-ai/cordis": "~4.0.4"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
@@ -167,7 +167,7 @@ window.__ModuleLoader__.load({
|
|
|
167
167
|
const SCROLLBAR_LINGER_MS = 2e3;
|
|
168
168
|
/** Format complete-build metadata for the local brand badge. */
|
|
169
169
|
function localBuildVersion() {
|
|
170
|
-
return `0.1.7-rc.2-
|
|
170
|
+
return `0.1.7-rc.2-d4ad074` + ({}.DSH_CLIENT_GIT_DIRTY === "true" ? "-dirty" : "");
|
|
171
171
|
}
|
|
172
172
|
/** Each panel row subscribes only to its own selection state. */
|
|
173
173
|
function PanelRow({ id, label, wide, usePanelInfo, selectPanel, renderSlot }) {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/react": "~18.3.1",
|
|
27
|
-
"@deepseek-ai/
|
|
28
|
-
"@deepseek-ai/
|
|
27
|
+
"@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
|
|
28
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"lib/index.js",
|
|
@@ -96,6 +96,8 @@ A provider pi-ai ships a login for can be signed into through the harness author
|
|
|
96
96
|
|
|
97
97
|
### Resolve the model catalog
|
|
98
98
|
|
|
99
|
+
Until an installed pi-ai release ships a model id, `src/catalog-supplement-data.ts` merges that entry into catalog discovery and default routes; upstream entries with the same id take precedence after upgrade.
|
|
100
|
+
|
|
99
101
|
A profile's `models` list replaces the route's installed catalog rather than extending it; each entry defaults its unset fields from the installed model of the same id, so narrowing a route to two models, correcting one capacity, or adding a model newer than the installed catalog are one-line edits. `modelOverrides` reshapes individual installed-catalog models without that cost — correct one model, keep the other thirty-seven — and is refused when set beside a `models` list, on a hand-declared route, or naming a model the catalog does not describe, because a silently unchanged model would be a typo someone hunts for later.
|
|
100
102
|
|
|
101
103
|
### Run with reasoning and wire compatibility
|
|
@@ -96,6 +96,8 @@ pi-ai 提供登录的提供方可以通过 harness 授权 seam 登录:流程
|
|
|
96
96
|
|
|
97
97
|
### 解析模型目录
|
|
98
98
|
|
|
99
|
+
在已安装的 pi-ai 发布包含某个模型 id 之前,`src/catalog-supplement-data.ts` 会把该条目合并进 catalog 发现与默认路由;升级后上游同名条目优先。
|
|
100
|
+
|
|
99
101
|
profile 的 `models` 列表会替换而非扩展路由的已安装目录;每个条目从同 id 已安装模型取未设置字段的默认值,因此把路由收窄到两个模型、修正一个容量或添加比已安装目录更新的模型都是一行编辑。`modelOverrides` 无需该代价即可重塑个别已安装目录模型——修正一个模型,保留其余三十七个——当它与 `models` 列表并存、位于手工声明路由上、或点名目录未描述的模型时会被拒绝,因为静默不变的模型会成为别人日后寻找的拼写错误。
|
|
100
102
|
|
|
101
103
|
### 带推理(reasoning)与协议兼容运行
|
|
@@ -251,6 +251,210 @@ function toPiAssistant(message, onDegrade) {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
//#endregion
|
|
254
|
+
//#region lib/types/catalog-supplement.js
|
|
255
|
+
/**
|
|
256
|
+
* Models the installed pi-ai catalog has not shipped yet.
|
|
257
|
+
*
|
|
258
|
+
* Entries merge into {@link catalogModels} only when the upstream catalog
|
|
259
|
+
* lacks the same id, so a pi-ai upgrade that adds the model drops the
|
|
260
|
+
* supplement automatically.
|
|
261
|
+
*
|
|
262
|
+
* @module dsh-llm-pi-ai/catalog-supplement
|
|
263
|
+
*/
|
|
264
|
+
/** One provider route's supplemental models, keyed by model id. */
|
|
265
|
+
const SUPPLEMENT = {
|
|
266
|
+
"openai-codex": {
|
|
267
|
+
"gpt-6-luna": {
|
|
268
|
+
"id": "gpt-6-luna",
|
|
269
|
+
"name": "GPT-6 Luna",
|
|
270
|
+
"api": "openai-codex-responses",
|
|
271
|
+
"provider": "openai-codex",
|
|
272
|
+
"baseUrl": "https://chatgpt.com/backend-api",
|
|
273
|
+
"reasoning": true,
|
|
274
|
+
"input": ["text", "image"],
|
|
275
|
+
"cost": {
|
|
276
|
+
"input": .1,
|
|
277
|
+
"output": .5,
|
|
278
|
+
"cacheRead": .01,
|
|
279
|
+
"cacheWrite": .125,
|
|
280
|
+
"tiers": [{
|
|
281
|
+
"inputTokensAbove": 272e3,
|
|
282
|
+
"input": .2,
|
|
283
|
+
"output": .75,
|
|
284
|
+
"cacheRead": .02,
|
|
285
|
+
"cacheWrite": .25
|
|
286
|
+
}]
|
|
287
|
+
},
|
|
288
|
+
"contextWindow": 105e4,
|
|
289
|
+
"maxTokens": 128e3,
|
|
290
|
+
"thinkingLevelMap": {
|
|
291
|
+
"xhigh": "xhigh",
|
|
292
|
+
"max": "max",
|
|
293
|
+
"minimal": "low"
|
|
294
|
+
},
|
|
295
|
+
"compat": {
|
|
296
|
+
"supportsOpenAIGrammarTools": true,
|
|
297
|
+
"supportsAdditionalTools": true,
|
|
298
|
+
"supportsToolSearch": true
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"gpt-6-sol": {
|
|
302
|
+
"id": "gpt-6-sol",
|
|
303
|
+
"name": "GPT-6 Sol",
|
|
304
|
+
"api": "openai-codex-responses",
|
|
305
|
+
"provider": "openai-codex",
|
|
306
|
+
"baseUrl": "https://chatgpt.com/backend-api",
|
|
307
|
+
"reasoning": true,
|
|
308
|
+
"input": ["text", "image"],
|
|
309
|
+
"cost": {
|
|
310
|
+
"input": 2,
|
|
311
|
+
"output": 10,
|
|
312
|
+
"cacheRead": .2,
|
|
313
|
+
"cacheWrite": 2.5,
|
|
314
|
+
"tiers": [{
|
|
315
|
+
"inputTokensAbove": 272e3,
|
|
316
|
+
"input": 4,
|
|
317
|
+
"output": 15,
|
|
318
|
+
"cacheRead": .4,
|
|
319
|
+
"cacheWrite": 5
|
|
320
|
+
}]
|
|
321
|
+
},
|
|
322
|
+
"contextWindow": 105e4,
|
|
323
|
+
"maxTokens": 128e3,
|
|
324
|
+
"thinkingLevelMap": {
|
|
325
|
+
"xhigh": "xhigh",
|
|
326
|
+
"max": "max",
|
|
327
|
+
"minimal": "low"
|
|
328
|
+
},
|
|
329
|
+
"compat": {
|
|
330
|
+
"supportsOpenAIGrammarTools": true,
|
|
331
|
+
"supportsAdditionalTools": true,
|
|
332
|
+
"supportsToolSearch": true
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"openai": {
|
|
337
|
+
"gpt-6-luna": {
|
|
338
|
+
"id": "gpt-6-luna",
|
|
339
|
+
"name": "GPT-6 Luna",
|
|
340
|
+
"api": "openai-responses",
|
|
341
|
+
"provider": "openai",
|
|
342
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
343
|
+
"reasoning": true,
|
|
344
|
+
"input": ["text", "image"],
|
|
345
|
+
"cost": {
|
|
346
|
+
"input": .1,
|
|
347
|
+
"output": .5,
|
|
348
|
+
"cacheRead": .01,
|
|
349
|
+
"cacheWrite": .125,
|
|
350
|
+
"tiers": [{
|
|
351
|
+
"inputTokensAbove": 272e3,
|
|
352
|
+
"input": .2,
|
|
353
|
+
"output": .75,
|
|
354
|
+
"cacheRead": .02,
|
|
355
|
+
"cacheWrite": .25
|
|
356
|
+
}]
|
|
357
|
+
},
|
|
358
|
+
"contextWindow": 105e4,
|
|
359
|
+
"maxTokens": 128e3,
|
|
360
|
+
"thinkingLevelMap": {
|
|
361
|
+
"off": null,
|
|
362
|
+
"minimal": null,
|
|
363
|
+
"low": "low",
|
|
364
|
+
"medium": "medium",
|
|
365
|
+
"high": "high",
|
|
366
|
+
"xhigh": "xhigh",
|
|
367
|
+
"max": "max"
|
|
368
|
+
},
|
|
369
|
+
"compat": {
|
|
370
|
+
"supportsStrictMode": true,
|
|
371
|
+
"supportsOpenAIGrammarTools": true,
|
|
372
|
+
"supportsAdditionalTools": true,
|
|
373
|
+
"supportsToolSearch": true,
|
|
374
|
+
"supportsExplicitPromptCacheMode": true
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"gpt-6-sol": {
|
|
378
|
+
"id": "gpt-6-sol",
|
|
379
|
+
"name": "GPT-6 Sol",
|
|
380
|
+
"api": "openai-responses",
|
|
381
|
+
"provider": "openai",
|
|
382
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
383
|
+
"reasoning": true,
|
|
384
|
+
"input": ["text", "image"],
|
|
385
|
+
"cost": {
|
|
386
|
+
"input": 2,
|
|
387
|
+
"output": 10,
|
|
388
|
+
"cacheRead": .2,
|
|
389
|
+
"cacheWrite": 2.5,
|
|
390
|
+
"tiers": [{
|
|
391
|
+
"inputTokensAbove": 272e3,
|
|
392
|
+
"input": 4,
|
|
393
|
+
"output": 15,
|
|
394
|
+
"cacheRead": .4,
|
|
395
|
+
"cacheWrite": 5
|
|
396
|
+
}]
|
|
397
|
+
},
|
|
398
|
+
"contextWindow": 105e4,
|
|
399
|
+
"maxTokens": 128e3,
|
|
400
|
+
"thinkingLevelMap": {
|
|
401
|
+
"off": null,
|
|
402
|
+
"minimal": null,
|
|
403
|
+
"low": "low",
|
|
404
|
+
"medium": "medium",
|
|
405
|
+
"high": "high",
|
|
406
|
+
"xhigh": "xhigh",
|
|
407
|
+
"max": "max"
|
|
408
|
+
},
|
|
409
|
+
"compat": {
|
|
410
|
+
"supportsStrictMode": true,
|
|
411
|
+
"supportsOpenAIGrammarTools": true,
|
|
412
|
+
"supportsAdditionalTools": true,
|
|
413
|
+
"supportsToolSearch": true,
|
|
414
|
+
"supportsExplicitPromptCacheMode": true
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
"anthropic": { "claude-opus-5-5": {
|
|
419
|
+
"id": "claude-opus-5-5",
|
|
420
|
+
"name": "Claude Opus 5.5",
|
|
421
|
+
"api": "anthropic-messages",
|
|
422
|
+
"provider": "anthropic",
|
|
423
|
+
"baseUrl": "https://api.anthropic.com",
|
|
424
|
+
"reasoning": true,
|
|
425
|
+
"input": ["text", "image"],
|
|
426
|
+
"cost": {
|
|
427
|
+
"input": 4,
|
|
428
|
+
"output": 20,
|
|
429
|
+
"cacheRead": .2,
|
|
430
|
+
"cacheWrite": 5
|
|
431
|
+
},
|
|
432
|
+
"contextWindow": 1e6,
|
|
433
|
+
"maxTokens": 128e3,
|
|
434
|
+
"compat": {
|
|
435
|
+
"supportsMidConvoEffort": true,
|
|
436
|
+
"forceAdaptiveThinking": true,
|
|
437
|
+
"supportsTemperature": false,
|
|
438
|
+
"supportsStrictTools": true
|
|
439
|
+
},
|
|
440
|
+
"thinkingLevelMap": {
|
|
441
|
+
"off": null,
|
|
442
|
+
"xhigh": "xhigh",
|
|
443
|
+
"max": "max"
|
|
444
|
+
}
|
|
445
|
+
} }
|
|
446
|
+
};
|
|
447
|
+
/**
|
|
448
|
+
* Supplemental catalog models for one pi-ai provider route.
|
|
449
|
+
* @param provider - provider route key.
|
|
450
|
+
* @returns models to merge when the installed catalog omits them.
|
|
451
|
+
*/
|
|
452
|
+
function supplementalCatalogModels(provider) {
|
|
453
|
+
const route = SUPPLEMENT[provider];
|
|
454
|
+
if (route === void 0) return [];
|
|
455
|
+
return Object.values(route);
|
|
456
|
+
}
|
|
457
|
+
//#endregion
|
|
254
458
|
//#region lib/types/catalog.js
|
|
255
459
|
/**
|
|
256
460
|
* Materialization of one provider route's model catalog. The installed pi-ai
|
|
@@ -370,7 +574,9 @@ function catalogProviderIds() {
|
|
|
370
574
|
function catalogModels(provider) {
|
|
371
575
|
if (!catalogProviders().has(provider)) return /* @__PURE__ */ new Map();
|
|
372
576
|
const models = getBuiltinModels(provider);
|
|
373
|
-
|
|
577
|
+
const map = new Map(models.map((model) => [model.id, model]));
|
|
578
|
+
for (const model of supplementalCatalogModels(provider)) if (!map.has(model.id)) map.set(model.id, model);
|
|
579
|
+
return map;
|
|
374
580
|
}
|
|
375
581
|
/**
|
|
376
582
|
* Disposition of every `OpenAICompletionsCompat` field. The `Record` key type
|
package/package.json
CHANGED