Services

This document maps the main service modules to the responsibilities they own.

Core Service Layout

ModuleResponsibility
services/database.tsPostgreSQL access
services/docker.tsDocker orchestration
services/installation.tsuser installation lifecycle
services/sharedTools.tsshared tool runtime lifecycle + OAuth state
services/sandbox.tssandbox lifecycle
services/toolRegistry.tsregistry-backed tool definitions
services/toolExecution.tsremote tool execution against managed runtimes
services/storage.tsMinIO-backed file storage
services/infraSsh.tsaudited infra SSH control plane
services/webhookEmitter.tsfire-and-forget push notifications to registered clients

Runtime Flow

Shared Tools vs Registry

One important nuance:

  • toolRegistry is the long-term source of truth
  • sharedTools.ts still carries compatibility behavior for startup, OAuth, and lifecycle
  • config/sharedTools.ts is deprecated fallback configuration and should be treated that way

That is why the docs now describe shared tools as a live platform concept, while still acknowledging the remaining compatibility layer in code.