Skip to content

feat: add native Windows support - #1982

Draft
sethkarten wants to merge 36 commits into
feat/bun-primary-runtimefrom
feat/windows-support
Draft

feat: add native Windows support#1982
sethkarten wants to merge 36 commits into
feat/bun-primary-runtimefrom
feat/windows-support

Conversation

@sethkarten

@sethkarten sethkarten commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Stack

Draft PR stacked directly on #1970 (feat/bun-primary-runtime). It does not depend on the provisional npm package PR.

Windows support contract

  • native Windows 10 and 11 support on x64 and Arm64
  • no WSL requirement
  • PowerShell 5.1+ for installation and updates
  • Git Bash as the supported shell backend for agent shell commands
  • persistent CPython kernel only; no IPython or ZeroMQ transport

What changed

Install and release

  • add a fail-closed PowerShell installer with version, channel, update, uninstall, user PATH, checksum, archive-layout, and atomic command-shim handling
  • build bun-windows-x64 and bun-windows-arm64 executables
  • publish Windows ZIP archives and render/upload stable and beta PowerShell installers
  • detect PE executables and carry install.ps1 in compiled sidecars

Runtime

  • use taskkill /T for Windows process-tree cancellation and force termination
  • use per-user named pipes plus filesystem leases for daemon and worker coordination
  • probe live named pipes before binding to prevent startup races
  • bootstrap uv through PowerShell and resolve CPython venvs through Scripts\python.exe

CI and docs

  • add a windows-latest job to the existing required CI aggregate
  • exercise process cleanup, daemon named pipes, Git Bash discovery, CPython bootstrap/runtime, native executable build, and a local end-to-end PowerShell install/update/uninstall
  • document native install, Git Bash, PATH, updates, uninstall, CPython, and troubleshooting

Compatibility

No daemon command, event, response shape, schema revision, or protocol version changes. Windows endpoint naming is local runtime behavior and Unix socket behavior is unchanged.

Validation

Local

  • bun install --frozen-lockfile with Bun 1.4.0
  • bun run check
  • bun test test/bun-installer.test.ts (16 passed)
  • bun test test/bun-release-archives.test.ts (11 passed)
  • bun test test/child-process.test.ts (6 passed)
  • bun test test/daemon-socket.test.ts (13 passed)
  • bun test test/kernel-bootstrap.test.ts (22 passed)
  • focused exec, Git Bash, watchdog, and terminal suites passed
  • bash -n scripts/build-binaries.sh install.sh
  • PowerShell parser validation for install.ps1, the installer smoke script, and the CI PE inspection step

Native Windows runner

CI run 33606586146 passed with every required job green.

  • Windows process, IPC, Git Bash, path, and cleanup coverage: 22 passed, 4 skipped, 0 failed
  • Windows terminal/TUI coverage: 208 passed, 0 failed
  • real persistent CPython kernel in D:\a\_temp\Prime Agent ø\kernel-venv: 19 passed, 2 skipped, 0 failed
  • Win32 job-object and synchronous/awaited kernel interrupt coverage: 25 passed
  • full x64 and Arm64 applications compiled; PE machines verified as 0x8664 and 0xAA64
  • PowerShell install, version/help smoke, update, uninstall, and cleanup passed end to end
  • installed native x64 executable smoke passed

The PR remains draft for review. It has not published artifacts or packages.

Note

Add native Windows support for installer, daemon, kernel, and release builds

  • Adds a full PowerShell installer (install.ps1) supporting version selection, stable/beta channels, update, uninstall, SHA-256 verification, and PATH management for x64 and Arm64
  • Extends release assembly and CI to build, package (ZIP), upload, and test Windows binaries alongside existing macOS/Linux targets
  • Adapts daemon socket coordination to Windows named pipes with per-user scoping and filesystem-based leases in daemon-socket.ts\n- Adds Windows process-tree termination via taskkill in signalProcessGroupOrProcess and uses it for aborted/timed-out commands in execCommand
  • Makes kernel bootstrap platform-aware: selects Scripts\python.exe for venvs, installs uv via PowerShell, and reports Windows-specific uv paths
  • Behavioral Change: Windows daemon endpoints are now user-scoped named pipes (\\.\pipe\...<scope>) instead of a fixed name; Windows process termination uses taskkill /T for tree kills with direct-signal fallback

Macroscope summarized 4d41a62. (Automatic summaries will resume when PR exits draft mode or review begins).

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