src/wiring.ts is the central dependency-wiring module: it imports and instantiates every major service — identity, ACL, skills, runs, sessions, sandboxes, connectors, model gateway, scheduler, and more — and returns a built object consumed by src/index.ts.[1]
src/wiring.ts supports two persistence backends for most services — memory and Postgres — selecting between pairs such as createMemorySessionStore vs createPostgresSessionStore and createMemoryRunStore vs createPostgresRunStore based on configuration.[1] src/wiring.ts wires a separate CronFireStore (src/cron/cron-fire-store.ts) into the service graph for persisting cron fire history, distinct from the primary CronStore (src/cron/cron-store.ts). Scheduler scans in src/api/control-service.ts and cron routes in src/api/routes/crons.ts query only the CronStore for cron state; fire-history reads are routed through CronFireStore, preventing history accumulation from affecting scheduler performance and correctness.
Two deploy providers are wired in src/wiring.ts — createDockerDeployProvider and createAwsDeployProvider — assembled alongside createDeployService and createDeployStore.[1] src/wiring.ts supports two secret sources — createEnvSecretSource and createAwsSecretsManagerSource — composed via createLayeredSecretSource, so secrets from environment variables can be overridden or augmented by AWS Secrets Manager.[1]
src/wiring.ts wires five named harnesses — createMockHarness, createOpenCodeHarness, createCodexHarness, createClaudeHarness, and createPiHarness — all routed through createHarnessRouter; harness-specific architecture and invariants are covered on the Harness framework and Harness router pages.[1] A harness is an adapter that connects QM's execution engine to a specific AI model or runtime (e.g., Claude, Codex); the harness router selects the correct adapter per request, allowing different models to be used without changing core logic.
The plugins/ directory contains the optional surface plugins: Slack, web UI, admin panel, and public portal.[2]
Sources