Service Composition
Diminuendo uses Effect TS Layers for dependency injection. Themain.ts composes 22 services:
Per-Tenant Data Isolation
Every tenant gets its own SQLite database. Every session gets its own database too:- Zero write contention between tenants
- Trivial deletion (
rm -rf data/tenants/{id}) - Copy-based backup via Litestream
- Horizontal scaling by moving directories
Upstream Connections
PodiumClient
{ type: "update", content: {...}, event_type: "tool_call_start" }), and Diminuendo sends native format messages back (e.g. { type: "process_message", content: { text: "...", messages: [...] } }). The PodiumNativeMapper translates 40+ native event types into ACP notifications, which are then persisted to SQLite and broadcast to clients via pub/sub.
EnsembleClient
GitHubClient
Scalability Design
| Resource | Budget per Instance |
|---|---|
| WebSocket connections | ~10,000 |
| Active sessions | ~5,000 |
| SQLite databases open | ~500 (LRU eviction) |
| Memory | ~2GB |