/**
 * SQLite CRUD for custom injection patterns (Pro feature).
 */
export interface CustomPattern {
    id: number;
    name: string;
    category: string;
    severity: 'critical' | 'high' | 'medium' | 'low';
    regex: string;
    description: string;
    enabled: number;
    created_at: string;
}
/**
 * Validate regex safety:
 * 1. Length check
 * 2. Compile check
 * 3. ReDoS check via safe-regex2
 */
export declare function validateRegex(pattern: string): {
    valid: boolean;
    error?: string;
};
/**
 * Validate flags — only g, i, m allowed.
 */
export declare function validateFlags(flags?: string): {
    valid: boolean;
    error?: string;
};
export declare function listCustomPatterns(): CustomPattern[];
export declare function getCustomPattern(id: number): CustomPattern | undefined;
export declare function createCustomPattern(pattern: {
    name: string;
    category: string;
    severity: 'critical' | 'high' | 'medium' | 'low';
    regex: string;
    description?: string;
}): CustomPattern;
export declare function deleteCustomPattern(id: number): boolean;
/**
 * Test a pattern against sample text. Returns matches found.
 */
export declare function testPattern(id: number, text: string): {
    matches: string[];
    count: number;
};
/**
 * Get all enabled patterns (used by the defence pipeline).
 */
export declare function getEnabledCustomPatterns(): CustomPattern[];
