Type Alias: GuardrailTriggeredHandler

type GuardrailTriggeredHandler = (result, context) => boolean | Promise<boolean>;

Defined in: guardrails/types.ts:153

Handler called when a guardrail is triggered

Parameters

Parameter Type Description
result GuardrailResult The guardrail check result
context GuardrailContext Context about the tool call

Returns

boolean | Promise<boolean>

true to proceed with execution, false to block