forked from EduCraft/curriculum-project-hub
c4f052efa2
Introduce signed cookie sessions, Feishu web OAuth, requireOrgRole guards, and the first org admin APIs (summary + project settings).
52 lines
1.9 KiB
Bash
52 lines
1.9 KiB
Bash
# Hub runtime configuration. Copy to .env and fill in.
|
|
|
|
# PostgreSQL connection string.
|
|
DATABASE_URL="postgresql://paradigm:paradigm@127.0.0.1:5432/paradigm"
|
|
|
|
# Claude Code SDK auth via OpenRouter's Anthropic Skin.
|
|
# ANTHROPIC_AUTH_TOKEN = your OpenRouter API key (https://openrouter.ai/keys)
|
|
# ANTHROPIC_API_KEY must be explicitly empty to avoid auth conflicts.
|
|
ANTHROPIC_BASE_URL="https://openrouter.ai/api"
|
|
ANTHROPIC_AUTH_TOKEN=""
|
|
ANTHROPIC_API_KEY=""
|
|
|
|
# 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
|
|
|
|
# System-managed root for project workspaces created from org admin / Feishu onboarding.
|
|
HUB_PROJECT_WORKSPACE_ROOT="./data/project-workspaces"
|
|
|
|
# Feishu (lark) bot credentials.
|
|
FEISHU_APP_ID=""
|
|
FEISHU_APP_SECRET=""
|
|
FEISHU_BOT_OPEN_ID=""
|
|
|
|
# Path to the `cph` binary (ADR-0016). Defaults to `cph` on PATH.
|
|
# CPH_BIN="/usr/local/bin/cph"
|
|
|
|
# Hub server port. Defaults to 8788.
|
|
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="http://127.0.0.1:8788"
|
|
|
|
# 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"
|