Documentation / @agentick/kernel / GuardFn
Type Alias: GuardFn() ​
GuardFn = (
envelope) =>boolean|Promise<boolean>
Defined in: kernel/src/guard.ts:11
Guard function that inspects the procedure envelope to decide allow/deny.
- Return
trueto allow execution. - Return
falseto deny (createGuard constructs a GuardError from config). - Throw a
GuardErrordirectly for full control over the error.
Parameters ​
envelope ​
ProcedureEnvelope<any[]>
Returns ​
boolean | Promise<boolean>