Interface GuardrailOutputVerdict

The verdict on a reply, as GuardrailOutputOptions.onVerdict receives it.

interface GuardrailOutputVerdict {
    streamId: string;
    action: GuardrailAction;
    guardrailId?: string;
    reasonCode?: string;
    finalText: null | string;
    originalText: null | string;
    toolCallIds?: string[];
}

Properties

streamId: string
guardrailId?: string

The id of the guard that blocked, when it has one.

reasonCode?: string
finalText: null | string

The text the caller receives: the replacement after a block with one, the reply after a pass, else null.

originalText: null | string

The reply's text as the guards judged it, before any rewrite; null for a verdict on a streamed delta, which judged no whole reply.

toolCallIds?: string[]

The ids of the actionable tool calls (executionMode: 'external') a block withheld from the caller: the calls of the tool-call chunk it ended the stream in place of, or, in hold mode, of the tool-call chunk after the text it blocked. AgentOS drops the pause the runtime saved for them when the turn stopped for them. Unset when a verdict withheld no actionable call; after such a block AgentOS drops the pause the turn saves later, once the turn ends, and never offers it meanwhile.