@songtonyli/dsh-cli 0.1.49 → 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 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.49; `dsh --version`
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.49 (deepseek-harness 0.1.7-rc.2)')
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
 
@@ -48,9 +48,9 @@
48
48
  "micromark-util-sanitize-uri": "^2.0.1",
49
49
  "simple-icons": "16.31.0",
50
50
  "@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
51
- "@deepseek-ai/cordis": "~4.0.4",
52
51
  "@deepseek-ai/dsh-util-code-language": "0.1.7-rc.2",
53
- "@deepseek-ai/dsh-util-workspace-path": "0.1.7-rc.2"
52
+ "@deepseek-ai/dsh-util-workspace-path": "0.1.7-rc.2",
53
+ "@deepseek-ai/cordis": "~4.0.4"
54
54
  },
55
55
  "files": [
56
56
  "lib/index.js",
@@ -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-33ff0ef` + ({}.DSH_CLIENT_GIT_DIRTY === "true" ? "-dirty" : "");
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 }) {
@@ -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
- return new Map(models.map((model) => [model.id, model]));
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
@@ -4096,9 +4096,9 @@ function floatingOutSpans(fade) {
4096
4096
  //#region lib/types/spinner.js
4097
4097
  /**
4098
4098
  * Working indicators: one single-column animation per scenario, so the
4099
- * glyph itself names the work — reasoning churns, streaming text fills,
4100
- * commands spin the caret, reads pulse a lens, edits set a diamond,
4101
- * delegation dives, plan items march corners, waits turn a clock, and tools
4099
+ * glyph itself names the work — reasoning churns, streaming text blooms,
4100
+ * commands and edits set a diamond, reads pulse a lens,
4101
+ * delegation dives, todo items blink a dot, waits turn a clock, and tools
4102
4102
  * with no family orbit the moon — plus the shimmer the working spinner's
4103
4103
  * activity word carries.
4104
4104
  *
@@ -4126,22 +4126,14 @@ const SPINNER_FRAMES = {
4126
4126
  "⠇",
4127
4127
  "⠏"
4128
4128
  ],
4129
- /** Visible text streaming in: a bar rising and falling as words land. */
4129
+ /** Visible text streaming in: a small asterisk grows and settles as words land. */
4130
4130
  writing: [
4131
- "▁",
4132
- "▂",
4133
- "▃",
4134
- "▄",
4135
- "▅",
4136
- "▆",
4137
- "▇",
4138
- "█",
4139
- "▇",
4140
- "▆",
4141
- "▅",
4142
- "▄",
4143
- "▃",
4144
- "▂"
4131
+ "·",
4132
+ "✣",
4133
+ "✳",
4134
+ "✦",
4135
+ "✽",
4136
+ "✤"
4145
4137
  ],
4146
4138
  /** A tool with no family of its own: the moon orbiting. */
4147
4139
  calling: [
@@ -4150,12 +4142,12 @@ const SPINNER_FRAMES = {
4150
4142
  "◑",
4151
4143
  "◒"
4152
4144
  ],
4153
- /** Command execution: the terminal caret spinning. */
4145
+ /** Command execution: the same diamond animation as file edits. */
4154
4146
  shell: [
4155
- "─",
4156
- "\\",
4157
- "│",
4158
- "/"
4147
+ "◇",
4148
+ "◈",
4149
+ "◆",
4150
+ "◈"
4159
4151
  ],
4160
4152
  /** Reading and searching: a lens pulsing into focus. */
4161
4153
  search: [
@@ -4182,13 +4174,8 @@ const SPINNER_FRAMES = {
4182
4174
  "⠇",
4183
4175
  "⠃"
4184
4176
  ],
4185
- /** Plan progress: corners marching as items advance. */
4186
- todo: [
4187
- "▖",
4188
- "▘",
4189
- "▝",
4190
- "▗"
4191
- ],
4177
+ /** Todo progress: a dot blinking in place. */
4178
+ todo: ["·", " "],
4192
4179
  /** Waiting on a retry delay or a human answer: a clock turning. */
4193
4180
  waiting: [
4194
4181
  "◷",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songtonyli/dsh-cli",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "description": "The dsh terminal agent: an interactive TUI over the DeepSeek Harness, with its whole Node runtime bundled in one install.",
5
5
  "license": "MIT",
6
6
  "type": "module",