Skip to content

BlocklistOptions

Options for createBlocklistGuardrail.

Defined in: src/guardrails/blocklist.ts:20

Options for createBlocklistGuardrail.

Properties

PropertyTypeDefault valueDescriptionDefined in
action?BlocklistAction'block'What to do on a match. Remarks - 'block' (default) — suppress the text. At the 'final' stage nothing is spoken; at the 'chunk' stage the rest of the utterance is dropped. - 'redact' — replace each match with BlocklistOptions.replacement and speak the rest.src/guardrails/blocklist.ts:50
caseSensitive?booleanfalseMatch terms case-sensitively.src/guardrails/blocklist.ts:64
name?string'blocklist'Guardrail name reported in events.src/guardrails/blocklist.ts:81
patterns?readonly RegExp[]undefinedPatterns to match, for anything literals cannot express. Remarks Applied as-is. Include the global flag when using action: 'redact' so every occurrence is replaced.src/guardrails/blocklist.ts:37
replacement?string'[removed]'Text substituted for each match when action is 'redact'.src/guardrails/blocklist.ts:57
stages?readonly GuardrailStage[]both stagesStages at which to run.src/guardrails/blocklist.ts:88
terms?readonly string[]undefinedLiteral terms to match. Remarks Matched case-insensitively on whole words by default; see BlocklistOptions.caseSensitive and BlocklistOptions.wholeWord.src/guardrails/blocklist.ts:28
wholeWord?booleantrueRequire terms to match whole words rather than substrings. Remarks On by default, so blocking ass does not also block assessment.src/guardrails/blocklist.ts:74

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency