From c377c996e7e0d6a369d2909e392c4bd469d5c73f Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sat, 29 Nov 2025 18:19:19 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 12 +++ README.md | 3 + hooks/hooks.json | 182 +++++++++++++++++++++++++++++++++++++ plugin.lock.json | 45 +++++++++ 4 files changed, 242 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 hooks/hooks.json create mode 100644 plugin.lock.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..c571ea4 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "hook-sound-notifications", + "description": "Audio notifications for Claude Code hook events with customizable sounds and volume control", + "version": "1.4.4", + "author": { + "name": "Dev GOM", + "url": "https://github.com/Dev-GOM/claude-code-marketplace" + }, + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f82c980 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# hook-sound-notifications + +Audio notifications for Claude Code hook events with customizable sounds and volume control diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..a97398f --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,182 @@ +{ + "description": "Sound Notifications - Audio alerts for Claude Code hook events", + "version": "1.4.4", + "author": "Dev GOM", + "lastUpdated": "2025-11-03", + "hooks": { + "SessionStart": [ + { + "description": "Initialize plugin configuration at session start", + "priority": 100, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/init-config.js", + "description": "Creates default configuration file if it doesn't exist", + "continueOnError": true, + "suppressOutput": true + } + ] + }, + { + "description": "Play session start sound notification", + "priority": 90, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sound-hook-executor.js -HookType SessionStart", + "description": "Plays sound when session starts (Node.js wrapper with lock mechanism)", + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "SessionEnd": [ + { + "description": "Update hooks configuration for next session", + "priority": 100, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/update-hooks-config.js", + "description": "Updates hooks.json based on user configuration", + "continueOnError": true, + "suppressOutput": true + } + ] + }, + { + "description": "Play session end sound notification", + "priority": 50, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sound-hook-executor.js -HookType SessionEnd", + "description": "Plays sound when session ends (Node.js wrapper with lock mechanism)", + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "PreToolUse": [ + { + "description": "Play pre-tool-use sound notification", + "matcher": ".*", + "priority": 40, + "enabled": false, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sound-hook-executor.js -HookType PreToolUse", + "description": "Plays sound before tool execution (Node.js wrapper with lock mechanism)", + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "PostToolUse": [ + { + "description": "Play post-tool-use sound notification", + "matcher": ".*", + "priority": 40, + "enabled": false, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sound-hook-executor.js -HookType PostToolUse", + "description": "Plays sound after tool execution (Node.js wrapper with lock mechanism)", + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "Notification": [ + { + "description": "Play notification sound", + "priority": 100, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sound-hook-executor.js -HookType Notification", + "description": "Plays sound when notification occurs (Node.js wrapper with lock mechanism)", + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "UserPromptSubmit": [ + { + "description": "Play user prompt submit sound notification", + "priority": 50, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sound-hook-executor.js -HookType UserPromptSubmit", + "description": "Plays sound when user submits a prompt (Node.js wrapper with lock mechanism)", + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "Stop": [ + { + "description": "Play stop sound notification", + "priority": 50, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sound-hook-executor.js -HookType Stop", + "description": "Plays sound when agent stops responding (Node.js wrapper with lock mechanism)", + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "SubagentStop": [ + { + "description": "Play subagent stop sound notification", + "priority": 50, + "enabled": false, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sound-hook-executor.js -HookType SubagentStop", + "description": "Plays sound when subagent task completes (Node.js wrapper with lock mechanism)", + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "PreCompact": [ + { + "description": "Play pre-compact sound notification", + "priority": 50, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sound-hook-executor.js -HookType PreCompact", + "description": "Plays sound before context compaction (Node.js wrapper with lock mechanism)", + "continueOnError": true, + "suppressOutput": true + } + ] + } + ] + } +} \ No newline at end of file diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..b8dc055 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:Dev-GOM/claude-code-marketplace:plugins/hook-sound-notifications", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "c7977b31ebba5e085ee857148bf02f8fbc6d4155", + "treeHash": "07a0ffe7e0a499bbe91cb6b4d6af91e00d2f5ea037930d76f1651556db8105d5", + "generatedAt": "2025-11-28T10:10:16.436086Z", + "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": "hook-sound-notifications", + "description": "Audio notifications for Claude Code hook events with customizable sounds and volume control", + "version": "1.4.4" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "d1da6a2327b76dea9d62f62efbec758af8d8651a687cf2e54a49312bc8beafa4" + }, + { + "path": "hooks/hooks.json", + "sha256": "eef3b267eaaabd1200c079eba0abb7f761a65db96bc080bdae817653df6eaa29" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "efb066f8361d645f740abdd4b5d4779ab46df2a31395e4932ff7fcf3f1e2c8a8" + } + ], + "dirSha256": "07a0ffe7e0a499bbe91cb6b4d6af91e00d2f5ea037930d76f1651556db8105d5" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file