Interface: Guardrail

Defined in: guardrails/types.ts:19

A guardrail definition

Properties

action

action: GuardrailAction;

Defined in: guardrails/types.ts:43

Action to take when triggered

description

description: string;

Defined in: guardrails/types.ts:33

Description of what this guardrail protects against

enabled?

optional enabled?: boolean;

Defined in: guardrails/types.ts:58

Whether this guardrail is enabled (default: true)

id

id: string;

Defined in: guardrails/types.ts:23

Unique identifier for this guardrail

message

message: string;

Defined in: guardrails/types.ts:48

Message to display when triggered

name

name: string;

Defined in: guardrails/types.ts:28

Human-readable name

patterns

patterns: RegExp[];

Defined in: guardrails/types.ts:38

Patterns to match against tool inputs

scope?

optional scope?: string[];

Defined in: guardrails/types.ts:53

Which tools this guardrail applies to (empty = all tools)

tags?

optional tags?: string[];

Defined in: guardrails/types.ts:63

Tags for grouping/filtering guardrails