jsfe 1.93.0 → 1.93.2

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":"match-inputs.d.ts","sourceRoot":"","sources":["../../src/helpers/match-inputs.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,sEAQC;AA4ED;;;GAGG;AACH,sFAuIC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;mHACmH;AAEnH,iEAEC;AAID,gGAQC;AAYD,kDAGC;AAED;;;;;;;GAOG;AACH;;;;SAcC;AACD;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;;;;EAaC;AACD;;;;;;;;;;;;;;;;;;;;;;EAeC;AAyDD;;;;;;;;;;;;;;;;;;;;;;;EAiZC"}
1
+ {"version":3,"file":"match-inputs.d.ts","sourceRoot":"","sources":["../../src/helpers/match-inputs.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,sEAQC;AA4ED;;;GAGG;AACH,sFAuIC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;mHACmH;AAEnH,iEAEC;AAID,gGAQC;AAYD,kDAGC;AAED;;;;;;;GAOG;AACH;;;;SAcC;AACD;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;;;;EAaC;AACD;;;;;;;;;;;;;;;;;;;;;;EAeC;AAyDD;;;;;;;;;;;;;;;;;;;;;;;EAgaC"}
@@ -662,7 +662,7 @@ export function matchInputs(answer, candidates, current, choiceKey) {
662
662
  return false;
663
663
  }
664
664
  });
665
- const clarify = [];
665
+ const clarify = [], hintReading = new Map();
666
666
  readings = readings.filter((reading) => {
667
667
  const field = fieldOf(reading);
668
668
  // An amount asks its word only of a bare number (owner 2026-11-18): "109 con 47", "$150" or "150 dollars" is the amount.
@@ -672,8 +672,12 @@ export function matchInputs(answer, candidates, current, choiceKey) {
672
672
  else {
673
673
  refused.push({ form: reading.form, name: reading.name, value: reading.value, rule: 'confirm_out_of_order', spans: reading.spans });
674
674
  const taken = readings.some((other) => inOrder(other) && !other.fallback && (other.spans || []).some(([s, e]) => (reading.spans || []).some(([t, u]) => s < u && t < e)));
675
- if (!taken)
676
- clarify.push({ form: reading.form, name: reading.name, value: reading.value, ...field.confirm_out_of_order });
675
+ if (!taken) {
676
+ const hint = { form: reading.form, name: reading.name, value: reading.value, ...field.confirm_out_of_order };
677
+ hintReading.set(hint, reading);
678
+ clarify.push(hint);
679
+ }
680
+ else { /* the digits are another field's answer */ }
677
681
  return false;
678
682
  }
679
683
  });
@@ -735,6 +739,22 @@ export function matchInputs(answer, candidates, current, choiceKey) {
735
739
  return false;
736
740
  }
737
741
  });
742
+ // Rule 1 judges an out-of-order hint too (owner 2026-11-26): the hint is said only when its reading, with what is still read,
743
+ // would be the whole answer ("107", "107 por favor"). A number inside a sentence is no match, so it gives no hint and the
744
+ // reply ranker reads the sentence (prod 2026-11-25 CA5b1d: "Voy a pagar el monto vencido de 107 dólares." was told to add
745
+ // CÓDIGO DE SEGURIDAD). Judged after the filters above, which read the answer without the refused reading.
746
+ for (let i = clarify.length - 1; i >= 0; i--) {
747
+ const reading = hintReading.get(clarify[i]);
748
+ const withIt = reading ? [...readings, reading] : readings;
749
+ const alone = !!cur.name && !withIt.some(inOrder) && withIt.every((other) => spansMeet(other, withIt[0]));
750
+ const rest = unclaimedSpans(raw, withIt.filter((other) => !other.fallback && other.unlocated !== true)).map(([a, b]) => raw.slice(a, b)).join(' ');
751
+ if (!reading || !alone || reading.unlocated === true || fieldOf(reading).profile.kind === 'amount' || isReaderFiller(rest, fieldWords(reading))) {
752
+ // a whole answer (or no reading to judge): the hint stands
753
+ }
754
+ else {
755
+ clarify.splice(i, 1); // already refused as confirm_out_of_order above
756
+ }
757
+ }
738
758
  // The pieces of a pause join (owner 2026-11-15): the join can glue a number to the one after it ("Nuevecientos 44. 9 0 0 4 4." at
739
759
  // a ZIP is 4490044; its pieces are 44 and 90044). When nothing at all read or was refused for the answer's digits, a digits field
740
760
  // asked now takes the one piece of its length. Any other field's reading or refusal keeps its own handling.
@@ -1 +1 @@
1
- export const JSFE_RUNTIME_FINGERPRINT = "sha256:6e88e2bd77a0498fccf88a255a31e92e1e8a16848d8d04f2bd5e0dc498283e42";
1
+ export const JSFE_RUNTIME_FINGERPRINT = "sha256:d78fef08a3ebc1c93ccd60531df114c838bf6dc1a758bdbfa12ae4ff0bdef4c3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsfe",
3
- "version": "1.93.0",
3
+ "version": "1.93.2",
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",