feat(config): wire launcher scripts and compose to config.json (#2)
- common.sh: load_config() exports MOSAIC_DATA_ROOT/PROVIDER/MODEL; fails closed - compose.yaml: dataRoot mount and provider/model are required env (:? errors) - build/hello/verify load config before any mutation; no silent bootstrap - reset.sh: target resolved from configured dataRoot; all safety checks kept Verified: compose fails without launcher env; verify/reset fail on missing config; config-driven hello+verify pass; symlink refusal with sandboxed config (canary survived); config checksum unchanged across reset+rerun. Closes #2
This commit is contained in:
+6
-5
@@ -6,17 +6,18 @@ services:
|
||||
image: mosaic-poc-agent:0.84.4
|
||||
user: "1000:1000"
|
||||
environment:
|
||||
# Non-secret settings (see .env.example)
|
||||
PI_PROVIDER: ${PI_PROVIDER:-zai}
|
||||
PI_MODEL: ${PI_MODEL:-glm-5.3-flash}
|
||||
# Resolved from config.json by scripts/common.sh (load_config).
|
||||
# Required: compose fails fast when the launcher did not supply them.
|
||||
PI_PROVIDER: ${MOSAIC_PROVIDER:?MOSAIC_PROVIDER must be set by scripts/load_config (run via scripts/*.sh)}
|
||||
PI_MODEL: ${MOSAIC_MODEL:?MOSAIC_MODEL must be set by scripts/load_config (run via scripts/*.sh)}
|
||||
# Documented container auth alternative: provider API key via
|
||||
# runtime environment variable. Empty by default; when empty Pi
|
||||
# falls back to the read-only mounted auth.json credential file.
|
||||
ZAI_API_KEY: ${ZAI_API_KEY:-}
|
||||
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
|
||||
volumes:
|
||||
# Generated runtime state (host dir per brief)
|
||||
- /home/jwoltje/.mosaic-dev:/var/lib/mosaic
|
||||
# Configured runtime state root (from config.json dataRoot).
|
||||
- ${MOSAIC_DATA_ROOT:?MOSAIC_DATA_ROOT must be set by scripts/load_config (run via scripts/*.sh)}:/var/lib/mosaic
|
||||
# Runtime credential only: pi auth file mounted READ-ONLY.
|
||||
# Never copied into the image.
|
||||
- ${PI_AUTH_FILE:-/home/jwoltje/.pi/agent/auth.json}:/home/node/.pi/agent/auth.json:ro
|
||||
|
||||
Reference in New Issue
Block a user