Event Bus
Stackie uses an internal event bus to broadcast sandbox and installation activity in real time. Events are consumed by the dashboard, the system tray, and AI agent subscriptions.
Lifecycle Events
Lifecycle events fire when sandboxes change state:
| Action | Description |
|---|---|
create | Sandbox created (before start) |
start | Sandbox process started |
stop | Sandbox stopped gracefully |
die | Sandbox process exited unexpectedly |
kill | Sandbox force-killed |
destroy | Sandbox fully removed |
rename | Sandbox renamed |
restart | Sandbox restarted |
pause | Sandbox paused |
unpause | Sandbox unpaused |
Install Events
Install events fire during stackie up:
- Download progress (bytes received, total bytes)
- Extraction progress
- Compilation progress (for source-built packages)
- Installation complete
Where Events Appear
- Dashboard — the SSE stream at
/api/eventsdelivers events to the browser UI - System tray — the tray icon updates colour on sandbox start/stop
- AI agents — MCP resource subscriptions notify agents of state changes