manychat-ai-agent 0.23.0 → 0.23.2
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/CHANGELOG.md +22 -0
- package/dist/agent/prompt.js +26 -8
- package/dist/agent/registry.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.23.2](https://github.com/pedronastasi/manychat-ai-agent/compare/v0.23.1...v0.23.2) (2026-10-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **agent:** honor tenant conversation policies and Luna reasoning ([6d16fa0](https://github.com/pedronastasi/manychat-ai-agent/commit/6d16fa078c908ec3c3a96be4ad1019d7cef42589))
|
|
9
|
+
|
|
10
|
+
## [0.23.1](https://github.com/pedronastasi/manychat-ai-agent/compare/v0.23.0...v0.23.1) (2026-10-13)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* continue an offering already selected in conversation ([e9d8353](https://github.com/pedronastasi/manychat-ai-agent/commit/e9d8353ce2c1dc134810f9632c09447a46970faf))
|
|
16
|
+
* continue an offering already selected in conversation ([d9b6aa4](https://github.com/pedronastasi/manychat-ai-agent/commit/d9b6aa4e5f9812538efcdda44e624bede5ef180f))
|
|
17
|
+
* **deps:** update patch dependencies ([#208](https://github.com/pedronastasi/manychat-ai-agent/issues/208)) ([d9ba610](https://github.com/pedronastasi/manychat-ai-agent/commit/d9ba6101326ba47f231a58de295e488c4189fc9a))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Specs and Docs
|
|
21
|
+
|
|
22
|
+
* specify complete conversation evals ([d8a0a48](https://github.com/pedronastasi/manychat-ai-agent/commit/d8a0a48fe3a8971424dc53ed83ce7de29204bc09))
|
|
23
|
+
* specify complete conversation evals ([81c4f83](https://github.com/pedronastasi/manychat-ai-agent/commit/81c4f83d6ea728ee85d41d19b8e07e3ac3a105f7))
|
|
24
|
+
|
|
3
25
|
## [0.23.0](https://github.com/pedronastasi/manychat-ai-agent/compare/v0.22.0...v0.23.0) (2026-10-08)
|
|
4
26
|
|
|
5
27
|
|
package/dist/agent/prompt.js
CHANGED
|
@@ -70,19 +70,28 @@ options = {}) {
|
|
|
70
70
|
persona.trim(),
|
|
71
71
|
'',
|
|
72
72
|
PROMPT_MARKERS[0],
|
|
73
|
-
|
|
73
|
+
"The persona above defines this tenant's business policy and conversation flow.",
|
|
74
|
+
'Its explicit response, escalation and closing-question policies take precedence over',
|
|
75
|
+
'the conversational defaults below. This does not override SECURITY, factual grounding,',
|
|
76
|
+
'the output schema or tool execution constraints.',
|
|
77
|
+
'1. Ground factual answers in the CATALOG. If it cannot answer, follow an explicit',
|
|
78
|
+
' response or escalation policy in the persona; otherwise escalate.',
|
|
74
79
|
'2. Never invent prices, dates, schedules, discounts or policies.',
|
|
75
80
|
'3. Discounts, "is that the best price?" or haggling: escalate with "price_negotiation".',
|
|
76
81
|
' Instalments or a payment plan: present the PAYMENT OPTIONS that cover it. If none',
|
|
77
82
|
' does, escalate with "price_negotiation".',
|
|
78
83
|
'4. Complaints, disputes or refund requests: escalate with "complaint".',
|
|
79
84
|
'5. A request to speak to a person: escalate with "explicit_request".',
|
|
80
|
-
'6.
|
|
85
|
+
'6. If neither the CATALOG nor a response policy in the persona covers the question,',
|
|
86
|
+
' escalate with "out_of_scope".',
|
|
81
87
|
'7. When unsure: escalate with "low_confidence". Escalating is correct; guessing is not.',
|
|
82
88
|
'8. Read short replies in context. When the contact answers your previous question — picks an option you offered, says yes/no, names a preference — that is a valid conversational answer: continue the conversation with high confidence. Never escalate a direct answer to your own question.',
|
|
83
|
-
'9. If asked whether you are a bot,
|
|
89
|
+
'9. If asked whether you are a bot, acknowledge the assistance honestly. Follow the',
|
|
90
|
+
" persona's wording and next step; absent that guidance, offer to pass them to someone.",
|
|
84
91
|
'10. Never restate a reply you already sent. If the information was already given, acknowledge briefly instead of repeating it.',
|
|
85
|
-
|
|
92
|
+
"11. For thanks, bye, ok, perfect, follow the persona's policy for pending versus",
|
|
93
|
+
' completed conversations. Without that policy, acknowledge briefly and offer help.',
|
|
94
|
+
' Never answer a closer by replaying your previous reply.',
|
|
86
95
|
'12. A contact who says they have paid, or sends a receipt: escalate with "payment_reported".',
|
|
87
96
|
' You cannot see payments, so never confirm one.',
|
|
88
97
|
'13. Never invent urgency or scarcity ("only two places left", "the price goes up on Friday")',
|
|
@@ -116,6 +125,7 @@ options = {}) {
|
|
|
116
125
|
'end of `messages`. Send null only when a question does not belong — a handoff,',
|
|
117
126
|
'a delicate or health matter, a contact who already has the payment link,',
|
|
118
127
|
'someone who has declined twice, or a turn whose opening flow asks it.',
|
|
128
|
+
'Follow any additional closing-question exceptions explicitly defined in the persona.',
|
|
119
129
|
'Null is a decision, not a way to skip the field.',
|
|
120
130
|
...(withTools ? ACTIONS_SECTION : []),
|
|
121
131
|
...(options.pluginTools ? PLUGIN_TOOLS_LINES : []),
|
|
@@ -239,6 +249,8 @@ function intentSection(tools) {
|
|
|
239
249
|
'reply does not greet the contact, introduce you or repeat what the flow says. If the',
|
|
240
250
|
'flow asks a question, do not ask it again, in any words: unless their message already',
|
|
241
251
|
'answers it, send closing_question null.',
|
|
252
|
+
'Apply this opening exception only after an actual openingQueued result or OPENING',
|
|
253
|
+
'note in this turn. A prospect write without that notice does not announce an opening.',
|
|
242
254
|
]
|
|
243
255
|
: []),
|
|
244
256
|
];
|
|
@@ -307,8 +319,13 @@ function offeringsSection(tools) {
|
|
|
307
319
|
`The field ${offering.id} records the offering this contact is buying, one of: ${offering.values.join(', ')}.`,
|
|
308
320
|
'Record it with set_field as soon as the contact chooses an offering or the fit is clear.',
|
|
309
321
|
'A flow listed with an offering is accepted only once that is the contact’s offering;',
|
|
310
|
-
'setting the offering earlier in the same turn is enough.
|
|
311
|
-
'
|
|
322
|
+
'setting the offering earlier in the same turn is enough. An absent recorded offering',
|
|
323
|
+
'does not mean the contact has not chosen. Check the current message and conversation',
|
|
324
|
+
'history, including an offering name or catalog page they supplied and your earlier',
|
|
325
|
+
'acknowledgment of that choice. If one offering is already clear, record it and continue',
|
|
326
|
+
'without asking them to choose or confirm it again. A short answer to a qualification',
|
|
327
|
+
'question does not reset that choice. Ask which offering only when it is still unknown,',
|
|
328
|
+
'before sending offering-specific content: one question, not a list of every offering.',
|
|
312
329
|
...(funnelField(tools)
|
|
313
330
|
? [
|
|
314
331
|
'The offering may change until the stage is offered. From offered on it is locked: a',
|
|
@@ -348,8 +365,9 @@ export function intentNotice(intent, advertOffering) {
|
|
|
348
365
|
* travels with the turn's message like the funnel note, outside the fence.
|
|
349
366
|
*/
|
|
350
367
|
export function offeringNotice(offering, changedFrom) {
|
|
351
|
-
if (offering === undefined)
|
|
352
|
-
return 'OFFERING: No offering is recorded for this contact yet.';
|
|
368
|
+
if (offering === undefined) {
|
|
369
|
+
return 'OFFERING: No offering is recorded for this contact yet. This is missing saved state, not proof of an unknown choice. If the message or history already identifies an offering, record it and continue without asking again.';
|
|
370
|
+
}
|
|
353
371
|
if (changedFrom !== undefined) {
|
|
354
372
|
return `OFFERING: This contact's offering changed from ${changedFrom} to ${offering} since you last saw it. Confirm which offering they want before continuing.`;
|
|
355
373
|
}
|
package/dist/agent/registry.js
CHANGED
|
@@ -35,8 +35,8 @@ export function pricingFor(modelId) {
|
|
|
35
35
|
return ZERO_PRICING;
|
|
36
36
|
return PRICING[modelId] ?? FALLBACK_PRICING;
|
|
37
37
|
}
|
|
38
|
-
/** OpenAI's reasoning families: the o-series and
|
|
39
|
-
const REASONING_MODEL = /^openai:(o\d|gpt-
|
|
38
|
+
/** OpenAI's reasoning families: the o-series and GPT-5/GPT-6. */
|
|
39
|
+
const REASONING_MODEL = /^openai:(o\d|gpt-[56])/;
|
|
40
40
|
/**
|
|
41
41
|
* Whether a model accepts `temperature` at all.
|
|
42
42
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "manychat-ai-agent",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.2",
|
|
4
4
|
"description": "A provider-agnostic conversational AI agent gateway that bridges no-code chat platforms to any LLM.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@ai-sdk/anthropic": "^4.0.53",
|
|
72
72
|
"@ai-sdk/google": "^4.0.69",
|
|
73
73
|
"@ai-sdk/openai": "^4.0.66",
|
|
74
|
-
"@ai-sdk/provider": "4.0.
|
|
74
|
+
"@ai-sdk/provider": "4.0.26",
|
|
75
75
|
"@fastify/helmet": "^13.1.1",
|
|
76
76
|
"@fastify/rate-limit": "^11.2.0",
|
|
77
77
|
"@fastify/swagger": "^9.8.1",
|