GuardrailResult
What a guardrail decided about the text it was given.
Defined in: src/core/types/guardrails.ts:98
What a guardrail decided about the text it was given.
Remarks
Returning undefined (or nothing) is equivalent to {} — the text passes through unchanged.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
block? | boolean | Suppress the text instead of speaking it. Remarks At the 'final' stage nothing is synthesized at all. At the 'chunk' stage the current segment and every later segment of the same utterance are suppressed — text already handed to the TTS provider cannot be recalled. Use mode: 'buffered' when a block must be absolute. | src/core/types/guardrails.ts:117 |
metadata? | Record<string, unknown> | Arbitrary detail (matched categories, scores) surfaced on the same events. | src/core/types/guardrails.ts:123 |
reason? | string | Human-readable explanation, surfaced on guardrail.applied / guardrail.blocked. | src/core/types/guardrails.ts:120 |
text? | string | Replacement text to pass downstream. Remarks Omit to keep the input unchanged. Set to '' to drop this text silently without blocking the rest of the utterance. | src/core/types/guardrails.ts:106 |