|
61 | 61 | "statusMessage": { |
62 | 62 | "type": "string", |
63 | 63 | "description": "Custom spinner message displayed while the hook runs" |
| 64 | + }, |
| 65 | + "if": { |
| 66 | + "$ref": "#/$defs/permissionRule", |
| 67 | + "description": "Only run this hook when the tool call matches this permission rule pattern. Only evaluated for tool events (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, PermissionDenied); silently ignored on all other events. See https://code.claude.com/docs/en/hooks" |
| 68 | + }, |
| 69 | + "asyncRewake": { |
| 70 | + "type": "boolean", |
| 71 | + "description": "Run this hook in the background and wake Claude when the process exits with code 2 (implies async: true)" |
| 72 | + }, |
| 73 | + "once": { |
| 74 | + "type": "boolean", |
| 75 | + "description": "If true, runs once per session then removed" |
| 76 | + }, |
| 77 | + "shell": { |
| 78 | + "type": "string", |
| 79 | + "enum": [ |
| 80 | + "bash", |
| 81 | + "powershell" |
| 82 | + ], |
| 83 | + "description": "Shell interpreter to use (default: bash)" |
64 | 84 | } |
65 | 85 | } |
66 | 86 | }, |
|
95 | 115 | "statusMessage": { |
96 | 116 | "type": "string", |
97 | 117 | "description": "Custom spinner message displayed while the hook runs" |
| 118 | + }, |
| 119 | + "if": { |
| 120 | + "$ref": "#/$defs/permissionRule", |
| 121 | + "description": "Only run this hook when the tool call matches this permission rule pattern. Only evaluated for tool events (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, PermissionDenied); silently ignored on all other events. See https://code.claude.com/docs/en/hooks" |
| 122 | + }, |
| 123 | + "once": { |
| 124 | + "type": "boolean", |
| 125 | + "description": "If true, runs once per session then removed" |
98 | 126 | } |
99 | 127 | } |
100 | 128 | }, |
|
129 | 157 | "statusMessage": { |
130 | 158 | "type": "string", |
131 | 159 | "description": "Custom spinner message displayed while the hook runs" |
| 160 | + }, |
| 161 | + "if": { |
| 162 | + "$ref": "#/$defs/permissionRule", |
| 163 | + "description": "Only run this hook when the tool call matches this permission rule pattern. Only evaluated for tool events (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, PermissionDenied); silently ignored on all other events. See https://code.claude.com/docs/en/hooks" |
| 164 | + }, |
| 165 | + "once": { |
| 166 | + "type": "boolean", |
| 167 | + "description": "If true, runs once per session then removed" |
132 | 168 | } |
133 | 169 | } |
134 | 170 | }, |
|
174 | 210 | "statusMessage": { |
175 | 211 | "type": "string", |
176 | 212 | "description": "Custom spinner message displayed while the hook runs" |
| 213 | + }, |
| 214 | + "if": { |
| 215 | + "$ref": "#/$defs/permissionRule", |
| 216 | + "description": "Only run this hook when the tool call matches this permission rule pattern. Only evaluated for tool events (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, PermissionDenied); silently ignored on all other events. See https://code.claude.com/docs/en/hooks" |
| 217 | + }, |
| 218 | + "once": { |
| 219 | + "type": "boolean", |
| 220 | + "description": "If true, runs once per session then removed" |
177 | 221 | } |
178 | 222 | } |
179 | 223 | } |
|
677 | 721 | "$ref": "#/$defs/hookMatcher" |
678 | 722 | } |
679 | 723 | }, |
| 724 | + "PermissionDenied": { |
| 725 | + "type": "array", |
| 726 | + "description": "Hooks that run when auto mode denies a tool call. See https://code.claude.com/docs/en/hooks", |
| 727 | + "items": { |
| 728 | + "$ref": "#/$defs/hookMatcher" |
| 729 | + } |
| 730 | + }, |
680 | 731 | "Notification": { |
681 | 732 | "type": "array", |
682 | 733 | "description": "Hooks that trigger on notifications", |
|
698 | 749 | "$ref": "#/$defs/hookMatcher" |
699 | 750 | } |
700 | 751 | }, |
| 752 | + "StopFailure": { |
| 753 | + "type": "array", |
| 754 | + "description": "Hooks that run when a turn ends due to an API error. See https://code.claude.com/docs/en/hooks", |
| 755 | + "items": { |
| 756 | + "$ref": "#/$defs/hookMatcher" |
| 757 | + } |
| 758 | + }, |
701 | 759 | "SubagentStart": { |
702 | 760 | "type": "array", |
703 | 761 | "description": "Hooks that run when a subagent is spawned", |
|
747 | 805 | "$ref": "#/$defs/hookMatcher" |
748 | 806 | } |
749 | 807 | }, |
| 808 | + "TaskCreated": { |
| 809 | + "type": "array", |
| 810 | + "description": "Hooks that run when a task is created via TaskCreate. See https://code.claude.com/docs/en/hooks", |
| 811 | + "items": { |
| 812 | + "$ref": "#/$defs/hookMatcher" |
| 813 | + } |
| 814 | + }, |
750 | 815 | "TaskCompleted": { |
751 | 816 | "type": "array", |
752 | 817 | "description": "Hooks that run when a task is being marked as completed. Exit code 2 prevents completion and sends feedback. Does not support matchers. See https://code.claude.com/docs/en/hooks#taskcompleted", |
|
775 | 840 | "$ref": "#/$defs/hookMatcher" |
776 | 841 | } |
777 | 842 | }, |
| 843 | + "FileChanged": { |
| 844 | + "type": "array", |
| 845 | + "description": "Hooks that run when a watched file changes on disk. See https://code.claude.com/docs/en/hooks", |
| 846 | + "items": { |
| 847 | + "$ref": "#/$defs/hookMatcher" |
| 848 | + } |
| 849 | + }, |
| 850 | + "CwdChanged": { |
| 851 | + "type": "array", |
| 852 | + "description": "Hooks that run when the working directory changes. See https://code.claude.com/docs/en/hooks", |
| 853 | + "items": { |
| 854 | + "$ref": "#/$defs/hookMatcher" |
| 855 | + } |
| 856 | + }, |
778 | 857 | "WorktreeCreate": { |
779 | 858 | "type": "array", |
780 | 859 | "description": "Hooks that run when a worktree is created via --worktree or isolation: \"worktree\" in subagents. Command handlers only, no matchers. Hook must print absolute path to created worktree on stdout; non-zero exit fails creation. See https://code.claude.com/docs/en/hooks#worktreecreate", |
|
0 commit comments