diff --git a/agent-queue/demo/start-fleet.example.sh b/agent-queue/demo/start-fleet.example.sh index e7a7030..169ffe7 100755 --- a/agent-queue/demo/start-fleet.example.sh +++ b/agent-queue/demo/start-fleet.example.sh @@ -32,6 +32,11 @@ FLEET_TOKEN_FILE="${FLEET_TOKEN_FILE:-$SB/.token}" PRODUCTS="${PRODUCTS:-lysnrai chronomind mindlyst nomgap}" AGENT_QUEUE_MAX="${AGENT_QUEUE_MAX:-3}" LONGRUN_ALIAS="${LONGRUN_ALIAS:-$HERE/../../aliases/_longrun.alias}" +# PR mode: where the product repos are checked out, so a job's `repo` resolves to +# a local checkout and the factory opens a PR off a git worktree. Set FLEET_PR=0 +# to run plain (no PR) jobs in $SB instead. +FLEET_PR="${FLEET_PR:-1}" +REPO_BASE="${REPO_BASE:-$(cd "$HERE/../../.." && pwd)}" [ -f "$AQ" ] || { echo "agent-queue.sh not found at $AQ (set AQ=)"; exit 1; } [ -s "$FLEET_TOKEN_FILE" ] || { echo "fleet token not found at $FLEET_TOKEN_FILE (set FLEET_TOKEN_FILE=)"; exit 1; } @@ -55,6 +60,8 @@ for p in $PRODUCTS; do AQ_FACTORY_ID="mac-$p" \ AQ_FLEET_GATE=1 \ AQ_FLEET_LEASE_RENEW_SEC=30 \ + AQ_FLEET_PR="$FLEET_PR" \ + AQ_FLEET_REPO_BASE="$REPO_BASE" \ "$AQ" run echo "----" done @@ -69,6 +76,13 @@ done # coordinator's 90s stale threshold, or a healthy # factory flaps to "stale"/"no live factory" between # beats (the 300s default caused exactly that). +# AQ_FLEET_PR=1 + AQ_FLEET_REPO_BASE WITHOUT these a job's `repo` is ignored and +# Devin just runs the prompt in the sandbox cwd (no PR). +# With them, the factory checks out a worktree of +# $REPO_BASE/, commits, pushes, and opens a PR. +# +# Subset restart (leave a busy factory running): +# PRODUCTS="lysnrai mindlyst" bash start-fleet.example.sh # # Stop a factory: tmux kill-session -t gigafactory- # Tail a factory: tail -f "$SB"/longrun-gigafactory--*.log