Add type guards for tool_result event narrowing

- Export isBashToolResult, isReadToolResult, etc. type guards
- Update hooks.md with type guard usage examples
- Document custom tool handling in hooks.md
This commit is contained in:
Mario Zechner 2025-12-19 00:48:03 +01:00
parent 3d9bad8fb6
commit d353e5e219
5 changed files with 70 additions and 11 deletions

View file

@ -29,3 +29,12 @@ export type {
TurnStartEvent,
WriteToolResultEvent,
} from "./types.js";
export {
isBashToolResult,
isEditToolResult,
isFindToolResult,
isGrepToolResult,
isLsToolResult,
isReadToolResult,
isWriteToolResult,
} from "./types.js";