Commit 93036c9
Support future hook event types in progress entry classification (#21)
* compat(v2.1.84-v2.1.86): PowerShell tool category and hook event rescue
Issue #19 (v2.1.84): PowerShell is an opt-in Windows shell tool that
appears in tool_use blocks. Map it to ToolCategory::Bash so it renders
with the correct shell-execution icon rather than falling into Other.
Issue #19 (v2.1.84) + Issue #20 (v2.1.85-v2.1.86): The hook rescue in
classify() previously required data.type == "hook_progress". This is
correct for all existing hook events (PreToolUse, PostToolUse, etc.)
but would silently discard future hook types that carry a hookEvent field
under a different data.type (e.g. TaskCreated). Guard on hookEvent
presence in addition to data.type so any hook-bearing progress entry is
correctly surfaced as a HookMsg.
Non-hook progress entries (agent_progress, bash_progress, ...) remain
noise: they have no hookEvent field and are still dropped.
Verified against claude --debug output and cli.js bundle (v2.1.86):
- All current hook events use data.type="hook_progress" with hookEvent
- @-mention encoding change: parser never double-unescaped, no change needed
- Read tool compact line-number format: no line-number regex in parser
https://claude.ai/code/session_01MK63kGRSmtkGSXCDaqh8p3
* chore: add generated linux-schema.json
Generated by cargo build when libgtk-3-dev became available in this
environment. Matches the pattern of the other OS schemas already tracked.
https://claude.ai/code/session_01MK63kGRSmtkGSXCDaqh8p3
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent b91b8e9 commit 93036c9
3 files changed
Lines changed: 6168 additions & 3 deletions
0 commit comments