/**
 * PostMarketMonitor -- EU AI Act Art. 72 post-market monitoring.
 *
 * Continuous monitoring of AI system performance in production.
 * Tracks accuracy drift, performance degradation, incident rates,
 * and demographic impact over time.
 *
 * T-074: EU AI Act post-market monitoring features.
 *
 * @connexum/ai-governance
 */
export interface PostMarketMonitorConfig {
    /** Directory for monitoring data */
    dataDir: string;
    /** System name being monitored */
    systemName: string;
    /** Accuracy drift threshold (default: 0.10 = 10% decline) */
    accuracyDriftThreshold?: number;
    /** Performance degradation threshold in ms (default: 5000) */
    performanceDriftThreshold?: number;
    /** Incident rate threshold per window (default: 5) */
    incidentRateThreshold?: number;
    /** Monitoring window size (default: 100 samples) */
    windowSize?: number;
}
export interface PerformanceSample {
    timestamp: string;
    accuracy?: number;
    latencyMs?: number;
    success: boolean;
    errorType?: string;
    metadata?: Record<string, unknown>;
}
export interface DriftReport {
    systemName: string;
    generatedAt: string;
    window: {
        start: string;
        end: string;
        samples: number;
    };
    accuracy: DriftMetric;
    latency: DriftMetric;
    incidents: IncidentMetric;
    overallStatus: 'HEALTHY' | 'DEGRADED' | 'CRITICAL';
    alerts: DriftAlert[];
    article72Compliance: Art72Status;
}
export interface DriftMetric {
    current: number;
    baseline: number;
    drift: number;
    drifted: boolean;
    trend: 'IMPROVING' | 'STABLE' | 'DECLINING';
}
export interface IncidentMetric {
    currentWindow: number;
    previousWindow: number;
    rate: number;
    threshold: number;
    exceeded: boolean;
}
export interface DriftAlert {
    type: 'ACCURACY_DRIFT' | 'PERFORMANCE_DRIFT' | 'INCIDENT_RATE' | 'DATA_QUALITY';
    severity: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
    message: string;
    article: string;
    detectedAt: string;
}
export interface Art72Status {
    monitoringActive: boolean;
    lastReport: string | null;
    samplesCollected: number;
    alertsOpen: number;
    seriousIncidents: number;
    reportingCurrent: boolean;
}
export declare class PostMarketMonitor {
    private config;
    private samplesFile;
    private reportsFile;
    constructor(config: PostMarketMonitorConfig);
    /**
     * Record a performance sample.
     */
    record(sample: Omit<PerformanceSample, 'timestamp'>): void;
    /**
     * Generate a drift report.
     */
    generateReport(): DriftReport;
    /**
     * Get the latest report.
     */
    getLatestReport(): DriftReport | null;
    /**
     * Get all reports.
     */
    getReports(): DriftReport[];
    /**
     * Get Art. 72 compliance status.
     */
    getArt72Status(): Art72Status;
    /**
     * Get sample count.
     */
    getSampleCount(): number;
    private avgAccuracy;
    private avgLatency;
    private loadSamples;
    private saveSamples;
    private loadReports;
    private persistReport;
}
//# sourceMappingURL=post-market-monitor.d.ts.map