← Files Flows by plugin.spaceARCHIVED FILE
runtime/README.md
3.41 KB · Nov 30, 2026 · 00:17 UTC
# Private Node.js runtime `scripts/run.sh` and `scripts/run.ps1` reuse Node.js 22.13+ when available. If Node.js is absent, too old, or lacks npm for `setup-capture --install`, they fetch the platform archive from `https://nodejs.org/dist/v<VERSION>/`, verify it against this directory's pinned `SHASUMS256.txt`, and extract Node.js with npm and its original license into the user's cache. No Node binaries are shipped in the plugin ZIP. No global installation, shell-profile changes or administrator privileges are needed. Downloads contain no project data. The current pin is **22.23.3**. Checksums were obtained from the official [Node.js release checksums](https://nodejs.org/dist/v22.23.3/SHASUMS256.txt). Supported downloads: macOS and glibc Linux x64/ARM64; Windows x64/ARM64/x86. The minimum installed version is maintained in `lib/node-runtime.mjs`. The launcher stages downloads under the same cache root, checks the archive before extracting or executing it, checks the installed version and npm, and then moves the completed directory into place. A failed download/check never becomes a ready runtime. Concurrent setups share a lock. Interrupted downloads are removed on normal termination; after a force-kill on Unix, remove the empty lock directory named in the error only after confirming no setup is running. Unused `.download-*` directories can also be removed then. Windows file locks are released by the OS after a crash. Use `runtime` to diagnose the selected executable. `FLOWS_OFFLINE=1` blocks Node downloads (Playwright setup is separate). `FLOWS_USE_MANAGED_NODE=1` forces the private pin; `FLOWS_RUNTIME_DIR` changes its dedicated cache root; `FLOWS_NODE` selects an explicit compatible executable. See the [host guide](../skills/present-flow/references/hosts.md) for commands and defaults. ## Verification in this checkout On 2 October 2026, the macOS ARM64 first-use download and an extracted plugin ZIP were tested with Node.js and npm absent from PATH. Validation, offline cache reuse, the HTTP viewer, private npm/Playwright installation and a real Chrome screenshot passed. Automated tests also cover old/missing Node, corrupt downloads, failed retries, concurrent setup and corrupted-cache recovery. Windows and Linux native smoke tests remain to be run on those systems; the Windows launcher test runs only on Windows. ## Updating the pin 1. Choose a supported patched Node.js 22 release. Obtain its official `SHASUMS256.txt` over HTTPS and review the release provenance before changing the trusted hashes. Never compute trusted hashes from an unverified mirror. 2. Update `node-version.txt` and the seven platform/archive entries in `SHASUMS256.txt` together. Retain `.tar.gz` for Unix and `.zip` for Windows. 3. Run `npm run plugin:test` and `npm run plugin:test:package`. 4. On each supported OS, run the packaged launcher with Node/npm removed from PATH and an empty temporary `FLOWS_RUNTIME_DIR`: run `runtime`, validate the bundled example, start `serve --port 0`, and run `setup-capture --install`. Repeat validation with `FLOWS_OFFLINE=1` to verify cache reuse. Verify the viewer responds and capture can launch Chromium/Chrome. Pins change with plugin releases; the launcher never silently follows “latest”. Keep this version and its checksums current with upstream security releases. The downloaded archive retains Node.js and npm licenses; the plugin's proprietary license does not replace those third-party terms.
SHA-256: ee492e807eb56ec776a00e99bf9bf1dbb7af8426591bd7ab23ec6f654d83bb05