Files
loki/scripts/check-agent-runtime.sh
T
g-butandClaude Opus 4.7 41a1c5b1d6 refactor(beacon): finish PyQt retirement, drop zenity start-cockpit popup
Web popup at /beacon/live is the sole popup surface. Deletes the dead
PyQt vendored modules, the foreign-UI zenity/kdialog/notify-send dialog
that asked the user whether to start Cockpit, and the PyQt-import gates
in the install/smoke/runtime check scripts. The session JSON is now
written unconditionally; if Cockpit is unreachable, beacon.py
fire-and-forgets `systemctl --user start cockpit-app` and exits — the
session surfaces via SSE once the service is up.

Also fixes a pre-existing react-hooks/purity error in StuckGoalsCard
(impure Date.now() inside server component body) that was blocking the
pre-commit lint hook for the whole repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 14:55:25 +02:00

49 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
fail() {
echo "FAIL: $*" >&2
exit 1
}
check_file() {
local path="$1"
[ -e "$path" ] || fail "missing $path"
}
check_exec() {
local path="$1"
[ -x "$path" ] || fail "not executable: $path"
}
check_file "$ROOT/scripts/beacon.py"
check_exec "$ROOT/scripts/agent-hook-bridge.sh"
check_exec "$ROOT/scripts/agent-hook-lib.sh"
check_exec "$ROOT/scripts/smoke-beacon-stop.sh"
check_file "/home/g/dev/dotfiles/.claude/settings.json"
check_exec "/home/g/dev/dotfiles/.claude/hooks/stop.sh"
check_exec "/home/g/dev/dotfiles/.claude/hooks/notification.sh"
check_exec "/home/g/dev/dotfiles/.claude/hooks/beacon.py"
python3 "$ROOT/scripts/sync-agent-runtime-config.py"
[ -f /home/g/.config/agent-prompts.json ] || [ -f /home/g/.config/claude-prompts.json ] || fail "missing prompt config"
[ -f /home/g/.config/agent-projects.conf ] || [ -f /home/g/.config/claude-projects.conf ] || fail "missing projects config"
python3 - <<'PY'
import json
settings = json.load(open("/home/g/dev/dotfiles/.claude/settings.json"))
hooks = settings.get("hooks", {})
for name in ("Stop", "Notification"):
if not hooks.get(name):
raise SystemExit(f"missing {name} hook registration")
print("Claude hooks: ok")
PY
echo "agent runtime check: ok"
echo "smoke test: $ROOT/scripts/smoke-beacon-stop.sh [project-dir]"