# HookRegistry

**Kind:** Class

**Source:** [`atloria-monorepo/libs/agent-core/src/session/hook-registry.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/session/hook-registry.ts#L76)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `has` | `has(event: HookableEvent)` | `boolean` |
| `run` | `run(event: HookableEvent, data: Record<string, unknown>, toolName: string)` | `Promise<HookRunResult>` |

## Where it refuses work

- `HookRegistry` stops the work with an early return when `!hooks || hooks.length === 0`.
- `HookRegistry` stops the work with an early return when `result.blocked`.

## When something fails

- `HookRegistry` handles failure in 3 places: it discards it silently in 2, and turns it into a return value in 1.
