TypeScript316K LinesMIT

Workbench Architecture

316K-line Electron app. Main process services + React renderer. Connects to Runtime via CLI and SSH.

Electron Main Process (Node.js)
Renderer (React 18 + Tailwind v4)
Runtime Connections
AgentSession
194KB · Msg queue
MinionService
169KB · Lifecycle
StreamManager
114KB · LLM stream
LatticeService
CLI wrapper
Captain
Autonomous meta-agent
AIService
Multi-model
LocalRuntime
Git worktree
SSHRuntime
Remote exec
LatticeSSH
Lattice minions
DockerRuntime
Container
oRPC Server
Express + WS
HistoryService
Chat persist
170+ MCP Tools
File/Git/Browser
Compaction
Context window mgmt
RuntimeDashboard
Home + grid
ConnectionHub
Status
Chat UI
Streaming MD
Kanban
Pipeline stages
Terminal
xterm.js PTY
Cost Tracking
Per-minion
Captain Canvas
Infinite canvas
Browser Tools
46 commands
LatticeRuntimeCtx
React context · 30s poll
oRPC Client
Type-safe · Zod schemas · 87KB
CLI Spawning
lattice list/start/stop
SSH Proxy
config-ssh --yes
gRPC Stream
Next: lifecycle+audit
AI Providers
Claude/GPT/Gemini