jsfe 1.10.5 → 1.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"answer.d.ts","sourceRoot":"","sources":["../../src/helpers/answer.js"],"names":[],"mappings":"AA4LA;;;GAGG;AACH,wEAkBC;AAED,+HAA+H;AAC/H,oDAIC;AAcD,2GAA2G;AAC3G,uDAGC;AAOD;;;;;GAKG;AACH,+DAUC;AAKD;;;;GAIG;AACH,oDAEC;AAiBD;;;;;;GAMG;AACH,mDAAmF;AAEnF,kGAAkG;AAClG;;;EAmCC;AAUD;;;;;;;;;GASG;AACH,6EAyGC;;;;;;;;AA/ZD,qCAKiD"}
1
+ {"version":3,"file":"answer.d.ts","sourceRoot":"","sources":["../../src/helpers/answer.js"],"names":[],"mappings":"AAmMA;;;GAGG;AACH,wEAkBC;AAED,+HAA+H;AAC/H,oDAIC;AAcD,2GAA2G;AAC3G,uDAGC;AAOD;;;;;GAKG;AACH,+DAUC;AAKD;;;;GAIG;AACH,oDAEC;AAiBD;;;;;;GAMG;AACH,mDAAmF;AAEnF,kGAAkG;AAClG;;;EAmCC;AAUD;;;;;;;;;GASG;AACH,6EAyGC;;;;;;;;AAnaD,qCAKiD"}
@@ -18,6 +18,9 @@ export const ANSWER_WORDS = {
18
18
  'si', 'sí', 'claro', 'claro que sí', 'claro que si', 'seguro', 'por favor', 'correcto', 'está bien', 'esta bien', 'de acuerdo',
19
19
  'estoy de acuerdo', 'dale', 'por supuesto', 'bueno', 'confirmo', 'confirmado', 'apruebo', 'aprobado', 'adelante', 'hazlo',
20
20
  'procede', 'perfecto', 'exacto', 'eso es', 'así es', 'asi es',
21
+ // the offered thing, pointed at (prod 2026-10-25 17:46: "Ese está bien." to "¿Se lo envío a …?" was not a yes)
22
+ 'ese mismo', 'esa misma', 'eso mismo', 'el mismo', 'la misma', "that's the one", 'that is the one',
23
+ 'the same one',
21
24
  // agreeing to what the question offers: "Sí, quiero continuar" to "diga SÍ para continuar" (replay of prod, 2026-10-14).
22
25
  // A bare "I want" / "quiero" is never a confirmation (owner decision 2026-10-15): "Quiero pagar" at the express offer,
23
26
  // which charges on its YES, was a YES because 'pagar' is that choice's own word.
@@ -76,6 +79,10 @@ const THANKS = ['thanks', 'thank you', 'thank you so much', 'thanks a lot', 'gra
76
79
  const ACKNOWLEDGEMENTS = ['ok', 'okay', 'okey', 'está bien', 'esta bien', 'bueno', 'fine', "that's fine", 'alright', 'all right',
77
80
  'perfect', 'perfecto', 'sounds good', 'great', 'excelente', 'muy bien'].map(normalize).map((w) => w.split(' '));
78
81
  const CONFIRM_FILLER = CONFIRM_WORDS.map(normalize).map((w) => w.split(' '));
82
+ // At a soft question (a yes choice that does not charge or cancel), a word pointing at the offered thing may lead the YES:
83
+ // "ese está bien", "esa sí", "that one is fine". It is never a YES alone; a firm question stays strict.
84
+ const POINTERS = ['ese', 'esa', 'eso', 'esos', 'esas', 'ese es', 'esa es', 'that', 'this', 'that one', 'this one', 'that one is',
85
+ 'this one is', 'that is', 'this is'].map(normalize).map((w) => w.split(' '));
79
86
  // articles and possessives in front of an exact choice's own words ("Yes, the full balance", "Sí, el saldo completo")
80
87
  const ARTICLES = ['the', 'my', 'el', 'la', 'mi'].map((w) => [w]);
81
88
  const YES_SET = new Set(ANSWER_WORDS.yes.map(normalize));
@@ -415,7 +422,7 @@ export function pickChoice(answer, choices, acceptOther) {
415
422
  if (c.exact === true && /[?¿]/.test(raw)) {
416
423
  // not this choice
417
424
  }
418
- else if (strict.some(keyed) || onlyAffirmative(b, [...strict.filter((w) => !isKey(w)), ...(c.key === 'yes' && c.exact !== true ? THANKS : [])], true, c.exact === true ? (c.key === 'yes' ? ACKNOWLEDGEMENTS : [...ACKNOWLEDGEMENTS, ...CONFIRM_FILLER, ...ARTICLES]) : [])) {
425
+ else if (strict.some(keyed) || onlyAffirmative(b, [...strict.filter((w) => !isKey(w)), ...(c.key === 'yes' && c.exact !== true ? THANKS : [])], true, c.exact === true ? (c.key === 'yes' ? ACKNOWLEDGEMENTS : [...ACKNOWLEDGEMENTS, ...CONFIRM_FILLER, ...ARTICLES]) : (c.key === 'yes' ? POINTERS : []))) {
419
426
  found = c.key;
420
427
  break;
421
428
  }
@@ -1 +1 @@
1
- export const JSFE_RUNTIME_FINGERPRINT = "sha256:5dcc5703f78eb0d76716ae4ec5d702abefd508aac9a44b3cb67b62efc93e244d";
1
+ export const JSFE_RUNTIME_FINGERPRINT = "sha256:ec8330acadcdcdf499278ebaacbd0f4ab3810a67be977d710ce77d40a8978a68";
@@ -1,3 +1,10 @@
1
+ ## 1.10.6: pointing at the offered thing
2
+
3
+ At a soft question (a yes choice that does not charge or cancel), a word pointing at the offered thing may lead the YES:
4
+ "ese está bien", "esa sí", "that one is fine" (prod 2026-10-25 17:46: "Ese está bien." to "¿Se lo envío a …?" was not a
5
+ yes and the caller lost the flow). "ese mismo", "el mismo", "that's the one" are soft YES phrases. A pointing word alone is
6
+ never a YES, and a firm question stays strict.
7
+
1
8
  ## 1.10.5: a key named before it
2
9
 
3
10
  At a numbered choice, a word naming the key said right before it picks the key: "el número 4", "opción 2", "number 4", "the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsfe",
3
- "version": "1.10.5",
3
+ "version": "1.10.6",
4
4
  "description": "TypeScript workflow engine for conversational/automation apps: multi-flow orchestration, interrupt/resume, stack-based control, robust errors, and flexible tool/REST integration.",
5
5
  "license": "MIT",
6
6
  "author": "Ron Pinkas",