diff --git a/.env.example b/.env.example index 8615344..37ca636 100644 --- a/.env.example +++ b/.env.example @@ -381,6 +381,17 @@ ELEMENT_IMAGE_TAG=latest # Health endpoints (/health/*) remain unauthenticated ORCHESTRATOR_API_KEY=REPLACE_WITH_RANDOM_API_KEY_MINIMUM_32_CHARS +# Runtime safety defaults (recommended for low-memory hosts) +MAX_CONCURRENT_AGENTS=2 +SESSION_CLEANUP_DELAY_MS=30000 +ORCHESTRATOR_QUEUE_NAME=orchestrator-tasks +ORCHESTRATOR_QUEUE_CONCURRENCY=1 +ORCHESTRATOR_QUEUE_MAX_RETRIES=3 +ORCHESTRATOR_QUEUE_BASE_DELAY_MS=1000 +ORCHESTRATOR_QUEUE_MAX_DELAY_MS=60000 +SANDBOX_DEFAULT_MEMORY_MB=256 +SANDBOX_DEFAULT_CPU_LIMIT=1.0 + # ====================== # AI Provider Configuration # ====================== diff --git a/.gitignore b/.gitignore index 1ce13dc..7e684f0 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,13 @@ yarn-error.log* # Orchestrator reports (generated by QA automation, cleaned up after processing) docs/reports/qa-automation/ + +# Repo-local orchestrator runtime artifacts +.mosaic/orchestrator/orchestrator.pid +.mosaic/orchestrator/state.json +.mosaic/orchestrator/tasks.json +.mosaic/orchestrator/matrix_state.json +.mosaic/orchestrator/logs/*.log +.mosaic/orchestrator/results/* +!.mosaic/orchestrator/logs/.gitkeep +!.mosaic/orchestrator/results/.gitkeep diff --git a/.mosaic/README.md b/.mosaic/README.md index 606f88a..3e13da9 100644 --- a/.mosaic/README.md +++ b/.mosaic/README.md @@ -4,12 +4,12 @@ This repository is attached to the machine-wide Mosaic framework. ## Load Order for Agents -1. `~/.mosaic/STANDARDS.md` +1. `~/.config/mosaic/STANDARDS.md` 2. `AGENTS.md` (this repository) 3. `.mosaic/repo-hooks.sh` (repo-specific automation hooks) ## Purpose -- Keep universal standards in `~/.mosaic` +- Keep universal standards in `~/.config/mosaic` - Keep repo-specific behavior in this repo - Avoid copying large runtime configs into each project diff --git a/.mosaic/orchestrator/config.json b/.mosaic/orchestrator/config.json new file mode 100644 index 0000000..ec50f98 --- /dev/null +++ b/.mosaic/orchestrator/config.json @@ -0,0 +1,18 @@ +{ + "enabled": true, + "transport": "matrix", + "matrix": { + "control_room_id": "", + "workspace_id": "", + "homeserver_url": "", + "access_token": "", + "bot_user_id": "" + }, + "worker": { + "runtime": "codex", + "command_template": "bash scripts/agent/orchestrator-worker.sh {task_file}", + "timeout_seconds": 7200, + "max_attempts": 1 + }, + "quality_gates": ["pnpm lint", "pnpm typecheck", "pnpm test"] +} diff --git a/.mosaic/orchestrator/logs/.gitkeep b/.mosaic/orchestrator/logs/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.mosaic/orchestrator/logs/.gitkeep @@ -0,0 +1 @@ + diff --git a/.mosaic/orchestrator/results/.gitkeep b/.mosaic/orchestrator/results/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.mosaic/orchestrator/results/.gitkeep @@ -0,0 +1 @@ + diff --git a/.mosaic/quality-rails.yml b/.mosaic/quality-rails.yml new file mode 100644 index 0000000..816ea24 --- /dev/null +++ b/.mosaic/quality-rails.yml @@ -0,0 +1,10 @@ +enabled: false +template: "" + +# Set enabled: true and choose one template: +# - typescript-node +# - typescript-nextjs +# - monorepo +# +# Apply manually: +# ~/.config/mosaic/bin/mosaic-quality-apply --template