How raytrace-inc/raytrace works
RayTrace is a coding-agent sandbox and evidence product: users create an isolated project copy, run Claude Code or Codex inside it, inspect independently collected activity in a dashboard, and can export diffs or logs. The repository combines a CLI/MCP control plane, local sandbox runtime and evidence capture, a proxy-backed dashboard, and SDK clients. The README documents the principal runtime relationships; sampled source additionally shows dashboard API calls and search behavior. Several listed modules were not sampled, so their internal wiring is not asserted.
Main entry points: engine.py Sandbox engine · api.ts Dashboard API client · raytrace.mjs RayTrace CLI · dashboard.tsx Dashboard views
Components 20
User control plane
- RayTrace CLI
bin/raytrace.mjs - CLI commands
src/commands.mjs - MCP server
src/mcp.mjs - Sandbox controls
src/sandbox.mjs
Sandbox and evidence
- Local sandbox manager
src/local-sandbox.mjs - Sandbox engine
worker/sandbox/engine.py - Activity collector
worker/sandbox/collector.py - File evidence scan
worker/sandbox/file_scan.py - RayTrace proxy
proxy/raytace-proxy.mjs - Evidence storage
proxy/evidence-store.mjs
Inspection dashboard
- Dashboard views
dashboard/app/dashboard.tsx - Dashboard API client
dashboard/app/api.ts - Activity search
dashboard/app/search-view.tsx - Prompt context view
dashboard/app/context-view.tsx
Analysis and clients
- Experiment analysis
proxy/experiment-engine.mjs - Playground service
proxy/playground.mjs - TypeScript SDK
sdk/ts/src/client.mjs
Other components
- Developer
- RayTrace cloud
- Claude Code or Codex
Connections 21
- Developer → RayTrace CLI: runs commands
README.md - RayTrace CLI → CLI commands: dispatches
bin/raytrace.mjs - CLI commands → Sandbox controls: manages sandboxes
- RayTrace CLI → MCP server: starts MCP
bin/raytrace.mjs - Sandbox controls → Local sandbox manager: controls local
src/sandbox.mjs - Local sandbox manager → Sandbox engine: runs isolated work
- Claude Code or Codex → Sandbox engine: runs commands
README.md - Sandbox engine → Activity collector: reports activity
README.md - Sandbox engine → File evidence scan: uses scanning
worker/sandbox/engine.py - Activity collector → Evidence storage: records facts
README.md - RayTrace proxy → Evidence storage: serves captured data
- Dashboard views → Dashboard API client: configures requests
dashboard/main.tsx - Activity search → Dashboard API client: fetches search
dashboard/app/search-view.tsx - Prompt context view → Dashboard API client: fetches context
dashboard/app/context-view.tsx - Dashboard API client → RayTrace proxy: requests same origin
- Developer → Dashboard views: inspects evidence
README.md - Developer → RayTrace cloud: uploads logs
README.md - Dashboard views → RayTrace cloud: views shared dashboard
README.md - Experiment analysis → RayTrace proxy: supports analysis
- Playground service → Claude Code or Codex: runs forks
- Developer → TypeScript SDK: integrates client