feat(agent-pod): persistent per-role agent pool, concurrency moves to repo level

coordinator.js now runs one long-lived planner/investigator/implementer/judge
session per repo (reused across every task via tmux send-keys) instead of a
fresh spawn per task per stage. Tasks within a repo run sequentially against
that pool; concurrency is now REPO_CONCURRENCY (default 3) concurrent repos
via a new --repos flag, not concurrent tasks in one repo's phase.
This commit is contained in:
Story Crater Bot
2026-08-18 21:30:49 -07:00
parent 5a8fc1885a
commit 35bef19e0c
2 changed files with 221 additions and 342 deletions
+11 -9
View File
@@ -31,15 +31,17 @@ spec:
# Also builds the agent-manager fork (github.com/Riotpiaole/
# agent-manager, add-headless-spawn branch) from source and drops
# coordinator.js in beside hub.js -- neither is the container's
# foreground process. hub.js keeps that role unchanged; running
# multiple repos' pipelines concurrently in this one pod means
# `kubectl exec <pod> -- node /root/coordinator.js --repo X --tasks
# Y &` once per repo, each an independent process inside the same
# container, each spawning its own agent-manager-tracked sessions
# on the container's local tmux server -- `kubectl exec -it <pod>
# -- agent-manager` attaches its TUI live against those same
# sessions, no cross-machine visibility problem since spawner,
# tmux server, and viewer are all colocated here.
# foreground process. hub.js keeps that role unchanged; coordinator.js
# itself now owns multi-repo concurrency (REPO_CONCURRENCY env,
# default 3), so one invocation handles every repo:
# `kubectl exec <pod> -- node /root/coordinator.js --repos
# repoA,repoB,... --tasks ...`. Each repo gets its own clone and its
# own persistent 4-agent pool (planner/investigator/implementer/
# judge, one agent-manager session per role, reused across every
# task in that repo) on the container's local tmux server --
# `kubectl exec -it <pod> -- agent-manager` attaches its TUI live
# against those same sessions, no cross-machine visibility problem
# since spawner, tmux server, and viewer are all colocated here.
#
# No prebuilt Linux binary is shipped for agent-manager: the local
# .bin/ build is macOS arm64 (wrong OS/arch for this container