@songtonyli/dsh-cli 0.1.69 → 0.1.70

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.69; `dsh --version`
29
+ Requires Node `^22.19.0 || >=24.0.0`. Version 0.1.70; `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.69 (deepseek-harness 0.2.1-alpha.2)')
21
+ console.log('@songtonyli/dsh-cli 0.1.70 (deepseek-harness 0.2.1-alpha.2)')
22
22
  process.exit(0)
23
23
  }
24
24
 
@@ -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.2.1-alpha.2-beb7138` + ({}.DSH_CLIENT_GIT_DIRTY === "true" ? "-dirty" : "");
170
+ return `0.2.1-alpha.2-0fbc8b9` + ({}.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 }) {
@@ -87,8 +87,8 @@
87
87
  en: b6bd570c0159ba08
88
88
  zh: 7d2d91eea6a8d830
89
89
  /deepseek-ai-dsh-llm-pi-ai/known-limitations-and-deferred-work:
90
- en: 552281e47ba3980f
91
- zh: 4af4dff3d9fa52d5
90
+ en: 895f7600d32339c2
91
+ zh: be3bd102c49d7800
92
92
  /deepseek-ai-dsh-llm-pi-ai/known-limitations-and-deferred-work/dev-note:
93
93
  en: 3678dd0f6642c2a5
94
94
  zh: 75cbdd064cc64282
@@ -237,7 +237,7 @@ These limits define where the adapter stops and future work begins. They are cur
237
237
  - **Images are accepted only in user and tool-result messages** — images in system, developer, or assistant history fail with `UNSUPPORTED_CONTENT` on both conversion paths.
238
238
  - **Provider HTTP status is unavailable** — pi-ai error events do not expose a stable HTTP status across providers.
239
239
  - **Retry policy is provider-owned, not an SDK retry** — pi-ai SDK retries stay disabled so durable agent steps and `llm/retry` events own every visible attempt, and direct `ctx.llm.stream()` calls remain single-attempt.
240
- - **Streamed tool-call arguments are parsed once, when the call ends** — the installed pi-ai carries [`patches/@earendil-works__pi-ai@1.0.2.patch`](../../../patches/@earendil-works__pi-ai@1.0.2.patch), which removes the per-delta re-parse of the whole accumulated argument JSON in every stream adapter (upstream [earendil-works/pi#9265](https://github.com/earendil-works/pi/issues/9265)); unpatched, a multi-megabyte argument stream costs O(n²) CPU on the event loop and stalls every session in the process. Until `toolcall_end`, a pi-ai partial's tool-call `arguments` stays `{}`; this adapter reads only the delta strings and the finalized arguments. Re-apply or retire the patch on every pi-ai upgrade.
240
+ - **pi-ai partial tool-call arguments may be populated during streaming** — this adapter reads only the delta strings and finalized arguments. The LLM package does not depend on partial arguments before `toolcall_end`.
241
241
 
242
242
  <a id="dev-note"></a>
243
243
  ### Dev Note
@@ -237,7 +237,7 @@ pi-ai 事件变成 harness 的推理、文本、工具调用、用量与 finish
237
237
  - **图片只在 user 与工具结果消息中被接受**——system、developer 或 assistant 历史中的图片在两条转换路径上都会以 `UNSUPPORTED_CONTENT` 失败。
238
238
  - **提供方 HTTP 状态不可用**——pi-ai 错误事件不跨提供方暴露稳定 HTTP 状态。
239
239
  - **重试策略由提供方自有,而非 SDK 重试**——pi-ai SDK 重试保持禁用,因此持久 agent(智能体)步骤与 `llm/retry` 事件拥有每个可见尝试,直接 `ctx.llm.stream()` 调用仍是单次尝试。
240
- - **流式工具调用参数只在调用结束时解析一次**——安装的 pi-ai 带有 [`patches/@earendil-works__pi-ai@1.0.2.patch`](../../../patches/@earendil-works__pi-ai@1.0.2.patch),它移除了每个流适配器中对整段累计参数 JSON 的逐 delta 重新解析(上游 [earendil-works/pi#9265](https://github.com/earendil-works/pi/issues/9265));未打补丁时,数 MB 的参数流会在事件循环上消耗 O(n²) CPU,并使进程内所有会话停滞。在 `toolcall_end` 之前,pi-ai partial 的工具调用 `arguments` 保持为 `{}`;本适配器只读取 delta 字符串与最终参数。每次升级 pi-ai 时都要重新应用或撤销该补丁。
240
+ - **pi-ai partial 工具调用参数可能在流式传输期间填充**——本适配器只读取 delta 字符串与最终参数;LLM 包不会依赖 `toolcall_end` 之前的 partial 参数。
241
241
 
242
242
  <a id="dev-note"></a>
243
243
  ### 开发备注
@@ -41,7 +41,7 @@
41
41
  "@deepseek-ai/dsh-brand": "0.2.1-alpha.2",
42
42
  "@deepseek-ai/dsh-util-values": "0.2.1-alpha.2",
43
43
  "@deepseek-ai/schemastery": "3.18.5-alpha.1",
44
- "@earendil-works/pi-ai": "^1.0.2"
44
+ "@earendil-works/pi-ai": "^1.1.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@deepseek-ai/cordis": "4.0.5-alpha.1",
@@ -9,8 +9,8 @@
9
9
  en: fd474288bb2dac31
10
10
  zh: e0e109692d3df1c4
11
11
  /deepseek-ai-dsh-sandbox-apple-container/summary:
12
- en: 6fcdeb62db78134c
13
- zh: e710602af4bd1a41
12
+ en: 20f21185b9538294
13
+ zh: f421f10616852e8f
14
14
  /deepseek-ai-dsh-sandbox-apple-container/table-of-contents:
15
15
  en: d152484eb41ac6b4
16
16
  zh: 09388d293f9be9cb
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- Use this package to run confined bash, terminal, and PTC commands inside an [Apple `container`](https://github.com/apple/container) Linux VM on macOS on Apple silicon. The VM mounts only the session workspace at its host path, so commands cannot read or change other host files, and the model's file tools are held to the same read scope. Secret files such as `.env` are masked, credential-shaped environment variables never reach the guest, and `.git` stays read-only. On every other host, and for sessions switched with `/sandbox local`, the package confines through the inherited local sandbox chain.
12
+ Use this package to confine bash, terminal, and PTC commands in an [Apple `container`](https://github.com/apple/container) Linux VM on macOS with Apple silicon and CLI 1.5.0 or newer. The VM mounts only the session workspace, limits model file tools to the same read scope, masks `.env` files, excludes credential-shaped environment variables, and makes `.git` read-only. Other hosts and sessions switched with `/sandbox local` use the inherited local sandbox chain.
13
13
 
14
14
  ## Table of Contents
15
15
 
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- 使用本包可以在搭载 Apple 芯片的 macOS 上,于 [Apple `container`](https://github.com/apple/container) Linux 虚拟机中运行受限的 bash、终端与 PTC 命令。虚拟机只在宿主机路径处挂载会话工作区,因此命令无法读取或修改其他宿主机文件,模型的文件工具也受同一读取范围约束。`.env` 等密钥文件被遮蔽,形似凭据的环境变量永远不会进入客户机,`.git` 保持只读。在其他所有主机上,以及通过 `/sandbox local` 切换的会话中,本包通过继承的本地沙箱链进行限制。
12
+ 使用本包可在搭载 Apple 芯片、运行 Apple `container` CLI 1.5.0 或更高版本的 macOS 上,将 bash、终端和 PTC 命令限制在 [Apple `container`](https://github.com/apple/container) Linux 虚拟机中。虚拟机只挂载会话工作区,模型文件工具也受相同读取范围限制;`.env` 文件会被遮蔽,类似凭据的环境变量不会传入客户机,`.git` 保持只读。其他主机和通过 `/sandbox local` 切换的会话使用继承的本地沙箱链。
13
13
 
14
14
  ## 目录
15
15
 
@@ -553,7 +553,6 @@ export const stream = (model, context, options) => {
553
553
  const block = blocks[index];
554
554
  if (block && block.type === "toolCall") {
555
555
  block.partialJson += event.delta.partial_json;
556
- block.arguments = parseStreamingJson(block.partialJson);
557
556
  stream.push({
558
557
  type: "toolcall_delta",
559
558
  contentIndex: index,
@@ -461,7 +461,6 @@ function handleContentBlockDelta(event, blocks, output, stream) {
461
461
  }
462
462
  else if (delta?.toolUse && block?.type === "toolCall") {
463
463
  block.partialJson = (block.partialJson || "") + (delta.toolUse.input || "");
464
- block.arguments = parseStreamingJson(block.partialJson);
465
464
  stream.push({ type: "toolcall_delta", contentIndex: index, delta: delta.toolUse.input || "", partial: output });
466
465
  }
467
466
  else if (delta?.reasoningContent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songtonyli/dsh-cli",
3
- "version": "0.1.69",
3
+ "version": "0.1.70",
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",