import type { RiskScore } from '../types.js'; /** * Pattern - tipo puro */ export type Pattern = { readonly pattern_type: string; readonly regex: RegExp; readonly base_confidence: RiskScore; readonly description: string; }; /** * Constantes de seguridad para pattern matching */ export declare const MAX_CONTENT_LENGTH = 10000000; export declare const MAX_PATTERN_LENGTH = 10000; export declare const MAX_MATCHES = 10000; /** * Crea un Pattern - función pura */ export declare function createPattern(pattern_type: string, regex: string | RegExp, base_confidence: RiskScore, description?: string): Pattern; /** * Funciones puras para Pattern matching */ export declare function matchesPattern(pattern: Pattern, content: string): boolean; /** * Single match result for findAllMatches */ export type PatternMatch = { readonly matched: string; readonly position: { start: number; end: number; }; }; /** * Finds all non-overlapping matches of a pattern in content. * Uses a global clone of the pattern regex so each exec() call advances. * Caps at MAX_MATCHES to avoid runaway on zero-width or many matches. * * @param pattern - Pattern to match * @param content - Content to scan * @param maxMatches - Cap on number of matches returned (default: MAX_MATCHES) * @returns Array of { matched, position } (empty if no matches) */ export declare function findAllMatches(pattern: Pattern, content: string, maxMatches?: number): PatternMatch[]; export declare function findMatch(pattern: Pattern, content: string): { matched: string; position: { start: number; end: number; }; } | null; //# sourceMappingURL=Pattern.d.ts.map