/** * Strict word-aware option matching for flow CASE conditions (APPROVED_FUNCTIONS.matchesChoice) — * replaces the substring `.some(choice => input.includes(choice))` idiom, whose false positives broke * branch routing ('si' inside "imposible"/"así" matched YES, prod-observed 2026-08-09). * * Rules (deliberately NO fuzzy/prefix matching): * - single-word choice: exact word membership * - multi-word choice: exact word-sequence containment * - plurals/inflections: enumerate them explicitly in the choice list * - a keypad key (one digit, * or #) matches ONLY an answer that is exactly that key, never a key * inside a longer answer (owner rule): "I made payments by 1," at "press 1 to pay" charged the full * amount due on dev, 2026-10-14 * - an ELONGATED word the user typed is forgiven (2026-10-01): a repeated vowel or any letter typed * 3+ times collapses — "Sii" matches 'si', "nadaaaa" 'nada', "yesss" 'yes'. A typed "Sii" at the * authentication retry menu ended the conversation in contact-support. Only the user's word is * collapsed, and only against an option word with no doubled letter of its own. Measured on a * week of prod prompts (scratch replay, 98 option lists × 23,692 prompts): * · collapsing BOTH sides: rejected — 'all' → 'al' made "servicio al cliente" (138 turns) pick * the "all" option, and 'mm' → 'm' made "I'm" a filler; * · collapsing every doubled letter of the user's word: rejected — "mess" matched Spanish * 'mes' and "Mall" 'mal'. A doubled consonant is real spelling, so "okk" stays unmatched. * * Zero imports, so scripts/tests/matches-choice.mjs runs the real implementation. */ export function matchesChoice(input: any, choices: any): boolean; //# sourceMappingURL=matches-choice.d.ts.map