[PR #5169] feat: add local Jarvis agent layer for REA website teardowns #6797

Open
opened 2026-11-01 21:43:06 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5169
Author: @Crypto-stinger
Created: 10/19/2026
Status: 🔄 Open

Base: main ← Head: crypto-stinger-rea-full-setup


📝 Commits (2)

  • a5fd1d1 feat: add local Jarvis agent layer for REA website teardowns
  • 3b1f8c0 feat(jarvis): load optional gitignored jarvis/.env

📊 Changes

14 files changed (+1125 additions, -0 deletions)

View changed files

📝 .gitignore (+4 -0)
➕ jarvis/.env.example (+2 -0)
➕ jarvis/README.md (+40 -0)
➕ jarvis/package.json (+12 -0)
➕ jarvis/public/index.html (+75 -0)
➕ jarvis/src/agent.ts (+245 -0)
➕ jarvis/src/browser.ts (+193 -0)
➕ jarvis/src/config.ts (+29 -0)
➕ jarvis/src/models.ts (+125 -0)
➕ jarvis/src/rea.ts (+37 -0)
➕ jarvis/src/server.ts (+133 -0)
➕ jarvis/src/vault.ts (+88 -0)
➕ jarvis/test/jarvis.test.ts (+140 -0)
📝 package.json (+2 -0)

📄 Description

Summary

Adds jarvis/, a small local assistant that drives REA's existing browser-observation CLI. "reverse engineer " launches a clean throwaway Chrome profile, scrolls the page while REA observes it over CDP, and saves a report to a local vault. Optionally a model backend summarises the evidence and generates a clone that is tested in headless Chrome.

Problem and expected behavior

There is no one-command workflow that turns a website teardown into a saved report with long-term notes. Expected: npm run jarvis serves a localhost chat UI that runs the teardown and stores Evidence JSON, report.md, an index and memory.md under jarvis/teardowns/ (gitignored).

Change and scope

  • New self-contained jarvis/ folder (Node 24 type stripping, no new dependencies): browser launcher/CDP scroller, REA CLI runner, vault, pluggable model backend (Anthropic, OpenAI, GitHub Models via env vars only), HTTP server and static UI.
  • Root package.json gains jarvis and jarvis:test scripts; .gitignore ignores the vault.
  • Not included: any change to REA providers, tools, or contracts. Jarvis only calls scripts/rea.mjs (same workflows MCP agents use) and does not launch targets other than its own throwaway browser.
  • Server binds to 127.0.0.1 and rejects foreign Host/Origin headers.

Contract and boundary impact

  • Semantic owner and earliest changed stage: none in REA; adapter-level consumer only.
  • Contribution scope fit and linked maintainer decision: not applicable to REA providers; this is an optional consumer. Maintainer may prefer it live outside the repo.
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none; tested on Windows with Chrome.
  • Evidence, artifact, provenance, or reconstruction contract: REA Evidence JSON is saved unmodified.
  • Generated metadata, package, or installation impact: none; jarvis/ is not in the package.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Contact network services.

Evidence and regression coverage

  • Tests added or updated: jarvis/test/jarvis.test.ts (7 tests: command parsing, HTML extraction, backend selection and key handling, vault and path safety, server job flow and host rejection, live teardown of a local page).
  • Remaining proof gaps: model calls and clone generation were not run against a real API (no key available in the session).

Validation performed

  • npm run jarvis:test - 7 passed, 0 failed (includes live Chrome + REA run)
  • Keyless teardown of https://example.com/ via runTeardown - completed with observe, inspect, bundle and screenshot Evidence IDs saved
  • npm ci and npm run build:cached - succeeded (after restoring the Windows native artifact from the matching rea-agents tarball)
  • npm run check:fast / check:pr - not run; the repo git hooks were skipped (--no-verify) because bash/WSL is unavailable locally

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Windows + Chrome 156 only.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: keys are read from environment variables only and never written; localhost-only server; teardown should only be used on sites the user may analyse.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/5169 **Author:** [@Crypto-stinger](https://github.com/Crypto-stinger) **Created:** 10/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `crypto-stinger-rea-full-setup` --- ### 📝 Commits (2) - [`a5fd1d1`](https://github.com/morluto/rea/commit/a5fd1d104371a05a22d6a7393e230c371c33f9a1) feat: add local Jarvis agent layer for REA website teardowns - [`3b1f8c0`](https://github.com/morluto/rea/commit/3b1f8c0b1f8ee050580a6ab31bc16566305c4836) feat(jarvis): load optional gitignored jarvis/.env ### 📊 Changes **14 files changed** (+1125 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+4 -0) ➕ `jarvis/.env.example` (+2 -0) ➕ `jarvis/README.md` (+40 -0) ➕ `jarvis/package.json` (+12 -0) ➕ `jarvis/public/index.html` (+75 -0) ➕ `jarvis/src/agent.ts` (+245 -0) ➕ `jarvis/src/browser.ts` (+193 -0) ➕ `jarvis/src/config.ts` (+29 -0) ➕ `jarvis/src/models.ts` (+125 -0) ➕ `jarvis/src/rea.ts` (+37 -0) ➕ `jarvis/src/server.ts` (+133 -0) ➕ `jarvis/src/vault.ts` (+88 -0) ➕ `jarvis/test/jarvis.test.ts` (+140 -0) 📝 `package.json` (+2 -0) </details> ### 📄 Description ## Summary Adds `jarvis/`, a small local assistant that drives REA's existing browser-observation CLI. "reverse engineer <url>" launches a clean throwaway Chrome profile, scrolls the page while REA observes it over CDP, and saves a report to a local vault. Optionally a model backend summarises the evidence and generates a clone that is tested in headless Chrome. ## Problem and expected behavior There is no one-command workflow that turns a website teardown into a saved report with long-term notes. Expected: `npm run jarvis` serves a localhost chat UI that runs the teardown and stores Evidence JSON, `report.md`, an index and `memory.md` under `jarvis/teardowns/` (gitignored). ## Change and scope - New self-contained `jarvis/` folder (Node 24 type stripping, no new dependencies): browser launcher/CDP scroller, REA CLI runner, vault, pluggable model backend (Anthropic, OpenAI, GitHub Models via env vars only), HTTP server and static UI. - Root `package.json` gains `jarvis` and `jarvis:test` scripts; `.gitignore` ignores the vault. - Not included: any change to REA providers, tools, or contracts. Jarvis only calls `scripts/rea.mjs` (same workflows MCP agents use) and does not launch targets other than its own throwaway browser. - Server binds to 127.0.0.1 and rejects foreign Host/Origin headers. ## Contract and boundary impact - Semantic owner and earliest changed stage: none in REA; adapter-level consumer only. - Contribution scope fit and linked maintainer decision: not applicable to REA providers; this is an optional consumer. Maintainer may prefer it live outside the repo. - CLI and MCP/tool-catalog contract: none. - Provider, bridge, target-format, or platform compatibility: none; tested on Windows with Chrome. - Evidence, artifact, provenance, or reconstruction contract: REA Evidence JSON is saved unmodified. - Generated metadata, package, or installation impact: none; `jarvis/` is not in the package. Expected effects: - [x] Read existing files or captured data. - [x] Launch or attach to a process. - [x] Contact network services. ## Evidence and regression coverage - Tests added or updated: `jarvis/test/jarvis.test.ts` (7 tests: command parsing, HTML extraction, backend selection and key handling, vault and path safety, server job flow and host rejection, live teardown of a local page). - Remaining proof gaps: model calls and clone generation were not run against a real API (no key available in the session). ## Validation performed - `npm run jarvis:test` - 7 passed, 0 failed (includes live Chrome + REA run) - Keyless teardown of `https://example.com/` via `runTeardown` - completed with observe, inspect, bundle and screenshot Evidence IDs saved - `npm ci` and `npm run build:cached` - succeeded (after restoring the Windows native artifact from the matching rea-agents tarball) - `npm run check:fast` / `check:pr` - not run; the repo git hooks were skipped (`--no-verify`) because bash/WSL is unavailable locally ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: Windows + Chrome 156 only. - Package or release metadata impact: none. - Security, privacy, process, or containment review: keys are read from environment variables only and never written; localhost-only server; teardown should only be used on sites the user may analyse. ## Author readiness Human owner: <!-- @GitHub-handle --> - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6797
No description provided.