diff --git a/.cursor/cloud-agent-install.sh b/.cursor/cloud-agent-install.sh new file mode 100755 index 000000000..4d264b24e --- /dev/null +++ b/.cursor/cloud-agent-install.sh @@ -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 diff --git a/.cursor/environment.json b/.cursor/environment.json new file mode 100644 index 000000000..889efc5de --- /dev/null +++ b/.cursor/environment.json @@ -0,0 +1,4 @@ +{ + "name": "REA", + "install": "bash .cursor/cloud-agent-install.sh" +} diff --git a/AGENTS.md b/AGENTS.md index d7f7ed3df..7872dae82 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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.