@botpress/runtime 1.13.6 → 1.13.8
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/dist/definition.js +4 -17
- package/dist/definition.js.map +2 -2
- package/dist/internal.js +5 -18
- package/dist/internal.js.map +2 -2
- package/dist/library.js +5 -18
- package/dist/library.js.map +2 -2
- package/dist/primitives/conversation-instance.d.ts +1 -0
- package/dist/primitives/conversation-instance.d.ts.map +1 -1
- package/dist/runtime/handlers/conversation.d.ts.map +1 -1
- package/dist/runtime.js +6 -32
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ export declare class BaseConversationInstance<TChannel extends Channels = Channe
|
|
|
16
16
|
* The integration alias (e.g., "telegram1", "telegram2").
|
|
17
17
|
* This is useful when you have multiple instances of the same integration
|
|
18
18
|
* with different configurations (multi-integration setup).
|
|
19
|
+
* Note: conversation.integration from the API is already the alias.
|
|
19
20
|
*/
|
|
20
21
|
readonly alias: string;
|
|
21
22
|
readonly conversation: BotpressConversation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-instance.d.ts","sourceRoot":"","sources":["../../src/primitives/conversation-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,oBAAoB,EAAU,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAA;AAE3D,KAAK,QAAQ,GAAG,MAAM,uBAAuB,CAAA;AAE7C;;;;GAIG;AACH,qBAAa,wBAAwB,CAAC,QAAQ,SAAS,QAAQ,GAAG,QAAQ;IACxE,SAAgB,EAAE,EAAE,MAAM,CAAA;IAC1B,SAAgB,OAAO,EAAE,QAAQ,CAAA;IACjC,SAAgB,WAA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E,IAAI,EAAE,CAAC,CAAA;QACP,OAAO,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;KAC1D,CACF,CACF;IAqBD;;OAEG;IACG,WAAW;IAsBjB;;OAEG;IACG,UAAU;IAsBhB;;OAEG;IACG,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;IAiB1D;;OAEG;IACG,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAgB/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/runtime/handlers/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAS9E,eAAO,MAAM,KAAK,GAAI,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/runtime/handlers/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAS9E,eAAO,MAAM,KAAK,GAAI,KAAK,iBAAiB,SAoD3C,CAAA"}
|
package/dist/runtime.js
CHANGED
|
@@ -48,7 +48,7 @@ var init_define_BUILD = __esm({
|
|
|
48
48
|
var define_PACKAGE_VERSIONS_default;
|
|
49
49
|
var init_define_PACKAGE_VERSIONS = __esm({
|
|
50
50
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
51
|
-
define_PACKAGE_VERSIONS_default = { runtime: "1.13.
|
|
51
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.13.8", adk: "1.13.8", sdk: "5.0.2", llmz: "0.0.35", zai: "2.5.6", cognitive: "0.3.3" };
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -15107,7 +15107,7 @@ function parseHttpRequest(req) {
|
|
|
15107
15107
|
let body = req.body;
|
|
15108
15108
|
let path4 = req.path || "/";
|
|
15109
15109
|
let query = {};
|
|
15110
|
-
let headers = {};
|
|
15110
|
+
let headers = { ...req.headers };
|
|
15111
15111
|
if (req.query && typeof req.query === "string") {
|
|
15112
15112
|
const searchParams = new URLSearchParams(req.query);
|
|
15113
15113
|
for (const [key, value] of searchParams) {
|
|
@@ -33643,7 +33643,7 @@ var init_conversation_instance = __esm({
|
|
|
33643
33643
|
init_define_BUILD();
|
|
33644
33644
|
init_define_PACKAGE_VERSIONS();
|
|
33645
33645
|
init_runtime();
|
|
33646
|
-
BaseConversationInstance = class
|
|
33646
|
+
BaseConversationInstance = class {
|
|
33647
33647
|
id;
|
|
33648
33648
|
channel;
|
|
33649
33649
|
integration;
|
|
@@ -33651,6 +33651,7 @@ var init_conversation_instance = __esm({
|
|
|
33651
33651
|
* The integration alias (e.g., "telegram1", "telegram2").
|
|
33652
33652
|
* This is useful when you have multiple instances of the same integration
|
|
33653
33653
|
* with different configurations (multi-integration setup).
|
|
33654
|
+
* Note: conversation.integration from the API is already the alias.
|
|
33654
33655
|
*/
|
|
33655
33656
|
alias;
|
|
33656
33657
|
conversation;
|
|
@@ -33660,24 +33661,10 @@ var init_conversation_instance = __esm({
|
|
|
33660
33661
|
TrackedState;
|
|
33661
33662
|
// @internal
|
|
33662
33663
|
TrackedTags;
|
|
33663
|
-
/**
|
|
33664
|
-
* Extract integration alias from tags (e.g., "telegram3:id" -> "telegram3")
|
|
33665
|
-
* @internal
|
|
33666
|
-
*/
|
|
33667
|
-
static extractAliasFromTags(tags) {
|
|
33668
|
-
if (!tags) return void 0;
|
|
33669
|
-
for (const tagKey of Object.keys(tags)) {
|
|
33670
|
-
const colonIndex = tagKey.indexOf(":");
|
|
33671
|
-
if (colonIndex > 0) {
|
|
33672
|
-
return tagKey.substring(0, colonIndex);
|
|
33673
|
-
}
|
|
33674
|
-
}
|
|
33675
|
-
return void 0;
|
|
33676
|
-
}
|
|
33677
33664
|
constructor(conversation, client2, alias) {
|
|
33678
33665
|
this.id = conversation.id;
|
|
33679
33666
|
this.integration = conversation.integration;
|
|
33680
|
-
this.alias = alias ??
|
|
33667
|
+
this.alias = alias ?? conversation.integration;
|
|
33681
33668
|
this.channel = `${this.alias}.${conversation.channel}`;
|
|
33682
33669
|
this.conversation = conversation;
|
|
33683
33670
|
this.client = client2;
|
|
@@ -48386,20 +48373,7 @@ var init_conversation2 = __esm({
|
|
|
48386
48373
|
"event.payload": event.payload
|
|
48387
48374
|
},
|
|
48388
48375
|
async () => {
|
|
48389
|
-
|
|
48390
|
-
const allTags = {
|
|
48391
|
-
...conversation.tags,
|
|
48392
|
-
...message.tags,
|
|
48393
|
-
...user2.tags
|
|
48394
|
-
};
|
|
48395
|
-
for (const tagKey of Object.keys(allTags)) {
|
|
48396
|
-
const colonIndex = tagKey.indexOf(":");
|
|
48397
|
-
if (colonIndex > 0) {
|
|
48398
|
-
alias = tagKey.substring(0, colonIndex);
|
|
48399
|
-
break;
|
|
48400
|
-
}
|
|
48401
|
-
}
|
|
48402
|
-
const handlerName = alias + "." + conversation.channel;
|
|
48376
|
+
const handlerName = conversation.integration + "." + conversation.channel;
|
|
48403
48377
|
const handler = findMatchingHandler(adk.project.conversations, handlerName);
|
|
48404
48378
|
if (!handler) {
|
|
48405
48379
|
logger.debug(`Skipping message, no ADK Conversation defined for "${handlerName}"`);
|