@botpress/runtime 1.13.0 → 1.13.1
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 +25 -4
- package/dist/definition.js.map +2 -2
- package/dist/internal.js +25 -4
- package/dist/internal.js.map +2 -2
- package/dist/library.js +25 -4
- package/dist/library.js.map +2 -2
- package/dist/primitives/conversation-instance.d.ts +7 -1
- package/dist/primitives/conversation-instance.d.ts.map +1 -1
- package/dist/runtime/handlers/conversation.d.ts.map +1 -1
- package/dist/runtime/handlers/event.d.ts.map +1 -1
- package/dist/runtime.js +45 -6
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
package/dist/internal.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.1", adk: "1.13.1", sdk: "5.0.2", llmz: "0.0.35", zai: "2.5.5", cognitive: "0.3.3" };
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -37154,10 +37154,16 @@ var init_conversation_instance = __esm({
|
|
|
37154
37154
|
init_define_BUILD();
|
|
37155
37155
|
init_define_PACKAGE_VERSIONS();
|
|
37156
37156
|
init_runtime2();
|
|
37157
|
-
BaseConversationInstance = class {
|
|
37157
|
+
BaseConversationInstance = class _BaseConversationInstance {
|
|
37158
37158
|
id;
|
|
37159
37159
|
channel;
|
|
37160
37160
|
integration;
|
|
37161
|
+
/**
|
|
37162
|
+
* The integration alias (e.g., "telegram1", "telegram2").
|
|
37163
|
+
* This is useful when you have multiple instances of the same integration
|
|
37164
|
+
* with different configurations (multi-integration setup).
|
|
37165
|
+
*/
|
|
37166
|
+
alias;
|
|
37161
37167
|
conversation;
|
|
37162
37168
|
// @internal
|
|
37163
37169
|
client;
|
|
@@ -37165,10 +37171,25 @@ var init_conversation_instance = __esm({
|
|
|
37165
37171
|
TrackedState;
|
|
37166
37172
|
// @internal
|
|
37167
37173
|
TrackedTags;
|
|
37168
|
-
|
|
37174
|
+
/**
|
|
37175
|
+
* Extract integration alias from tags (e.g., "telegram3:id" -> "telegram3")
|
|
37176
|
+
* @internal
|
|
37177
|
+
*/
|
|
37178
|
+
static extractAliasFromTags(tags) {
|
|
37179
|
+
if (!tags) return void 0;
|
|
37180
|
+
for (const tagKey of Object.keys(tags)) {
|
|
37181
|
+
const colonIndex = tagKey.indexOf(":");
|
|
37182
|
+
if (colonIndex > 0) {
|
|
37183
|
+
return tagKey.substring(0, colonIndex);
|
|
37184
|
+
}
|
|
37185
|
+
}
|
|
37186
|
+
return void 0;
|
|
37187
|
+
}
|
|
37188
|
+
constructor(conversation, client2, alias) {
|
|
37169
37189
|
this.id = conversation.id;
|
|
37170
|
-
this.channel = `${conversation.integration}.${conversation.channel}`;
|
|
37171
37190
|
this.integration = conversation.integration;
|
|
37191
|
+
this.alias = alias ?? _BaseConversationInstance.extractAliasFromTags(conversation.tags) ?? conversation.integration;
|
|
37192
|
+
this.channel = `${this.alias}.${conversation.channel}`;
|
|
37172
37193
|
this.conversation = conversation;
|
|
37173
37194
|
this.client = client2;
|
|
37174
37195
|
const states = context.get("states", { optional: true });
|