Compliance note: this session was run against our own website. Run it only against software you own or are authorized to analyze.
The target
A small browser-games site (static HTML + 9 vanilla JS files, no framework). This is a good first target because you can verify every REA finding by eye.
Step 1 โ Launch a debug browser
analyze-web-bundle attaches to a real browser over the Chrome DevTools Protocol. Launch Chrome or Edge with a debug port and a dedicated profile directory (recent Chromium builds refuse the debug port on your default profile):
/Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge \
--remote-debugging-port=9222 \
--user-data-dir="$HOME/rea-debug-profile" \
--remote-allow-origins="*" \
--no-first-run \
"https://your-target.example.com/"
Step 2 โ List targets and grab the target ID
npx rea-agents@latest list-browser-targets http://127.0.0.1:9222
Note the endpoint must include the scheme (http://) โ passing a bare 127.0.0.1:9222 fails with invalid_value on cdp_endpoint. The output includes an evidence_id and the target list; copy the page target's ID.
Step 3 โ Run the analysis
npx rea-agents@latest analyze-web-bundle http://127.0.0.1:9222 <TARGET_ID> \
--allowed-origins https://your-target.example.com \
--detail complete \
--evidence_output ./evidence-bundle
--allowed-originsscopes the capture to the origin you're authorized on โ REA will not wander off-site.--detail summaryrequires an extra--view '{"kind":"javascript-routes","collection":"routes"}'argument; start withcomplete.
What you get (real numbers from our run)
- 9 scripts observed, 9 analyzed, 0 parse failures โ every script the page loaded was captured with its URL and SHA-256 hash (
app.js,extra-games.js,discovery.js,analytics.js,puzzle-models.js,world-games.js,puzzle-games.js,world-models.js,extra-models.js). - 40,388 AST nodes visited across ~230 KB of JavaScript.
- A route inventory (
jsri:โฆID) classifying navigation candidates, with anunknownslist: 3 navigation destinations flagged because they're built dynamically at runtime rather than appearing as string literals โ exactly the kind of thing a manual grep misses. - Honest limitations, stated in the output itself: REA never executes the captured JavaScript; string-built routes and server-side behavior remain unknown. This is a bounded static observation, not a dynamic trace.
What this is good for
- Auditing what third-party/analytics scripts your own site actually loads.
- Mapping an SPA's client-side routes before writing integration tests.
- Feeding structured Evidence (with stable IDs and hashes) into an AI agent for follow-up questions.
Hiccup we hit (and the fix)
On a sandboxed macOS shell the run ended with cleanup_incomplete and the --evidence_output file was not written, even though the analysis itself completed. Workaround and details: Troubleshooting โ cleanup_incomplete.