/** * PII Detection Utility * * Standalone utility for detecting and redacting personally identifiable * information (PII) from text. Used by generate() and stream() directly. * * @module piiDetector */ import type { PiiDetectionConfig, PiiDetectionResult } from "../types/index.js"; /** * Detect and optionally redact PII from a text string. * * Detection runs per-field (each named segment scanned independently) so that * offset positions always refer to the correct field's text — not a concatenated * blob (Bug C3 fix). * * Custom patterns are validated before execution to prevent catastrophic * backtracking (Bug C10 fix). * * @param text - The input text to scan * @param config - PII detection configuration * @returns Detection result with (optionally) redacted text and found PII */ export declare function detectAndRedactPII(text: string, config: PiiDetectionConfig): Promise;