@botpress/adk-cli 1.7.12 → 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.
- package/dist/cli.js +175 -565
- 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.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({
|
|
@@ -623991,9 +623991,6 @@ import { EventEmitter as EventEmitter32 } from "events";
|
|
|
623991
623991
|
import { join as join7, relative as relative3 } from "path";
|
|
623992
623992
|
import { existsSync as existsSync6 } from "fs";
|
|
623993
623993
|
import path31 from "path";
|
|
623994
|
-
import process32 from "process";
|
|
623995
|
-
import os7 from "os";
|
|
623996
|
-
import tty4 from "tty";
|
|
623997
623994
|
import { readFileSync as readFileSync5 } from "fs";
|
|
623998
623995
|
import { join as join8 } from "path";
|
|
623999
623996
|
|
|
@@ -627103,7 +627100,7 @@ class AgentProjectGenerator {
|
|
|
627103
627100
|
deploy: "adk deploy"
|
|
627104
627101
|
},
|
|
627105
627102
|
dependencies: {
|
|
627106
|
-
"@botpress/runtime": "^1.7.
|
|
627103
|
+
"@botpress/runtime": "^1.7.14"
|
|
627107
627104
|
},
|
|
627108
627105
|
devDependencies: {
|
|
627109
627106
|
typescript: "^5.9.3"
|
|
@@ -629733,279 +629730,15 @@ class AgentConfigSyncManager {
|
|
|
629733
629730
|
return this.performSync(botId, updates, options);
|
|
629734
629731
|
}
|
|
629735
629732
|
}
|
|
629736
|
-
function assembleStyles3() {
|
|
629737
|
-
const codes = new Map;
|
|
629738
|
-
for (const [groupName, group2] of Object.entries(styles5)) {
|
|
629739
|
-
for (const [styleName, style] of Object.entries(group2)) {
|
|
629740
|
-
styles5[styleName] = {
|
|
629741
|
-
open: `\x1B[${style[0]}m`,
|
|
629742
|
-
close: `\x1B[${style[1]}m`
|
|
629743
|
-
};
|
|
629744
|
-
group2[styleName] = styles5[styleName];
|
|
629745
|
-
codes.set(style[0], style[1]);
|
|
629746
|
-
}
|
|
629747
|
-
Object.defineProperty(styles5, groupName, {
|
|
629748
|
-
value: group2,
|
|
629749
|
-
enumerable: false
|
|
629750
|
-
});
|
|
629751
|
-
}
|
|
629752
|
-
Object.defineProperty(styles5, "codes", {
|
|
629753
|
-
value: codes,
|
|
629754
|
-
enumerable: false
|
|
629755
|
-
});
|
|
629756
|
-
styles5.color.close = "\x1B[39m";
|
|
629757
|
-
styles5.bgColor.close = "\x1B[49m";
|
|
629758
|
-
styles5.color.ansi = wrapAnsi163();
|
|
629759
|
-
styles5.color.ansi256 = wrapAnsi2563();
|
|
629760
|
-
styles5.color.ansi16m = wrapAnsi16m3();
|
|
629761
|
-
styles5.bgColor.ansi = wrapAnsi163(ANSI_BACKGROUND_OFFSET3);
|
|
629762
|
-
styles5.bgColor.ansi256 = wrapAnsi2563(ANSI_BACKGROUND_OFFSET3);
|
|
629763
|
-
styles5.bgColor.ansi16m = wrapAnsi16m3(ANSI_BACKGROUND_OFFSET3);
|
|
629764
|
-
Object.defineProperties(styles5, {
|
|
629765
|
-
rgbToAnsi256: {
|
|
629766
|
-
value(red2, green2, blue2) {
|
|
629767
|
-
if (red2 === green2 && green2 === blue2) {
|
|
629768
|
-
if (red2 < 8) {
|
|
629769
|
-
return 16;
|
|
629770
|
-
}
|
|
629771
|
-
if (red2 > 248) {
|
|
629772
|
-
return 231;
|
|
629773
|
-
}
|
|
629774
|
-
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
629775
|
-
}
|
|
629776
|
-
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
|
|
629777
|
-
},
|
|
629778
|
-
enumerable: false
|
|
629779
|
-
},
|
|
629780
|
-
hexToRgb: {
|
|
629781
|
-
value(hex) {
|
|
629782
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
629783
|
-
if (!matches) {
|
|
629784
|
-
return [0, 0, 0];
|
|
629785
|
-
}
|
|
629786
|
-
let [colorString] = matches;
|
|
629787
|
-
if (colorString.length === 3) {
|
|
629788
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
629789
|
-
}
|
|
629790
|
-
const integer = Number.parseInt(colorString, 16);
|
|
629791
|
-
return [
|
|
629792
|
-
integer >> 16 & 255,
|
|
629793
|
-
integer >> 8 & 255,
|
|
629794
|
-
integer & 255
|
|
629795
|
-
];
|
|
629796
|
-
},
|
|
629797
|
-
enumerable: false
|
|
629798
|
-
},
|
|
629799
|
-
hexToAnsi256: {
|
|
629800
|
-
value: (hex) => styles5.rgbToAnsi256(...styles5.hexToRgb(hex)),
|
|
629801
|
-
enumerable: false
|
|
629802
|
-
},
|
|
629803
|
-
ansi256ToAnsi: {
|
|
629804
|
-
value(code) {
|
|
629805
|
-
if (code < 8) {
|
|
629806
|
-
return 30 + code;
|
|
629807
|
-
}
|
|
629808
|
-
if (code < 16) {
|
|
629809
|
-
return 90 + (code - 8);
|
|
629810
|
-
}
|
|
629811
|
-
let red2;
|
|
629812
|
-
let green2;
|
|
629813
|
-
let blue2;
|
|
629814
|
-
if (code >= 232) {
|
|
629815
|
-
red2 = ((code - 232) * 10 + 8) / 255;
|
|
629816
|
-
green2 = red2;
|
|
629817
|
-
blue2 = red2;
|
|
629818
|
-
} else {
|
|
629819
|
-
code -= 16;
|
|
629820
|
-
const remainder = code % 36;
|
|
629821
|
-
red2 = Math.floor(code / 36) / 5;
|
|
629822
|
-
green2 = Math.floor(remainder / 6) / 5;
|
|
629823
|
-
blue2 = remainder % 6 / 5;
|
|
629824
|
-
}
|
|
629825
|
-
const value2 = Math.max(red2, green2, blue2) * 2;
|
|
629826
|
-
if (value2 === 0) {
|
|
629827
|
-
return 30;
|
|
629828
|
-
}
|
|
629829
|
-
let result = 30 + (Math.round(blue2) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
629830
|
-
if (value2 === 2) {
|
|
629831
|
-
result += 60;
|
|
629832
|
-
}
|
|
629833
|
-
return result;
|
|
629834
|
-
},
|
|
629835
|
-
enumerable: false
|
|
629836
|
-
},
|
|
629837
|
-
rgbToAnsi: {
|
|
629838
|
-
value: (red2, green2, blue2) => styles5.ansi256ToAnsi(styles5.rgbToAnsi256(red2, green2, blue2)),
|
|
629839
|
-
enumerable: false
|
|
629840
|
-
},
|
|
629841
|
-
hexToAnsi: {
|
|
629842
|
-
value: (hex) => styles5.ansi256ToAnsi(styles5.hexToAnsi256(hex)),
|
|
629843
|
-
enumerable: false
|
|
629844
|
-
}
|
|
629845
|
-
});
|
|
629846
|
-
return styles5;
|
|
629847
|
-
}
|
|
629848
|
-
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process32.argv) {
|
|
629849
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
629850
|
-
const position = argv.indexOf(prefix + flag);
|
|
629851
|
-
const terminatorPosition = argv.indexOf("--");
|
|
629852
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
629853
|
-
}
|
|
629854
|
-
function envForceColor2() {
|
|
629855
|
-
if ("FORCE_COLOR" in env4) {
|
|
629856
|
-
if (env4.FORCE_COLOR === "true") {
|
|
629857
|
-
return 1;
|
|
629858
|
-
}
|
|
629859
|
-
if (env4.FORCE_COLOR === "false") {
|
|
629860
|
-
return 0;
|
|
629861
|
-
}
|
|
629862
|
-
return env4.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env4.FORCE_COLOR, 10), 3);
|
|
629863
|
-
}
|
|
629864
|
-
}
|
|
629865
|
-
function translateLevel2(level) {
|
|
629866
|
-
if (level === 0) {
|
|
629867
|
-
return false;
|
|
629868
|
-
}
|
|
629869
|
-
return {
|
|
629870
|
-
level,
|
|
629871
|
-
hasBasic: true,
|
|
629872
|
-
has256: level >= 2,
|
|
629873
|
-
has16m: level >= 3
|
|
629874
|
-
};
|
|
629875
|
-
}
|
|
629876
|
-
function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
629877
|
-
const noFlagForceColor = envForceColor2();
|
|
629878
|
-
if (noFlagForceColor !== undefined) {
|
|
629879
|
-
flagForceColor2 = noFlagForceColor;
|
|
629880
|
-
}
|
|
629881
|
-
const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
|
|
629882
|
-
if (forceColor === 0) {
|
|
629883
|
-
return 0;
|
|
629884
|
-
}
|
|
629885
|
-
if (sniffFlags) {
|
|
629886
|
-
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
|
|
629887
|
-
return 3;
|
|
629888
|
-
}
|
|
629889
|
-
if (hasFlag2("color=256")) {
|
|
629890
|
-
return 2;
|
|
629891
|
-
}
|
|
629892
|
-
}
|
|
629893
|
-
if ("TF_BUILD" in env4 && "AGENT_NAME" in env4) {
|
|
629894
|
-
return 1;
|
|
629895
|
-
}
|
|
629896
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
629897
|
-
return 0;
|
|
629898
|
-
}
|
|
629899
|
-
const min = forceColor || 0;
|
|
629900
|
-
if (env4.TERM === "dumb") {
|
|
629901
|
-
return min;
|
|
629902
|
-
}
|
|
629903
|
-
if (process32.platform === "win32") {
|
|
629904
|
-
const osRelease = os7.release().split(".");
|
|
629905
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
629906
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
629907
|
-
}
|
|
629908
|
-
return 1;
|
|
629909
|
-
}
|
|
629910
|
-
if ("CI" in env4) {
|
|
629911
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env4))) {
|
|
629912
|
-
return 3;
|
|
629913
|
-
}
|
|
629914
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env4)) || env4.CI_NAME === "codeship") {
|
|
629915
|
-
return 1;
|
|
629916
|
-
}
|
|
629917
|
-
return min;
|
|
629918
|
-
}
|
|
629919
|
-
if ("TEAMCITY_VERSION" in env4) {
|
|
629920
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env4.TEAMCITY_VERSION) ? 1 : 0;
|
|
629921
|
-
}
|
|
629922
|
-
if (env4.COLORTERM === "truecolor") {
|
|
629923
|
-
return 3;
|
|
629924
|
-
}
|
|
629925
|
-
if (env4.TERM === "xterm-kitty") {
|
|
629926
|
-
return 3;
|
|
629927
|
-
}
|
|
629928
|
-
if (env4.TERM === "xterm-ghostty") {
|
|
629929
|
-
return 3;
|
|
629930
|
-
}
|
|
629931
|
-
if (env4.TERM === "wezterm") {
|
|
629932
|
-
return 3;
|
|
629933
|
-
}
|
|
629934
|
-
if ("TERM_PROGRAM" in env4) {
|
|
629935
|
-
const version = Number.parseInt((env4.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
629936
|
-
switch (env4.TERM_PROGRAM) {
|
|
629937
|
-
case "iTerm.app": {
|
|
629938
|
-
return version >= 3 ? 3 : 2;
|
|
629939
|
-
}
|
|
629940
|
-
case "Apple_Terminal": {
|
|
629941
|
-
return 2;
|
|
629942
|
-
}
|
|
629943
|
-
}
|
|
629944
|
-
}
|
|
629945
|
-
if (/-256(color)?$/i.test(env4.TERM)) {
|
|
629946
|
-
return 2;
|
|
629947
|
-
}
|
|
629948
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env4.TERM)) {
|
|
629949
|
-
return 1;
|
|
629950
|
-
}
|
|
629951
|
-
if ("COLORTERM" in env4) {
|
|
629952
|
-
return 1;
|
|
629953
|
-
}
|
|
629954
|
-
return min;
|
|
629955
|
-
}
|
|
629956
|
-
function createSupportsColor2(stream5, options = {}) {
|
|
629957
|
-
const level = _supportsColor2(stream5, {
|
|
629958
|
-
streamIsTTY: stream5 && stream5.isTTY,
|
|
629959
|
-
...options
|
|
629960
|
-
});
|
|
629961
|
-
return translateLevel2(level);
|
|
629962
|
-
}
|
|
629963
|
-
function stringReplaceAll2(string, substring, replacer) {
|
|
629964
|
-
let index = string.indexOf(substring);
|
|
629965
|
-
if (index === -1) {
|
|
629966
|
-
return string;
|
|
629967
|
-
}
|
|
629968
|
-
const substringLength = substring.length;
|
|
629969
|
-
let endIndex = 0;
|
|
629970
|
-
let returnValue = "";
|
|
629971
|
-
do {
|
|
629972
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
629973
|
-
endIndex = index + substringLength;
|
|
629974
|
-
index = string.indexOf(substring, endIndex);
|
|
629975
|
-
} while (index !== -1);
|
|
629976
|
-
returnValue += string.slice(endIndex);
|
|
629977
|
-
return returnValue;
|
|
629978
|
-
}
|
|
629979
|
-
function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
|
|
629980
|
-
let endIndex = 0;
|
|
629981
|
-
let returnValue = "";
|
|
629982
|
-
do {
|
|
629983
|
-
const gotCR = string[index - 1] === "\r";
|
|
629984
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
629985
|
-
` : `
|
|
629986
|
-
`) + postfix;
|
|
629987
|
-
endIndex = index + 1;
|
|
629988
|
-
index = string.indexOf(`
|
|
629989
|
-
`, endIndex);
|
|
629990
|
-
} while (index !== -1);
|
|
629991
|
-
returnValue += string.slice(endIndex);
|
|
629992
|
-
return returnValue;
|
|
629993
|
-
}
|
|
629994
|
-
function createChalk2(options) {
|
|
629995
|
-
return chalkFactory2(options);
|
|
629996
|
-
}
|
|
629997
629733
|
|
|
629998
629734
|
class PreflightFormatter {
|
|
629999
629735
|
static format(result) {
|
|
630000
629736
|
const sections = [];
|
|
630001
|
-
const purple = "#D2A6FF";
|
|
630002
|
-
const logoLine1 = source_default2.hex(purple)(" \u2584\u2580\u2588 \u2588\u2580\u2584 \u2588\u2584\u2580") + " Botpress ADK";
|
|
630003
|
-
const logoLine2 = source_default2.hex(purple)(" \u2588\u2580\u2588 \u2588\u2584\u2580 \u2588\u2591\u2588") + ` v${getAdkVersion()}`;
|
|
630004
629737
|
sections.push("");
|
|
630005
|
-
sections.push(
|
|
630006
|
-
sections.push(
|
|
629738
|
+
sections.push(" \u2584\u2580\u2588 \u2588\u2580\u2584 \u2588\u2584\u2580 Botpress ADK");
|
|
629739
|
+
sections.push(` \u2588\u2580\u2588 \u2588\u2584\u2580 \u2588\u2591\u2588 v${getAdkVersion()}`);
|
|
630007
629740
|
sections.push("");
|
|
630008
|
-
sections.push(
|
|
629741
|
+
sections.push("Running preflight checks...");
|
|
630009
629742
|
sections.push("");
|
|
630010
629743
|
const allIntegrations = [
|
|
630011
629744
|
...result.integrations.toRemove,
|
|
@@ -630014,45 +629747,45 @@ class PreflightFormatter {
|
|
|
630014
629747
|
];
|
|
630015
629748
|
const maxWidth = Math.max(...allIntegrations.map((i2) => `${i2.alias} (v${i2.version})`.length), 30);
|
|
630016
629749
|
if (hasIntegrationChanges(result.integrations)) {
|
|
630017
|
-
sections.push(
|
|
630018
|
-
`)
|
|
629750
|
+
sections.push(`Integrations:
|
|
629751
|
+
`);
|
|
630019
629752
|
if (result.integrations.toRemove.length > 0) {
|
|
630020
|
-
sections.push(
|
|
630021
|
-
sections.push(
|
|
630022
|
-
`)
|
|
629753
|
+
sections.push("Installed Remotely but NOT in agent.config.ts");
|
|
629754
|
+
sections.push(`(these will be DISABLED or REMOVED)
|
|
629755
|
+
`);
|
|
630023
629756
|
for (const integration of result.integrations.toRemove) {
|
|
630024
629757
|
const name2 = `${integration.alias} (v${integration.version})`;
|
|
630025
629758
|
const padding = " ".repeat(maxWidth - name2.length + 4);
|
|
630026
|
-
sections.push(`
|
|
630027
|
-
sections.push(` Action:
|
|
629759
|
+
sections.push(` \u2014 ${name2}${padding}\u2717 Not present locally`);
|
|
629760
|
+
sections.push(` Action: Remove
|
|
630028
629761
|
`);
|
|
630029
629762
|
}
|
|
630030
629763
|
}
|
|
630031
629764
|
if (result.integrations.toInstall.length > 0) {
|
|
630032
|
-
sections.push(
|
|
630033
|
-
sections.push(
|
|
630034
|
-
`)
|
|
629765
|
+
sections.push("Present Locally but NOT Installed Remotely");
|
|
629766
|
+
sections.push(`(these will be INSTALLED)
|
|
629767
|
+
`);
|
|
630035
629768
|
for (const integration of result.integrations.toInstall) {
|
|
630036
629769
|
const name2 = `${integration.alias} (v${integration.version})`;
|
|
630037
629770
|
const padding = " ".repeat(maxWidth - name2.length + 4);
|
|
630038
|
-
sections.push(`
|
|
630039
|
-
sections.push(` Action:
|
|
629771
|
+
sections.push(` \u2014 ${name2}${padding}+ Missing remotely`);
|
|
629772
|
+
sections.push(` Action: Install
|
|
630040
629773
|
`);
|
|
630041
629774
|
}
|
|
630042
629775
|
}
|
|
630043
629776
|
if (result.integrations.toUpdate.length > 0) {
|
|
630044
|
-
sections.push(
|
|
630045
|
-
sections.push(
|
|
630046
|
-
`)
|
|
629777
|
+
sections.push("Present on both, but config DIFFERS");
|
|
629778
|
+
sections.push(`(these will be UPDATED)
|
|
629779
|
+
`);
|
|
630047
629780
|
for (const integration of result.integrations.toUpdate) {
|
|
630048
|
-
sections.push(`
|
|
629781
|
+
sections.push(` \u2014 ${integration.alias} (v${integration.version})`);
|
|
630049
629782
|
if (integration.configChanges && integration.configChanges.length > 0) {
|
|
630050
|
-
sections.push(
|
|
630051
|
-
`)
|
|
629783
|
+
sections.push(` Configuration differences:
|
|
629784
|
+
`);
|
|
630052
629785
|
for (const change of integration.configChanges) {
|
|
630053
629786
|
sections.push(` ${change.field}:`);
|
|
630054
|
-
sections.push(`
|
|
630055
|
-
sections.push(`
|
|
629787
|
+
sections.push(` - Remote: ${this.formatValue(change.oldValue)}`);
|
|
629788
|
+
sections.push(` + Local: ${this.formatValue(change.newValue)}
|
|
630056
629789
|
`);
|
|
630057
629790
|
}
|
|
630058
629791
|
}
|
|
@@ -630060,51 +629793,51 @@ class PreflightFormatter {
|
|
|
630060
629793
|
}
|
|
630061
629794
|
}
|
|
630062
629795
|
if (result.agentConfig.length > 0) {
|
|
630063
|
-
sections.push(
|
|
630064
|
-
sections.push(
|
|
630065
|
-
`)
|
|
629796
|
+
sections.push("Agent Configuration Differences");
|
|
629797
|
+
sections.push(`(These are top-level agent settings, not integration settings)
|
|
629798
|
+
`);
|
|
630066
629799
|
for (const diff3 of result.agentConfig) {
|
|
630067
629800
|
sections.push(` agent.${diff3.field}:`);
|
|
630068
|
-
sections.push(`
|
|
630069
|
-
sections.push(`
|
|
629801
|
+
sections.push(` - Remote: ${this.formatValue(diff3.oldValue)}`);
|
|
629802
|
+
sections.push(` + Local: ${this.formatValue(diff3.newValue)}
|
|
630070
629803
|
`);
|
|
630071
629804
|
}
|
|
630072
629805
|
}
|
|
630073
|
-
sections.push(
|
|
630074
|
-
`)
|
|
629806
|
+
sections.push(`Summary of Actions
|
|
629807
|
+
`);
|
|
630075
629808
|
const install = result.integrations.toInstall.length;
|
|
630076
629809
|
const remove = result.integrations.toRemove.length;
|
|
630077
629810
|
const update = result.integrations.toUpdate.length;
|
|
630078
629811
|
const agentConfig = result.agentConfig.length;
|
|
630079
629812
|
if (install > 0) {
|
|
630080
|
-
sections.push(` \u2022
|
|
629813
|
+
sections.push(` \u2022 Install: ${pluralize2(install, "integration")}`);
|
|
630081
629814
|
}
|
|
630082
629815
|
if (remove > 0) {
|
|
630083
|
-
sections.push(` \u2022
|
|
629816
|
+
sections.push(` \u2022 Remove: ${pluralize2(remove, "integration")}`);
|
|
630084
629817
|
}
|
|
630085
629818
|
if (update > 0) {
|
|
630086
|
-
sections.push(` \u2022
|
|
629819
|
+
sections.push(` \u2022 Update: ${pluralize2(update, "integration")}`);
|
|
630087
629820
|
}
|
|
630088
629821
|
if (agentConfig > 0) {
|
|
630089
|
-
sections.push(` \u2022
|
|
629822
|
+
sections.push(` \u2022 Agent config: ${pluralize2(agentConfig, "change")}`);
|
|
630090
629823
|
}
|
|
630091
629824
|
sections.push("");
|
|
630092
629825
|
return sections.join(`
|
|
630093
629826
|
`);
|
|
630094
629827
|
}
|
|
630095
629828
|
static formatPrompt() {
|
|
630096
|
-
return
|
|
630097
|
-
|
|
629829
|
+
return `\u2753 Apply these changes before continuing?
|
|
629830
|
+
Proceed? [y/N] `;
|
|
630098
629831
|
}
|
|
630099
629832
|
static formatValue(value2) {
|
|
630100
629833
|
if (value2 === undefined || value2 === null) {
|
|
630101
|
-
return
|
|
629834
|
+
return "(not set)";
|
|
630102
629835
|
}
|
|
630103
629836
|
if (typeof value2 === "string") {
|
|
630104
629837
|
return `"${value2}"`;
|
|
630105
629838
|
}
|
|
630106
629839
|
if (typeof value2 === "boolean") {
|
|
630107
|
-
return value2 ?
|
|
629840
|
+
return value2 ? "true" : "false";
|
|
630108
629841
|
}
|
|
630109
629842
|
if (Array.isArray(value2)) {
|
|
630110
629843
|
return `[${value2.map((v2) => this.formatValue(v2)).join(", ")}]`;
|
|
@@ -630318,7 +630051,7 @@ var import_ts_morph, __defProp9, __commonJS5 = (cb4, mod) => () => (mod || cb4((
|
|
|
630318
630051
|
`));
|
|
630319
630052
|
return code;
|
|
630320
630053
|
}
|
|
630321
|
-
}, ADK_VERSION = "1.7.
|
|
630054
|
+
}, ADK_VERSION = "1.7.14", relative2 = (from, to3) => {
|
|
630322
630055
|
const fromDir = path10.dirname(from);
|
|
630323
630056
|
const relative32 = path10.relative(fromDir, to3);
|
|
630324
630057
|
return relative32.startsWith(".") ? relative32 : `./${relative32}`;
|
|
@@ -630360,77 +630093,7 @@ var import_ts_morph, __defProp9, __commonJS5 = (cb4, mod) => () => (mod || cb4((
|
|
|
630360
630093
|
index: path18.join(snakeCase(int2.name), `index.ts`),
|
|
630361
630094
|
actions: path18.join(snakeCase(int2.name), `actions.ts`)
|
|
630362
630095
|
}
|
|
630363
|
-
}), FileWatcher2,
|
|
630364
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
630365
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
630366
|
-
}
|
|
630367
|
-
const colorLevel = stdoutColor2 ? stdoutColor2.level : 0;
|
|
630368
|
-
object.level = options.level === undefined ? colorLevel : options.level;
|
|
630369
|
-
}, chalkFactory2 = (options) => {
|
|
630370
|
-
const chalk2 = (...strings) => strings.join(" ");
|
|
630371
|
-
applyOptions2(chalk2, options);
|
|
630372
|
-
Object.setPrototypeOf(chalk2, createChalk2.prototype);
|
|
630373
|
-
return chalk2;
|
|
630374
|
-
}, getModelAnsi2 = (model, level, type, ...arguments_) => {
|
|
630375
|
-
if (model === "rgb") {
|
|
630376
|
-
if (level === "ansi16m") {
|
|
630377
|
-
return ansi_styles_default3[type].ansi16m(...arguments_);
|
|
630378
|
-
}
|
|
630379
|
-
if (level === "ansi256") {
|
|
630380
|
-
return ansi_styles_default3[type].ansi256(ansi_styles_default3.rgbToAnsi256(...arguments_));
|
|
630381
|
-
}
|
|
630382
|
-
return ansi_styles_default3[type].ansi(ansi_styles_default3.rgbToAnsi(...arguments_));
|
|
630383
|
-
}
|
|
630384
|
-
if (model === "hex") {
|
|
630385
|
-
return getModelAnsi2("rgb", level, type, ...ansi_styles_default3.hexToRgb(...arguments_));
|
|
630386
|
-
}
|
|
630387
|
-
return ansi_styles_default3[type][model](...arguments_);
|
|
630388
|
-
}, usedModels2, proto2, createStyler2 = (open, close, parent2) => {
|
|
630389
|
-
let openAll;
|
|
630390
|
-
let closeAll2;
|
|
630391
|
-
if (parent2 === undefined) {
|
|
630392
|
-
openAll = open;
|
|
630393
|
-
closeAll2 = close;
|
|
630394
|
-
} else {
|
|
630395
|
-
openAll = parent2.openAll + open;
|
|
630396
|
-
closeAll2 = close + parent2.closeAll;
|
|
630397
|
-
}
|
|
630398
|
-
return {
|
|
630399
|
-
open,
|
|
630400
|
-
close,
|
|
630401
|
-
openAll,
|
|
630402
|
-
closeAll: closeAll2,
|
|
630403
|
-
parent: parent2
|
|
630404
|
-
};
|
|
630405
|
-
}, createBuilder2 = (self2, _styler, _isEmpty) => {
|
|
630406
|
-
const builder = (...arguments_) => applyStyle2(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
630407
|
-
Object.setPrototypeOf(builder, proto2);
|
|
630408
|
-
builder[GENERATOR2] = self2;
|
|
630409
|
-
builder[STYLER2] = _styler;
|
|
630410
|
-
builder[IS_EMPTY2] = _isEmpty;
|
|
630411
|
-
return builder;
|
|
630412
|
-
}, applyStyle2 = (self2, string) => {
|
|
630413
|
-
if (self2.level <= 0 || !string) {
|
|
630414
|
-
return self2[IS_EMPTY2] ? "" : string;
|
|
630415
|
-
}
|
|
630416
|
-
let styler = self2[STYLER2];
|
|
630417
|
-
if (styler === undefined) {
|
|
630418
|
-
return string;
|
|
630419
|
-
}
|
|
630420
|
-
const { openAll, closeAll: closeAll2 } = styler;
|
|
630421
|
-
if (string.includes("\x1B")) {
|
|
630422
|
-
while (styler !== undefined) {
|
|
630423
|
-
string = stringReplaceAll2(string, styler.close, styler.open);
|
|
630424
|
-
styler = styler.parent;
|
|
630425
|
-
}
|
|
630426
|
-
}
|
|
630427
|
-
const lfIndex = string.indexOf(`
|
|
630428
|
-
`);
|
|
630429
|
-
if (lfIndex !== -1) {
|
|
630430
|
-
string = stringEncaseCRLFWithFirstIndex2(string, closeAll2, openAll, lfIndex);
|
|
630431
|
-
}
|
|
630432
|
-
return openAll + string + closeAll2;
|
|
630433
|
-
}, chalk2, chalkStderr2, source_default2, getAdkVersion = () => {
|
|
630096
|
+
}), FileWatcher2, getAdkVersion = () => {
|
|
630434
630097
|
try {
|
|
630435
630098
|
const packageJson = require_package3();
|
|
630436
630099
|
return packageJson.version;
|
|
@@ -630586,7 +630249,7 @@ var init_dist15 = __esm(() => {
|
|
|
630586
630249
|
require_package3 = __commonJS5((exports, module) => {
|
|
630587
630250
|
module.exports = {
|
|
630588
630251
|
name: "@botpress/adk",
|
|
630589
|
-
version: "1.7.
|
|
630252
|
+
version: "1.7.14",
|
|
630590
630253
|
description: "Core ADK library for building AI agents on Botpress",
|
|
630591
630254
|
type: "module",
|
|
630592
630255
|
main: "dist/index.js",
|
|
@@ -630633,7 +630296,7 @@ var init_dist15 = __esm(() => {
|
|
|
630633
630296
|
"@botpress/cli": "^4.23",
|
|
630634
630297
|
"@botpress/client": "^1.27.0",
|
|
630635
630298
|
"@botpress/cognitive": "^0.2.0",
|
|
630636
|
-
"@botpress/runtime": "^1.7.
|
|
630299
|
+
"@botpress/runtime": "^1.7.14",
|
|
630637
630300
|
"@botpress/sdk": "^4.18.1",
|
|
630638
630301
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
630639
630302
|
"@parcel/watcher": "^2.5.1",
|
|
@@ -632140,142 +631803,6 @@ ${this.stderrLines.join(`
|
|
|
632140
631803
|
return super.emit(event3, data);
|
|
632141
631804
|
}
|
|
632142
631805
|
};
|
|
632143
|
-
styles5 = {
|
|
632144
|
-
modifier: {
|
|
632145
|
-
reset: [0, 0],
|
|
632146
|
-
bold: [1, 22],
|
|
632147
|
-
dim: [2, 22],
|
|
632148
|
-
italic: [3, 23],
|
|
632149
|
-
underline: [4, 24],
|
|
632150
|
-
overline: [53, 55],
|
|
632151
|
-
inverse: [7, 27],
|
|
632152
|
-
hidden: [8, 28],
|
|
632153
|
-
strikethrough: [9, 29]
|
|
632154
|
-
},
|
|
632155
|
-
color: {
|
|
632156
|
-
black: [30, 39],
|
|
632157
|
-
red: [31, 39],
|
|
632158
|
-
green: [32, 39],
|
|
632159
|
-
yellow: [33, 39],
|
|
632160
|
-
blue: [34, 39],
|
|
632161
|
-
magenta: [35, 39],
|
|
632162
|
-
cyan: [36, 39],
|
|
632163
|
-
white: [37, 39],
|
|
632164
|
-
blackBright: [90, 39],
|
|
632165
|
-
gray: [90, 39],
|
|
632166
|
-
grey: [90, 39],
|
|
632167
|
-
redBright: [91, 39],
|
|
632168
|
-
greenBright: [92, 39],
|
|
632169
|
-
yellowBright: [93, 39],
|
|
632170
|
-
blueBright: [94, 39],
|
|
632171
|
-
magentaBright: [95, 39],
|
|
632172
|
-
cyanBright: [96, 39],
|
|
632173
|
-
whiteBright: [97, 39]
|
|
632174
|
-
},
|
|
632175
|
-
bgColor: {
|
|
632176
|
-
bgBlack: [40, 49],
|
|
632177
|
-
bgRed: [41, 49],
|
|
632178
|
-
bgGreen: [42, 49],
|
|
632179
|
-
bgYellow: [43, 49],
|
|
632180
|
-
bgBlue: [44, 49],
|
|
632181
|
-
bgMagenta: [45, 49],
|
|
632182
|
-
bgCyan: [46, 49],
|
|
632183
|
-
bgWhite: [47, 49],
|
|
632184
|
-
bgBlackBright: [100, 49],
|
|
632185
|
-
bgGray: [100, 49],
|
|
632186
|
-
bgGrey: [100, 49],
|
|
632187
|
-
bgRedBright: [101, 49],
|
|
632188
|
-
bgGreenBright: [102, 49],
|
|
632189
|
-
bgYellowBright: [103, 49],
|
|
632190
|
-
bgBlueBright: [104, 49],
|
|
632191
|
-
bgMagentaBright: [105, 49],
|
|
632192
|
-
bgCyanBright: [106, 49],
|
|
632193
|
-
bgWhiteBright: [107, 49]
|
|
632194
|
-
}
|
|
632195
|
-
};
|
|
632196
|
-
modifierNames3 = Object.keys(styles5.modifier);
|
|
632197
|
-
foregroundColorNames3 = Object.keys(styles5.color);
|
|
632198
|
-
backgroundColorNames3 = Object.keys(styles5.bgColor);
|
|
632199
|
-
colorNames3 = [...foregroundColorNames3, ...backgroundColorNames3];
|
|
632200
|
-
ansiStyles3 = assembleStyles3();
|
|
632201
|
-
ansi_styles_default3 = ansiStyles3;
|
|
632202
|
-
({ env: env4 } = process32);
|
|
632203
|
-
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
632204
|
-
flagForceColor2 = 0;
|
|
632205
|
-
} else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
|
|
632206
|
-
flagForceColor2 = 1;
|
|
632207
|
-
}
|
|
632208
|
-
supportsColor2 = {
|
|
632209
|
-
stdout: createSupportsColor2({ isTTY: tty4.isatty(1) }),
|
|
632210
|
-
stderr: createSupportsColor2({ isTTY: tty4.isatty(2) })
|
|
632211
|
-
};
|
|
632212
|
-
supports_color_default2 = supportsColor2;
|
|
632213
|
-
({ stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2);
|
|
632214
|
-
GENERATOR2 = Symbol("GENERATOR");
|
|
632215
|
-
STYLER2 = Symbol("STYLER");
|
|
632216
|
-
IS_EMPTY2 = Symbol("IS_EMPTY");
|
|
632217
|
-
levelMapping2 = [
|
|
632218
|
-
"ansi",
|
|
632219
|
-
"ansi",
|
|
632220
|
-
"ansi256",
|
|
632221
|
-
"ansi16m"
|
|
632222
|
-
];
|
|
632223
|
-
styles22 = Object.create(null);
|
|
632224
|
-
Object.setPrototypeOf(createChalk2.prototype, Function.prototype);
|
|
632225
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default3)) {
|
|
632226
|
-
styles22[styleName] = {
|
|
632227
|
-
get() {
|
|
632228
|
-
const builder = createBuilder2(this, createStyler2(style.open, style.close, this[STYLER2]), this[IS_EMPTY2]);
|
|
632229
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
632230
|
-
return builder;
|
|
632231
|
-
}
|
|
632232
|
-
};
|
|
632233
|
-
}
|
|
632234
|
-
styles22.visible = {
|
|
632235
|
-
get() {
|
|
632236
|
-
const builder = createBuilder2(this, this[STYLER2], true);
|
|
632237
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
632238
|
-
return builder;
|
|
632239
|
-
}
|
|
632240
|
-
};
|
|
632241
|
-
usedModels2 = ["rgb", "hex", "ansi256"];
|
|
632242
|
-
for (const model of usedModels2) {
|
|
632243
|
-
styles22[model] = {
|
|
632244
|
-
get() {
|
|
632245
|
-
const { level } = this;
|
|
632246
|
-
return function(...arguments_) {
|
|
632247
|
-
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "color", ...arguments_), ansi_styles_default3.color.close, this[STYLER2]);
|
|
632248
|
-
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
632249
|
-
};
|
|
632250
|
-
}
|
|
632251
|
-
};
|
|
632252
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
632253
|
-
styles22[bgModel] = {
|
|
632254
|
-
get() {
|
|
632255
|
-
const { level } = this;
|
|
632256
|
-
return function(...arguments_) {
|
|
632257
|
-
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "bgColor", ...arguments_), ansi_styles_default3.bgColor.close, this[STYLER2]);
|
|
632258
|
-
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
632259
|
-
};
|
|
632260
|
-
}
|
|
632261
|
-
};
|
|
632262
|
-
}
|
|
632263
|
-
proto2 = Object.defineProperties(() => {}, {
|
|
632264
|
-
...styles22,
|
|
632265
|
-
level: {
|
|
632266
|
-
enumerable: true,
|
|
632267
|
-
get() {
|
|
632268
|
-
return this[GENERATOR2].level;
|
|
632269
|
-
},
|
|
632270
|
-
set(level) {
|
|
632271
|
-
this[GENERATOR2].level = level;
|
|
632272
|
-
}
|
|
632273
|
-
}
|
|
632274
|
-
});
|
|
632275
|
-
Object.defineProperties(createChalk2.prototype, styles22);
|
|
632276
|
-
chalk2 = createChalk2();
|
|
632277
|
-
chalkStderr2 = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
|
|
632278
|
-
source_default2 = chalk2;
|
|
632279
631806
|
});
|
|
632280
631807
|
|
|
632281
631808
|
// src/components/Theme.ts
|
|
@@ -632414,13 +631941,13 @@ var init_is_inside_container = __esm(() => {
|
|
|
632414
631941
|
|
|
632415
631942
|
// ../../node_modules/is-wsl/index.js
|
|
632416
631943
|
import process21 from "process";
|
|
632417
|
-
import
|
|
631944
|
+
import os7 from "os";
|
|
632418
631945
|
import fs19 from "fs";
|
|
632419
631946
|
var isWsl = () => {
|
|
632420
631947
|
if (process21.platform !== "linux") {
|
|
632421
631948
|
return false;
|
|
632422
631949
|
}
|
|
632423
|
-
if (
|
|
631950
|
+
if (os7.release().toLowerCase().includes("microsoft")) {
|
|
632424
631951
|
if (isInsideContainer()) {
|
|
632425
631952
|
return false;
|
|
632426
631953
|
}
|
|
@@ -632455,13 +631982,13 @@ function stripFinalNewline2(input) {
|
|
|
632455
631982
|
// ../../node_modules/clipboardy/node_modules/execa/node_modules/npm-run-path/node_modules/path-key/index.js
|
|
632456
631983
|
function pathKey2(options = {}) {
|
|
632457
631984
|
const {
|
|
632458
|
-
env:
|
|
631985
|
+
env: env4 = process.env,
|
|
632459
631986
|
platform: platform3 = process.platform
|
|
632460
631987
|
} = options;
|
|
632461
631988
|
if (platform3 !== "win32") {
|
|
632462
631989
|
return "PATH";
|
|
632463
631990
|
}
|
|
632464
|
-
return Object.keys(
|
|
631991
|
+
return Object.keys(env4).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
632465
631992
|
}
|
|
632466
631993
|
|
|
632467
631994
|
// ../../node_modules/clipboardy/node_modules/execa/node_modules/npm-run-path/index.js
|
|
@@ -632495,12 +632022,12 @@ var npmRunPath2 = ({
|
|
|
632495
632022
|
}, applyExecPath2 = (result, execPath2, cwdPath) => {
|
|
632496
632023
|
const execPathString = execPath2 instanceof URL ? fileURLToPath4(execPath2) : execPath2;
|
|
632497
632024
|
result.push(path34.resolve(cwdPath, execPathString, ".."));
|
|
632498
|
-
}, npmRunPathEnv2 = ({ env:
|
|
632499
|
-
|
|
632500
|
-
const pathName = pathKey2({ env:
|
|
632501
|
-
options.path =
|
|
632502
|
-
|
|
632503
|
-
return
|
|
632025
|
+
}, npmRunPathEnv2 = ({ env: env4 = process23.env, ...options } = {}) => {
|
|
632026
|
+
env4 = { ...env4 };
|
|
632027
|
+
const pathName = pathKey2({ env: env4 });
|
|
632028
|
+
options.path = env4[pathName];
|
|
632029
|
+
env4[pathName] = npmRunPath2(options);
|
|
632030
|
+
return env4;
|
|
632504
632031
|
};
|
|
632505
632032
|
var init_npm_run_path2 = () => {};
|
|
632506
632033
|
|
|
@@ -633043,7 +632570,7 @@ var init_stdio2 = __esm(() => {
|
|
|
633043
632570
|
});
|
|
633044
632571
|
|
|
633045
632572
|
// ../../node_modules/clipboardy/node_modules/execa/lib/kill.js
|
|
633046
|
-
import
|
|
632573
|
+
import os9 from "os";
|
|
633047
632574
|
var DEFAULT_FORCE_KILL_TIMEOUT2, spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
633048
632575
|
const killResult = kill(signal);
|
|
633049
632576
|
setKillTimeout2(kill, signal, options, killResult);
|
|
@@ -633059,7 +632586,7 @@ var DEFAULT_FORCE_KILL_TIMEOUT2, spawnedKill = (kill, signal = "SIGTERM", option
|
|
|
633059
632586
|
if (t9.unref) {
|
|
633060
632587
|
t9.unref();
|
|
633061
632588
|
}
|
|
633062
|
-
}, shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult, isSigterm = (signal) => signal ===
|
|
632589
|
+
}, shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult, isSigterm = (signal) => signal === os9.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM", getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
633063
632590
|
if (forceKillAfterTimeout === true) {
|
|
633064
632591
|
return DEFAULT_FORCE_KILL_TIMEOUT2;
|
|
633065
632592
|
}
|
|
@@ -633722,11 +633249,11 @@ function create$(options) {
|
|
|
633722
633249
|
return $2;
|
|
633723
633250
|
}
|
|
633724
633251
|
var import_cross_spawn2, DEFAULT_MAX_BUFFER, getEnv2 = ({ env: envOption, extendEnv, preferLocal, localDir, execPath: execPath2 }) => {
|
|
633725
|
-
const
|
|
633252
|
+
const env4 = extendEnv ? { ...process27.env, ...envOption } : envOption;
|
|
633726
633253
|
if (preferLocal) {
|
|
633727
|
-
return npmRunPathEnv2({ env:
|
|
633254
|
+
return npmRunPathEnv2({ env: env4, cwd: localDir, execPath: execPath2 });
|
|
633728
633255
|
}
|
|
633729
|
-
return
|
|
633256
|
+
return env4;
|
|
633730
633257
|
}, handleArguments = (file, args, options = {}) => {
|
|
633731
633258
|
const parsed = import_cross_spawn2.default._parse(file, args, options);
|
|
633732
633259
|
file = parsed.command;
|
|
@@ -633882,20 +633409,20 @@ var init_linux = __esm(() => {
|
|
|
633882
633409
|
});
|
|
633883
633410
|
|
|
633884
633411
|
// ../../node_modules/clipboardy/lib/macos.js
|
|
633885
|
-
var
|
|
633412
|
+
var env4, clipboard3, macos_default;
|
|
633886
633413
|
var init_macos = __esm(() => {
|
|
633887
633414
|
init_execa2();
|
|
633888
|
-
|
|
633415
|
+
env4 = {
|
|
633889
633416
|
LC_CTYPE: "UTF-8"
|
|
633890
633417
|
};
|
|
633891
633418
|
clipboard3 = {
|
|
633892
|
-
copy: async (options) => execa2("pbcopy", { ...options, env:
|
|
633419
|
+
copy: async (options) => execa2("pbcopy", { ...options, env: env4 }),
|
|
633893
633420
|
async paste(options) {
|
|
633894
|
-
const { stdout } = await execa2("pbpaste", { ...options, env:
|
|
633421
|
+
const { stdout } = await execa2("pbpaste", { ...options, env: env4 });
|
|
633895
633422
|
return stdout;
|
|
633896
633423
|
},
|
|
633897
|
-
copySync: (options) => execaSync2("pbcopy", { ...options, env:
|
|
633898
|
-
pasteSync: (options) => execaSync2("pbpaste", { ...options, env:
|
|
633424
|
+
copySync: (options) => execaSync2("pbcopy", { ...options, env: env4 }),
|
|
633425
|
+
pasteSync: (options) => execaSync2("pbpaste", { ...options, env: env4 }).stdout
|
|
633899
633426
|
};
|
|
633900
633427
|
macos_default = clipboard3;
|
|
633901
633428
|
});
|
|
@@ -633905,7 +633432,7 @@ import { promisify as promisify3 } from "util";
|
|
|
633905
633432
|
import process28 from "process";
|
|
633906
633433
|
import childProcess2 from "child_process";
|
|
633907
633434
|
function systemArchitectureSync() {
|
|
633908
|
-
const { arch, platform: platform3, env:
|
|
633435
|
+
const { arch, platform: platform3, env: env5 } = process28;
|
|
633909
633436
|
if (platform3 === "darwin" && arch === "x64") {
|
|
633910
633437
|
const stdout = childProcess2.execFileSync("sysctl", ["-inq", "sysctl.proc_translated"], { encoding: "utf8" });
|
|
633911
633438
|
return stdout.trim() === "1" ? "arm64" : "x64";
|
|
@@ -633913,7 +633440,7 @@ function systemArchitectureSync() {
|
|
|
633913
633440
|
if (arch === "arm64" || arch === "x64") {
|
|
633914
633441
|
return arch;
|
|
633915
633442
|
}
|
|
633916
|
-
if (platform3 === "win32" && Object.hasOwn(
|
|
633443
|
+
if (platform3 === "win32" && Object.hasOwn(env5, "PROCESSOR_ARCHITEW6432")) {
|
|
633917
633444
|
return "x64";
|
|
633918
633445
|
}
|
|
633919
633446
|
if (platform3 === "linux") {
|
|
@@ -635564,11 +635091,11 @@ var init_default_browser_id = __esm(() => {
|
|
|
635564
635091
|
});
|
|
635565
635092
|
|
|
635566
635093
|
// ../../node_modules/run-applescript/index.js
|
|
635567
|
-
import
|
|
635094
|
+
import process32 from "process";
|
|
635568
635095
|
import { promisify as promisify5 } from "util";
|
|
635569
635096
|
import { execFile as execFile2, execFileSync } from "child_process";
|
|
635570
635097
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
635571
|
-
if (
|
|
635098
|
+
if (process32.platform !== "darwin") {
|
|
635572
635099
|
throw new Error("macOS only");
|
|
635573
635100
|
}
|
|
635574
635101
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
@@ -635634,21 +635161,21 @@ var init_windows2 = __esm(() => {
|
|
|
635634
635161
|
|
|
635635
635162
|
// ../../node_modules/default-browser/index.js
|
|
635636
635163
|
import { promisify as promisify7 } from "util";
|
|
635637
|
-
import
|
|
635164
|
+
import process33 from "process";
|
|
635638
635165
|
import { execFile as execFile4 } from "child_process";
|
|
635639
635166
|
async function defaultBrowser2() {
|
|
635640
|
-
if (
|
|
635167
|
+
if (process33.platform === "darwin") {
|
|
635641
635168
|
const id3 = await defaultBrowserId();
|
|
635642
635169
|
const name2 = await bundleName(id3);
|
|
635643
635170
|
return { name: name2, id: id3 };
|
|
635644
635171
|
}
|
|
635645
|
-
if (
|
|
635172
|
+
if (process33.platform === "linux") {
|
|
635646
635173
|
const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
|
|
635647
635174
|
const id3 = stdout.trim();
|
|
635648
635175
|
const name2 = titleize(id3.replace(/.desktop$/, "").replace("-", " "));
|
|
635649
635176
|
return { name: name2, id: id3 };
|
|
635650
635177
|
}
|
|
635651
|
-
if (
|
|
635178
|
+
if (process33.platform === "win32") {
|
|
635652
635179
|
return defaultBrowser();
|
|
635653
635180
|
}
|
|
635654
635181
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
@@ -635662,7 +635189,7 @@ var init_default_browser = __esm(() => {
|
|
|
635662
635189
|
});
|
|
635663
635190
|
|
|
635664
635191
|
// ../../node_modules/open/index.js
|
|
635665
|
-
import
|
|
635192
|
+
import process34 from "process";
|
|
635666
635193
|
import { Buffer as Buffer8 } from "buffer";
|
|
635667
635194
|
import path39 from "path";
|
|
635668
635195
|
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
@@ -635828,7 +635355,7 @@ var execFile5, __dirname4, localXdgOpenPath, platform3, arch, pTryEach = async (
|
|
|
635828
635355
|
await fs21.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
635829
635356
|
exeLocalXdgOpen = true;
|
|
635830
635357
|
} catch {}
|
|
635831
|
-
const useSystemXdgOpen =
|
|
635358
|
+
const useSystemXdgOpen = process34.versions.electron ?? (platform3 === "android" || isBundled || !exeLocalXdgOpen);
|
|
635832
635359
|
command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
|
|
635833
635360
|
}
|
|
635834
635361
|
if (appArguments.length > 0) {
|
|
@@ -635876,7 +635403,7 @@ var init_open = __esm(() => {
|
|
|
635876
635403
|
execFile5 = promisify8(childProcess3.execFile);
|
|
635877
635404
|
__dirname4 = path39.dirname(fileURLToPath7(import.meta.url));
|
|
635878
635405
|
localXdgOpenPath = path39.join(__dirname4, "xdg-open");
|
|
635879
|
-
({ platform: platform3, arch } =
|
|
635406
|
+
({ platform: platform3, arch } = process34);
|
|
635880
635407
|
apps = {};
|
|
635881
635408
|
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
635882
635409
|
darwin: "google chrome",
|
|
@@ -637248,7 +636775,7 @@ var init_Separator = __esm(async () => {
|
|
|
637248
636775
|
var require_package4 = __commonJS((exports, module) => {
|
|
637249
636776
|
module.exports = {
|
|
637250
636777
|
name: "@botpress/adk",
|
|
637251
|
-
version: "1.7.
|
|
636778
|
+
version: "1.7.14",
|
|
637252
636779
|
description: "Core ADK library for building AI agents on Botpress",
|
|
637253
636780
|
type: "module",
|
|
637254
636781
|
main: "dist/index.js",
|
|
@@ -637295,7 +636822,7 @@ var require_package4 = __commonJS((exports, module) => {
|
|
|
637295
636822
|
"@botpress/cli": "^4.23",
|
|
637296
636823
|
"@botpress/client": "^1.27.0",
|
|
637297
636824
|
"@botpress/cognitive": "^0.2.0",
|
|
637298
|
-
"@botpress/runtime": "^1.7.
|
|
636825
|
+
"@botpress/runtime": "^1.7.14",
|
|
637299
636826
|
"@botpress/sdk": "^4.18.1",
|
|
637300
636827
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
637301
636828
|
"@parcel/watcher": "^2.5.1",
|
|
@@ -638366,13 +637893,60 @@ var init_LogsView = __esm(async () => {
|
|
|
638366
637893
|
jsx_dev_runtime18 = __toESM(require_jsx_dev_runtime(), 1);
|
|
638367
637894
|
});
|
|
638368
637895
|
|
|
637896
|
+
// src/utils/preflight-formatter.ts
|
|
637897
|
+
class PreflightFormatter2 {
|
|
637898
|
+
static format(result) {
|
|
637899
|
+
const plainText = PreflightFormatter.format(result);
|
|
637900
|
+
let formatted = plainText;
|
|
637901
|
+
const purple = "#D2A6FF";
|
|
637902
|
+
formatted = formatted.replace(/( \u2584\u2580\u2588 \u2588\u2580\u2584 \u2588\u2584\u2580 Botpress ADK)/g, source_default.hex(purple)("$1"));
|
|
637903
|
+
formatted = formatted.replace(/( \u2588\u2580\u2588 \u2588\u2584\u2580 \u2588\u2591\u2588 v[\d.]+)/g, source_default.hex(purple)("$1"));
|
|
637904
|
+
formatted = formatted.replace(/(Running preflight checks\.\.\.)/g, source_default.hex(purple)("$1"));
|
|
637905
|
+
formatted = formatted.replace(/^(Integrations:)$/gm, source_default.bold("$1"));
|
|
637906
|
+
formatted = formatted.replace(/^(Installed Remotely but NOT in agent\.config\.ts)$/gm, source_default.bold("$1"));
|
|
637907
|
+
formatted = formatted.replace(/^(Present Locally but NOT Installed Remotely)$/gm, source_default.bold("$1"));
|
|
637908
|
+
formatted = formatted.replace(/^(Present on both, but config DIFFERS)$/gm, source_default.bold("$1"));
|
|
637909
|
+
formatted = formatted.replace(/^(Agent Configuration Differences)$/gm, source_default.bold("$1"));
|
|
637910
|
+
formatted = formatted.replace(/^(Summary of Actions)$/gm, source_default.bold("$1"));
|
|
637911
|
+
formatted = formatted.replace(/^\(these will be DISABLED or REMOVED\)$/gm, source_default.gray("$1"));
|
|
637912
|
+
formatted = formatted.replace(/^\(these will be INSTALLED\)$/gm, source_default.gray("$1"));
|
|
637913
|
+
formatted = formatted.replace(/^\(these will be UPDATED\)$/gm, source_default.gray("$1"));
|
|
637914
|
+
formatted = formatted.replace(/^\(These are top-level agent settings.*\)$/gm, source_default.gray("$1"));
|
|
637915
|
+
formatted = formatted.replace(/(\u2014 )([\w-]+)( \(v[\d.]+\))(.*)(\u2717 Not present locally)/g, `${source_default.red("$1")}$2$3$4${source_default.red("$5")}`);
|
|
637916
|
+
formatted = formatted.replace(/(Action: )(Remove)/g, `$1${source_default.red("$2")}`);
|
|
637917
|
+
formatted = formatted.replace(/(\u2014 )([\w-]+)( \(v[\d.]+\))(.*)\(\+ Missing remotely\)/g, `${source_default.green("$1")}$2$3$4${source_default.green("(+ Missing remotely)")}`);
|
|
637918
|
+
formatted = formatted.replace(/(Action: )(Install)/g, `$1${source_default.green("$2")}`);
|
|
637919
|
+
formatted = formatted.replace(/(\u2014 )([\w-]+)( \(v[\d.]+\))/g, `${source_default.yellow("$1")}$2$3`);
|
|
637920
|
+
formatted = formatted.replace(/(Configuration differences:)/g, source_default.yellow("$1"));
|
|
637921
|
+
formatted = formatted.replace(/(Action: )(Update)/g, `$1${source_default.yellow("$2")}`);
|
|
637922
|
+
formatted = formatted.replace(/^(\s+)- (Remote:.*)/gm, `$1${source_default.red("- $2")}`);
|
|
637923
|
+
formatted = formatted.replace(/^(\s+)\+ (Local:.*)/gm, `$1${source_default.green("+ $2")}`);
|
|
637924
|
+
formatted = formatted.replace(/(\u2022 )(Install:)/g, `$1${source_default.green("$2")}`);
|
|
637925
|
+
formatted = formatted.replace(/(\u2022 )(Remove:)/g, `$1${source_default.red("$2")}`);
|
|
637926
|
+
formatted = formatted.replace(/(\u2022 )(Update:)/g, `$1${source_default.yellow("$2")}`);
|
|
637927
|
+
formatted = formatted.replace(/(\u2022 )(Agent config:)/g, `$1${source_default.cyan("$2")}`);
|
|
637928
|
+
formatted = formatted.replace(/\(not set\)/g, source_default.gray("(not set)"));
|
|
637929
|
+
formatted = formatted.replace(/: (true)\b/g, `: ${source_default.green("true")}`);
|
|
637930
|
+
formatted = formatted.replace(/: (false)\b/g, `: ${source_default.red("false")}`);
|
|
637931
|
+
return formatted;
|
|
637932
|
+
}
|
|
637933
|
+
static formatPrompt() {
|
|
637934
|
+
return source_default.bold.red(`\u2753 Apply these changes before continuing?
|
|
637935
|
+
`) + source_default.gray("Proceed? [y/N] ");
|
|
637936
|
+
}
|
|
637937
|
+
}
|
|
637938
|
+
var init_preflight_formatter = __esm(() => {
|
|
637939
|
+
init_source();
|
|
637940
|
+
init_dist15();
|
|
637941
|
+
});
|
|
637942
|
+
|
|
638369
637943
|
// src/components/PreflightModal.tsx
|
|
638370
637944
|
var jsx_dev_runtime19, approvalOptions, PreflightModal = ({ result, onApprove, onCancel }) => {
|
|
638371
637945
|
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
638372
637946
|
flexDirection: "column",
|
|
638373
637947
|
children: [
|
|
638374
637948
|
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
638375
|
-
children:
|
|
637949
|
+
children: PreflightFormatter2.format(result)
|
|
638376
637950
|
}, undefined, false, undefined, this),
|
|
638377
637951
|
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Select, {
|
|
638378
637952
|
options: approvalOptions,
|
|
@@ -638384,7 +637958,7 @@ var jsx_dev_runtime19, approvalOptions, PreflightModal = ({ result, onApprove, o
|
|
|
638384
637958
|
}, undefined, true, undefined, this);
|
|
638385
637959
|
};
|
|
638386
637960
|
var init_PreflightModal = __esm(async () => {
|
|
638387
|
-
|
|
637961
|
+
init_preflight_formatter();
|
|
638388
637962
|
await __promiseAll([
|
|
638389
637963
|
init_build2(),
|
|
638390
637964
|
init_Select()
|
|
@@ -638724,7 +638298,7 @@ function checkRuntimeVersion(agentRoot) {
|
|
|
638724
638298
|
`));
|
|
638725
638299
|
}
|
|
638726
638300
|
}
|
|
638727
|
-
var semver2, EXPECTED_RUNTIME_VERSION = "1.7.
|
|
638301
|
+
var semver2, EXPECTED_RUNTIME_VERSION = "1.7.14";
|
|
638728
638302
|
var init_runtime_version_check = __esm(() => {
|
|
638729
638303
|
init_source();
|
|
638730
638304
|
semver2 = __toESM(require_semver2(), 1);
|
|
@@ -642532,10 +642106,10 @@ var init_server = __esm(() => {
|
|
|
642532
642106
|
|
|
642533
642107
|
// src/utils/node-inspector.ts
|
|
642534
642108
|
import { spawn as spawn3 } from "child_process";
|
|
642535
|
-
import
|
|
642109
|
+
import os10 from "os";
|
|
642536
642110
|
import path41 from "path";
|
|
642537
642111
|
function openDevtools(url3) {
|
|
642538
|
-
const platform4 =
|
|
642112
|
+
const platform4 = os10.platform();
|
|
642539
642113
|
if (platform4 === "darwin") {
|
|
642540
642114
|
return spawn3("open", ["-a", "Google Chrome", url3], {
|
|
642541
642115
|
detached: true,
|
|
@@ -643620,7 +643194,7 @@ async function promptUserApproval() {
|
|
|
643620
643194
|
output: process.stdout
|
|
643621
643195
|
});
|
|
643622
643196
|
return new Promise((resolve5) => {
|
|
643623
|
-
readlineInterface.question(
|
|
643197
|
+
readlineInterface.question(PreflightFormatter2.formatPrompt(), (answer2) => {
|
|
643624
643198
|
readlineInterface.close();
|
|
643625
643199
|
const normalized = answer2.trim().toLowerCase();
|
|
643626
643200
|
resolve5(normalized === "y" || normalized === "yes");
|
|
@@ -643742,6 +643316,7 @@ var init_adk_deploy = __esm(async () => {
|
|
|
643742
643316
|
init_workspace_display();
|
|
643743
643317
|
init_assert_logged_in();
|
|
643744
643318
|
init_agent_root();
|
|
643319
|
+
init_preflight_formatter();
|
|
643745
643320
|
await init_adk_build();
|
|
643746
643321
|
});
|
|
643747
643322
|
|
|
@@ -653824,8 +653399,8 @@ var exports_upgrade = {};
|
|
|
653824
653399
|
__export(exports_upgrade, {
|
|
653825
653400
|
adkSelfUpgrade: () => adkSelfUpgrade
|
|
653826
653401
|
});
|
|
653827
|
-
import { existsSync as existsSync16, writeFileSync as writeFileSync5, chmodSync, renameSync, unlinkSync, readFileSync as readFileSync15, mkdirSync as mkdirSync5, rmdirSync } from "fs";
|
|
653828
|
-
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";
|
|
653829
653404
|
import { tmpdir } from "os";
|
|
653830
653405
|
import { execSync as execSync4 } from "child_process";
|
|
653831
653406
|
function getPlatformInfo() {
|
|
@@ -653910,6 +653485,18 @@ async function downloadBinaryWindows(version, target, extension) {
|
|
|
653910
653485
|
function getCurrentBinaryPath() {
|
|
653911
653486
|
return process.execPath;
|
|
653912
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
|
+
}
|
|
653913
653500
|
function replaceBinary(newBinaryBuffer, isWindows6) {
|
|
653914
653501
|
const currentPath = getCurrentBinaryPath();
|
|
653915
653502
|
if (isWindows6) {
|
|
@@ -653939,6 +653526,11 @@ del "%~f0"
|
|
|
653939
653526
|
renameSync(backupPath, currentPath);
|
|
653940
653527
|
} catch {}
|
|
653941
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
|
+
}
|
|
653942
653534
|
throw error;
|
|
653943
653535
|
}
|
|
653944
653536
|
}
|
|
@@ -653952,7 +653544,23 @@ async function adkSelfUpgrade(currentVersion) {
|
|
|
653952
653544
|
console.log("\u2705 You already have the latest version!");
|
|
653953
653545
|
return;
|
|
653954
653546
|
}
|
|
653955
|
-
const
|
|
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();
|
|
653956
653564
|
let binaryBuffer;
|
|
653957
653565
|
if (isWindows6) {
|
|
653958
653566
|
binaryBuffer = await downloadBinaryWindows(latestVersion, target, extension);
|
|
@@ -653967,11 +653575,13 @@ async function adkSelfUpgrade(currentVersion) {
|
|
|
653967
653575
|
Run \x1B[36madk --version\x1B[0m to verify`);
|
|
653968
653576
|
}
|
|
653969
653577
|
} catch (error) {
|
|
653970
|
-
|
|
653578
|
+
if (!error.message.includes("Permission denied")) {
|
|
653579
|
+
console.error(`
|
|
653971
653580
|
\u274C Upgrade failed:`, error.message);
|
|
653972
|
-
|
|
653581
|
+
console.error(`
|
|
653973
653582
|
You can manually download from:`);
|
|
653974
|
-
|
|
653583
|
+
console.error(` https://github.com/${GITHUB_REPO}/releases/latest`);
|
|
653584
|
+
}
|
|
653975
653585
|
throw error;
|
|
653976
653586
|
}
|
|
653977
653587
|
}
|
|
@@ -654422,7 +654032,7 @@ var {
|
|
|
654422
654032
|
|
|
654423
654033
|
// src/cli.ts
|
|
654424
654034
|
import { readFileSync as readFileSync16 } from "fs";
|
|
654425
|
-
import { join as join19, dirname as
|
|
654035
|
+
import { join as join19, dirname as dirname4 } from "path";
|
|
654426
654036
|
import { fileURLToPath as fileURLToPath9 } from "url";
|
|
654427
654037
|
|
|
654428
654038
|
// src/utils/version-check.tsx
|
|
@@ -654662,7 +654272,7 @@ if (!checkNodeVersion(true)) {
|
|
|
654662
654272
|
checkNodeVersion(false);
|
|
654663
654273
|
process.exit(1);
|
|
654664
654274
|
}
|
|
654665
|
-
var CLI_VERSION = "1.7.
|
|
654275
|
+
var CLI_VERSION = "1.7.14";
|
|
654666
654276
|
|
|
654667
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({
|
|
654668
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.
|
|
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.
|
|
43
|
+
"@botpress/adk": "^1.7.14",
|
|
44
44
|
"@botpress/cli": "^4.23",
|
|
45
|
-
"@botpress/runtime": "^1.7.
|
|
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",
|