Diminuendo is the ACP WebSocket gateway that connects clients to the iGentAI backend. In musical notation, diminuendo means a gradual decrease in volume — this gateway reduces a distributed system into a single, coherent protocol that any client can consume. Clients speak ACP JSON-RPC 2.0 to Diminuendo, while Diminuendo translates to and from Podium’s native StreamUpdate protocol internally.

What It Does

  • Authenticates users via Auth0 JWT with role-based access control (5 roles, 12 permissions)
  • Translates ACP JSON-RPC 2.0 messages from clients into Podium’s native protocol and translates native StreamUpdate events back to ACP notifications
  • Manages sessions with a 7-state machine and persistent SQLite storage
  • Bridges chat platforms (Slack, Discord, Telegram, Teams, Google Chat, GitHub, Linear)
  • Automates workflows via an automation engine with blueprints and verifiers
  • Stores files, skills, and audit logs per-tenant

Performance

OperationLatencyThroughput
Health endpoint0.6ms10,390 RPS
WebSocket connect + auth0.4ms-
Session creation0.6ms (±0.1ms)-
Event mapping~100,000/sec-
Pub/sub broadcast~50,000/sec-
SQLite writer~5,000/secBatched

Architecture at a Glance

AspectChoice
RuntimeBun (native WebSocket, native SQLite, under 200ms startup)
Business logicEffect TS (typed errors, Layer DI, structured concurrency)
Client protocolACP JSON-RPC 2.0 (13 client methods, 9 server methods, ~40 notifications)
Upstream protocolPodium native StreamUpdate (translated via PodiumNativeMapper, 40+ event types)
TransportWebSocket + HTTP on a single port via Bun.serve()
DatabasePer-tenant SQLite with WAL mode
AuthAuth0 JWT with LRU cache + dev-mode bypass
ObservabilityOpenTelemetry tracing, Prometheus metrics, health probes

Repository Structure

diminuendo/
├── src/                  # Gateway (93 files, ~24,500 lines)
│   ├── main.ts           # 22-service Layer composition
│   ├── auth/             # Auth0 JWT, RBAC, OAuth
│   ├── transport/        # HTTP + WebSocket, middleware
│   ├── protocol/         # ACP JSON-RPC 2.0 schema, dispatch
│   ├── session/          # State machine, MessageRouter
│   ├── automation/       # Engine, blueprints, verifiers
│   ├── domain/           # 18 domain services
│   ├── upstream/         # PodiumClient, EnsembleClient, GitHubClient
│   ├── integrations/     # ChatBridge (7 adapters)
│   ├── security/         # CSRF, SSRF guard, rate limiting
│   ├── resilience/       # CircuitBreaker, RetryPolicy
│   ├── observability/    # OTel, Prometheus, health
│   ├── config/           # AppConfig (30+ parameters)
│   └── db/               # 20 migrations, 18 tables
├── sdk/                  # Client SDKs (TypeScript, Rust, Swift, Go, Python)
├── clients/              # Frontend monorepo (~61,500 lines)
│   ├── shared/           # 70+ React components, stores
│   ├── web/              # Vite + React SPA
│   ├── desktop/          # Tauri v2
│   ├── gpui/             # GPU-accelerated native (Zed GPUI)
│   ├── opencode/         # Full-featured agent client
│   ├── tui/              # Terminal UI
│   └── cli/              # Command-line interface
└── agents/               # Agent definitions (deployed to Podium)