@botpress/adk 1.3.7 → 1.3.9

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.
@@ -1,4 +1,4 @@
1
- import { AssetFile, LocalAssetFile, AssetSyncPlan, AssetSyncResult, AssetSyncOptions, AssetsIndex } from './types.js';
1
+ import { AssetFile, LocalAssetFile, AssetSyncPlan, AssetSyncResult, AssetSyncOptions, AssetsIndex } from "./types.js";
2
2
  export interface AssetManagerOptions {
3
3
  projectPath: string;
4
4
  botId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/assets/manager.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,SAAS,EACT,cAAc,EACd,aAAa,EACb,eAAe,EAGf,gBAAgB,EAChB,WAAW,EACZ,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,YAAY,CAAqB;gBAE7B,OAAO,EAAE,mBAAmB;YAQ1B,SAAS;IAyBvB,OAAO,CAAC,WAAW;IASnB;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC;IAS5C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;IAuCjD;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IA8B7C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,aAAa,CAAC;IAuE9C;;OAEG;IACG,WAAW,CAAC,IAAI,E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AE,aAAa,EACnB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC;IAyE3B;;OAEG;YACW,WAAW;IAsBzB;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAqCtC;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,WAAW,CAAC;IAW/C;;;OAGG;IACG,sBAAsB,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;YAgEtC,aAAa;IAoB3B,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,WAAW;CA4BpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/auth/service.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,CAAC,EAAE,MAAM;IAIrB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAuDjD,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAQtD"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/auth/service.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,CAAC,EAAE,MAAM;IAIrB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IA0DjD,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAQtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"dev-id-manager.d.ts","sourceRoot":"","sources":["../../src/bot-generator/dev-id-manager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;YAUzC,SAAS;IAwBjB,UAAU,IAAI,OAAO,CAAC,YAAY,CAAC;IAInC,gBAAgB,IAAI,OAAO,CAAC,YAAY,CAAC;IAYzC,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAWpD,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB9B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB7B,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;CAoB5C"}
1
+ {"version":3,"file":"dev-id-manager.d.ts","sourceRoot":"","sources":["../../src/bot-generator/dev-id-manager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE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CACtC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA0Cf"}
@@ -1 +1 @@
1
- {"version":3,"file":"integration-types.d.ts","sourceRoot":"","sources":["../../src/generators/integration-types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAsB7D,QAAA,MAAM,mBAAmB,GAAI,aAAa,iBAAiB;;;;;;;;;;;;;;;CAezD,CAAC;AAEH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,iBAAiB,GAC7B,OAAO,CAAC;IACT,KAAK,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B,CAAC,CAuOD"}
1
+ {"version":3,"file":"integration-types.d.ts","sourceRoot":"","sources":["../../src/generators/integration-types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAsB7D,QAAA,MAAM,mBAAmB,GAAI,aAAa,iBAAiB;;;;;;;;;;;;;;;CAezD,CAAC;AAEH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,iBAAiB,GAC7B,OAAO,CAAC;IACT,KAAK,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B,CAAC,CA0OD"}
@@ -1 +1 @@
1
- {"version":3,"file":"tests.d.ts","sourceRoot":"","sources":["../../src/generators/tests.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,EAAE,SAAS,MAAM,oDAiBrE,CAAC;AAEL,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM;;;;;;;;iBAeyni5B,CAAC;uBAA0H,CAAC;;;;;;;;iBAAuU,CAAC;uBAAyH,CAAC;;;;sBAAsM,CAAC;;;;;;;iBAA6S,CAAC;uBAA0H,CAAC;oBAAkC,CAAC;qBAAoC,CAAC;;;;;;;;;;;sBAA2Y,CAAC;;;;;;;iBAA8O,CAAC;uBAA2H,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAj73M,CAAC;uBAA0H,CAAC;;;;;;;;iBAAuU,CAAC;uBAAyH,CAAC;;;;sBAAsM,CAAC;;;;;;;iBAA6S,CAAC;uBAA0H,CAAC;oBAAkC,CAAC;qBAAoC,CAAC;;;;;;;;;;;sBAA2Y,CAAC;;;;;;;iBAA8O,CAAC;uBAA2H,CAAC;;;;;;;;;;;;;;;;;;;;;;EAD7tysB,CAAC"}
1
+ {"version":3,"file":"tests.d.ts","sourceRoot":"","sources":["../../src/generators/tests.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,EAAE,SAAS,MAAM,oDAiBrE,CAAC;AAEL,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM;;;;;;;;iBAkBoji5B,CAAC;uBAA0H,CAAC;;;;;;;;iBAAuU,CAAC;uBAAyH,CAAC;;;;sBAAsM,CAAC;;;;;;;iBAA6S,CAAC;uBAA0H,CAAC;oBAAkC,CAAC;qBAAoC,CAAC;;;;;;;;;;;sBAA2Y,CAAC;;;;;;;iBAA8O,CAAC;uBAA2H,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAj73M,CAAC;uBAA0H,CAAC;;;;;;;;iBAAuU,CAAC;uBAAyH,CAAC;;;;sBAAsM,CAAC;;;;;;;iBAA6S,CAAC;uBAA0H,CAAC;oBAAkC,CAAC;qBAAoC,CAAC;;;;;;;;;;;sBAA2Y,CAAC;;;;;;;iBAA8O,CAAC;uBAA2H,CAAC;;;;;;;;;;;;;;;;;;;;;;EADxpysB,CAAC"}
package/dist/index.js CHANGED
@@ -367,7 +367,10 @@ class AuthService {
367
367
  try {
368
368
  const client = new Client({
369
369
  apiUrl: this.apiUrl,
370
- token
370
+ token,
371
+ headers: {
372
+ "x-multiple-integrations": "true"
373
+ }
371
374
  });
372
375
  const accountResponse = await client.getAccount({});
373
376
  const { account } = accountResponse;
@@ -1344,7 +1347,10 @@ class WorkspaceCache {
1344
1347
  const credentials = await auth.getActiveCredentials();
1345
1348
  const client = new Client2({
1346
1349
  apiUrl: credentials.apiUrl,
1347
- token: credentials.token
1350
+ token: credentials.token,
1351
+ headers: {
1352
+ "x-multiple-integrations": "true"
1353
+ }
1348
1354
  });
1349
1355
  const { workspaces } = await client.listWorkspaces({});
1350
1356
  const workspace = workspaces.find((ws) => ws.id === workspaceId);
@@ -1566,7 +1572,10 @@ class AssetsManager {
1566
1572
  token: credentials.token,
1567
1573
  apiUrl: credentials.apiUrl,
1568
1574
  workspaceId,
1569
- botId: this.botId
1575
+ botId: this.botId,
1576
+ headers: {
1577
+ "x-multiple-integrations": "true"
1578
+ }
1570
1579
  });
1571
1580
  }
1572
1581
  return this.client;
@@ -2434,10 +2443,14 @@ class IntegrationManager {
2434
2443
  if (!this.options.workspaceId && !credentials.workspaceId) {
2435
2444
  throw new Error('No workspace ID found in current profile. Please login again with "adk login"');
2436
2445
  }
2446
+ const workspaceId = this.options.workspaceId || credentials.workspaceId;
2437
2447
  this.client = new Client4({
2438
2448
  token: credentials.token,
2439
2449
  apiUrl: credentials.apiUrl,
2440
- workspaceId: this.options.workspaceId || credentials.workspaceId
2450
+ workspaceId,
2451
+ headers: {
2452
+ "x-multiple-integrations": "true"
2453
+ }
2441
2454
  });
2442
2455
  }
2443
2456
  return this.client;
@@ -2497,7 +2510,7 @@ class IntegrationManager {
2497
2510
  name: ref.fullName,
2498
2511
  version: ref.version
2499
2512
  });
2500
- } catch (_privateError) {
2513
+ } catch (privateError) {
2501
2514
  try {
2502
2515
  integrationResponse = await client.getPublicIntegration({
2503
2516
  name: ref.name,
@@ -2684,7 +2697,10 @@ class HubCache {
2684
2697
  this.client = new Client5({
2685
2698
  token: credentials.token,
2686
2699
  apiUrl: credentials.apiUrl,
2687
- workspaceId: credentials.workspaceId
2700
+ workspaceId: credentials.workspaceId,
2701
+ headers: {
2702
+ "x-multiple-integrations": "true"
2703
+ }
2688
2704
  });
2689
2705
  }
2690
2706
  return this.client;
@@ -2837,7 +2853,10 @@ class IntegrationOperations {
2837
2853
  this.client = new Client6({
2838
2854
  token: credentials.token,
2839
2855
  apiUrl: credentials.apiUrl,
2840
- workspaceId
2856
+ workspaceId,
2857
+ headers: {
2858
+ "x-multiple-integrations": "true"
2859
+ }
2841
2860
  });
2842
2861
  }
2843
2862
  return this.client;
@@ -2862,13 +2881,14 @@ class IntegrationOperations {
2862
2881
  }
2863
2882
  async getIntegrationVersions(name) {
2864
2883
  const client = await this.getClient();
2884
+ const ref = this.parseIntegrationRef(name);
2865
2885
  try {
2866
2886
  const latestResponse = await client.getIntegrationByName({
2867
- name,
2887
+ name: ref.fullName,
2868
2888
  version: "latest"
2869
2889
  });
2870
2890
  return {
2871
- name,
2891
+ name: ref.fullName,
2872
2892
  version: latestResponse.integration.version,
2873
2893
  latestVersion: latestResponse.integration.version,
2874
2894
  availableVersions: [latestResponse.integration.version]
@@ -2876,25 +2896,25 @@ class IntegrationOperations {
2876
2896
  } catch {
2877
2897
  try {
2878
2898
  const latestResponse = await client.getPublicIntegration({
2879
- name,
2899
+ name: ref.name,
2880
2900
  version: "latest"
2881
2901
  });
2882
2902
  return {
2883
- name,
2903
+ name: ref.fullName,
2884
2904
  version: latestResponse.integration.version,
2885
2905
  latestVersion: latestResponse.integration.version,
2886
2906
  availableVersions: [latestResponse.integration.version]
2887
2907
  };
2888
2908
  } catch {
2889
- throw new Error(`Integration "${name}" not found`);
2909
+ throw new Error(`Integration "${ref.fullName}" not found`);
2890
2910
  }
2891
2911
  }
2892
2912
  }
2893
2913
  async addIntegration(options) {
2894
2914
  const project = await AgentProject.load(this.projectPath || process2.cwd());
2895
2915
  const { name, version = "latest" } = options;
2896
- const alias = options.alias || name;
2897
2916
  const ref = this.parseIntegrationRef(`${name}@${version}`);
2917
+ const alias = options.alias || ref.name;
2898
2918
  const depsPath = path9.join(project.path, "dependencies.json");
2899
2919
  const dependencies = JSON.parse(fs8.readFileSync(depsPath, "utf-8"));
2900
2920
  if (!dependencies.integrations) {
@@ -2922,7 +2942,9 @@ class IntegrationOperations {
2922
2942
  }
2923
2943
  let integrationDefinition;
2924
2944
  try {
2925
- const tempManager = new IntegrationManager;
2945
+ const tempManager = new IntegrationManager({
2946
+ workspaceId: project.agentInfo?.workspaceId
2947
+ });
2926
2948
  const loadResult = await tempManager.loadIntegrations({
2927
2949
  integrations: {
2928
2950
  [alias]: {
@@ -3000,25 +3022,23 @@ class IntegrationOperations {
3000
3022
  }
3001
3023
  for (const [alias, value] of Object.entries(integrationsToUpgrade)) {
3002
3024
  try {
3003
- let integrationName;
3025
+ let ref;
3004
3026
  let currentVersion;
3005
3027
  if (typeof value === "string") {
3006
- const ref = this.parseIntegrationRef(value);
3007
- integrationName = ref.name;
3028
+ ref = this.parseIntegrationRef(value);
3008
3029
  currentVersion = ref.version;
3009
3030
  } else if (typeof value === "object" && value.version) {
3010
- const ref = this.parseIntegrationRef(value.version);
3011
- integrationName = ref.name;
3031
+ ref = this.parseIntegrationRef(value.version);
3012
3032
  currentVersion = ref.version;
3013
3033
  } else {
3014
3034
  failed.push(alias);
3015
3035
  continue;
3016
3036
  }
3017
- const versionInfo = await this.getIntegrationVersions(integrationName);
3037
+ const versionInfo = await this.getIntegrationVersions(ref.fullName);
3018
3038
  if (versionInfo.latestVersion && versionInfo.latestVersion !== currentVersion) {
3019
3039
  dependencies.integrations[alias] = {
3020
3040
  ...value,
3021
- version: `${integrationName}@${versionInfo.latestVersion}`
3041
+ version: `${ref.fullName}@${versionInfo.latestVersion}`
3022
3042
  };
3023
3043
  upgraded.push(`${alias} (${currentVersion} → ${versionInfo.latestVersion})`);
3024
3044
  }
@@ -3043,10 +3063,10 @@ class IntegrationOperations {
3043
3063
  for (const [alias, value] of Object.entries(dependencies.integrations)) {
3044
3064
  if (typeof value === "string") {
3045
3065
  const ref = this.parseIntegrationRef(value);
3046
- integrations.push({ alias, name: ref.name, version: ref.version });
3066
+ integrations.push({ alias, name: ref.fullName, version: ref.version });
3047
3067
  } else if (typeof value === "object" && value.version) {
3048
3068
  const ref = this.parseIntegrationRef(value.version);
3049
- integrations.push({ alias, name: ref.name, version: ref.version });
3069
+ integrations.push({ alias, name: ref.fullName, version: ref.version });
3050
3070
  }
3051
3071
  }
3052
3072
  return integrations;
@@ -3106,7 +3126,10 @@ class IntegrationChecker {
3106
3126
  this.client = new Client7({
3107
3127
  token: credentials.token,
3108
3128
  apiUrl: credentials.apiUrl,
3109
- workspaceId
3129
+ workspaceId,
3130
+ headers: {
3131
+ "x-multiple-integrations": "true"
3132
+ }
3110
3133
  });
3111
3134
  }
3112
3135
  return this.client;
@@ -3128,7 +3151,9 @@ class IntegrationChecker {
3128
3151
  async checkIntegrations(botId) {
3129
3152
  const client = await this.getClient();
3130
3153
  const project = await AgentProject.load(this.projectPath);
3131
- const integrationManager = new IntegrationManager;
3154
+ const integrationManager = new IntegrationManager({
3155
+ workspaceId: project.agentInfo?.workspaceId
3156
+ });
3132
3157
  const loadResult = await integrationManager.loadIntegrations(project.dependencies || { integrations: {} });
3133
3158
  if (loadResult.errors.length > 0) {
3134
3159
  throw new Error(`Failed to load integrations: ${loadResult.errors.map((e) => e.message).join(", ")}`);
@@ -3182,7 +3207,8 @@ class IntegrationChecker {
3182
3207
  }
3183
3208
  let installedIntegration = null;
3184
3209
  for (const [_key, installed] of Object.entries(installedIntegrations)) {
3185
- if (installed.name === ref.fullName) {
3210
+ const matches = installed.name === ref.fullName || installed.name === ref.name;
3211
+ if (matches) {
3186
3212
  installedIntegration = installed;
3187
3213
  processedIntegrationIds.add(installed.id);
3188
3214
  break;
@@ -3433,7 +3459,10 @@ class InterfaceManager {
3433
3459
  this.client = new Client8({
3434
3460
  token: credentials.token,
3435
3461
  apiUrl: credentials.apiUrl,
3436
- workspaceId: this.options.workspaceId || credentials.workspaceId
3462
+ workspaceId: this.options.workspaceId || credentials.workspaceId,
3463
+ headers: {
3464
+ "x-multiple-integrations": "true"
3465
+ }
3437
3466
  });
3438
3467
  }
3439
3468
  return this.client;
@@ -4465,7 +4494,7 @@ class AgentProjectGenerator {
4465
4494
  deploy: "adk deploy"
4466
4495
  },
4467
4496
  dependencies: {
4468
- "@botpress/runtime": `^${"1.3.7"}`
4497
+ "@botpress/runtime": `^${"1.3.9"}`
4469
4498
  },
4470
4499
  devDependencies: {
4471
4500
  typescript: "^5.0.0"
@@ -4870,7 +4899,7 @@ Description: ${action.description || "No description"}`)}
4870
4899
  const comment = toMultilineComment(`Title: ${tag?.title}
4871
4900
  Description: ${tag.description}`);
4872
4901
  acc += `${comment}
4873
- ["${integration.definition.name}:${t}"]?: string,
4902
+ ["${integration.ref.fullName}:${t}"]?: string,
4874
4903
  `;
4875
4904
  return acc;
4876
4905
  }, "") + "}";
@@ -4879,7 +4908,7 @@ Description: ${tag.description}`);
4879
4908
  const comment = toMultilineComment(`Title: ${tag?.title}
4880
4909
  Description: ${tag.description}`);
4881
4910
  acc += `${comment}
4882
- ["${integration.definition.name}:${t}"]?: string,
4911
+ ["${integration.ref.fullName}:${t}"]?: string,
4883
4912
  `;
4884
4913
  return acc;
4885
4914
  }, "") + "}";
@@ -4954,7 +4983,7 @@ Description: ${event.description || "No description"}${attributesComment}`)}
4954
4983
  const comment = toMultilineComment(`Title: ${tag?.title}
4955
4984
  Description: ${tag?.description}`);
4956
4985
  return `${comment}
4957
- "${integration.definition?.name}:${t}"
4986
+ "${integration.ref.fullName}:${t}"
4958
4987
  `;
4959
4988
  }).join(" | ") : "never";
4960
4989
  tUsers += `
@@ -5498,7 +5527,10 @@ class DevIdManager {
5498
5527
  this.client = new Client9({
5499
5528
  token: credentials.token,
5500
5529
  apiUrl: credentials.apiUrl,
5501
- workspaceId
5530
+ workspaceId,
5531
+ headers: {
5532
+ "x-multiple-integrations": "true"
5533
+ }
5502
5534
  });
5503
5535
  }
5504
5536
  return this.client;
@@ -5924,7 +5956,9 @@ class BotGenerator {
5924
5956
  }
5925
5957
  async generateIntegrationsTypes() {
5926
5958
  const project = await AgentProject.load(this.projectPath);
5927
- const manager2 = new IntegrationManager;
5959
+ const manager2 = new IntegrationManager({
5960
+ workspaceId: project.agentInfo?.workspaceId
5961
+ });
5928
5962
  const integrations = await manager2.loadIntegrations(project.dependencies || {});
5929
5963
  const integrationsDir = path29.join(this.projectPath, ".adk", "integrations");
5930
5964
  const existingIntegrationFiles = await this.listFilesRecursive(integrationsDir);
@@ -6005,7 +6039,9 @@ class BotGenerator {
6005
6039
  }
6006
6040
  async generateRuntimeTypes() {
6007
6041
  const project = await AgentProject.load(this.projectPath);
6008
- const manager2 = new IntegrationManager;
6042
+ const manager2 = new IntegrationManager({
6043
+ workspaceId: project.agentInfo?.workspaceId
6044
+ });
6009
6045
  const integrations = await manager2.loadIntegrations(project.dependencies || {});
6010
6046
  const channels = [];
6011
6047
  for (const integration of integrations.integrations) {
@@ -6060,7 +6096,9 @@ declare module "@botpress/runtime/_types/state" {
6060
6096
  }
6061
6097
  async generateInterfacesTypes() {
6062
6098
  const project = await AgentProject.load(this.projectPath);
6063
- const integrationManager = new IntegrationManager;
6099
+ const integrationManager = new IntegrationManager({
6100
+ workspaceId: project.agentInfo?.workspaceId
6101
+ });
6064
6102
  const manager2 = new InterfaceManager;
6065
6103
  const interfacesDir = path29.join(this.projectPath, ".adk", "interfaces");
6066
6104
  const existingInterfaceFiles = await this.listFilesRecursive(interfacesDir);
@@ -6179,7 +6217,7 @@ declare module "@botpress/runtime/_types/state" {
6179
6217
  for (const { alias } of integrations.filter((i) => i.enabled)) {
6180
6218
  const importName = `integration_${getIntegrationAlias(alias)}`;
6181
6219
  imports.push(`import ${importName} from "./bp_modules/${importName}";`);
6182
- addIntegrations.push(`bot.addIntegration(${importName});`);
6220
+ addIntegrations.push(`bot.addIntegration(${importName}, { alias: "${alias}" });`);
6183
6221
  }
6184
6222
  const conversationTags = {};
6185
6223
  const workflowTags = {};
@@ -6909,7 +6947,10 @@ class TableManager {
6909
6947
  this.client = new Client10({
6910
6948
  token: credentials.token,
6911
6949
  apiUrl: credentials.apiUrl,
6912
- botId: this.botId
6950
+ botId: this.botId,
6951
+ headers: {
6952
+ "x-multiple-integrations": "true"
6953
+ }
6913
6954
  });
6914
6955
  }
6915
6956
  return this.client;
@@ -7277,5 +7318,5 @@ export {
7277
7318
  AgentProject
7278
7319
  };
7279
7320
 
7280
- //# debugId=EC8543D21C4DA2FE64756E2164756E21
7321
+ //# debugId=3936F251FC5E490F64756E2164756E21
7281
7322
  //# sourceMappingURL=index.js.map