How 1224425883/rea works
REA is a local reverse-engineering MCP server and CLI. The principal workflow is an agent or terminal user submitting an investigation, REA routing it through an application workflow to an appropriate analysis provider, and returning findings with evidence and limitations. The repository also exposes distinct browser, JavaScript/Electron, Android, and artifact-diagnostics capabilities. The graph combines README-documented behavior with source-index references; unsampled subsystem internals and their wiring are represented conservatively.
Main entry points: application Investigation workflows · ReverseEngineeringService.ts Reverse operations · evidence.ts Evidence records · reverseEngineeringCommands.ts Reverse commands
Components 25
User interfaces
- MCP server
src/main.ts - CLI commands
src/cli.ts - Reverse commands
src/cli/reverseEngineeringCommands.ts - MCP tool handlers
src/server/registerReverseEngineeringTools.ts
Analysis orchestration
- Investigation workflows
src/application - Provider registry
src/application/AnalysisProvider.ts - Binary sessions
src/application/binary - Reverse operations
src/application/reverse/ReverseEngineeringService.ts
Binary analysis
- Native providers
src/ghidra/GhidraProviderClient.ts - Debugger sessions
src/gdb/GdbSessionManager.ts - Rizin sessions
src/rizin/RizinDebugSessionManager.ts - Cutter bridge
src/cutter/CutterBridgeClient.ts - Binary diagnostics
src/application/binaryDiagnostics
Application analysis
- JavaScript analysis
src/application/javascript/JavaScriptApplicationWorkflowService.ts - Static analysis worker
src/javascript/analysis/JavaScriptAnalysisWorker.ts - Browser observation
src/application/BrowserObservationService.ts - Android analysis
src/application/android/AndroidAnalysisService.ts - Apple analysis
src/application/apple/AppleApplicationService.ts
Evidence and domain
- Evidence records
src/domain/evidence.ts - Analysis errors
src/domain/analysisErrorBase.ts - Reverse input schemas
src/domain/reverseEngineering.ts - Owned processes
src/process/ProviderProcess.ts - Process ownership
src/process/ProcessOwnershipObservation.ts
Other components
- Agent
- Terminal user
Connections 29
- Agent → MCP server: asks via MCP
README.md - Terminal user → CLI commands: runs commands
README.md - MCP server → MCP tool handlers: registers tools
src/main.ts - CLI commands → Reverse commands: routes commands
src/cli/reverseEngineeringCommands.ts - Reverse commands → Reverse operations: creates service
src/cli/reverseEngineeringCommands.ts - MCP tool handlers → Reverse operations: invokes operations
src/server/registerReverseEngineeringTools.ts - MCP tool handlers → Investigation workflows: serves investigations
README.md - Investigation workflows → Provider registry: selects provider
src/application/AnalysisProvider.ts - Provider registry → Binary sessions: opens sessions
- Binary sessions → Native providers: routes analysis
- Reverse operations → Reverse input schemas: validates inputs
src/domain/reverseEngineering.ts - Reverse operations → Evidence records: retains evidence
src/application/reverse/ReverseEngineeringService.ts - Reverse commands → Debugger sessions: starts sessions
src/cli/reverseEngineeringCommands.ts - Reverse commands → Rizin sessions: starts sessions
src/cli/reverseEngineeringCommands.ts - Reverse operations → Owned processes: runs commands
src/application/reverse/ReverseEngineeringService.ts - Debugger sessions → Owned processes: supervises processes
src/gdb/GdbSessionManager.ts - Owned processes → Process ownership: checks ownership
src/process/ProviderProcess.ts - Native providers → Evidence records: returns findings
src/ghidra/GhidraProviderClient.ts - Investigation workflows → Binary diagnostics: analyzes layouts
- Investigation workflows → JavaScript analysis: analyzes applications
- JavaScript analysis → Static analysis worker: runs static analysis
- Investigation workflows → Browser observation: observes runtime
- Investigation workflows → Android analysis: inspects packages
- Investigation workflows → Apple analysis: inspects applications
- Static analysis worker → Evidence records: returns findings
- Browser observation → Evidence records: records observations
- Android analysis → Evidence records: returns findings
- Reverse operations → Analysis errors: reports failures
src/application/reverse/ReverseEngineeringService.ts - Cutter bridge → Analysis errors: reports failures
src/cutter/CutterBridgeClient.ts