Skip to content

Commit 78bd244

Browse files
committed
fix: add missing hooks wrapper key and complete hook events list
- Add required wrapping 'hooks' key to .claude/hooks/hooks.json to match Claude Code plugin format specification (was missing from settings.json port) - Add all documented hook events to VALID_HOOK_EVENTS in validator: PostToolUseFailure, SubagentStart, UserPromptExpansion, PermissionDenied, PostToolBatch, TaskCreated, TaskCompleted, StopFailure, TeammateIdle, WorktreeCreate, WorktreeRemove, ConfigChange, CwdChanged, FileChanged, InstructionsLoaded, Elicitation, ElicitationResult, Setup, PostCompact Fixes #1793
1 parent ba7778a commit 78bd244

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

.claude/hooks/hooks.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"PreToolUse": [
2+
"hooks": {
3+
"PreToolUse": [
34
{
45
"matcher": "Bash",
56
"hooks": [
@@ -235,4 +236,5 @@
235236
]
236237
}
237238
]
239+
}
238240
}

build/scripts/validate_plugin_manifests.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,33 @@
4141
VALID_HOOK_EVENTS = {
4242
"PreToolUse",
4343
"PostToolUse",
44+
"PostToolUseFailure",
4445
"Stop",
46+
"StopFailure",
4547
"SessionStart",
4648
"SessionEnd",
4749
"UserPromptSubmit",
50+
"UserPromptExpansion",
51+
"SubagentStart",
4852
"SubagentStop",
4953
"PermissionRequest",
54+
"PermissionDenied",
5055
"Notification",
5156
"PreCompact",
57+
"PostCompact",
58+
"TaskCreated",
59+
"TaskCompleted",
60+
"TeammateIdle",
61+
"WorktreeCreate",
62+
"WorktreeRemove",
63+
"ConfigChange",
64+
"CwdChanged",
65+
"FileChanged",
66+
"InstructionsLoaded",
67+
"Elicitation",
68+
"ElicitationResult",
69+
"Setup",
70+
"PostToolBatch",
5271
}
5372

5473

0 commit comments

Comments
 (0)