Files
cc-ci-orchestrator/cc-ci-plan/agents.toml

106 lines
5.4 KiB
TOML

# cc-ci unified agent configuration — the single source of truth.
#
# One file declares: which agents exist, their backend, model, prompt, kind, and how the
# watchdog supervises them. Read by agents.py (driver + watchdog). Runtime state (phase
# index, resume ids, limit windows) lives under <log_dir>/state/, NOT here.
#
# Precedence: this file is authoritative. A one-off CLI override (env AGENT_<field>_<name>)
# affects only a single `agents.py` invocation; the persisted watchdog always reads this file.
# ─────────────────────────── global watchdog cadence ───────────────────────────
[watchdog]
signal_interval = 30 # s between handoff / stall / limit checks (light)
heavy_interval = 300 # s between heal / phase-advance checks
limit_probe_fallback = 300 # flat probe cadence when a reset time can't be parsed
limit_reset_slack = 45 # s past a parsed reset before probing
# ─────────────────────────── backends (declared as data) ───────────────────────────
[backend.claude]
bin = "claude"
flags = "--dangerously-skip-permissions"
remote_control = true
supports_resume = true
prompt_delivery = "arg" # full prompt passed as a CLI argument
submit_key = "Enter"
stall_idle = 300
active_re = "esc to interrupt|⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏|Running tool|▣|Build ·|· \\d+"
limit_re = "spend limit|usage limit|limit reached|reached your .*limit|out of (credits|tokens)"
fatal_re = "redacted_thinking|blocks cannot be modified|cannot be modified"
[backend.opencode]
bin = "/home/loops/.local/bin/opencode"
server = "http://127.0.0.1:4096"
supports_resume = false
prompt_delivery = "ping" # send after the TUI connects
connect_delay = 12
submit_key = "C-m"
preamble = "set -a; . /srv/cc-ci/cc-ci-plan/load-env.sh; set +a"
stall_idle = 900
active_re = "esc interrupt|thinking|inferring|running tool|tool call|preparing patch|reading|searching"
limit_re = "spend limit|usage limit|limit reached|reached your .*limit|out of (credits|tokens)"
fatal_re = "redacted_thinking|blocks cannot be modified|cannot be modified"
# ─────────────────────────── defaults for every agent ───────────────────────────
[defaults]
backend = "claude"
model = "claude-sonnet-4-6"
dir = "/srv/cc-ci-orch"
watch = "heal" # none | heal | heal+stall
log_dir = "/srv/cc-ci/.cc-ci-logs"
# ─────────────────────────── agents ───────────────────────────
[[agent]]
name = "orchestrator" # tmux session: cc-ci-orchestrator
kind = "persistent"
backend = "opencode" # operator 2026-09-07 (evening): NO Claude on the cc-ci host — the
model = "opencode-go/glm-5.3-flash" # orchestrator is an opencode agent, steered via the opencode web UI
# (https://oc.ci.commoninternet.net). Claude sessions live on notplants-orchestrator.
resume = false # opencode backend has no --resume equivalent (fresh session each launch)
watch = "heal" # restart if dead / FATAL / backend-mismatch; never stall-reboot
wake = { interval = 3600, prompt_file = "ai-progress-monitor-prompt.txt" }
prompt = """
STARTUP (auto-launch): you are the cc-ci operator steering agent. Read AGENTS.md
and README.md, inspect the current host, weekly upgrade, report, and auto-update
status using /cc-ci-status, then report any concrete issue. The original
Builder/Adversary build is complete; do not relaunch its loops."""
[[agent]]
name = "assistant" # tmux session: cc-ci-assistant
kind = "persistent"
resume = true
watch = "none"
enabled = false
prompt = """
You are the cc-ci ASSISTANT. Read cc-ci-plan/JOURNAL.md for context, then wait for a specific \
plan/task from the orchestrator or operator. Work autonomously until the assigned task is \
complete, report the result, and then wait for the next assignment."""
[[agent]]
name = "upgrader" # tmux session: cc-ci-upgrader
kind = "task" # one-shot: run to completion, then idle
dir = "/srv/cc-ci"
watch = "none"
enabled = false # launched by the weekly timer or on demand
prompt = """
You are the cc-ci weekly UPGRADER. Invoke the /upgrade-all skill in DEFAULT mode (read \
/srv/cc-ci/.claude/skills/upgrade-all/SKILL.md for the full procedure), run it to completion, \
then report the summary of every PR opened and go idle."""
[[agent]]
name = "report" # tmux session: cc-ci-report
kind = "task"
dir = "/srv/cc-ci"
model = "claude-opus-4-8" # report is authored by opus even when the upgrader runs sonnet
watch = "none"
enabled = false
prompt = """
You generate the public weekly "Recipe Report". Run the /recipe-report skill now (full spec: \
/srv/cc-ci/.claude/skills/recipe-report/SKILL.md; creds in /srv/cc-ci/.testenv), then go idle."""
# Non-AI helper services (started by `up`, not AI sessions)
[[service]]
name = "cleanlogs" # tmux session: cc-ci-cleanlogs
command = "python3 cc-ci-plan/agent-log.py follow-all"
dir = "/srv/cc-ci-orch"