fix(cli): align Node.js requirement with Stagehand SDK

Merged
SH
5h ago
+72-1

Browse currently advertises Node.js 20 support, but its Stagehand SDK dependency requires Node.js 22.18+. Starting a browser on Node 20 fails with WebSocket is not defined.

This aligns Browse's Node requirement with the SDK and checks it at startup. Unsupported runtimes now receive a clear upgrade message before commands run:

[browse] Node.js >=22.18.0 is required; found 20.20.2. Upgrade Node.js and rerun browse.

The check reads the requirement from package.json so the package metadata and runtime check stay in sync. Also updates the quickstart prerequisite and includes a patch changeset.

Verification

Command / flowObserved outputCoverage
Published browse@0.11.2 on Node 20.20.2: open https://example.com in local ChromeWebSocket is not definedReproduces the original failure.
Updated launcher: browse open on Node 20.20.2; browse --version on Node 22.12.0Both exit 1 with the required version, detected version, and upgrade instructionsRejects unsupported runtimes before commands run.
Locally built CLI on Node 22.18.0 and 22.23.3: open https://example.com → snapshot → get title → stopBoth return the page snapshot, Example Domain title, and stopped: trueReal local Chrome sessions using published Stagehand SDK 4.2.1.
CLI tests, build, manifest generation, lint, typecheck, formatting, and Changesets validation493 tests passed across 38 files; all checks passedIncludes six runtime-version regression cases and a Browse patch changeset.