# ─── Database ──────────────────────────────────────────────────────────────── DATABASE_URL="postgresql://outpost:outpost@localhost:5432/outpost?schema=public" DB_CONNECTION_LIMIT=5 # Max DB connections per service # ─── Auth (NextAuth.js) ───────────────────────────────────────────────────── NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="change-me-to-a-random-string" # Provider: "credentials" (default), "github", or "oidc" AUTH_PROVIDER="credentials" NEXT_PUBLIC_AUTH_PROVIDER="credentials" # GitHub provider (only needed if AUTH_PROVIDER=github) # GITHUB_CLIENT_ID="" # GITHUB_CLIENT_SECRET="" # GITHUB_ALLOWED_ORG="" # ALLOWED_EMAIL_DOMAIN="" # OIDC provider (only needed if AUTH_PROVIDER=oidc) # OIDC_ISSUER="" # OIDC_CLIENT_ID="" # OIDC_CLIENT_SECRET="" # ─── AI Pipeline ───────────────────────────────────────────────────────────── ANTHROPIC_API_KEY="" # Optional: explicit anthropic rollback / direct legacy generator OPENAI_API_KEY="" # Required default: investigation, verification, classification, sentiment PATHFINDER_URL="http://localhost:3100" PATHFINDER_MCP_URL= # Pathfinder knowledge base URL FALLBACK_DOCS_URL= # Fallback documentation URL AI_RESPONSE_PROVIDER=openai # openai (default) or anthropic (rollback) AI_RESPONSE_MODEL= # Defaults to gpt-5.6-luna; claude-sonnet-4-6 for anthropic AI_LEGACY_RESPONSE_MODEL= # Direct legacy generator default: claude-sonnet-4-6 AI_DRAFT_LINT_MODE=report # report (default) or enforce after false-positive review OPENAI_AGENTS_DISABLE_TRACING=0 # Set 1 to disable; sensitive trace payloads are always off AI_CONFIDENCE_MODEL= # Default gpt-5.6-luna (Claude Haiku for anthropic) AI_CLASSIFIER_MODEL= # Default gpt-5.6-luna (Claude Haiku for anthropic) AI_SENTIMENT_MODEL= # Default gpt-5.6-luna (Claude Haiku for anthropic) # ─── Shadow Mode ───────────────────────────────────────────────────────────── # Set to 'true' to run the full AI pipeline but LOG responses instead of posting # them to Discord/GitHub/Slack/Teams. TWO services read this flag and each gates a # different point in the flow: # - outpost-discord-bot gates at INGEST (thread-create.ts, message-create.ts # divert to the silent shadow path) # - outpost-worker gates at POST-BACK (the AI_RESPONSE handler checks it right # before adapter.postResponse, and it also gates ONBOARDING_DIGEST) # For Discord either gate alone stops a post. The worker's gate is the one that # covers EVERY platform (GitHub, Slack, Teams) plus the digest job, so staging # must have it set on outpost-worker — not only on a bot. # Staging runs SHADOW_MODE=true; production runs false. SHADOW_MODE=false # ─── Discord Bot ───────────────────────────────────────────────────────────── DISCORD_TOKEN="" # Bot token used by discord-mcp DISCORD_BOT_TOKEN="" # Bot token used by the discord-bot app DISCORD_CLIENT_ID="" DISCORD_CLIENT_SECRET="" # OAuth client secret (dashboard Discord login) DISCORD_MCP_TOKEN="" # Shared secret guarding the discord-mcp server MONITORED_CHANNEL_IDS="" DISCORD_DIGEST_CHANNEL_ID= # Channel for onboarding digest posts # Guild (server) IDs per community — replaces the old single GUILD_ID DISCORD_GUILD_COPILOTKIT= # CopilotKit Discord server ID DISCORD_GUILD_AGUI= # AG-UI Discord server ID # Monitored channel IDs per community DISCORD_CHANNEL_CK_GENERAL= # CopilotKit #general DISCORD_CHANNEL_CK_SUPPORT= # CopilotKit support channel DISCORD_CHANNEL_AGUI_SUPPORT= # AG-UI support channel DISCORD_CHANNEL_AGUI_BUILDING= # AG-UI building channel # ─── Slack Bot ─────────────────────────────────────────────────────────────── SLACK_BOT_TOKEN=xoxb-... SLACK_APP_TOKEN=xapp-... SLACK_SIGNING_SECRET= SLACK_SOCKET_MODE=true # ─── Slack Ticket Mirror ───────────────────────────────────────────────────── # Mirrors tickets into one Slack channel: the ticket opens a thread, community # follow-ups and the AI reply thread under it. Read-only (replying in Slack does # NOT post back to the source). # # Which tickets: the allowlist in isMirrorableSource() # (packages/outpost/shared/src/platforms/slack-mirror-config.ts) — today Discord, # GitHub issues, and GitHub discussions. Slack-sourced tickets are excluded # (they already live in Slack); so are Teams/Email/Web/Manual/Linear. # # Mode: off (default, nothing is enqueued and the handler no-ops) # | shadow (logs what it would post; posts nothing; needs NO token) # | live (posts; requires SLACK_BOT_TOKEN, or the mirror stays disabled # and logs why once) # Any mode does nothing at all while SLACK_MIRROR_CHANNEL_ID is unset. # # Deliberately INDEPENDENT of SHADOW_MODE — that flag protects community # surfaces (Discord/GitHub) where real reporters watch; this posts to an # internal team channel, so staging posting here is intended. # # WHICH SERVICES need these vars: the handler runs in outpost-worker, but the # PRODUCERS gate on the same config — readSlackMirrorConfig() is called from # InboundHandler, which runs inside outpost-discord-bot and outpost-github-app. # Set SLACK_MIRROR_MODE + SLACK_MIRROR_CHANNEL_ID on the worker AND on every # service that creates tickets, or nothing is ever enqueued and the mirror is # silently dead. # # SCOPE IN v1: ticket-opens from Discord and GitHub, AI replies on both, and # community follow-ups from DISCORD ONLY. A follow-up comment on a GitHub issue # or discussion never reaches the mirror, and nothing logs that it did not — so # a Slack thread that stops after the AI reply does not mean the reporter went # quiet. See docs/deployment.md. SLACK_MIRROR_MODE=off # Channel ID, NOT a channel name. Slack: open channel -> click its name -> # bottom of the details pane -> Channel ID. Looks like C09AB2CD3EF. SLACK_MIRROR_CHANNEL_ID= # NOTE: SLACK_BOT_TOKEN above needs chat:write and must be set on the WORKER # service (outpost-worker) — the mirror handler posts from there, not from the # Slack bot. Invite the bot to the channel or posts fail not_in_channel (the # handler reports that as permanent and does not retry it). # Keep this channel OUT of MONITORED_CHANNEL_IDS. The Slack bot drops events # carrying a bot_id (apps/slack-bot/src/events/message.ts), so its own mirror # posts would not become tickets today — but monitoring the mirror channel # would duplicate every ticket's context into the bot's inbound path and makes # the loop one filter change away. Keep the two channel sets disjoint. # ─── Teams Bot ─────────────────────────────────────────────────────────────── TEAMS_APP_ID= TEAMS_APP_PASSWORD= TEAMS_TENANT_ID= # optional, for single-tenant apps # ─── GitHub App ────────────────────────────────────────────────────────────── GITHUB_APP_ID="" GITHUB_PRIVATE_KEY="" GITHUB_INSTALLATION_ID="" GITHUB_WEBHOOK_SECRET="" GITHUB_TEAM_LOGINS="" # Comma-separated "owner/repo" list the bot is allowed to respond on. # Defaults to CopilotKit/CopilotKit so it never answers issues on other repos # it's installed on (e.g. CopilotKit/outpost). GITHUB_ALLOWED_REPOS="CopilotKit/CopilotKit" # ─── Linear Sync ───────────────────────────────────────────────────────────── LINEAR_API_KEY= LINEAR_WEBHOOK_SECRET= LINEAR_TEAM_ID= # ─── HubSpot CRM ───────────────────────────────────────────────────────────── HUBSPOT_API_KEY= # ─── Email (Postmark - managed) ────────────────────────────────────────────── # POSTMARK_SERVER_TOKEN="" # Postmark server API token # POSTMARK_WEBHOOK_TOKEN="" # Webhook auth token (required in production) # ─── Email (SMTP - self-hosted alternative) ────────────────────────────────── # SMTP_HOST="" # SMTP_PORT=587 # SMTP_USER="" # SMTP_PASS="" # ─── Monitoring ────────────────────────────────────────────────────────────── SENTRY_DSN="" NEXT_PUBLIC_SENTRY_DSN="" LOG_LEVEL="info" # ─── Worker ────────────────────────────────────────────────────────────────── HEALTH_PORT=3005 # Health check port — read by FIVE services (worker, # discord-bot, slack-bot, teams-bot, linear-sync), so one # value here moves all of them onto the same port; it # cannot separate them. Deployed images pin their own # (discord 3001, slack 3002, teams 3003, worker 3005). # Running several locally needs a per-process override. # OUTPOST_ALLOW_SCHEMA_DRIFT=1 # Incident release valve for apps/worker/start.sh. # The worker refuses to boot when the live database does # not match schema.prisma, or when that check cannot run # at all. Setting this (1/true/yes/on) starts it anyway, # with warnings. Use it for transient skew while a sibling # service is mid-rollout, or to get the worker up during # an incident; unset it once the schema is repaired. # TRACKER_SYNC may write wrong statuses to Linear while # this is set. # OUTPOST_STARTUP_STEP_TIMEOUT=180 # Seconds the worker's schema-drift check may run # before it is abandoned (apps/worker/start.sh). Bounds # only the read-only check; `migrate deploy` is left # unbounded on purpose, since killing it mid-migration # creates the P3009 failed-migration state the guard # exists to report. Keep it below the platform's # healthcheck timeout, or a slow check is killed as an # unexplained deploy failure instead of logging a reason. # ─── Railway ───────────────────────────────────────────────────────────────── # Railway auto-deploys from GitHub; no deploy hook needed. # RAILWAY_TOKEN is only needed for CLI-based deploys (e.g. `railway up`). # RAILWAY_TOKEN="" # # Production runtime vars are managed in the Railway dashboard (per-service), # not here. They surface locally as RAILWAY_PROD_* when you run # `railway variables` / pull. Do NOT commit real RAILWAY_PROD_* values.