CoolFace
Apppublic

checken9x/SCP-V3

sourceHugging Faceupdated 1mo agoView on Hugging Face
1likes
.env.example72 linesDownload Raw Back to root
1# SCP system environment configuration template.2#3# Copy to .env and edit values for your deployment:4#   cp .env.example .env5#6# This file is the DOCUMENTED contract for env vars that the SCP system7# reads. The runtime contract is the real .env. They must stay in sync.8#9# Phase 7-A fixes (Root Cause 7 — Hardcoded paths/ports/numbers không validate):10#   - Fix 4-d-015: SCP_INTERNAL_URL + LOOP_SCHEDULER_URL documented here.11#     Dashboard API routes (dashboard/src/app/api/scp/*) probe these URLs to12#     build the composite health status. If absent, they silently fall back13#     to localhost defaults — works locally but FAILS SILENTLY in container /14#     split-deploy scenarios. Set explicitly for any non-default deployment.15#   - Fix 4-d-016: 6 OPENROUTER_MODEL_* keys documented here. Phase 3-B fix16#     4-d-005 wired these env vars into the llm-bridge's TASK_MODEL_MAP — but17#     the .env.example template never listed them. New deployers silently lost18#     per-task model routing (all tasks fell back to a single OPENROUTER_MODEL).19 20# ─────────────────────────────────────────────────────────────────────────────21# Database (used by dashboard/src/lib/db.ts — Prisma)22# ─────────────────────────────────────────────────────────────────────────────23# SQLite path (file: URL). Override for non-default DB location.24DATABASE_URL=file:/home/z/my-project/db/custom.db25 26# ─────────────────────────────────────────────────────────────────────────────27# Internal service URLs (Fix 4-d-015)28# ─────────────────────────────────────────────────────────────────────────────29# Dashboard API routes read these to build the composite health status30# (dashboard/src/app/api/scp/health/route.ts). All three services are probed31# in parallel — if any is unreachable, the dashboard shows "degraded" or32# "offline". Without these env vars the dashboard silently uses localhost33# defaults; operators only notice when the deploy is non-local.34#35# Consumers:36#   - SCP_INTERNAL_URL:        health/route.ts, status/route.ts, scanners/route.ts, autofix/route.ts37#   - LOOP_SCHEDULER_URL:     health/route.ts, loop/route.ts, loop/trigger/route.ts38#   - LLM_BRIDGE_URL:         health/route.ts (third sibling URL — same pattern)39SCP_INTERNAL_URL=http://127.0.0.1:800040LOOP_SCHEDULER_URL=http://127.0.0.1:303041LLM_BRIDGE_URL=http://127.0.0.1:1143442 43# SCP backend root path (used by status/route.ts to compute live v4 LOC).44# Override when dashboard is deployed separately from the backend tree.45SCP_ROOT=/home/z/my-project/scp-system46 47# ─────────────────────────────────────────────────────────────────────────────48# Per-task model routing (Fix 4-d-016)49# ─────────────────────────────────────────────────────────────────────────────50# Phase 3-B fix 4-d-005 wired these env vars into the llm-bridge's51# TASK_MODEL_MAP (mini-services/llm-bridge/index.ts:131-143). SCP sends52# task-specific model names ("autofix", "chat", "judge", "learning",53# "fast_learning", "why" — and their ":8b" / ":7b" aliases) and the bridge54# maps them to these OpenRouter model IDs.55#56# If a key is absent, the bridge falls back to OPENROUTER_MODEL (single57# model for everything) — silently losing per-task routing. All 6 should be58# set for any deploy that uses OpenRouter (vs local Ollama).59#60# Default model IDs below are conservative free-tier picks; tune for your61# OpenRouter subscription / quality requirements.62OPENROUTER_MODEL_AUTOFIX=deepseek/deepseek-r1:8b63OPENROUTER_MODEL_CHAT=meta-llama/llama-3.2-3b-instruct64OPENROUTER_MODEL_JUDGE=qwen/qwen2.5-7b-instruct65OPENROUTER_MODEL_LEARNING=qwen/qwen2.5-7b-instruct66OPENROUTER_MODEL_FAST_LEARNING=meta-llama/llama-3.2-3b-instruct67OPENROUTER_MODEL_WHY=qwen/qwen2.5-7b-instruct68 69# Fallback model (used when none of the per-task keys match, or for general70# requests that don't carry a task-specific model name).71# OPENROUTER_MODEL=openrouter/free72