#!/usr/bin/env bash set -euo pipefail branch="${1:-main}" remote_dir="${BOSS_REMOTE_DIR:-/home/ubuntu/boss}" remote_repo="${BOSS_REMOTE_REPO:-https://git.hyzq.site/krisolo/boss.git}" export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}" export AG_SERVER_SKILL="${AG_SERVER_SKILL:-$CODEX_HOME/skills/ai-glasses-server-debug}" export AG_SERVER="${AG_SERVER:-$AG_SERVER_SKILL/scripts/server_ssh.sh}" if [[ ! -x "$AG_SERVER" ]]; then echo "AI Glasses server wrapper not found: $AG_SERVER" >&2 exit 1 fi remote_script=$(cat <