The release package is generated from the published @deepseek-ai/dsh npm package. The build applies these Android-specific changes before packing:
- koffi
statxfallback Android defines__linux__, but its Bionicstatxdeclarations conflict with koffi's Linux code path. Android is excluded from that branch so koffi uses its existingfstatat/fstatimplementation. - koffi process helper on API 24
Bionic only exposes
posix_spawnfile actions from API 28, while the package targets API 24. Koffi's internal command helper is disabled withENOSYSbelow API 28; dsh's FFI path does not call this helper. - koffi native build The npm package has no Android ARM64 prebuild. It is compiled with Android NDK, API 24, ARM64 and the shared C++ runtime. Node-API symbols remain unresolved in the shared object so Android's dynamic loader can bind them from the Node process when the addon is loaded.
- node-pty native build
The npm package has no
prebuilds/android-arm64/pty.node. It is cross-compiled with node-gyp and the NDK, then copied into that npm-whitelisted prebuild directory so the final tarball retains it. The Linux-only-lutillink is disabled because Android provides the PTY APIs through Bionic. - sharp WASM runtime
Sharp has no Android native package.
@img/sharp-wasm32is included and sharp automatically falls back to it. - esbuild Android binary
@esbuild/android-arm64is included explicitly because optional dependency resolution on a Linux Actions host would otherwise select the host binary. - HMR startup guard
Older upstream launchers include a Cordis HMR path that requires Node's
--expose-internals, which cannot be passed throughNODE_OPTIONS. The patch guards that optional watcher when it is present; newer upstream launchers that no longer ship the patch-file watcher are accepted without this compatibility patch. - session publication without hard links
Android application sandboxes reject
link(2)withEACCES. Initial JSONL session publication uses same-directoryrename(2)on Android and retains hard-link publication on other POSIX platforms.
Every source replacement is guarded by an exact one-match assertion. An upstream refactor therefore fails the workflow for review instead of silently producing an unpatched release.