import type { LanguageModel } from 'ai'; import type { InputProcessor, OutputProcessor } from '../../types/processors.js'; export interface ModerationGuardOptions { /** Classifier model. Use a small/fast model — this runs on every turn it guards. */ model: LanguageModel; /** Policy categories to flag. Defaults cover the standard abuse set. */ categories?: string[]; /** User-facing message when content is flagged. */ message?: string; /** * What to do when the classifier itself errors. `allow` (default) fails open — * deterministic guards still run and an outage does not take the agent down. * `block` fails closed for zero-tolerance deployments. */ onError?: 'allow' | 'block'; id?: string; } /** * LLM moderation guard over inbound user text. Runs the configured model as a * temperature-0 classifier against the policy categories and blocks on a match. */ export declare function createModerationGuard(options: ModerationGuardOptions): InputProcessor; /** LLM moderation guard over assistant output — the post-turn counterpart. */ export declare function createModerationOutputGuard(options: ModerationGuardOptions): OutputProcessor;