@botpress/adk-cli 1.8.2 → 1.8.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.
Files changed (2) hide show
  1. package/dist/cli.js +35 -56
  2. package/package.json +4 -4
package/dist/cli.js CHANGED
@@ -355533,7 +355533,7 @@ var init_internal = __esm(() => {
355533
355533
  });
355534
355534
  init_define_PACKAGE_VERSIONS = __esm2({
355535
355535
  "<define:__PACKAGE_VERSIONS__>"() {
355536
- define_PACKAGE_VERSIONS_default = { runtime: "1.8.2", adk: "1.8.2", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
355536
+ define_PACKAGE_VERSIONS_default = { runtime: "1.8.3", adk: "1.8.3", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
355537
355537
  }
355538
355538
  });
355539
355539
  init_globalThis = __esm2({
@@ -643074,7 +643074,7 @@ var init_library = __esm(() => {
643074
643074
  });
643075
643075
  init_define_PACKAGE_VERSIONS2 = __esm3({
643076
643076
  "<define:__PACKAGE_VERSIONS__>"() {
643077
- define_PACKAGE_VERSIONS_default2 = { runtime: "1.8.2", adk: "1.8.2", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
643077
+ define_PACKAGE_VERSIONS_default2 = { runtime: "1.8.3", adk: "1.8.3", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
643078
643078
  }
643079
643079
  });
643080
643080
  init_globalThis2 = __esm3({
@@ -680270,7 +680270,6 @@ import { existsSync as existsSync32 } from "fs";
680270
680270
  import path27 from "path";
680271
680271
  import fs14 from "fs/promises";
680272
680272
  import { existsSync as existsSync42 } from "fs";
680273
- import { spawn as spawn2 } from "child_process";
680274
680273
  import crypto42 from "crypto";
680275
680274
  import path31 from "path";
680276
680275
  import fs16 from "fs/promises";
@@ -683390,7 +683389,7 @@ class AgentProjectGenerator {
683390
683389
  deploy: "adk deploy"
683391
683390
  },
683392
683391
  dependencies: {
683393
- "@botpress/runtime": "^1.8.2"
683392
+ "@botpress/runtime": "^1.8.3"
683394
683393
  },
683395
683394
  devDependencies: {
683396
683395
  typescript: "^5.9.3"
@@ -684517,7 +684516,7 @@ class IntegrationSync {
684517
684516
  throw new Error('No workspace ID found. Please login with "adk login"');
684518
684517
  }
684519
684518
  const command = new BpAddCommand({
684520
- integration: integration.fullVersion,
684519
+ resource: `integration:${integration.fullVersion}`,
684521
684520
  botPath: this.botProjectPath,
684522
684521
  workspaceId,
684523
684522
  credentials
@@ -684623,47 +684622,27 @@ class InterfaceSync {
684623
684622
  if (!workspaceId) {
684624
684623
  throw new Error('No workspace ID found. Please login with "adk login"');
684625
684624
  }
684626
- const bpCli = await getBpCli(this.projectPath);
684627
- const bpPath = bpCli.path;
684628
684625
  return new Promise((resolve3, reject) => {
684629
- const args = [
684630
- "add",
684631
- `interface:${interfaceInfo.fullVersion}`,
684632
- "-y",
684633
- "--installPath",
684634
- this.botProjectPath,
684635
- "--token",
684636
- credentials.token,
684637
- "--workspaceId",
684626
+ const command = new BpAddCommand({
684627
+ resource: `interface:${interfaceInfo.fullVersion}`,
684628
+ botPath: this.botProjectPath,
684638
684629
  workspaceId,
684639
- "--apiUrl",
684640
- credentials.apiUrl
684641
- ];
684642
- const isJsFile = bpPath.endsWith(".js");
684643
- const command = isJsFile ? "node" : bpPath;
684644
- const commandArgs = isJsFile ? [bpPath, ...args] : args;
684645
- const child = spawn2(command, commandArgs, {
684646
- cwd: this.projectPath,
684647
- stdio: "pipe"
684648
- });
684649
- let stdout = "";
684650
- let stderr = "";
684651
- child.stdout?.on("data", (data) => {
684652
- stdout += data.toString();
684630
+ credentials: {
684631
+ token: credentials.token,
684632
+ apiUrl: credentials.apiUrl
684633
+ }
684653
684634
  });
684654
- child.stderr?.on("data", (data) => {
684655
- stderr += data.toString();
684635
+ let stderr = "";
684636
+ command.on("stderr", (data) => {
684637
+ stderr += data;
684656
684638
  });
684657
- child.on("close", (code) => {
684658
- if (code === 0) {
684659
- resolve3();
684660
- } else {
684661
- reject(new Error(`Failed to install interface ${interfaceInfo.fullVersion}: ${stderr || stdout}`));
684662
- }
684639
+ command.on("error", (error) => {
684640
+ reject(new Error(`Failed to install interface ${interfaceInfo.fullVersion}: ${error.stderr || error.message}`));
684663
684641
  });
684664
- child.on("error", (error) => {
684665
- reject(new Error(`Failed to spawn bp command: ${error.message}`));
684642
+ command.on("done", () => {
684643
+ resolve3();
684666
684644
  });
684645
+ command.run().catch(reject);
684667
684646
  });
684668
684647
  }
684669
684648
  async renameInterfaceFolder(interfaceInfo) {
@@ -687298,7 +687277,7 @@ var import_ts_morph, __defProp10, __commonJS6 = (cb5, mod) => () => (mod || cb5(
687298
687277
  `));
687299
687278
  return code;
687300
687279
  }
687301
- }, ADK_VERSION = "1.8.2", relative2 = (from, to3) => {
687280
+ }, ADK_VERSION = "1.8.3", relative2 = (from, to3) => {
687302
687281
  const fromDir = path102.dirname(from);
687303
687282
  const relative32 = path102.relative(fromDir, to3);
687304
687283
  return relative32.startsWith(".") ? relative32 : `./${relative32}`;
@@ -687512,7 +687491,7 @@ var init_dist17 = __esm(() => {
687512
687491
  require_package3 = __commonJS6((exports2, module) => {
687513
687492
  module.exports = {
687514
687493
  name: "@botpress/adk",
687515
- version: "1.8.2",
687494
+ version: "1.8.3",
687516
687495
  description: "Core ADK library for building AI agents on Botpress",
687517
687496
  type: "module",
687518
687497
  main: "dist/index.js",
@@ -687556,10 +687535,10 @@ var init_dist17 = __esm(() => {
687556
687535
  url: "https://github.com/botpress/adk"
687557
687536
  },
687558
687537
  dependencies: {
687559
- "@botpress/cli": "^4.23",
687538
+ "@botpress/cli": "^4.27.3",
687560
687539
  "@botpress/client": "^1.27.2",
687561
687540
  "@botpress/cognitive": "^0.2.0",
687562
- "@botpress/runtime": "^1.8.2",
687541
+ "@botpress/runtime": "^1.8.3",
687563
687542
  "@botpress/sdk": "^4.18.1",
687564
687543
  "@bpinternal/yargs-extra": "^0.0.21",
687565
687544
  "@parcel/watcher": "^2.5.1",
@@ -687600,11 +687579,11 @@ var init_dist17 = __esm(() => {
687600
687579
  this.options = options;
687601
687580
  }
687602
687581
  async run() {
687603
- const { integration, botPath, workspaceId, credentials } = this.options;
687582
+ const { resource: resource3, botPath, workspaceId, credentials } = this.options;
687604
687583
  const { path: bpCommand } = await getBpCli(botPath);
687605
687584
  const args = [
687606
687585
  "add",
687607
- `integration:${integration}`,
687586
+ resource3,
687608
687587
  "-y",
687609
687588
  "--installPath",
687610
687589
  botPath,
@@ -694095,7 +694074,7 @@ var init_Separator = __esm(async () => {
694095
694074
  var require_package4 = __commonJS((exports2, module) => {
694096
694075
  module.exports = {
694097
694076
  name: "@botpress/adk",
694098
- version: "1.8.2",
694077
+ version: "1.8.3",
694099
694078
  description: "Core ADK library for building AI agents on Botpress",
694100
694079
  type: "module",
694101
694080
  main: "dist/index.js",
@@ -694139,10 +694118,10 @@ var require_package4 = __commonJS((exports2, module) => {
694139
694118
  url: "https://github.com/botpress/adk"
694140
694119
  },
694141
694120
  dependencies: {
694142
- "@botpress/cli": "^4.23",
694121
+ "@botpress/cli": "^4.27.3",
694143
694122
  "@botpress/client": "^1.27.2",
694144
694123
  "@botpress/cognitive": "^0.2.0",
694145
- "@botpress/runtime": "^1.8.2",
694124
+ "@botpress/runtime": "^1.8.3",
694146
694125
  "@botpress/sdk": "^4.18.1",
694147
694126
  "@bpinternal/yargs-extra": "^0.0.21",
694148
694127
  "@parcel/watcher": "^2.5.1",
@@ -695663,7 +695642,7 @@ function checkRuntimeVersion(agentRoot) {
695663
695642
  `));
695664
695643
  }
695665
695644
  }
695666
- var semver2, EXPECTED_RUNTIME_VERSION = "1.8.2";
695645
+ var semver2, EXPECTED_RUNTIME_VERSION = "1.8.3";
695667
695646
  var init_runtime_version_check = __esm(() => {
695668
695647
  init_source();
695669
695648
  semver2 = __toESM(require_semver2(), 1);
@@ -699585,13 +699564,13 @@ var init_server = __esm(() => {
699585
699564
  });
699586
699565
 
699587
699566
  // src/utils/node-inspector.ts
699588
- import { spawn as spawn3 } from "child_process";
699567
+ import { spawn as spawn2 } from "child_process";
699589
699568
  import os9 from "os";
699590
699569
  import path44 from "path";
699591
699570
  function openDevtools(url4) {
699592
699571
  const platform4 = os9.platform();
699593
699572
  if (platform4 === "darwin") {
699594
- return spawn3("open", ["-a", "Google Chrome", url4], {
699573
+ return spawn2("open", ["-a", "Google Chrome", url4], {
699595
699574
  detached: true,
699596
699575
  stdio: "ignore"
699597
699576
  }).unref();
@@ -699599,8 +699578,8 @@ function openDevtools(url4) {
699599
699578
  if (platform4 === "win32") {
699600
699579
  const tryStart = (exe) => {
699601
699580
  if (exe)
699602
- return spawn3(exe, [url4], { detached: true, stdio: "ignore" }).unref();
699603
- return spawn3("cmd", ["/c", 'start "" chrome', `"${url4}"`], {
699581
+ return spawn2(exe, [url4], { detached: true, stdio: "ignore" }).unref();
699582
+ return spawn2("cmd", ["/c", 'start "" chrome', `"${url4}"`], {
699604
699583
  detached: true,
699605
699584
  stdio: "ignore"
699606
699585
  }).unref();
@@ -699625,7 +699604,7 @@ function openDevtools(url4) {
699625
699604
  "_",
699626
699605
  url4
699627
699606
  ];
699628
- return spawn3(cmd, args, { detached: true, stdio: "ignore" }).unref();
699607
+ return spawn2(cmd, args, { detached: true, stdio: "ignore" }).unref();
699629
699608
  }
699630
699609
  var init_node_inspector = () => {};
699631
699610
 
@@ -711756,7 +711735,7 @@ if (!checkNodeVersion(true)) {
711756
711735
  checkNodeVersion(false);
711757
711736
  process.exit(1);
711758
711737
  }
711759
- var CLI_VERSION = "1.8.2";
711738
+ var CLI_VERSION = "1.8.3";
711760
711739
  if (CLI_VERSION.startsWith("<<") && CLI_VERSION.endsWith(">>")) {
711761
711740
  try {
711762
711741
  const __filename2 = fileURLToPath12(import.meta.url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/adk-cli",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Command-line interface for the Botpress Agent Development Kit (ADK)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -40,9 +40,9 @@
40
40
  "url": "https://github.com/botpress/adk"
41
41
  },
42
42
  "dependencies": {
43
- "@botpress/adk": "^1.8.2",
44
- "@botpress/cli": "^4.23",
45
- "@botpress/runtime": "^1.8.2",
43
+ "@botpress/adk": "^1.8.3",
44
+ "@botpress/cli": "^4.27.3",
45
+ "@botpress/runtime": "^1.8.3",
46
46
  "adm-zip": "^0.5.16",
47
47
  "chalk": "^5.4.1",
48
48
  "clipboardy": "^4.0.0",