manychat-ai-agent 0.23.1 → 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 +7 -0
- package/dist/agent/prompt.js +16 -4
- package/dist/agent/registry.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
|
|
3
10
|
## [0.23.1](https://github.com/pedronastasi/manychat-ai-agent/compare/v0.23.0...v0.23.1) (2026-10-13)
|
|
4
11
|
|
|
5
12
|
|
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
|
];
|
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
|
*
|