fix(hub-guide): add nested hooks array in hooks.json entries

Each event entry needs hooks: [{ type, command, timeout }] inside it.
This commit is contained in:
asepharyana
2026-07-25 11:59:34 +07:00
parent 7435566498
commit 80feaf2f16
+10 -6
View File
@@ -1,15 +1,19 @@
{ {
"hooks": { "hooks": {
"SessionStart": [{ "SessionStart": [{
"type": "command", "hooks": [{
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-project.sh\"", "type": "command",
"timeout": 10 "command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-project.sh\"",
"timeout": 10
}]
}], }],
"PreToolUse": [{ "PreToolUse": [{
"matcher": "Write|Edit", "matcher": "Write|Edit",
"type": "command", "hooks": [{
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-file-type.sh\" \"$TOOL_INPUT\"", "type": "command",
"timeout": 10 "command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-file-type.sh\" \"$TOOL_INPUT\"",
"timeout": 10
}]
}] }]
} }
} }