UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

25 lines (24 loc) • 931 B
/** * 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<PiiDetectionResult>;