commit b64a2cfd0447744b8d49ed90697b259d278076b1 Author: Zhongwei Li Date: Sun Nov 30 09:03:34 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..782ec16 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,11 @@ +{ + "name": "notification", + "description": "macOS notifications for Claude Code events", + "version": "1.0.0", + "author": { + "name": "zbeyens" + }, + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..936868d --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# notification + +macOS notifications for Claude Code events diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..fcaca05 --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,37 @@ +{ + "hooks": { + "Notification": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); MSG=$(echo \"$DATA\" | jq -r '.message'); terminal-notifier -message \"$MSG\" -title \"$TITLE\" -sound Ping" + } + ] + } + ], + "Stop": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); terminal-notifier -message \"Claude finished responding\" -title \"$TITLE\" -sound Ping" + } + ] + } + ], + "PreCompact": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); terminal-notifier -message \"Compacting conversation...\" -title \"$TITLE\" -sound Bottle" + } + ] + } + ] + } +} diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..27a9e12 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:udecode/dotai:.claude-plugin/plugins/notification", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "404fab39b11814281f14307f97ab825cf7cd57c8", + "treeHash": "26e495eb7886e08e3158912bc72330bbdc35c9424a5485a9c3e30b038defb844", + "generatedAt": "2025-11-28T10:28:48.302714Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "notification", + "description": "macOS notifications for Claude Code events", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "fe0f62fbc513046bd9a692dc53ba91458652324b1e7f568782a7f7053e82107c" + }, + { + "path": "hooks/hooks.json", + "sha256": "55db364315b9fccd09cae7cf74be5bcab8a2998f3f545e87fe70e68bc27dcc73" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "f93c687df9f2771bc58426eb3ad78824dbf625a3b4b1a4d51966ac42e9edef34" + } + ], + "dirSha256": "26e495eb7886e08e3158912bc72330bbdc35c9424a5485a9c3e30b038defb844" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file