@botpress/adk 1.11.2 → 1.11.3

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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG3E,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3D,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,YAAY,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;IAClC,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACpC,wBAAwB,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;IACnD,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrD,oBAAoB,IAAI,OAAO,CAAC,WAAW,CAAC,CAAA;IAC5C,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IAC5D,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAChE;AAED,cAAM,IAAK,YAAW,OAAO;IAC3B,OAAO,CAAC,kBAAkB,CAAoB;;IAMxC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B/D,MAAM,CAAC,OAAO,CAAC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MAAM,cAAc,CAAA;AAG9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAGrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA"}
package/dist/index.js CHANGED
@@ -654,7 +654,7 @@ var PRETTIER_CONFIG, formatCode = async (code, filepath) => {
654
654
  `));
655
655
  return code;
656
656
  }
657
- }, ADK_VERSION = "1.11.2", relative2 = (from, to) => {
657
+ }, ADK_VERSION = "1.11.3", relative2 = (from, to) => {
658
658
  const fromDir = path10.dirname(from);
659
659
  const relative3 = path10.relative(fromDir, to);
660
660
  return relative3.startsWith(".") ? relative3 : `./${relative3}`;
@@ -797,7 +797,7 @@ var init_integration_action_types = __esm(() => {
797
797
  var require_package = __commonJS((exports, module) => {
798
798
  module.exports = {
799
799
  name: "@botpress/adk",
800
- version: "1.11.2",
800
+ version: "1.11.3",
801
801
  description: "Core ADK library for building AI agents on Botpress",
802
802
  type: "module",
803
803
  main: "dist/index.js",
@@ -844,7 +844,7 @@ var require_package = __commonJS((exports, module) => {
844
844
  "@botpress/cli": "^4.27.3",
845
845
  "@botpress/client": "^1.27.2",
846
846
  "@botpress/cognitive": "^0.2.0",
847
- "@botpress/runtime": "^1.11.2",
847
+ "@botpress/runtime": "^1.11.3",
848
848
  "@botpress/sdk": "^4.18.1",
849
849
  "@bpinternal/jex": "^1.2.4",
850
850
  "@bpinternal/yargs-extra": "^0.0.21",
@@ -876,6 +876,7 @@ var require_package = __commonJS((exports, module) => {
876
876
 
877
877
  // src/auth/index.ts
878
878
  init_credentials();
879
+ import { Client as Client2 } from "@botpress/client";
879
880
 
880
881
  // src/auth/service.ts
881
882
  import { Client } from "@botpress/client";
@@ -999,6 +1000,10 @@ class Auth {
999
1000
  const { profile = "default", apiUrl = "https://api.botpress.cloud" } = options;
1000
1001
  const authService = new AuthService(apiUrl);
1001
1002
  const authResult = await authService.validateToken(token);
1003
+ try {
1004
+ const client = new Client2({ apiUrl, token });
1005
+ await client.setAccountPreference({ key: "adkCliConnected", value: true });
1006
+ } catch {}
1002
1007
  await this.credentialsManager.saveCredentials(profile, {
1003
1008
  token,
1004
1009
  apiUrl,
@@ -1799,7 +1804,7 @@ class BpChatCommand extends BaseCommand {
1799
1804
  }
1800
1805
  }
1801
1806
  // src/workspace/workspace-cache.ts
1802
- import { Client as Client2 } from "@botpress/client";
1807
+ import { Client as Client3 } from "@botpress/client";
1803
1808
  class WorkspaceCache {
1804
1809
  cache = new Map;
1805
1810
  CACHE_TTL = 60 * 60 * 1000;
@@ -1810,7 +1815,7 @@ class WorkspaceCache {
1810
1815
  }
1811
1816
  try {
1812
1817
  const credentials = await auth.getActiveCredentials();
1813
- const client = new Client2({
1818
+ const client = new Client3({
1814
1819
  apiUrl: credentials.apiUrl,
1815
1820
  token: credentials.token,
1816
1821
  headers: {
@@ -1916,7 +1921,7 @@ import path13 from "path";
1916
1921
  import fs5 from "fs/promises";
1917
1922
  import path6 from "path";
1918
1923
  import crypto from "crypto";
1919
- import { Client as Client3 } from "@botpress/client";
1924
+ import { Client as Client4 } from "@botpress/client";
1920
1925
 
1921
1926
  // src/assets/cache.ts
1922
1927
  import fs4 from "fs/promises";
@@ -2022,7 +2027,7 @@ class AssetsManager {
2022
2027
  if (!this.botId) {
2023
2028
  throw new Error("Bot ID is required for asset operations. Please deploy your agent first or create agent.json with botId and workspaceId.");
2024
2029
  }
2025
- this.client = new Client3({
2030
+ this.client = new Client4({
2026
2031
  token: credentials.token,
2027
2032
  apiUrl: credentials.apiUrl,
2028
2033
  workspaceId,
@@ -2354,7 +2359,7 @@ declare global {
2354
2359
  // src/assets/updater.ts
2355
2360
  init_fs();
2356
2361
  // src/integrations/manager.ts
2357
- import { Client as Client4 } from "@botpress/client";
2362
+ import { Client as Client5 } from "@botpress/client";
2358
2363
 
2359
2364
  // src/integrations/enhanced-cache.ts
2360
2365
  import fs6 from "fs/promises";
@@ -2570,7 +2575,7 @@ class IntegrationManager {
2570
2575
  throw new Error('No workspace ID found in current profile. Please login again with "adk login"');
2571
2576
  }
2572
2577
  const workspaceId = this.options.workspaceId || credentials.workspaceId;
2573
- this.client = new Client4({
2578
+ this.client = new Client5({
2574
2579
  token: credentials.token,
2575
2580
  apiUrl: credentials.apiUrl,
2576
2581
  workspaceId,
@@ -2828,11 +2833,11 @@ class IntegrationCache {
2828
2833
  }
2829
2834
  }
2830
2835
  // src/integrations/operations.ts
2831
- import { Client as Client6 } from "@botpress/client";
2836
+ import { Client as Client7 } from "@botpress/client";
2832
2837
  import * as process2 from "process";
2833
2838
 
2834
2839
  // src/integrations/hub-cache.ts
2835
- import { Client as Client5 } from "@botpress/client";
2840
+ import { Client as Client6 } from "@botpress/client";
2836
2841
  import * as fs8 from "fs/promises";
2837
2842
  import * as path9 from "path";
2838
2843
  import * as os6 from "os";
@@ -2849,7 +2854,7 @@ class HubCache {
2849
2854
  if (!credentials.workspaceId) {
2850
2855
  throw new Error('No workspace ID found in current profile. Please login again with "adk login"');
2851
2856
  }
2852
- this.client = new Client5({
2857
+ this.client = new Client6({
2853
2858
  token: credentials.token,
2854
2859
  apiUrl: credentials.apiUrl,
2855
2860
  workspaceId: credentials.workspaceId,
@@ -3050,7 +3055,7 @@ class IntegrationOperations {
3050
3055
  if (!workspaceId) {
3051
3056
  throw new Error('No workspace ID found in current profile. Please login again with "adk login"');
3052
3057
  }
3053
- this.client = new Client6({
3058
+ this.client = new Client7({
3054
3059
  token: credentials.token,
3055
3060
  apiUrl: credentials.apiUrl,
3056
3061
  workspaceId,
@@ -3333,7 +3338,7 @@ class IntegrationOperations {
3333
3338
  }
3334
3339
  }
3335
3340
  // src/integrations/checker.ts
3336
- import { Client as Client7 } from "@botpress/client";
3341
+ import { Client as Client8 } from "@botpress/client";
3337
3342
  class IntegrationChecker {
3338
3343
  projectPath;
3339
3344
  client;
@@ -3348,7 +3353,7 @@ class IntegrationChecker {
3348
3353
  if (!workspaceId) {
3349
3354
  throw new Error('No workspace ID found. Please login with "adk login"');
3350
3355
  }
3351
- this.client = new Client7({
3356
+ this.client = new Client8({
3352
3357
  token: credentials.token,
3353
3358
  apiUrl: credentials.apiUrl,
3354
3359
  workspaceId,
@@ -3507,7 +3512,7 @@ class IntegrationChecker {
3507
3512
  }
3508
3513
  }
3509
3514
  // src/integrations/sync-manager.ts
3510
- import { Client as Client8 } from "@botpress/client";
3515
+ import { Client as Client9 } from "@botpress/client";
3511
3516
  class IntegrationSyncManager {
3512
3517
  projectPath;
3513
3518
  client;
@@ -3522,7 +3527,7 @@ class IntegrationSyncManager {
3522
3527
  if (!workspaceId) {
3523
3528
  throw new Error('No workspace ID found. Please login with "adk login"');
3524
3529
  }
3525
- this.client = new Client8({
3530
+ this.client = new Client9({
3526
3531
  token: credentials.token,
3527
3532
  apiUrl: credentials.apiUrl,
3528
3533
  workspaceId,
@@ -3600,7 +3605,7 @@ class IntegrationSyncManager {
3600
3605
  }
3601
3606
  }
3602
3607
  // src/interfaces/manager.ts
3603
- import { Client as Client9 } from "@botpress/client";
3608
+ import { Client as Client10 } from "@botpress/client";
3604
3609
 
3605
3610
  // src/interfaces/enhanced-cache.ts
3606
3611
  import fs9 from "fs/promises";
@@ -3771,7 +3776,7 @@ class InterfaceManager {
3771
3776
  if (!this.options.workspaceId && !credentials.workspaceId) {
3772
3777
  throw new Error('No workspace ID found in current profile. Please login again with "adk login"');
3773
3778
  }
3774
- this.client = new Client9({
3779
+ this.client = new Client10({
3775
3780
  token: credentials.token,
3776
3781
  apiUrl: credentials.apiUrl,
3777
3782
  workspaceId: this.options.workspaceId || credentials.workspaceId,
@@ -4726,7 +4731,7 @@ init_validation_errors();
4726
4731
  init_agent_resolver();
4727
4732
  init_types();
4728
4733
  // src/config/manager.ts
4729
- import { Client as Client10 } from "@botpress/client";
4734
+ import { Client as Client11 } from "@botpress/client";
4730
4735
  import { sync as jex } from "@bpinternal/jex";
4731
4736
  class ConfigManager {
4732
4737
  botId;
@@ -4737,7 +4742,7 @@ class ConfigManager {
4737
4742
  async getClient() {
4738
4743
  if (!this.client) {
4739
4744
  const credentials = await auth.getActiveCredentials();
4740
- this.client = new Client10({
4745
+ this.client = new Client11({
4741
4746
  token: credentials.token,
4742
4747
  apiUrl: credentials.apiUrl,
4743
4748
  botId: this.botId,
@@ -4866,7 +4871,7 @@ class AgentProjectGenerator {
4866
4871
  deploy: "adk deploy"
4867
4872
  },
4868
4873
  dependencies: {
4869
- "@botpress/runtime": `^${"1.11.2"}`
4874
+ "@botpress/runtime": `^${"1.11.3"}`
4870
4875
  },
4871
4876
  devDependencies: {
4872
4877
  typescript: "^5.9.3"
@@ -6187,7 +6192,7 @@ init_fs();
6187
6192
  import path27 from "path";
6188
6193
  import fs12 from "fs/promises";
6189
6194
  import { existsSync as existsSync3 } from "fs";
6190
- import { Client as Client11 } from "@botpress/client";
6195
+ import { Client as Client12 } from "@botpress/client";
6191
6196
  class DevIdManager {
6192
6197
  projectPath;
6193
6198
  botProjectPath;
@@ -6206,7 +6211,7 @@ class DevIdManager {
6206
6211
  if (!workspaceId) {
6207
6212
  throw new Error('No workspace ID found in agent.json or current profile. Please login again with "adk login"');
6208
6213
  }
6209
- this.client = new Client11({
6214
+ this.client = new Client12({
6210
6215
  token: credentials.token,
6211
6216
  apiUrl: credentials.apiUrl,
6212
6217
  workspaceId,
@@ -7651,7 +7656,7 @@ async function generateBotProject(options) {
7651
7656
  }
7652
7657
  }
7653
7658
  // src/tables/table-manager.ts
7654
- import { Client as Client12 } from "@botpress/client";
7659
+ import { Client as Client13 } from "@botpress/client";
7655
7660
  import { transforms as transforms4 } from "@botpress/sdk";
7656
7661
  class TableManager {
7657
7662
  client;
@@ -7665,7 +7670,7 @@ class TableManager {
7665
7670
  if (!this.client) {
7666
7671
  const credentials = await auth.getActiveCredentials();
7667
7672
  this.assertBotId("initialize client");
7668
- this.client = new Client12({
7673
+ this.client = new Client13({
7669
7674
  token: credentials.token,
7670
7675
  apiUrl: credentials.apiUrl,
7671
7676
  botId: this.botId,
@@ -8132,7 +8137,7 @@ import crypto4 from "crypto";
8132
8137
  import path33 from "path";
8133
8138
  import fs16 from "fs/promises";
8134
8139
  import { glob } from "glob";
8135
- import { Client as Client13 } from "@botpress/client";
8140
+ import { Client as Client14 } from "@botpress/client";
8136
8141
  import { DataSource } from "@botpress/runtime";
8137
8142
 
8138
8143
  // src/knowledge/types.ts
@@ -8177,7 +8182,7 @@ class KnowledgeManager {
8177
8182
  if (!this.client) {
8178
8183
  const credentials = await auth.getActiveCredentials();
8179
8184
  this.assertBotId("initialize client");
8180
- this.client = new Client13({
8185
+ this.client = new Client14({
8181
8186
  token: credentials.token,
8182
8187
  apiUrl: credentials.apiUrl,
8183
8188
  botId: this.botId,
@@ -9063,7 +9068,7 @@ class FileWatcher2 extends EventEmitter3 {
9063
9068
  }
9064
9069
  }
9065
9070
  // src/preflight/checker.ts
9066
- import { Client as Client14 } from "@botpress/client";
9071
+ import { Client as Client15 } from "@botpress/client";
9067
9072
  import path34 from "path";
9068
9073
 
9069
9074
  // src/preflight/types.ts
@@ -9278,7 +9283,7 @@ class PreflightChecker {
9278
9283
  if (!workspaceId) {
9279
9284
  throw new Error('No workspace ID found. Please login with "adk login"');
9280
9285
  }
9281
- this.client = new Client14({
9286
+ this.client = new Client15({
9282
9287
  token: credentials.token,
9283
9288
  apiUrl: credentials.apiUrl,
9284
9289
  workspaceId,
@@ -9488,5 +9493,5 @@ export {
9488
9493
  AgentProject
9489
9494
  };
9490
9495
 
9491
- //# debugId=D1BF745DF658981964756E2164756E21
9496
+ //# debugId=88AB867F805D688364756E2164756E21
9492
9497
  //# sourceMappingURL=index.js.map