Skip to content

feat(host)!: remove the Node host and node-pty (#76 phase 4b) - #158

Merged
cachewraith merged 1 commit into
mainfrom
feat/drop-node-host-20261027
Oct 27, 2026
Merged

cachewraith merged 1 commit into
mainfrom
feat/drop-node-host-20261027

Conversation

@cachewraith

Copy link
Copy Markdown
Owner

Phase 4b of #76, the last one: the Rust host is the only pty host on Linux, macOS and Windows.

Removed

  • src/host/index.ts and the host.js build entry.
  • settings.nodeHost and its Settings → Advanced row ("Use the Node host"); WRAITHGRID_NODE_HOST.
  • node-pty and its rebuild: postinstall: electron-builder install-app-deps, trustedDependencies, asarUnpack, npmRebuild (now false). bun install builds no native module (it removed 3 packages here). python3 is dropped from the Docker build image.

Changed

  • host-start.ts hostBinary() finds wraithgrid-host for both the app and wraithgrid host-stdio: in resources/ when packaged, host-rs/target/release in development. New unit test covers both layouts.
  • A build without the binary can't start terminal panes (clear error), so bun run dev and bun run test:e2e run cargo first.
  • SpawnRequest/SpawnResult types moved into src/host/protocol.ts.

Tests

  • The Node host's server, headless-xterm screen and pty manager moved to tests/support/node-host/. They are test-only, the in-process host that the pane-host, router and CLI unit tests (58) talk to, always with fake ptys; a small local interface replaces node-pty's types. pty-manager.test.ts (it tested the Node host's own pty code) is gone. Logged in docs/DECISIONS.md.
  • The parity suite runs the Rust host only (30 tests, was 40 with the Node runs). The resize tests now compare against headless xterm fed the same output and resizes, which is what the Node host's screen was.
  • Linux package checks run wraithgrid-host --version instead of opening a node-pty pty.
  • Locally: typecheck, lint, 487 unit tests, parity suite 30 passed, e2e 49 passed / 1 skipped.

Docs: README build requirements are now Rust plus a C linker; ADR 0001 notes the host is the Rust binary; ADR 0004 says all phases are done; CONTEXT updated.

Still open after this (not in #76's phases): the Rust host has not run on a real Windows machine, a real Mac or arm64; the binary is not signed.

Closes #76

🤖 Generated with Claude Code

The Rust host is the only pty host now.

- removed src/host/index.ts, the host.js build entry, settings.nodeHost
  (Settings → Advanced "Use the Node host") and node-pty with its
  rebuild (postinstall, trustedDependencies, asarUnpack; npmRebuild off):
  bun install builds no native module
- host-start: hostBinary() finds wraithgrid-host for the app and for
  `wraithgrid host-stdio`; without it terminal panes can't start, so
  `bun run dev` and test:e2e build it first
- the Node host's server, screen and pty manager moved to
  tests/support/node-host/ as the in-process host of the pane-host,
  router and CLI unit tests (fake ptys, a local pty interface)
- parity suite: the Rust host only, headless xterm as the reference for
  resizes; test:host no longer builds the Electron app
- Linux package checks run `wraithgrid-host --version`; README build
  requirements are Rust and a C linker; ADR 0001/0004, CONTEXT updated

BREAKING CHANGE: settings.nodeHost is gone; a build without the Rust
host binary can't run terminal panes.

Closes #76

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cachewraith
cachewraith merged commit efab8cd into main Oct 27, 2026
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.

Host: rewrite the background pty host (src/host) in Rust as a standalone binary

1 participant