jsfe 1.73.0 → 1.73.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.
|
@@ -279,7 +279,7 @@ export const FLOWS = [
|
|
|
279
279
|
"id": "ac_late_code_check",
|
|
280
280
|
"type": "SET",
|
|
281
281
|
"variable": "ac_late",
|
|
282
|
-
"value": "(function(t, c) { if (typeof form_context !== 'undefined' && form_context && form_context.form) { var fc=form_context, chain=formInputChain(cargo.forms,fc.form,cargo), read=readFormAnswer(t,chain,Array.isArray(fc.names)&&fc.names.length>1?{form:fc.form,names:fc.names}:{form:fc.form,name:fc.current},'',fc.questions||[]); if(read.hits.length || read.ambiguous.length || read.questions.length) return false; } t = String(t || '').trim(); c = String(c || ''); if (c.length !== 6) { return false; } var rest = t.replace(/^(?:(?:el|mi|the|my)\\s+)?(?:c[oó]digo|code)(?:\\s+(?:es|is|era|was))?\\s*[:,.-]?\\s*/i, ''); if (!/^[\\d\\s.,-]+$/.test(rest)) { return false; } var d = rest.replace(/\\D/g, ''); return d.length >= 2 && d.length <= 6 && c.indexOf(d) >= 0; })(ac_answer, ac_code)"
|
|
282
|
+
"value": "(function(t, c) { if (typeof form_context !== 'undefined' && form_context && form_context.form) { var fc=form_context, chain=formInputChain(cargo.forms,fc.form,cargo), read=readFormAnswer(t,chain,Array.isArray(fc.names)&&fc.names.length>1?{form:fc.form,names:fc.names}:{form:fc.form,name:fc.current},'',fc.questions||[]); if(read.hits.length || read.ambiguous.length || read.questions.length || (read.clarify || []).length) return false; } t = String(t || '').trim(); c = String(c || ''); if (c.length !== 6) { return false; } var rest = t.replace(/^(?:(?:el|mi|the|my)\\s+)?(?:c[oó]digo|code)(?:\\s+(?:es|is|era|was))?\\s*[:,.-]?\\s*/i, ''); if (!/^[\\d\\s.,-]+$/.test(rest)) { return false; } var d = rest.replace(/\\D/g, ''); return d.length >= 2 && d.length <= 6 && c.indexOf(d) >= 0; })(ac_answer, ac_code)"
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
"id": "ac_late_code_reask",
|
|
@@ -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,
|
|
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
|
-
|
|
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
|
}
|
package/dist/runtime-identity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const JSFE_RUNTIME_FINGERPRINT = "sha256:
|
|
1
|
+
export const JSFE_RUNTIME_FINGERPRINT = "sha256:faf696fd29f9aaee98a5a99e98d46a4bee54801c493389a3c2f25c793b258d4a";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsfe",
|
|
3
|
-
"version": "1.73.
|
|
3
|
+
"version": "1.73.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",
|