Compare commits
1 commit
main
...
fix/issue-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45cac8c050 |
3 changed files with 20 additions and 8 deletions
|
|
@ -11,8 +11,8 @@ set -euo pipefail
|
||||||
# (default: all six). Uses while-true loop with staggered intervals:
|
# (default: all six). Uses while-true loop with staggered intervals:
|
||||||
# - review-poll: every 5 minutes (offset by 0s)
|
# - review-poll: every 5 minutes (offset by 0s)
|
||||||
# - dev-poll: every 5 minutes (offset by 2 minutes)
|
# - dev-poll: every 5 minutes (offset by 2 minutes)
|
||||||
# - gardener: every 6 hours (72 iterations * 5 min)
|
# - gardener: every 6 hours by default (72 iterations * 5 min), configurable via GARDENER_INTERVAL
|
||||||
# - architect: every 6 hours (same as gardener)
|
# - architect: every 6 hours by default (same as gardener), configurable via ARCHITECT_INTERVAL
|
||||||
# - planner: every 12 hours (144 iterations * 5 min)
|
# - planner: every 12 hours (144 iterations * 5 min)
|
||||||
# - predictor: every 24 hours (288 iterations * 5 min)
|
# - predictor: every 24 hours (288 iterations * 5 min)
|
||||||
|
|
||||||
|
|
@ -179,13 +179,13 @@ while true; do
|
||||||
|
|
||||||
# --- Slow agents: run in background with pgrep guard ---
|
# --- Slow agents: run in background with pgrep guard ---
|
||||||
|
|
||||||
# Gardener (every 6 hours = 72 iterations * 5 min = 21600 seconds)
|
# Gardener (default 6 hours = 21600 seconds)
|
||||||
if [[ ",${AGENT_ROLES}," == *",gardener,"* ]]; then
|
if [[ ",${AGENT_ROLES}," == *",gardener,"* ]]; then
|
||||||
gardener_iteration=$((iteration * POLL_INTERVAL))
|
gardener_iteration=$((iteration * POLL_INTERVAL))
|
||||||
gardener_interval=$((6 * 60 * 60)) # 6 hours in seconds
|
gardener_interval="${GARDENER_INTERVAL:-21600}" # default 6h, override via env var
|
||||||
if [ $((gardener_iteration % gardener_interval)) -eq 0 ] && [ "$now" -ge "$gardener_iteration" ]; then
|
if [ $((gardener_iteration % gardener_interval)) -eq 0 ] && [ "$now" -ge "$gardener_iteration" ]; then
|
||||||
if ! pgrep -f "gardener-run.sh" >/dev/null; then
|
if ! pgrep -f "gardener-run.sh" >/dev/null; then
|
||||||
log "Running gardener (iteration ${iteration}, 6-hour interval) for ${toml}"
|
log "Running gardener (iteration ${iteration}, ${gardener_interval}s interval) for ${toml}"
|
||||||
gosu agent bash -c "cd ${DISINTO_DIR} && bash gardener/gardener-run.sh \"${toml}\"" >> "${DISINTO_DIR}/../data/logs/gardener.log" 2>&1 &
|
gosu agent bash -c "cd ${DISINTO_DIR} && bash gardener/gardener-run.sh \"${toml}\"" >> "${DISINTO_DIR}/../data/logs/gardener.log" 2>&1 &
|
||||||
else
|
else
|
||||||
log "Skipping gardener — already running"
|
log "Skipping gardener — already running"
|
||||||
|
|
@ -193,13 +193,13 @@ while true; do
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Architect (every 6 hours, same schedule as gardener)
|
# Architect (default 6 hours, same schedule as gardener)
|
||||||
if [[ ",${AGENT_ROLES}," == *",architect,"* ]]; then
|
if [[ ",${AGENT_ROLES}," == *",architect,"* ]]; then
|
||||||
architect_iteration=$((iteration * POLL_INTERVAL))
|
architect_iteration=$((iteration * POLL_INTERVAL))
|
||||||
architect_interval=$((6 * 60 * 60)) # 6 hours in seconds
|
architect_interval="${ARCHITECT_INTERVAL:-21600}" # default 6h, override via env var
|
||||||
if [ $((architect_iteration % architect_interval)) -eq 0 ] && [ "$now" -ge "$architect_iteration" ]; then
|
if [ $((architect_iteration % architect_interval)) -eq 0 ] && [ "$now" -ge "$architect_iteration" ]; then
|
||||||
if ! pgrep -f "architect-run.sh" >/dev/null; then
|
if ! pgrep -f "architect-run.sh" >/dev/null; then
|
||||||
log "Running architect (iteration ${iteration}, 6-hour interval) for ${toml}"
|
log "Running architect (iteration ${iteration}, ${architect_interval}s interval) for ${toml}"
|
||||||
gosu agent bash -c "cd ${DISINTO_DIR} && bash architect/architect-run.sh \"${toml}\"" >> "${DISINTO_DIR}/../data/logs/architect.log" 2>&1 &
|
gosu agent bash -c "cd ${DISINTO_DIR} && bash architect/architect-run.sh \"${toml}\"" >> "${DISINTO_DIR}/../data/logs/architect.log" 2>&1 &
|
||||||
else
|
else
|
||||||
log "Skipping architect — already running"
|
log "Skipping architect — already running"
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,8 @@ _generate_local_model_services() {
|
||||||
WOODPECKER_DATA_DIR: /woodpecker-data
|
WOODPECKER_DATA_DIR: /woodpecker-data
|
||||||
FORGE_BOT_USER_${service_name^^}: "${forge_user}"
|
FORGE_BOT_USER_${service_name^^}: "${forge_user}"
|
||||||
POLL_INTERVAL: "${poll_interval_val}"
|
POLL_INTERVAL: "${poll_interval_val}"
|
||||||
|
GARDENER_INTERVAL: \${GARDENER_INTERVAL:-21600}
|
||||||
|
ARCHITECT_INTERVAL: \${ARCHITECT_INTERVAL:-21600}
|
||||||
depends_on:
|
depends_on:
|
||||||
- forgejo
|
- forgejo
|
||||||
- woodpecker
|
- woodpecker
|
||||||
|
|
@ -290,6 +292,8 @@ services:
|
||||||
DISINTO_CONTAINER: "1"
|
DISINTO_CONTAINER: "1"
|
||||||
PROJECT_REPO_ROOT: /home/agent/repos/${PROJECT_NAME:-project}
|
PROJECT_REPO_ROOT: /home/agent/repos/${PROJECT_NAME:-project}
|
||||||
WOODPECKER_DATA_DIR: /woodpecker-data
|
WOODPECKER_DATA_DIR: /woodpecker-data
|
||||||
|
GARDENER_INTERVAL: ${GARDENER_INTERVAL:-21600}
|
||||||
|
ARCHITECT_INTERVAL: ${ARCHITECT_INTERVAL:-21600}
|
||||||
# IMPORTANT: agents get explicit environment variables (forge tokens, CI tokens, config).
|
# IMPORTANT: agents get explicit environment variables (forge tokens, CI tokens, config).
|
||||||
# Vault-only secrets (GITHUB_TOKEN, CLAWHUB_TOKEN, deploy keys) live in
|
# Vault-only secrets (GITHUB_TOKEN, CLAWHUB_TOKEN, deploy keys) live in
|
||||||
# .env.vault.enc and are NEVER injected here — only the runner
|
# .env.vault.enc and are NEVER injected here — only the runner
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,14 @@ check_prs = true
|
||||||
check_dev_agent = true
|
check_dev_agent = true
|
||||||
check_pipeline_stall = false
|
check_pipeline_stall = false
|
||||||
|
|
||||||
|
# Agent scheduling — configure gardener and architect polling intervals
|
||||||
|
# in the docker-compose.yml environment section (or .env file).
|
||||||
|
# Values are in seconds, defaults are 21600 (6 hours) for both.
|
||||||
|
#
|
||||||
|
# For active development on the disinto factory itself, consider:
|
||||||
|
# GARDENER_INTERVAL=3600 # 1 hour
|
||||||
|
# ARCHITECT_INTERVAL=600 # 10 minutes
|
||||||
|
|
||||||
# Local-model agents (optional) — configure to use llama-server or similar
|
# Local-model agents (optional) — configure to use llama-server or similar
|
||||||
# for local LLM inference. Each agent gets its own container with isolated
|
# for local LLM inference. Each agent gets its own container with isolated
|
||||||
# credentials and configuration.
|
# credentials and configuration.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue