import type { LanguageModel } from 'ai'; import type { ValidationCapability } from '../ValidationCapability.js'; export interface GroundingValidatorOptions { /** Judge model, run at temperature 0. Use the agent's controlModel-class model. */ model: LanguageModel; /** Extra domain rules appended to the judge prompt (e.g. "never promise refunds"). */ instructions?: string; name?: string; } /** * State-grounded output validator: checks the assistant reply for action/fact * claims unsupported by this turn's tool calls, flow state, or citations — * the "order placed" with no create-order call class of hallucination. * * Repair policy is rewrite-not-block: an ungrounded claim is rewritten out of * the reply rather than replacing the whole turn with an apology, so the * conversation keeps moving. If the judge flags ungrounded but cannot produce * a rewrite, the turn is blocked (fail safe). Judge errors fail open with low * confidence — the validator is a gate, not a single point of failure. */ export declare function createGroundingValidator(options: GroundingValidatorOptions): ValidationCapability;