> ## Documentation Index
> Fetch the complete documentation index at: https://exosphere-auto-translate-docs-20260623-1106.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Hook

```bash theme={null}
failproofai --hook <EventType>
```

זהו הפקודה הרשומה ב-`settings.json` של Claude Code על ידי `failproofai policies --install`. בדרך כלל אתה לא קורא לזה ישירות.

קורא payload של JSON מ-stdin, מערך את כל המדיניות המופעלות, ויוצא עם קוד המציין את ההחלטה:

| קוד יציאה | החלטה      | השפעה                                       |
| --------- | ---------- | ------------------------------------------- |
| `0`       | `allow`    | אפשר את הפעולה                              |
| `1`       | `deny`     | חסום את הפעולה - Claude רואה את סיבת הדחייה |
| `2`       | `instruct` | הזריק הנחיות להקשר של Claude                |

### סוגי אירועים נתמכים

| קטגוריה                 | אירועים                                                                                    |
| ----------------------- | ------------------------------------------------------------------------------------------ |
| **ביצוע כלים**          | `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `PermissionDenied` |
| **מחזור חיים הפעלה**    | `SessionStart`, `SessionEnd`, `Stop`, `StopFailure`                                        |
| **אינטראקציה של משתמש** | `UserPromptSubmit`, `Notification`, `Elicitation`, `ElicitationResult`                     |
| **תת-סוכנים ומשימות**   | `SubagentStart`, `SubagentStop`, `TaskCreated`, `TaskCompleted`, `TeammateIdle`            |
| **תצורה**               | `InstructionsLoaded`, `ConfigChange`, `CwdChanged`                                         |
| **מערכת קבצים**         | `FileChanged`, `WorktreeCreate`, `WorktreeRemove`                                          |
| **הקשר**                | `PreCompact`, `PostCompact`                                                                |
