jsfe 1.67.0 → 1.68.0

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.
@@ -74,6 +74,8 @@ export function validateFlowContracts(flows: any, tools?: any[], { externalFlows
74
74
  question_es: string;
75
75
  retry: string;
76
76
  retry_es: string;
77
+ retry_text: string;
78
+ retry_text_es: string;
77
79
  };
78
80
  zip: {
79
81
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/forms/contracts.js"],"names":[],"mappings":"AAgBA;;;IAGC;AACD;;;;;EAGC;AACD,qGAAqG;AACrG;;QAwCC;AAqBD;;;QAEC;AAgBD;;;;;;;;;QASC;AACD;;;;QAGC;AACD;;;;;;;;QA8BC;AAED,mHAAmH;AACnH,kDAgBC;AAED,+GAA+G;AAC/G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4EC"}
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/forms/contracts.js"],"names":[],"mappings":"AAgBA;;;IAGC;AACD;;;;;EAGC;AACD,qGAAqG;AACrG;;QAwCC;AAqBD;;;QAEC;AAgBD;;;;;;;;;QASC;AACD;;;;QAGC;AACD;;;;;;;;QA8BC;AAED,mHAAmH;AACnH,kDAgBC;AAED,+GAA+G;AAC/G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4EC"}
@@ -131,6 +131,10 @@ export namespace FIELD_PRESETS {
131
131
  export { retry_1 as retry };
132
132
  let retry_es_1: string;
133
133
  export { retry_es_1 as retry_es };
134
+ let retry_text_1: string;
135
+ export { retry_text_1 as retry_text };
136
+ let retry_text_es_1: string;
137
+ export { retry_text_es_1 as retry_text_es };
134
138
  }
135
139
  namespace zip {
136
140
  let label_2: string;
@@ -162,10 +166,10 @@ export namespace FIELD_PRESETS {
162
166
  export { retry_2 as retry };
163
167
  let retry_es_2: string;
164
168
  export { retry_es_2 as retry_es };
165
- let retry_text_1: string;
166
- export { retry_text_1 as retry_text };
167
- let retry_text_es_1: string;
168
- export { retry_text_es_1 as retry_text_es };
169
+ let retry_text_2: string;
170
+ export { retry_text_2 as retry_text };
171
+ let retry_text_es_2: string;
172
+ export { retry_text_es_2 as retry_text_es };
169
173
  }
170
174
  namespace account_number {
171
175
  let label_3: string;
@@ -193,10 +197,10 @@ export namespace FIELD_PRESETS {
193
197
  export { retry_3 as retry };
194
198
  let retry_es_3: string;
195
199
  export { retry_es_3 as retry_es };
196
- let retry_text_2: string;
197
- export { retry_text_2 as retry_text };
198
- let retry_text_es_2: string;
199
- export { retry_text_es_2 as retry_text_es };
200
+ let retry_text_3: string;
201
+ export { retry_text_3 as retry_text };
202
+ let retry_text_es_3: string;
203
+ export { retry_text_es_3 as retry_text_es };
200
204
  }
201
205
  namespace ssn_last4 {
202
206
  let label_4: string;
@@ -330,10 +334,10 @@ export namespace FIELD_PRESETS {
330
334
  export { retry_4 as retry };
331
335
  let retry_es_4: string;
332
336
  export { retry_es_4 as retry_es };
333
- let retry_text_3: string;
334
- export { retry_text_3 as retry_text };
335
- let retry_text_es_3: string;
336
- export { retry_text_es_3 as retry_text_es };
337
+ let retry_text_4: string;
338
+ export { retry_text_4 as retry_text };
339
+ let retry_text_es_4: string;
340
+ export { retry_text_es_4 as retry_text_es };
337
341
  }
338
342
  namespace card_expiration {
339
343
  let label_10: string;
@@ -364,10 +368,10 @@ export namespace FIELD_PRESETS {
364
368
  export { retry_5 as retry };
365
369
  let retry_es_5: string;
366
370
  export { retry_es_5 as retry_es };
367
- let retry_text_4: string;
368
- export { retry_text_4 as retry_text };
369
- let retry_text_es_4: string;
370
- export { retry_text_es_4 as retry_text_es };
371
+ let retry_text_5: string;
372
+ export { retry_text_5 as retry_text };
373
+ let retry_text_es_5: string;
374
+ export { retry_text_es_5 as retry_text_es };
371
375
  }
372
376
  namespace card_cvv {
373
377
  let label_11: string;
@@ -1 +1 @@
1
- {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/forms/flows.js"],"names":[],"mappings":"AA4GA;;;;;;;GAOG;AACH;;;;GAIG;AACH,8HAA8H;AAC9H,uFAIC;AAsGD;;2EAE2E;AAC3E,qEAEC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EC;AACD;;;GAGG;AACH;;;;;;EAGC;AAslBD,wHAAwH;AACxH,wEAaC;AACD,4FAA4F;AAC5F;;;EAYC;AACD,sGAAsG;AACtG;;;EAOC;AA94BM,6CAAuG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkI9G,4CAEqI;AAi+BrI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAOG"}
1
+ {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/forms/flows.js"],"names":[],"mappings":"AA6GA;;;;;;;GAOG;AACH;;;;GAIG;AACH,8HAA8H;AAC9H,uFAIC;AAsGD;;2EAE2E;AAC3E,qEAEC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EC;AACD;;;GAGG;AACH;;;;;;EAGC;AAslBD,wHAAwH;AACxH,wEAaC;AACD,4FAA4F;AAC5F;;;EAYC;AACD,sGAAsG;AACtG;;;EAOC;AA/4BM,6CAAuG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmI9G,4CAEqI;AAq+BrI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAOG"}
@@ -56,7 +56,8 @@ export const FIELD_PRESETS = {
56
56
  retry_text: 'Please type your 10-digit phone number.', retry_text_es: 'Por favor escriba su número de teléfono de 10 dígitos.' },
57
57
  email: { label: 'email address', label_es: 'correo electrónico', profile: { kind: 'email' },
58
58
  question: 'What is your email address?', question_es: '¿Cuál es su correo electrónico?',
59
- retry: 'Please say your email address, for example juan at gmail dot com.', retry_es: 'Por favor diga su correo electrónico, por ejemplo juan arroba gmail punto com.' },
59
+ retry: 'Please say your email address, for example juan at gmail dot com.', retry_es: 'Por favor diga su correo electrónico, por ejemplo juan arroba gmail punto com.',
60
+ retry_text: 'Please type your email address, for example juan@gmail.com.', retry_text_es: 'Por favor escriba su correo electrónico, por ejemplo juan@gmail.com.' },
60
61
  zip: { label: 'ZIP code', label_es: 'código postal', profile: { kind: 'digits', min: 5, max: 5, refuse_amount_shape: true }, digits: { min: 5, max: 5 },
61
62
  question: 'What is your ZIP code?', question_es: '¿Cuál es su código postal?',
62
63
  retry: 'Please say or enter your 5-digit ZIP code.', retry_es: 'Por favor diga o ingrese su código postal de 5 dígitos.',
@@ -1061,12 +1062,16 @@ provideData.steps.splice(provideData.steps.findIndex((s) => s.id === 'pd_menu_q'
1061
1062
  // which re-read the summary): say so, offer the action the catalog names (provides.menu.unanswered), and otherwise return to the menu.
1062
1063
  const providerUnanswered = {
1063
1064
  id: 'provider-unanswered', name: 'ProviderUnanswered', version: '1.0.0', scope: 'isolated',
1064
- description: "Worker: a question the provider has no fact for, sent back to it from its own menu: says provides.menu.unanswered.question(_es) and offers that menu's choice unanswered.choice. YES runs it, NO returns to the menu, anything else is DISPATCHed. Param: provides.",
1065
+ description: "Worker: a question the provider has no fact for, sent back to it from its own menu: says provides.menu.unanswered.question(_es), followed by yesNoKeys (1 YES, 2 NO on a call; do not word the keys in the question), and offers that menu's choice unanswered.choice. YES runs it, NO returns to the menu, anything else is DISPATCHed. Param: provides.",
1065
1066
  parameters: [{ name: 'provides', type: 'object', description: 'The provider catalog' }],
1066
- variables: vars({ pu_choice: null, pu_yes: false, pu_no: false, pu_flow: '' }),
1067
+ variables: vars({ pu_choice: null, pu_yes: false, pu_no: false, pu_flow: '', pu_q: '', pu_q_es: '' }),
1067
1068
  steps: [
1068
1069
  SET('pu_find', 'pu_choice', "(provides.menu.choices || []).filter(function (c) { return c.key === provides.menu.unanswered.choice; })[0] || null"),
1069
- FLOW('pu_ask', 'ask-choice', 'call', { question: '{{provides.menu.unanswered.question}}', question_es: '{{provides.menu.unanswered.question_es}}', choices: [{ key: 'yes', phrases: ['1'] }, { key: 'no', phrases: ['2', 'no', 'no thanks', 'no thank you', 'not now', 'no gracias', 'ahora no'] }], accept_other: true, digits: { min: 1, max: 1 } }),
1070
+ // the offer is a yes/no question: it names 1 for YES and 2 for NO on a call (owner 2026-11-14), built here because a FLOW
1071
+ // call's parameters interpolate values, not expressions
1072
+ SET('pu_question', 'pu_q', "String(provides.menu.unanswered.question || '') + ' ' + yesNoKeys('en', cargo)"),
1073
+ SET('pu_question_es', 'pu_q_es', "String(provides.menu.unanswered.question_es || provides.menu.unanswered.question || '') + ' ' + yesNoKeys('es', cargo)"),
1074
+ FLOW('pu_ask', 'ask-choice', 'call', { question: '{{pu_q}}', question_es: '{{pu_q_es}}', choices: [{ key: 'yes', phrases: ['1'] }, { key: 'no', phrases: ['2', 'no', 'no thanks', 'no thank you', 'not now', 'no gracias', 'ahora no'] }], accept_other: true, digits: { min: 1, max: 1 } }),
1070
1075
  SET('pu_read_yes', 'pu_yes', "String(cargo.choice) === 'yes' || isAnswer(cargo.choiceText, 'yes')"),
1071
1076
  SET('pu_read_no', 'pu_no', "!pu_yes && String(cargo.choice) === 'no'"),
1072
1077
  SET('pu_take', 'pu_flow', "pu_yes && pu_choice ? (function (c) { if (c.set) { Object.keys(c.set).forEach(function (k) { cargo[k] = c.set[k]; }); } else { /* nothing to set */ } return c.flow; })(pu_choice) : ''"),
@@ -1 +1 @@
1
- export const JSFE_RUNTIME_FINGERPRINT = "sha256:267852e88b0ab72bdfda8f66649137a7fb314debc407a5f99ede1bd5feddabd2";
1
+ export const JSFE_RUNTIME_FINGERPRINT = "sha256:6a6a323da263b0e7dbb8eb9bf8b51b8a19160003946be01e38e9a11ba34128ef";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsfe",
3
- "version": "1.67.0",
3
+ "version": "1.68.0",
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",