fix(server): use prebuilt node-pty binaries - #6350
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR swaps the native terminal module from You can customize Macroscope's approvability policy. Learn more. |
8baf509 to
f7c25fd
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f7c25fd. Configure here.

Fixes #5129
What Changed
node-ptywith the API-compatible@lydell/node-ptypackage.Why
The published
node-pty@1.1.0package does not include Linux prebuilds. Installing T3 on a fresh or immutable Linux SSH host therefore falls back tonode-gyp, and hosts without a compiler toolchain fail before the remote server can start. Desktop then surfaces the genericRemote T3 server did not become readyerror.@lydell/node-ptyexposes the same API while publishing prebuilt binaries for the supported desktop and Linux architectures. This removes the compiler requirement instead of only improving the diagnostic when compilation fails.This complements #5132: that PR surfaces a failed install, while this change prevents the native build failure on supported platforms.
Validation
vp test run src/terminal/NodePtyAdapter.test.ts— 4 tests passedvp run --filter t3 typecheckvp run --filter t3 buildvp fmt --check apps/server/package.json apps/server/src/terminal/NodePtyAdapter.ts apps/server/src/terminal/NodePtyAdapter.test.ts pnpm-lock.yamlChecklist
Generated with Codex (GPT-5) in the Codex desktop harness.
Note
Replace
node-ptywith@lydell/node-ptyprebuilt binaries for WSL terminal supportnode-ptydependency with@lydell/node-ptyin the server package, removing the need to compile node-pty from source in WSL.@lydell/node-ptydirectly instead of validating custom Linux prebuild files or invokingnode-gyp.@lydell/node-pty-<platform>-<arch>native packages (including Linux packages for Windows builds) via a newresolveNodePtyNativeDependenciesfunction in build-desktop-artifact.ts.build_wsl_node_ptyjob and the--wsl-prebuildCLI flag; the entire custom Linux pty.node build and upload pipeline is eliminated.ensureNodePtyno longer acceptsallowBuildand never attempts toolchain checks or a WSL-side build; failures now report Node.js version mismatches or a generic incompatibility message.Macroscope summarized 3c05b5e.
Note
Medium Risk
Changes native PTY loading, Windows/WSL packaging, and the release workflow; mis-staged or pruned platform packages would break terminals or the WSL backend, though behavior is simpler than the prior compile path.
Overview
Replaces
node-ptywith@lydell/node-ptyon the server and in the terminal adapter, including spawn-helper resolution from@lydell/node-pty-<platform>-<arch>with.asar→.asar.unpackedrewrites for packaged Electron apps.Release and desktop packaging no longer run a Linux CI job to build
pty.nodeor pass--wsl-prebuild; Windows staging instead promotes direct dependencies on the host and matching Linux@lydell/node-pty-*packages so WSL can load prebuilts withoutnode-gyp.node-ptyis removed from pnpmallowBuilds.WSL preflight drops
allowBuild, toolchain checks, and in-distronode-gypbuilds; it now probesrequire("@lydell/node-pty")(plus Node/engine and unpackedeffectchecks) and fails with clearer messages when the Linux prebuilt cannot load.Reviewed by Cursor Bugbot for commit 3c05b5e. Bugbot is set up for automated code reviews on this repo. Configure here.