Interface: GuardrailOutputOptions
Defined in: packages/agentos/src/safety/guardrails/guardrailDispatcher.ts:102
Options for output guardrail wrapping.
Properties
holdUntilFinal?
optionalholdUntilFinal:boolean
Defined in: packages/agentos/src/safety/guardrails/guardrailDispatcher.ts:120
Hold every TEXT_DELTA until the final guards have judged the whole reply. Allowed or flagged, the held deltas go out before the final chunk; blocked or sanitized, they are dropped, so the caller never sees text the guards refused. An actionable tool call closes the window: the text so far is judged as a final reply before it.
inputEvaluations?
optionalinputEvaluations:GuardrailEvaluationResult[] |null
Defined in: packages/agentos/src/safety/guardrails/guardrailDispatcher.ts:110
Input evaluations to attach to first output chunk
onVerdict()?
optionalonVerdict: (verdict) =>void|Promise<void>
Defined in: packages/agentos/src/safety/guardrails/guardrailDispatcher.ts:123
Called once with the final verdict on the reply: blocked, sanitized, flagged or allowed. A throw is logged and ignored.
Parameters
verdict
Returns
void | Promise<void>
personaId?
optionalpersonaId:string
Defined in: packages/agentos/src/safety/guardrails/guardrailDispatcher.ts:107
Persona ID for error chunks
ragSources?
optionalragSources:RagRetrievedChunk[]
Defined in: packages/agentos/src/safety/guardrails/guardrailDispatcher.ts:113
RAG sources to thread through to output guardrails for grounding verification
streamId
streamId:
string
Defined in: packages/agentos/src/safety/guardrails/guardrailDispatcher.ts:104
Stream identifier for error chunks