jsfe 1.73.0 → 1.73.1

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":"AAkBA;;;;GAIG;AACH,sEAQC;AA2FD;;;GAGG;AACH,sFA8HC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;mHACmH;AAEnH,iEAEC;AAGD,gGAKC;AAYD,kDAGC;AAED;;;;;;;;;;;;;;;;;;;;;;EAeC;AACD;;;;;;;;;;;;;;;;;;;;;;;EA+WC"}
1
+ {"version":3,"file":"match-inputs.d.ts","sourceRoot":"","sources":["../../src/helpers/match-inputs.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,sEAQC;AA2FD;;;GAGG;AACH,sFA8HC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;mHACmH;AAEnH,iEAEC;AAGD,gGAOC;AAYD,kDAGC;AAED;;;;;;;;;;;;;;;;;;;;;;EAeC;AACD;;;;;;;;;;;;;;;;;;;;;;;EAgXC"}
@@ -316,7 +316,9 @@ export function confirmOutOfOrderLine(spec, value, language, voice) {
316
316
  const es = language === 'es';
317
317
  const line = String((es && spec?.message_es) || spec?.message || '');
318
318
  const word = String((es && spec?.word_es) || spec?.word || '');
319
- return line.replace('{value}', String(value ?? '').split('').join(voice ? ' ' : '')).replace('{word}', word);
319
+ const own = line.replace('{value}', String(value ?? '').split('').join(voice ? ' ' : '')).replace('{word}', word);
320
+ // The same number may name several fields ("1234": an expiration or a security code): each one's line is said (owner 2026-11-17).
321
+ return [own, ...(Array.isArray(spec?.also) ? spec.also.map((other) => confirmOutOfOrderLine({ ...other, also: undefined }, other.value, language, voice)) : [])].filter(Boolean).join(' ');
320
322
  }
321
323
  // A declinable input's "there is none" (docs/copilot-reference.md: declinable): the whole answer says the caller has no
322
324
  // value for the field asked, in English or Spanish. An answer with a digit is never one ("no, 4B" names a unit), and
@@ -746,6 +748,8 @@ export function matchInputs(answer, candidates, current, choiceKey) {
746
748
  return { hits: [], ambiguous, refused: [...stopped, ...hits.map((hit) => ({ form: hit.form, name: hit.name, value: hit.value, rule: 'unaccounted_words', spans: hit.spans }))], ...(decisions.length ? { decisions } : {}) };
747
749
  }
748
750
  else {
751
+ if (clarify.length > 1)
752
+ clarify[0] = { ...clarify[0], also: clarify.slice(1).filter((other, i, all) => other.name !== clarify[0].name && all.findIndex((x) => x.name === other.name) === i) };
749
753
  return { hits, ambiguous, ...(remaining.length ? { remaining } : {}), ...(stopped.length ? { refused: stopped } : {}), ...(decisions.length ? { decisions } : {}), ...(clarify.length ? { clarify } : {}) };
750
754
  }
751
755
  }
@@ -1 +1 @@
1
- export const JSFE_RUNTIME_FINGERPRINT = "sha256:26e0ba327e4b1f150bbfa517da37e6b2f413273c6b9248f580754788df714eb4";
1
+ export const JSFE_RUNTIME_FINGERPRINT = "sha256:c37f3445983520cedce59059397e5fd9bb2ce0548c7eb2b65500405f7b77f35d";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsfe",
3
- "version": "1.73.0",
3
+ "version": "1.73.1",
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",