orchestrator: restore opencode web launcher
This commit is contained in:
29
cc-ci-plan/launch-opencode.sh
Executable file
29
cc-ci-plan/launch-opencode.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SELF_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
FLAKE_ROOT="$(readlink -f "$SELF_DIR/..")"
|
||||
FLAKE_HOST="${FLAKE_HOST:-cc-ci-orchestrator-hetzner}"
|
||||
DEFAULT_MODEL="${LOOP_MODEL:-openai/gpt-5.4}"
|
||||
|
||||
ensure_opencode_web() {
|
||||
if ! systemctl is-enabled --quiet opencode-web.service; then
|
||||
sudo nixos-rebuild switch --flake "$FLAKE_ROOT#$FLAKE_HOST"
|
||||
fi
|
||||
|
||||
if ! systemctl is-active --quiet opencode-web.service; then
|
||||
sudo systemctl start opencode-web.service
|
||||
fi
|
||||
}
|
||||
|
||||
ensure_opencode_web
|
||||
|
||||
export LOOP_BACKEND=opencode
|
||||
export LOOP_MODEL="$DEFAULT_MODEL"
|
||||
export ORCH_SESSION="${ORCH_SESSION:-cc-ci-orchestrator-oc}"
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
set -- fresh
|
||||
fi
|
||||
|
||||
exec python3 "$SELF_DIR/launch-orchestrator.py" "$@"
|
||||
Reference in New Issue
Block a user