Repository navigation
fix(node): keep npx-installed services outside the npm cache - #168644
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR installs npx-backed node services into a durable npm prefix and prints installation and update guidance. Example: Enroll a node using npx openclaw connect <join-url> --service, then delete npm's _npx cache.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a service-durability bug still present on current main, with sufficient scoped live proof and no identified correctness or security defect. Exact-head CI remains pending. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe node-service install planner receives the selected runtime and saved Gateway settings, promotes temporary npm installations through the existing package updater, and supplies durable arguments to platform service writers. flowchart TD
A[Node install or connect CLI] --> B[Node install planner]
B --> C[Npx package resolver]
C --> D[Existing npm updater]
D --> E[State owned package prefix]
E --> F[Platform service command]
F --> G[Gateway connection]
Technical reviewBest possible solution: Use one verified state-owned npm installation for npx-backed node services through the existing package updater. Do we have a high-confidence way to reproduce the issue? Current-main source retains the temporary package path, and supplied published-package logs show cache deletion producing MODULE_NOT_FOUND; this review executed no target code. Is this the best way to solve the issue? The patch repairs service argument selection at its producer, preserves pnpm and paired-auth behavior, and reuses the existing updater rather than adding another package-management owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4754d394130a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +102, Tests +88, Docs +34. Total +224 across 7 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (5 earlier review cycles)
Reviewed October 10, 2026, 8:21 PM ET / October 11, 2026, 00:21 UTC (Revision 6). |
a7a604e to
88a14fd
Compare
88a14fd to
d7a018e
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
292bd19 to
27b447d
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
## What Problem This Solves Fixes machine enrollment silently running an old cached npm release when the Gateway is newer. ## User Impact `devices join-code` and the Control UI now suggest the Gateway's published npm version, not the invoking CLI's version. Both also show the short alternative for an existing OpenClaw installation. The default remains a background service with explicit session-host consent; command-only services remain available. Source checkouts and unpublished builds prefer a resolvable matching channel tag. If npm cannot confirm a target, the command stays unpinned and a one-line note asks for a matching Gateway build. JSON keeps `joinUrl` and `command`, adding `serviceCommand`, `installedCommand`, and optional `versionNote`. ## Why This Change Was Made [#168623](#168623) / `8f91e4bb65f` established the one-paste service/session-host default but deliberately left npm unpinned. npm can reuse an old cached package. The Gateway now owns version selection and command formatting in the same RPC that mints the URL; CLI and UI consume its commands instead of independently rebuilding them. The existing update owners supply install identity and channel policy. Joining does not run a full update/dependency inspection. This composes with the durable service installation work in [#168644](#168644); it does not change node execution, service lifecycle, or upgrade commands. No overlap with Pash/Sarah changes. ## Evidence - Regressions on `8f91e4bb65f`: eight Gateway/CLI-boundary cases and three CLI text/JSON cases fail for missing authoritative commands; the real browser regression reaches the setup RPC and fails waiting for the pinned command. - Focused Gateway and CLI suites: 84 tests passed after the final lightweight-install-discovery refinement. The Gateway suite took 173.85s and CLI suite 43.42s on the loaded local host (including transform/setup); assertions took about 1.7s and 15.5s respectively. - All five browser flows passed. After the final template simplification, the real bundled UI mint/refresh flow passed again (46.41s, including setup), covering the pinned command, installed alternative, and development fallback note. The Control UI Lit ratchet also passed. - Real isolated Gateway text/JSON: baseline printed unpinned npm commands; candidate printed `[email protected]`, matching the Gateway release, plus the existing-installation alternative. Both exited successfully. This proof exercises command generation, not installation on a second machine; durable service installation is covered separately by #168644. - The built CLI bootstrap guard passed. The local changed gate stopped at an unrelated existing mock-export violation in `src/model-picker/apply-session-model-selection-placement.test.ts`; the rebase picked up its existing `mock-isolation` explanation. Hosted exact-head CI is the final check. - Inherited CI failure: [the final-head job](https://github.com/openclaw/openclaw/actions/runs/38096158809/job/114342554800) failed `plugin-sdk-surface-report.test.ts` on SDK export-budget drift: 3672 > 3656 exports, 2133 > 2122 callables, 158 > 154 deprecated exports, and two deprecated-entrypoint budgets. Clean `origin/main` at `dd4b258a3cfa6fdef41535e5518fe260f5665a9c` reproduces the same budget failures (2 failed, 3 passed, 1 Linux-only test skipped on macOS; 18.84s). The aggregate CI gate reports this failure; fail-fast cancelled the other unfinished lanes. This PR changes no plugin SDK surface or budget. Production: +105/-17 lines; tests: +188/-27; documentation: +23/-2. The added production logic replaces independent CLI/UI formatting with one Gateway decision owner. <details> <summary>Real isolated Gateway terminal output (redacted)</summary> Gateway: `OpenClaw 2026.9.9`. Both text and JSON commands exited 0. Only the ephemeral loopback port and single-use code are redacted. Before (`devices join-code`): ```text npx -y openclaw connect http://127.0.0.1:<port>/j/<code> --service --session-host ``` After (`devices join-code`): ```text npx -y [email protected] connect http://127.0.0.1:<port>/j/<code> --service --session-host Already have OpenClaw installed? Run: openclaw connect http://127.0.0.1:<port>/j/<code> --service --session-host ``` After (`devices join-code --json`): ```json { "joinUrl": "http://127.0.0.1:<port>/j/<code>", "command": "npx -y [email protected] connect http://127.0.0.1:<port>/j/<code> --service --session-host", "serviceCommand": "npx -y [email protected] connect http://127.0.0.1:<port>/j/<code> --service", "installedCommand": "openclaw connect http://127.0.0.1:<port>/j/<code> --service --session-host" } ``` </details> ### Connect a machine | Before | After | | --- | --- | |  |  | The screenshots use synthetic Gateway data and the actual bundled Control UI. ## Bounded cost Only explicit join-code creation performs registry work: at most two npm metadata GETs, each with a one-second deadline including the response body. No background polling, model calls, package-manager subprocesses, retries, or new caches. Existing prepared install identity is reused; if absent, the update owner's lightweight local classifier runs without dependency inspection, with its Git probe bounded to one second. No registry lookup is performed by CLI or UI. ## Compatibility and Risk The RPC fields are additive. A new CLI needs a Gateway that returns the authoritative commands and explains how to update if it connects to an older Gateway. Published npm releases use exact versions; development/unpublished/offline results are explicitly marked as requiring a matching build. Shell quoting remains owned by the existing CLI argument helper. Two-way door: reverting changes future suggestions and added response fields only. It does not change existing pairings, service state, or session-host consent. The blast radius is enrollment instructions and their presentation. Co-authored-by: Ayaan Zaidi <[email protected]>
…w#168644) ## What Problem This Solves Fixes node services installed through `npx openclaw connect <join-url> --service` or `npx openclaw node install` pointing at npm's disposable `_npx` cache. ## User Impact The one-paste command installs the selected OpenClaw release into a durable npm prefix under the node's state directory before writing the service. Removing npm's exec cache no longer removes the service's executable. Installation prints the package version, chosen runtime, service command, and a fresh-npx node update command. ## Why This Change Was Made The service argument resolver previously used the running package's resolved path. openclaw#167905 fixes pnpm's replaceable store-generation paths by selecting its existing stable link; npm exec has no stable link to select. This preserves that pnpm behavior and adds node-install promotion through the existing npm update owners (`resolveGlobalInstallTarget`, `runGlobalPackageUpdateSteps`, and their staged publication/rollback/cleanup). There is one `<state-dir>/npm` prefix, not a prefix per release. The normal state-directory/profile resolver chooses its location. Run `npx -y openclaw@latest node install --force` on the node to update it, retaining the same profile/state-directory settings. An exact version or `@beta` can replace `@latest`. Reinstalling an already-selected version repairs damaged package files. No new settings or package manager. This does not change `openclaw update` or its existing co-located Gateway selection behavior. Node auto-update still follows the node's npm channel, not the connected Gateway's version/build. The rebase preserves openclaw#168653's paired-credential filtering and explicit `--auth-from-env` service argument. No overlap with Pash/Sarah changes. ## Evidence Final code: `27b447dc07b737126124ff8847f2059cb8a4f921`. Packaged live proof ran on `292bd19fe934ecf4ee4e3b20b00a03a1b08f7933`; production feature code and docs are unchanged since that proof. The final revision only corrects regression-test platform handling and rebases onto green main. - **Before:** the regression on baseline `d1abe907cb7cfa63aeee7168099fabc81dd8309a` selected `.npm/_npx/.../node_modules/openclaw/dist/index.js`. In the live isolated replay, published `[email protected]` completed real join-URL enrollment; deleting its npm exec cache made the saved command exit 1 with `MODULE_NOT_FOUND`. - **After:** the canonical self-contained package passed `scripts/package-openclaw-for-docker.mjs --skip-build --allow-unreleased-changelog` and its tarball inventory/import-graph integrity check. Real `npm exec --package=<candidate.tgz> -- openclaw connect <join-url> --service` promoted that selected package into the node's state-owned npm prefix. Both actual launchd and systemd generators selected the durable entrypoint. After removing `_npx`, executing the persisted command as a separate process connected to the isolated Gateway. The published driver's device identity and node settings were unchanged. - **Upgrade and repair:** seeded the durable prefix with published `[email protected]`, retained the enrolled node state, and invoked the candidate through fresh npx with `--profile upgrade node install --force`. The prefix became the candidate version. Overwriting its `dist/index.js` and repeating the same command restored the exact original file bytes. The runtime, device identity, and node settings remained unchanged; the repaired persisted command connected after deleting `_npx` again. The prefix contained only `bin` and `lib`, with one `openclaw` package rather than per-release directories. - **Package identity:** the unpublished candidate shares the version string `2026.9.9` with the public release. An isolated loopback npm registry served the canonical candidate tarball for that version, while forwarding dependency requests to npm. This prevents accidentally testing promotion of the older public package with the same version string; no product behavior was mocked. - **Focused checks:** 50 tests passed across `src/commands/node-daemon-install-npx.test.ts`, `src/commands/node-daemon-install-helpers.test.ts`, and `src/cli/node-cli/daemon.test.ts`. The new regression uses actual generators and executes their commands after cache deletion. The final portability correction keeps systemd coverage on non-Windows platforms and reads launchd artifacts only on macOS. That corrected regression passed (1.285 s test execution), and the `core-test-commands` type graph passed. Its unchanged durable-path assertion failed on the baseline as expected (pueue 2903). - **Changed checks:** formatting, conflict/line-count/assertion/SQLite/mock-export ratchets, config docs, plugin boundaries, dependency guards, and the core type graph boundary passed. The prior head's local core typecheck stopped on unrelated `channel-presence-policy.ts:519` TS6133; the branch is now rebased onto the main fix rather than carrying a separate repair. - **Independent review:** LAND on exact final head `27b447dc07b737126124ff8847f2059cb8a4f921`, including the corrected test, updater-step adapter, and paired-auth preservation. Sanitized live results: ```text before-cache-deleted: exit 1 (MODULE_NOT_FOUND) after: /state/npm/lib/node_modules/openclaw/dist/index.js node host gateway connected: ws://127.0.0.1:<isolated-port> upgrade: 2026.9.8 -> candidate 2026.9.9 sameVersionRepair: true runtimePreserved: true pairingAndSettingsPreserved: true connectedAfterCacheDeletion: true ``` **Native-supervisor limitation:** supervisor activation was not verified. Native service installation reaches the existing systemd user-session/profile guards in the unprivileged container; macOS refuses native installation from an isolated HOME. The proof runs actual generated service arguments as a separate live node, not under an activated OS supervisor. Launchd XML was decoded in Linux and passed through the production generated-environment resolver; the macOS regression exercises the actual plist reader. No HOME-guard bypass, privileged container, existing Gateway, or real laptop installation was used. **CI:** [final-head run 38097819645](https://github.com/openclaw/openclaw/actions/runs/38097819645) passed, including production types, test types, lint, source contracts, and the corrected Linux regression. All applicable PR checks finished with no failure, cancellation, or pending check. The final head is rebased onto green main; no inherited failure waiver or SDK budget change is needed. ClawSweeper is **ready, 5/6**, and the independent reviewer returned **LAND**, both on `27b447dc07b737126124ff8847f2059cb8a4f921`. ## Bounded cost Only npx-backed node installation needs an additional npm installation. It uses one state-owned prefix and the existing updater's staging, verification, rollback, and cleanup; it does not accumulate per-version prefixes. Reuse verifies the installed package and advertised content inventory, so a same-version damaged package is repaired. Ordinary node execution and model/session paths are unchanged. Non-npx installation adds only entrypoint inspection and installation diagnostics. Source +104/-2, tests +88/-0, docs +34/-0; net +224 across seven files. The growth reuses the existing package updater rather than adding another installation or state owner. ## Merge Danger Two-way code change, with a durable npm installation left in the selected node state directory if reverted. A revert restores the old npx service-install behavior; it does not remove an already installed package. Blast radius is headless node service installation and its printed diagnostics; Gateway installation and pnpm launcher resolution are unchanged. Co-authored-by: Ayaan Zaidi <[email protected]>
) ## What Problem This Solves Fixes machine enrollment silently running an old cached npm release when the Gateway is newer. ## User Impact `devices join-code` and the Control UI now suggest the Gateway's published npm version, not the invoking CLI's version. Both also show the short alternative for an existing OpenClaw installation. The default remains a background service with explicit session-host consent; command-only services remain available. Source checkouts and unpublished builds prefer a resolvable matching channel tag. If npm cannot confirm a target, the command stays unpinned and a one-line note asks for a matching Gateway build. JSON keeps `joinUrl` and `command`, adding `serviceCommand`, `installedCommand`, and optional `versionNote`. ## Why This Change Was Made [openclaw#168623](openclaw#168623) / `13d3847f108` established the one-paste service/session-host default but deliberately left npm unpinned. npm can reuse an old cached package. The Gateway now owns version selection and command formatting in the same RPC that mints the URL; CLI and UI consume its commands instead of independently rebuilding them. The existing update owners supply install identity and channel policy. Joining does not run a full update/dependency inspection. This composes with the durable service installation work in [openclaw#168644](openclaw#168644); it does not change node execution, service lifecycle, or upgrade commands. No overlap with Pash/Sarah changes. ## Evidence - Regressions on `13d3847f108`: eight Gateway/CLI-boundary cases and three CLI text/JSON cases fail for missing authoritative commands; the real browser regression reaches the setup RPC and fails waiting for the pinned command. - Focused Gateway and CLI suites: 84 tests passed after the final lightweight-install-discovery refinement. The Gateway suite took 173.85s and CLI suite 43.42s on the loaded local host (including transform/setup); assertions took about 1.7s and 15.5s respectively. - All five browser flows passed. After the final template simplification, the real bundled UI mint/refresh flow passed again (46.41s, including setup), covering the pinned command, installed alternative, and development fallback note. The Control UI Lit ratchet also passed. - Real isolated Gateway text/JSON: baseline printed unpinned npm commands; candidate printed `[email protected]`, matching the Gateway release, plus the existing-installation alternative. Both exited successfully. This proof exercises command generation, not installation on a second machine; durable service installation is covered separately by openclaw#168644. - The built CLI bootstrap guard passed. The local changed gate stopped at an unrelated existing mock-export violation in `src/model-picker/apply-session-model-selection-placement.test.ts`; the rebase picked up its existing `mock-isolation` explanation. Hosted exact-head CI is the final check. - Inherited CI failure: [the final-head job](https://github.com/openclaw/openclaw/actions/runs/38096158809/job/114342554800) failed `plugin-sdk-surface-report.test.ts` on SDK export-budget drift: 3672 > 3656 exports, 2133 > 2122 callables, 158 > 154 deprecated exports, and two deprecated-entrypoint budgets. Clean `origin/main` at `39900fc906e66ff0e4bf61ef11ad531883ea979f` reproduces the same budget failures (2 failed, 3 passed, 1 Linux-only test skipped on macOS; 18.84s). The aggregate CI gate reports this failure; fail-fast cancelled the other unfinished lanes. This PR changes no plugin SDK surface or budget. Production: +105/-17 lines; tests: +188/-27; documentation: +23/-2. The added production logic replaces independent CLI/UI formatting with one Gateway decision owner. <details> <summary>Real isolated Gateway terminal output (redacted)</summary> Gateway: `OpenClaw 2026.9.9`. Both text and JSON commands exited 0. Only the ephemeral loopback port and single-use code are redacted. Before (`devices join-code`): ```text npx -y openclaw connect http://127.0.0.1:<port>/j/<code> --service --session-host ``` After (`devices join-code`): ```text npx -y [email protected] connect http://127.0.0.1:<port>/j/<code> --service --session-host Already have OpenClaw installed? Run: openclaw connect http://127.0.0.1:<port>/j/<code> --service --session-host ``` After (`devices join-code --json`): ```json { "joinUrl": "http://127.0.0.1:<port>/j/<code>", "command": "npx -y [email protected] connect http://127.0.0.1:<port>/j/<code> --service --session-host", "serviceCommand": "npx -y [email protected] connect http://127.0.0.1:<port>/j/<code> --service", "installedCommand": "openclaw connect http://127.0.0.1:<port>/j/<code> --service --session-host" } ``` </details> ### Connect a machine | Before | After | | --- | --- | |  |  | The screenshots use synthetic Gateway data and the actual bundled Control UI. ## Bounded cost Only explicit join-code creation performs registry work: at most two npm metadata GETs, each with a one-second deadline including the response body. No background polling, model calls, package-manager subprocesses, retries, or new caches. Existing prepared install identity is reused; if absent, the update owner's lightweight local classifier runs without dependency inspection, with its Git probe bounded to one second. No registry lookup is performed by CLI or UI. ## Compatibility and Risk The RPC fields are additive. A new CLI needs a Gateway that returns the authoritative commands and explains how to update if it connects to an older Gateway. Published npm releases use exact versions; development/unpublished/offline results are explicitly marked as requiring a matching build. Shell quoting remains owned by the existing CLI argument helper. Two-way door: reverting changes future suggestions and added response fields only. It does not change existing pairings, service state, or session-host consent. The blast radius is enrollment instructions and their presentation. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes node services installed through
npx openclaw connect <join-url> --serviceornpx openclaw node installpointing at npm's disposable_npxcache.User Impact
The one-paste command installs the selected OpenClaw release into a durable npm prefix under the node's state directory before writing the service. Removing npm's exec cache no longer removes the service's executable. Installation prints the package version, chosen runtime, service command, and a fresh-npx node update command.
Why This Change Was Made
The service argument resolver previously used the running package's resolved path. #167905 fixes pnpm's replaceable store-generation paths by selecting its existing stable link; npm exec has no stable link to select. This preserves that pnpm behavior and adds node-install promotion through the existing npm update owners (
resolveGlobalInstallTarget,runGlobalPackageUpdateSteps, and their staged publication/rollback/cleanup).There is one
<state-dir>/npmprefix, not a prefix per release. The normal state-directory/profile resolver chooses its location. Runnpx -y openclaw@latest node install --forceon the node to update it, retaining the same profile/state-directory settings. An exact version or@betacan replace@latest. Reinstalling an already-selected version repairs damaged package files. No new settings or package manager.This does not change
openclaw updateor its existing co-located Gateway selection behavior. Node auto-update still follows the node's npm channel, not the connected Gateway's version/build. The rebase preserves #168653's paired-credential filtering and explicit--auth-from-envservice argument.Evidence
Final code:
27b447dc07b737126124ff8847f2059cb8a4f921. Packaged live proof ran on292bd19fe934ecf4ee4e3b20b00a03a1b08f7933; production feature code and docs are unchanged since that proof. The final revision only corrects regression-test platform handling and rebases onto green main.e40606fdea96135758ec5bc0b1a355d08ead0c7eselected.npm/_npx/.../node_modules/openclaw/dist/index.js. In the live isolated replay, published[email protected]completed real join-URL enrollment; deleting its npm exec cache made the saved command exit 1 withMODULE_NOT_FOUND.scripts/package-openclaw-for-docker.mjs --skip-build --allow-unreleased-changelogand its tarball inventory/import-graph integrity check. Realnpm exec --package=<candidate.tgz> -- openclaw connect <join-url> --servicepromoted that selected package into the node's state-owned npm prefix. Both actual launchd and systemd generators selected the durable entrypoint. After removing_npx, executing the persisted command as a separate process connected to the isolated Gateway. The published driver's device identity and node settings were unchanged.[email protected], retained the enrolled node state, and invoked the candidate through fresh npx with--profile upgrade node install --force. The prefix became the candidate version. Overwriting itsdist/index.jsand repeating the same command restored the exact original file bytes. The runtime, device identity, and node settings remained unchanged; the repaired persisted command connected after deleting_npxagain. The prefix contained onlybinandlib, with oneopenclawpackage rather than per-release directories.2026.9.9with the public release. An isolated loopback npm registry served the canonical candidate tarball for that version, while forwarding dependency requests to npm. This prevents accidentally testing promotion of the older public package with the same version string; no product behavior was mocked.src/commands/node-daemon-install-npx.test.ts,src/commands/node-daemon-install-helpers.test.ts, andsrc/cli/node-cli/daemon.test.ts. The new regression uses actual generators and executes their commands after cache deletion. The final portability correction keeps systemd coverage on non-Windows platforms and reads launchd artifacts only on macOS. That corrected regression passed (1.285 s test execution), and thecore-test-commandstype graph passed. Its unchanged durable-path assertion failed on the baseline as expected (pueue 2903).channel-presence-policy.ts:519TS6133; the branch is now rebased onto the main fix rather than carrying a separate repair.27b447dc07b737126124ff8847f2059cb8a4f921, including the corrected test, updater-step adapter, and paired-auth preservation.Sanitized live results:
Native-supervisor limitation: supervisor activation was not verified. Native service installation reaches the existing systemd user-session/profile guards in the unprivileged container; macOS refuses native installation from an isolated HOME. The proof runs actual generated service arguments as a separate live node, not under an activated OS supervisor. Launchd XML was decoded in Linux and passed through the production generated-environment resolver; the macOS regression exercises the actual plist reader. No HOME-guard bypass, privileged container, existing Gateway, or real laptop installation was used.
CI: final-head run 38097819645 passed, including production types, test types, lint, source contracts, and the corrected Linux regression. All applicable PR checks finished with no failure, cancellation, or pending check. The final head is rebased onto green main; no inherited failure waiver or SDK budget change is needed. ClawSweeper is ready, 5/6, and the independent reviewer returned LAND, both on
27b447dc07b737126124ff8847f2059cb8a4f921.Bounded cost
Only npx-backed node installation needs an additional npm installation. It uses one state-owned prefix and the existing updater's staging, verification, rollback, and cleanup; it does not accumulate per-version prefixes. Reuse verifies the installed package and advertised content inventory, so a same-version damaged package is repaired. Ordinary node execution and model/session paths are unchanged. Non-npx installation adds only entrypoint inspection and installation diagnostics.
Source +104/-2, tests +88/-0, docs +34/-0; net +224 across seven files. The growth reuses the existing package updater rather than adding another installation or state owner.
Merge Danger
Two-way code change, with a durable npm installation left in the selected node state directory if reverted. A revert restores the old npx service-install behavior; it does not remove an already installed package. Blast radius is headless node service installation and its printed diagnostics; Gateway installation and pnpm launcher resolution are unchanged.