/**
 * LLM Guardrails — pre/post phase enforcement with Poseidon-provable violations.
 *
 * Sprint-563: B1 — LLM Guardrails pre/post + violations Vauban Proof Stack.
 *
 * Guards run before (pre-phase) or after (post-phase) each OODA phase.
 * Pre-guards are BLOCKING — phase.fn does NOT execute if guard trips.
 * Post-guards inspect output — reject phase result if violation detected.
 *
 * Violations produce a Poseidon hash via proofPort → anchorable on L3.
 * CycleEventV011 'guardrail_violated' is emitted with proofHash + timing.
 */
import type { OODAContext, CycleEventV011 } from "./types.js";
export type GuardrailTiming = "pre-phase" | "post-phase";
export interface GuardrailDef<TInput = unknown, TOutput = unknown> {
    /** Guard name (e.g. "no-pii-in-output"). */
    readonly name: string;
    /** When the guard executes. */
    readonly timing: GuardrailTiming;
    /**
     * Check function. Returns { pass: false, reason, proofHash? } on violation.
     * `input` is the phase input (pre-phase) or output (post-phase).
     */
    check(input: TInput | TOutput, ctx: OODAContext): Promise<GuardrailResult>;
}
export interface GuardrailResult {
    pass: boolean;
    reason?: string;
    /** Poseidon hash of the violation payload for L3 anchoring. */
    proofHash?: string;
}
export interface GuardrailViolation {
    name: string;
    timing: GuardrailTiming;
    phase: string;
    reason: string;
    proofHash?: string;
}
/**
 * Run pre-guards. Returns the first violation, or null if all pass.
 * Pre-guard violations are BLOCKING — the phase does not execute.
 */
export declare function runPreGuards<TInput>(guards: readonly GuardrailDef<TInput, unknown>[], input: TInput, ctx: OODAContext): Promise<GuardrailViolation | null>;
/**
 * Run post-guards. Returns the first violation, or null if all pass.
 * Post-guard violations REJECT the phase output.
 */
export declare function runPostGuards<TOutput>(guards: readonly GuardrailDef<unknown, TOutput>[], output: TOutput, ctx: OODAContext): Promise<GuardrailViolation | null>;
/**
 * Build a CycleEventV011 'guardrail_violated' event from a violation.
 */
export declare function guardrailViolationToEvent(violation: GuardrailViolation, runId: string, cycleIndex: number): Extract<CycleEventV011, {
    type: "guardrail_violated";
}>;
/**
 * PII guard — detects credit card numbers in output.
 * Post-phase only, runs after LLM calls.
 */
export declare const PII_GUARD: GuardrailDef<string>;
/**
 * Max output length guard — prevents runaway LLM responses.
 * Pre-phase only (applied to input size before LLM call).
 */
export declare function createMaxInputLengthGuard(maxChars: number): GuardrailDef<string>;
//# sourceMappingURL=guardrails.d.ts.map