Skip to content

Graphorin API reference v0.9.0


Graphorin API reference / @graphorin/agent / / PermissionHook

Type Alias: PermissionHook

ts
type PermissionHook = (input) => 
  | PermissionHookResult
| Promise<PermissionHookResult>;

Defined in: packages/tools/dist/executor/types.d.ts

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

ParameterType
inputPermissionHookInput

Returns

| PermissionHookResult | Promise&lt;PermissionHookResult&gt;

Stable