add drain-mode orchestration and docs/tasks sync for codex-opencode

This commit is contained in:
Jason Woltje
2026-02-17 14:41:47 -06:00
parent c7f363b2d2
commit 0ff39bcee4
15 changed files with 560 additions and 46 deletions

33
bin/mosaic-orchestrator-drain Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
sync_cmd="$MOSAIC_HOME/bin/mosaic-orchestrator-sync-tasks"
run_cmd="$MOSAIC_HOME/bin/mosaic-orchestrator-run"
do_sync=1
poll_sec=15
extra_args=()
while [[ $# -gt 0 ]]; do
case "$1" in
--no-sync)
do_sync=0
shift
;;
--poll-sec)
poll_sec="${2:-15}"
shift 2
;;
*)
extra_args+=("$1")
shift
;;
esac
done
if [[ $do_sync -eq 1 ]]; then
"$sync_cmd" --apply
fi
exec "$run_cmd" --until-drained --poll-sec "$poll_sec" "${extra_args[@]}"