Interface: GuardrailResult
Defined in: guardrails/types.ts:84
Result of checking a guardrail
Properties
action?
optional action?: GuardrailAction;
Defined in: guardrails/types.ts:103
The action to take
guardrail?
optional guardrail?: Guardrail;
Defined in: guardrails/types.ts:93
The guardrail that was triggered (if any)
input?
optional input?: unknown;
Defined in: guardrails/types.ts:113
The input that triggered the guardrail
match?
optional match?: string;
Defined in: guardrails/types.ts:98
The matched pattern (if any)
subcommand?
optional subcommand?: string;
Defined in: guardrails/types.ts:118
The specific subcommand that triggered (compound commands only)
subcommandIndex?
optional subcommandIndex?: number;
Defined in: guardrails/types.ts:123
0-based index of the subcommand in the compound command
toolName?
optional toolName?: string;
Defined in: guardrails/types.ts:108
The tool that triggered the guardrail
triggered
triggered: boolean;
Defined in: guardrails/types.ts:88
Whether any guardrail was triggered