Skip to content

Ship the pinned DeepSeek runtime with the Windows app - #404

Merged
simularlyon merged 1 commit into
mainfrom
codex/windows-deepseek-runtime-vendor
Dec 4, 2026
Merged

simularlyon merged 1 commit into
mainfrom
codex/windows-deepseek-runtime-vendor

Conversation

@simularlyon

Copy link
Copy Markdown
Collaborator

What

This PC's DeepSeek harness no longer asks people to install Node.js. Windows builds now ship the pinned Node.js 24.22.3 and the pinned @deepseek-ai/dsh packages in DeepSeekRuntime\ beside AgentS.Windows.exe, built by one script and pruned like the macOS bundle.

  • scripts/vendor-deepseek.ps1 downloads the pinned Node.js zip, verifies its SHA-256 per RID, runs npm ci on DeepSeekRuntime/package-lock.json with --ignore-scripts, prunes, and stamps the folder with the script, prune script and lockfile hashes.
  • scripts/prune-deepseek.ps1 is the Windows port of the macOS prune.py: keeps the packages packages.txt lists and drops sources, maps, declarations, docs and other platforms' prebuilds. Result: 199 MB (90 MB of it node.exe).
  • AgentS.Windows.csproj always copies this-pc.patch.yml and deepseek-live-text.mjs into DeepSeekRuntime. Before this, a vendored build dropped both, so a shipped runtime would have been unusable.
  • ThisPcDeepSeek.Find() now tries AGENT_S_DSH_RUNTIME (Dev builds), then the bundled folder, then %LOCALAPPDATA%\Simular\<channel>\DeepSeekRuntime, and only then a Node.js the person installed with the packages in the data folder. Installs set up with the old README keep working.
  • windows-app.yml and windows-release.yml run the vendor script before publishing. No new uses: entries, so actions.lock is unchanged; the app workflow timeout goes 25 → 35 minutes.
  • README's DeepSeek section now describes the shipped runtime and the development build step.

Testing

  • Pruned runtime: publish\DeepSeekRuntime\bin\node.exe node_modules/@deepseek-ai/dsh/lib/bin.js --version → 0.2.2-rc.5 (exit 0).
  • Fresh dotnet publish output contains DeepSeekRuntime\{bin\node.exe, node_modules\@deepseek-ai\dsh, this-pc.patch.yml, deepseek-live-text.mjs, package.json} (226 MB on disk).
  • UI Automation against that publish, Dev channel, fresh data dir, New agent → This PC → DeepSeek:
    • with the bundled folder: harness selected as DeepSeek, no "Install Node.js and the pinned DeepSeek runtime on this PC." prompt;
    • with DeepSeekRuntime renamed away: the DeepSeek install prompt appears (positive control);
    • folder restored afterwards.
  • AgentS.Core.Tests: 405 assertions pass.
  • Screenshots in the test folder (not committed): ds-bundle-dialog.png, ds-no-runtime-dialog.png.

Worth knowing

The installer and CI artifact grow by roughly the compressed runtime (about 65–70 MB). That is the cost of shipping an offline runtime; the alternative (install Node + npm ci on first use) is what this change removes.

This PC's DeepSeek harness needed Node.js and a hand-built runtime. Windows builds now
ship the pinned Node.js and the DeepSeek Harness packages beside the app, built by one
script and pruned like the macOS bundle, so choosing DeepSeek works on a fresh PC.

- scripts/vendor-deepseek.ps1 checks the pinned Node.js zip against its SHA-256, runs
  npm ci without package scripts, prunes with prune-deepseek.ps1, and stamps the result
  with the script and lockfile hashes.
- scripts/prune-deepseek.ps1 ports the macOS prune.py: it keeps the packages the profile
  loads and drops sources, maps, declarations, docs and other platforms' prebuilds
  (199 MB).
- The csproj always copies this-pc.patch.yml and deepseek-live-text.mjs into
  DeepSeekRuntime; a vendored build used to drop them.
- ThisPcDeepSeek.Find() tries AGENT_S_DSH_RUNTIME (dev), then the bundled folder, then
  the data folder, and only then a Node.js the person installed.
- windows-app.yml and windows-release.yml vendor the runtime before publishing, with no
  new actions so actions.lock is unchanged.
- README documents the shipped runtime and the development build step.

Tested: the pruned runtime runs `node lib/bin.js --version` -> 0.2.2-rc.5; UI Automation
on a fresh publish shows no install prompt with the bundled folder and the DeepSeek
install prompt when it is renamed away; 405 Core assertions pass.
@simularlyon
simularlyon merged commit a8018a0 into main Dec 4, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant