135ea21a61
Fixes the v0.3.4 fresh-box failures: silent CLI under bare-word PATH invocation (SEA argv detection), bootstrap dying on venv creation without an actionable hint (poisoned-partial-venv recovery + apt hint + doctor venv-capability probe + preflight), installer falsely 'verifying' a silent binary, and localhost-only server binding (network mode: 0.0.0.0 + wildcard CORS + hostname-derived API URL — remote browsing zero-config). 38 CLI tests, 3 web tests, 409 ai-service tests green; build/typecheck/lint clean. ---ci--- phase: hotfix milestone: v0.4 status: complete type: hotfix requirements: covered: [REQ-4-001, REQ-4-002, REQ-4-003, REQ-4-004, REQ-4-005] partial: [] ---/ci---
40 lines
1.6 KiB
Bash
40 lines
1.6 KiB
Bash
# Nextcraft AI Service — environment template (copy values, never commit real keys)
|
|
# Real keys live in .ciagent/.env.secrets (gitignored) and are exported by scripts/dev.sh
|
|
|
|
AI_PORT=8420
|
|
# Network mode (v0.3.5, D-038): dev server binds 0.0.0.0 so remote machines can
|
|
# reach the stack. Set to 127.0.0.1 to revert to loopback-only.
|
|
AI_HOST=0.0.0.0
|
|
# CORS + WS-origin policy: '*' (default) admits any origin — safe because
|
|
# credentials are never enabled. Restrict with a comma list, e.g.:
|
|
# AI_CORS_ORIGINS=http://nextcraft-1:3000
|
|
AI_CORS_ORIGINS=*
|
|
AI_PROVIDER=ollama-cloud
|
|
AI_MODEL=gemma4:31b
|
|
AI_OLLAMA_CLOUD_BASE_URL=https://ollama.com/v1
|
|
AI_OLLAMA_CLOUD_API_KEY=
|
|
AI_LOCAL_BASE_URL=http://localhost:11434/v1
|
|
AI_JSON_MODE=auto
|
|
|
|
# Sandbox fabric (v0.3)
|
|
AI_SANDBOX_DIR=sandboxes
|
|
AI_SANDBOX_MAX_CONCURRENT=5
|
|
AI_SANDBOX_TIMEOUT_S=900
|
|
AI_SANDBOX_MAX_WORKDIR_MB=512
|
|
|
|
# G-5 abuse control (NOT auth — KYC/identity deferred):
|
|
# comma-separated learner allowlist; unknown ids can't create sandboxes (403)
|
|
AI_LEARNER_ALLOWLIST=pilot-learner
|
|
# max ACTIVE sandboxes per learner → 429 when exceeded
|
|
AI_SANDBOX_MAX_PER_LEARNER=1
|
|
# global creates per rolling 60s window (in-memory) → 429 when exceeded
|
|
AI_SANDBOX_CREATES_PER_MIN=10
|
|
|
|
# Persistence (SQLite)
|
|
AI_DB_PATH=ai_service/data/nextcraft.db
|
|
# --- v0.3 Voice (REQ-3-006, D-030) ---
|
|
# 'mock' (default; no key needed — tests/dev) or 'browser' (client-native SR/TTS).
|
|
# Real server STT/TTS ('openai-audio' + AI_VOICE_BASE_URL/AI_VOICE_API_KEY)
|
|
# is deferred to v0.4 per GRILL CUT-1/G-7 — keys never in code or commits.
|
|
AI_VOICE_PROVIDER=mock
|