Resilience: LaunchAgent restarts BroV on crash; crashed Claude Code/Codex sessions get a resume button (optional auto); login and waiting status in the Claude/ChatGPT pills

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-06 22:56:39 +03:00
parent 37c01f991a
commit 0d40b78b26
9 changed files with 453 additions and 7 deletions
+10 -1
View File
@@ -10,9 +10,18 @@ xcodebuild -scheme BroV -configuration "${1:-Debug}" -derivedDataPath "$D" build
grep -E 'error:|BUILD (SUCCEEDED|FAILED)' "$LOG" | sort -u
grep -q 'BUILD SUCCEEDED' "$LOG" || { echo "build failed, BroV not reinstalled"; exit 1; }
APP="$D/Build/Products/${1:-Debug}/BroV.app"
# Stop the running copy. If launchd keeps it alive, unload the job first or it would
# restart the old binary mid-copy.
PLIST="$HOME/Library/LaunchAgents/local.maksar.brov.plist"
launchctl bootout "gui/$(id -u)/local.maksar.brov" 2>/dev/null || true
pkill -x BroV 2>/dev/null || true
sleep 0.5
mkdir -p "$HOME/Applications"
rm -rf "$HOME/Applications/BroV.app"
cp -R "$APP" "$HOME/Applications/BroV.app"
open "$HOME/Applications/BroV.app"
if [ -f "$PLIST" ]; then
launchctl bootstrap "gui/$(id -u)" "$PLIST"
else
open "$HOME/Applications/BroV.app"
fi
echo "BroV installed to ~/Applications/BroV.app and launched"