/**
 * parityMonitor.ts — the Phase-3 live dual-forward parity MONITOR + cutover gate (spec §2.5).
 *
 * The per-pass comparison already exists (processor/parity.ts → ParityResult over the
 * order-independent invariants: per-report fingerprint, terminal-status, recurrence/cycling
 * counts — NOT raw cluster membership, which is order-dependent and would flap on benign
 * arrival-order noise). What Phase 3 needs ON TOP of one comparison is the WINDOW: run the
 * comparison repeatedly over real dual-forward traffic and only clear the cutover when a
 * genuine zero-divergence window has elapsed.
 *
 * This monitor records each pass, tracks the current zero-divergence streak (ANY divergent
 * pass resets it), and exposes the single structural gate `gate()` → cleared/blocked. That
 * `cleared` boolean is the objective `parity-zero-divergence` condition the Coordination
 * Mandate's `execute-cutover` authority reads — the agent cannot fake it; the window decides.
 *
 * Structure > Willpower: cutover is blocked by the gate, not by an agent deciding "looks
 * good". The pure core here is fully unit-testable; a thin durable wrapper (below) persists
 * passes so the window survives a restart, since it spans real traffic time.
 */
import type { ParityResult } from '../processor/parity.js';
/** One recorded comparison pass over a dual-forward traffic slice. */
export interface MonitorPass {
    /** ISO timestamp of this pass. */
    at: string;
    /** Clusters compared in this pass (the meaningful-sample input). */
    clustersCompared: number;
    /** Total divergences this pass (fingerprint + outcome). 0 == clean. */
    divergences: number;
    /** Convenience mirror of `divergences > 0`. */
    divergent: boolean;
}
/** The window a clean streak must satisfy before the cutover gate clears. */
export interface CutoverGatePolicy {
    /** Consecutive zero-divergence passes required (default 3). */
    requiredCleanPasses: number;
    /** The clean streak must span at least this much REAL time (default 1h). */
    minWindowMs: number;
    /** Total clusters compared across the clean streak — a meaningful sample (default 1). */
    minClustersObserved: number;
}
export declare const DEFAULT_GATE_POLICY: CutoverGatePolicy;
export interface CutoverGateStatus {
    /** The structural signal: true only when the zero-divergence window is genuinely satisfied. */
    cleared: boolean;
    reason: string;
    cleanPasses: number;
    windowMs: number;
    clustersObserved: number;
    /** ISO of the most recent divergent pass (the streak reset point), or null if never. */
    lastDivergentAt: string | null;
}
/**
 * Records parity passes and computes the cutover gate over the current zero-divergence
 * streak. Pure + clock-injected (gate(now) takes the current time) → fully testable.
 */
export declare class ParityMonitor {
    private readonly policy;
    private readonly _passes;
    constructor(policy?: Partial<CutoverGatePolicy>);
    /** Feed a raw pass record. */
    record(pass: MonitorPass): void;
    /** Convenience: record straight from a ParityResult + the pass timestamp. */
    recordResult(result: ParityResult, at: string): void;
    get passes(): readonly MonitorPass[];
    /**
     * The structural cutover gate. `cleared` is true only when the trailing run of passes is:
     *   - all clean (zero divergence), AND
     *   - at least `requiredCleanPasses` long, AND
     *   - spanning at least `minWindowMs` of real time (first-clean-pass → now), AND
     *   - covering at least `minClustersObserved` clusters in total.
     * Any divergent pass resets the streak. No passes → blocked.
     */
    gate(now: string): CutoverGateStatus;
}
//# sourceMappingURL=parityMonitor.d.ts.map