daf1f1169f
Per Claude Code's plugin spec at https://code.claude.com/docs/en/plugins.md, hooks must live at `.claude-plugin/hooks/hooks.json` — a `hooks/` subdirectory inside `.claude-plugin/`. v1.0.0 had `hooks.json` directly under `.claude-plugin/` (loaded 0 hooks); v1.0.1 inlined into `plugin.json` (also not supported). v1.0.2 puts the file at the documented path. Schema is unchanged — three-level nesting (event → matcher list → handler list), same as user settings.json. `${CLAUDE_PLUGIN_ROOT}` substitution is supported here.
65 lines
1.0 KiB
JSON
65 lines
1.0 KiB
JSON
{
|
|
"hooks": {
|
|
"UserPromptSubmit": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh UserPromptSubmit"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PreToolUse": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh PreToolUse"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PostToolUse": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh PostToolUse"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Notification": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh Notification"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh Stop"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"SessionEnd": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh SessionEnd"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|