/**
 * Input Sanitizer — Prompt Injection Detection & Neutralization
 *
 * Deterministic, regex-based detection of prompt injection patterns in data
 * flowing into AI agent context windows. Inspired by CogniGate tripwires
 * (cognigate-api/app/core/tripwires.py) but focused on DATA manipulation
 * rather than COMMAND execution.
 *
 * Design principles:
 * - Pure regex — no LLM-based detection (avoids recursive injection)
 * - Multi-layer normalization — defeats encoding evasion
 * - Trust-score integration — results feed into ATSF trust weighting
 * - Batch processing — sanitize entire RAG document sets at once
 *
 * @packageDocumentation
 * @module security/input-sanitizer
 */
import type { SanitizationResult, SanitizerConfig, Detection } from './types.js';
/**
 * Prompt injection detection and sanitization engine.
 *
 * Scans input data (documents, API responses, user messages) for prompt
 * injection patterns before the data reaches an AI agent's context window.
 *
 * @example
 * ```typescript
 * import { InputSanitizer } from '@vorionsys/security/input-sanitizer';
 *
 * const sanitizer = new InputSanitizer({ mode: 'sanitize', strictness: 'high' });
 *
 * // Single input
 * const result = sanitizer.sanitize(ragDocument);
 * if (result.status === 'HOSTILE') {
 *   // Reject this document — it contains prompt injection
 * }
 *
 * // Batch — sanitize an entire RAG result set
 * const results = sanitizer.sanitizeBatch(documents);
 * const safeDocuments = results
 *   .filter(r => r.status !== 'HOSTILE')
 *   .map(r => r.sanitizedInput);
 * ```
 */
export declare class InputSanitizer {
    private readonly config;
    private readonly activePatterns;
    private stats;
    constructor(config?: Partial<SanitizerConfig>);
    /**
     * Sanitize a single input string.
     *
     * Runs detection, classifies the input, and produces a sanitized version
     * with injection patterns removed (when mode is 'sanitize').
     */
    sanitize(input: string): SanitizationResult;
    /**
     * Batch sanitize an array of inputs.
     *
     * Designed for RAG document sets — sanitize every retrieved document
     * before injecting into agent context.
     */
    sanitizeBatch(inputs: string[]): SanitizationResult[];
    /**
     * Analyze an input without sanitizing.
     *
     * Returns detections only — does not modify input or update stats.
     */
    analyze(input: string): Detection[];
    /**
     * Get cumulative scanning statistics.
     */
    getStats(): {
        totalScanned: number;
        clean: number;
        suspicious: number;
        hostile: number;
    };
    /**
     * Run all active patterns against all normalized variants of the input.
     */
    private detectAll;
    /**
     * Detect encoding-based evasion techniques.
     *
     * If a base64/hex payload decodes to something that matches an injection
     * pattern, that is encoding evasion (high severity).
     */
    private detectEncodingEvasion;
    /**
     * Classify detections into CLEAN / SUSPICIOUS / HOSTILE.
     *
     * Rules:
     * - HOSTILE: any high/critical detection OR 3+ total detections
     * - SUSPICIOUS: 1-2 low/medium detections
     * - CLEAN: no detections
     */
    private classify;
    /**
     * Strip detected injection patterns from the input.
     */
    private stripPatterns;
}
/**
 * Create an InputSanitizer with strict mode for high-security environments.
 */
export declare function createStrictSanitizer(overrides?: Partial<SanitizerConfig>): InputSanitizer;
/**
 * Create an InputSanitizer for RAG pipeline integration.
 * Sanitizes documents (strips injections) rather than blocking.
 */
export declare function createRAGSanitizer(overrides?: Partial<SanitizerConfig>): InputSanitizer;
/**
 * Create an InputSanitizer in flag-only mode for monitoring.
 * Passes all inputs through but marks detections for logging.
 */
export declare function createMonitoringSanitizer(overrides?: Partial<SanitizerConfig>): InputSanitizer;
//# sourceMappingURL=input-sanitizer.d.ts.map