mirror of
https://github.com/morluto/rea.git
synced 2026-10-26 17:35:11 +00:00
Introduce provider-neutral ownership, private runtime roots, absolute startup deadlines, pending-operation correlation, bounded output capture, and verified TERM-to-KILL process supervision.\n\nMigrate Hopper onto the shared lifecycle pieces while keeping its Unix-socket protocol and health/shutdown parsing adapter-specific. Preserve exact ownership checks and fail-closed cleanup, including descendant cleanup after the launcher leader exits.\n\nAdd reusable process fixtures and deterministic coverage for startup timeout, cancellation, output bounds, exit diagnostics, cleanup escalation, repeated close, spawn failure, and resource disposal. Update architecture, provider evaluation, contributor guidance, and generated API documentation.
75 lines
2.9 KiB
Plaintext
75 lines
2.9 KiB
Plaintext
graph TD
|
|
subgraph "Entry Points"
|
|
CLI["src/cli.ts<br/>One-shot CLI adapter<br/>setup, diagnostics, analysis, decompilation"]
|
|
MAIN["src/main.ts<br/>MCP stdio server adapter<br/>config, session, process lifetime"]
|
|
DISPATCH["scripts/rea.mjs<br/>Executable dispatcher<br/>routes mcp / one-shot"]
|
|
end
|
|
|
|
subgraph "Adapters"
|
|
SERVER["src/server/<br/>MCP request translation<br/>createServer, tool registration, toolResult"]
|
|
BRIDGE["bridge/hopper_bridge.py<br/>Runs inside Hopper<br/>adapts operations to Hopper Python API"]
|
|
INSTALL["Host installation adapters<br/>macOS: verified vendor DMG to ~/Applications<br/>Linux: verified vendor package + apt/dnf/pacman"]
|
|
end
|
|
|
|
subgraph "Application Layer"
|
|
APP["src/application/<br/>Shared CLI/MCP workflows<br/>enhanced analysis and investigations"]
|
|
SESSION["SessionProviderRouter + BinarySession<br/>one immutable deep binding per target<br/>disjoint auxiliary routing"]
|
|
REGISTRY["AnalysisProviderRegistry<br/>sorted deep candidates<br/>deterministic selection, no fallback"]
|
|
WORKSPACE["Investigation workspace store<br/>approved roots, canonical JSON<br/>atomic CAS revisions and locks"]
|
|
end
|
|
|
|
subgraph "Provider Layers"
|
|
HOPPER["src/hopper/<br/>Hopper launch & Unix-socket protocol<br/>BridgeLauncher, HopperClient, protocol"]
|
|
AUX["src/artifacts/ + src/native/<br/>disjoint artifact and native capabilities"]
|
|
BROWSER["src/browser/<br/>Loopback CDP transport<br/>exact-origin passive observation"]
|
|
end
|
|
|
|
subgraph "Provider Process Foundation"
|
|
PROCESS["src/process/<br/>owned process groups, private roots<br/>deadlines, bounded diagnostics, cleanup"]
|
|
end
|
|
|
|
subgraph "Contracts Layer"
|
|
CONTRACTS["src/contracts/<br/>Caller-visible tool schemas<br/>78 analysis, browser, Electron, and session tools"]
|
|
end
|
|
|
|
subgraph "Domain Layer"
|
|
DOMAIN["src/domain/<br/>Pure side-effect-free modules<br/>evidence, comparisons, workspace commitments"]
|
|
end
|
|
|
|
subgraph "Configuration"
|
|
CONFIG["src/config.ts<br/>Zod-validated env parsing<br/>provider settings, origins, and approved roots"]
|
|
end
|
|
|
|
subgraph "Tests"
|
|
TESTS["tests/<br/>Vitest suite<br/>fixtures/ holds fake launcher, bridge, and CDP seams"]
|
|
end
|
|
|
|
DISPATCH --> CLI
|
|
DISPATCH --> MAIN
|
|
MAIN --> CONFIG
|
|
MAIN --> SERVER
|
|
MAIN --> APP
|
|
CLI --> APP
|
|
APP --> SESSION
|
|
SESSION --> REGISTRY
|
|
REGISTRY --> HOPPER
|
|
SESSION --> AUX
|
|
APP --> WORKSPACE
|
|
APP --> INSTALL
|
|
SERVER --> CONTRACTS
|
|
SERVER --> APP
|
|
APP --> BROWSER
|
|
HOPPER --> BRIDGE
|
|
HOPPER --> PROCESS
|
|
APP --> PROCESS
|
|
APP --> DOMAIN
|
|
CONTRACTS --> DOMAIN
|
|
HOPPER --> DOMAIN
|
|
AUX --> DOMAIN
|
|
BROWSER --> DOMAIN
|
|
PROCESS --> DOMAIN
|
|
TESTS -.-> MAIN
|
|
TESTS -.-> HOPPER
|
|
TESTS -.-> PROCESS
|
|
TESTS -.-> BROWSER
|