/** * Unicode folding before the rule table reads a tool definition. * * A rule written as `ignore previous instructions` must not be defeated by the * same words spelled so that a regex no longer sees them while a model still * does. Three spellings do that, and none of them depends on the language: * * 1. Compatibility forms. `ignore previous` (fullwidth), ligatures, * mathematical alphanumerics, circled letters. NFKC maps each to the plain * letter a reader sees. * 2. Invisible characters inside a word. `ig​nore`, a soft hyphen, a * variation selector. They are dropped here so they cannot split a rule word. * The high-signal ones (zero-width, bidi, word-joiner, BOM, the tag block and * the variation-selector supplement) are ALSO reported, because the * hidden-character rule runs on the raw text; the purely cosmetic ones (a * soft hyphen, an Indic/Arabic joiner control) are neutralised here and not * separately flagged. * 3. Look-alike letters from another script inside a Latin word: `іgnоre` with a * Cyrillic і and о. A token that mixes Latin with Cyrillic or Greek letters has * its look-alikes mapped to Latin. A token written wholly in one script is left * alone, so Russian and Greek text still reads as Russian and Greek. * * Unicode TAG characters (U+E0020–U+E007E) are the exception to "dropped": each is * an invisible copy of an ASCII character, and a whole instruction can be written in * them. They are DECODED to that ASCII here, so the instruction they carry meets the * same rules as visible text. * * The fold is part of the published ruleset (FOLD_ID is in its digest): the same * regexes over folded and unfolded text are different scans. */ export declare const FOLD_ID = "escapes+entities+percent+base64/4x64k+nfkc+tags+invisible+confusables/2"; /** * Fold `text` for matching. Never shown to anyone: findings quote the folded span, * and the raw text is what the hidden-character rules and the reader see. */ export declare function foldForScan(text: string): string; //# sourceMappingURL=fold.d.ts.map