Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,24 @@ REA shows how it reached its conclusions. It does not claim to recover original
### Run setup — recommended

```bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

The npm package-runner prompt, when shown, approves downloading REA for this
invocation; it does not approve any setup changes. The REA wizard separately
shows its complete plan and asks before applying it. Setup does not update
Homebrew, Node.js, or npm. `npx rea-agents setup` opens with the work it
Homebrew, Node.js, or npm. The setup command opens with the work it
enables: investigate local apps from an agent, recover evidence through a
deep-analysis provider, and reuse REA's guided workflow. It summarizes the
detected agents, then asks which capabilities to set up: agent integration
(MCP plus the matching guided workflow) and—when needed—the Hopper provider.
Nothing is preselected. Choosing agent integration opens a second empty
checklist for the specific detected agents that should receive a registration.

If bare `npx` finds a project-local REA package, its dispatcher restarts setup
through `rea-agents@latest` before planning any changes. This prevents an older
local dependency from silently writing stale integration state. An already
published older release cannot contain that dispatcher protection; run
`npx -y rea-agents@latest setup` once to repair registrations created by one.
Intentional rollbacks remain available through an exact package request.
`@latest` makes the requested release explicit, and `--prefer-online` asks npm
to refresh package metadata instead of relying on a cached resolution. REA does
not silently replace the package version npm selected. Intentional rollbacks
therefore remain available through an exact package request.

REA keeps the journey inline so its history remains in the terminal. Selecting
a capability does not select every detected target or authorize a change.
Expand Down Expand Up @@ -139,7 +137,7 @@ Pass installer options after `bash -s --`, for example `--dry-run`, `--no-setup`
### With an agent — recommended

```bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

Choose Agent Integration in the reviewed setup plan. REA installs the pinned MCP
Expand All @@ -151,7 +149,7 @@ Review the setup plan, approve it if appropriate, then describe the app or featu
### From Terminal — no installation

```bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
npx -y rea-agents@latest doctor
npx -y rea-agents@latest analyze /Applications/Notes.app
```
Expand Down
4 changes: 2 additions & 2 deletions README_ar.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ npx rea-agents setup
### باستخدام وكيل برمجة — موصى به

```bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

اطلب من الوكيل إعداد REA. سيفحص جهاز Mac ويشرح ما يحتاج إلى تثبيته ويطلب الموافقة ويرشدك خلال رسائل النظام. أعد تشغيل الوكيل بعد الإعداد إذا طلب ذلك لتحميل مجموعة الأدوات الكاملة.
Expand All @@ -90,7 +90,7 @@ npx rea-agents setup

```bash
curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

إذا طلب macOS أو برنامج التثبيت تأكيدًا، فأكمل الخطوة ثم شغّل الأمر نفسه مرة أخرى.
Expand Down
4 changes: 2 additions & 2 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ REA は調査をバイナリ上の根拠に結び付けます。元のソース
### コーディングエージェントから(推奨)

```bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

エージェントに REA のセットアップを依頼してください。Mac を確認し、必要なインストールを説明して承認を求め、システムプロンプトを案内します。完全なツールを読み込むため再起動を求められた場合は、セットアップ後に再起動してください。
Expand All @@ -91,7 +91,7 @@ Ubuntu 24.04+、Fedora 41+、64 ビット Arch Linux では、REA が公式の D
```bash
# 1. REA をセットアップ
curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

macOS やインストーラーから確認を求められた場合は、その操作を完了してから同じコマンドをもう一度実行してください。
Expand Down
4 changes: 2 additions & 2 deletions README_ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ REA는 분석을 바이너리 증거에 근거하게 합니다. 원본 소스
### 코딩 에이전트에서 시작하기(권장)

```bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

에이전트에게 REA 설정을 요청하세요. Mac을 확인하고 필요한 설치 내용을 설명한 뒤 승인을 요청하며 시스템 프롬프트를 안내합니다. 전체 도구를 불러오기 위해 재시작하라고 하면 설정 후 에이전트를 재시작하세요.
Expand All @@ -91,7 +91,7 @@ Ubuntu 24.04+, Fedora 41+, 64비트 Arch Linux에서 REA는 공식 DEB, RPM 또
```bash
# 1. REA 설정
curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

macOS나 설치 프로그램이 확인을 요청하면 해당 절차를 완료하고 같은 명령을 다시 실행하세요.
Expand Down
4 changes: 2 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ REA 让调查始终以二进制证据为依据。它不会声称能恢复原始
### 使用编程智能体(推荐)

```bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

让智能体设置 REA。它会检查你的 Mac,说明需要安装的内容,先征得同意,并引导你处理系统提示。如果智能体要求重启以加载完整工具,请在设置后重启。
Expand All @@ -91,7 +91,7 @@ npx rea-agents setup
```bash
# 1. 安装和配置 REA
curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

如果 macOS 或安装程序要求确认,请完成提示,然后再次运行同一命令。
Expand Down
18 changes: 8 additions & 10 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@ REA separates installing its CLI from configuring external software and agents.
The recommended setup entrypoint is:

```bash
npx rea-agents setup
npx --yes --prefer-online rea-agents@latest setup
```

If npm asks to download and run the package, that approval applies only to the
current package-runner invocation. REA still prints its own setup plan and asks
for separate approval before changing agent configuration or installing a
product-owned component.

When bare `npx` resolves `rea-agents` from the current project's
`node_modules`, the selected dispatcher restarts setup through
`rea-agents@latest` before REA plans or writes configuration. This protects
current and future releases from silently persisting stale integration state.
Code in an already-published older release cannot acquire that check
retroactively; invoke `npx -y rea-agents@latest setup` once to repair any
registration it created.
The explicit `@latest` request and `--prefer-online` metadata policy prevent a
project dependency or stale npx cache entry from choosing the setup version.
REA runs the version npm selected and never silently replaces an intentional
version request after launch. To repair registrations written by an older
release, rerun the command above and review the resulting setup plan.

For an intentional rollback, make the package request explicit:

Expand All @@ -37,8 +35,8 @@ REA supports Node.js 22.19+ and 24.11+ (including newer releases). It uses the n

Running `npm install rea-agents` without `--global` installs the executable only
in the current project's `node_modules/.bin`; it does not make `rea` available
on the shell `PATH`. Use `npx rea-agents setup` for the guided setup journey,
`npx -y rea-agents@latest` for unattended one-off commands, or install globally
on the shell `PATH`. Use the explicit setup command above for the guided setup
journey, `npx -y rea-agents@latest` for unattended one-off commands, or install globally
with `npm install --global rea-agents` for a shell-visible `rea` command.

The optional curl wrapper installs only the global npm package:
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"bridge/hopper_bridge.py",
"bridge/ghidra/ReaGhidraBridge.java",
"scripts/rea.mjs",
"scripts/package-runner-bootstrap.mjs",
"scripts/electron-active-hook.cjs",
"scripts/electron-active-hook-boundaries.cjs",
"scripts/hopper-demo-x11.py",
Expand Down
19 changes: 0 additions & 19 deletions scripts/package-runner-bootstrap.d.mts

This file was deleted.

72 changes: 0 additions & 72 deletions scripts/package-runner-bootstrap.mjs

This file was deleted.

12 changes: 1 addition & 11 deletions scripts/rea.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { access } from "node:fs/promises";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";

import { runPackageRunnerSetupBootstrap } from "./package-runner-bootstrap.mjs";

// Route production MCP before importing Incur. Incur owns registration helpers
// such as `mcp add`, while only dist/main.js may serve the stdio tool catalog.
const args = process.argv.slice(2);
Expand All @@ -17,21 +15,13 @@ const isMcpMode =
args.length === 1 && (args[0] === "--mcp" || args[0] === "mcp");
const isMcpDoctorMode = args[0] === "mcp" && args[1] === "doctor";
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
const bootstrapExitCode = await runPackageRunnerSetupBootstrap({
args,
environment: process.env,
packageRoot,
packageName: packageJson.name,
});
const runtimeFiles = isMcpMode
? ["dist/main.js"]
: isMcpDoctorMode
? ["dist/main.js", "dist/mcpDoctor.js"]
: ["dist/cli.js", "dist/cliOutput.js"];

if (bootstrapExitCode !== undefined) {
process.exitCode = bootstrapExitCode;
} else if (!(await compiledRuntimeExists(runtimeFiles))) {
if (!(await compiledRuntimeExists(runtimeFiles))) {
process.stderr.write(
`REA's compiled runtime is missing. Run \`npm ci\` in ${packageRoot} to install dependencies and build REA, then restart it. If this is an installed package, reinstall rea-agents.\n`,
);
Expand Down
8 changes: 0 additions & 8 deletions tests/boundary/cli/dispatcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ describe("executable dispatcher", () => {
await workspace.mkdir("dist");
await Promise.all([
copyFile("scripts/rea.mjs", join(scripts, "rea.mjs")),
copyFile(
"scripts/package-runner-bootstrap.mjs",
join(scripts, "package-runner-bootstrap.mjs"),
),
workspace.write(
"package.json",
JSON.stringify({ type: "module", version: "1.0.0" }),
Expand Down Expand Up @@ -72,10 +68,6 @@ describe("executable dispatcher", () => {
const scripts = await workspace.mkdir("scripts");
await Promise.all([
copyFile("scripts/rea.mjs", join(scripts, "rea.mjs")),
copyFile(
"scripts/package-runner-bootstrap.mjs",
join(scripts, "package-runner-bootstrap.mjs"),
),
workspace.write(
"package.json",
JSON.stringify({ type: "module", version: "1.0.0" }),
Expand Down
Loading
Loading