@botpress/adk-cli 1.7.13 → 1.7.14

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 +51 -16
  2. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -346924,7 +346924,7 @@ var init_internal = __esm(() => {
346924
346924
  });
346925
346925
  init_define_PACKAGE_VERSIONS = __esm2({
346926
346926
  "<define:__PACKAGE_VERSIONS__>"() {
346927
- define_PACKAGE_VERSIONS_default = { runtime: "1.7.13", adk: "1.7.13", sdk: "4.19.0", llmz: "0.0.31", zai: "2.5.0", cognitive: "0.2.0" };
346927
+ define_PACKAGE_VERSIONS_default = { runtime: "1.7.14", adk: "1.7.14", sdk: "4.19.0", llmz: "0.0.31", zai: "2.5.0", cognitive: "0.2.0" };
346928
346928
  }
346929
346929
  });
346930
346930
  init_globalThis = __esm2({
@@ -627100,7 +627100,7 @@ class AgentProjectGenerator {
627100
627100
  deploy: "adk deploy"
627101
627101
  },
627102
627102
  dependencies: {
627103
- "@botpress/runtime": "^1.7.13"
627103
+ "@botpress/runtime": "^1.7.14"
627104
627104
  },
627105
627105
  devDependencies: {
627106
627106
  typescript: "^5.9.3"
@@ -630051,7 +630051,7 @@ var import_ts_morph, __defProp9, __commonJS5 = (cb4, mod) => () => (mod || cb4((
630051
630051
  `));
630052
630052
  return code;
630053
630053
  }
630054
- }, ADK_VERSION = "1.7.13", relative2 = (from, to3) => {
630054
+ }, ADK_VERSION = "1.7.14", relative2 = (from, to3) => {
630055
630055
  const fromDir = path10.dirname(from);
630056
630056
  const relative32 = path10.relative(fromDir, to3);
630057
630057
  return relative32.startsWith(".") ? relative32 : `./${relative32}`;
@@ -630249,7 +630249,7 @@ var init_dist15 = __esm(() => {
630249
630249
  require_package3 = __commonJS5((exports, module) => {
630250
630250
  module.exports = {
630251
630251
  name: "@botpress/adk",
630252
- version: "1.7.13",
630252
+ version: "1.7.14",
630253
630253
  description: "Core ADK library for building AI agents on Botpress",
630254
630254
  type: "module",
630255
630255
  main: "dist/index.js",
@@ -630296,7 +630296,7 @@ var init_dist15 = __esm(() => {
630296
630296
  "@botpress/cli": "^4.23",
630297
630297
  "@botpress/client": "^1.27.0",
630298
630298
  "@botpress/cognitive": "^0.2.0",
630299
- "@botpress/runtime": "^1.7.13",
630299
+ "@botpress/runtime": "^1.7.14",
630300
630300
  "@botpress/sdk": "^4.18.1",
630301
630301
  "@bpinternal/yargs-extra": "^0.0.21",
630302
630302
  "@parcel/watcher": "^2.5.1",
@@ -636775,7 +636775,7 @@ var init_Separator = __esm(async () => {
636775
636775
  var require_package4 = __commonJS((exports, module) => {
636776
636776
  module.exports = {
636777
636777
  name: "@botpress/adk",
636778
- version: "1.7.13",
636778
+ version: "1.7.14",
636779
636779
  description: "Core ADK library for building AI agents on Botpress",
636780
636780
  type: "module",
636781
636781
  main: "dist/index.js",
@@ -636822,7 +636822,7 @@ var require_package4 = __commonJS((exports, module) => {
636822
636822
  "@botpress/cli": "^4.23",
636823
636823
  "@botpress/client": "^1.27.0",
636824
636824
  "@botpress/cognitive": "^0.2.0",
636825
- "@botpress/runtime": "^1.7.13",
636825
+ "@botpress/runtime": "^1.7.14",
636826
636826
  "@botpress/sdk": "^4.18.1",
636827
636827
  "@bpinternal/yargs-extra": "^0.0.21",
636828
636828
  "@parcel/watcher": "^2.5.1",
@@ -638298,7 +638298,7 @@ function checkRuntimeVersion(agentRoot) {
638298
638298
  `));
638299
638299
  }
638300
638300
  }
638301
- var semver2, EXPECTED_RUNTIME_VERSION = "1.7.13";
638301
+ var semver2, EXPECTED_RUNTIME_VERSION = "1.7.14";
638302
638302
  var init_runtime_version_check = __esm(() => {
638303
638303
  init_source();
638304
638304
  semver2 = __toESM(require_semver2(), 1);
@@ -653399,8 +653399,8 @@ var exports_upgrade = {};
653399
653399
  __export(exports_upgrade, {
653400
653400
  adkSelfUpgrade: () => adkSelfUpgrade
653401
653401
  });
653402
- import { existsSync as existsSync16, writeFileSync as writeFileSync5, chmodSync, renameSync, unlinkSync, readFileSync as readFileSync15, mkdirSync as mkdirSync5, rmdirSync } from "fs";
653403
- import { join as join18 } from "path";
653402
+ import { existsSync as existsSync16, writeFileSync as writeFileSync5, chmodSync, renameSync, unlinkSync, readFileSync as readFileSync15, mkdirSync as mkdirSync5, rmdirSync, accessSync, constants as constants8 } from "fs";
653403
+ import { join as join18, dirname as dirname3 } from "path";
653404
653404
  import { tmpdir } from "os";
653405
653405
  import { execSync as execSync4 } from "child_process";
653406
653406
  function getPlatformInfo() {
@@ -653485,6 +653485,18 @@ async function downloadBinaryWindows(version, target, extension) {
653485
653485
  function getCurrentBinaryPath() {
653486
653486
  return process.execPath;
653487
653487
  }
653488
+ function checkWritePermissions(path35) {
653489
+ try {
653490
+ const dir = dirname3(path35);
653491
+ accessSync(dir, constants8.W_OK);
653492
+ if (existsSync16(path35)) {
653493
+ accessSync(path35, constants8.W_OK);
653494
+ }
653495
+ return true;
653496
+ } catch {
653497
+ return false;
653498
+ }
653499
+ }
653488
653500
  function replaceBinary(newBinaryBuffer, isWindows6) {
653489
653501
  const currentPath = getCurrentBinaryPath();
653490
653502
  if (isWindows6) {
@@ -653514,6 +653526,11 @@ del "%~f0"
653514
653526
  renameSync(backupPath, currentPath);
653515
653527
  } catch {}
653516
653528
  }
653529
+ if (error.code === "EACCES" || error.code === "EPERM") {
653530
+ throw new Error(`Permission denied: ${error.message}
653531
+
653532
+ Try running with sudo: sudo adk self-upgrade`);
653533
+ }
653517
653534
  throw error;
653518
653535
  }
653519
653536
  }
@@ -653527,7 +653544,23 @@ async function adkSelfUpgrade(currentVersion) {
653527
653544
  console.log("\u2705 You already have the latest version!");
653528
653545
  return;
653529
653546
  }
653530
- const { target, extension, isWindows: isWindows6 } = getPlatformInfo();
653547
+ const currentPath = getCurrentBinaryPath();
653548
+ const { isWindows: isWindows6 } = getPlatformInfo();
653549
+ if (!isWindows6 && !checkWritePermissions(currentPath)) {
653550
+ console.error(`
653551
+ \u274C Upgrade failed: Permission denied`);
653552
+ console.error(`
653553
+ The adk binary is located at: ${currentPath}`);
653554
+ console.error(" You need write permissions to upgrade.");
653555
+ console.error(`
653556
+ Try running with sudo:`);
653557
+ console.error(" \x1B[36msudo adk self-upgrade\x1B[0m");
653558
+ console.error(`
653559
+ Or manually download from:`);
653560
+ console.error(` https://github.com/${GITHUB_REPO}/releases/latest`);
653561
+ throw new Error("Permission denied");
653562
+ }
653563
+ const { target, extension } = getPlatformInfo();
653531
653564
  let binaryBuffer;
653532
653565
  if (isWindows6) {
653533
653566
  binaryBuffer = await downloadBinaryWindows(latestVersion, target, extension);
@@ -653542,11 +653575,13 @@ async function adkSelfUpgrade(currentVersion) {
653542
653575
  Run \x1B[36madk --version\x1B[0m to verify`);
653543
653576
  }
653544
653577
  } catch (error) {
653545
- console.error(`
653578
+ if (!error.message.includes("Permission denied")) {
653579
+ console.error(`
653546
653580
  \u274C Upgrade failed:`, error.message);
653547
- console.error(`
653581
+ console.error(`
653548
653582
  You can manually download from:`);
653549
- console.error(` https://github.com/${GITHUB_REPO}/releases/latest`);
653583
+ console.error(` https://github.com/${GITHUB_REPO}/releases/latest`);
653584
+ }
653550
653585
  throw error;
653551
653586
  }
653552
653587
  }
@@ -653997,7 +654032,7 @@ var {
653997
654032
 
653998
654033
  // src/cli.ts
653999
654034
  import { readFileSync as readFileSync16 } from "fs";
654000
- import { join as join19, dirname as dirname3 } from "path";
654035
+ import { join as join19, dirname as dirname4 } from "path";
654001
654036
  import { fileURLToPath as fileURLToPath9 } from "url";
654002
654037
 
654003
654038
  // src/utils/version-check.tsx
@@ -654237,7 +654272,7 @@ if (!checkNodeVersion(true)) {
654237
654272
  checkNodeVersion(false);
654238
654273
  process.exit(1);
654239
654274
  }
654240
- var CLI_VERSION = "1.7.13";
654275
+ var CLI_VERSION = "1.7.14";
654241
654276
 
654242
654277
  program.name("adk").description("Botpress Agent Development Kit (ADK) - CLI for building AI agents").version(CLI_VERSION).option("--no-cache", "Disable caching for integration lookups").configureHelp({
654243
654278
  formatHelp: () => formatHelp(program, CLI_VERSION)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/adk-cli",
3
- "version": "1.7.13",
3
+ "version": "1.7.14",
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.7.13",
43
+ "@botpress/adk": "^1.7.14",
44
44
  "@botpress/cli": "^4.23",
45
- "@botpress/runtime": "^1.7.13",
45
+ "@botpress/runtime": "^1.7.14",
46
46
  "adm-zip": "^0.5.16",
47
47
  "chalk": "^5.4.1",
48
48
  "clipboardy": "^4.0.0",