chore: add Cloud Agent environment install

Save the tested Node 24.18.0 install so Cloud Agents read it from the repository.
This commit is contained in:
Cursor Agent 2026-10-07 09:07:46 +00:00
parent 51539a53ff
commit 5bd5d5fb46
No known key found for this signature in database
3 changed files with 33 additions and 1 deletions

28
.cursor/cloud-agent-install.sh Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
NODE_VERSION="24.18.0"
NODE_SHA256="55aa7153f9d88f28d765fcdad5ae6945b5c0f98a36881703817e4c450fa76742"
export PATH="/usr/local/bin:${PATH}"
if [[ "$(/usr/local/bin/node -v 2>/dev/null || true)" != "v${NODE_VERSION}" ]]; then
tmp="$(mktemp -d)"
curl -fsSL -o "${tmp}/node.tar.xz" "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"
echo "${NODE_SHA256} ${tmp}/node.tar.xz" | sha256sum -c -
sudo tar -xJf "${tmp}/node.tar.xz" -C /usr/local --strip-components=1
rm -rf "${tmp}"
fi
hash -r
for cmd in node npm npx corepack; do
if [[ -x "/usr/local/bin/${cmd}" ]]; then
sudo ln -sfn "/usr/local/bin/${cmd}" "/usr/local/cargo/bin/${cmd}"
fi
done
if [[ -f "${HOME}/.bashrc" ]] && ! grep -qF '# rea-dev-node' "${HOME}/.bashrc"; then
printf '\n# rea-dev-node\nexport PATH="/usr/local/bin:$PATH"\n' >> "${HOME}/.bashrc"
fi
npm ci

4
.cursor/environment.json Normal file
View File

@ -0,0 +1,4 @@
{
"name": "REA",
"install": "bash .cursor/cloud-agent-install.sh"
}

View File

@ -93,7 +93,7 @@ Keep tool catalogs complete and self-describing; prefer capability- and session-
## Cursor Cloud specific instructions
Development requires Node.js 24.18.0 and npm 11.16.0 (`.nvmrc` and `packageManager`). The Cloud Agent image places an older `node` on `PATH` ahead of a normal install. Environment setup installs the pinned toolchain under `/usr/local` and prepends `/usr/local/bin` for login shells. Confirm `node -v` is `v24.18.0` before installing dependencies.
Development requires Node.js 24.18.0 and npm 11.16.0 (`.nvmrc` and `packageManager`). The Cloud Agent image places an older `node` on `PATH` ahead of a normal install. `.cursor/cloud-agent-install.sh` installs that toolchain under `/usr/local` and prepends `/usr/local/bin` for login shells. Confirm `node -v` is `v24.18.0` before installing dependencies.
`npm ci` installs locked dependencies. `npm run build:cached` produces the CLI and MCP server. `npm run check:fast` is the pre-push typecheck and lint. Hopper, Ghidra, and IDA are optional bring-your-own providers. JavaScript analysis and the deterministic Vitest suites do not need them. `rea doctor` reports those engines as missing until they are configured.