mirror of
https://github.com/gnekt/My-Brain-Is-Full-Crew.git
synced 2026-09-05 06:50:50 +00:00
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
23 lines
997 B
Bash
Executable File
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
|