# Hub runtime configuration. Copy to .env and fill in. # Production preflight requires the explicit production runtime mode. NODE_ENV="production" # PostgreSQL connection string. DATABASE_URL="postgresql://paradigm:paradigm@127.0.0.1:5432/paradigm" # Provider URL and credentials are write-only Organization Provider Connection # data in PostgreSQL, encrypted by ADR-0024. Process-global ANTHROPIC_* provider # settings are rejected in production and must not be added here. # Model override (optional). Defaults to anthropic/claude-sonnet-5. # Use an OpenRouter model slug, for example: # ANTHROPIC_DEFAULT_SONNET_MODEL="~anthropic/claude-sonnet-latest" # To use GLM: # ANTHROPIC_DEFAULT_SONNET_MODEL="z-ai/glm-4.7" # ANTHROPIC_DEFAULT_OPUS_MODEL="z-ai/glm-4.7" # ANTHROPIC_DEFAULT_HAIKU_MODEL="z-ai/glm-4.6" # Agent run policy (optional). Defaults to 25. # HUB_AGENT_MAX_TURNS=25 # Persistent system-managed root for project workspaces. Production must use an # absolute path outside the deployment/release tree; install_service.sh defaults # to this path and rejects any overlap before installing the unit. HUB_PROJECT_WORKSPACE_ROOT="/var/lib/cph-hub/workspaces" # Feishu (lark) bot credentials. FEISHU_APP_ID="" FEISHU_APP_SECRET="" FEISHU_BOT_OPEN_ID="" # Absolute path to the `cph` binary (ADR-0016). Production preflight requires # the file to be executable and `cph --version` to succeed. CPH_BIN="/usr/local/bin/cph" # Hub bind address and port. Production defaults to loopback for a local TLS # reverse proxy; both values are validated and honored by the HTTP server. HOST="127.0.0.1" PORT=8788 # --- Org admin web (ADR-0021) --------------------------------------------- # Public base URL of this Hub (no trailing slash). Used for Feishu OAuth # redirect_uri = ${HUB_PUBLIC_BASE_URL}/auth/feishu/callback # Configure the same callback URL in the Feishu developer console under # Security Settings → Redirect URLs. HUB_PUBLIC_BASE_URL="https://hub.example.com" # HMAC secret for signed session + OAuth state cookies. Generate with: # openssl rand -base64 32 HUB_SESSION_SECRET="" # Optional OAuth scope (space-separated). Default: contact:user.base:readonly # Apply matching scopes in the Feishu developer console. # HUB_OAUTH_SCOPE="contact:user.base:readonly" # Local development/tests only. Production must not set this: systemd injects # the fixed cph-secret-keyring credential through CREDENTIALS_DIRECTORY. # HUB_SECRET_KEYRING_FILE="/absolute/path/to/dev-keyring.json"