/**
 * Input Sanitizer Types
 *
 * Type definitions for the prompt injection detection and sanitization layer.
 * This module intercepts data flowing INTO AI agents — catching poisoned
 * RAG documents, manipulated context, and social engineering payloads
 * BEFORE they reach agent context windows.
 *
 * CogniGate evaluates what agents want to DO; this layer evaluates
 * what data SHAPED that desire.
 *
 * @packageDocumentation
 * @module security/input-sanitizer
 */
/**
 * Categories of prompt injection attacks.
 *
 * Each category maps to a class of manipulation technique that an adversary
 * might embed in documents, API responses, or user-supplied data to
 * hijack agent behavior.
 */
export type InjectionCategory = 'instruction_override' | 'role_hijacking' | 'delimiter_injection' | 'encoding_evasion' | 'social_engineering' | 'data_exfiltration' | 'context_manipulation' | 'tool_injection';
/**
 * A single detection within an input string.
 */
export type Detection = {
    /** Human-readable label for the pattern that matched */
    pattern: string;
    /** The category of injection detected */
    category: InjectionCategory;
    /** How dangerous this detection is */
    severity: 'low' | 'medium' | 'high' | 'critical';
    /** Character index in the original input where the match starts */
    position: number;
    /** The exact text that was matched */
    matched: string;
};
/**
 * Result of running an input through the sanitizer.
 */
export type SanitizationResult = {
    /** Overall verdict */
    status: 'CLEAN' | 'SUSPICIOUS' | 'HOSTILE';
    /** The original input before any processing */
    originalInput: string;
    /** Cleaned version with injection patterns removed */
    sanitizedInput: string;
    /** All detections found in the input */
    detections: Detection[];
    /**
     * Trust weight modifier for downstream trust scoring.
     *   1.0 = clean (no modification)
     *   0.5 = suspicious (some detections, patterns stripped)
     *   0.0 = hostile (input should be rejected entirely)
     */
    trustWeightModifier: number;
};
/**
 * Configuration for the InputSanitizer.
 */
export interface SanitizerConfig {
    /**
     * How to handle detected injections:
     *   block    — reject the input entirely
     *   sanitize — strip detected patterns and pass the cleaned version
     *   flag     — pass the input unchanged but include detections in the result
     */
    mode: 'block' | 'sanitize' | 'flag';
    /**
     * Detection strictness:
     *   low    — only high/critical patterns
     *   medium — medium and above
     *   high   — all patterns including low-confidence heuristics
     */
    strictness: 'low' | 'medium' | 'high';
    /** Maximum input length in characters. Inputs exceeding this are truncated. Default: 100000 */
    maxInputLength: number;
    /** Whether to detect encoding-based evasion (base64, hex, unicode). Default: true */
    enableEncodingDetection: boolean;
    /** Additional regex patterns to check (matched as 'tool_injection' category) */
    customPatterns?: RegExp[];
}
/**
 * Default sanitizer configuration.
 */
export declare const DEFAULT_SANITIZER_CONFIG: SanitizerConfig;
/**
 * A compiled pattern used internally by the sanitizer.
 */
export interface PatternDefinition {
    /** Unique name for this pattern */
    name: string;
    /** The regex to match */
    regex: RegExp;
    /** Which injection category this belongs to */
    category: InjectionCategory;
    /** Severity if this pattern matches */
    severity: 'low' | 'medium' | 'high' | 'critical';
    /** Minimum strictness level required to activate this pattern */
    minStrictness: 'low' | 'medium' | 'high';
}
//# sourceMappingURL=types.d.ts.map