@deepseek-harness-tui/dsh-tui 0.16.0 → 0.16.1

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
@@ -132,9 +132,12 @@ Afterwards `dsh-tui` and `dsh --profile dsh-tui` are equivalent.
132
132
 
133
133
  > **New-user note**: pnpm ≥11 blocks dependencies with install scripts by
134
134
  > default and reports `ERR_PNPM_IGNORED_BUILDS`. Updates skip foreign-platform
135
- > `@img/sharp-*` native packages, saving about 200MB of downloads. `/update`
136
- > and `dsh-tui update` write both settings automatically. No manual step
137
- > needed. Details:
135
+ > natives — the `@img/sharp-*` packages and the Claude SDK's per-platform
136
+ > bundles — so only this machine's binaries are fetched. `/update` and
137
+ > `dsh-tui update` write both settings automatically. An update never installs
138
+ > the Claude SDK on its own: it enters a profile only when you pick that
139
+ > backend in the kernel picker, which then installs the pinned SDK for the
140
+ > running platform. No manual step needed. Details:
138
141
  > [Getting started](docs/getting-started.en.md#pnpm-install-script-blocks-and-foreign-platform-natives).
139
142
 
140
143
  After startup the TUI checks for newer versions in the background. It never
@@ -32,6 +32,14 @@ You need:
32
32
  cd ~/.dsh/profiles/dsh-tui && pnpm add @anthropic-ai/claude-agent-sdk@0.3.287
33
33
  ```
34
34
 
35
+ The SDK ships as all-platform optional dependencies (one native bundle per
36
+ platform, about 230MB unpacked). The profile's
37
+ `ignoredOptionalDependencies` keeps only the running platform's bundle, and
38
+ the installer recomputes that list for the current machine, so a reinstall
39
+ after moving platforms still fetches exactly one. `/update` and
40
+ `dsh-tui update` never install the SDK on their own: when the profile does
41
+ not depend on it, they do not bring it in.
42
+
35
43
  - A Claude credential; see "Signing in" below.
36
44
  - The `claude` command is optional: dsh-TUI probes an **explicitly specified
37
45
  executable path** (an environment variable, used as set, with no version check;
@@ -25,6 +25,11 @@ dsh-TUI 可以把会话跑在 Claude Agent 后端上,而不是 DeepSeek Harnes
25
25
  cd ~/.dsh/profiles/dsh-tui && pnpm add @anthropic-ai/claude-agent-sdk@0.3.287
26
26
  ```
27
27
 
28
+ SDK 以全平台可选依赖分发(每个平台一个原生包,解包约 230MB)。profile 的
29
+ `ignoredOptionalDependencies` 只放行本机平台的包,安装器每次按当前机器重算
30
+ 这份名单,换平台后重装也只取对应那个。`/update` 与 `dsh-tui update` **不会**
31
+ 主动安装 SDK:profile 里没有这个依赖时,它们不会把它带进来。
32
+
28
33
  - 一份 Claude 凭据,见下面的「登录」。
29
34
  - `claude` 命令不是必需的:按**显式指定的可执行路径**(环境变量,设置后原样采用,不做版本校验;
30
35
  变量名见[多后端架构](agent-backend-design.md))→ `PATH` 上的 `claude` → 用户主目录下的
@@ -234,15 +234,23 @@ allowBuilds:
234
234
  manual step needed.
235
235
 
236
236
  Updates also maintain `ignoredOptionalDependencies` covering foreign-platform
237
- `@img/sharp-*` natives:
238
-
239
- - sharp ships as all-platform optional dependencies, and an untouched
240
- `pnpm update` downloads every platform's binaries (about 200MB measured).
241
- - The list is recomputed for the running platform on every update. Foreign
242
- natives are skipped while this platform's own and the platform-agnostic wasm
243
- fallbacks stay.
244
- - Move the profile to another platform or musl container and the next update
245
- there refreshes it.
237
+ natives — `@img/sharp-*` and the Claude SDK's
238
+ `@anthropic-ai/claude-agent-sdk-*` bundles:
239
+
240
+ - Both ship as all-platform optional dependencies, and an untouched pnpm update
241
+ resolves and downloads every platform's binaries (about 200MB measured for
242
+ sharp; each SDK bundle unpacks to about 230MB, and one 0.15 → 0.16 update
243
+ pulled seven foreign bundles, roughly 1.6GB).
244
+ - The list is recomputed for the running platform on every update. This
245
+ platform's own natives and the platform-agnostic wasm fallbacks stay; foreign
246
+ ones are skipped at resolution, so they no longer appear in the lockfile
247
+ either.
248
+ - The SDK is never installed by an update: it only enters a profile when you
249
+ pick that backend in the kernel picker, and the installer recomputes the list
250
+ for the current machine first, so exactly one platform's bundle lands. An
251
+ unused backend keeps taking no space.
252
+ - Move the profile to another platform or musl container and the next update or
253
+ kernel install there refreshes it.
246
254
  - An existing profile's lockfile still lists every platform, so its first
247
255
  update downloads them once more before the filter takes effect.
248
256
  - Entries outside those two platform tables (a user's `fsevents`, a
@@ -230,14 +230,18 @@ allowBuilds:
230
230
 
231
231
  `/update` 与 `dsh-tui update` 会自动写入这份配置,无需手工处理。
232
232
 
233
- 更新时还会维护 `ignoredOptionalDependencies`(忽略异平台的 `@img/sharp-*`
234
- 原生包):
235
-
236
- - sharp 以全平台可选依赖分发,不处理时 `pnpm update` 会把各平台二进制一起
237
- 下载(实测约 200MB)。
238
- - 名单每次更新按当前平台重算,异平台原生包不再下载(当前平台原生包与无平台
239
- 归属的 wasm 回退包保留)。
240
- - 把 profile 搬到别的平台或 musl 容器后,在那台机器上跑一次更新即可刷新。
233
+ 更新时还会维护 `ignoredOptionalDependencies`(忽略异平台原生包:`@img/sharp-*`
234
+ 与 Claude SDK 的 `@anthropic-ai/claude-agent-sdk-*`):
235
+
236
+ - sharp 与 Claude SDK 都以全平台可选依赖分发,不处理时 pnpm 的 update 路径会
237
+ 把各平台二进制一起解析/下载(实测 sharp 约 200MB;Claude SDK 单个包解包约
238
+ 230MB,0.15 → 0.16 的一次更新多下 7 个异平台包,约 1.6GB)。
239
+ - 名单每次更新按当前平台重算:当前平台的原生包与无平台归属的 wasm 回退包
240
+ 保留,异平台的整段跳过(pnpm 在解析阶段就不取它们,lockfile 里也不再出现)。
241
+ - SDK 本身不会被更新装进 profile:只有在内核选择器里选中该后端才安装,安装前
242
+ 也按当前机器重算名单,只装本平台对应的那个包。不用的后端一直不占空间。
243
+ - 把 profile 搬到别的平台或 musl 容器后,在那台机器上跑一次更新或内核安装
244
+ 即可刷新。
241
245
  - 老 profile 的 lockfile 里仍写着全平台条目,第一次更新会照旧下载一遍,之后
242
246
  才被忽略。
243
247
  - 块内不属于这两张平台表的条目(`fsevents`、自己写的 `@img/sharp-wasm32`
package/lib/settings.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@deepseek-harness-tui/dsh-tui",
4
- "packageVersion": "0.16.0",
4
+ "packageVersion": "0.16.1",
5
5
  "namespace": "dsh-tui",
6
6
  "groups": [
7
7
  {
@@ -1 +1 @@
1
- {"version":3,"file":"host-access.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/host-access.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAS,MAAM,qBAAqB,CAAA;AAkLpD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,IAAI,CAGlE;AAWD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAE1D;AAkID;;uEAEuE;AACvE,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAE9D;AAwLD,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAe/D;AAED;0EAC0E;AAC1E,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,MAAM,OAAO,EACvB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,OAAO,KAAK,IAAI,GAC9C,OAAO,CA2BT;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAMhE;AAED;+EAC+E;AAC/E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAInE;AAED;;;6EAG6E;AAC7E,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAIrD;AAiHD;;;4EAG4E;AAC5E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAO3E;AAED;;;iEAGiE;AACjE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EA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O,GAAG,SAAS,CAO3E;AAED;;;iEAGiE;AACjE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAehH;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAmBlG"}
@@ -1,5 +1,6 @@
1
1
  import { AsyncLocalStorage } from 'node:async_hooks';
2
2
  import { Context, Fiber } from '@deepseek-ai/cordis';
3
+ import { logForDebugging } from '../utils/debug.js';
3
4
  /**
4
5
  * Recover the concrete Cordis service for host-only adapters.
5
6
  *
@@ -188,6 +189,9 @@ const deferredGuardRoots = new WeakSet();
188
189
  * the guard would refuse. Fiber tracking starts at once either way.
189
190
  */
190
191
  export function deferRootCapabilityGuard(root) {
192
+ // Too late: a root seen undeferred already carries the guard for good.
193
+ if (trackedRoots.has(root))
194
+ logForDebugging('dsh-tui: the root-capability guard was deferred after the composition root was resolved; it is already installed');
191
195
  deferredGuardRoots.add(root);
192
196
  return () => releaseDeferredGuard(root);
193
197
  }
@@ -70,7 +70,7 @@ export const HOST_DEVIATIONS = [
70
70
  { id: 'startup-report-always', what: 'bin.js saves a report for a StartupError only and lets other startup errors crash; the entry saves one for every composition failure (HostComposeError carries the path) because the screen stays up' },
71
71
  { id: 'startup-report-no-terminal', what: 'reportStartupFailure\'s terminal half is not reproduced: the screen is up, the failure row names the report' },
72
72
  { id: 'no-overlays', what: '--patch overlays, --from-default-profile and resolvedProfile are not reproduced (the launcher passes none)' },
73
- { id: 'defer-root-guard', what: 'deferRootCapabilityGuard(root) (host-access.ts) keeps the TUI\'s root-capability guard off while the screen mounts; armRootCapabilityGuard then lets the first TUI row activation install it, as on the profile path, and the composition\'s settling installs it if no TUI row activated' },
73
+ { id: 'defer-root-guard', what: 'deferRootCapabilityGuard(root) (host-access.ts) keeps the TUI\'s root-capability guard off from the entry\'s binding of the root through the screen\'s mount; armRootCapabilityGuard then lets the first TUI row activation install it, as on the profile path, and the composition\'s settling installs it if no TUI row activated' },
74
74
  { id: 'report-exclude-network', what: 'host-entry.ts sets process.report.excludeNetwork = true for the process: DSH\'s flock libc probe (process.report.getReport) otherwise blocked ~10s on reverse lookups of sockets the mounted screen already opened' },
75
75
  { id: 'hijack-before-tui', what: 'the host\'s PluginPackages resolution is installed before any TUI module loads, for both kernels; runProfile installs it inside boot()\'s prepare' },
76
76
  { id: 'kernel-after-discovery', what: 'prepareHostRoot first supplies only the neutral Loader/resolution root; after backend assembly, HostRoot.selectKernel prepares DSH-only proxy, failure handlers and services from the same final kernel the entry uses for its slot and composition' },
@@ -148,6 +148,11 @@ async function runInEntry(kernelBeforeHost) {
148
148
  ]);
149
149
  markBoot('entry-modules');
150
150
  const ctx = root?.ctx ?? new (await import('@deepseek-ai/cordis')).Context();
151
+ // Plugins use root capabilities while they activate: hold the TUI's guard
152
+ // back until composition arms it (./host-access.ts). Before anything resolves
153
+ // the composition root (the assembly below does): a root first seen undeferred
154
+ // is guarded for good, and DSH's base rows would fail on their own root effects.
155
+ const releaseRootGuard = root === undefined ? undefined : deferRootCapabilityGuard(ctx);
151
156
  const env = process.env;
152
157
  // D-1: this entry decides the kernel *before* `apply` runs, and that decision is
153
158
  // registry membership — `entryKernel` drops an id no backend answers for, and a
@@ -186,9 +191,6 @@ async function runInEntry(kernelBeforeHost) {
186
191
  });
187
192
  // Only a host root gets a composition (DSH without one was delegated above).
188
193
  const slot = root === undefined ? undefined : createEntrySlot(kernel === 'dsh', root.kernelVersion);
189
- // Plugins use root capabilities while they activate: hold the TUI's guard
190
- // back until composition arms it (./host-access.ts).
191
- const releaseRootGuard = slot === undefined ? undefined : deferRootCapabilityGuard(ctx);
192
194
  try {
193
195
  // `entryKernel`: the runtime must not re-resolve the kernel — its rebuilt Config
194
196
  // lacks the profile patch's row this route was decided on (the entry read that
@@ -1 +1 @@
1
- {"version":3,"file":"pnpm-profile-add.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/install/pnpm-profile-add.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AA8HrD,eAAO,MAAM,cAAc,EAAE,eAAqD,CAAA"}
1
+ {"version":3,"file":"pnpm-profile-add.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/install/pnpm-profile-add.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAoIrD,eAAO,MAAM,cAAc,EAAE,eAAqD,CAAA"}
@@ -24,7 +24,7 @@ import { rmSync } from 'node:fs';
24
24
  import { homedir } from 'node:os';
25
25
  import { dirname, join } from 'node:path';
26
26
  import stripAnsi from 'strip-ansi';
27
- import { ensureWorkspaceAllowBuilds, ensureWorkspaceStoreDir, isStandaloneRuntime, profileWorkspaceYamlPath, resolveDshProfileName } from '../../update.js';
27
+ import { ensurePlatformFilterAt, ensureWorkspaceAllowBuilds, ensureWorkspaceStoreDir, isStandaloneRuntime, profileWorkspaceYamlPath, resolveDshProfileName } from '../../update.js';
28
28
  import { shellQuote } from '../../utils/shellQuote.js';
29
29
  /** Resolve the install target for the CURRENT launch (never throws). The
30
30
  * non-profile kinds carry the reason for the wizard's manual-instructions
@@ -109,11 +109,17 @@ function start(specifier, dir) {
109
109
  // Seed before any pnpm run: the store pin (drift prevention — a pin
110
110
  // landing after node_modules exists is itself a store change, and the
111
111
  // heal below covers pre-existing drift and that induced one in the same
112
- // pass) and the build-script opt-outs a full lockfile rebuild needs on
113
- // pnpm ≥11 (ERR_PNPM_IGNORED_BUILDS, see ensureProfileAllowBuilds).
112
+ // pass), the build-script opt-outs a full lockfile rebuild needs on
113
+ // pnpm ≥11 (ERR_PNPM_IGNORED_BUILDS, see ensureProfileAllowBuilds), and
114
+ // the foreign-platform ignore list. That list is a fact about the machine
115
+ // that wrote it: a profile carried over from another platform (WSL, a musl
116
+ // container) would otherwise ignore the very native package this install
117
+ // needs, leaving a backend without its binary. Recomputed here, the
118
+ // current platform's package is never on it.
114
119
  const yamlPath = join(dir, 'pnpm-workspace.yaml');
115
120
  ensureWorkspaceStoreDir(yamlPath);
116
121
  ensureWorkspaceAllowBuilds(yamlPath);
122
+ ensurePlatformFilterAt(yamlPath);
117
123
  const first = await run(['add', specifier]);
118
124
  if (cancelled)
119
125
  return { kind: 'cancelled' };
@@ -440,6 +440,12 @@ export declare function sharpCurrentSuffix(platform: string, cpu: string, libc:
440
440
  */
441
441
  /** Patterns for every @img platform package EXCEPT the running one. */
442
442
  export declare function ignoredSharpOptionalPatterns(platform: string, cpu: string, libc: string): string[];
443
+ /** The SDK bundle suffix of the RUNNING platform (musl linux adds `-musl`). */
444
+ export declare function claudeSdkCurrentSuffix(platform: string, cpu: string, libc: string): string;
445
+ /** Patterns for every SDK bundle EXCEPT the running one. */
446
+ export declare function ignoredClaudeSdkOptionalPatterns(platform: string, cpu: string, libc: string): string[];
447
+ /** Patterns for every known native package this platform does not load. */
448
+ export declare function ignoredForeignPlatformPatterns(platform: string, cpu: string, libc: string): string[];
443
449
  /**
444
450
  * Libc verdict for an explicit platform, so the whole matrix is testable on any
445
451
  * host. Node's report wins when present: a stray musl loader (Debian's musl
@@ -453,36 +459,39 @@ export declare function detectLibc(platform: string, report: {
453
459
  glibcVersionRuntime?: string;
454
460
  };
455
461
  } | undefined, muslLoaderPresent: boolean): 'glibc' | 'musl';
456
- /** What ensureProfileSharpPlatformFilter did to the profile workspace file. */
457
- export interface SharpPlatformFilterOutcome {
462
+ /** What ensurePlatformFilterAt did to a profile workspace file. */
463
+ export interface PlatformFilterOutcome {
458
464
  /** The foreign-platform ignore patterns the file now carries. */
459
465
  entries: string[];
460
466
  /** True when the file was written (filter added or refreshed). */
461
467
  changed: boolean;
462
468
  }
463
469
  /**
464
- * Keep an `ignoredOptionalDependencies:` block in the profile's
465
- * pnpm-workspace.yaml listing every non-current-platform @img package, so an
466
- * update stops downloading the foreign-platform sharp natives. The list is
467
- * recomputed on every run: it is a fact about the machine running the update,
468
- * so a profile carried to another platform (WSL, a musl container, a new cpu)
469
- * gets a fresh list instead of a stale one that would skip the packages that
470
+ * Keep an `ignoredOptionalDependencies:` block in a profile's
471
+ * pnpm-workspace.yaml listing every native package this platform does not
472
+ * load — the foreign-platform sharp natives and Claude SDK bundles — so an
473
+ * update (or an on-demand kernel install) stops downloading them. The list is
474
+ * recomputed on every run: it is a fact about the machine running pnpm, so a
475
+ * profile carried to another platform (WSL, a musl container, a new cpu) gets
476
+ * a fresh list instead of a stale one that would skip the packages that
470
477
  * machine needs. Entries this module's own tables cover are rewritten (by
471
478
  * package name, so quoted forms, trailing comments and blank lines inside the
472
- * block all still refresh); every other entry — a user's `fsevents`, a name
473
- * sharp adds later, a user's own `@img/sharp-wasm32` exemption — is preserved
474
- * verbatim, same as in {@link ensureProfileAllowBuilds}. Best effort and
475
- * idempotent: the file is written only when the resulting block actually
476
- * differs, a missing `ignoredOptionalDependencies:` block is appended, and an
477
- * absent profile directory resolves to undefined — the update still runs, only
478
- * the download-size win is lost. A document this function cannot rewrite safely
479
- * (a flow-style value, a duplicated key, which is already invalid YAML) is left
480
- * untouched rather than half-rewritten. Residual caveat shared by any persisted
481
- * machine fact: a second platform using the same profile without running an
482
- * update keeps this platform's list, so its own binaries stay skipped until the
483
- * next update there.
484
- */
485
- export declare function ensureProfileSharpPlatformFilter(profile: string): SharpPlatformFilterOutcome | undefined;
479
+ * block all still refresh); every other entry — a user's `fsevents`, a native
480
+ * package a backend adds later, a user's own `@img/sharp-wasm32` exemption —
481
+ * is preserved verbatim, same as in {@link ensureProfileAllowBuilds}. Best
482
+ * effort and idempotent: the file is written only when the resulting block
483
+ * actually differs, a missing `ignoredOptionalDependencies:` block is
484
+ * appended, and an absent directory resolves to undefined — the caller still
485
+ * runs pnpm, only the download-size win is lost. A document this function
486
+ * cannot rewrite safely (a flow-style value, a duplicated key, which is
487
+ * already invalid YAML) is left untouched rather than half-rewritten. Residual
488
+ * caveat shared by any persisted machine fact: a second platform using the
489
+ * same profile without running either path keeps this platform's list, so its
490
+ * own binaries stay skipped until the next update or install there.
491
+ */
492
+ export declare function ensurePlatformFilterAt(yamlPath: string): PlatformFilterOutcome | undefined;
493
+ /** {@link ensurePlatformFilterAt} for a profile's own workspace file. */
494
+ export declare function ensureProfilePlatformFilter(profile: string): PlatformFilterOutcome | undefined;
486
495
  /**
487
496
  * The pnpm Windows tmp-rename race signature (issue #225): pnpm swaps a
488
497
  * package directory via a `<name>_tmp_<pid>` staging dir, and a file lock or
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAGlD,OAAO,EAA2H,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAKhL,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAI3D,OAAO,EAAE,UAAU,EAAE,CAAA;AACrB,OAAO,EAAE,kBAAkB,EAAE,CAAA;AA0B7B;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,+BAA+B,CAAA;AAwBlE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAEnF;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,wEAAwE;IACxE,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAA;IACnC;6EACyE;IACzE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B;0DACsD;IACtD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB;mCAC+B;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B;;8BAE0B;IAC1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AAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACpE;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI,CAAA;CACvD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,CAAC,UAAU,EAC5B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,SAAS,GAAG,QAAQ,EAC1B,OAAO,EAAE,iBAAiB,GACzB,MAAM,CAAC,UAAU,CAkDnB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,kEAAkE;IAClE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B;qFACiF;IACjF,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;CACvC,GAAG,MAAM,EAAE,CAUX;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4PpG"}
@@ -1253,18 +1253,21 @@ function existsSafe(path) {
1253
1253
  }
1254
1254
  }
1255
1255
  /**
1256
- * sharp distributes its native binaries as platform-specific optional
1257
- * dependencies (@img/sharp-<platform> wrappers plus @img/sharp-libvips-<platform>
1258
- * runtimes). pnpm's lockfile records EVERY platform's entry by design, and
1259
- * some pnpm update paths materialize all of them — maintainer-group report
1260
- * 2026-09-11: a 0.10.0 → 0.10.1 update downloaded ~90MB of win32/darwin/
1261
- * musl/riscv64/s390x/ppc64 binaries on a linux-x64 box. The fix keeps
1262
- * `ignoredOptionalDependencies` patterns for every OTHER platform in the
1263
- * profile: pnpm skips ignored optionals entirely (no download, no node_modules
1264
- * entry), while the current platform's packages — the only ones sharp loads —
1265
- * stay untouched. These tables mirror sharp's published platform matrix; a
1266
- * suffix sharp adds later only costs the saving for that platform, never a
1267
- * broken install, since an unknown suffix is simply not ignored.
1256
+ * Native backends ship as platform-specific optional dependencies, and pnpm's
1257
+ * lockfile records EVERY platform's entry by design. Some pnpm update paths
1258
+ * materialize all of them — maintainer-group report 2026-09-11: a 0.10.0 →
1259
+ * 0.10.1 update downloaded ~90MB of win32/darwin/musl/riscv64/s390x/ppc64
1260
+ * sharp binaries on a linux-x64 box; a 0.15 → 0.16 dsh-tui update then pulled
1261
+ * seven foreign `@anthropic-ai/claude-agent-sdk-*` bundles (~230MB each,
1262
+ * ~1.6GB) the same way. The fix keeps `ignoredOptionalDependencies` patterns
1263
+ * for every OTHER platform in the profile: pnpm skips ignored optionals
1264
+ * entirely (no download, no node_modules entry), while the current platform's
1265
+ * packages — the only ones these backends load — stay untouched.
1266
+ *
1267
+ * Each table mirrors its package's published platform matrix for the pinned
1268
+ * version. A suffix the package adds later only costs the saving for that
1269
+ * platform, never a broken install: an unknown suffix is simply not listed
1270
+ * here, so it is never ignored.
1268
1271
  */
1269
1272
  const SHARP_WRAPPER_SUFFIXES = [
1270
1273
  'darwin-arm64', 'darwin-x64', 'freebsd-wasm32', 'linux-arm', 'linux-arm64',
@@ -1306,6 +1309,38 @@ export function ignoredSharpOptionalPatterns(platform, cpu, libc) {
1306
1309
  ...SHARP_LIBVIPS_SUFFIXES.filter(s => s !== current).map(s => `@img/sharp-libvips-${s}`),
1307
1310
  ];
1308
1311
  }
1312
+ /**
1313
+ * `@anthropic-ai/claude-agent-sdk` carries the Claude CLI as one native bundle
1314
+ * per platform in its optionalDependencies. The SDK is an on-demand backend —
1315
+ * the kernel picker adds it to a profile only when the user picks Claude — but
1316
+ * once it IS there, an update re-resolves it through the same pnpm path that
1317
+ * materializes every platform's optional (see the sharp report above), so the
1318
+ * same ignore list keeps only this platform's bundle. Suffixes mirror the
1319
+ * pinned SDK version's published matrix, musl variants included.
1320
+ */
1321
+ const CLAUDE_SDK_PREFIX = '@anthropic-ai/claude-agent-sdk-';
1322
+ const CLAUDE_SDK_SUFFIXES = [
1323
+ 'darwin-arm64', 'darwin-x64',
1324
+ 'linux-arm64', 'linux-arm64-musl', 'linux-x64', 'linux-x64-musl',
1325
+ 'win32-arm64', 'win32-x64',
1326
+ ];
1327
+ /** The SDK bundle suffix of the RUNNING platform (musl linux adds `-musl`). */
1328
+ export function claudeSdkCurrentSuffix(platform, cpu, libc) {
1329
+ const musl = platform === 'linux' && libc === 'musl';
1330
+ return `${platform}-${cpu}${musl ? '-musl' : ''}`;
1331
+ }
1332
+ /** Patterns for every SDK bundle EXCEPT the running one. */
1333
+ export function ignoredClaudeSdkOptionalPatterns(platform, cpu, libc) {
1334
+ const current = claudeSdkCurrentSuffix(platform, cpu, libc);
1335
+ return CLAUDE_SDK_SUFFIXES.filter(s => s !== current).map(s => `${CLAUDE_SDK_PREFIX}${s}`);
1336
+ }
1337
+ /** Patterns for every known native package this platform does not load. */
1338
+ export function ignoredForeignPlatformPatterns(platform, cpu, libc) {
1339
+ return [
1340
+ ...ignoredSharpOptionalPatterns(platform, cpu, libc),
1341
+ ...ignoredClaudeSdkOptionalPatterns(platform, cpu, libc),
1342
+ ];
1343
+ }
1309
1344
  /**
1310
1345
  * Libc verdict for an explicit platform, so the whole matrix is testable on any
1311
1346
  * host. Node's report wins when present: a stray musl loader (Debian's musl
@@ -1326,10 +1361,11 @@ function isMuslRuntime() {
1326
1361
  const report = process.report?.getReport();
1327
1362
  return detectLibc(process.platform, report, existsSafe('/lib/ld-musl-x86_64.so.1') || existsSafe('/lib/ld-musl-aarch64.so.1') || existsSafe('/etc/alpine-release')) === 'musl';
1328
1363
  }
1329
- /** Every @img package this module's tables cover (both the wrapper and the libvips matrix). */
1330
- const SHARP_MANAGED_PATTERNS = new Set([
1364
+ /** Every native package this module's tables cover (sharp wrappers/libvips and SDK bundles). */
1365
+ const MANAGED_OPTIONAL_PATTERNS = new Set([
1331
1366
  ...SHARP_WRAPPER_SUFFIXES.map(s => `@img/sharp-${s}`),
1332
1367
  ...SHARP_LIBVIPS_SUFFIXES.map(s => `@img/sharp-libvips-${s}`),
1368
+ ...CLAUDE_SDK_SUFFIXES.map(s => `${CLAUDE_SDK_PREFIX}${s}`),
1333
1369
  ]);
1334
1370
  /**
1335
1371
  * The package name a list entry names, whatever spelling pnpm accepts: an
@@ -1354,29 +1390,29 @@ function optionalDependencyNameOf(line) {
1354
1390
  return name === '' ? undefined : name;
1355
1391
  }
1356
1392
  /**
1357
- * Keep an `ignoredOptionalDependencies:` block in the profile's
1358
- * pnpm-workspace.yaml listing every non-current-platform @img package, so an
1359
- * update stops downloading the foreign-platform sharp natives. The list is
1360
- * recomputed on every run: it is a fact about the machine running the update,
1361
- * so a profile carried to another platform (WSL, a musl container, a new cpu)
1362
- * gets a fresh list instead of a stale one that would skip the packages that
1393
+ * Keep an `ignoredOptionalDependencies:` block in a profile's
1394
+ * pnpm-workspace.yaml listing every native package this platform does not
1395
+ * load — the foreign-platform sharp natives and Claude SDK bundles — so an
1396
+ * update (or an on-demand kernel install) stops downloading them. The list is
1397
+ * recomputed on every run: it is a fact about the machine running pnpm, so a
1398
+ * profile carried to another platform (WSL, a musl container, a new cpu) gets
1399
+ * a fresh list instead of a stale one that would skip the packages that
1363
1400
  * machine needs. Entries this module's own tables cover are rewritten (by
1364
1401
  * package name, so quoted forms, trailing comments and blank lines inside the
1365
- * block all still refresh); every other entry — a user's `fsevents`, a name
1366
- * sharp adds later, a user's own `@img/sharp-wasm32` exemption — is preserved
1367
- * verbatim, same as in {@link ensureProfileAllowBuilds}. Best effort and
1368
- * idempotent: the file is written only when the resulting block actually
1369
- * differs, a missing `ignoredOptionalDependencies:` block is appended, and an
1370
- * absent profile directory resolves to undefined — the update still runs, only
1371
- * the download-size win is lost. A document this function cannot rewrite safely
1372
- * (a flow-style value, a duplicated key, which is already invalid YAML) is left
1373
- * untouched rather than half-rewritten. Residual caveat shared by any persisted
1374
- * machine fact: a second platform using the same profile without running an
1375
- * update keeps this platform's list, so its own binaries stay skipped until the
1376
- * next update there.
1402
+ * block all still refresh); every other entry — a user's `fsevents`, a native
1403
+ * package a backend adds later, a user's own `@img/sharp-wasm32` exemption —
1404
+ * is preserved verbatim, same as in {@link ensureProfileAllowBuilds}. Best
1405
+ * effort and idempotent: the file is written only when the resulting block
1406
+ * actually differs, a missing `ignoredOptionalDependencies:` block is
1407
+ * appended, and an absent directory resolves to undefined — the caller still
1408
+ * runs pnpm, only the download-size win is lost. A document this function
1409
+ * cannot rewrite safely (a flow-style value, a duplicated key, which is
1410
+ * already invalid YAML) is left untouched rather than half-rewritten. Residual
1411
+ * caveat shared by any persisted machine fact: a second platform using the
1412
+ * same profile without running either path keeps this platform's list, so its
1413
+ * own binaries stay skipped until the next update or install there.
1377
1414
  */
1378
- export function ensureProfileSharpPlatformFilter(profile) {
1379
- const yamlPath = profileWorkspaceYamlPath(profile);
1415
+ export function ensurePlatformFilterAt(yamlPath) {
1380
1416
  try {
1381
1417
  if (!existsSafe(dirname(yamlPath)))
1382
1418
  return undefined;
@@ -1414,11 +1450,11 @@ export function ensureProfileSharpPlatformFilter(profile) {
1414
1450
  const name = optionalDependencyNameOf(line);
1415
1451
  // Entries from our own tables (possibly computed for another platform)
1416
1452
  // are dropped here and recomputed below; everything else is preserved.
1417
- if (name === undefined || !SHARP_MANAGED_PATTERNS.has(name))
1453
+ if (name === undefined || !MANAGED_OPTIONAL_PATTERNS.has(name))
1418
1454
  foreign.push(line);
1419
1455
  }
1420
1456
  }
1421
- const patterns = ignoredSharpOptionalPatterns(process.platform, process.arch, isMuslRuntime() ? 'musl' : 'glibc');
1457
+ const patterns = ignoredForeignPlatformPatterns(process.platform, process.arch, isMuslRuntime() ? 'musl' : 'glibc');
1422
1458
  const insert = foreign.concat(patterns.map(p => ` - '${p}'`));
1423
1459
  if (blockStart !== -1 && lines.slice(blockStart + 1, blockEnd).join('\n') === insert.join('\n')) {
1424
1460
  return { entries: patterns, changed: false };
@@ -1438,6 +1474,10 @@ export function ensureProfileSharpPlatformFilter(profile) {
1438
1474
  return undefined;
1439
1475
  }
1440
1476
  }
1477
+ /** {@link ensurePlatformFilterAt} for a profile's own workspace file. */
1478
+ export function ensureProfilePlatformFilter(profile) {
1479
+ return ensurePlatformFilterAt(profileWorkspaceYamlPath(profile));
1480
+ }
1441
1481
  /**
1442
1482
  * The pnpm Windows tmp-rename race signature (issue #225): pnpm swaps a
1443
1483
  * package directory via a `<name>_tmp_<pid>` staging dir, and a file lock or
@@ -1638,12 +1678,15 @@ export async function updateTui(profile, targetVersion) {
1638
1678
  process.stderr.write(`dsh-tui: pre-seeded profile pnpm allowBuilds (${allowBuilds.added.join(', ')}) — ` +
1639
1679
  'postinstall-only deps are explicitly ignored\n');
1640
1680
  }
1641
- // Foreign-platform @img/sharp-* optionals are pure download waste (~90MB on
1642
- // the maintainer-group report); keep the profile's ignore list matching THIS
1643
- // machine (each update recomputes it) so pnpm never fetches them.
1644
- const sharpFilter = ensureProfileSharpPlatformFilter(profile);
1645
- if (sharpFilter !== undefined && sharpFilter.changed) {
1646
- process.stderr.write(`dsh-tui: sharp platform filter updated (${sharpFilter.entries.length} foreign-platform patterns ignored) — ` +
1681
+ // Foreign-platform natives are pure download waste (sharp ~90MB, the Claude
1682
+ // SDK's bundles ~1.6GB on the maintainer report); keep the profile's ignore
1683
+ // list matching THIS machine (each update recomputes it) so pnpm never
1684
+ // fetches them. The SDK is never ADDED here — it only enters a profile
1685
+ // through the kernel picker's guided install, and then only for the
1686
+ // platform it runs on.
1687
+ const platformFilter = ensureProfilePlatformFilter(profile);
1688
+ if (platformFilter !== undefined && platformFilter.changed) {
1689
+ process.stderr.write(`dsh-tui: platform filter updated (${platformFilter.entries.length} foreign-platform patterns ignored) — ` +
1647
1690
  `this profile's install keeps only the current platform's natives\n`);
1648
1691
  }
1649
1692
  // pnpm ≥11's minimumReleaseAge (24h by default) refuses installs of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepseek-harness-tui/dsh-tui",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Interactive terminal interface for DeepSeek Harness agents, sessions and tools.",
5
5
  "keywords": [
6
6
  "dsh",
@@ -18,7 +18,7 @@
18
18
  {
19
19
  "feedVersion": 1,
20
20
  "entries": [
21
- { "name": "@deepseek-harness-tui/dsh-tui", "scope": "@deepseek-harness-tui", "version": "0.16.0" }
21
+ { "name": "@deepseek-harness-tui/dsh-tui", "scope": "@deepseek-harness-tui", "version": "0.16.1" }
22
22
  ]
23
23
  }
24
24
  ```
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "name": "@deepseek-harness-tui/dsh-tui",
6
6
  "scope": "@deepseek-harness-tui",
7
- "version": "0.16.0"
7
+ "version": "0.16.1"
8
8
  }
9
9
  ]
10
10
  }