Files
claude-hud/hooks/hooks.json
Jarrod Watts bb77dd7cc3 feat: Enhanced data capture with new hooks and session tracking
Phase 1 of v2 upgrade:
- Add PreToolUse hook for true "running" state before tool execution
- Add UserPromptSubmit hook to track user prompts and idle state
- Add Stop hook for idle detection when Claude finishes responding
- Add PreCompact hook to track context compaction events
- Enrich capture-event.sh with permission_mode, transcript_path, cwd
- Add CostTracker for session cost estimation
- Add SessionInfo type for tracking session state
- Show idle indicator (💤/) and permission mode in header
- Show cost estimate when significant
- Show compaction count warning
- Show last user prompt preview

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 14:10:21 +11:00

95 lines
1.8 KiB
JSON

{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/session-start.sh",
"timeout": 15
}
]
}
],
"PreToolUse": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/capture-event.sh",
"timeout": 5
}
]
}
],
"PostToolUse": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/capture-event.sh",
"timeout": 5
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/capture-event.sh",
"timeout": 5
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/capture-event.sh",
"timeout": 5
}
]
}
],
"SubagentStop": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/capture-event.sh",
"timeout": 5
}
]
}
],
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/capture-event.sh",
"timeout": 5
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/cleanup.sh",
"timeout": 5
}
]
}
]
}
}