@botpress/adk-cli 1.7.13 → 1.7.15
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.
- package/dist/cli.js +57 -16
- 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.
|
|
346927
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.7.15", adk: "1.7.15", 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({
|
|
@@ -381402,6 +381402,12 @@ If the question is not related to the knowledge bases, do NOT use this tool.`.tr
|
|
|
381402
381402
|
if (tags[WellKnownTags.knowledge.KNOWLEDGE_SOURCE_ID]) {
|
|
381403
381403
|
citationMetadata.sourceId = tags[WellKnownTags.knowledge.KNOWLEDGE_SOURCE_ID];
|
|
381404
381404
|
}
|
|
381405
|
+
for (const key in citationMetadata) {
|
|
381406
|
+
let value2 = citationMetadata[key];
|
|
381407
|
+
if (typeof value2 !== "string" || value2.trim().length === 0 || value2.length > 1024) {
|
|
381408
|
+
delete citationMetadata[key];
|
|
381409
|
+
}
|
|
381410
|
+
}
|
|
381405
381411
|
const { tag } = citations.registerSource(citationMetadata);
|
|
381406
381412
|
message3.push(`<${tag} file="${p.file.key}" title="${citationMetadata.title || p.file.key}">`);
|
|
381407
381413
|
message3.push(p.content);
|
|
@@ -627100,7 +627106,7 @@ class AgentProjectGenerator {
|
|
|
627100
627106
|
deploy: "adk deploy"
|
|
627101
627107
|
},
|
|
627102
627108
|
dependencies: {
|
|
627103
|
-
"@botpress/runtime": "^1.7.
|
|
627109
|
+
"@botpress/runtime": "^1.7.15"
|
|
627104
627110
|
},
|
|
627105
627111
|
devDependencies: {
|
|
627106
627112
|
typescript: "^5.9.3"
|
|
@@ -630051,7 +630057,7 @@ var import_ts_morph, __defProp9, __commonJS5 = (cb4, mod) => () => (mod || cb4((
|
|
|
630051
630057
|
`));
|
|
630052
630058
|
return code;
|
|
630053
630059
|
}
|
|
630054
|
-
}, ADK_VERSION = "1.7.
|
|
630060
|
+
}, ADK_VERSION = "1.7.15", relative2 = (from, to3) => {
|
|
630055
630061
|
const fromDir = path10.dirname(from);
|
|
630056
630062
|
const relative32 = path10.relative(fromDir, to3);
|
|
630057
630063
|
return relative32.startsWith(".") ? relative32 : `./${relative32}`;
|
|
@@ -630249,7 +630255,7 @@ var init_dist15 = __esm(() => {
|
|
|
630249
630255
|
require_package3 = __commonJS5((exports, module) => {
|
|
630250
630256
|
module.exports = {
|
|
630251
630257
|
name: "@botpress/adk",
|
|
630252
|
-
version: "1.7.
|
|
630258
|
+
version: "1.7.15",
|
|
630253
630259
|
description: "Core ADK library for building AI agents on Botpress",
|
|
630254
630260
|
type: "module",
|
|
630255
630261
|
main: "dist/index.js",
|
|
@@ -630296,7 +630302,7 @@ var init_dist15 = __esm(() => {
|
|
|
630296
630302
|
"@botpress/cli": "^4.23",
|
|
630297
630303
|
"@botpress/client": "^1.27.0",
|
|
630298
630304
|
"@botpress/cognitive": "^0.2.0",
|
|
630299
|
-
"@botpress/runtime": "^1.7.
|
|
630305
|
+
"@botpress/runtime": "^1.7.15",
|
|
630300
630306
|
"@botpress/sdk": "^4.18.1",
|
|
630301
630307
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
630302
630308
|
"@parcel/watcher": "^2.5.1",
|
|
@@ -636775,7 +636781,7 @@ var init_Separator = __esm(async () => {
|
|
|
636775
636781
|
var require_package4 = __commonJS((exports, module) => {
|
|
636776
636782
|
module.exports = {
|
|
636777
636783
|
name: "@botpress/adk",
|
|
636778
|
-
version: "1.7.
|
|
636784
|
+
version: "1.7.15",
|
|
636779
636785
|
description: "Core ADK library for building AI agents on Botpress",
|
|
636780
636786
|
type: "module",
|
|
636781
636787
|
main: "dist/index.js",
|
|
@@ -636822,7 +636828,7 @@ var require_package4 = __commonJS((exports, module) => {
|
|
|
636822
636828
|
"@botpress/cli": "^4.23",
|
|
636823
636829
|
"@botpress/client": "^1.27.0",
|
|
636824
636830
|
"@botpress/cognitive": "^0.2.0",
|
|
636825
|
-
"@botpress/runtime": "^1.7.
|
|
636831
|
+
"@botpress/runtime": "^1.7.15",
|
|
636826
636832
|
"@botpress/sdk": "^4.18.1",
|
|
636827
636833
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
636828
636834
|
"@parcel/watcher": "^2.5.1",
|
|
@@ -638298,7 +638304,7 @@ function checkRuntimeVersion(agentRoot) {
|
|
|
638298
638304
|
`));
|
|
638299
638305
|
}
|
|
638300
638306
|
}
|
|
638301
|
-
var semver2, EXPECTED_RUNTIME_VERSION = "1.7.
|
|
638307
|
+
var semver2, EXPECTED_RUNTIME_VERSION = "1.7.15";
|
|
638302
638308
|
var init_runtime_version_check = __esm(() => {
|
|
638303
638309
|
init_source();
|
|
638304
638310
|
semver2 = __toESM(require_semver2(), 1);
|
|
@@ -653399,8 +653405,8 @@ var exports_upgrade = {};
|
|
|
653399
653405
|
__export(exports_upgrade, {
|
|
653400
653406
|
adkSelfUpgrade: () => adkSelfUpgrade
|
|
653401
653407
|
});
|
|
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";
|
|
653408
|
+
import { existsSync as existsSync16, writeFileSync as writeFileSync5, chmodSync, renameSync, unlinkSync, readFileSync as readFileSync15, mkdirSync as mkdirSync5, rmdirSync, accessSync, constants as constants8 } from "fs";
|
|
653409
|
+
import { join as join18, dirname as dirname3 } from "path";
|
|
653404
653410
|
import { tmpdir } from "os";
|
|
653405
653411
|
import { execSync as execSync4 } from "child_process";
|
|
653406
653412
|
function getPlatformInfo() {
|
|
@@ -653485,6 +653491,18 @@ async function downloadBinaryWindows(version, target, extension) {
|
|
|
653485
653491
|
function getCurrentBinaryPath() {
|
|
653486
653492
|
return process.execPath;
|
|
653487
653493
|
}
|
|
653494
|
+
function checkWritePermissions(path35) {
|
|
653495
|
+
try {
|
|
653496
|
+
const dir = dirname3(path35);
|
|
653497
|
+
accessSync(dir, constants8.W_OK);
|
|
653498
|
+
if (existsSync16(path35)) {
|
|
653499
|
+
accessSync(path35, constants8.W_OK);
|
|
653500
|
+
}
|
|
653501
|
+
return true;
|
|
653502
|
+
} catch {
|
|
653503
|
+
return false;
|
|
653504
|
+
}
|
|
653505
|
+
}
|
|
653488
653506
|
function replaceBinary(newBinaryBuffer, isWindows6) {
|
|
653489
653507
|
const currentPath = getCurrentBinaryPath();
|
|
653490
653508
|
if (isWindows6) {
|
|
@@ -653514,6 +653532,11 @@ del "%~f0"
|
|
|
653514
653532
|
renameSync(backupPath, currentPath);
|
|
653515
653533
|
} catch {}
|
|
653516
653534
|
}
|
|
653535
|
+
if (error.code === "EACCES" || error.code === "EPERM") {
|
|
653536
|
+
throw new Error(`Permission denied: ${error.message}
|
|
653537
|
+
|
|
653538
|
+
Try running with sudo: sudo adk self-upgrade`);
|
|
653539
|
+
}
|
|
653517
653540
|
throw error;
|
|
653518
653541
|
}
|
|
653519
653542
|
}
|
|
@@ -653527,7 +653550,23 @@ async function adkSelfUpgrade(currentVersion) {
|
|
|
653527
653550
|
console.log("\u2705 You already have the latest version!");
|
|
653528
653551
|
return;
|
|
653529
653552
|
}
|
|
653530
|
-
const
|
|
653553
|
+
const currentPath = getCurrentBinaryPath();
|
|
653554
|
+
const { isWindows: isWindows6 } = getPlatformInfo();
|
|
653555
|
+
if (!isWindows6 && !checkWritePermissions(currentPath)) {
|
|
653556
|
+
console.error(`
|
|
653557
|
+
\u274C Upgrade failed: Permission denied`);
|
|
653558
|
+
console.error(`
|
|
653559
|
+
The adk binary is located at: ${currentPath}`);
|
|
653560
|
+
console.error(" You need write permissions to upgrade.");
|
|
653561
|
+
console.error(`
|
|
653562
|
+
Try running with sudo:`);
|
|
653563
|
+
console.error(" \x1B[36msudo adk self-upgrade\x1B[0m");
|
|
653564
|
+
console.error(`
|
|
653565
|
+
Or manually download from:`);
|
|
653566
|
+
console.error(` https://github.com/${GITHUB_REPO}/releases/latest`);
|
|
653567
|
+
throw new Error("Permission denied");
|
|
653568
|
+
}
|
|
653569
|
+
const { target, extension } = getPlatformInfo();
|
|
653531
653570
|
let binaryBuffer;
|
|
653532
653571
|
if (isWindows6) {
|
|
653533
653572
|
binaryBuffer = await downloadBinaryWindows(latestVersion, target, extension);
|
|
@@ -653542,11 +653581,13 @@ async function adkSelfUpgrade(currentVersion) {
|
|
|
653542
653581
|
Run \x1B[36madk --version\x1B[0m to verify`);
|
|
653543
653582
|
}
|
|
653544
653583
|
} catch (error) {
|
|
653545
|
-
|
|
653584
|
+
if (!error.message.includes("Permission denied")) {
|
|
653585
|
+
console.error(`
|
|
653546
653586
|
\u274C Upgrade failed:`, error.message);
|
|
653547
|
-
|
|
653587
|
+
console.error(`
|
|
653548
653588
|
You can manually download from:`);
|
|
653549
|
-
|
|
653589
|
+
console.error(` https://github.com/${GITHUB_REPO}/releases/latest`);
|
|
653590
|
+
}
|
|
653550
653591
|
throw error;
|
|
653551
653592
|
}
|
|
653552
653593
|
}
|
|
@@ -653997,7 +654038,7 @@ var {
|
|
|
653997
654038
|
|
|
653998
654039
|
// src/cli.ts
|
|
653999
654040
|
import { readFileSync as readFileSync16 } from "fs";
|
|
654000
|
-
import { join as join19, dirname as
|
|
654041
|
+
import { join as join19, dirname as dirname4 } from "path";
|
|
654001
654042
|
import { fileURLToPath as fileURLToPath9 } from "url";
|
|
654002
654043
|
|
|
654003
654044
|
// src/utils/version-check.tsx
|
|
@@ -654237,7 +654278,7 @@ if (!checkNodeVersion(true)) {
|
|
|
654237
654278
|
checkNodeVersion(false);
|
|
654238
654279
|
process.exit(1);
|
|
654239
654280
|
}
|
|
654240
|
-
var CLI_VERSION = "1.7.
|
|
654281
|
+
var CLI_VERSION = "1.7.15";
|
|
654241
654282
|
|
|
654242
654283
|
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
654284
|
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.
|
|
3
|
+
"version": "1.7.15",
|
|
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.
|
|
43
|
+
"@botpress/adk": "^1.7.15",
|
|
44
44
|
"@botpress/cli": "^4.23",
|
|
45
|
-
"@botpress/runtime": "^1.7.
|
|
45
|
+
"@botpress/runtime": "^1.7.15",
|
|
46
46
|
"adm-zip": "^0.5.16",
|
|
47
47
|
"chalk": "^5.4.1",
|
|
48
48
|
"clipboardy": "^4.0.0",
|