/**
 * BiasMonitor -- EU AI Act Art. 9 bias assessment and OOD detection.
 *
 * Monitors AI agent outputs for statistical bias, demographic
 * imbalance, and out-of-distribution inputs. Required for
 * high-risk AI systems under EU AI Act Art. 9 (risk management)
 * and Art. 10 (data governance).
 *
 * T-072: Bias assessment for EU AI Act Art. 9.
 *
 * @connexum/ai-governance
 */
export interface BiasMonitorConfig {
    /** Directory for bias data */
    dataDir: string;
    /** Agent name */
    agentName: string;
    /** Minimum samples before bias detection activates (default: 20) */
    minSamples?: number;
    /** Bias threshold for flagging (0-1, default: 0.15 = 15% deviation) */
    biasThreshold?: number;
    /** OOD z-score threshold (default: 3.0) */
    oodThreshold?: number;
}
export interface BiasMetric {
    category: string;
    group: string;
    count: number;
    rate: number;
    expectedRate: number;
    deviation: number;
    biased: boolean;
}
export interface BiasAssessment {
    agentName: string;
    assessedAt: string;
    totalSamples: number;
    categories: BiasCategory[];
    overallBiased: boolean;
    biasScore: number;
    oodDetections: number;
    recommendations: string[];
}
export interface BiasCategory {
    name: string;
    groups: BiasMetric[];
    biased: boolean;
    chiSquare: number;
}
export interface OODDetection {
    inputHash: string;
    metric: string;
    value: number;
    mean: number;
    stdDev: number;
    zScore: number;
    detectedAt: string;
    agentName: string;
}
export declare class BiasMonitor {
    private config;
    private samplesFile;
    private oodFile;
    private assessmentFile;
    constructor(config: BiasMonitorConfig);
    /**
     * Record a sample for bias tracking.
     *
     * Categories map demographic/protected attributes to group values.
     * Example: { gender: 'female', age_group: '25-34', region: 'EU' }
     */
    recordSample(categories: Record<string, string>, numericFeatures?: Record<string, number>): void;
    /**
     * Run bias assessment across all recorded samples.
     */
    assess(): BiasAssessment;
    /**
     * Check a numeric input for out-of-distribution anomalies.
     */
    checkOOD(metric: string, value: number): OODDetection | null;
    /**
     * Get the most recent bias assessment.
     */
    getLatestAssessment(): BiasAssessment | null;
    /**
     * Get OOD detection history.
     */
    getOODHistory(): OODDetection[];
    /**
     * Get sample count.
     */
    getSampleCount(): number;
    private analyzeCategory;
    private loadSamples;
    private saveSamples;
    private loadOOD;
    private persistOOD;
    private saveAssessment;
}
//# sourceMappingURL=bias-monitor.d.ts.map