/**
 * Output Filtering
 * Filters AI model outputs for PII, sensitive data, and validation
 * Vorion Security Platform
 */
import { EventEmitter } from 'events';
import { OutputFilterResult, PIIDetection, PIIType } from './types';
/**
 * Output filter configuration
 */
export interface OutputFilterConfig {
    enabled: boolean;
    piiDetection: boolean;
    piiRedaction: boolean;
    sensitiveDataPatterns: SensitiveDataPattern[];
    hallucinationDetection: boolean;
    confidenceThreshold: number;
    customValidationRules: ValidationRule[];
    redactionReplacement: string;
    preserveFormatting: boolean;
    logFilteredContent: boolean;
}
/**
 * Sensitive data pattern definition
 */
export interface SensitiveDataPattern {
    id: string;
    name: string;
    category: string;
    pattern: RegExp;
    severity: 'low' | 'medium' | 'high' | 'critical';
    redact: boolean;
    enabled: boolean;
}
/**
 * Validation rule definition
 */
export interface ValidationRule {
    id: string;
    name: string;
    check: (output: string) => boolean;
    severity: 'warning' | 'error';
    message: string;
    field?: string;
    enabled: boolean;
}
/**
 * PII detection pattern
 */
interface PIIPattern {
    type: PIIType;
    pattern: RegExp;
    confidence: number;
    redactionFormat: (match: string) => string;
}
/**
 * Output Filter
 * Filters and validates AI model outputs
 */
export declare class OutputFilter extends EventEmitter {
    private config;
    private piiPatterns;
    private sensitivePatterns;
    private validationRules;
    constructor(config?: Partial<OutputFilterConfig>);
    /**
     * Filter output
     */
    filterOutput(output: string): Promise<OutputFilterResult>;
    /**
     * Detect PII in output
     */
    private detectPII;
    /**
     * Redact PII from output
     */
    private redactPII;
    /**
     * Detect sensitive data patterns
     */
    private detectSensitiveData;
    /**
     * Redact sensitive data from output
     */
    private redactSensitiveData;
    /**
     * Detect hallucination indicators
     */
    private detectHallucinationIndicators;
    /**
     * Run validation rules
     */
    private runValidationRules;
    /**
     * Calculate overall confidence score
     */
    private calculateConfidenceScore;
    /**
     * Determine if output should be blocked
     */
    private shouldBlockOutput;
    /**
     * Remove duplicate and overlapping detections
     */
    private deduplicateDetections;
    /**
     * Create passthrough result when filtering is disabled
     */
    private createPassthroughResult;
    /**
     * Add a custom PII pattern
     */
    addPIIPattern(pattern: PIIPattern): void;
    /**
     * Add a custom sensitive data pattern
     */
    addSensitivePattern(pattern: SensitiveDataPattern): void;
    /**
     * Add a custom validation rule
     */
    addValidationRule(rule: ValidationRule): void;
    /**
     * Remove a pattern or rule by ID
     */
    removePattern(id: string): boolean;
    /**
     * Update configuration
     */
    updateConfig(updates: Partial<OutputFilterConfig>): void;
    /**
     * Get current configuration
     */
    getConfig(): OutputFilterConfig;
    /**
     * Test output against specific pattern types
     */
    testForPIIType(output: string, type: PIIType): Promise<PIIDetection[]>;
    /**
     * Get filter statistics
     */
    getStatistics(): {
        piiPatterns: number;
        sensitivePatterns: number;
        validationRules: number;
        enabledSensitivePatterns: number;
        enabledValidationRules: number;
    };
}
export default OutputFilter;
//# sourceMappingURL=output-filter.d.ts.map