jsfe 1.101.2 → 1.101.4

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":"flows.d.ts","sourceRoot":"","sources":["../../src/forms/flows.js"],"names":[],"mappings":"AAqIA;;;;;;;GAOG;AACH;;;;GAIG;AACH,8HAA8H;AAC9H,uFAIC;AAsGD;;2EAE2E;AAC3E,qEAEC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EC;AACD;;;GAGG;AACH;;;;;;EAGC;AAioBD,wHAAwH;AACxH,wEAaC;AACD,4FAA4F;AAC5F;;;EAYC;AACD,sGAAsG;AACtG;;;EAOC;AAl9BM,6CAAuG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2J9G,4CAEqI;AAkhCrI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAOG"}
1
+ {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/forms/flows.js"],"names":[],"mappings":"AAqIA;;;;;;;GAOG;AACH;;;;GAIG;AACH,8HAA8H;AAC9H,uFAIC;AAsGD;;2EAE2E;AAC3E,qEAEC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EC;AACD;;;GAGG;AACH;;;;;;EAGC;AAsoBD,wHAAwH;AACxH,wEAaC;AACD,4FAA4F;AAC5F;;;EAYC;AACD,sGAAsG;AACtG;;;EAOC;AAv9BM,6CAAuG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2J9G,4CAEqI;AAuhCrI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAOG"}
@@ -492,6 +492,11 @@ const collectInput = {
492
492
  // only what comes after the provider; an ending alone on the next turn completes it, any other reply drops it
493
493
  // (owner 2026-11-18, prod 11-18 17:30). An unknown domain is never guessed: the address is asked again.
494
494
  SET('ci_email_join', 'ci_partial', "ci_partial ? ci_partial : (function () { var state = cargo.forms[form]; var email = !!ci_spec && (ci_spec.profile && ci_spec.profile.kind === 'email' || (ci_spec.any_of || []).some(function (i) { return i.profile && i.profile.kind === 'email'; })); if (!email) return ''; var data = state.data = state.data || {}; var key = '__email_' + current; var said = String(cargo.choiceText || '').trim(); var held = String(data[key] || ''); delete data[key]; var end = held ? emailEnding(said) : ''; if (end) { cargo.choiceText = held + end; cargo.choice = held + end; return 'joined'; } var part = emailWithoutEnding(said); if (!part) return ''; data[key] = part; var fb = state.feedback || {}; fb[current] = 'email_ending'; state.feedback = fb; return 'hold'; })()"),
495
+ // A house number said alone at a street question (an input declared spoken_digits 'house_number'): it is kept and the
496
+ // caller is asked only the street name; a name on the next turn (it starts with a letter) completes the line, any other
497
+ // reply drops it and is read as usual (owner 2026-12-01; prod 2026-12-01 CAd21f1af, "15 1 5 0." at the street was read
498
+ // as a ZIP code said out of order and replaced the accepted one). A form card's submission never reaches this.
499
+ SET('ci_house_join', 'ci_partial', "ci_partial ? ci_partial : (function () { var state = cargo.forms[form]; if (!ci_spec || !ci_spec.profile || ci_spec.profile.spoken_digits !== 'house_number') return ''; var data = state.data = state.data || {}; var key = '__house_' + current; var said = String(cargo.choiceText || '').trim(); var held = String(data[key] || ''); delete data[key]; if (held) { if (!/^\\p{L}/u.test(said) || /^JSFE_FORM_/.test(said)) return ''; cargo.choiceText = held + ' ' + said; cargo.choice = held + ' ' + said; return 'joined'; } var digits = numberAlone(said); if (!/^[1-9]\\d{0,5}$/.test(digits)) return ''; data[key] = digits; var fb = state.feedback || {}; fb[current] = 'street_name'; state.feedback = fb; return 'hold'; })()"),
495
500
  WHEN('ci_partial_hold', "ci_partial === 'hold'", END('ci_partial_wait')),
496
501
  // A whole NO at a question that does not read it, in a form (or a sub-form of one) that declares `on_no`: that
497
502
  // form's worker answers it (a payment starts its selection again), instead of any field or the reply ranker; the
@@ -1 +1 @@
1
- {"version":3,"file":"form-client.d.ts","sourceRoot":"","sources":["../../src/forms/form-client.js"],"names":[],"mappings":"AAiCA,iGAAiG;AACjG;;;;;SA4HC;AAMD;;;;;;;;GAQG;AACH;;;;;;;;SAoBC;AAED;;;;yGAIyG;AACzG,oDAyBC;AACD,+GAA+G;AAC/G;wHACwH;AACxH,qEAWC;AAED;;;;SA4CC;AAED;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDC;AA9UD,qCAAsC,eAAe,CAAC"}
1
+ {"version":3,"file":"form-client.d.ts","sourceRoot":"","sources":["../../src/forms/form-client.js"],"names":[],"mappings":"AAiCA,iGAAiG;AACjG;;;;;SA4HC;AAMD;;;;;;;;GAQG;AACH;;;;;;;;SAoBC;AAED;;;;yGAIyG;AACzG,oDAyBC;AACD,+GAA+G;AAC/G;wHACwH;AACxH,qEAWC;AAED;;;;SA4CC;AAED;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDC;AAlVD,qCAAsC,eAAe,CAAC"}
@@ -402,11 +402,15 @@ export function formSubmissionReaders(submission, getSession) {
402
402
  },
403
403
  enrichFormMatches(matches, chain, form, names = [], asked = '') {
404
404
  const result = enrichFormMatches(matches, chain, form, names, asked);
405
+ // A card that answers the asked field answers the rest in order too, as if each had been asked in turn: none is
406
+ // acknowledged. Without it the others are out of order, and a changed value is a correction: both acknowledged.
407
+ const inOrder = result.hits.some(hit => hit.origin === 'form_submission' && hit.current && !hit.invalid);
408
+ const held = hit => Object.hasOwn(getSession().cargo.forms[hit.form]?.values || {}, hit.name);
405
409
  result.hits = result.hits.map(hit => {
406
410
  if (hit.origin !== 'form_submission')
407
411
  return hit;
408
412
  // Use the original prompt match for acknowledgment before bypassing conversational extraction.
409
- return { ...hit, silent: hit.silent || hit.current, current: false, out_of_order_number: false };
413
+ return { ...hit, silent: hit.silent || hit.current || inOrder && !held(hit), current: false, out_of_order_number: false };
410
414
  });
411
415
  return result;
412
416
  }
@@ -1 +1 @@
1
- {"version":3,"file":"form-conversation.d.ts","sourceRoot":"","sources":["../../src/helpers/form-conversation.js"],"names":[],"mappings":"AAMA,0EAGC;AACD;;;;;GAKG;AACH,0FAKC;AACD;;;;;;GAMG;AACH,2EAOC;AACD,uJAAuJ;AACvJ,2EAUC;AACD;6GAC6G;AAC7G,2EAGC;AAYD,kHAAkH;AAClH,oDAGC;AACD,oEAGC;AACD;;qGAEqG;AACrG,2EAWC;AAKD;;0GAE0G;AAC1G,gFAIC;AACD;;;;;GAKG;AACH;;;SAQC;AACD;+CAC+C;AAC/C,sEAGC;AACD;;;GAGG;AACH,+GAcC;AAMD,oEAOC;AACD,8EAKC;AAED,yGAAyG;AACzG;;;;;;;;;;;;;;;;;;;;EAUC;AAED,sGAAsG;AACtG;;;;;;;;;;;;;;;;;;;;EAeC;AAED;2HAC2H;AAC3H,8EAOC"}
1
+ {"version":3,"file":"form-conversation.d.ts","sourceRoot":"","sources":["../../src/helpers/form-conversation.js"],"names":[],"mappings":"AAMA,0EAGC;AACD;;;;;GAKG;AACH,0FAKC;AACD;;;;;;GAMG;AACH,2EAOC;AACD,uJAAuJ;AACvJ,2EAUC;AACD;6GAC6G;AAC7G,2EAGC;AAYD,kHAAkH;AAClH,oDAGC;AACD,oEAGC;AACD;;qGAEqG;AACrG,2EAWC;AAKD;;0GAE0G;AAC1G,gFAIC;AACD;;;;;GAKG;AACH;;;SAQC;AACD;+CAC+C;AAC/C,sEAGC;AACD;;;GAGG;AACH,+GAeC;AAMD,oEAOC;AACD,8EAKC;AAED,yGAAyG;AACzG;;;;;;;;;;;;;;;;;;;;EAUC;AAED,sGAAsG;AACtG;;;;;;;;;;;;;;;;;;;;EAeC;AAED;2HAC2H;AAC3H,8EAOC"}
@@ -174,6 +174,8 @@ export function formInputPrompt(cargo, id, input, spec, data = {}, language = 'e
174
174
  const retry = written('retry') || (es ? spec.retry_es : spec.retry);
175
175
  if (feedback === 'partial')
176
176
  return es ? 'Continúe.' : 'Go on.';
177
+ if (feedback === 'street_name')
178
+ return es ? '¿Cuál es el nombre de la calle?' : 'What is the street name?';
177
179
  if (feedback === 'email_ending') {
178
180
  const provider = String(cargo.forms?.[id]?.data?.['__email_' + input] || '').split('@')[1] || '';
179
181
  return es ? `¿Qué sigue después de ${provider}? Por ejemplo, punto com.` : `What comes after ${provider}? For example, dot com.`;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;EAkaC"}
1
+ {"version":3,"file":"match-inputs.d.ts","sourceRoot":"","sources":["../../src/helpers/match-inputs.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,sEAQC;AA4ED;;;GAGG;AACH,sFA4IC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;mHACmH;AAEnH,iEAEC;AAID,gGAQC;AAYD,kDAGC;AAED;;;;;;;GAOG;AACH;;;;SAcC;AACD;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;;;;EAaC;AACD;;;;;;;;;;;;;;;;;;;;;;EAeC;AAyDD;;;;;;;;;;;;;;;;;;;;;;;EAkaC"}
@@ -258,6 +258,12 @@ export function readInputProfile(profile, answer, isCurrent = true) {
258
258
  const start = m.index + m[0].indexOf(v);
259
259
  return { value: v, spans: [[said.at(start), said.at(start + v.length - 1) + 1]], evidence: [`p:${String(v).toLowerCase()}`] };
260
260
  }
261
+ else if (isCurrent && profile.spoken_digits === 'house_number' && /^\d{1,6}\s+\p{L}/u.test(said.text)) {
262
+ // At its own question a house number then a word is this street line, with or without a street type ("15150
263
+ // Magnolia"), never a ZIP code said out of order (owner 2026-12-01; prod 2026-12-01 CAd21f1af). Out of order the
264
+ // pattern alone reads a street.
265
+ return { value: said.text.trim(), spans: [[core.start, core.start + core.text.length]], evidence: ['house_number_line'] };
266
+ }
261
267
  else {
262
268
  // accept_other keeps the answer as given, as before
263
269
  return isCurrent && profile.accept_other === true && raw.trim() ? { value: spoken(raw).text.trim(), fallback: true, spans: [[0, raw.length]] } : null;
@@ -1 +1 @@
1
- export const JSFE_RUNTIME_FINGERPRINT = "sha256:f75ba76e1fbf1bcb531d20739b588611200fc512ef6e6133820414d897f02ecc";
1
+ export const JSFE_RUNTIME_FINGERPRINT = "sha256:2ec71cd855b17a8742d4a9dd378d52ebf3522f96cbcf1ab9230c7778b3a1dfff";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsfe",
3
- "version": "1.101.2",
3
+ "version": "1.101.4",
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",