jsfe 1.11.0 → 1.12.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.
- package/README.md +8 -4
- package/dist/forms/flows.d.ts.map +1 -1
- package/dist/forms/flows.js +62 -13
- package/dist/forms/identity-flows.js +4 -4
- package/dist/helpers/answer.d.ts +5 -0
- package/dist/helpers/answer.d.ts.map +1 -1
- package/dist/helpers/answer.js +21 -2
- package/dist/helpers/contextual-response.d.ts.map +1 -1
- package/dist/helpers/contextual-response.js +3 -1
- package/dist/helpers/index.d.ts +3 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -95
- package/dist/runtime-identity.js +1 -1
- package/docs/copilot-reference.md +2 -2
- package/docs/development-release.md +39 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -360,10 +360,14 @@ is the original single call.
|
|
|
360
360
|
**The reply ranker (contextual DISPATCH, `onResponse: "continue"`):** when a flow's question gets a reply its
|
|
361
361
|
deterministic reader cannot read, jsfe asks what the reply does with the step's `responseContext` (the question):
|
|
362
362
|
`answers`, `abort` or `new_request`. ONE aiCallback call whose 4th argument is `task: 'rank_reply'` with both
|
|
363
|
-
executors' instructions (`llm`, `systemOne`); the host replies `{ "option": … }
|
|
363
|
+
executors' instructions (`llm`, `systemOne`); the host replies `{ "option": … }`, plus `"fallback": true` when the
|
|
364
|
+
option is `answers` only because nothing cleared the cut (System One). `jsfe/host` exports
|
|
364
365
|
`buildReplyRank`, `decodeReplyRankLlm` and `decodeReplyRankSystemOne` (the highest option at or above 0.5, else
|
|
365
366
|
`answers`). `answers` continues the flow, after extracting the step's `responseParameters` with a stage-2 request
|
|
366
|
-
when it declares them
|
|
367
|
+
when it declares them. A confident `answers` (no `fallback`) is never lost: when the declaration is one parameter marked
|
|
368
|
+
`verbatim: true` (an open string whose words are the value, such as a reason) and extraction finds nothing or fails,
|
|
369
|
+
the field is the reply as said. Unmarked fields (a product, a city) always need a real extraction. After a
|
|
370
|
+
`fallback` answer extraction is the judge, and ReadFormResponse asks the question again when it finds nothing; `abort` is a RETURN: every flow ends and the reply is system message `cmd_request_aborted`
|
|
367
371
|
("The process has been cancelled at your request - how can I help you?"),
|
|
368
372
|
outcome `user_aborted`, no recovery stamp;
|
|
369
373
|
`new_request` ends the flows and routes the input through intent detection. Only a new request is routed: after
|
|
@@ -386,7 +390,7 @@ const engine = new WorkflowEngine(logger, aiCallback, flows, tools,
|
|
|
386
390
|
{ ...STANDARD_FUNCTIONS, sendSMSOTP, sendEmail /* the host's own, credentialed functions */ });
|
|
387
391
|
```
|
|
388
392
|
|
|
389
|
-
- Reading answers: `matchesChoice`, `pickChoice`, `isAnswer`, `isAgentRequest`, `isOtherRequest`,
|
|
393
|
+
- Reading answers: `matchesChoice`, `pickChoice`, `isAnswer`, `isAgentRequest`, `isExitRequest`, `isOtherRequest`,
|
|
390
394
|
`isSpelledFragment`, `isAmountAnswer`, `amountInAnswer`, `readEmail`, `readPhone`,
|
|
391
395
|
`readInternationalPhone`, `readIdentifier`, `normalizeAndFindCapture`, and `matchInputs` (which of a
|
|
392
396
|
form's inputs an answer fills; ties between inputs of the same form are returned for the flow to ask).
|
|
@@ -1155,7 +1159,7 @@ their original workflow seamlessly.
|
|
|
1155
1159
|
### Flow Execution Modes
|
|
1156
1160
|
- ✅ **Linear Flow Execution** - Sequential step processing
|
|
1157
1161
|
- ✅ **Sub-Flow Calls** - Nested workflow execution
|
|
1158
|
-
- ✅ **Flow Interruption** - Suspend current flow for new task
|
|
1162
|
+
- ✅ **Flow Interruption** - Suspend current flow for new task: in a flow with `interruptable: true`, each reply goes through the same intent detection as a new request (two-stage when configured); a detected primary starts on a new stack with its extracted arguments
|
|
1159
1163
|
- ✅ **Flow Resumption** - Return to previously suspended flows
|
|
1160
1164
|
- ✅ **Flow Replacement** - Replace current flow with new flow
|
|
1161
1165
|
- ✅ **Flow Reboot** - Nuclear option: clear all flows and restart (SAY output accumulated before the reboot is kept and delivered with the new flow's output; `discardSay: true` drops it)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/forms/flows.js"],"names":[],"mappings":"AA4HA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DC;AACD;;;GAGG;AACH;;;;;;EAGC;
|
|
1
|
+
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/forms/flows.js"],"names":[],"mappings":"AA4HA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DC;AACD;;;GAGG;AACH;;;;;;EAGC;AAgcD,wHAAwH;AACxH,wEAaC;AACD,4FAA4F;AAC5F;;;EAYC;AACD,sGAAsG;AACtG;;;EAOC;AA3nBM,6CAAuG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmzB9G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAOG"}
|
package/dist/forms/flows.js
CHANGED
|
@@ -241,7 +241,7 @@ const collectInput = {
|
|
|
241
241
|
id: 'collect-input', name: 'CollectInput', version: '1.0.0', scope: 'isolated',
|
|
242
242
|
description: "Worker: ask the form's current input once and file the answer wherever it belongs in the form chain (matchInputs, decided by scope; a declared confirm_against pair is asked). One reading → collect-input-accept; ambiguous → disambiguate-input; a question about the form's data → provide-data; a short miss → counted, the loop re-asks; 3+ words that fit nothing → DISPATCH. Params: form, current, questions, provides, exit_context(_es).",
|
|
243
243
|
parameters: ['form', 'current', 'questions', 'provides', 'exit_context', 'exit_context_es'].map((n) => ({ name: n, type: ['questions'].includes(n) ? 'array' : n === 'provides' ? 'object' : 'string', description: n })),
|
|
244
|
-
variables: vars({ ci_partial: '', ci_exhaustion: null, ci_d: {}, ci_pre: '', ci_val: '', ci_routed: '', ci_names: [], ci_chain: [], ci_spec: null, ci_choices: [], ci_q: '', ci_q_es: '', ci_missed: 0, ci_max: 3, ci_misses: 0, ci_miss_limit: 2, ci_must: false, ci_m: null, ci_qkey: '', ci_skip_gate: '', ci_words: 0, ci_digits: null, ci_amount: false, ci_as_spoken: false, ci_reader: {}, ci_pii: false, ci_ctx: '', ci_ctx_es: '' }),
|
|
244
|
+
variables: vars({ ci_partial: '', ci_reply_reader: '', ci_exhaustion: null, ci_d: {}, ci_pre: '', ci_val: '', ci_routed: '', ci_names: [], ci_chain: [], ci_spec: null, ci_choices: [], ci_q: '', ci_q_es: '', ci_missed: 0, ci_max: 3, ci_misses: 0, ci_miss_limit: 2, ci_must: false, ci_m: null, ci_qkey: '', ci_skip_gate: '', ci_words: 0, ci_digits: null, ci_amount: false, ci_as_spoken: false, ci_reader: {}, ci_pii: false, ci_ctx: '', ci_ctx_es: '' }),
|
|
245
245
|
steps: [
|
|
246
246
|
SET('ci_find_spec', 'ci_spec', "(function () { var s = ((cargo.forms[form] || {}).specs || []).filter(function (s) { return s.name === current; })[0]; return s ? (Array.isArray(s.any_of) ? Object.assign({}, s, { profile: { kind: 'group' } }) : s) : null; })()"),
|
|
247
247
|
SET('ci_current_names', 'ci_names', "Array.isArray(ci_spec && ci_spec.any_of) ? ci_spec.any_of.map(function (m) { return m.name; }) : [current]"),
|
|
@@ -302,12 +302,13 @@ const collectInput = {
|
|
|
302
302
|
SET('ci_skip_gate', 'ci_skip_gate', "!provides || !provides.gate || [].concat(provides.gate.verified || []).every(function(p){return !!formPath({cargo:cargo},p);}) ? 'true' : ''"),
|
|
303
303
|
WHEN('ci_explicit_question', 'ci_m.questions.length > 0', FLOW('ci_explicit_provide', 'provide-data', 'call', { form: '{{form}}', provides: '{{provides}}', asked: '{{ci_qkey}}', asked_keys: '{{ci_m.questions}}', no_menu: 'true', no_gate: '{{ci_skip_gate}}' })),
|
|
304
304
|
WHEN('ci_explicit_question_done', 'ci_m.questions.length > 0', END('ci_explicit_question_end')),
|
|
305
|
+
SET('ci_reply_reader', 'ci_reply_reader', "ci_choices.length ? 'read-form-choice' : 'read-form-reply'"),
|
|
305
306
|
{ id: 'ci_route', type: 'CASE', branches: {
|
|
306
307
|
'condition: ci_m.ambiguous.length > 0': FLOW('ci_ambiguous', 'disambiguate-input', 'call', { readings: '{{ci_m.ambiguous}}', hits: '{{ci_m.hits}}', remaining: '{{ci_m.remaining}}' }),
|
|
307
308
|
'condition: ci_m.hits.length > 0': FLOW('ci_accept', 'collect-input-accept', 'call', { hits: '{{ci_m.hits}}' }),
|
|
308
309
|
"condition: ci_m.questions.length > 0": END('ci_question_handled'),
|
|
309
310
|
"condition: ci_qkey && ci_qkey.indexOf('__') !== 0": FLOW('ci_question_asked', 'provide-data', 'call', { form: '{{form}}', provides: '{{provides}}', asked: '{{ci_qkey}}', no_menu: 'true', no_gate: '{{ci_skip_gate}}' }),
|
|
310
|
-
"condition: !ci_must && (ci_words >= 3 || ci_spec.profile.kind === 'amount' && ci_words > 0)":
|
|
311
|
+
"condition: !ci_must && (ci_words >= 3 || ci_spec.profile.kind === 'amount' && ci_words > 0)": FLOW('ci_elsewhere', '{{ci_reply_reader}}', 'call', { form: '{{form}}', input: '{{current}}', question: '{{ci_q}}', question_es: '{{ci_q_es}}', choices: '{{ci_choices}}' }),
|
|
311
312
|
default: SIDE('ci_miss', "(missFormInput(cargo,form,current),true)")
|
|
312
313
|
} },
|
|
313
314
|
],
|
|
@@ -344,9 +345,9 @@ const validateBatch = {
|
|
|
344
345
|
SIDE('vb_reset', "(cargo.inputCheck = vb_h.invalid ? { ok: false } : (vb_h.validator && !vb_known ? null : { ok: true, value: vb_h.value }), true)"),
|
|
345
346
|
SET('vb_response', 'vb_response', "(function(){var state=cargo.forms[vb_h.form],spec=state && state.specs.flatMap(function(s){return s.any_of || [s];}).find(function(s){return s.name===vb_h.name;});return spec && spec.response || null;})()"),
|
|
346
347
|
WHEN('vb_contextual_needed', "vb_ready === true && vb_h.current && vb_response && !vb_known && !vb_h.invalid && vb_h.origin !== 'activation' && !vb_h.fromPending", FLOW('vb_read_response', 'read-form-response', 'call', { form: '{{vb_h.form}}', input: '{{vb_h.name}}' })),
|
|
347
|
-
WHEN('vb_validator', 'vb_ready === true && vb_h.validator && !vb_known && !vb_h.invalid', FLOW('vb_validate', '{{vb_h.validator}}', 'call', { form: '{{vb_h.form}}', input: '{{vb_h.name}}', value: '{{vb_h.value}}', values: '{{vb_values}}', reading: '{{vb_h}}' })),
|
|
348
|
+
WHEN('vb_validator', 'vb_ready === true && vb_h.validator && !vb_known && !vb_h.invalid && !(cargo.inputCheck && cargo.inputCheck.ok === false)', FLOW('vb_validate', '{{vb_h.validator}}', 'call', { form: '{{vb_h.form}}', input: '{{vb_h.name}}', value: '{{vb_h.value}}', values: '{{vb_values}}', reading: '{{vb_h}}' })),
|
|
348
349
|
WHEN('vb_refused', 'vb_h.refused === true || vb_h.incompleteMoney === true', SIDE('vb_withhold_refusal', "(cargo.inputCheck=Object.assign({},cargo.inputCheck || {},{ok:false}),true)")),
|
|
349
|
-
SET('vb_candidate', 'vb_candidate', "Object.assign({},vb_h,{ok:!!(cargo.inputCheck && cargo.inputCheck.ok === true),value:cargo.inputCheck && cargo.inputCheck.value !== undefined && cargo.inputCheck.value !== null ? cargo.inputCheck.value : vb_h.value,message:cargo.inputCheck && cargo.inputCheck.message,message_es:cargo.inputCheck && cargo.inputCheck.message_es})"),
|
|
350
|
+
SET('vb_candidate', 'vb_candidate', "Object.assign({},vb_h,{ok:!!(cargo.inputCheck && cargo.inputCheck.ok === true),value:cargo.inputCheck && cargo.inputCheck.value !== undefined && cargo.inputCheck.value !== null ? cargo.inputCheck.value : vb_h.value,message:cargo.inputCheck && cargo.inputCheck.message,message_es:cargo.inputCheck && cargo.inputCheck.message_es,quiet:!!(cargo.inputCheck && cargo.inputCheck.quiet)})"),
|
|
350
351
|
SET('vb_proposal_policy', 'vb_proposal', 'vb_relevant === true && vb_ready === true && vb_candidate.ok && !vb_known ? formProposalPolicy(cargo,vb_candidate,cargo.inputCheck,accepted) : null'),
|
|
351
352
|
SET('vb_proposal_values', 'vb_proposal_values', 'proposedFormValues(cargo,vb_h.form,accepted.concat([vb_candidate]))'),
|
|
352
353
|
SIDE('vb_proposal_reset', '(cargo.proposalCheck=undefined,true)'),
|
|
@@ -365,7 +366,7 @@ const requestCancelled = {
|
|
|
365
366
|
};
|
|
366
367
|
// Open-ended answers use the same contextual intent/extraction path as other DISPATCH replies.
|
|
367
368
|
const readFormResponse = {
|
|
368
|
-
id: 'read-form-response', name: 'ReadFormResponse', version: '1.0.0', scope: 'isolated', description: 'Read the requested field with contextual DISPATCH: an answer continues, a withdrawal or a new request leaves with saved form progress.',
|
|
369
|
+
id: 'read-form-response', name: 'ReadFormResponse', version: '1.0.0', scope: 'isolated', description: 'Read the requested field with contextual DISPATCH: an answer continues, an answer with nothing usable is asked again, a withdrawal or a new request leaves with saved form progress.',
|
|
369
370
|
parameters: [{ name: 'form', type: 'string' }, { name: 'input', type: 'string' }],
|
|
370
371
|
variables: vars({ group: null, spec: null, question: '', reply: null }),
|
|
371
372
|
steps: [SET('response_group', 'group', "cargo.forms[form].specs.find(function(s){return s.name===input || s.any_of && s.any_of.some(function(member){return member.name===input;});})"),
|
|
@@ -373,8 +374,53 @@ const readFormResponse = {
|
|
|
373
374
|
{ ...SET('response_declared', 'noop', '!!spec && !!validateFormResponse(spec.response)'), requireTrue: true },
|
|
374
375
|
SET('response_question', 'question', "formInputPrompt(cargo,form,input,Object.assign({},group,spec,{question:spec.question || group.question,question_es:spec.question_es || group.question_es,question_from:spec.question_from || group.question_from}),cargo.forms[form].data || {},language)"),
|
|
375
376
|
SET('response_clear', 'reply', 'null'),
|
|
376
|
-
{ ...yieldDispatch('response_dispatch', 'form', "'input_not_matched'"), onResponse: 'continue', responseContext: 'Current question: {{question}}. Requested answer: {{spec.response.description}}.', responseParameters: [{ name: 'answer', type: 'string', description: '{{spec.response.description}}' }], responseVariable: 'reply' },
|
|
377
|
-
|
|
377
|
+
{ ...yieldDispatch('response_dispatch', 'form', "'input_not_matched'"), onResponse: 'continue', responseContext: 'Current question: {{question}}. Requested answer: {{spec.response.description}}.', responseParameters: [{ name: 'answer', type: 'string', description: '{{spec.response.description}}', verbatim: true }], responseVariable: 'reply' },
|
|
378
|
+
// Nothing usable (only after a default `answers`: a confident one carries the reply as said): the reading is
|
|
379
|
+
// rejected, so the form asks the question again (the question alone: it was not a wrong answer). The answer never
|
|
380
|
+
// goes to the host.
|
|
381
|
+
WHEN('response_missing', "!reply || typeof reply.answer !== 'string' || !reply.answer.trim()", SIDE('response_rejected', '(cargo.inputCheck={ok:false,quiet:true},true)'))]
|
|
382
|
+
};
|
|
383
|
+
// An answer the field's reader could not read goes to the reply ranker, never straight to the host (owner 2026-10-26: a form
|
|
384
|
+
// gives up only for a real new intent). `answers`: a choice field takes the offered key the reply picks, else the
|
|
385
|
+
// question is asked again ("Sorry, I didn't catch that."), counted as an attempt so max_attempts still bounds it;
|
|
386
|
+
// `abort` ends every flow; `new_request` goes to intent detection.
|
|
387
|
+
const rankedMiss = (id) => SIDE(id, "(cargo.forms[form].attempts=cargo.forms[form].attempts || {},cargo.forms[form].attempts[input]=Number(cargo.forms[form].attempts[input] || 0)+1,cargo.forms[form].feedback=cargo.forms[form].feedback || {},cargo.forms[form].feedback[input]='miss',true)");
|
|
388
|
+
const readFormReply = {
|
|
389
|
+
id: 'read-form-reply', name: 'ReadFormReply', version: '1.0.0', scope: 'isolated', description: 'Rank an unreadable answer against its question: an answer is asked again, a withdrawal or a new request leaves with saved form progress.',
|
|
390
|
+
parameters: [{ name: 'form', type: 'string' }, { name: 'input', type: 'string' }, { name: 'question', type: 'string' }, { name: 'question_es', type: 'string' }],
|
|
391
|
+
variables: vars({ question: '', question_es: '', asked: '' }),
|
|
392
|
+
steps: [SET('reply_asked', 'asked', "language === 'es' && question_es ? question_es : question"),
|
|
393
|
+
{ ...yieldDispatch('reply_dispatch', 'form', "'input_not_matched'"), onResponse: 'continue', responseContext: 'Current question: {{asked}}' },
|
|
394
|
+
rankedMiss('reply_miss')]
|
|
395
|
+
};
|
|
396
|
+
const readFormChoice = {
|
|
397
|
+
id: 'read-form-choice', name: 'ReadFormChoice', version: '1.0.0', scope: 'isolated', description: 'Rank an unreadable answer to a choice question and take the offered option it picks; otherwise ask again. A withdrawal or a new request leaves with saved form progress.',
|
|
398
|
+
parameters: [{ name: 'form', type: 'string' }, { name: 'input', type: 'string' }, { name: 'question', type: 'string' }, { name: 'question_es', type: 'string' }, { name: 'choices', type: 'array' }],
|
|
399
|
+
variables: vars({ question: '', question_es: '', choices: [], asked: '', options: '', reply: null, picked: '', chain: null, reading: null }),
|
|
400
|
+
steps: [SET('choice_asked', 'asked', "language === 'es' && question_es ? question_es : question"),
|
|
401
|
+
SET('choice_options', 'options', "(choices || []).map(function(c){return String(c.key)+' ('+String(c.label || (Array.isArray(c.phrases) && c.phrases.filter(function(p){return String(p)!==String(c.key);})[0]) || c.key)+')';}).join(', ')"),
|
|
402
|
+
{ ...yieldDispatch('choice_dispatch', 'form', "'input_not_matched'"), onResponse: 'continue', responseContext: 'Current question: {{asked}}', responseParameters: [{ name: 'key', type: 'string', description: 'The key of the offered option the reply picks or says it already chose, one of: {{options}}. Leave it empty when the reply picks none of them.' }], responseVariable: 'reply' },
|
|
403
|
+
SET('choice_picked', 'picked', "(function(){var k=String(reply && reply.key || '').trim().toLowerCase();var c=(choices || []).filter(function(c){return String(c.key).toLowerCase()===k;})[0];return c ? String(c.key) : '';})()"),
|
|
404
|
+
WHEN('choice_none', '!picked', rankedMiss('choice_miss')),
|
|
405
|
+
WHEN('choice_none_end', '!picked', END('choice_none_done')),
|
|
406
|
+
SIDE('choice_take', "(cargo.choice=picked,cargo.choiceText=picked,true)"),
|
|
407
|
+
SET('choice_chain', 'chain', 'formInputChain(cargo.forms, form, cargo)'),
|
|
408
|
+
SET('choice_read', 'reading', "enrichFormMatches(readFormAnswer(picked, chain, { form: form, name: input }, picked, []), chain, form, [input], input)"),
|
|
409
|
+
WHEN('choice_unread', '!reading.hits.length', rankedMiss('choice_unread_miss')),
|
|
410
|
+
WHEN('choice_unread_end', '!reading.hits.length', END('choice_unread_done')),
|
|
411
|
+
SIDE('choice_clear', 'clearFormMisses(cargo,form,input)'),
|
|
412
|
+
FLOW('choice_accept', 'collect-input-accept', 'call', { hits: '{{reading.hits}}' })]
|
|
413
|
+
};
|
|
414
|
+
// A confirmation's unread answer goes to the reply ranker with the confirmation question (owner 2026-10-27), never
|
|
415
|
+
// straight to the host. The ranker is offered NO only: a confirmation is accepted only by its exact YES. Result:
|
|
416
|
+
// cargo.confirmRanked = 'no' | 'none' (ConfirmForm reads it); `abort` ends every flow; `new_request` goes to intent detection.
|
|
417
|
+
const readConfirmReply = {
|
|
418
|
+
id: 'read-confirm-reply', name: 'ReadConfirmReply', version: '1.0.0', scope: 'isolated', description: 'Rank an unreadable answer to a confirmation: it declines (NO) or is asked again; a withdrawal or a new request leaves with saved form progress. Never confirms.',
|
|
419
|
+
parameters: [{ name: 'form', type: 'string' }, { name: 'question', type: 'string' }, { name: 'question_es', type: 'string' }],
|
|
420
|
+
variables: vars({ question: '', question_es: '', asked: '', reply: null }),
|
|
421
|
+
steps: [SET('confirm_asked', 'asked', "language === 'es' && question_es ? question_es : question"),
|
|
422
|
+
{ ...yieldDispatch('confirm_dispatch', 'form', "'confirmation_not_matched'"), onResponse: 'continue', responseContext: 'Current question: {{asked}}', responseParameters: [{ name: 'key', type: 'string', description: "'no' when the reply declines or refuses what the question asks to confirm. Leave it empty otherwise, including when it agrees." }], responseVariable: 'reply' },
|
|
423
|
+
SIDE('confirm_ranked', "(cargo.confirmRanked=String(reply && reply.key || '').trim().toLowerCase()==='no' ? 'no' : 'none',true)")]
|
|
378
424
|
};
|
|
379
425
|
const collectContextualAnswer = formFlow({ id: 'collect-contextual-answer', name: 'CollectContextualAnswer', description: 'Collect one open-ended answer using contextual DISPATCH and preserve the caller wording.',
|
|
380
426
|
parameters: [...['question', 'question_es', 'description', 'context', 'context_es'].map(name => ({ name, type: 'string' })), { name: 'choices', type: 'array' }, { name: 'digits', type: 'object' }],
|
|
@@ -415,8 +461,8 @@ const acceptedEffects = {
|
|
|
415
461
|
WHEN('ie_none', '!ca_h', END('ie_end')),
|
|
416
462
|
SET('ie_rest', 'ca_rest', 'readings.slice(1)'),
|
|
417
463
|
WHEN('ie_reject', "ca_h.outcome === 'rejected'", SIDE('ie_attempt', "(cargo.forms[ca_h.form].attempts[ca_h.asked || ca_h.name] = Number(cargo.forms[ca_h.form].attempts[ca_h.asked || ca_h.name] || 0) + 1, cargo.forms[ca_h.form].feedback=cargo.forms[ca_h.form].feedback || {}, cargo.forms[ca_h.form].feedback[ca_h.asked || ca_h.name]='invalid', true)")),
|
|
418
|
-
SET('ie_say_en', 'ca_ack', "ca_h.outcome === 'rejected' ? (ca_h.message || ('That ' + (ca_h.label || ca_h.name) + \" doesn't look right.\")) : ca_h.silent === true || ca_h.fromPending ? '' : ca_h.outcome === 'known' && !ca_h.current ? ('Thank you, I already have your ' + ca_h.label + '.') : ca_h.outcome === 'changed' ? ('Okay, I updated your ' + ca_h.label + '.') : (ca_h.outcome === 'taken' || ca_h.outcome === 'pending') && ca_h.origin !== 'activation' ? ('Got it, your ' + ca_h.label + '.') : ''"),
|
|
419
|
-
SET('ie_say_es', 'ca_ack_es', "ca_h.outcome === 'rejected' ? (ca_h.message_es || ca_h.message || ('Ese ' + (ca_h.label_es || ca_h.label || ca_h.name) + ' no parece correcto.')) : ca_h.silent === true || ca_h.fromPending ? '' : ca_h.outcome === 'known' && !ca_h.current ? ('Gracias, ya tengo su ' + ca_h.label_es + '.') : ca_h.outcome === 'changed' ? ('Listo, actualicé su ' + ca_h.label_es + '.') : (ca_h.outcome === 'taken' || ca_h.outcome === 'pending') && ca_h.origin !== 'activation' ? ('Entendido, su ' + ca_h.label_es + '.') : ''"),
|
|
464
|
+
SET('ie_say_en', 'ca_ack', "ca_h.outcome === 'rejected' && ca_h.quiet ? '' : ca_h.outcome === 'rejected' ? (ca_h.message || ('That ' + (ca_h.label || ca_h.name) + \" doesn't look right.\")) : ca_h.silent === true || ca_h.fromPending ? '' : ca_h.outcome === 'known' && !ca_h.current ? ('Thank you, I already have your ' + ca_h.label + '.') : ca_h.outcome === 'changed' ? ('Okay, I updated your ' + ca_h.label + '.') : (ca_h.outcome === 'taken' || ca_h.outcome === 'pending') && ca_h.origin !== 'activation' ? ('Got it, your ' + ca_h.label + '.') : ''"),
|
|
465
|
+
SET('ie_say_es', 'ca_ack_es', "ca_h.outcome === 'rejected' && ca_h.quiet ? '' : ca_h.outcome === 'rejected' ? (ca_h.message_es || ca_h.message || ('Ese ' + (ca_h.label_es || ca_h.label || ca_h.name) + ' no parece correcto.')) : ca_h.silent === true || ca_h.fromPending ? '' : ca_h.outcome === 'known' && !ca_h.current ? ('Gracias, ya tengo su ' + ca_h.label_es + '.') : ca_h.outcome === 'changed' ? ('Listo, actualicé su ' + ca_h.label_es + '.') : (ca_h.outcome === 'taken' || ca_h.outcome === 'pending') && ca_h.origin !== 'activation' ? ('Entendido, su ' + ca_h.label_es + '.') : ''"),
|
|
420
466
|
WHEN('ie_say', 'ca_ack', SAY('ie_ack', '{{ca_ack}}', '{{ca_ack_es}}')),
|
|
421
467
|
WHEN('ie_callback', "ca_h.after && ca_h.outcome !== 'known' && ca_h.outcome !== 'rejected' && ca_h.outcome !== 'pending'", FLOW('ie_after', '{{ca_h.after}}', 'call', { form: '{{ca_h.form}}', input: '{{ca_h.name}}', value: '{{ca_h.value}}' })),
|
|
422
468
|
WHEN('ie_more', 'ca_rest.length > 0', FLOW('ie_next', 'input-accepted-effects', 'replace', { readings: '{{ca_rest}}' })),
|
|
@@ -460,11 +506,11 @@ const disambiguate = {
|
|
|
460
506
|
// ── confirm-form: the exact confirmation of a finished form; a correction is matched against the form chain ───────
|
|
461
507
|
const confirmForm = {
|
|
462
508
|
id: 'confirm-form', name: 'ConfirmForm', version: '1.0.0', scope: 'isolated',
|
|
463
|
-
description: "Worker: ask a form's confirmation (exact YES / NO; keys 1 and 2). A correction instead ('no, make it $40') is read against the form chain and stored, and the result is 'changed' so the form runs again; an unclear short answer is asked again, a long
|
|
509
|
+
description: "Worker: ask a form's confirmation (exact YES / NO; keys 1 and 2). A correction instead ('no, make it $40') is read against the form chain and stored, and the result is 'changed' so the form runs again; an unclear short answer is asked again, a long unread one goes to the reply ranker (read-confirm-reply). Result: cargo.formConfirm[form] = 'yes' | 'no' | 'changed'. Params: form, question(_es), exit_context(_es).",
|
|
464
510
|
parameters: ['form', 'question', 'question_es', 'exit_context', 'exit_context_es', 'phrases', 'words', 'interrupts', 'no_keys', 'clarifications', 'invites'].map((n) => ({ name: n, type: ['phrases', 'words', 'interrupts', 'no_keys', 'clarifications', 'invites'].includes(n) ? 'array' : 'string', description: n })).concat([{ name: 'named_fields', type: 'boolean', description: "true: an answer that names one of the form's inputs (its names) without a value re-asks only that input" }]),
|
|
465
511
|
variables: vars({ named_fields: false, cf_must: false, cf_named: null, cf_presets: FIELD_PRESETS, cf_chain: [], cf_m: null, cf_current: null, cf_result: '', cf_prompt: '', cf_prompt_es: '', cf_words: 0, cf_tries: 0, phrases: null, words: [], clarifications: [], no_keys: ['2'], interrupts: [], invites: [], cf_choices: [], cf_event: '', cf_amount: false, cf_questions: [], cf_provides: null, cf_skip_gate: '' }),
|
|
466
512
|
steps: [
|
|
467
|
-
SIDE('cf_reset', "(cargo.formConfirm = cargo.formConfirm || {}, cargo.formConfirm[form] = '', true)"),
|
|
513
|
+
SIDE('cf_reset', "(cargo.formConfirm = cargo.formConfirm || {}, cargo.formConfirm[form] = '', cargo.confirmRanked = '', true)"),
|
|
468
514
|
SET('cf_choices', 'cf_choices', `[{key:'yes',phrases:['1'].concat(Array.isArray(phrases)?phrases:Array.isArray(words)?words:[]),exact:true},{key:'no',phrases:(Array.isArray(no_keys)?no_keys:['2']).concat(${JSON.stringify(ANSWER_WORDS.no)}),exact:true}].concat((Array.isArray(interrupts)?interrupts:[]).map(function(event){return {key:'event:'+event.key,phrases:event.phrases ?? event.words,exact:event.exact!==false};}))`),
|
|
469
515
|
SET('cf_initial_chain', 'cf_chain', CHAIN_JS),
|
|
470
516
|
SET('cf_amount_context', 'cf_amount', "cf_chain.some(function(input){return input.profile && input.profile.kind==='amount';})"),
|
|
@@ -499,9 +545,11 @@ const confirmForm = {
|
|
|
499
545
|
'condition: cf_named': SET('cf_named_reset', 'cf_result', "(resetFormInputs(cargo, cf_named.form, [cf_named.name]), 'changed')"),
|
|
500
546
|
"condition: cargo.choice === 'no'": SET('cf_declined', 'cf_result', "'no'"),
|
|
501
547
|
"condition: Array.isArray(clarifications) && pickChoice(String(cargo.choiceText || '').replace(/[?¿]/g,''),[{key:'clarify',phrases:clarifications,exact:true}],false)==='clarify'": SET('cf_clarification', 'cf_result', "'clarification'"),
|
|
502
|
-
'condition: !cf_must && (cf_words >= 3 || cf_amount && cf_words > 0)':
|
|
548
|
+
'condition: !cf_must && (cf_words >= 3 || cf_amount && cf_words > 0)': FLOW('cf_elsewhere', 'read-confirm-reply', 'call', { form: '{{form}}', question: '{{cf_prompt}}', question_es: '{{cf_prompt_es}}' }),
|
|
503
549
|
default: SET('cf_unclear', 'cf_result', "'unclear'")
|
|
504
550
|
} },
|
|
551
|
+
// the ranker's reading of an unread answer: a decline is the NO; an answer that declines nothing is asked again
|
|
552
|
+
SET('cf_ranked', 'cf_result', "cf_result ? cf_result : cargo.confirmRanked === 'no' ? 'no' : cargo.confirmRanked === 'none' ? 'unclear' : ''"),
|
|
505
553
|
SET('cf_changed', 'cf_result', "cf_result ? cf_result : 'changed'"),
|
|
506
554
|
// an unclear short answer is asked again (the form runs again and reaches this question), at most twice
|
|
507
555
|
SET('cf_tries_count', 'cf_tries', "cf_result === 'unclear' ? missFormInput(cargo,form,'__confirm') : (clearFormMisses(cargo,form,'__confirm'),0)"),
|
|
@@ -791,7 +839,7 @@ const resumeForm = { id: 'resume-form', name: 'ResumeForm', version: '1.0.0', sc
|
|
|
791
839
|
SET('resume_definition', 'target', 'cargo.forms[form].definition'), SET('resume_parent', 'parent', "cargo.forms[form].parent || ''"), SET('resume_slot', 'slot', "cargo.forms[form].result_input || ''"),
|
|
792
840
|
FLOW('resume_owned_form', '{{target}}', 'replace', { form_instance: '{{form}}', parent_form: '{{parent}}', result_input: '{{slot}}' })
|
|
793
841
|
] };
|
|
794
|
-
const LIBRARY_FLOWS = [confirmInputProposal, proposalDeclined, resumeForm, performAction, sendTextAction, prepareInput, runForm, collectInput, validateBatch, requestCancelled, readFormResponse, collectContextualAnswer, accept, acceptedEffects, disambiguate, confirmForm, formDone, providerMenu, ...validators, ...fieldCollectors, ...subForms, provideData, provideQueuedData, loadSource, answerFacts];
|
|
842
|
+
const LIBRARY_FLOWS = [readFormReply, readFormChoice, readConfirmReply, confirmInputProposal, proposalDeclined, resumeForm, performAction, sendTextAction, prepareInput, runForm, collectInput, validateBatch, requestCancelled, readFormResponse, collectContextualAnswer, accept, acceptedEffects, disambiguate, confirmForm, formDone, providerMenu, ...validators, ...fieldCollectors, ...subForms, provideData, provideQueuedData, loadSource, answerFacts];
|
|
795
843
|
const LIBRARY_CONTRACTS = {
|
|
796
844
|
'confirm-input-proposal': { role: 'collector', requires: [INPUT_PROPOSALS_REQUIREMENT] }, 'confirm-input-proposal-declined': { role: 'worker', requires: [INPUT_PROPOSALS_REQUIREMENT] },
|
|
797
845
|
'resume-form': { role: 'worker' },
|
|
@@ -800,6 +848,7 @@ const LIBRARY_CONTRACTS = {
|
|
|
800
848
|
'prepare-input': { role: 'worker' }, 'run-form': { role: 'worker' }, 'collect-input': { role: 'worker' },
|
|
801
849
|
'request-cancelled': { role: 'worker' },
|
|
802
850
|
'read-form-response': { role: 'worker', requires: [CONTEXTUAL_RESPONSES_REQUIREMENT] },
|
|
851
|
+
'read-form-reply': { role: 'worker' }, 'read-form-choice': { role: 'worker', requires: [CONTEXTUAL_RESPONSES_REQUIREMENT] }, 'read-confirm-reply': { role: 'worker', requires: [CONTEXTUAL_RESPONSES_REQUIREMENT] },
|
|
803
852
|
'collect-contextual-answer': { role: 'collector', requires: [CONTEXTUAL_RESPONSES_REQUIREMENT] },
|
|
804
853
|
'validate-input-batch': { role: 'worker', result: { path: 'cargo.inputBatch', type: 'object' } },
|
|
805
854
|
'collect-input-accept': { role: 'worker' }, 'input-accepted-effects': { role: 'worker' },
|
|
@@ -111,7 +111,7 @@ const contact = worker('get-cell-or-email', 'GetCellOrEmail', 'Identify a suppli
|
|
|
111
111
|
when('identity_contact_split_overshoot', "contact_partial && contact_digits.length > (contact_options.account_shape || []).reduce(function(max,s){return Math.max(max,Math.max.apply(null,s.lengths || [0]));},0)", call('identity_contact_restart_split', 'contact-split-failed', { contact_options: '{{contact_options}}' }, 'replace')),
|
|
112
112
|
set('identity_contact_identifier', 'contact_id', "contact_options.account_pattern ? readIdentifier(contact_text,contact_options.account_pattern) : null"),
|
|
113
113
|
set('identity_contact_phone', 'contact_phone', "readPhone(contact_text) || (validatePhone(contact_digits) ? contact_digits : '')"), set('identity_contact_email', 'contact_mail', 'readEmail(contact_text)'),
|
|
114
|
-
set('identity_contact_classify', 'contact_kind', "contact_id && contact_id.kind === 'account' ? 'account' : contact_phone ? 'phone' : contact_mail ? 'email' : contact_options.account_pattern && !contact_digits && matchesChoice(contact_text,contact_names_account) ? 'names_account' : readInternationalPhone(contact_text) ? 'international' : isAgentRequest(contact_text) ? 'agent' :
|
|
114
|
+
set('identity_contact_classify', 'contact_kind', "contact_id && contact_id.kind === 'account' ? 'account' : contact_phone ? 'phone' : contact_mail ? 'email' : contact_options.account_pattern && !contact_digits && matchesChoice(contact_text,contact_names_account) ? 'names_account' : readInternationalPhone(contact_text) ? 'international' : isAgentRequest(contact_text) ? 'agent' : isExitRequest(contact_text) ? 'exit' : contact_allowed && /^(?:no|nope|nah)\\b/i.test(contact_text.trim()) && !/[0-9@]/.test(contact_text) ? 'decline' : contact_allowed && cargo.serviceAnswer && cargo.serviceAnswer.values.caller_decision === 'yes' ? 'caller' : contact_digits ? 'invalid_phone' : contact_text.trim().split(/\\s+/).length>=3 && !/[0-9@]/.test(contact_text) ? 'unmapped' : 'invalid'"),
|
|
115
115
|
set('identity_contact_named', 'contact_named_options', "Object.assign({},contact_options,{fromMenu:false,intro:'Sure, your account number.',intro_es:'Claro, su número de cuenta.'})"),
|
|
116
116
|
set('identity_contact_error', 'contact_error', expression(contactError, 'contact_kind', 'contact_options')), set('identity_contact_error_es', 'contact_error_es', expression(contactError, 'contact_kind', 'contact_options', 'true')),
|
|
117
117
|
cases('identity_contact_route', {
|
|
@@ -212,7 +212,7 @@ const validateCode = worker('validate-otp-code', 'ValidateOtpCode', 'Validate a
|
|
|
212
212
|
cases('otp_response', {
|
|
213
213
|
'condition: normalized_otp_code.length === 6': { id: 'otp_check_tool', type: 'CALL-TOOL', tool: 'validate-otp', variable: 'otp_validation_result', args: { otp: '{{normalized_otp_code}}', container: '{{cargo}}' }, onFail: call('otp_check_failed', 'get-and-validate-otp-code', undefined, 'replace') },
|
|
214
214
|
'condition: wants_other_account': call('otp_change_account', 'authenticate-user', { cell_number: '', email: '', retrying: true, declined_caller: true }, 'replace'),
|
|
215
|
-
"condition:
|
|
215
|
+
"condition: isExitRequest(user_choice)": call('otp_exit', '{{otp_cancel}}', undefined, 'reboot'),
|
|
216
216
|
"condition: isAnswer(user_choice,'agent')": call('otp_agent', 'live-agent-requested', undefined, 'reboot'),
|
|
217
217
|
"condition: isAnswer(user_choice,'text')": call('otp_text', 'switch-to-text', undefined, 'reboot'),
|
|
218
218
|
'condition: matchesChoice(user_choice,otp_phrases.resend)': call('otp_resend', 'resend-otp-code', { resend_reason: 'requested' }),
|
|
@@ -261,7 +261,7 @@ const retry = worker('generic-retry-with-options', 'GenericRetryWithOptions', 'C
|
|
|
261
261
|
set('retry_latest_answer', 'user_choice', 'String(cargo.serviceAnswer.raw || "")'), set('retry_capture', 'smart_capture_result', 'capture_patterns && capture_patterns.length ? normalizeAndFindCapture(user_choice,capture_patterns) : null'),
|
|
262
262
|
cases('retry_capture_route', { 'condition: smart_capture_result && retry_call_type === "replace"': call('retry_captured_replace', '{{retry_flow}}', { cell_number: '', email: '', '{{smart_capture_result.variable}}': '{{smart_capture_result.value}}', retry_flow: '{{retry_flow}}', cancel_flow: '{{cancel_flow}}', retrying: true, contact_options: null, parent_form: '{{parent_form}}' }, 'replace'), 'condition: smart_capture_result': call('retry_captured_reboot', '{{retry_flow}}', { '{{smart_capture_result.variable}}': '{{smart_capture_result.value}}', retry_flow: '{{retry_flow}}', cancel_flow: '{{cancel_flow}}', retrying: true, contact_options: null, parent_form: '{{parent_form}}' }, 'reboot'), default: effect('retry_no_capture', 'true') }),
|
|
263
263
|
set('retry_typed_code', 'normalized_otp_code', "allow_code_entry && user_choice.replace(/\\D/g,'').length === 6 ? user_choice.replace(/\\D/g,'') : ''"), when('retry_validate_code', '!!normalized_otp_code', call('retry_code_validate', 'validate-otp-code')),
|
|
264
|
-
cases('retry_decision', { 'condition: normalized_otp_code && cargo.otpVerified === true': end('retry_verified'), "condition: (user_choice.trim() === '1' || isAnswer(user_choice,'yes',['phone','email','cell','mobile','teléfono','telefono','celular','móvil','movil','correo electrónico','correo'])) && retry_call_type === 'replace'": call('retry_yes_replace', '{{retry_flow}}', { retrying: true, cell_number: '', email: '', contact_options: null, parent_form: '{{parent_form}}' }, 'replace'), "condition: user_choice.trim() === '1' || isAnswer(user_choice,'yes',['phone','email','cell','mobile','teléfono','telefono','celular','móvil','movil','correo electrónico','correo'])": call('retry_yes_reboot', '{{retry_flow}}', { retrying: true, contact_options: null, parent_form: '{{parent_form}}' }, 'reboot'), "condition: user_choice.trim() === '9' || isAnswer(user_choice,'text')": call('retry_text', 'switch-to-text', undefined, 'reboot'), "condition: isAgentRequest(user_choice)": call('retry_agent', 'live-agent-requested', undefined, 'reboot'), "condition: !user_choice.trim() || /^\\d$/.test(user_choice.trim()) ||
|
|
264
|
+
cases('retry_decision', { 'condition: normalized_otp_code && cargo.otpVerified === true': end('retry_verified'), "condition: (user_choice.trim() === '1' || isAnswer(user_choice,'yes',['phone','email','cell','mobile','teléfono','telefono','celular','móvil','movil','correo electrónico','correo'])) && retry_call_type === 'replace'": call('retry_yes_replace', '{{retry_flow}}', { retrying: true, cell_number: '', email: '', contact_options: null, parent_form: '{{parent_form}}' }, 'replace'), "condition: user_choice.trim() === '1' || isAnswer(user_choice,'yes',['phone','email','cell','mobile','teléfono','telefono','celular','móvil','movil','correo electrónico','correo'])": call('retry_yes_reboot', '{{retry_flow}}', { retrying: true, contact_options: null, parent_form: '{{parent_form}}' }, 'reboot'), "condition: user_choice.trim() === '9' || isAnswer(user_choice,'text')": call('retry_text', 'switch-to-text', undefined, 'reboot'), "condition: isAgentRequest(user_choice)": call('retry_agent', 'live-agent-requested', undefined, 'reboot'), "condition: !user_choice.trim() || /^\\d$/.test(user_choice.trim()) || isExitRequest(user_choice)": call('retry_cancel', '{{cancel_flow}}', undefined, 'reboot'), default: { id: 'retry_dispatch', type: 'DISPATCH', outcome: '{{caller_outcome}}', reason: '{{caller_reason}}' } })
|
|
265
265
|
] });
|
|
266
266
|
const EMAIL_CHOICES = { ok: ['1', 'ok', 'okay', 'yes', 'send', 'send it', 'si', 'sí', 'enviar', 'envíalo', 'correcto'], another: ['otro correo', 'otro correo electrónico', 'otro correo electronico', 'otro email', 'otra dirección', 'otra direccion', 'a otro correo', 'another email', 'a different email', 'different email', 'other email', 'another address', 'a different address'] };
|
|
267
267
|
export function emailReadback(address, voice, es = false) {
|
|
@@ -277,7 +277,7 @@ const email = worker('ask-email', 'AskEmail', 'Collect an email through shared F
|
|
|
277
277
|
set('email_question_es', 'email_question_es', "email_state.why === 'more' ? 'Entendido. Continúe.' : (email_state.attempt>0 ? email_state.why === 'retry' ? 'De acuerdo, intentemos de nuevo. ' : 'Eso no parece un correo electrónico. ' : '')+email_state.question_es"),
|
|
278
278
|
call('email_collect', 'collect-service-answer', { profiles: '{{email_profiles}}', question: '{{email_question}}', question_es: '{{email_question_es}}', keypad: { min: 1, max: 1 }, parent_form: '{{email_state.parent_form}}', context: 'email', context_es: 'correo' }),
|
|
279
279
|
set('email_raw', 'email_raw', 'String(cargo.serviceAnswer.raw || "")'),
|
|
280
|
-
cases('email_command', { "condition: isAgentRequest(email_raw)": call('email_agent', 'live-agent-requested', undefined, 'reboot'), "condition:
|
|
280
|
+
cases('email_command', { "condition: isAgentRequest(email_raw)": call('email_agent', 'live-agent-requested', undefined, 'reboot'), "condition: isExitRequest(email_raw)": call('email_exit', 'contact-support', { support_context: 'email', support_context_es: 'correo' }, 'reboot'), default: effect('email_is_answer', 'true') }),
|
|
281
281
|
set('email_choice', 'email_choice', "pickChoice(email_raw,[{key:'ok',phrases:email_choices.ok},{key:'another',phrases:email_choices.another}],false)"),
|
|
282
282
|
when('email_other_request_clear', "!email_choice && !readEmail(email_raw) && isOtherRequest(email_raw,'email')", effect('email_other_request_draft', "(email_state.draft='',cargo.emailDraft='',cargo.email='',true)")),
|
|
283
283
|
when('email_other_request', "!email_choice && !readEmail(email_raw) && isOtherRequest(email_raw,'email')", { id: 'email_dispatch_request', type: 'DISPATCH' }),
|
package/dist/helpers/answer.d.ts
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
* YES, AGENT and TEXT never match a negated answer ("not sure", "I don't want an agent"); 0 is AGENT, * is EXIT.
|
|
4
4
|
*/
|
|
5
5
|
export function isAnswer(input: any, kind: any, extra?: any[]): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the WHOLE answer is an exit word ("exit", "Cancelar.", "salir por favor", "*"), never a sentence that contains
|
|
8
|
+
* one: "Cancelar el pedido" asks for something; it does not withdraw (prod 2026-10-26, at a verification-code prompt).
|
|
9
|
+
*/
|
|
10
|
+
export function isExitRequest(input: any): boolean;
|
|
6
11
|
/** Whether the WHOLE answer asks for a person ("agent", "I want to talk to a representative", "0") — for free-text prompts. */
|
|
7
12
|
export function isAgentRequest(input: any): boolean;
|
|
8
13
|
/** Whether the answer is (part of) a spelled address — letters said one at a time, or a spelled symbol. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"answer.d.ts","sourceRoot":"","sources":["../../src/helpers/answer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"answer.d.ts","sourceRoot":"","sources":["../../src/helpers/answer.js"],"names":[],"mappings":"AAsNA;;;GAGG;AACH,wEAkBC;AAED;;;GAGG;AACH,mDAGC;AAED,+HAA+H;AAC/H,oDAIC;AAcD,2GAA2G;AAC3G,uDAGC;AAOD;;;;;GAKG;AACH,+DAUC;AAKD;;;;GAIG;AACH,oDAEC;AAiBD;;;;;;GAMG;AACH,mDAAmF;AAEnF,kGAAkG;AAClG;;;EAmCC;AAUD;;;;;;;;;GASG;AACH,6EA4GC;;;;;;;;AAjcD,qCAKwE"}
|
package/dist/helpers/answer.js
CHANGED
|
@@ -31,7 +31,7 @@ export const ANSWER_WORDS = {
|
|
|
31
31
|
agent: ['live agent', 'agent', 'agents', 'representative', 'rep', 'human', 'operator', 'manager', 'supervisor', 'someone',
|
|
32
32
|
'somebody', 'real person', 'a person', 'customer service', 'support', 'agente', 'agentes', 'gente', 'representante',
|
|
33
33
|
'humano', 'operador', 'operadora', 'gerente', 'alguien', 'persona', 'servicio al cliente', 'al cliente', 'servicio',
|
|
34
|
-
'recepcionista', 'recepcion', 'recepción'],
|
|
34
|
+
'recepcionista', 'recepcion', 'recepción', 'asesor', 'asesora', 'asesores'],
|
|
35
35
|
exit: ['exit', 'quit', 'abort', 'salir', 'cancel', 'cancelar'],
|
|
36
36
|
text: ['text', 'texto', 'sms', 'message', 'mensaje', 'text me', 'by text', 'por texto', 'mensaje de texto', 'whatsapp',
|
|
37
37
|
'escríbeme', 'escribeme'],
|
|
@@ -60,7 +60,7 @@ const NEGATIONS = ['no', 'not', 'nope', 'nah', 'never', 'dont', 'doesnt', 'didnt
|
|
|
60
60
|
// Phrases that hold a negation word but agree ("no problem", "why not").
|
|
61
61
|
const AGREEING = /\b(no problem|no worries|no hay problema|no te preocupes|why not|por que no|por qué no)\b/g;
|
|
62
62
|
const DEFERRAL = /\b(later|tomorrow|next week|not now|not today|another time|mañana|manana|después|despues|luego|otro día|otro dia|ahora no|hoy no)\b/;
|
|
63
|
-
const AGENT_ONLY = /^(?:(?:i want|i need|i would like|id like|can i|could i|let me|please|quiero|necesito|puedo|por favor)\s+)*(?:(?:to\s+)?(?:talk|speak|hablar|comunicarme)\s+(?:to|with|con)\s+)?(?:a|an|un|una|el|la)?\s*(?:live agent|agent|representative|rep|human|operator|real person|a person|person|someone|somebody|customer service|agente|representante|humano|operador|operadora|persona|alguien|servicio al cliente|agente en vivo|gerente|manager|supervisor)(?:\s+(?:please|por favor))?$/;
|
|
63
|
+
const AGENT_ONLY = /^(?:(?:i want|i need|i would like|id like|can i|could i|let me|please|quiero|necesito|puedo|por favor)\s+)*(?:(?:to\s+)?(?:talk|speak|hablar|comunicarme)\s+(?:to|with|con)\s+)?(?:a|an|un|una|el|la)?\s*(?:live agent|agent|representative|rep|human|operator|real person|a person|person|someone|somebody|customer service|agente|representante|humano|operador|operadora|persona|alguien|servicio al cliente|agente en vivo|gerente|manager|supervisor|asesor|asesora)(?:\s+(?:please|por favor))?$/;
|
|
64
64
|
// Accents are not meaning here (owner 2026-10-16): text callers type "direccion" for "dirección", "si" for "sí". Both
|
|
65
65
|
// sides of every comparison pass through normalize, so a word list matches with or without them; ñ is kept.
|
|
66
66
|
const plainVowels = (s) => s.replace(/[áàâä]/g, 'a').replace(/[éèêë]/g, 'e').replace(/[íìîï]/g, 'i').replace(/[óòôö]/g, 'o').replace(/[úùûü]/g, 'u');
|
|
@@ -196,6 +196,11 @@ function firmKey(b, key) {
|
|
|
196
196
|
// Words that name the key itself when said right before it: "el número 4", "opción 2", "number 4", "the 4" (prod
|
|
197
197
|
// 2026-10-25 18:25: "Número 4" and "El número 4" at a numbered product list were not understood, twice).
|
|
198
198
|
const KEY_NAMES = new Set(['number', 'numero', 'option', 'opcion', 'item', 'choice', 'the', 'el', 'la'].map(normalize));
|
|
199
|
+
// Saying the key was pressed, before it: "ya oprimí el uno", "I already pressed one", "marqué el 2" (prod 2026-10-26:
|
|
200
|
+
// a pressed-key sentence at a sub-account choice went to the guru).
|
|
201
|
+
const PRESS_WORDS = new Set(['ya', 'already', 'i', 'yo', 'ive', 'just', 'pressed', 'press', 'pushed', 'push', 'hit', 'dialed',
|
|
202
|
+
'entered', 'chose', 'picked', 'selected', 'presione', 'presiono', 'presiona', 'oprimi', 'oprime', 'oprimo', 'marque', 'marco',
|
|
203
|
+
'marca', 'pulse', 'pulso', 'toque', 'elegi', 'escogi', 'seleccione', 'le', 'di', 'al', 'a'].map(normalize));
|
|
199
204
|
function keyWithOnlyCourtesy(b, key, yesOk) {
|
|
200
205
|
const tk = String(b).replace(/\./g, ' ').split(' ').filter(Boolean);
|
|
201
206
|
const at = tk.reduce((acc, t, i) => (t === key ? [...acc, i] : acc), []);
|
|
@@ -206,6 +211,12 @@ function keyWithOnlyCourtesy(b, key, yesOk) {
|
|
|
206
211
|
let from = at[0];
|
|
207
212
|
while (from > 0 && at[0] - from < 2 && KEY_NAMES.has(tk[from - 1]))
|
|
208
213
|
from--;
|
|
214
|
+
// a press verb is required for the press words to count ("ya" alone, "a 1", are not a press)
|
|
215
|
+
let press = from;
|
|
216
|
+
while (press > 0 && from - press < 4 && PRESS_WORDS.has(tk[press - 1]))
|
|
217
|
+
press--;
|
|
218
|
+
if (tk.slice(press, from).some((t) => !['ya', 'already', 'i', 'yo', 'ive', 'just', 'le', 'al', 'a'].includes(t)))
|
|
219
|
+
from = press;
|
|
209
220
|
const rest = tk.filter((t, i) => i < from || i > at[0]).join(' ');
|
|
210
221
|
return onlyAffirmative(rest, yesOk ? ANSWER_WORDS.yes : [], false);
|
|
211
222
|
}
|
|
@@ -239,6 +250,14 @@ export function isAnswer(input, kind, extra = []) {
|
|
|
239
250
|
return matchesChoice(b, words);
|
|
240
251
|
}
|
|
241
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Whether the WHOLE answer is an exit word ("exit", "Cancelar.", "salir por favor", "*"), never a sentence that contains
|
|
255
|
+
* one: "Cancelar el pedido" asks for something; it does not withdraw (prod 2026-10-26, at a verification-code prompt).
|
|
256
|
+
*/
|
|
257
|
+
export function isExitRequest(input) {
|
|
258
|
+
const b = normalize(input).replace(/^[.\s]+|[.\s]+$/g, '');
|
|
259
|
+
return b === '*' || /^(exit|quit|salir|abort|cancel|cancelar)( please| por favor)?$/.test(b);
|
|
260
|
+
}
|
|
242
261
|
/** Whether the WHOLE answer asks for a person ("agent", "I want to talk to a representative", "0") — for free-text prompts. */
|
|
243
262
|
export function isAgentRequest(input) {
|
|
244
263
|
// the period normalize() keeps for emails is not part of the answer at its ends ("Operator." on a call, 2026-10-17)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextual-response.d.ts","sourceRoot":"","sources":["../../src/helpers/contextual-response.js"],"names":[],"mappings":"AAMA,2GAA2G;AAC3G;;;
|
|
1
|
+
{"version":3,"file":"contextual-response.d.ts","sourceRoot":"","sources":["../../src/helpers/contextual-response.js"],"names":[],"mappings":"AAMA,2GAA2G;AAC3G;;;qBAkBC;AACD,+FAIC;AAED,gGAAgG;AAChG,yDAGC;AApCD,4FAA4F;AAC5F,+CAAgD,8BAA8B,CAAC;AACxE,qDAA0C;AAmC1C,kDAA8J"}
|
|
@@ -30,7 +30,9 @@ export function validateContextualResponseStep(step, flow) {
|
|
|
30
30
|
fail('response parameters must be public extraction parameters');
|
|
31
31
|
if (own(p, 'jsonSchema'))
|
|
32
32
|
fail('response parameters support primitive types only; jsonSchema is not supported');
|
|
33
|
-
if (
|
|
33
|
+
if (p.verbatim !== undefined && (p.verbatim !== true || p.type !== undefined && p.type !== 'string' || p.enum !== undefined))
|
|
34
|
+
fail('verbatim is true on an open string parameter only');
|
|
35
|
+
if (Object.keys(p).some(k => !['name', 'description', 'type', 'enum', 'internal', 'verbatim'].includes(k)))
|
|
34
36
|
fail('responseParameters accepts only canonical parameter descriptors');
|
|
35
37
|
}
|
|
36
38
|
try {
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export namespace STANDARD_FUNCTIONS {
|
|
|
33
33
|
export { matchesChoice };
|
|
34
34
|
export { isAnswer };
|
|
35
35
|
export { isAgentRequest };
|
|
36
|
+
export { isExitRequest };
|
|
36
37
|
export { isOtherRequest };
|
|
37
38
|
export { isSpelledFragment };
|
|
38
39
|
export { isAmountAnswer };
|
|
@@ -152,6 +153,7 @@ import { ANSWER_WORDS } from './answer.js';
|
|
|
152
153
|
import { CONFIRM_WORDS } from './answer.js';
|
|
153
154
|
import { isAnswer } from './answer.js';
|
|
154
155
|
import { isAgentRequest } from './answer.js';
|
|
156
|
+
import { isExitRequest } from './answer.js';
|
|
155
157
|
import { isOtherRequest } from './answer.js';
|
|
156
158
|
import { isSpelledFragment } from './answer.js';
|
|
157
159
|
import { isAmountAnswer } from './answer.js';
|
|
@@ -238,5 +240,5 @@ import { validatePhone } from './validators.js';
|
|
|
238
240
|
import { validateEmail } from './validators.js';
|
|
239
241
|
import { urlToSpeech } from './url-speech.js';
|
|
240
242
|
import { textWithUrlToSpeech } from './url-speech.js';
|
|
241
|
-
export { continuationSafetyProtocol, cancelFormTask, contextualResponseProtocol, validateFormResponse, hasFormResponse, formProposalPolicy, stageFormProposal, nextFormProposal, formProposalReadings, bindFormProposal, decideFormProposal, commitFormProposals, settleFormProposalValidation, formProposalProtocol, validateFormProposalPolicy, validateFormProposalDescriptor, formProposalDescriptor, clearFormMisses, missFormInput, formMustComplete, formInputPrompt, consumeFormFeedback, formConversationOutcome, readMoneyAmount, isMoneyAmount, moneyIntentAllows, isPastPaymentStatement, isPartialMoneyAnswer, validateMoneyOptions, takeChoiceOffer, matchesChoice, ANSWER_WORDS, CONFIRM_WORDS, isAnswer, isAgentRequest, isOtherRequest, isSpelledFragment, isAmountAnswer, amountInAnswer, pickChoice, readEmail, readPhone, readInternationalPhone, readIdentifier, last4, maskEmail, callerTextNumber, textDestination, callerIsInternational, normalizeAndFindCapture, anythingElse, goodbye, sayName, dateToWords, amountToSpeech, validateCardNumber, validateExpiration, consumeActionReceipt, authorizeFormActionRetry, formSignature, selectFormAction, confirmFormRevision, prepareFormAction, actionConfirmationValid, beginFormAction, finishFormAction, actionGateVerified, sourceNeedsLoad, beginSourceRefresh, completeSourceRefresh, pickProviderQuestion, matchInputs, readFormAnswer, readInputProfile, formAcceptanceTrace, resolveFormInputs, formInputApplies, formInputFilled, nextFormInput, formInputChain, openFormInstance, validateFormIncompleteOutcome, formIncompleteOutcome, validateFormExhaustion, exhaustFormInput, formInitialReadings, orderFormReadings, proposedFormValues, applyFormValidation, formReadingDependencies, exclusiveFormReadings, enrichFormMatches, expandFormActivations, settleFormActivations, rememberFormArguments, resetFormInputs, hasFormValue, formPath, formValuesEqual, formReadingReady, formReadingRelevant, formPreparation, queueFormReadings, pendingFormReadings, formWorkLimit, answerResetsFormReplays, rejectFormReadings, invalidateFormInputs, acceptFormReadings, formInstanceApplies, formParentResume, closeFormInstance, checkOtp, maskDestination, validateOTP, OTP_EXPIRY_MS, validateDigits, validatePhone, validateEmail, urlToSpeech, textWithUrlToSpeech };
|
|
243
|
+
export { continuationSafetyProtocol, cancelFormTask, contextualResponseProtocol, validateFormResponse, hasFormResponse, formProposalPolicy, stageFormProposal, nextFormProposal, formProposalReadings, bindFormProposal, decideFormProposal, commitFormProposals, settleFormProposalValidation, formProposalProtocol, validateFormProposalPolicy, validateFormProposalDescriptor, formProposalDescriptor, clearFormMisses, missFormInput, formMustComplete, formInputPrompt, consumeFormFeedback, formConversationOutcome, readMoneyAmount, isMoneyAmount, moneyIntentAllows, isPastPaymentStatement, isPartialMoneyAnswer, validateMoneyOptions, takeChoiceOffer, matchesChoice, ANSWER_WORDS, CONFIRM_WORDS, isAnswer, isAgentRequest, isExitRequest, isOtherRequest, isSpelledFragment, isAmountAnswer, amountInAnswer, pickChoice, readEmail, readPhone, readInternationalPhone, readIdentifier, last4, maskEmail, callerTextNumber, textDestination, callerIsInternational, normalizeAndFindCapture, anythingElse, goodbye, sayName, dateToWords, amountToSpeech, validateCardNumber, validateExpiration, consumeActionReceipt, authorizeFormActionRetry, formSignature, selectFormAction, confirmFormRevision, prepareFormAction, actionConfirmationValid, beginFormAction, finishFormAction, actionGateVerified, sourceNeedsLoad, beginSourceRefresh, completeSourceRefresh, pickProviderQuestion, matchInputs, readFormAnswer, readInputProfile, formAcceptanceTrace, resolveFormInputs, formInputApplies, formInputFilled, nextFormInput, formInputChain, openFormInstance, validateFormIncompleteOutcome, formIncompleteOutcome, validateFormExhaustion, exhaustFormInput, formInitialReadings, orderFormReadings, proposedFormValues, applyFormValidation, formReadingDependencies, exclusiveFormReadings, enrichFormMatches, expandFormActivations, settleFormActivations, rememberFormArguments, resetFormInputs, hasFormValue, formPath, formValuesEqual, formReadingReady, formReadingRelevant, formPreparation, queueFormReadings, pendingFormReadings, formWorkLimit, answerResetsFormReplays, rejectFormReadings, invalidateFormInputs, acceptFormReadings, formInstanceApplies, formParentResume, closeFormInstance, checkOtp, maskDestination, validateOTP, OTP_EXPIRY_MS, validateDigits, validatePhone, validateEmail, urlToSpeech, textWithUrlToSpeech };
|
|
242
244
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.js"],"names":[],"mapp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nB,mBAAmB;mCAAnB,mBAAmB;gCAe1I,mBAAmB;mCAAnB,mBAAmB;sCAAnB,mBAAmB;qCAAnB,mBAAmB;4BAUjC,mBAAmB;+BAAnB,mBAAmB;iCAAnB,mBAAmB;oCAAnB,mBAAmB;kCACkoB,iBAAiB;iCAAjB,iBAAiB;gCAAjB,iBAAiB;8BAAjB,iBAAiB;+BAAjB,iBAAiB;iCAAjB,iBAAiB;8CAAjB,iBAAiB;sCAAjB,iBAAiB;uCAAjB,iBAAiB;iCAAjB,iBAAiB;oCAAjB,iBAAiB;kCAAjB,iBAAiB;mCAAjB,iBAAiB;oCAAjB,iBAAiB;wCAAjB,iBAAiB;sCAAjB,iBAAiB;kCAAjB,iBAAiB;sCAAjB,iBAAiB;sCAAjB,iBAAiB;sCAAjB,iBAAiB;gCAAjB,iBAAiB;6BAAjB,iBAAiB;yBAAjB,iBAAiB;gCAAjB,iBAAiB;iCAAjB,iBAAiB;oCAAjB,iBAAiB;gCAAjB,iBAAiB;kCAAjB,iBAAiB;oCAAjB,iBAAiB;8BAAjB,iBAAiB;wCAAjB,iBAAiB;mCAAjB,iBAAiB;qCAAjB,iBAAiB;mCAAjB,iBAAiB;oCAAjB,iBAAiB;iCAAjB,iBAAiB;kCAAjB,iBAAiB;yBACnrB,gBAAgB;gCAAhB,gBAAgB;4BAAhB,gBAAgB;8BAAhB,gBAAgB;+BACzB,iBAAiB;8BAAjB,iBAAiB;8BAAjB,iBAAiB;4BAC7B,iBAAiB;oCAAjB,iBAAiB"}
|
package/dist/helpers/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import { consumeActionReceipt, authorizeFormActionRetry, formSignature, selectFo
|
|
|
23
23
|
import { sourceNeedsLoad, beginSourceRefresh, completeSourceRefresh, pickProviderQuestion } from './form-sources.js';
|
|
24
24
|
import { matchesChoice } from './matches-choice.js';
|
|
25
25
|
import { readMoneyAmount, isMoneyAmount, moneyIntentAllows, isPastPaymentStatement, isPartialMoneyAnswer, validateMoneyOptions } from './money.js';
|
|
26
|
-
import { ANSWER_WORDS, CONFIRM_WORDS, isAnswer, isAgentRequest, isOtherRequest, isSpelledFragment, isAmountAnswer, amountInAnswer, pickChoice } from './answer.js';
|
|
26
|
+
import { ANSWER_WORDS, CONFIRM_WORDS, isAnswer, isAgentRequest, isExitRequest, isOtherRequest, isSpelledFragment, isAmountAnswer, amountInAnswer, pickChoice } from './answer.js';
|
|
27
27
|
import { readEmail, readPhone, readInternationalPhone, readIdentifier, last4, maskEmail, callerTextNumber, textDestination, callerIsInternational } from './contact.js';
|
|
28
28
|
import { normalizeAndFindCapture } from './capture.js';
|
|
29
29
|
import { anythingElse, goodbye, sayName } from './phrases.js';
|
|
@@ -35,13 +35,13 @@ import { resolveFormInputs, formInputApplies, formInputFilled, nextFormInput, fo
|
|
|
35
35
|
import { checkOtp, maskDestination, validateOTP, OTP_EXPIRY_MS } from './otp-check.js';
|
|
36
36
|
import { validateDigits, validatePhone, validateEmail } from './validators.js';
|
|
37
37
|
import { urlToSpeech, textWithUrlToSpeech } from './url-speech.js';
|
|
38
|
-
export { continuationSafetyProtocol, cancelFormTask, contextualResponseProtocol, validateFormResponse, hasFormResponse, formProposalPolicy, stageFormProposal, nextFormProposal, formProposalReadings, bindFormProposal, decideFormProposal, commitFormProposals, settleFormProposalValidation, formProposalProtocol, validateFormProposalPolicy, validateFormProposalDescriptor, formProposalDescriptor, clearFormMisses, missFormInput, formMustComplete, formInputPrompt, consumeFormFeedback, formConversationOutcome, readMoneyAmount, isMoneyAmount, moneyIntentAllows, isPastPaymentStatement, isPartialMoneyAnswer, validateMoneyOptions, takeChoiceOffer, matchesChoice, ANSWER_WORDS, CONFIRM_WORDS, isAnswer, isAgentRequest, isOtherRequest, isSpelledFragment, isAmountAnswer, amountInAnswer, pickChoice, readEmail, readPhone, readInternationalPhone, readIdentifier, last4, maskEmail, callerTextNumber, textDestination, callerIsInternational, normalizeAndFindCapture, anythingElse, goodbye, sayName, dateToWords, amountToSpeech, validateCardNumber, validateExpiration, consumeActionReceipt, authorizeFormActionRetry, formSignature, selectFormAction, confirmFormRevision, prepareFormAction, actionConfirmationValid, beginFormAction, finishFormAction, actionGateVerified, sourceNeedsLoad, beginSourceRefresh, completeSourceRefresh, pickProviderQuestion, matchInputs, readFormAnswer, readInputProfile, formAcceptanceTrace, resolveFormInputs, formInputApplies, formInputFilled, nextFormInput, formInputChain, openFormInstance, validateFormIncompleteOutcome, formIncompleteOutcome, validateFormExhaustion, exhaustFormInput, formInitialReadings, orderFormReadings, proposedFormValues, applyFormValidation, formReadingDependencies, exclusiveFormReadings, enrichFormMatches, expandFormActivations, settleFormActivations, rememberFormArguments, resetFormInputs, hasFormValue, formPath, formValuesEqual, formReadingReady, formReadingRelevant, formPreparation, queueFormReadings, pendingFormReadings, formWorkLimit, answerResetsFormReplays, rejectFormReadings, invalidateFormInputs, acceptFormReadings, formInstanceApplies, formParentResume, closeFormInstance, checkOtp, maskDestination, validateOTP, OTP_EXPIRY_MS, validateDigits, validatePhone, validateEmail, urlToSpeech, textWithUrlToSpeech, };
|
|
38
|
+
export { continuationSafetyProtocol, cancelFormTask, contextualResponseProtocol, validateFormResponse, hasFormResponse, formProposalPolicy, stageFormProposal, nextFormProposal, formProposalReadings, bindFormProposal, decideFormProposal, commitFormProposals, settleFormProposalValidation, formProposalProtocol, validateFormProposalPolicy, validateFormProposalDescriptor, formProposalDescriptor, clearFormMisses, missFormInput, formMustComplete, formInputPrompt, consumeFormFeedback, formConversationOutcome, readMoneyAmount, isMoneyAmount, moneyIntentAllows, isPastPaymentStatement, isPartialMoneyAnswer, validateMoneyOptions, takeChoiceOffer, matchesChoice, ANSWER_WORDS, CONFIRM_WORDS, isAnswer, isAgentRequest, isExitRequest, isOtherRequest, isSpelledFragment, isAmountAnswer, amountInAnswer, pickChoice, readEmail, readPhone, readInternationalPhone, readIdentifier, last4, maskEmail, callerTextNumber, textDestination, callerIsInternational, normalizeAndFindCapture, anythingElse, goodbye, sayName, dateToWords, amountToSpeech, validateCardNumber, validateExpiration, consumeActionReceipt, authorizeFormActionRetry, formSignature, selectFormAction, confirmFormRevision, prepareFormAction, actionConfirmationValid, beginFormAction, finishFormAction, actionGateVerified, sourceNeedsLoad, beginSourceRefresh, completeSourceRefresh, pickProviderQuestion, matchInputs, readFormAnswer, readInputProfile, formAcceptanceTrace, resolveFormInputs, formInputApplies, formInputFilled, nextFormInput, formInputChain, openFormInstance, validateFormIncompleteOutcome, formIncompleteOutcome, validateFormExhaustion, exhaustFormInput, formInitialReadings, orderFormReadings, proposedFormValues, applyFormValidation, formReadingDependencies, exclusiveFormReadings, enrichFormMatches, expandFormActivations, settleFormActivations, rememberFormArguments, resetFormInputs, hasFormValue, formPath, formValuesEqual, formReadingReady, formReadingRelevant, formPreparation, queueFormReadings, pendingFormReadings, formWorkLimit, answerResetsFormReplays, rejectFormReadings, invalidateFormInputs, acceptFormReadings, formInstanceApplies, formParentResume, closeFormInstance, checkOtp, maskDestination, validateOTP, OTP_EXPIRY_MS, validateDigits, validatePhone, validateEmail, urlToSpeech, textWithUrlToSpeech, };
|
|
39
39
|
/** The functions flows call by name, ready to spread into a host's approved functions. */
|
|
40
40
|
export const STANDARD_FUNCTIONS = {
|
|
41
41
|
continuationSafetyProtocol, cancelFormTask, contextualResponseProtocol, validateFormResponse, hasFormResponse,
|
|
42
42
|
formProposalPolicy, stageFormProposal, nextFormProposal, formProposalReadings, bindFormProposal, decideFormProposal, commitFormProposals, settleFormProposalValidation, formProposalProtocol, validateFormProposalPolicy, validateFormProposalDescriptor, formProposalDescriptor,
|
|
43
43
|
clearFormMisses, missFormInput, formMustComplete, formInputPrompt, consumeFormFeedback, formConversationOutcome,
|
|
44
|
-
readMoneyAmount, isMoneyAmount, moneyIntentAllows, isPastPaymentStatement, isPartialMoneyAnswer, validateMoneyOptions, takeChoiceOffer, matchesChoice, isAnswer, isAgentRequest, isOtherRequest, isSpelledFragment, isAmountAnswer, amountInAnswer, pickChoice,
|
|
44
|
+
readMoneyAmount, isMoneyAmount, moneyIntentAllows, isPastPaymentStatement, isPartialMoneyAnswer, validateMoneyOptions, takeChoiceOffer, matchesChoice, isAnswer, isAgentRequest, isExitRequest, isOtherRequest, isSpelledFragment, isAmountAnswer, amountInAnswer, pickChoice,
|
|
45
45
|
readEmail, readPhone, readInternationalPhone, readIdentifier, last4, maskEmail, callerTextNumber, textDestination, callerIsInternational,
|
|
46
46
|
normalizeAndFindCapture, anythingElse, goodbye, sayName, dateToWords, amountToSpeech, validateCardNumber, validateExpiration, consumeActionReceipt, authorizeFormActionRetry, formSignature, selectFormAction, confirmFormRevision, prepareFormAction, actionConfirmationValid, beginFormAction, finishFormAction, actionGateVerified, sourceNeedsLoad, beginSourceRefresh, completeSourceRefresh, pickProviderQuestion, matchInputs, readFormAnswer, readInputProfile, formAcceptanceTrace, resolveFormInputs, formInputApplies, formInputFilled, nextFormInput, formInputChain, openFormInstance, validateFormIncompleteOutcome, formIncompleteOutcome, validateFormExhaustion, exhaustFormInput, formInitialReadings, orderFormReadings, proposedFormValues, applyFormValidation, formReadingDependencies, exclusiveFormReadings, enrichFormMatches, expandFormActivations, settleFormActivations, rememberFormArguments, resetFormInputs, hasFormValue, formPath, formValuesEqual, formReadingReady, formReadingRelevant, formPreparation, queueFormReadings, pendingFormReadings, formWorkLimit, answerResetsFormReplays, rejectFormReadings, invalidateFormInputs, acceptFormReadings, formInstanceApplies, formParentResume, closeFormInstance,
|
|
47
47
|
validateOTP, validateDigits, validatePhone, validateEmail, urlToSpeech, textWithUrlToSpeech,
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAC1D,YAAY,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAyB1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,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AmCxB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAmBxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA4C3B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAiDzB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAmC7B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAwC5B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAe9B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAmChC;;;;OAIG;IACH,gBAAgB,CAAC,OAAO,GAAE,GAAQ,GAAG,GAAG;IAkHxC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAwE5B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAe7B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA2BhC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAiC9B;;OAEG;IACH,OAAO,CAAC,2BAA2B;IA2CnC;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA6BhC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAwB7B,OAAO,CAAC,wBAAwB;IAMhC,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,wBAAwB;IAShC,OAAO,CAAC,2BAA2B;CAKpC"}
|
package/dist/index.js
CHANGED
|
@@ -2954,7 +2954,9 @@ async function detectFlowInTwoStages(input, engine, flows) {
|
|
|
2954
2954
|
* The reply ranker (jsfe/host reply-rank): what the latest message does with the question a contextual DISPATCH
|
|
2955
2955
|
* asked — `answers`, `abort` or `new_request`. ONE aiCallback call whose 4th argument carries both executors'
|
|
2956
2956
|
* instructions; the host answers with System One and covers it with a text model (its aiCallbackRank). A reply that
|
|
2957
|
-
* is not an offered option throws, and the pending step stays for the caller's error policy.
|
|
2957
|
+
* is not an offered option throws, and the pending step stays for the caller's error policy. `confident` is false only
|
|
2958
|
+
* when the host says `answers` is the default because no option cleared its cut (`fallback: true`); an answer
|
|
2959
|
+
* without that flag (a text model's pick, or a host that does not send it) is a confident one.
|
|
2958
2960
|
*/
|
|
2959
2961
|
async function rankReply(input, engine, question) {
|
|
2960
2962
|
const { input: cleanInput, conversation } = buildDetectFlowRequest(input, engine.lastChatTurn, []);
|
|
@@ -2963,8 +2965,17 @@ async function rankReply(input, engine, question) {
|
|
|
2963
2965
|
const option = String(reply.option ?? '');
|
|
2964
2966
|
if (!REPLY_OPTIONS.includes(option))
|
|
2965
2967
|
throw new Error(`rank_reply: "${option.slice(0, 40)}" is not an offered option`);
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
+
const confident = reply.fallback !== true;
|
|
2969
|
+
logger.info(`rank_reply: ${option}${confident ? '' : ' (default: no option cleared the cut)'} for ${JSON.stringify(cleanInput)}`);
|
|
2970
|
+
return { option, confident };
|
|
2971
|
+
}
|
|
2972
|
+
/**
|
|
2973
|
+
* The field a confidently ranked answer carries as said when extraction finds nothing: the ONE parameter of a
|
|
2974
|
+
* declaration that marks it `verbatim: true` (an open answer whose words are the value, such as a reason). Opt-in:
|
|
2975
|
+
* a field that names a thing to look up (a product, a city) needs a real extraction, never the whole reply.
|
|
2976
|
+
*/
|
|
2977
|
+
function verbatimReplyField(parameters) {
|
|
2978
|
+
return parameters.length === 1 && parameters[0].verbatim === true ? parameters[0].name : null;
|
|
2968
2979
|
}
|
|
2969
2980
|
/**
|
|
2970
2981
|
* A typed contextual response: the reply answers the question, so its declared fields are extracted with the
|
|
@@ -2972,7 +2983,7 @@ async function rankReply(input, engine, question) {
|
|
|
2972
2983
|
*/
|
|
2973
2984
|
async function extractReplyParameters(input, engine, question, parameters) {
|
|
2974
2985
|
const { input: cleanInput, conversation } = buildDetectFlowRequest(input, engine.lastChatTurn, []);
|
|
2975
|
-
const reply = { id: '__jsfe_reply__', name: 'CurrentQuestion', version: '1.0.0', description: 'The reply to the current question', steps: [], parameters };
|
|
2986
|
+
const reply = { id: '__jsfe_reply__', name: 'CurrentQuestion', version: '1.0.0', description: 'The reply to the current question', steps: [], parameters: parameters.map(({ verbatim, ...parameter }) => parameter) };
|
|
2976
2987
|
const stage2 = buildParameterStage(cleanInput, conversation.concat([{ role: 'assistant', content: question }]), reply);
|
|
2977
2988
|
const answer = parseStageReply(await fetchAiResponse(stage2.llm.system, stage2.llm.user, engine.aiCallback, engine.aiTimeOut, stageSchema('extract_parameters', stage2.llm.schema), stage2));
|
|
2978
2989
|
const given = answer.parameters && typeof answer.parameters === 'object' ? answer.parameters : {};
|
|
@@ -5725,22 +5736,11 @@ async function handleIntentInterruption(input, engine, userId) {
|
|
|
5725
5736
|
currentFlowFrame.lastSayMessage ||
|
|
5726
5737
|
currentFlowFrame.flowStepsStack.length > 0;
|
|
5727
5738
|
logger.debug(`Interrupt intent analysis for: ${input} pendingVariable: ${currentFlowFrame.pendingVariable}, lastSayMessage: ${!!currentFlowFrame.lastSayMessage}, stepsLeft: ${currentFlowFrame.flowStepsStack.length}`);
|
|
5728
|
-
//
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
}
|
|
5734
|
-
else {
|
|
5735
|
-
// Fallback to exact match for non-AI environments
|
|
5736
|
-
const flowsMenu = engine.flowsMenu || [];
|
|
5737
|
-
const matchingFlow = flowsMenu.find(flow => flow.id.toLowerCase() === input.toLowerCase() || flow.name.toLowerCase() === input.toLowerCase());
|
|
5738
|
-
intentAnalysis = {
|
|
5739
|
-
isStrongIntent: !!matchingFlow,
|
|
5740
|
-
targetFlow: matchingFlow ? matchingFlow.id : null
|
|
5741
|
-
};
|
|
5742
|
-
logger.info(`Intent analysis (no AI):`, intentAnalysis);
|
|
5743
|
-
}
|
|
5739
|
+
// The same intent detection as a new request (two-stage when the host configured it): a detected flow interrupts,
|
|
5740
|
+
// started with the arguments detection extracted.
|
|
5741
|
+
const detected = await detectFlowWithParameters(input, engine);
|
|
5742
|
+
const intentAnalysis = { isStrongIntent: !!detected, targetFlow: detected ? detected.flow.name : null, parameters: detected?.parameters || {}, originalInput: input };
|
|
5743
|
+
logger.debug(`Interruption detection: ${JSON.stringify({ targetFlow: intentAnalysis.targetFlow, parameters: intentAnalysis.parameters })}`);
|
|
5744
5744
|
if (intentAnalysis.isStrongIntent && intentAnalysis.targetFlow) {
|
|
5745
5745
|
// Check if the target flow is different from current flow
|
|
5746
5746
|
if (intentAnalysis.targetFlow !== currentFlowName) {
|
|
@@ -5753,76 +5753,6 @@ async function handleIntentInterruption(input, engine, userId) {
|
|
|
5753
5753
|
return null; // No strong intent interruption detected
|
|
5754
5754
|
}
|
|
5755
5755
|
// Analyze intent strength using AI
|
|
5756
|
-
async function analyzeIntentStrength(input, engine) {
|
|
5757
|
-
const currentFlowFrame = getCurrentFlowFrame(engine);
|
|
5758
|
-
const currentFlowName = currentFlowFrame.flowName;
|
|
5759
|
-
const flowsMenu = engine.flowsMenu || [];
|
|
5760
|
-
// Use the enhanced fetchAiTask worker with JSON schema
|
|
5761
|
-
const task = "Analyze the user input within the current flow context to determine if it represents a STRONG intent to switch to a completely different workflow, or if it's a response to the current flow.";
|
|
5762
|
-
const rules = `Critical Analysis Framework:
|
|
5763
|
-
1. Examine the flow history to understand what question or prompt the current flow is expecting
|
|
5764
|
-
2. Determine if the user input is:
|
|
5765
|
-
- A STRONG intent for a new workflow (clear, specific action request)
|
|
5766
|
-
- A response to the current flow's prompt (continue current flow)
|
|
5767
|
-
- A clarification or question about the current flow (continue current flow)
|
|
5768
|
-
|
|
5769
|
-
STRONG intent indicators (switch to new flow):
|
|
5770
|
-
- Explicit action requests: "I want to make a payment", "Check my account balance"
|
|
5771
|
-
- Complete topic changes: "What's the weather?" when in a payment flow
|
|
5772
|
-
- New service requests: "I need to transfer money" when in account verification
|
|
5773
|
-
|
|
5774
|
-
WEAK intent indicators (continue current flow):
|
|
5775
|
-
- Direct responses to prompts: "1", "2", "Yes", "No", specific values
|
|
5776
|
-
- Follow-up questions: "What does that mean?", "Can you clarify?"
|
|
5777
|
-
- Partial information: Single words, numbers, or brief phrases that answer the current question
|
|
5778
|
-
- Corrections: "Actually, it's 123-456-7890" when asked for a phone number
|
|
5779
|
-
|
|
5780
|
-
Consider the flow context carefully - if the flow just asked a specific question, treat the input as a response unless it's clearly unrelated.`;
|
|
5781
|
-
// Use flow context when analyzing intent (we're already in a flow)
|
|
5782
|
-
let context = `CURRENT SITUATION: User is in "${currentFlowName}" flow. Analyze if their input is a response to this flow or a request for a different workflow.
|
|
5783
|
-
|
|
5784
|
-
IMPORTANT: Be very conservative about interrupting flows - only classify as STRONG intent if the input is clearly unrelated to what the current flow is asking for.`;
|
|
5785
|
-
if (currentFlowFrame.contextStack && currentFlowFrame.contextStack.length > 0) {
|
|
5786
|
-
const flowContext = flattenContextStack(currentFlowFrame.contextStack, true);
|
|
5787
|
-
context = `<flow-history>
|
|
5788
|
-
${flowContext}
|
|
5789
|
-
</flow-history>
|
|
5790
|
-
|
|
5791
|
-
${context}`;
|
|
5792
|
-
}
|
|
5793
|
-
const jsonSchema = JSON.stringify({
|
|
5794
|
-
type: "json_schema",
|
|
5795
|
-
json_schema: {
|
|
5796
|
-
name: "intent_analysis",
|
|
5797
|
-
strict: true,
|
|
5798
|
-
schema: {
|
|
5799
|
-
type: "object",
|
|
5800
|
-
properties: {
|
|
5801
|
-
isStrongIntent: { type: "boolean" },
|
|
5802
|
-
targetFlow: { type: ["string", "null"] },
|
|
5803
|
-
confidence: { type: "number" },
|
|
5804
|
-
reasoning: { type: "string" }
|
|
5805
|
-
},
|
|
5806
|
-
required: ["isStrongIntent", "targetFlow", "confidence", "reasoning"],
|
|
5807
|
-
additionalProperties: false
|
|
5808
|
-
}
|
|
5809
|
-
}
|
|
5810
|
-
});
|
|
5811
|
-
try {
|
|
5812
|
-
const analysis = await fetchAiTask(task, rules, context, input, flowsMenu, jsonSchema, engine.aiCallback, engine.aiTimeOut);
|
|
5813
|
-
// Ensure analysis is an object and add originalInput
|
|
5814
|
-
if (typeof analysis === 'object' && analysis !== null) {
|
|
5815
|
-
analysis.originalInput = input; // Preserve the original input
|
|
5816
|
-
}
|
|
5817
|
-
logger.info(`Intent analysis:`, analysis);
|
|
5818
|
-
return analysis;
|
|
5819
|
-
}
|
|
5820
|
-
catch (error) {
|
|
5821
|
-
logger.warn(`Intent analysis error:`, error.message);
|
|
5822
|
-
logger.info(`Stack trace:`, error.stack);
|
|
5823
|
-
return { isStrongIntent: false, targetFlow: null, confidence: 0, reasoning: `Error: ${error.message}`, originalInput: input };
|
|
5824
|
-
}
|
|
5825
|
-
}
|
|
5826
5756
|
// Handle confirmed switch from pending interruption
|
|
5827
5757
|
async function handlePendingInterruptionSwitch(engine, userId) {
|
|
5828
5758
|
const currentFlowFrame = getCurrentFlowFrame(engine);
|
|
@@ -5915,7 +5845,7 @@ async function handleRegularFlowInterruption(intentAnalysis, engine, userId) {
|
|
|
5915
5845
|
flowStepsStack: cloneFlowValue(targetFlowDefinition.steps).reverse(),
|
|
5916
5846
|
contextStack: [], // Start with empty context - don't use interruption input
|
|
5917
5847
|
inputStack: [], // Start with empty input stack - new flow will get proper input next
|
|
5918
|
-
variables: getInitialVariables(engine, targetFlowDefinition), //
|
|
5848
|
+
variables: { ...getInitialVariables(engine, targetFlowDefinition), ...(intentAnalysis.parameters || {}) }, // fresh variables + the arguments detection extracted
|
|
5919
5849
|
transaction: newTransaction,
|
|
5920
5850
|
userId: userId,
|
|
5921
5851
|
startTime: Date.now()
|
|
@@ -6011,8 +5941,9 @@ async function processActivity(input, userId, engine) {
|
|
|
6011
5941
|
}
|
|
6012
5942
|
// A model error leaves this live continuation pending for the caller's error policy.
|
|
6013
5943
|
let option;
|
|
5944
|
+
let confident;
|
|
6014
5945
|
try {
|
|
6015
|
-
option = await rankReply(String(sanitizedInput), engine, question);
|
|
5946
|
+
({ option, confident } = await rankReply(String(sanitizedInput), engine, question));
|
|
6016
5947
|
}
|
|
6017
5948
|
catch (error) {
|
|
6018
5949
|
guardedRoutingFailed = true;
|
|
@@ -6021,13 +5952,32 @@ async function processActivity(input, userId, engine) {
|
|
|
6021
5952
|
ranked = option;
|
|
6022
5953
|
if (option === 'answers') {
|
|
6023
5954
|
if (declaration) {
|
|
5955
|
+
// A confident answer is never lost: when extraction finds nothing (or fails) in a `verbatim` field, the
|
|
5956
|
+
// field is the reply as said. A default `answers` keeps extraction as the judge, so an empty field
|
|
5957
|
+
// stays empty and the flow asks again.
|
|
5958
|
+
const verbatim = confident ? verbatimReplyField(declaration.parameters) : null;
|
|
5959
|
+
let extracted;
|
|
6024
5960
|
try {
|
|
6025
|
-
|
|
5961
|
+
extracted = await extractReplyParameters(String(sanitizedInput), engine, question, declaration.parameters);
|
|
6026
5962
|
}
|
|
6027
5963
|
catch (error) {
|
|
6028
|
-
|
|
6029
|
-
|
|
5964
|
+
if (verbatim) {
|
|
5965
|
+
logger.warn(`Contextual DISPATCH in '${frame.flowName}': extraction failed (${error?.message}); the confident answer is kept as said`);
|
|
5966
|
+
extracted = {};
|
|
5967
|
+
}
|
|
5968
|
+
else {
|
|
5969
|
+
guardedRoutingFailed = true;
|
|
5970
|
+
throw error;
|
|
5971
|
+
}
|
|
5972
|
+
}
|
|
5973
|
+
if (verbatim && !(typeof extracted[verbatim] === 'string' && extracted[verbatim].trim())) {
|
|
5974
|
+
logger.info(`Contextual DISPATCH in '${frame.flowName}': nothing extracted from a confident answer; '${verbatim}' is the reply as said`);
|
|
5975
|
+
extracted = { ...extracted, [verbatim]: String(sanitizedInput) };
|
|
5976
|
+
}
|
|
5977
|
+
else {
|
|
5978
|
+
// extraction carried the field, or the answer was not confident or not open
|
|
6030
5979
|
}
|
|
5980
|
+
frame.variables[declaration.variable] = extracted;
|
|
6031
5981
|
}
|
|
6032
5982
|
else {
|
|
6033
5983
|
// no typed response: the flow reads the reply itself
|
package/dist/runtime-identity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const JSFE_RUNTIME_FINGERPRINT = "sha256:
|
|
1
|
+
export const JSFE_RUNTIME_FINGERPRINT = "sha256:d2fe25c463500cc6a524418c9ccb5ac710130ac6cce764894ca522f6fe83a22c";
|
|
@@ -247,7 +247,7 @@ The loop skips accepted data and asks the first ready missing required field. Co
|
|
|
247
247
|
|
|
248
248
|
### Retry, yield and recovery
|
|
249
249
|
|
|
250
|
-
`max_misses` defaults to two consecutive unreadable answers: clarify the first with explicit retry text or a localized “Sorry, I didn't catch that.” prefix; yield the second utterance to DISPATCH while preserving the draft.
|
|
250
|
+
`max_misses` defaults to two consecutive unreadable answers: clarify the first with explicit retry text or a localized “Sorry, I didn't catch that.” prefix; yield the second utterance to DISPATCH while preserving the draft. An unreadable answer of three or more words (any words at an amount) goes to the reply ranker instead: `answers` takes the offered choice it picks, else asks again (counted against `max_attempts`); only `abort` or `new_request` leaves the form. Validator failures use a separate `max_attempts` budget. An out-of-order accepted answer is not a miss. On exhaustion the nearest declared `on_exhausted` receives `{form,input,failed_form,failed_input,reason:"attempts_exhausted"}` and must deliberately recover that branch; it does not receive consent.
|
|
251
251
|
|
|
252
252
|
`must_complete:true` on a form (inherited by every field of it and of the forms nested in it) or on one field (`false` on a field opts out): an unreadable answer is never yielded to DISPATCH, however long, and neither is a confirmation miss or an unresolved ambiguity — the question is asked again, acknowledged. Use it where leaving would strand an effect in progress (a payment's card, its billing-ZIP correction). Exits stay explicit: the form's stop words, `max_attempts` with `on_exhausted`, and whatever the host intercepts before the engine. The form runaway guard counts passes without a caller answer only.
|
|
253
253
|
|
|
@@ -264,7 +264,7 @@ Ordinary DISPATCH is the default uncertainty escape. An explicit contextual DISP
|
|
|
264
264
|
}
|
|
265
265
|
```
|
|
266
266
|
|
|
267
|
-
Declare `response` as a local object variable. The reply ranker answers `answers`, `abort` or `new_request` (nothing clear is `answers`). `answers` retains the live continuation and runs the following recovery steps; an optional typed response writes a cloned normalized object before continuing. `new_request` routes the input through intent detection; `abort` ends every flow as a RETURN with the reply `cmd_request_aborted` and outcome `user_aborted` (no recovery stamp). Neither writes that response object. Typed contextual v1 permits primitive string/boolean/number/integer fields, not object/array/jsonSchema. Missing fields remain missing. Errors preserve the pending step and prior object. Context is supplied to that decision without overwriting saved conversation history. This is existing configured intent/extraction, not authorization and not a snapshot restore.
|
|
267
|
+
Declare `response` as a local object variable. A single open string parameter whose words are the value (a reason, a description) may add `"verbatim":true`: a confident `answers` then keeps the reply as said when extraction finds nothing. Never mark a field that names something to look up (a product, a city). The reply ranker answers `answers`, `abort` or `new_request` (nothing clear is `answers`). `answers` retains the live continuation and runs the following recovery steps; an optional typed response writes a cloned normalized object before continuing. `new_request` routes the input through intent detection; `abort` ends every flow as a RETURN with the reply `cmd_request_aborted` and outcome `user_aborted` (no recovery stamp). Neither writes that response object. Typed contextual v1 permits primitive string/boolean/number/integer fields, not object/array/jsonSchema. Missing fields remain missing. Errors preserve the pending step and prior object. Context is supplied to that decision without overwriting saved conversation history. This is existing configured intent/extraction, not authorization and not a snapshot restore.
|
|
268
268
|
|
|
269
269
|
## 7. Providers
|
|
270
270
|
|
|
@@ -213,3 +213,42 @@ This corrective release follows the same authorized dev-only rollout: exact cons
|
|
|
213
213
|
A contextual DISPATCH (`onResponse: "continue"`) now asks one question: what does the reply do with the step's question? The reply ranker (`jsfe/host` `buildReplyRank`, task `rank_reply`, 4th aiCallback argument with `llm` and `systemOne` instructions) answers `answers`, `abort` or `new_request`; nothing clear is `answers`. `answers` continues the flow, extracting declared `responseParameters` with a stage-2 request; `abort` is a RETURN: every flow ends and the reply is the new system message `cmd_request_aborted` ("The process has been cancelled at your request - how can I help you?"; es: "El proceso fue cancelado a petición suya - ¿cómo puedo ayudarle?"), outcome `user_aborted` (new: transaction failed, never a post-mortem), no recovery stamp; `new_request` ends them and routes the input through intent detection. Only a new request is routed: after `answers` a later ordinary DISPATCH in the same turn goes to the host unrouted, so an answer never restarts its own flow.
|
|
214
214
|
|
|
215
215
|
Removed: the synthetic `ContinueCurrent` flow offered beside the primaries, its reserved name, and the per-turn routing cache shared between contextual and ordinary dispatch. Flow attributes and the `jsfe:contextual-responses:v1` protocol are unchanged. A host that does not know `rank_reply` answers its `llm` instructions with a text model. ReadFormResponse's question no longer sends uncertain replies to the host.
|
|
216
|
+
|
|
217
|
+
## 1.11.1 — interruption uses the primary intent detection
|
|
218
|
+
|
|
219
|
+
In a flow with `interruptable: true`, a reply is checked with the same intent detection as a new request (`detectFlowWithParameters`: two-stage when `engine.intentDetection = 'two-stage'`, so Jev with its LLM hedge): a detected primary interrupts on a new stack, started with the arguments stage 2 extracted. Removed: the separate `intent_analysis` call (`analyzeIntentStrength`).
|
|
220
|
+
|
|
221
|
+
**EXIT is the whole answer.** Every EXIT in the authentication flows (the contact prompt, the verification code, the
|
|
222
|
+
retry menus, the email prompt) now uses `isExitRequest`: the whole answer is exit, quit, abort, salir, cancel or cancelar
|
|
223
|
+
(with "please" / "por favor"), or `*`. A sentence that contains one ("Cancelar el pedido" at the code prompt) is not an
|
|
224
|
+
exit; at the code prompt it gets the "Let me explain" re-ask. Before, any answer containing the word (or, at the contact
|
|
225
|
+
prompt, any answer of at most two words containing it) ended the authentication in contact-support.
|
|
226
|
+
|
|
227
|
+
**A confident answer is never lost.** The host may add `fallback: true` to a `rank_reply` reply that is `answers` only
|
|
228
|
+
because no option cleared the cut. Without it the answer is confident: when the step declares one parameter marked `verbatim: true` (new, an open
|
|
229
|
+
string only; ReadFormResponse's answer is marked) and the stage-2 extraction finds nothing, or fails, the field is the
|
|
230
|
+
reply as said. An unmarked field always needs a real extraction (prod
|
|
231
|
+
2026-10-26: a cancellation reason ranked `answers`, extracted empty and went to the host,
|
|
232
|
+
whose guru answered it). A `fallback` answer leaves extraction as the judge; ReadFormResponse then rejects the reading
|
|
233
|
+
quietly and the form asks its question again, instead of handing the turn to the host.
|
|
234
|
+
|
|
235
|
+
**"asesor" / "asesora" are AGENT words.**
|
|
236
|
+
|
|
237
|
+
**A form gives up only for a new intent.** An answer a field's reader cannot read (three or more words, or any words at an
|
|
238
|
+
amount) no longer goes straight to the host with a plain DISPATCH: the reply ranker decides (`read-form-choice` for a
|
|
239
|
+
choice field, `read-form-reply` otherwise). `answers`: a choice takes the offered key the reply picks (stage-2 extraction
|
|
240
|
+
of `key`, checked against the offered keys), else the question is asked again with "Sorry, I didn't catch that.",
|
|
241
|
+
counted as an attempt, so `max_attempts` still bounds it; `abort` ends every flow; `new_request` goes to intent
|
|
242
|
+
detection. A host fixture that answered such turns with intent detection only must now also answer `rank_reply`.
|
|
243
|
+
|
|
244
|
+
**A press verb before a key picks it:** "ya oprimí el uno", "I already pressed one", "marqué el 2" (not after a negation).
|
|
245
|
+
|
|
246
|
+
## 1.12.0 — a confirmation's unread answer goes to the reply ranker
|
|
247
|
+
|
|
248
|
+
ConfirmForm no longer hands a long unread answer (three or more words, or any words when the form holds an amount) to the
|
|
249
|
+
host with a plain DISPATCH. The new shared worker `read-confirm-reply` ranks it against the confirmation question:
|
|
250
|
+
`answers` with the reply declining (stage-2 `key` = `no`) is the confirmation's NO, so the form's decline path runs;
|
|
251
|
+
`answers` with nothing declined asks the confirmation again, counted as a miss (two misses still hand off, as before);
|
|
252
|
+
`abort` ends every flow; `new_request` goes to intent detection. The ranker is offered NO only: a confirmation is accepted
|
|
253
|
+
only by its exact YES, never by a ranked reading. Hosts that ship the shared workers in a system set must add
|
|
254
|
+
`read-confirm-reply`; a host fixture that answered such turns with intent detection only must now also answer `rank_reply`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsfe",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.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",
|