archy/.claude/hooks/post-deploy-check.sh
Dorian 584ce646e1 feat: AIUI chat mode integration with iframe, context broker, overnight loop
- Chat mode: AIUI loads in sandboxed iframe at /dashboard/chat with transparent bg
- Mode switcher: Easy + Pro tabs only, Chat is a launcher button
- Keyboard shortcuts: Cmd+1 (Easy), Cmd+2 (Pro), Cmd+3 (Chat), Cmd+M (cycle)
- Directional transitions: chat slides from/to left, dashboard from/to right
- Context broker: postMessage protocol for quarantined AIUI communication
- AI permissions store: user-controlled toggles for data access categories
- Settings UI: AI Data Access section with per-category toggles
- AIUI container manifest and nginx proxy config for /aiui/
- Deploy script builds AIUI with /aiui/ base path
- Overnight loop infrastructure (loop.sh, prepare.sh, plan.md, prompt.md)
- Security hooks for autonomous overnight runs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 12:06:20 +00:00

44 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# PostToolUse Bash hook: detect deploy commands and remind to test.
# Triggers after deploy-to-target.sh runs.
set -euo pipefail
INPUT=$(cat)
CMD=$(python3 -c "
import json, sys
try:
data = json.loads(sys.stdin.read())
print(data.get('tool_input', {}).get('command', ''))
except: pass
" <<< "$INPUT")
# Only trigger on deploy commands or git push
if ! echo "$CMD" | grep -qE 'deploy-to-target|git\s+push'; then
exit 0
fi
TIMESTAMP=$(date '+%Y-%m-%d %H:%M')
python3 -c "
import json
message = '''Deploy detected at $TIMESTAMP.
Post-deploy checklist:
1. Test the web UI at http://192.168.1.228
2. Verify modified apps load correctly
3. Check backend logs: sudo journalctl -u archipelago -n 20
4. Check nginx: sudo tail -f /var/log/nginx/error.log
5. If building ISO, sync system configs to image-recipe/configs/
6. Update CHANGELOG.md if this is a notable change'''
output = {
'hookSpecificOutput': {
'hookEventName': 'PostToolUse',
'deployReminder': message
}
}
print(json.dumps(output))
"