@sayknow-cli/coding-agent 0.7.22 → 0.7.23

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.7.23] - 2026-11-12
6
+
7
+ ### Fixed
8
+
9
+ - Reading a PDF works again. SKC pointed mupdf at its bundled 1.28.1 wasm in every install, but npm and bun installs resolve mupdf through markit-ai's `^1.27.0` range, and a loader from any other release (1.28.0, 1.28.6) cannot run that wasm (`m_[_] is not a function`). The bundled wasm is now used by compiled binaries only; other installs use the wasm that ships with the mupdf they resolved. 0.7.22 binaries were built with mupdf 1.28.6 and had the same failure; the build now pins mupdf to 1.28.1.
10
+
5
11
  ## [0.7.22] - 2026-11-12
6
12
 
7
13
  ### Added
@@ -1 +1 @@
1
- export declare function ensureMupdfWasmResolution(): void;
1
+ export declare function ensureMupdfWasmResolution(compiled?: boolean): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@sayknow-cli/coding-agent",
4
- "version": "0.7.22",
4
+ "version": "0.7.23",
5
5
  "description": "Sayknow-CLI CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://sayknow-cli.com",
7
7
  "author": "jaybeyond",
@@ -54,12 +54,12 @@
54
54
  "@agentclientprotocol/sdk": "1.3.0",
55
55
  "@babel/parser": "^7.29.3",
56
56
  "@mozilla/readability": "^0.6.0",
57
- "@sayknow-cli/stats": "0.7.22",
58
- "@sayknow-cli/agent-core": "0.7.22",
59
- "@sayknow-cli/ai": "0.7.22",
60
- "@sayknow-cli/natives": "0.7.22",
61
- "@sayknow-cli/tui": "0.7.22",
62
- "@sayknow-cli/utils": "0.7.22",
57
+ "@sayknow-cli/stats": "0.7.23",
58
+ "@sayknow-cli/agent-core": "0.7.23",
59
+ "@sayknow-cli/ai": "0.7.23",
60
+ "@sayknow-cli/natives": "0.7.23",
61
+ "@sayknow-cli/tui": "0.7.23",
62
+ "@sayknow-cli/utils": "0.7.23",
63
63
  "@puppeteer/browsers": "^2.13.0",
64
64
  "@types/turndown": "5.0.6",
65
65
  "@xterm/headless": "^6.0.0",
@@ -18,17 +18,25 @@
18
18
  * resolves in a workspace checkout but breaks every published install
19
19
  * (`bun install -g` / npm) where `@sayknow-cli/coding-agent` sits several
20
20
  * directories deeper and mupdf is hoisted elsewhere — that was the 0.5.8
21
- * startup crash. Refresh the vendored bytes from
22
- * `node_modules/mupdf/dist/mupdf-wasm.wasm` whenever markit-ai's mupdf
23
- * dependency moves.
21
+ * startup crash.
22
+ *
23
+ * MuPDF's JavaScript loader only runs the wasm built for the same release, so
24
+ * the hook is seeded in compiled binaries only. Anywhere else `mupdf` finds the
25
+ * wasm next to its own loader, which always matches, whatever version the
26
+ * installer resolved for markit-ai's `^1.27.0` range. A binary pairs these
27
+ * vendored bytes with the loader the lockfile resolves, so the root
28
+ * `overrides.mupdf` pin and the bytes
29
+ * (`node_modules/mupdf/dist/mupdf-wasm.wasm`) move together.
24
30
  *
25
31
  * This must run before the first `import("mupdf")` anywhere in the process.
26
32
  */
33
+ import { isCompiledBinary } from "@sayknow-cli/utils/env";
27
34
  import mupdfWasmPath from "../../vendor/mupdf/mupdf-wasm.wasm" with { type: "file" };
28
35
 
29
36
  const MODULE_CONFIG_KEY = "$libmupdf_wasm_Module";
30
37
 
31
- export function ensureMupdfWasmResolution(): void {
38
+ export function ensureMupdfWasmResolution(compiled: boolean = isCompiledBinary()): void {
39
+ if (!compiled) return;
32
40
  const globalScope = globalThis as typeof globalThis & Record<string, unknown>;
33
41
  if (globalScope[MODULE_CONFIG_KEY] !== undefined) return;
34
42
  globalScope[MODULE_CONFIG_KEY] = { locateFile: () => String(mupdfWasmPath) };