Files
My-Brain-Is-Full-Crew/hooks/notify.sh
nunziati 0e66ce3efa Fix: remove claude-specific reference from hooks.
build: add platform_dir and dispatcher_name to all hook wrapper/plugin templates

feat(hooks): platform-aware path checks using platform_dir and dispatcher_name from JSON input

test: update regression snapshot for platform-aware hook wrappers and scripts
2026-04-10 20:20:21 +02:00

23 lines
997 B
Bash
Executable File

#!/usr/bin/env bash
# =============================================================================
# Hook: Desktop Notification (Notification event)
# =============================================================================
# Sends a macOS/Linux desktop notification when your agent platform needs attention.
# Useful during long agent chains that can take several minutes.
#
# macOS: uses osascript (built-in)
# Linux: uses notify-send (install with: sudo apt install libnotify-bin)
# =============================================================================
INPUT=$(cat)
TITLE=$(echo "$INPUT" | jq -r '.args.title // "Second Brain Crew"' 2>/dev/null)
MESSAGE=$(echo "$INPUT" | jq -r '.args.message // "Your obsidian crew needs your attention"' 2>/dev/null)
if [[ "$(uname)" == "Darwin" ]]; then
osascript -e "display notification \"$MESSAGE\" with title \"$TITLE\"" 2>/dev/null
elif command -v notify-send &>/dev/null; then
notify-send "$TITLE" "$MESSAGE" 2>/dev/null
fi
exit 0