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": {
"SessionStart": [{
"type": "command",
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-project.sh\"",
"timeout": 10
"hooks": [{
"type": "command",
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-project.sh\"",
"timeout": 10
}]
}],
"PreToolUse": [{
"matcher": "Write|Edit",
"type": "command",
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-file-type.sh\" \"$TOOL_INPUT\"",
"timeout": 10
"hooks": [{
"type": "command",
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-file-type.sh\" \"$TOOL_INPUT\"",
"timeout": 10
}]
}]
}
}