The Config interface in src/config.ts is the central runtime configuration object, with fields covering every subsystem: model harness selection, sandbox backends, memory policy, worker pool, rate and budget limits, security posture, deployment targets, and the Slack plugin.[1]
Config.harness selects the AI execution substrate and must be one of "mock", "pi", "opencode", "codex", or "claude".[1] configuredModelForHarness(config, harness) resolves the correct model ID for a given harness string, routing "codex" → config.codexModel, "claude" → config.claudeModel, "opencode" → config.opencodeModel, and everything else → config.modelId.[1] providerKeysPresent(config) returns a ModelProviderAvailability object indicating which API keys are configured (anthropic, openai, openrouter).[1] baseModelProviders(config) returns onlyProvider(config.modelProvider) when a modelProvider is set, or undefined otherwise — this is the fix for the "OpenRouter-only deployment gets Anthropic default" bug where MODEL_PROVIDER was ignored.[1]
Config.sandboxBackend selects the sandbox execution environment: "aws" (MicroVM), "local" (Docker), or "sprites" (Fly.io); a secondary backend is also optionally configurable via sandboxSecondaryBackend.[1] Config.snapshotStore and Config.transferStore each accept "local" or "s3", with S3 configured via s3Bucket, s3Region, and s3Prefix.[1] Config.secretsBackend is either "env" (secrets read from environment variables) or "aws" (secrets read from AWS Secrets Manager), paired with a secretsPrefix.[1]
The AwsSandboxEnv block in src/config.ts is populated from environment variables including AWS_SANDBOX_REGION, AWS_SANDBOX_IMAGE, AWS_SANDBOX_EXEC_ROLE_ARN, AWS_SANDBOX_INGRESS_CONNECTORS, and AWS_SANDBOX_EGRESS_CONNECTORS (comma-separated ARN lists).[1] The sandbox region falls back through AWS_SANDBOX_REGION → AWS_REGION → AWS_DEFAULT_REGION → "us-west-2" if none is set, and the image identifier defaults to "qm-microvm-sandbox" when AWS_SANDBOX_IMAGE is absent.[1]
Config.deployProvider selects the deployment target: "docker" or "aws".[1] Config.ecsTaskProtection and Config.ecsAgentUri govern ECS-specific behavior, enabling task protection (scale-in blocking) during active turns on AWS ECS deployments.[1]
Config.rateLimitPerWindow and Config.rateLimitWindowMs configure the per-principal turn rate limit; Config.budgetUsdPerWindow, Config.orgBudgetUsdPerWindow, and Config.budgetWindowMs configure per-user and per-org spend ceilings.[1]
Worker concurrency is governed by Config.workers (pool size), Config.leaseTtlMs (job lease duration), Config.heartbeatIntervalMs, Config.reaperIntervalMs, and Config.maxClaims (max jobs a worker claims at once).[1] Config.backgroundWorkEnabled is a feature flag controlling whether background jobs — crons, monitors, and webhooks — are processed.[1]
Config.memoryCapture, Config.memoryRecall, and Config.memoryStrategy configure the memory subsystem's capture mode, recall mode, and consolidation strategy independently; optional fields memoryConsolidateAfter and memoryCaptureMaxTurns add further control.[1] Config.memoryCaptureQuietMs is initialized from DEFAULT_CAPTURE_QUIET_MS (imported from src/memory/strategies/per-turn.ts), controlling the quiet-period debounce before memory capture fires.[1] The procedural memory provider interface, defined across provider.ts, relay.ts, and inject.ts, is vendor-neutral; vendor-specific implementation details are isolated to the concrete implementation layer and kept out of the shared interface. The src/memory/memorable/ module provides a concrete procedural memory provider implemented in capture.ts, inject.ts, provider.ts, and relay.ts; registration and configuration are managed by provider-factory.ts and provider-config.ts. .github/workflows/cicd.yml pins an exact memorable-cli version for end-to-end testing; the pin must be kept in sync when the CLI version drifts from the running environment. provider-router.ts routes memory operations by scope; strategy files consolidation.ts, per-turn.ts, and scratch-promote.ts, along with memory-service.ts, dispatch through it. Scope configuration is wired into the server via src/config.ts and src/wiring.ts. Per-scope provider selection allows different memory scopes (user, skill, organization, etc.) to route to different backends; provider-router.ts and provider-config.ts manage the dispatch logic. src/memory/memorable/mcp-memory-provider.ts implements a Model Context Protocol (MCP) backend for procedural memory, dispatched by provider-router.ts based on the active scope. Model Context Protocol (MCP) is a vendor-neutral protocol for exposing context and tools to AI models; used here as a pluggable backend transport for the procedural memory provider.
Config.securityScreenBackend is either "model" (local model-based screening) or "proxy" (external proxy); the proxy path is configured via securityScreenProxy, which accepts provider, endpoint, token, and shadow fields.[1]
Config.pluginSkillDirs is a list of filesystem directories scanned for plugin skills, complementing the seed skills found in Config.skillsSeedDir.[1] The plugins/chassis/src/branding.ts module is the canonical source for bot identity values (name, avatar, branding); all plugins and backend extensions must pull identity through this module rather than hardcoding values, as bypassing it causes fallback to a default identity that breaks white-label deployments. Bot identity (name, avatar, branding) is configurable independently of the QM deployment via the Config interface; the branding surface is consumed by the auth, admin, and web-ui plugins, and is scaffolded across CLI config (cli/src/config.ts, cli/src/services.ts), all three deployment backends (AWS, Docker, Fly), and Slack manifest generation. The acknowledgement emoji posted to Slack threads is configurable per-org; org admins set it via an emoji picker in the admin panel (plugins/admin/public/index.html, plugins/admin/src/index.ts) rather than through static config. src/slack/ack-emoji.ts and src/slack/config.ts establish the ack-emoji as a first-class config value, resolved through src/resolution/config-store.ts and src/wiring.ts; src/slack/turn-handler.ts reads the resolved value at turn time. Admin API routes in src/api/routes/admin/slack-installation.ts and src/api/routes/admin.ts expose read and write endpoints for the org-level ack-emoji setting.
Sources