Graphorin API reference v0.9.0
Graphorin API reference / @graphorin/tools / / PermissionHook
Type Alias: PermissionHook
ts
type PermissionHook = (input) =>
| PermissionHookResult
| Promise<PermissionHookResult>;Defined in: packages/tools/src/executor/types.ts:426
E1 pre-tool permission hook: one caller-supplied decision point over every tool call, evaluated after schema validation and BEFORE the approval phase. The hook must be pure/idempotent over its input - the agent pre-screen and the executor phase may each invoke it for the same logical call. A throwing hook fails the call closed (capability_blocked), never open.
Parameters
| Parameter | Type |
|---|---|
input | PermissionHookInput |
Returns
| PermissionHookResult | Promise<PermissionHookResult>