jsfe 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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":"AA8IA;;;GAGG;AACH,wEAkBC;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;;;EA6BC;AAUD;;;;;;;;;GASG;AACH,6EAyGC;;;;;;;;AA3WD,qCAKiD"}
|
package/dist/helpers/answer.js
CHANGED
|
@@ -50,6 +50,11 @@ export const CONFIRM_WORDS = ['yes', 'yeah', 'yep', 'yup', 'sure', 'of course',
|
|
|
50
50
|
// AGENT words that also mean something else inside a sentence ("quiero pagar mi servicio", "someone else will pay"): they
|
|
51
51
|
// ask for a person only as the whole answer (AGENT_ONLY), never from inside one.
|
|
52
52
|
const AGENT_AMBIGUOUS = new Set(['servicio', 'support', 'someone', 'somebody', 'alguien', 'persona', 'a person', 'gente', 'al cliente']);
|
|
53
|
+
// TEXT words that name the message itself inside a sentence ("dónde me llegó en este mensaje", "the text you sent me"): they
|
|
54
|
+
// ask to switch to text only as the whole answer (TEXT_ONLY), never from inside one. Prod 2026-10-20: two callers looking for
|
|
55
|
+
// the code we had texted were switched to SMS and the call ended.
|
|
56
|
+
const TEXT_AMBIGUOUS = new Set(['text', 'texto', 'sms', 'message', 'mensaje', 'mensaje de texto', 'por texto', 'by text', 'whatsapp']);
|
|
57
|
+
const TEXT_ONLY = /^(?:(?:by|via|por|en|a|to)\s+)?(?:text|texto|sms|message|text message|mensaje|mensaje de texto|whatsapp)(?:\s+(?:please|por favor))?[.!?]*$/;
|
|
53
58
|
// A word that negates what follows it in its clause ("not sure", "no quiero un agente").
|
|
54
59
|
const NEGATIONS = ['no', 'not', 'nope', 'nah', 'never', 'dont', 'doesnt', 'didnt', 'cant', 'cannot', 'wont', 'nunca', 'ni',
|
|
55
60
|
'tampoco', 'jamas', 'jamás'];
|
|
@@ -151,6 +156,9 @@ export function isAnswer(input, kind, extra = []) {
|
|
|
151
156
|
else if (kind === 'yes') {
|
|
152
157
|
return onlyAffirmative(b, words);
|
|
153
158
|
}
|
|
159
|
+
else if (kind === 'text') {
|
|
160
|
+
return TEXT_ONLY.test(b) || matchesChoice(b, words.filter((w) => !TEXT_AMBIGUOUS.has(w)));
|
|
161
|
+
}
|
|
154
162
|
else {
|
|
155
163
|
return matchesChoice(b, words);
|
|
156
164
|
}
|
package/dist/runtime-identity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const JSFE_RUNTIME_FINGERPRINT = "sha256:
|
|
1
|
+
export const JSFE_RUNTIME_FINGERPRINT = "sha256:665b33c4b0ecad0f66b71c07956e793bee8983f92b047dfb4a0f2db13f3fc1a8";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsfe",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "TypeScript workflow engine for conversational/automation apps: multi-flow orchestration, interrupt/resume, stack-based control, robust errors, and flexible tool/REST integration.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ron Pinkas",
|