How theprimeagen/oligarchy works
Oligarchy explores QEMU-backed agent testing: tests are driven against managed QEMU sessions, with automation, fleet services, persistence, and result views around that work. The sampled entry points establish server routes, runtime services, and selected startup tasks; the README and tree identify additional product surfaces, but do not document their internal wiring. Accordingly, the graph keeps those capabilities visible while omitting uncertain call paths.
Main entry points: src/main.ts Automation server · schema.ts PostgreSQL state · src/main.ts QEMU server · src/main.ts QEMU proxy
Components 21
Control plane
- Dashboard
apps/dashboard/src/dashboard.tsx - QEMU proxy
apps/qemu-reverse-proxy/src/main.ts - Proxy handlers
apps/qemu-reverse-proxy/src/handlers.ts - Proxy router
apps/qemu-reverse-proxy/src/router.ts - Automation server
apps/automation-server/src/main.ts - Automation handlers
apps/automation-server/src/handlers.ts - Job worker
apps/automation-server/src/worker.ts - Backlog watcher
apps/automation-server/src/backlog.ts
Execution fleet
- QEMU server
apps/qemu-server/src/main.ts - QEMU handlers
apps/qemu-server/src/handlers.ts - QEMU runtime
apps/qemu-server/src/qemu/qemu.ts - Automation client
apps/automation-client/src/main.ts - Client sessions
apps/automation-client/src/sessions.ts
Test workflow
- Test driver
src/driver/main.ts - Driver loop
src/driver/loop.ts - Session CLI
src/session/main.ts - Terminal viewer
apps/viz/src/main.ts
State and integrations
- PostgreSQL state
packages/db/src/schema.ts - Linear
- QEMU host
Other components
- Operator
Connections 23
- Operator → Dashboard: views results
- Operator → Test driver: runs tests
- Operator → Session CLI: operates session
- Operator → Terminal viewer: views session
- Dashboard → PostgreSQL state: queries
- QEMU proxy → Proxy handlers: serves routes
- Proxy handlers → Proxy router: delegates
- QEMU proxy → PostgreSQL state: provides stores
- QEMU proxy → Linear: connects
- Automation server → Automation handlers: serves routes
- Automation server → Job worker: starts dispatch
- Automation server → Backlog watcher: starts watcher
- Automation server → PostgreSQL state: provides stores
- Automation server → Linear: connects
- QEMU server → QEMU handlers: serves routes
- QEMU server → QEMU runtime: provides service
- QEMU server → QEMU host: uses host
- QEMU server → PostgreSQL state: provides stores
- Automation client → Client sessions: provides sessions
- Automation client → QEMU proxy: connects proxy
- Automation client → PostgreSQL state: provides stores
- Test driver → Driver loop: runs loop
- Test driver → PostgreSQL state: provides test store