@songtonyli/dsh-cli 0.1.47 → 0.1.48

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.47; `dsh --version`
29
+ Requires Node `^22.19.0 || >=24.0.0`. Version 0.1.48; `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.47 (deepseek-harness 0.1.7-rc.2)')
21
+ console.log('@songtonyli/dsh-cli 0.1.48 (deepseek-harness 0.1.7-rc.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.1.7-rc.2-2020eb7` + ({}.DSH_CLIENT_GIT_DIRTY === "true" ? "-dirty" : "");
170
+ return `0.1.7-rc.2-ce26a9e` + ({}.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 }) {
@@ -27,8 +27,8 @@
27
27
  en: fcbbad190e87edf0
28
28
  zh: 4ccdfdcbdbd568df
29
29
  /deepseek-ai-dsh-llm-cursor/understand-the-implementation:
30
- en: 238511d8c73013ee
31
- zh: cf4441888bbcfa78
30
+ en: 4c9294914ef55e88
31
+ zh: 10a18836ee6f7cc5
32
32
  /deepseek-ai-dsh-llm-cursor/further-exploration:
33
33
  en: 86cfc3c8b643ad03
34
34
  zh: b0762ac35601eae9
@@ -68,7 +68,7 @@ Request-time token order is: launch-environment `CURSOR_ACCESS_TOKEN`, then the
68
68
 
69
69
  A new Run is rebuilt from harness history, system prompt, and MCP tool definitions (`providerIdentifier: dsh`, `clientName: dsh`). Cursor's server builds the model prompt from `root_prompt_messages_json`, never renders `conversation_state.turns` into it, and discards a `{"role":"system"}` entry there in favour of its own prompt. The adapter therefore publishes the system prompt as a `<rules>` user prompt message and replays every prior turn as `user`, `assistant`, and `tool` prompt messages, writing each historic harness tool call as the `CallDynamicTool` call Cursor records for an MCP tool; the turn structures ride along for the server's bookkeeping. A Cursor CLI Run exposes MCP tools to the model only through `GetDynamicTools` and `CallDynamicTool`, so the request-context answer adds one global Cursor rule telling the model that Cursor's built-in tools return a rejection here, that harness tools are called with `CallDynamicTool` in namespace `dsh`, and which tool names exist.
70
70
 
71
- Text, thinking, usage, and MCP tool calls become `StreamChunk`. MCP tool calls end the step once Cursor sends the checkpoint that follows the model's last parallel call, or after `toolCallSettleMs` without a frame. When the request names a Session and is not a compaction or title request, the Run then parks: the adapter keeps the stream open with a `clientHeartbeat` every five seconds. The next request from that Session resumes it when its history before the last assistant message is unchanged and that message is followed only by the pending calls' results and harness-injected user-role context; the adapter answers each call with `mcpResult` on the same stream, appends such context to the last result, and keeps reading. Any other request, a Run that died while parked, or one older than `parkedRunTimeoutMs` falls back to a new Run that replays the in-flight turn with its results and sends a fixed continuation notice as the user message a Run requires; a `resumeAction` is not used because the server restarts the turn from its user message instead of continuing it. A Cursor-native or CLI Pi workspace exec (`read`, `shell`, `piRead`, and kin) is answered with its typed rejection naming the harness tool to call through `CallDynamicTool`, so the Run continues and the model reads the refusal as a tool outcome; text after a refused exec starts a new text block. A native Cursor question receives a typed rejection that directs the model to the harness `ask_user_question` MCP tool when available, or to ask in a reply otherwise; the Run continues. A CLI hook is answered with an empty matching response. An MCP-state exec returns the advertised `dsh` tools. Any other exec this build cannot type is answered with ExecClientThrow so the Run continues. An exec with no payload still fails the step.
71
+ Text, thinking, usage, and MCP tool calls become `StreamChunk`. MCP tool calls end the step once Cursor sends the checkpoint that follows the model's last parallel call, or after `toolCallSettleMs` without a frame. When the request names a Session and is not a compaction or title request, the Run then parks: the adapter keeps the stream open with a `clientHeartbeat` every five seconds. The next request from that Session resumes it when its history before the last assistant message is unchanged and that message is followed only by the pending calls' results and harness-injected user-role context; the adapter answers each call with `mcpResult` on the same stream, appends such context to the last result, and keeps reading. Any other request, a Run that died while parked, or one older than `parkedRunTimeoutMs` falls back to a new Run that replays the in-flight turn with its results and sends a fixed continuation notice as the user message a Run requires; a `resumeAction` is not used because the server restarts the turn from its user message instead of continuing it. A Cursor-native or CLI Pi workspace exec (`read`, `shell`, `piRead`, and kin) is answered with its typed rejection naming the harness tool to call through `CallDynamicTool`, so the Run continues and the model reads the refusal as a tool outcome; text after a refused exec starts a new text block. A native Cursor question receives a typed rejection that directs the model to the harness `ask_user_question` MCP tool when available, or to ask in a reply otherwise; the Run continues. A web-search approval query is approved because Cursor runs that search on its own side; a web-fetch approval query is rejected with the reason the `fetch` exec carries, because an approved fetch returns here as that refused exec. A CLI hook is answered with an empty matching response. An MCP-state exec returns the advertised `dsh` tools. Any other exec this build cannot type is answered with ExecClientThrow so the Run continues. An exec with no payload still fails the step.
72
72
 
73
73
  Attribution headers required by `LlmAdapter` go on every HTTP/2 request, with Cursor client headers `x-ghost-mode`, `x-cursor-client-version`, and `x-cursor-client-type`.
74
74
 
@@ -68,7 +68,7 @@ TUI:`/login llm-cursor/cursor`。无头不会打开浏览器;导出 `CURSOR_
68
68
 
69
69
  新的 Run 由 harness 历史、系统提示和 MCP 工具定义重建(`providerIdentifier: dsh`,`clientName: dsh`)。Cursor 服务端只从 `root_prompt_messages_json` 构建模型提示,从不把 `conversation_state.turns` 渲染进去,并且会丢弃其中的 `{"role":"system"}` 条目而使用自己的提示。因此适配器把系统提示作为 `<rules>` user 提示消息发布,并把每个先前轮次重放为 `user`、`assistant` 和 `tool` 提示消息,把每个历史 harness 工具调用写成 Cursor 为 MCP 工具记录的 `CallDynamicTool` 调用;轮次结构一同发送,供服务端记账。Cursor CLI 的 Run 只通过 `GetDynamicTools` 和 `CallDynamicTool` 向模型暴露 MCP 工具,因此请求上下文的应答额外带一条全局 Cursor 规则,告知模型 Cursor 内建工具在这里会返回拒绝、harness 工具以命名空间 `dsh` 中的 `CallDynamicTool` 调用,以及有哪些工具名。
70
70
 
71
- 文本、thinking、用量与 MCP 工具调用变成 `StreamChunk`。当 Cursor 发出模型最后一个并行调用之后的检查点,或 `toolCallSettleMs` 内没有新帧时,MCP 工具调用结束该步。若请求带有 Session 且不是压缩或标题请求,该 Run 随后挂起:适配器每五秒发送一次 `clientHeartbeat` 保持流开启。该 Session 的下一次请求在以下条件成立时恢复它:最后一条 assistant 消息之前的历史不变,且该消息之后只有待处理调用的结果以及 harness 注入的 user 角色上下文;适配器在同一条流上以 `mcpResult` 应答每个调用,把这类上下文追加到最后一个结果之后,并继续读取。任何其他请求、挂起期间死亡的 Run,或超过 `parkedRunTimeoutMs` 的 Run,都回退为新的 Run:它重放该进行中的轮次及其结果,并把一条固定的继续提示作为 Run 必需的用户消息发送;不使用 `resumeAction`,因为服务端会从该轮的用户消息重新开始而不是继续。Cursor 原生或 CLI Pi 工作区 exec(`read`、`shell`、`piRead` 及同类)以其类型化的拒绝应答,并指出应通过 `CallDynamicTool` 调用的 harness 工具,因此 Run 继续进行,模型把该拒绝当作工具结果读取;被拒绝的 exec 之后的文本开启新的文本块。Cursor 原生提问会收到类型化的拒绝:若 harness 提供 `ask_user_question` MCP 工具,拒绝会引导模型调用该工具;否则会引导模型在回复中提问。Run 随后继续。CLI 钩子以空的匹配响应应答。MCP-state exec 返回已通告的 `dsh` 工具。本构建无法类型化的其他 exec 以 ExecClientThrow 应答,以便 Run 继续。没有 payload 的 exec 仍使该步失败。
71
+ 文本、thinking、用量与 MCP 工具调用变成 `StreamChunk`。当 Cursor 发出模型最后一个并行调用之后的检查点,或 `toolCallSettleMs` 内没有新帧时,MCP 工具调用结束该步。若请求带有 Session 且不是压缩或标题请求,该 Run 随后挂起:适配器每五秒发送一次 `clientHeartbeat` 保持流开启。该 Session 的下一次请求在以下条件成立时恢复它:最后一条 assistant 消息之前的历史不变,且该消息之后只有待处理调用的结果以及 harness 注入的 user 角色上下文;适配器在同一条流上以 `mcpResult` 应答每个调用,把这类上下文追加到最后一个结果之后,并继续读取。任何其他请求、挂起期间死亡的 Run,或超过 `parkedRunTimeoutMs` 的 Run,都回退为新的 Run:它重放该进行中的轮次及其结果,并把一条固定的继续提示作为 Run 必需的用户消息发送;不使用 `resumeAction`,因为服务端会从该轮的用户消息重新开始而不是继续。Cursor 原生或 CLI Pi 工作区 exec(`read`、`shell`、`piRead` 及同类)以其类型化的拒绝应答,并指出应通过 `CallDynamicTool` 调用的 harness 工具,因此 Run 继续进行,模型把该拒绝当作工具结果读取;被拒绝的 exec 之后的文本开启新的文本块。Cursor 原生提问会收到类型化的拒绝:若 harness 提供 `ask_user_question` MCP 工具,拒绝会引导模型调用该工具;否则会引导模型在回复中提问。Run 随后继续。网页搜索的批准查询会被批准,因为该搜索由 Cursor 在自己那一侧执行;网页抓取的批准查询会被拒绝,并带上 `fetch` exec 所携带的原因,因为获批的抓取会作为那个被拒绝的 exec 回到这里。CLI 钩子以空的匹配响应应答。MCP-state exec 返回已通告的 `dsh` 工具。本构建无法类型化的其他 exec 以 ExecClientThrow 应答,以便 Run 继续。没有 payload 的 exec 仍使该步失败。
72
72
 
73
73
  `LlmAdapter` 要求的归属头出现在每一次 HTTP/2 请求上,并带有 Cursor 客户端头 `x-ghost-mode`、`x-cursor-client-version` 和 `x-cursor-client-type`。
74
74
 
@@ -110,6 +110,16 @@ const AgentRunRequestSchema = /*@__PURE__*/ messageDesc(file_agent, 91);
110
110
  */
111
111
  const InteractionResponseSchema = /*@__PURE__*/ messageDesc(file_agent, 111);
112
112
  /**
113
+ * Describes the message agent.v1.WebFetchRequestResponse.
114
+ * Use `create(WebFetchRequestResponseSchema)` to create a new message.
115
+ */
116
+ const WebFetchRequestResponseSchema = /*@__PURE__*/ messageDesc(file_agent, 113);
117
+ /**
118
+ * Describes the message agent.v1.WebFetchRequestResponse_Rejected.
119
+ * Use `create(WebFetchRequestResponse_RejectedSchema)` to create a new message.
120
+ */
121
+ const WebFetchRequestResponse_RejectedSchema = /*@__PURE__*/ messageDesc(file_agent, 115);
122
+ /**
113
123
  * Describes the message agent.v1.AskQuestionInteractionResponse.
114
124
  * Use `create(AskQuestionInteractionResponseSchema)` to create a new message.
115
125
  */
@@ -2719,6 +2729,7 @@ function rejectUnknownExec(stream, exec) {
2719
2729
  } })
2720
2730
  } });
2721
2731
  }
2732
+ /** Cursor runs an approved web search on its own side, so this adapter has nothing to execute. */
2722
2733
  function approveWebSearch(stream, query) {
2723
2734
  sendClient(stream, { message: {
2724
2735
  case: "interactionResponse",
@@ -2734,6 +2745,26 @@ function approveWebSearch(stream, query) {
2734
2745
  })
2735
2746
  } });
2736
2747
  }
2748
+ /**
2749
+ * Cursor performs an approved web fetch in the client through a `fetchArgs` exec this adapter
2750
+ * refuses, so approval cannot produce page content. The rejection carries the reason that exec
2751
+ * would have carried, keeping fetched pages on the harness `web_fetch` tool that logs them.
2752
+ */
2753
+ function rejectNativeFetch(stream, query, mcpTools) {
2754
+ sendClient(stream, { message: {
2755
+ case: "interactionResponse",
2756
+ value: create(InteractionResponseSchema, {
2757
+ id: query.id,
2758
+ result: {
2759
+ case: "webFetchRequestResponse",
2760
+ value: create(WebFetchRequestResponseSchema, { result: {
2761
+ case: "rejected",
2762
+ value: create(WebFetchRequestResponse_RejectedSchema, { reason: nativeRejectionReason("fetchArgs", mcpTools) })
2763
+ } })
2764
+ }
2765
+ })
2766
+ } });
2767
+ }
2737
2768
  /** A human answer must return through a logged harness tool result or later user message. */
2738
2769
  function rejectNativeQuestion(stream, query, mcpTools) {
2739
2770
  const questionTool = mcpTools.some((tool) => tool.name === "ask_user_question");
@@ -3043,6 +3074,12 @@ function handleServerMessage(message, run, state) {
3043
3074
  approveWebSearch(stream, query);
3044
3075
  return {};
3045
3076
  }
3077
+ if (query.query.case === "webFetchRequestQuery") {
3078
+ chunks.push(...closeOpen(state.open));
3079
+ state.open = void 0;
3080
+ rejectNativeFetch(stream, query, payload.mcpTools);
3081
+ return { chunks };
3082
+ }
3046
3083
  if (query.query.case === "askQuestionInteractionQuery") {
3047
3084
  chunks.push(...closeOpen(state.open));
3048
3085
  state.open = void 0;
@@ -6,12 +6,14 @@ Convert, recalculate, and directly render local Office documents with prebuilt L
6
6
 
7
7
  Binary `.doc`, `.xls`, and `.ppt` inputs must be OLE compound documents, such as Office 97–2003 files. Renamed RTF/HTML and `.wps` inputs are unsupported. `missingFonts` is empty for binary inputs because their font tables are interpreted by LibreOffice rather than the OOXML inspector.
8
8
 
9
+ The Node API version is independent of its platform engine versions. Version 0.1.2 uses Windows engines 0.1.2 and retains macOS/WASM engines 0.1.1. `ENGINE_VERSION` and `discoverRuntime().version` identify the Node API; `ENGINE_VERSIONS` lists the exact compatible engine versions.
10
+
9
11
  ## Installation and usage
10
12
 
11
13
  Install with Node.js 22.19.0 or newer:
12
14
 
13
15
  ```sh
14
- npm install @deepseek-ai/libreoffice-kit@0.1.0
16
+ npm install @deepseek-ai/libreoffice-kit@0.1.2
15
17
  ```
16
18
 
17
19
  npm installs the matching native engine on macOS/Windows ARM64 or x64, and the shared WASM engine on Linux. macOS and Windows require their native package; a missing or invalid package rejects `createConverter` with `unavailable`, without switching to WASM. Linux uses WASM unless a compatible development native package was installed explicitly. Conversion failures never switch engines.
@@ -6,12 +6,14 @@
6
6
 
7
7
  二进制 `.doc`、`.xls`、`.ppt` 输入必须是 OLE 复合文档,例如 Office 97–2003 文件。不支持改后缀的 RTF/HTML 和 `.wps`。二进制输入的 `missingFonts` 为空,因为其字体表由 LibreOffice 读取,而不是由 OOXML 检查器读取。
8
8
 
9
+ Node API 与各平台引擎独立指定版本。0.1.2 使用 Windows 引擎 0.1.2,保留 macOS/WASM 引擎 0.1.1。`ENGINE_VERSION` 和 `discoverRuntime().version` 表示 Node API 版本;`ENGINE_VERSIONS` 列出各平台兼容的精确引擎版本。
10
+
9
11
  ## 安装与使用
10
12
 
11
13
  使用 Node.js 22.19.0 或更新版本安装:
12
14
 
13
15
  ```sh
14
- npm install @deepseek-ai/libreoffice-kit@0.1.0
16
+ npm install @deepseek-ai/libreoffice-kit@0.1.2
15
17
  ```
16
18
 
17
19
  npm 在 macOS/Windows ARM64 或 x64 上安装匹配的原生引擎,在 Linux 上安装共享 WASM 引擎。macOS 和 Windows 必须具有对应原生包;包缺失或无效时,`createConverter` 以 `unavailable` 拒绝,不会切换到 WASM。Linux 使用 WASM,除非显式安装了兼容的原生开发包。转换失败不会切换引擎。
@@ -1211,11 +1211,18 @@ function resolveOptions(input = {}) {
1211
1211
  //#region lib/types/engine.js
1212
1212
  /** Resolve installed, version-matched engine packages without downloads or compilation. */
1213
1213
  const require = createRequire(import.meta.url);
1214
- /**
1215
- * Engine-family version every installed engine package must carry. The engine
1216
- * family shares its release version with this Node API.
1217
- */
1218
- const ENGINE_VERSION = "0.1.1";
1214
+ /** Node API release version returned by runtime discovery. */
1215
+ const ENGINE_VERSION = "0.1.2";
1216
+ /** Exact compatible engine versions; unchanged platforms retain their published packages. */
1217
+ const ENGINE_VERSIONS = Object.freeze({
1218
+ "darwin-arm64": "0.1.1",
1219
+ "darwin-x64": "0.1.1",
1220
+ "linux-arm64-glibc": "0.1.1",
1221
+ "linux-x64-glibc": "0.1.1",
1222
+ "win32-arm64": "0.1.2",
1223
+ "win32-x64": "0.1.2",
1224
+ wasm: "0.1.1"
1225
+ });
1219
1226
  /** npm scope and name prefix shared by the engine packages this adapter installs. */
1220
1227
  const ENGINE_PREFIX = "@deepseek-ai/libreoffice-kit";
1221
1228
  /**
@@ -1294,7 +1301,7 @@ async function readEngine(packageFile, backend, target) {
1294
1301
  const root = dirname(packageFile);
1295
1302
  const [pkg, manifest] = await Promise.all([readFile(packageFile, "utf8").then((text) => JSON.parse(text)), readFile(resolve(root, "prebuilds.json"), "utf8").then((text) => JSON.parse(text))]);
1296
1303
  const engine = manifest.engine;
1297
- if (pkg.name !== `${ENGINE_PREFIX}-${target}` || pkg.version !== "0.1.1" || manifest.version !== pkg.version || manifest.schemaVersion !== 1 || manifest.status !== "built" || engine === void 0 || engine.kind !== backend || manifest.platform !== target) throw new Error(`Installed LibreOfficeKit ${backend} package has an incompatible or incomplete manifest.`);
1304
+ if (pkg.name !== `${ENGINE_PREFIX}-${target}` || pkg.version !== ENGINE_VERSIONS[target] || manifest.version !== pkg.version || manifest.schemaVersion !== 1 || manifest.status !== "built" || engine === void 0 || engine.kind !== backend || manifest.platform !== target) throw new Error(`Installed LibreOfficeKit ${backend} package has an incompatible or incomplete manifest.`);
1298
1305
  const minimum = engine.glibcMinimum;
1299
1306
  if (minimum !== void 0 && (!target.endsWith("-glibc") || !glibcVersion(minimum))) throw new Error("Installed LibreOfficeKit engine has an invalid glibcMinimum.");
1300
1307
  const glibcFloor = minimum === void 0 ? {} : { glibcMinimum: minimum };
@@ -1412,7 +1419,7 @@ function validateOutput(bytes, format) {
1412
1419
  /** Offline discovery of the installed engine and public entry points. */
1413
1420
  /**
1414
1421
  * Inspect installed engine metadata without starting, downloading, or building an engine.
1415
- * @returns Public entry paths, engine version, and selected backend.
1422
+ * @returns Public entry paths, Node API version, and selected backend.
1416
1423
  * @throws ConversionError when the installed engine is unavailable or invalid.
1417
1424
  */
1418
1425
  async function discoverRuntime() {
@@ -1209,11 +1209,18 @@ function resolveOptions(input = {}) {
1209
1209
  //#region lib/types/engine.js
1210
1210
  /** Resolve installed, version-matched engine packages without downloads or compilation. */
1211
1211
  const require = createRequire(import.meta.url);
1212
- /**
1213
- * Engine-family version every installed engine package must carry. The engine
1214
- * family shares its release version with this Node API.
1215
- */
1216
- const ENGINE_VERSION = "0.1.1";
1212
+ /** Node API release version returned by runtime discovery. */
1213
+ const ENGINE_VERSION = "0.1.2";
1214
+ /** Exact compatible engine versions; unchanged platforms retain their published packages. */
1215
+ const ENGINE_VERSIONS = Object.freeze({
1216
+ "darwin-arm64": "0.1.1",
1217
+ "darwin-x64": "0.1.1",
1218
+ "linux-arm64-glibc": "0.1.1",
1219
+ "linux-x64-glibc": "0.1.1",
1220
+ "win32-arm64": "0.1.2",
1221
+ "win32-x64": "0.1.2",
1222
+ wasm: "0.1.1"
1223
+ });
1217
1224
  /** npm scope and name prefix shared by the engine packages this adapter installs. */
1218
1225
  const ENGINE_PREFIX = "@deepseek-ai/libreoffice-kit";
1219
1226
  /**
@@ -1292,7 +1299,7 @@ async function readEngine(packageFile, backend, target) {
1292
1299
  const root = dirname(packageFile);
1293
1300
  const [pkg, manifest] = await Promise.all([readFile(packageFile, "utf8").then((text) => JSON.parse(text)), readFile(resolve(root, "prebuilds.json"), "utf8").then((text) => JSON.parse(text))]);
1294
1301
  const engine = manifest.engine;
1295
- if (pkg.name !== `${ENGINE_PREFIX}-${target}` || pkg.version !== "0.1.1" || manifest.version !== pkg.version || manifest.schemaVersion !== 1 || manifest.status !== "built" || engine === void 0 || engine.kind !== backend || manifest.platform !== target) throw new Error(`Installed LibreOfficeKit ${backend} package has an incompatible or incomplete manifest.`);
1302
+ if (pkg.name !== `${ENGINE_PREFIX}-${target}` || pkg.version !== ENGINE_VERSIONS[target] || manifest.version !== pkg.version || manifest.schemaVersion !== 1 || manifest.status !== "built" || engine === void 0 || engine.kind !== backend || manifest.platform !== target) throw new Error(`Installed LibreOfficeKit ${backend} package has an incompatible or incomplete manifest.`);
1296
1303
  const minimum = engine.glibcMinimum;
1297
1304
  if (minimum !== void 0 && (!target.endsWith("-glibc") || !glibcVersion(minimum))) throw new Error("Installed LibreOfficeKit engine has an invalid glibcMinimum.");
1298
1305
  const glibcFloor = minimum === void 0 ? {} : { glibcMinimum: minimum };
@@ -1410,7 +1417,7 @@ function validateOutput(bytes, format) {
1410
1417
  /** Offline discovery of the installed engine and public entry points. */
1411
1418
  /**
1412
1419
  * Inspect installed engine metadata without starting, downloading, or building an engine.
1413
- * @returns Public entry paths, engine version, and selected backend.
1420
+ * @returns Public entry paths, Node API version, and selected backend.
1414
1421
  * @throws ConversionError when the installed engine is unavailable or invalid.
1415
1422
  */
1416
1423
  async function discoverRuntime() {
@@ -1919,4 +1926,4 @@ async function createConverter(options) {
1919
1926
  return createConverterWith(resolvedOptions, engine, defaultSharedState(resolvedOptions, engine));
1920
1927
  }
1921
1928
  //#endregion
1922
- export { CONVERSION_FORMATS, ConversionError, ENGINE_VERSION, IMAGE_FORMATS, createConverter, createConverterFactory, discoverRuntime };
1929
+ export { CONVERSION_FORMATS, ConversionError, ENGINE_VERSION, ENGINE_VERSIONS, IMAGE_FORMATS, createConverter, createConverterFactory, discoverRuntime };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/libreoffice-kit",
3
3
  "description": "Convert, recalculate, and render Office documents with prebuilt LibreOffice",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -339,7 +339,10 @@ const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) =>
339
339
  continue;
340
340
  }
341
341
  }
342
- canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
342
+ canonical[canonicalHeaderName] = headers[headerName]
343
+ .replace(/[\r\n]/g, " ")
344
+ .replace(/[ \t]+/g, " ")
345
+ .replace(/^ | $/g, "");
343
346
  }
344
347
  return canonical;
345
348
  };
@@ -14,7 +14,10 @@ export const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHead
14
14
  continue;
15
15
  }
16
16
  }
17
- canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
17
+ canonical[canonicalHeaderName] = headers[headerName]
18
+ .replace(/[\r\n]/g, " ")
19
+ .replace(/[ \t]+/g, " ")
20
+ .replace(/^ | $/g, "");
18
21
  }
19
22
  return canonical;
20
23
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "5.7.3",
3
+ "version": "5.7.4",
4
4
  "description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
5
5
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/signature-v4",
6
6
  "license": "Apache-2.0",
@@ -28,8 +28,8 @@
28
28
  }
29
29
  },
30
30
  "dependencies": {
31
- "@smithy/core": "^3.33.3",
32
- "@smithy/types": "^4.17.2",
31
+ "@smithy/core": "^3.35.0",
32
+ "@smithy/types": "^4.19.0",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {
@@ -1,5 +1,16 @@
1
1
  import {runAppleScript} from 'run-applescript';
2
2
 
3
+ // Only a double quote can end the AppleScript string literal. A backslash can pre-escape one, and line breaks are rejected as defense in depth.
4
+ const bundleIdentifierPattern = /^[^\n\r"\\]+$/u;
5
+
3
6
  export default async function bundleName(bundleId) {
7
+ if (typeof bundleId !== 'string') {
8
+ throw new TypeError('Expected a string bundle identifier');
9
+ }
10
+
11
+ if (!bundleIdentifierPattern.test(bundleId)) {
12
+ throw new TypeError(`Invalid bundle identifier: ${JSON.stringify(bundleId)}`);
13
+ }
14
+
4
15
  return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
5
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bundle-name",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Get bundle name from a bundle identifier (macOS): `com.apple.Safari` → `Safari`",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/bundle-name",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songtonyli/dsh-cli",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
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",
@@ -330,7 +330,7 @@
330
330
  "@deepseek-ai/dsh-workflow-ptc": "0.1.7-rc.2",
331
331
  "@deepseek-ai/dsh-workspace": "0.1.7-rc.2",
332
332
  "@deepseek-ai/dsh-workspace-changes": "0.1.7-rc.2",
333
- "@deepseek-ai/libreoffice-kit": "0.1.1",
333
+ "@deepseek-ai/libreoffice-kit": "0.1.2",
334
334
  "@deepseek-ai/node-addon-system": "0.1.2",
335
335
  "@deepseek-ai/schemastery": "3.18.4",
336
336
  "@earendil-works/pi-ai": "0.85.1",
@@ -385,7 +385,7 @@
385
385
  "@smithy/fetch-http-handler": "5.8.0",
386
386
  "@smithy/is-array-buffer": "2.2.0",
387
387
  "@smithy/node-http-handler": "4.7.3",
388
- "@smithy/signature-v4": "5.7.3",
388
+ "@smithy/signature-v4": "5.7.4",
389
389
  "@smithy/types": "4.19.0",
390
390
  "@smithy/util-buffer-from": "2.2.0",
391
391
  "@smithy/util-utf8": "2.3.0",
@@ -409,7 +409,7 @@
409
409
  "bowser": "2.14.1",
410
410
  "brotli": "1.3.3",
411
411
  "buffer-equal-constant-time": "1.0.1",
412
- "bundle-name": "4.1.0",
412
+ "bundle-name": "4.1.1",
413
413
  "bytes": "3.1.2",
414
414
  "ccount": "2.0.1",
415
415
  "character-entities-html4": "2.1.0",
@@ -568,9 +568,9 @@
568
568
  "optionalDependencies": {
569
569
  "@deepseek-ai/libreoffice-kit-darwin-arm64": "0.1.1",
570
570
  "@deepseek-ai/libreoffice-kit-darwin-x64": "0.1.1",
571
- "@deepseek-ai/libreoffice-kit-win32-arm64": "0.1.1",
571
+ "@deepseek-ai/libreoffice-kit-win32-arm64": "0.1.2",
572
572
  "@deepseek-ai/libreoffice-kit-wasm": "0.1.1",
573
- "@deepseek-ai/libreoffice-kit-win32-x64": "0.1.1",
573
+ "@deepseek-ai/libreoffice-kit-win32-x64": "0.1.2",
574
574
  "@deepseek-ai/node-addon-system-darwin-arm64": "0.1.2",
575
575
  "@deepseek-ai/node-addon-system-darwin-x64": "0.1.2",
576
576
  "@deepseek-ai/node-addon-system-linux-arm64": "0.1.2",