@botpress/runtime 1.13.0 → 1.13.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.
@@ -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.0", adk: "1.13.0", sdk: "5.0.2", llmz: "0.0.35", zai: "2.5.5", cognitive: "0.3.3" };
51
+ define_PACKAGE_VERSIONS_default = { runtime: "1.13.2", adk: "1.13.2", sdk: "5.0.2", llmz: "0.0.35", zai: "2.5.5", cognitive: "0.3.3" };
52
52
  }
53
53
  });
54
54
 
@@ -34367,10 +34367,16 @@ var init_conversation_instance = __esm({
34367
34367
  init_define_BUILD();
34368
34368
  init_define_PACKAGE_VERSIONS();
34369
34369
  init_runtime2();
34370
- BaseConversationInstance = class {
34370
+ BaseConversationInstance = class _BaseConversationInstance {
34371
34371
  id;
34372
34372
  channel;
34373
34373
  integration;
34374
+ /**
34375
+ * The integration alias (e.g., "telegram1", "telegram2").
34376
+ * This is useful when you have multiple instances of the same integration
34377
+ * with different configurations (multi-integration setup).
34378
+ */
34379
+ alias;
34374
34380
  conversation;
34375
34381
  // @internal
34376
34382
  client;
@@ -34378,10 +34384,25 @@ var init_conversation_instance = __esm({
34378
34384
  TrackedState;
34379
34385
  // @internal
34380
34386
  TrackedTags;
34381
- constructor(conversation, client2) {
34387
+ /**
34388
+ * Extract integration alias from tags (e.g., "telegram3:id" -> "telegram3")
34389
+ * @internal
34390
+ */
34391
+ static extractAliasFromTags(tags) {
34392
+ if (!tags) return void 0;
34393
+ for (const tagKey of Object.keys(tags)) {
34394
+ const colonIndex = tagKey.indexOf(":");
34395
+ if (colonIndex > 0) {
34396
+ return tagKey.substring(0, colonIndex);
34397
+ }
34398
+ }
34399
+ return void 0;
34400
+ }
34401
+ constructor(conversation, client2, alias) {
34382
34402
  this.id = conversation.id;
34383
- this.channel = `${conversation.integration}.${conversation.channel}`;
34384
34403
  this.integration = conversation.integration;
34404
+ this.alias = alias ?? _BaseConversationInstance.extractAliasFromTags(conversation.tags) ?? conversation.integration;
34405
+ this.channel = `${this.alias}.${conversation.channel}`;
34385
34406
  this.conversation = conversation;
34386
34407
  this.client = client2;
34387
34408
  const states = context2.get("states", { optional: true });