jsfe 1.101.4 → 1.101.5

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":"identity-flows.d.ts","sourceRoot":"","sources":["../../src/forms/identity-flows.js"],"names":[],"mappings":"AAkDA,+GAA+G;AAC/G,oFAOC;AAQD,wFAAwF;AACxF,iDAGC;AACD,0CAWC;AACD,qHAQC;AASD,qHAAqH;AACrH,6FAKC;AACD,4EAYC;AAED;;kGAEkG;AAClG,0FASC;AAED;kIACkI;AAClI;;;;SAUC;AAiID,2DAOC;AACD,4DAOC;AACD,gHAAgH;AAChH,8DAGC;AAkKD,8EAGC;AAgCD,4FAA4F;AAC5F;;;;EAOC;AAYD,oGAOC;AAlRD,iCAAgC,wIAAwI,CAAC;AACzK,wCAAuC,CAAC,CAAC;AAqSzC,0BAAsK"}
1
+ {"version":3,"file":"identity-flows.d.ts","sourceRoot":"","sources":["../../src/forms/identity-flows.js"],"names":[],"mappings":"AAkDA,+GAA+G;AAC/G,oFAOC;AAQD,wFAAwF;AACxF,iDAGC;AACD,0CAYC;AACD,qHAQC;AASD,qHAAqH;AACrH,6FAKC;AACD,4EAYC;AAED;;kGAEkG;AAClG,0FASC;AAED;kIACkI;AAClI;;;;SAUC;AAiID,2DAOC;AACD,4DAOC;AACD,gHAAgH;AAChH,8DAGC;AAkKD,8EAGC;AAgCD,4FAA4F;AAC5F;;;;EAOC;AAYD,oGAOC;AAlRD,iCAAgC,wIAAwI,CAAC;AACzK,wCAAuC,CAAC,CAAC;AAqSzC,0BAAsK"}
@@ -81,15 +81,16 @@ export function serviceDigits(text) {
81
81
  export function otpDigits(text) {
82
82
  // The code is ONE complete six-digit number, or the caller's restart of it ("57. 57, 21, 80.", or said twice), read by the
83
83
  // number finder (owner 2026-11-19). The OTP form reads the result three ways: six characters verify; any other non-empty
84
- // result says "I was expecting a 6-digit code" and counts a format miss (ended at 3); '' is an answer without digits. So any
85
- // other answer returns the digits it holds, as before, except pieces separated by words that glue to six: they are never a
86
- // code ("572 and then 180" is "572180?", a format miss). Runs inside a flow expression, so findNumbers/assignNumbers are the
87
- // standard functions.
84
+ // result says "I was expecting a 6-digit code" and counts a format miss (ended at 3); '' is no code given, read by the reply
85
+ // ranker. Fewer than four digits in the whole answer are no attempt at a code ("No tengo los 6 dígitos", "un pago de 62
86
+ // centavos"; owner 2026-12-02). Any other answer returns the digits it holds, except pieces separated by words that glue to
87
+ // six: they are never a code ("572 and then 180" is "572180?", a format miss). Runs inside a flow expression, so
88
+ // findNumbers/assignNumbers are the standard functions.
88
89
  const numbers = findNumbers(String(text || '')), read = assignNumbers(numbers, [{ name: 'code', kind: 'digits', min: 6 }]);
89
90
  if (read.values.code)
90
91
  return read.values.code;
91
92
  const digits = numbers.map(n => n.value).join('');
92
- return digits.length === 6 ? digits + '?' : digits;
93
+ return digits.length < 4 ? '' : digits.length === 6 ? digits + '?' : digits;
93
94
  }
94
95
  export function contactPrompt(cargo, options, callerAllowed, partial = false, es = false) {
95
96
  if (partial)
@@ -376,7 +377,7 @@ function otpPhoneUnavailable(value) {
376
377
  // What the reply ranker may take at the code question beside the code: the step's offers. Email and another account are
377
378
  // offered only where the step offers them (a code sent by text; a caller-ID preselection).
378
379
  const OTP_REPLY_CHOICES = [{ key: 'email', label: 'use the email on the account instead of the phone' }, { key: 'another_account', label: 'use another account' }, { key: 'no_other_account', label: 'says they have no other account, this is their only one' },
379
- { key: 'where', label: 'asks where the code was sent' }, { key: 'cannot_find', label: 'cannot find the code, or it is not there' }, { key: 'another_way', label: 'asks for another way to get the code or to verify' }, { key: 'resend', label: 'the code did not arrive; send it again' }, { key: 'has_code', label: 'has the code now or is getting it (here it is, one moment, let me look)' }, { key: 'no_phone', label: 'no longer has that phone or number' }, { key: '__agent', label: 'speak with a person (a live agent)' }];
380
+ { key: 'where', label: 'asks where the code was sent' }, { key: 'cannot_find', label: 'looked for the code and cannot find or see it' }, { key: 'another_way', label: 'asks for another way to get the code or to verify' }, { key: 'resend', label: 'says they have not received the code, or asks for it to be sent again' }, { key: 'has_code', label: 'has the code now or is getting it (here it is, one moment, let me look)' }, { key: 'no_phone', label: 'no longer has that phone or number' }, { key: '__agent', label: 'speak with a person (a live agent)' }];
380
381
  const validateCode = worker('validate-otp-code', 'ValidateOtpCode', 'Validate a challenge response with explicit bounded retries, alternate-contact handling and tenant callbacks.', { loopBound: '3 mismatches, 3 format misses, 2 resends, 3 sends per contact', variables: vars({ otp_phrases: OTP_WORDS, email_too: false, no_code_given: false, wants_other_account: false, other_account_given: false, otp_validation_result: false, whatsapp_invite_sent: false, invite_text: '', otp_cancel: 'contact-support', answer_key: '', answer_value: '', otp_reply_choices: OTP_REPLY_CHOICES, otp_offers: [], otp_reply: {}, otp_where: '', otp_where_es: '' }), contract: { role: 'gate', summary: 'Validate the active one-time challenge', tools: ['validate-otp', 'send-whatsapp-invite'], result: { path: 'cargo.otpVerified', type: 'boolean' } }, steps: [
381
382
  set('otp_cancel', 'otp_cancel', "cargo.authCancelFlow || 'contact-support'"),
382
383
  set('otp_email_too_ready', 'email_too', "!!(cargo.otp_cell_number && cargo.otpAltSent !== true && cargo.otpAltSent !== 'failed' && validateEmail(String(cargo.otpAltEmail || '')))"),
@@ -1 +1 @@
1
- export const JSFE_RUNTIME_FINGERPRINT = "sha256:2ec71cd855b17a8742d4a9dd378d52ebf3522f96cbcf1ab9230c7778b3a1dfff";
1
+ export const JSFE_RUNTIME_FINGERPRINT = "sha256:9a448c75606040e83a5e77050944a8ee30e01f4db45addc43496930b3537b5b7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsfe",
3
- "version": "1.101.4",
3
+ "version": "1.101.5",
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",