@botpress/adk-cli 1.7.11 → 1.7.12
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 +1761 -568
- package/package.json +3 -3
- package/dist/package.json +0 -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.12", adk: "1.7.12", 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({
|
|
@@ -623884,9 +623884,12 @@ __export(exports_dist8, {
|
|
|
623884
623884
|
ValidationErrorCode: () => ValidationErrorCode,
|
|
623885
623885
|
TableManager: () => TableManager,
|
|
623886
623886
|
ProjectState: () => ProjectState,
|
|
623887
|
+
PreflightFormatter: () => PreflightFormatter,
|
|
623888
|
+
PreflightChecker: () => PreflightChecker,
|
|
623887
623889
|
InterfaceParser: () => InterfaceParser,
|
|
623888
623890
|
InterfaceOperations: () => InterfaceOperations,
|
|
623889
623891
|
InterfaceManager: () => InterfaceManager,
|
|
623892
|
+
IntegrationSyncManager: () => IntegrationSyncManager,
|
|
623890
623893
|
IntegrationSync: () => IntegrationSync,
|
|
623891
623894
|
IntegrationParser: () => IntegrationParser,
|
|
623892
623895
|
IntegrationOperations: () => IntegrationOperations,
|
|
@@ -623987,30 +623990,36 @@ import { watch as watch2, readdirSync as readdirSync22 } from "fs";
|
|
|
623987
623990
|
import { EventEmitter as EventEmitter32 } from "events";
|
|
623988
623991
|
import { join as join7, relative as relative3 } from "path";
|
|
623989
623992
|
import { existsSync as existsSync6 } from "fs";
|
|
623993
|
+
import path31 from "path";
|
|
623994
|
+
import process32 from "process";
|
|
623995
|
+
import os7 from "os";
|
|
623996
|
+
import tty4 from "tty";
|
|
623997
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
623998
|
+
import { join as join8 } from "path";
|
|
623990
623999
|
|
|
623991
624000
|
class ValidationErrors {
|
|
623992
624001
|
static $type = "ValidationError";
|
|
623993
624002
|
static isValidationError(error) {
|
|
623994
624003
|
return error !== null && typeof error === "object" && "$type" in error && error.$type === "ValidationError";
|
|
623995
624004
|
}
|
|
623996
|
-
static directoryNotFound(
|
|
624005
|
+
static directoryNotFound(path34) {
|
|
623997
624006
|
return {
|
|
623998
624007
|
$type: ValidationErrors.$type,
|
|
623999
624008
|
code: "DIRECTORY_NOT_FOUND",
|
|
624000
624009
|
severity: "error",
|
|
624001
|
-
message: `Project directory not found: ${
|
|
624010
|
+
message: `Project directory not found: ${path34}`,
|
|
624002
624011
|
hint: "Ensure the directory exists and you have permission to access it",
|
|
624003
|
-
context: { path:
|
|
624012
|
+
context: { path: path34 }
|
|
624004
624013
|
};
|
|
624005
624014
|
}
|
|
624006
|
-
static directoryAccessError(
|
|
624015
|
+
static directoryAccessError(path34, error) {
|
|
624007
624016
|
return {
|
|
624008
624017
|
$type: ValidationErrors.$type,
|
|
624009
624018
|
code: "DIRECTORY_ACCESS_ERROR",
|
|
624010
624019
|
severity: "error",
|
|
624011
624020
|
message: `Cannot access project directory: ${error}`,
|
|
624012
624021
|
hint: "Check file system permissions",
|
|
624013
|
-
context: { path:
|
|
624022
|
+
context: { path: path34, error }
|
|
624014
624023
|
};
|
|
624015
624024
|
}
|
|
624016
624025
|
static requiredFileMissing(file) {
|
|
@@ -625926,7 +625935,7 @@ class IntegrationManager {
|
|
|
625926
625935
|
return { valid: false, errors, warnings };
|
|
625927
625936
|
}
|
|
625928
625937
|
const hasChannels = integration.definition.channels && Object.keys(integration.definition.channels).length > 0;
|
|
625929
|
-
if (!integration.
|
|
625938
|
+
if (!integration.config) {
|
|
625930
625939
|
let requiresConfig = false;
|
|
625931
625940
|
if (integration.definition.configurations) {
|
|
625932
625941
|
requiresConfig = Object.values(integration.definition.configurations).some((config) => config.identifier?.required === true);
|
|
@@ -625937,7 +625946,7 @@ class IntegrationManager {
|
|
|
625937
625946
|
requiresConfig = schema?.required && schema.required.length > 0;
|
|
625938
625947
|
}
|
|
625939
625948
|
if (requiresConfig) {
|
|
625940
|
-
warnings.push(`Integration '${integration.alias}' requires configuration. Add a
|
|
625949
|
+
warnings.push(`Integration '${integration.alias}' requires configuration. Add a config object in agent.config.ts dependencies`);
|
|
625941
625950
|
}
|
|
625942
625951
|
}
|
|
625943
625952
|
return {
|
|
@@ -626515,8 +626524,8 @@ class IntegrationChecker {
|
|
|
626515
626524
|
}
|
|
626516
626525
|
}
|
|
626517
626526
|
if (!installedIntegration) {
|
|
626518
|
-
result.needsInstall =
|
|
626519
|
-
if (config) {
|
|
626527
|
+
result.needsInstall = enabled !== false;
|
|
626528
|
+
if (result.needsInstall && config) {
|
|
626520
626529
|
result.needsConfiguration = true;
|
|
626521
626530
|
}
|
|
626522
626531
|
} else {
|
|
@@ -626530,24 +626539,23 @@ class IntegrationChecker {
|
|
|
626530
626539
|
const configType = configurationType ?? installedIntegration.configurationType ?? "default";
|
|
626531
626540
|
const schema = configType === "default" ? definition.configuration?.schema : definition.configurations?.[configType]?.schema;
|
|
626532
626541
|
const schemaProperties = schema?.properties || {};
|
|
626533
|
-
const
|
|
626534
|
-
|
|
626535
|
-
|
|
626536
|
-
|
|
626537
|
-
|
|
626538
|
-
|
|
626539
|
-
|
|
626540
|
-
|
|
626541
|
-
|
|
626542
|
-
|
|
626543
|
-
const currentConfig = filterConfig(installedIntegration.configuration || {});
|
|
626544
|
-
const desiredConfig = filterConfig(config || {});
|
|
626545
|
-
if (JSON.stringify(currentConfig) !== JSON.stringify(desiredConfig)) {
|
|
626542
|
+
const allKeys = new Set([
|
|
626543
|
+
...Object.keys(installedIntegration.configuration || {}),
|
|
626544
|
+
...Object.keys(config || {})
|
|
626545
|
+
]);
|
|
626546
|
+
const configsMatch = Array.from(allKeys).every((key) => {
|
|
626547
|
+
const currentValue = installedIntegration.configuration?.[key] ?? schemaProperties[key]?.default;
|
|
626548
|
+
const desiredValue = config?.[key] ?? schemaProperties[key]?.default;
|
|
626549
|
+
return JSON.stringify(currentValue) === JSON.stringify(desiredValue);
|
|
626550
|
+
});
|
|
626551
|
+
if (!configsMatch) {
|
|
626546
626552
|
result.needsConfiguration = true;
|
|
626547
626553
|
}
|
|
626548
626554
|
}
|
|
626549
|
-
if (enabled !== undefined) {
|
|
626550
|
-
if (enabled === false
|
|
626555
|
+
if (enabled !== undefined && enabled !== installedIntegration.enabled) {
|
|
626556
|
+
if (enabled === false) {
|
|
626557
|
+
result.needsRemoval = true;
|
|
626558
|
+
} else if (enabled === true && result.installStatus === "disabled") {
|
|
626551
626559
|
result.needsConfiguration = true;
|
|
626552
626560
|
}
|
|
626553
626561
|
}
|
|
@@ -626556,6 +626564,98 @@ class IntegrationChecker {
|
|
|
626556
626564
|
}
|
|
626557
626565
|
}
|
|
626558
626566
|
|
|
626567
|
+
class IntegrationSyncManager {
|
|
626568
|
+
projectPath;
|
|
626569
|
+
client;
|
|
626570
|
+
constructor(projectPath) {
|
|
626571
|
+
this.projectPath = projectPath;
|
|
626572
|
+
}
|
|
626573
|
+
async getClient() {
|
|
626574
|
+
if (!this.client) {
|
|
626575
|
+
const credentials = await auth.getActiveCredentials();
|
|
626576
|
+
const project = await AgentProject.load(this.projectPath);
|
|
626577
|
+
const workspaceId = project.agentInfo?.workspaceId || credentials.workspaceId;
|
|
626578
|
+
if (!workspaceId) {
|
|
626579
|
+
throw new Error('No workspace ID found. Please login with "adk login"');
|
|
626580
|
+
}
|
|
626581
|
+
this.client = new Vx({
|
|
626582
|
+
token: credentials.token,
|
|
626583
|
+
apiUrl: credentials.apiUrl,
|
|
626584
|
+
workspaceId,
|
|
626585
|
+
headers: {
|
|
626586
|
+
"x-multiple-integrations": "true"
|
|
626587
|
+
}
|
|
626588
|
+
});
|
|
626589
|
+
}
|
|
626590
|
+
return this.client;
|
|
626591
|
+
}
|
|
626592
|
+
async applySyncPlan(checkResults, botId) {
|
|
626593
|
+
const summary = {
|
|
626594
|
+
installed: 0,
|
|
626595
|
+
updated: 0,
|
|
626596
|
+
removed: 0,
|
|
626597
|
+
failed: 0,
|
|
626598
|
+
errors: []
|
|
626599
|
+
};
|
|
626600
|
+
const client = await this.getClient();
|
|
626601
|
+
for (const result of checkResults) {
|
|
626602
|
+
if (result.needsRemoval && result.installStatus !== "not_installed") {
|
|
626603
|
+
try {
|
|
626604
|
+
await client.updateBot({
|
|
626605
|
+
id: botId,
|
|
626606
|
+
integrations: {
|
|
626607
|
+
[result.alias]: null
|
|
626608
|
+
}
|
|
626609
|
+
});
|
|
626610
|
+
summary.removed++;
|
|
626611
|
+
} catch (error) {
|
|
626612
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
626613
|
+
summary.failed++;
|
|
626614
|
+
summary.errors.push({ alias: result.alias, error: errorMsg });
|
|
626615
|
+
}
|
|
626616
|
+
} else if (result.needsInstall) {
|
|
626617
|
+
try {
|
|
626618
|
+
await client.updateBot({
|
|
626619
|
+
id: botId,
|
|
626620
|
+
integrations: {
|
|
626621
|
+
[result.alias]: {
|
|
626622
|
+
integrationId: result.desiredIntegrationId || result.definition.id,
|
|
626623
|
+
enabled: result.desiredInstallStatus === "enabled",
|
|
626624
|
+
configuration: result.desiredConfiguration || {}
|
|
626625
|
+
}
|
|
626626
|
+
}
|
|
626627
|
+
});
|
|
626628
|
+
summary.installed++;
|
|
626629
|
+
} catch (error) {
|
|
626630
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
626631
|
+
summary.failed++;
|
|
626632
|
+
summary.errors.push({ alias: result.alias, error: errorMsg });
|
|
626633
|
+
}
|
|
626634
|
+
} else if ((result.needsUpdate || result.needsConfiguration) && result.installStatus !== "not_installed") {
|
|
626635
|
+
try {
|
|
626636
|
+
await client.updateBot({
|
|
626637
|
+
id: botId,
|
|
626638
|
+
integrations: {
|
|
626639
|
+
[result.alias]: {
|
|
626640
|
+
integrationId: result.desiredIntegrationId || result.definition.id,
|
|
626641
|
+
enabled: result.desiredInstallStatus === "enabled",
|
|
626642
|
+
configuration: result.desiredConfiguration || {},
|
|
626643
|
+
configurationType: result.desiredConfigurationType
|
|
626644
|
+
}
|
|
626645
|
+
}
|
|
626646
|
+
});
|
|
626647
|
+
summary.updated++;
|
|
626648
|
+
} catch (error) {
|
|
626649
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
626650
|
+
summary.failed++;
|
|
626651
|
+
summary.errors.push({ alias: result.alias, error: errorMsg });
|
|
626652
|
+
}
|
|
626653
|
+
}
|
|
626654
|
+
}
|
|
626655
|
+
return summary;
|
|
626656
|
+
}
|
|
626657
|
+
}
|
|
626658
|
+
|
|
626559
626659
|
class EnhancedInterfaceCache {
|
|
626560
626660
|
cacheDir;
|
|
626561
626661
|
resolutionsDir;
|
|
@@ -627003,7 +627103,7 @@ class AgentProjectGenerator {
|
|
|
627003
627103
|
deploy: "adk deploy"
|
|
627004
627104
|
},
|
|
627005
627105
|
dependencies: {
|
|
627006
|
-
"@botpress/runtime": "^1.7.
|
|
627106
|
+
"@botpress/runtime": "^1.7.12"
|
|
627007
627107
|
},
|
|
627008
627108
|
devDependencies: {
|
|
627009
627109
|
typescript: "^5.9.3"
|
|
@@ -628621,9 +628721,13 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
628621
628721
|
const integrations = project.dependencies?.integrations || {};
|
|
628622
628722
|
const imports = [];
|
|
628623
628723
|
const integrationDefs = [];
|
|
628624
|
-
for (const alias of Object.
|
|
628625
|
-
|
|
628626
|
-
|
|
628724
|
+
for (const [alias, config] of Object.entries(integrations)) {
|
|
628725
|
+
if (config.enabled === false) {
|
|
628726
|
+
continue;
|
|
628727
|
+
}
|
|
628728
|
+
const normalizedAlias = getIntegrationAlias(alias);
|
|
628729
|
+
imports.push(`import integration_${normalizedAlias} from "../bp_modules/integration_${normalizedAlias}";`);
|
|
628730
|
+
integrationDefs.push(`${normalizedAlias}: integration_${normalizedAlias}`);
|
|
628627
628731
|
}
|
|
628628
628732
|
const content = dedent_default`
|
|
628629
628733
|
import { IntegrationPackage } from "@botpress/sdk";
|
|
@@ -628667,10 +628771,13 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
628667
628771
|
const integrations = project.integrations;
|
|
628668
628772
|
const imports = [];
|
|
628669
628773
|
const addIntegrations = [];
|
|
628670
|
-
for (const
|
|
628774
|
+
for (const integration of integrations.filter((i2) => i2.enabled)) {
|
|
628775
|
+
const { alias, configurationType, config } = integration;
|
|
628671
628776
|
const importName = `integration_${getIntegrationAlias(alias)}`;
|
|
628672
628777
|
imports.push(`import ${importName} from "./bp_modules/${importName}";`);
|
|
628673
|
-
|
|
628778
|
+
const configType = configurationType ? `, configurationType: "${configurationType}"` : "";
|
|
628779
|
+
const configData = config && Object.keys(config).length > 0 ? `, configuration: ${JSON.stringify(config)}` : "";
|
|
628780
|
+
addIntegrations.push(`bot.addIntegration(${importName}, { alias: "${alias}", enabled: true${configType}${configData} });`);
|
|
628674
628781
|
}
|
|
628675
628782
|
const conversationTags = {};
|
|
628676
628783
|
const workflowTags = {};
|
|
@@ -629575,7 +629682,615 @@ class TableManager {
|
|
|
629575
629682
|
};
|
|
629576
629683
|
}
|
|
629577
629684
|
}
|
|
629578
|
-
|
|
629685
|
+
function hasIntegrationChanges(integrations) {
|
|
629686
|
+
return integrations.toInstall.length > 0 || integrations.toRemove.length > 0 || integrations.toUpdate.length > 0;
|
|
629687
|
+
}
|
|
629688
|
+
function pluralize2(count2, word) {
|
|
629689
|
+
return `${count2} ${word}${count2 > 1 ? "s" : ""}`;
|
|
629690
|
+
}
|
|
629691
|
+
|
|
629692
|
+
class AgentConfigSyncManager {
|
|
629693
|
+
client;
|
|
629694
|
+
constructor(client) {
|
|
629695
|
+
this.client = client;
|
|
629696
|
+
}
|
|
629697
|
+
async performSync(botId, updates, options) {
|
|
629698
|
+
if (Object.keys(updates).length === 0) {
|
|
629699
|
+
return false;
|
|
629700
|
+
}
|
|
629701
|
+
try {
|
|
629702
|
+
options?.onProgress?.("Updating bot configuration...");
|
|
629703
|
+
await this.client.updateBot({ id: botId, ...updates });
|
|
629704
|
+
options?.onSuccess?.("Bot configuration updated");
|
|
629705
|
+
return true;
|
|
629706
|
+
} catch (error) {
|
|
629707
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
629708
|
+
options?.onError?.(`Failed to sync agent config: ${errorMsg}`);
|
|
629709
|
+
throw error;
|
|
629710
|
+
}
|
|
629711
|
+
}
|
|
629712
|
+
async syncFromConfig(botId, config, options) {
|
|
629713
|
+
const updates = {};
|
|
629714
|
+
if (config.name !== undefined) {
|
|
629715
|
+
updates.name = config.name;
|
|
629716
|
+
}
|
|
629717
|
+
return this.performSync(botId, updates, options);
|
|
629718
|
+
}
|
|
629719
|
+
async syncFromChanges(botId, configChanges, options) {
|
|
629720
|
+
if (!configChanges || configChanges.length === 0) {
|
|
629721
|
+
return false;
|
|
629722
|
+
}
|
|
629723
|
+
const updates = {};
|
|
629724
|
+
for (const change of configChanges) {
|
|
629725
|
+
switch (change.field) {
|
|
629726
|
+
case "name":
|
|
629727
|
+
updates.name = change.newValue;
|
|
629728
|
+
break;
|
|
629729
|
+
default:
|
|
629730
|
+
options?.onProgress?.(`Warning: Unknown config field '${change.field}' - skipping sync`);
|
|
629731
|
+
}
|
|
629732
|
+
}
|
|
629733
|
+
return this.performSync(botId, updates, options);
|
|
629734
|
+
}
|
|
629735
|
+
}
|
|
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
|
+
|
|
629998
|
+
class PreflightFormatter {
|
|
629999
|
+
static format(result) {
|
|
630000
|
+
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
|
+
sections.push("");
|
|
630005
|
+
sections.push(logoLine1);
|
|
630006
|
+
sections.push(logoLine2);
|
|
630007
|
+
sections.push("");
|
|
630008
|
+
sections.push(source_default2.hex(purple)("Running") + " preflight checks...");
|
|
630009
|
+
sections.push("");
|
|
630010
|
+
const allIntegrations = [
|
|
630011
|
+
...result.integrations.toRemove,
|
|
630012
|
+
...result.integrations.toInstall,
|
|
630013
|
+
...result.integrations.toUpdate
|
|
630014
|
+
];
|
|
630015
|
+
const maxWidth = Math.max(...allIntegrations.map((i2) => `${i2.alias} (v${i2.version})`.length), 30);
|
|
630016
|
+
if (hasIntegrationChanges(result.integrations)) {
|
|
630017
|
+
sections.push(source_default2.bold(`Integrations:
|
|
630018
|
+
`));
|
|
630019
|
+
if (result.integrations.toRemove.length > 0) {
|
|
630020
|
+
sections.push(source_default2.bold("Installed Remotely but NOT in agent.config.ts"));
|
|
630021
|
+
sections.push(source_default2.gray(`(these will be DISABLED or REMOVED)
|
|
630022
|
+
`));
|
|
630023
|
+
for (const integration of result.integrations.toRemove) {
|
|
630024
|
+
const name2 = `${integration.alias} (v${integration.version})`;
|
|
630025
|
+
const padding = " ".repeat(maxWidth - name2.length + 4);
|
|
630026
|
+
sections.push(` ${source_default2.red("\u2014")} ${name2}${padding}${source_default2.red("\u2717")} Not present locally`);
|
|
630027
|
+
sections.push(` Action: ${source_default2.red("Remove")}
|
|
630028
|
+
`);
|
|
630029
|
+
}
|
|
630030
|
+
}
|
|
630031
|
+
if (result.integrations.toInstall.length > 0) {
|
|
630032
|
+
sections.push(source_default2.bold("Present Locally but NOT Installed Remotely"));
|
|
630033
|
+
sections.push(source_default2.gray(`(these will be INSTALLED)
|
|
630034
|
+
`));
|
|
630035
|
+
for (const integration of result.integrations.toInstall) {
|
|
630036
|
+
const name2 = `${integration.alias} (v${integration.version})`;
|
|
630037
|
+
const padding = " ".repeat(maxWidth - name2.length + 4);
|
|
630038
|
+
sections.push(` ${source_default2.green("\u2014")} ${name2}${padding}${source_default2.green("+")} Missing remotely`);
|
|
630039
|
+
sections.push(` Action: ${source_default2.green("Install")}
|
|
630040
|
+
`);
|
|
630041
|
+
}
|
|
630042
|
+
}
|
|
630043
|
+
if (result.integrations.toUpdate.length > 0) {
|
|
630044
|
+
sections.push(source_default2.bold("Present on both, but config DIFFERS"));
|
|
630045
|
+
sections.push(source_default2.gray(`(these will be UPDATED)
|
|
630046
|
+
`));
|
|
630047
|
+
for (const integration of result.integrations.toUpdate) {
|
|
630048
|
+
sections.push(` ${source_default2.yellow("\u2014")} ${integration.alias} (v${integration.version})`);
|
|
630049
|
+
if (integration.configChanges && integration.configChanges.length > 0) {
|
|
630050
|
+
sections.push(source_default2.yellow(` Configuration differences:
|
|
630051
|
+
`));
|
|
630052
|
+
for (const change of integration.configChanges) {
|
|
630053
|
+
sections.push(` ${change.field}:`);
|
|
630054
|
+
sections.push(` ${source_default2.red("-")} Remote: ${this.formatValue(change.oldValue)}`);
|
|
630055
|
+
sections.push(` ${source_default2.green("+")} Local: ${this.formatValue(change.newValue)}
|
|
630056
|
+
`);
|
|
630057
|
+
}
|
|
630058
|
+
}
|
|
630059
|
+
}
|
|
630060
|
+
}
|
|
630061
|
+
}
|
|
630062
|
+
if (result.agentConfig.length > 0) {
|
|
630063
|
+
sections.push(source_default2.bold("Agent Configuration Differences"));
|
|
630064
|
+
sections.push(source_default2.gray(`(These are top-level agent settings, not integration settings)
|
|
630065
|
+
`));
|
|
630066
|
+
for (const diff3 of result.agentConfig) {
|
|
630067
|
+
sections.push(` agent.${diff3.field}:`);
|
|
630068
|
+
sections.push(` ${source_default2.red("-")} Remote: ${this.formatValue(diff3.oldValue)}`);
|
|
630069
|
+
sections.push(` ${source_default2.green("+")} Local: ${this.formatValue(diff3.newValue)}
|
|
630070
|
+
`);
|
|
630071
|
+
}
|
|
630072
|
+
}
|
|
630073
|
+
sections.push(source_default2.bold(`Summary of Actions
|
|
630074
|
+
`));
|
|
630075
|
+
const install = result.integrations.toInstall.length;
|
|
630076
|
+
const remove = result.integrations.toRemove.length;
|
|
630077
|
+
const update = result.integrations.toUpdate.length;
|
|
630078
|
+
const agentConfig = result.agentConfig.length;
|
|
630079
|
+
if (install > 0) {
|
|
630080
|
+
sections.push(` \u2022 ${source_default2.green("Install:")} ${pluralize2(install, "integration")}`);
|
|
630081
|
+
}
|
|
630082
|
+
if (remove > 0) {
|
|
630083
|
+
sections.push(` \u2022 ${source_default2.red("Remove:")} ${pluralize2(remove, "integration")}`);
|
|
630084
|
+
}
|
|
630085
|
+
if (update > 0) {
|
|
630086
|
+
sections.push(` \u2022 ${source_default2.yellow("Update:")} ${pluralize2(update, "integration")}`);
|
|
630087
|
+
}
|
|
630088
|
+
if (agentConfig > 0) {
|
|
630089
|
+
sections.push(` \u2022 ${source_default2.cyan("Agent config:")} ${pluralize2(agentConfig, "change")}`);
|
|
630090
|
+
}
|
|
630091
|
+
sections.push("");
|
|
630092
|
+
return sections.join(`
|
|
630093
|
+
`);
|
|
630094
|
+
}
|
|
630095
|
+
static formatPrompt() {
|
|
630096
|
+
return source_default2.bold.red(`\u2753 Apply these changes before continuing?
|
|
630097
|
+
`) + source_default2.gray("Proceed? [y/N] ");
|
|
630098
|
+
}
|
|
630099
|
+
static formatValue(value2) {
|
|
630100
|
+
if (value2 === undefined || value2 === null) {
|
|
630101
|
+
return source_default2.gray("(not set)");
|
|
630102
|
+
}
|
|
630103
|
+
if (typeof value2 === "string") {
|
|
630104
|
+
return `"${value2}"`;
|
|
630105
|
+
}
|
|
630106
|
+
if (typeof value2 === "boolean") {
|
|
630107
|
+
return value2 ? source_default2.green("true") : source_default2.red("false");
|
|
630108
|
+
}
|
|
630109
|
+
if (Array.isArray(value2)) {
|
|
630110
|
+
return `[${value2.map((v2) => this.formatValue(v2)).join(", ")}]`;
|
|
630111
|
+
}
|
|
630112
|
+
if (typeof value2 === "object") {
|
|
630113
|
+
return JSON.stringify(value2);
|
|
630114
|
+
}
|
|
630115
|
+
return String(value2);
|
|
630116
|
+
}
|
|
630117
|
+
}
|
|
630118
|
+
|
|
630119
|
+
class PreflightChecker {
|
|
630120
|
+
projectPath;
|
|
630121
|
+
client;
|
|
630122
|
+
project;
|
|
630123
|
+
constructor(projectPath) {
|
|
630124
|
+
this.projectPath = projectPath;
|
|
630125
|
+
}
|
|
630126
|
+
async getProject() {
|
|
630127
|
+
if (!this.project) {
|
|
630128
|
+
this.project = await AgentProject.load(this.projectPath);
|
|
630129
|
+
}
|
|
630130
|
+
return this.project;
|
|
630131
|
+
}
|
|
630132
|
+
async getClient() {
|
|
630133
|
+
if (!this.client) {
|
|
630134
|
+
const credentials = await auth.getActiveCredentials();
|
|
630135
|
+
const project = await this.getProject();
|
|
630136
|
+
const workspaceId = project.agentInfo?.workspaceId || credentials.workspaceId;
|
|
630137
|
+
if (!workspaceId) {
|
|
630138
|
+
throw new Error('No workspace ID found. Please login with "adk login"');
|
|
630139
|
+
}
|
|
630140
|
+
this.client = new Vx({
|
|
630141
|
+
token: credentials.token,
|
|
630142
|
+
apiUrl: credentials.apiUrl,
|
|
630143
|
+
workspaceId,
|
|
630144
|
+
headers: {
|
|
630145
|
+
"x-multiple-integrations": "true"
|
|
630146
|
+
}
|
|
630147
|
+
});
|
|
630148
|
+
}
|
|
630149
|
+
return this.client;
|
|
630150
|
+
}
|
|
630151
|
+
async performCheck(botId) {
|
|
630152
|
+
const client = await this.getClient();
|
|
630153
|
+
const project = await this.getProject();
|
|
630154
|
+
const { bot } = await client.getBot({ id: botId });
|
|
630155
|
+
const integrationChecker = new IntegrationChecker(this.projectPath);
|
|
630156
|
+
const integrationResults = await integrationChecker.checkIntegrations(botId);
|
|
630157
|
+
const integrationDiffs = this.buildIntegrationDiffs(integrationResults);
|
|
630158
|
+
const agentConfigDiffs = this.buildAgentConfigDiffs(project, bot);
|
|
630159
|
+
const hasChanges = hasIntegrationChanges(integrationDiffs) || agentConfigDiffs.length > 0;
|
|
630160
|
+
return {
|
|
630161
|
+
result: {
|
|
630162
|
+
integrations: integrationDiffs,
|
|
630163
|
+
agentConfig: agentConfigDiffs,
|
|
630164
|
+
hasChanges
|
|
630165
|
+
},
|
|
630166
|
+
integrationResults
|
|
630167
|
+
};
|
|
630168
|
+
}
|
|
630169
|
+
buildIntegrationDiffs(results) {
|
|
630170
|
+
const toInstall = [];
|
|
630171
|
+
const toRemove = [];
|
|
630172
|
+
const toUpdate = [];
|
|
630173
|
+
for (const result of results) {
|
|
630174
|
+
if (result.desiredInstallStatus === "disabled" && !result.needsRemoval && !result.needsConfiguration) {
|
|
630175
|
+
continue;
|
|
630176
|
+
}
|
|
630177
|
+
if (result.needsInstall) {
|
|
630178
|
+
toInstall.push({
|
|
630179
|
+
alias: result.alias,
|
|
630180
|
+
name: result.name,
|
|
630181
|
+
version: result.desiredVersion,
|
|
630182
|
+
action: "install"
|
|
630183
|
+
});
|
|
630184
|
+
} else if (result.needsRemoval) {
|
|
630185
|
+
toRemove.push({
|
|
630186
|
+
alias: result.alias,
|
|
630187
|
+
name: result.name,
|
|
630188
|
+
version: result.installedVersion || result.desiredVersion,
|
|
630189
|
+
action: "remove"
|
|
630190
|
+
});
|
|
630191
|
+
} else if (result.needsUpdate || result.needsConfiguration) {
|
|
630192
|
+
const configChanges = this.buildConfigDiff(result.currentConfiguration || {}, result.desiredConfiguration || {}, result.definition.configuration?.schema?.properties || {});
|
|
630193
|
+
toUpdate.push({
|
|
630194
|
+
alias: result.alias,
|
|
630195
|
+
name: result.name,
|
|
630196
|
+
version: result.desiredVersion,
|
|
630197
|
+
action: "update",
|
|
630198
|
+
configChanges: configChanges.length > 0 ? configChanges : undefined
|
|
630199
|
+
});
|
|
630200
|
+
}
|
|
630201
|
+
}
|
|
630202
|
+
return { toInstall, toRemove, toUpdate };
|
|
630203
|
+
}
|
|
630204
|
+
buildConfigDiff(current, desired, schema) {
|
|
630205
|
+
const diffs = [];
|
|
630206
|
+
const currentObj = current ?? {};
|
|
630207
|
+
const desiredObj = desired ?? {};
|
|
630208
|
+
const allKeys = new Set([...Object.keys(currentObj), ...Object.keys(desiredObj)]);
|
|
630209
|
+
for (const key of allKeys) {
|
|
630210
|
+
const schemaDefault = schema.properties?.[key]?.default;
|
|
630211
|
+
const currentValue = currentObj[key] ?? schemaDefault;
|
|
630212
|
+
const desiredValue = desiredObj[key] ?? schemaDefault;
|
|
630213
|
+
if (JSON.stringify(currentValue) !== JSON.stringify(desiredValue)) {
|
|
630214
|
+
const type = currentValue === undefined ? "added" : desiredValue === undefined ? "removed" : "changed";
|
|
630215
|
+
diffs.push({
|
|
630216
|
+
field: key,
|
|
630217
|
+
oldValue: currentValue,
|
|
630218
|
+
newValue: desiredValue,
|
|
630219
|
+
type
|
|
630220
|
+
});
|
|
630221
|
+
}
|
|
630222
|
+
}
|
|
630223
|
+
return diffs;
|
|
630224
|
+
}
|
|
630225
|
+
buildAgentConfigDiffs(project, bot) {
|
|
630226
|
+
if (project.config?.name !== undefined && project.config.name !== bot.name) {
|
|
630227
|
+
return [
|
|
630228
|
+
{
|
|
630229
|
+
field: "name",
|
|
630230
|
+
oldValue: bot.name,
|
|
630231
|
+
newValue: project.config.name
|
|
630232
|
+
}
|
|
630233
|
+
];
|
|
630234
|
+
}
|
|
630235
|
+
return [];
|
|
630236
|
+
}
|
|
630237
|
+
async checkWithPendingApply(botId) {
|
|
630238
|
+
const { result, integrationResults } = await this.performCheck(botId);
|
|
630239
|
+
return {
|
|
630240
|
+
result,
|
|
630241
|
+
apply: (callbacks) => this.apply(botId, result, integrationResults, callbacks)
|
|
630242
|
+
};
|
|
630243
|
+
}
|
|
630244
|
+
async checkAndApply(botId, options = {}) {
|
|
630245
|
+
const { result, integrationResults } = await this.performCheck(botId);
|
|
630246
|
+
if (!result.hasChanges) {
|
|
630247
|
+
return { result, applied: false };
|
|
630248
|
+
}
|
|
630249
|
+
if (options.shouldApply) {
|
|
630250
|
+
const formatted = PreflightFormatter.format(result);
|
|
630251
|
+
const approved = await options.shouldApply(result, formatted);
|
|
630252
|
+
if (!approved) {
|
|
630253
|
+
return { result, applied: false };
|
|
630254
|
+
}
|
|
630255
|
+
}
|
|
630256
|
+
await this.apply(botId, result, integrationResults, options.callbacks);
|
|
630257
|
+
return { result, applied: true };
|
|
630258
|
+
}
|
|
630259
|
+
async apply(botId, result, integrationResults, options) {
|
|
630260
|
+
const client = await this.getClient();
|
|
630261
|
+
if (hasIntegrationChanges(result.integrations)) {
|
|
630262
|
+
options?.onProgress?.("Syncing integrations to bot...");
|
|
630263
|
+
const integrationSyncer = new IntegrationSyncManager(this.projectPath);
|
|
630264
|
+
const syncResult = await integrationSyncer.applySyncPlan(integrationResults, botId);
|
|
630265
|
+
if (syncResult.installed > 0) {
|
|
630266
|
+
options?.onSuccess?.(`Installed ${pluralize2(syncResult.installed, "integration")}`);
|
|
630267
|
+
}
|
|
630268
|
+
if (syncResult.updated > 0) {
|
|
630269
|
+
options?.onSuccess?.(`Updated ${pluralize2(syncResult.updated, "integration")}`);
|
|
630270
|
+
}
|
|
630271
|
+
if (syncResult.removed > 0) {
|
|
630272
|
+
options?.onSuccess?.(`Removed ${pluralize2(syncResult.removed, "integration")}`);
|
|
630273
|
+
}
|
|
630274
|
+
if (syncResult.failed > 0) {
|
|
630275
|
+
options?.onError?.(`Failed to sync ${pluralize2(syncResult.failed, "integration")}`);
|
|
630276
|
+
for (const { alias, error } of syncResult.errors) {
|
|
630277
|
+
options?.onError?.(` ${alias}: ${error}`);
|
|
630278
|
+
}
|
|
630279
|
+
}
|
|
630280
|
+
}
|
|
630281
|
+
if (result.agentConfig.length > 0) {
|
|
630282
|
+
const configSyncer = new AgentConfigSyncManager(client);
|
|
630283
|
+
await configSyncer.syncFromChanges(botId, result.agentConfig, options);
|
|
630284
|
+
}
|
|
630285
|
+
options?.onProgress?.("Regenerating bot project...");
|
|
630286
|
+
await generateBotProject({
|
|
630287
|
+
projectPath: this.projectPath,
|
|
630288
|
+
outputPath: path31.join(this.projectPath, ".adk", "bot")
|
|
630289
|
+
});
|
|
630290
|
+
options?.onSuccess?.("Bot project regenerated");
|
|
630291
|
+
}
|
|
630292
|
+
}
|
|
630293
|
+
var import_ts_morph, __defProp9, __commonJS5 = (cb4, mod) => () => (mod || cb4((mod = { exports: {} }).exports, mod), mod.exports), __export7 = (target, all4) => {
|
|
629579
630294
|
for (var name2 in all4)
|
|
629580
630295
|
__defProp9(target, name2, {
|
|
629581
630296
|
get: all4[name2],
|
|
@@ -629603,11 +630318,11 @@ var import_ts_morph, __defProp9, __export7 = (target, all4) => {
|
|
|
629603
630318
|
`));
|
|
629604
630319
|
return code;
|
|
629605
630320
|
}
|
|
629606
|
-
}, ADK_VERSION = "1.7.
|
|
630321
|
+
}, ADK_VERSION = "1.7.12", relative2 = (from, to3) => {
|
|
629607
630322
|
const fromDir = path10.dirname(from);
|
|
629608
630323
|
const relative32 = path10.relative(fromDir, to3);
|
|
629609
630324
|
return relative32.startsWith(".") ? relative32 : `./${relative32}`;
|
|
629610
|
-
}, init_utils4, exports_action_types, init_action_types, exports_integration_action_types, init_integration_action_types, bpCliImporter, auth, BpAddCommand, BpBuildCommand, BpDeployCommand, BpDevCommand, BpChatCommand, workspaceCache, agentInfoKeyOrder, dependenciesKeyOrder, integrationKeyOrder, defaultAdkFolder = ".adk", integrationRefSchema, versionSchema, HubCache, AgentProject, FileWatcher, getIntegrationHash = (integration) => {
|
|
630325
|
+
}, init_utils4, exports_action_types, init_action_types, exports_integration_action_types, init_integration_action_types, require_package3, bpCliImporter, auth, BpAddCommand, BpBuildCommand, BpDeployCommand, BpDevCommand, BpChatCommand, workspaceCache, agentInfoKeyOrder, dependenciesKeyOrder, integrationKeyOrder, defaultAdkFolder = ".adk", integrationRefSchema, versionSchema, HubCache, AgentProject, FileWatcher, getIntegrationHash = (integration) => {
|
|
629611
630326
|
return crypto23.createHash("sha256").update(`${integration.alias}|${integration.definition?.id}|${integration.definition?.version}|${integration.definition?.updatedAt}`).digest("hex");
|
|
629612
630327
|
}, getPascalAlias = (integration) => pascalCase(getIntegrationAlias(integration.alias)), getIntegrationNames = (integration) => ({
|
|
629613
630328
|
typings: {
|
|
@@ -629645,7 +630360,90 @@ var import_ts_morph, __defProp9, __export7 = (target, all4) => {
|
|
|
629645
630360
|
index: path18.join(snakeCase(int2.name), `index.ts`),
|
|
629646
630361
|
actions: path18.join(snakeCase(int2.name), `actions.ts`)
|
|
629647
630362
|
}
|
|
629648
|
-
}), FileWatcher2;
|
|
630363
|
+
}), FileWatcher2, ANSI_BACKGROUND_OFFSET3 = 10, wrapAnsi163 = (offset2 = 0) => (code) => `\x1B[${code + offset2}m`, wrapAnsi2563 = (offset2 = 0) => (code) => `\x1B[${38 + offset2};5;${code}m`, wrapAnsi16m3 = (offset2 = 0) => (red2, green2, blue2) => `\x1B[${38 + offset2};2;${red2};${green2};${blue2}m`, styles5, modifierNames3, foregroundColorNames3, backgroundColorNames3, colorNames3, ansiStyles3, ansi_styles_default3, env4, flagForceColor2, supportsColor2, supports_color_default2, stdoutColor2, stderrColor2, GENERATOR2, STYLER2, IS_EMPTY2, levelMapping2, styles22, applyOptions2 = (object, options = {}) => {
|
|
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 = () => {
|
|
630434
|
+
try {
|
|
630435
|
+
const packageJson = require_package3();
|
|
630436
|
+
return packageJson.version;
|
|
630437
|
+
} catch {
|
|
630438
|
+
try {
|
|
630439
|
+
const adkPackagePath = join8(process.cwd(), "node_modules/@botpress/adk/package.json");
|
|
630440
|
+
const pkg = JSON.parse(readFileSync5(adkPackagePath, "utf-8"));
|
|
630441
|
+
return pkg.version;
|
|
630442
|
+
} catch {
|
|
630443
|
+
return "unknown";
|
|
630444
|
+
}
|
|
630445
|
+
}
|
|
630446
|
+
};
|
|
629649
630447
|
var init_dist15 = __esm(() => {
|
|
629650
630448
|
init_dist5();
|
|
629651
630449
|
init_dist4();
|
|
@@ -629665,6 +630463,7 @@ var init_dist15 = __esm(() => {
|
|
|
629665
630463
|
init_dist4();
|
|
629666
630464
|
init_dist4();
|
|
629667
630465
|
init_dist4();
|
|
630466
|
+
init_dist4();
|
|
629668
630467
|
init_internal();
|
|
629669
630468
|
init_dist5();
|
|
629670
630469
|
init_dedent();
|
|
@@ -629675,6 +630474,7 @@ var init_dist15 = __esm(() => {
|
|
|
629675
630474
|
init_internal();
|
|
629676
630475
|
init_dist4();
|
|
629677
630476
|
init_dist5();
|
|
630477
|
+
init_dist4();
|
|
629678
630478
|
import_ts_morph = __toESM(require_ts_morph(), 1);
|
|
629679
630479
|
__defProp9 = Object.defineProperty;
|
|
629680
630480
|
__require3 = /* @__PURE__ */ createRequire(import.meta.url);
|
|
@@ -629684,7 +630484,6 @@ var init_dist15 = __esm(() => {
|
|
|
629684
630484
|
version: X.string(),
|
|
629685
630485
|
enabled: X.boolean(),
|
|
629686
630486
|
configurationType: X.string().optional(),
|
|
629687
|
-
connection: X.string().optional(),
|
|
629688
630487
|
config: X.record(X.any()).optional()
|
|
629689
630488
|
})).optional()
|
|
629690
630489
|
});
|
|
@@ -629784,6 +630583,84 @@ var init_dist15 = __esm(() => {
|
|
|
629784
630583
|
init_utils4();
|
|
629785
630584
|
init_fs();
|
|
629786
630585
|
});
|
|
630586
|
+
require_package3 = __commonJS5((exports, module) => {
|
|
630587
|
+
module.exports = {
|
|
630588
|
+
name: "@botpress/adk",
|
|
630589
|
+
version: "1.7.12",
|
|
630590
|
+
description: "Core ADK library for building AI agents on Botpress",
|
|
630591
|
+
type: "module",
|
|
630592
|
+
main: "dist/index.js",
|
|
630593
|
+
types: "dist/index.d.ts",
|
|
630594
|
+
files: [
|
|
630595
|
+
"dist/**/*",
|
|
630596
|
+
"package.json",
|
|
630597
|
+
"README.md"
|
|
630598
|
+
],
|
|
630599
|
+
exports: {
|
|
630600
|
+
".": {
|
|
630601
|
+
types: "./dist/index.d.ts",
|
|
630602
|
+
import: "./dist/index.js"
|
|
630603
|
+
},
|
|
630604
|
+
"./schemas/*": "./schemas/*"
|
|
630605
|
+
},
|
|
630606
|
+
scripts: {
|
|
630607
|
+
build: "bun run build:types && bun run build.ts",
|
|
630608
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
630609
|
+
watch: "bun run build:types && bun build ./src/index.ts --outdir ./dist --target node --format esm --sourcemap --watch",
|
|
630610
|
+
clean: "rm -rf dist",
|
|
630611
|
+
prepublishOnly: "bun run clean && bun run build",
|
|
630612
|
+
test: "vitest run",
|
|
630613
|
+
"test:watch": "vitest",
|
|
630614
|
+
"test:ui": "vitest --ui",
|
|
630615
|
+
"test:coverage": "vitest run --coverage"
|
|
630616
|
+
},
|
|
630617
|
+
keywords: [
|
|
630618
|
+
"botpress",
|
|
630619
|
+
"adk",
|
|
630620
|
+
"agent",
|
|
630621
|
+
"ai",
|
|
630622
|
+
"chatbot",
|
|
630623
|
+
"conversational-ai",
|
|
630624
|
+
"development-kit"
|
|
630625
|
+
],
|
|
630626
|
+
author: "Botpress",
|
|
630627
|
+
license: "MIT",
|
|
630628
|
+
repository: {
|
|
630629
|
+
type: "git",
|
|
630630
|
+
url: "https://github.com/botpress/adk"
|
|
630631
|
+
},
|
|
630632
|
+
dependencies: {
|
|
630633
|
+
"@botpress/cli": "^4.23",
|
|
630634
|
+
"@botpress/client": "^1.27.0",
|
|
630635
|
+
"@botpress/cognitive": "^0.2.0",
|
|
630636
|
+
"@botpress/runtime": "^1.7.12",
|
|
630637
|
+
"@botpress/sdk": "^4.18.1",
|
|
630638
|
+
"@bpinternal/yargs-extra": "^0.0.21",
|
|
630639
|
+
"@parcel/watcher": "^2.5.1",
|
|
630640
|
+
"@types/glob": "^9.0.0",
|
|
630641
|
+
"@types/luxon": "^3.7.1",
|
|
630642
|
+
"@types/semver": "^7.7.1",
|
|
630643
|
+
dedent: "^1.7.0",
|
|
630644
|
+
execa: "9.6.0",
|
|
630645
|
+
glob: "^11.0.3",
|
|
630646
|
+
luxon: "^3.7.2",
|
|
630647
|
+
prettier: "^3.6.2",
|
|
630648
|
+
semver: "^7.7.2",
|
|
630649
|
+
"ts-morph": "^27.0.2"
|
|
630650
|
+
},
|
|
630651
|
+
devDependencies: {
|
|
630652
|
+
dotenv: "^17.2.3"
|
|
630653
|
+
},
|
|
630654
|
+
peerDependencies: {
|
|
630655
|
+
typescript: ">=4.5.0"
|
|
630656
|
+
},
|
|
630657
|
+
engines: {
|
|
630658
|
+
node: ">=22.0.0",
|
|
630659
|
+
bun: ">=1.3.0"
|
|
630660
|
+
},
|
|
630661
|
+
packageManager: "bun@1.3.0"
|
|
630662
|
+
};
|
|
630663
|
+
});
|
|
629787
630664
|
init_credentials();
|
|
629788
630665
|
init_credentials();
|
|
629789
630666
|
bpCliImporter = new BpCliImporter;
|
|
@@ -630241,7 +631118,7 @@ ${this.stderrLines.join(`
|
|
|
630241
631118
|
workspaceCache = new WorkspaceCache;
|
|
630242
631119
|
agentInfoKeyOrder = ["botId", "workspaceId", "apiUrl", "devId"];
|
|
630243
631120
|
dependenciesKeyOrder = ["integrations"];
|
|
630244
|
-
integrationKeyOrder = ["version", "enabled", "configurationType", "
|
|
631121
|
+
integrationKeyOrder = ["version", "enabled", "configurationType", "config"];
|
|
630245
631122
|
init_fs();
|
|
630246
631123
|
init_validation_errors();
|
|
630247
631124
|
integrationRefSchema = X.string().transform((val, ctx) => {
|
|
@@ -630647,7 +631524,6 @@ ${this.stderrLines.join(`
|
|
|
630647
631524
|
name: parsed.alias,
|
|
630648
631525
|
version: parsed.ref.version,
|
|
630649
631526
|
workspace: parsed.ref.workspace,
|
|
630650
|
-
connection: parsed.connection,
|
|
630651
631527
|
config: parsed.config,
|
|
630652
631528
|
installed: false,
|
|
630653
631529
|
installedVersion: undefined,
|
|
@@ -631264,6 +632140,142 @@ ${this.stderrLines.join(`
|
|
|
631264
632140
|
return super.emit(event3, data);
|
|
631265
632141
|
}
|
|
631266
632142
|
};
|
|
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;
|
|
631267
632279
|
});
|
|
631268
632280
|
|
|
631269
632281
|
// src/components/Theme.ts
|
|
@@ -631402,13 +632414,13 @@ var init_is_inside_container = __esm(() => {
|
|
|
631402
632414
|
|
|
631403
632415
|
// ../../node_modules/is-wsl/index.js
|
|
631404
632416
|
import process21 from "process";
|
|
631405
|
-
import
|
|
632417
|
+
import os8 from "os";
|
|
631406
632418
|
import fs19 from "fs";
|
|
631407
632419
|
var isWsl = () => {
|
|
631408
632420
|
if (process21.platform !== "linux") {
|
|
631409
632421
|
return false;
|
|
631410
632422
|
}
|
|
631411
|
-
if (
|
|
632423
|
+
if (os8.release().toLowerCase().includes("microsoft")) {
|
|
631412
632424
|
if (isInsideContainer()) {
|
|
631413
632425
|
return false;
|
|
631414
632426
|
}
|
|
@@ -631443,18 +632455,18 @@ function stripFinalNewline2(input) {
|
|
|
631443
632455
|
// ../../node_modules/clipboardy/node_modules/execa/node_modules/npm-run-path/node_modules/path-key/index.js
|
|
631444
632456
|
function pathKey2(options = {}) {
|
|
631445
632457
|
const {
|
|
631446
|
-
env:
|
|
632458
|
+
env: env5 = process.env,
|
|
631447
632459
|
platform: platform3 = process.platform
|
|
631448
632460
|
} = options;
|
|
631449
632461
|
if (platform3 !== "win32") {
|
|
631450
632462
|
return "PATH";
|
|
631451
632463
|
}
|
|
631452
|
-
return Object.keys(
|
|
632464
|
+
return Object.keys(env5).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
631453
632465
|
}
|
|
631454
632466
|
|
|
631455
632467
|
// ../../node_modules/clipboardy/node_modules/execa/node_modules/npm-run-path/index.js
|
|
631456
632468
|
import process23 from "process";
|
|
631457
|
-
import
|
|
632469
|
+
import path34 from "path";
|
|
631458
632470
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
631459
632471
|
var npmRunPath2 = ({
|
|
631460
632472
|
cwd: cwd3 = process23.cwd(),
|
|
@@ -631464,7 +632476,7 @@ var npmRunPath2 = ({
|
|
|
631464
632476
|
addExecPath = true
|
|
631465
632477
|
} = {}) => {
|
|
631466
632478
|
const cwdString = cwd3 instanceof URL ? fileURLToPath4(cwd3) : cwd3;
|
|
631467
|
-
const cwdPath =
|
|
632479
|
+
const cwdPath = path34.resolve(cwdString);
|
|
631468
632480
|
const result = [];
|
|
631469
632481
|
if (preferLocal) {
|
|
631470
632482
|
applyPreferLocal2(result, cwdPath);
|
|
@@ -631472,23 +632484,23 @@ var npmRunPath2 = ({
|
|
|
631472
632484
|
if (addExecPath) {
|
|
631473
632485
|
applyExecPath2(result, execPath2, cwdPath);
|
|
631474
632486
|
}
|
|
631475
|
-
return [...result, pathOption].join(
|
|
632487
|
+
return [...result, pathOption].join(path34.delimiter);
|
|
631476
632488
|
}, applyPreferLocal2 = (result, cwdPath) => {
|
|
631477
632489
|
let previous;
|
|
631478
632490
|
while (previous !== cwdPath) {
|
|
631479
|
-
result.push(
|
|
632491
|
+
result.push(path34.join(cwdPath, "node_modules/.bin"));
|
|
631480
632492
|
previous = cwdPath;
|
|
631481
|
-
cwdPath =
|
|
632493
|
+
cwdPath = path34.resolve(cwdPath, "..");
|
|
631482
632494
|
}
|
|
631483
632495
|
}, applyExecPath2 = (result, execPath2, cwdPath) => {
|
|
631484
632496
|
const execPathString = execPath2 instanceof URL ? fileURLToPath4(execPath2) : execPath2;
|
|
631485
|
-
result.push(
|
|
631486
|
-
}, npmRunPathEnv2 = ({ env:
|
|
631487
|
-
|
|
631488
|
-
const pathName = pathKey2({ env:
|
|
631489
|
-
options.path =
|
|
631490
|
-
|
|
631491
|
-
return
|
|
632497
|
+
result.push(path34.resolve(cwdPath, execPathString, ".."));
|
|
632498
|
+
}, npmRunPathEnv2 = ({ env: env5 = process23.env, ...options } = {}) => {
|
|
632499
|
+
env5 = { ...env5 };
|
|
632500
|
+
const pathName = pathKey2({ env: env5 });
|
|
632501
|
+
options.path = env5[pathName];
|
|
632502
|
+
env5[pathName] = npmRunPath2(options);
|
|
632503
|
+
return env5;
|
|
631492
632504
|
};
|
|
631493
632505
|
var init_npm_run_path2 = () => {};
|
|
631494
632506
|
|
|
@@ -632031,7 +633043,7 @@ var init_stdio2 = __esm(() => {
|
|
|
632031
633043
|
});
|
|
632032
633044
|
|
|
632033
633045
|
// ../../node_modules/clipboardy/node_modules/execa/lib/kill.js
|
|
632034
|
-
import
|
|
633046
|
+
import os10 from "os";
|
|
632035
633047
|
var DEFAULT_FORCE_KILL_TIMEOUT2, spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
632036
633048
|
const killResult = kill(signal);
|
|
632037
633049
|
setKillTimeout2(kill, signal, options, killResult);
|
|
@@ -632047,7 +633059,7 @@ var DEFAULT_FORCE_KILL_TIMEOUT2, spawnedKill = (kill, signal = "SIGTERM", option
|
|
|
632047
633059
|
if (t9.unref) {
|
|
632048
633060
|
t9.unref();
|
|
632049
633061
|
}
|
|
632050
|
-
}, shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult, isSigterm = (signal) => signal ===
|
|
633062
|
+
}, shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult, isSigterm = (signal) => signal === os10.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM", getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
632051
633063
|
if (forceKillAfterTimeout === true) {
|
|
632052
633064
|
return DEFAULT_FORCE_KILL_TIMEOUT2;
|
|
632053
633065
|
}
|
|
@@ -632361,7 +633373,7 @@ var require_merge_stream = __commonJS((exports, module) => {
|
|
|
632361
633373
|
});
|
|
632362
633374
|
|
|
632363
633375
|
// ../../node_modules/clipboardy/node_modules/execa/lib/stream.js
|
|
632364
|
-
import { createReadStream as createReadStream2, readFileSync as
|
|
633376
|
+
import { createReadStream as createReadStream2, readFileSync as readFileSync6 } from "fs";
|
|
632365
633377
|
import { setTimeout as setTimeout4 } from "timers/promises";
|
|
632366
633378
|
var import_merge_stream, validateInputOptions = (input) => {
|
|
632367
633379
|
if (input !== undefined) {
|
|
@@ -632372,7 +633384,7 @@ var import_merge_stream, validateInputOptions = (input) => {
|
|
|
632372
633384
|
return input;
|
|
632373
633385
|
}
|
|
632374
633386
|
validateInputOptions(input);
|
|
632375
|
-
return
|
|
633387
|
+
return readFileSync6(inputFile);
|
|
632376
633388
|
}, handleInputSync = (options) => {
|
|
632377
633389
|
const input = getInputSync(options);
|
|
632378
633390
|
if (isStream4(input)) {
|
|
@@ -632556,7 +633568,7 @@ var init_verbose = __esm(() => {
|
|
|
632556
633568
|
|
|
632557
633569
|
// ../../node_modules/clipboardy/node_modules/execa/index.js
|
|
632558
633570
|
import { Buffer as Buffer7 } from "buffer";
|
|
632559
|
-
import
|
|
633571
|
+
import path36 from "path";
|
|
632560
633572
|
import childProcess from "child_process";
|
|
632561
633573
|
import process27 from "process";
|
|
632562
633574
|
function execa2(file, args, options) {
|
|
@@ -632710,11 +633722,11 @@ function create$(options) {
|
|
|
632710
633722
|
return $2;
|
|
632711
633723
|
}
|
|
632712
633724
|
var import_cross_spawn2, DEFAULT_MAX_BUFFER, getEnv2 = ({ env: envOption, extendEnv, preferLocal, localDir, execPath: execPath2 }) => {
|
|
632713
|
-
const
|
|
633725
|
+
const env5 = extendEnv ? { ...process27.env, ...envOption } : envOption;
|
|
632714
633726
|
if (preferLocal) {
|
|
632715
|
-
return npmRunPathEnv2({ env:
|
|
633727
|
+
return npmRunPathEnv2({ env: env5, cwd: localDir, execPath: execPath2 });
|
|
632716
633728
|
}
|
|
632717
|
-
return
|
|
633729
|
+
return env5;
|
|
632718
633730
|
}, handleArguments = (file, args, options = {}) => {
|
|
632719
633731
|
const parsed = import_cross_spawn2.default._parse(file, args, options);
|
|
632720
633732
|
file = parsed.command;
|
|
@@ -632738,7 +633750,7 @@ var import_cross_spawn2, DEFAULT_MAX_BUFFER, getEnv2 = ({ env: envOption, extend
|
|
|
632738
633750
|
};
|
|
632739
633751
|
options.env = getEnv2(options);
|
|
632740
633752
|
options.stdio = normalizeStdio(options);
|
|
632741
|
-
if (process27.platform === "win32" &&
|
|
633753
|
+
if (process27.platform === "win32" && path36.basename(file, ".exe") === "cmd") {
|
|
632742
633754
|
args.unshift("/q");
|
|
632743
633755
|
}
|
|
632744
633756
|
return { file, args, options, parsed };
|
|
@@ -632815,7 +633827,7 @@ var init_termux = __esm(() => {
|
|
|
632815
633827
|
});
|
|
632816
633828
|
|
|
632817
633829
|
// ../../node_modules/clipboardy/lib/linux.js
|
|
632818
|
-
import
|
|
633830
|
+
import path37 from "path";
|
|
632819
633831
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
632820
633832
|
var __dirname2, xsel = "xsel", xselFallback, copyArguments, pasteArguments, makeError3 = (xselError, fallbackError) => {
|
|
632821
633833
|
let error;
|
|
@@ -632852,8 +633864,8 @@ var __dirname2, xsel = "xsel", xselFallback, copyArguments, pasteArguments, make
|
|
|
632852
633864
|
}, clipboard2, linux_default;
|
|
632853
633865
|
var init_linux = __esm(() => {
|
|
632854
633866
|
init_execa2();
|
|
632855
|
-
__dirname2 =
|
|
632856
|
-
xselFallback =
|
|
633867
|
+
__dirname2 = path37.dirname(fileURLToPath5(import.meta.url));
|
|
633868
|
+
xselFallback = path37.join(__dirname2, "../fallbacks/linux/xsel");
|
|
632857
633869
|
copyArguments = ["--clipboard", "--input"];
|
|
632858
633870
|
pasteArguments = ["--clipboard", "--output"];
|
|
632859
633871
|
clipboard2 = {
|
|
@@ -632870,20 +633882,20 @@ var init_linux = __esm(() => {
|
|
|
632870
633882
|
});
|
|
632871
633883
|
|
|
632872
633884
|
// ../../node_modules/clipboardy/lib/macos.js
|
|
632873
|
-
var
|
|
633885
|
+
var env5, clipboard3, macos_default;
|
|
632874
633886
|
var init_macos = __esm(() => {
|
|
632875
633887
|
init_execa2();
|
|
632876
|
-
|
|
633888
|
+
env5 = {
|
|
632877
633889
|
LC_CTYPE: "UTF-8"
|
|
632878
633890
|
};
|
|
632879
633891
|
clipboard3 = {
|
|
632880
|
-
copy: async (options) => execa2("pbcopy", { ...options, env:
|
|
633892
|
+
copy: async (options) => execa2("pbcopy", { ...options, env: env5 }),
|
|
632881
633893
|
async paste(options) {
|
|
632882
|
-
const { stdout } = await execa2("pbpaste", { ...options, env:
|
|
633894
|
+
const { stdout } = await execa2("pbpaste", { ...options, env: env5 });
|
|
632883
633895
|
return stdout;
|
|
632884
633896
|
},
|
|
632885
|
-
copySync: (options) => execaSync2("pbcopy", { ...options, env:
|
|
632886
|
-
pasteSync: (options) => execaSync2("pbpaste", { ...options, env:
|
|
633897
|
+
copySync: (options) => execaSync2("pbcopy", { ...options, env: env5 }),
|
|
633898
|
+
pasteSync: (options) => execaSync2("pbpaste", { ...options, env: env5 }).stdout
|
|
632887
633899
|
};
|
|
632888
633900
|
macos_default = clipboard3;
|
|
632889
633901
|
});
|
|
@@ -632893,7 +633905,7 @@ import { promisify as promisify3 } from "util";
|
|
|
632893
633905
|
import process28 from "process";
|
|
632894
633906
|
import childProcess2 from "child_process";
|
|
632895
633907
|
function systemArchitectureSync() {
|
|
632896
|
-
const { arch, platform: platform3, env:
|
|
633908
|
+
const { arch, platform: platform3, env: env6 } = process28;
|
|
632897
633909
|
if (platform3 === "darwin" && arch === "x64") {
|
|
632898
633910
|
const stdout = childProcess2.execFileSync("sysctl", ["-inq", "sysctl.proc_translated"], { encoding: "utf8" });
|
|
632899
633911
|
return stdout.trim() === "1" ? "arm64" : "x64";
|
|
@@ -632901,7 +633913,7 @@ function systemArchitectureSync() {
|
|
|
632901
633913
|
if (arch === "arm64" || arch === "x64") {
|
|
632902
633914
|
return arch;
|
|
632903
633915
|
}
|
|
632904
|
-
if (platform3 === "win32" && Object.hasOwn(
|
|
633916
|
+
if (platform3 === "win32" && Object.hasOwn(env6, "PROCESSOR_ARCHITEW6432")) {
|
|
632905
633917
|
return "x64";
|
|
632906
633918
|
}
|
|
632907
633919
|
if (platform3 === "linux") {
|
|
@@ -632933,15 +633945,15 @@ var init_is64bit = __esm(() => {
|
|
|
632933
633945
|
});
|
|
632934
633946
|
|
|
632935
633947
|
// ../../node_modules/clipboardy/lib/windows.js
|
|
632936
|
-
import
|
|
633948
|
+
import path38 from "path";
|
|
632937
633949
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
632938
633950
|
var __dirname3, binarySuffix, windowBinaryPath, clipboard4, windows_default;
|
|
632939
633951
|
var init_windows = __esm(() => {
|
|
632940
633952
|
init_execa2();
|
|
632941
633953
|
init_is64bit();
|
|
632942
|
-
__dirname3 =
|
|
633954
|
+
__dirname3 = path38.dirname(fileURLToPath6(import.meta.url));
|
|
632943
633955
|
binarySuffix = is64bitSync() ? "x86_64" : "i686";
|
|
632944
|
-
windowBinaryPath =
|
|
633956
|
+
windowBinaryPath = path38.join(__dirname3, `../fallbacks/windows/clipboard_${binarySuffix}.exe`);
|
|
632945
633957
|
clipboard4 = {
|
|
632946
633958
|
copy: async (options) => execa2(windowBinaryPath, ["--copy"], options),
|
|
632947
633959
|
async paste(options) {
|
|
@@ -634552,11 +635564,11 @@ var init_default_browser_id = __esm(() => {
|
|
|
634552
635564
|
});
|
|
634553
635565
|
|
|
634554
635566
|
// ../../node_modules/run-applescript/index.js
|
|
634555
|
-
import
|
|
635567
|
+
import process33 from "process";
|
|
634556
635568
|
import { promisify as promisify5 } from "util";
|
|
634557
635569
|
import { execFile as execFile2, execFileSync } from "child_process";
|
|
634558
635570
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
634559
|
-
if (
|
|
635571
|
+
if (process33.platform !== "darwin") {
|
|
634560
635572
|
throw new Error("macOS only");
|
|
634561
635573
|
}
|
|
634562
635574
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
@@ -634622,21 +635634,21 @@ var init_windows2 = __esm(() => {
|
|
|
634622
635634
|
|
|
634623
635635
|
// ../../node_modules/default-browser/index.js
|
|
634624
635636
|
import { promisify as promisify7 } from "util";
|
|
634625
|
-
import
|
|
635637
|
+
import process35 from "process";
|
|
634626
635638
|
import { execFile as execFile4 } from "child_process";
|
|
634627
635639
|
async function defaultBrowser2() {
|
|
634628
|
-
if (
|
|
635640
|
+
if (process35.platform === "darwin") {
|
|
634629
635641
|
const id3 = await defaultBrowserId();
|
|
634630
635642
|
const name2 = await bundleName(id3);
|
|
634631
635643
|
return { name: name2, id: id3 };
|
|
634632
635644
|
}
|
|
634633
|
-
if (
|
|
635645
|
+
if (process35.platform === "linux") {
|
|
634634
635646
|
const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
|
|
634635
635647
|
const id3 = stdout.trim();
|
|
634636
635648
|
const name2 = titleize(id3.replace(/.desktop$/, "").replace("-", " "));
|
|
634637
635649
|
return { name: name2, id: id3 };
|
|
634638
635650
|
}
|
|
634639
|
-
if (
|
|
635651
|
+
if (process35.platform === "win32") {
|
|
634640
635652
|
return defaultBrowser();
|
|
634641
635653
|
}
|
|
634642
635654
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
@@ -634650,9 +635662,9 @@ var init_default_browser = __esm(() => {
|
|
|
634650
635662
|
});
|
|
634651
635663
|
|
|
634652
635664
|
// ../../node_modules/open/index.js
|
|
634653
|
-
import
|
|
635665
|
+
import process36 from "process";
|
|
634654
635666
|
import { Buffer as Buffer8 } from "buffer";
|
|
634655
|
-
import
|
|
635667
|
+
import path39 from "path";
|
|
634656
635668
|
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
634657
635669
|
import { promisify as promisify8 } from "util";
|
|
634658
635670
|
import childProcess3 from "child_process";
|
|
@@ -634816,7 +635828,7 @@ var execFile5, __dirname4, localXdgOpenPath, platform3, arch, pTryEach = async (
|
|
|
634816
635828
|
await fs21.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
634817
635829
|
exeLocalXdgOpen = true;
|
|
634818
635830
|
} catch {}
|
|
634819
|
-
const useSystemXdgOpen =
|
|
635831
|
+
const useSystemXdgOpen = process36.versions.electron ?? (platform3 === "android" || isBundled || !exeLocalXdgOpen);
|
|
634820
635832
|
command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
|
|
634821
635833
|
}
|
|
634822
635834
|
if (appArguments.length > 0) {
|
|
@@ -634862,9 +635874,9 @@ var init_open = __esm(() => {
|
|
|
634862
635874
|
init_default_browser();
|
|
634863
635875
|
init_is_inside_container();
|
|
634864
635876
|
execFile5 = promisify8(childProcess3.execFile);
|
|
634865
|
-
__dirname4 =
|
|
634866
|
-
localXdgOpenPath =
|
|
634867
|
-
({ platform: platform3, arch } =
|
|
635877
|
+
__dirname4 = path39.dirname(fileURLToPath7(import.meta.url));
|
|
635878
|
+
localXdgOpenPath = path39.join(__dirname4, "xdg-open");
|
|
635879
|
+
({ platform: platform3, arch } = process36);
|
|
634868
635880
|
apps = {};
|
|
634869
635881
|
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
634870
635882
|
darwin: "google chrome",
|
|
@@ -636233,10 +637245,10 @@ var init_Separator = __esm(async () => {
|
|
|
636233
637245
|
});
|
|
636234
637246
|
|
|
636235
637247
|
// ../adk/package.json
|
|
636236
|
-
var
|
|
637248
|
+
var require_package4 = __commonJS((exports, module) => {
|
|
636237
637249
|
module.exports = {
|
|
636238
637250
|
name: "@botpress/adk",
|
|
636239
|
-
version: "1.7.
|
|
637251
|
+
version: "1.7.12",
|
|
636240
637252
|
description: "Core ADK library for building AI agents on Botpress",
|
|
636241
637253
|
type: "module",
|
|
636242
637254
|
main: "dist/index.js",
|
|
@@ -636283,7 +637295,7 @@ var require_package3 = __commonJS((exports, module) => {
|
|
|
636283
637295
|
"@botpress/cli": "^4.23",
|
|
636284
637296
|
"@botpress/client": "^1.27.0",
|
|
636285
637297
|
"@botpress/cognitive": "^0.2.0",
|
|
636286
|
-
"@botpress/runtime": "^1.7.
|
|
637298
|
+
"@botpress/runtime": "^1.7.12",
|
|
636287
637299
|
"@botpress/sdk": "^4.18.1",
|
|
636288
637300
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
636289
637301
|
"@parcel/watcher": "^2.5.1",
|
|
@@ -636314,8 +637326,8 @@ var require_package3 = __commonJS((exports, module) => {
|
|
|
636314
637326
|
|
|
636315
637327
|
// src/components/DevStatus.tsx
|
|
636316
637328
|
import { exec as exec3 } from "child_process";
|
|
636317
|
-
import { readFileSync as
|
|
636318
|
-
import { join as
|
|
637329
|
+
import { readFileSync as readFileSync7 } from "fs";
|
|
637330
|
+
import { join as join9 } from "path";
|
|
636319
637331
|
var import_react36, jsx_dev_runtime17, BlinkingCursor = () => {
|
|
636320
637332
|
const [visible, setVisible] = import_react36.useState(true);
|
|
636321
637333
|
const theme = useTheme();
|
|
@@ -636342,14 +637354,14 @@ var import_react36, jsx_dev_runtime17, BlinkingCursor = () => {
|
|
|
636342
637354
|
return () => clearInterval(interval);
|
|
636343
637355
|
}, []);
|
|
636344
637356
|
return opacity;
|
|
636345
|
-
},
|
|
637357
|
+
}, getAdkVersion2 = () => {
|
|
636346
637358
|
try {
|
|
636347
637359
|
try {
|
|
636348
|
-
const packageJson =
|
|
637360
|
+
const packageJson = require_package4();
|
|
636349
637361
|
return packageJson.version;
|
|
636350
637362
|
} catch {
|
|
636351
|
-
const adkPackagePath =
|
|
636352
|
-
const pkg = JSON.parse(
|
|
637363
|
+
const adkPackagePath = join9(process.cwd(), "node_modules/@botpress/adk/package.json");
|
|
637364
|
+
const pkg = JSON.parse(readFileSync7(adkPackagePath, "utf-8"));
|
|
636353
637365
|
return pkg.version;
|
|
636354
637366
|
}
|
|
636355
637367
|
} catch {
|
|
@@ -636529,7 +637541,7 @@ var import_react36, jsx_dev_runtime17, BlinkingCursor = () => {
|
|
|
636529
637541
|
color: theme.text.dim,
|
|
636530
637542
|
children: [
|
|
636531
637543
|
"v",
|
|
636532
|
-
|
|
637544
|
+
getAdkVersion2()
|
|
636533
637545
|
]
|
|
636534
637546
|
}, undefined, true, undefined, this)
|
|
636535
637547
|
]
|
|
@@ -637176,7 +638188,7 @@ var init_DevStatus = __esm(async () => {
|
|
|
637176
638188
|
});
|
|
637177
638189
|
|
|
637178
638190
|
// src/components/LogsView.tsx
|
|
637179
|
-
import { readFileSync as
|
|
638191
|
+
import { readFileSync as readFileSync8, existsSync as existsSync7, statSync as statSync2, watchFile, unwatchFile } from "fs";
|
|
637180
638192
|
var import_react37, jsx_dev_runtime18, parseLogLine = (line, lineNumber) => {
|
|
637181
638193
|
try {
|
|
637182
638194
|
const parsed = JSON.parse(line);
|
|
@@ -637230,7 +638242,7 @@ var import_react37, jsx_dev_runtime18, parseLogLine = (line, lineNumber) => {
|
|
|
637230
638242
|
return;
|
|
637231
638243
|
}
|
|
637232
638244
|
lastSize.current = stats.size;
|
|
637233
|
-
const content =
|
|
638245
|
+
const content = readFileSync8(logFilePath, "utf-8");
|
|
637234
638246
|
const lines = content.split(`
|
|
637235
638247
|
`);
|
|
637236
638248
|
const entries = [];
|
|
@@ -637354,6 +638366,46 @@ var init_LogsView = __esm(async () => {
|
|
|
637354
638366
|
jsx_dev_runtime18 = __toESM(require_jsx_dev_runtime(), 1);
|
|
637355
638367
|
});
|
|
637356
638368
|
|
|
638369
|
+
// src/components/PreflightModal.tsx
|
|
638370
|
+
var jsx_dev_runtime19, approvalOptions, PreflightModal = ({ result, onApprove, onCancel }) => {
|
|
638371
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
638372
|
+
flexDirection: "column",
|
|
638373
|
+
children: [
|
|
638374
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
638375
|
+
children: PreflightFormatter.format(result)
|
|
638376
|
+
}, undefined, false, undefined, this),
|
|
638377
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Select, {
|
|
638378
|
+
options: approvalOptions,
|
|
638379
|
+
initialSelected: "approve",
|
|
638380
|
+
onSubmit: (value2) => value2 === "approve" ? onApprove() : onCancel(),
|
|
638381
|
+
onCancel
|
|
638382
|
+
}, undefined, false, undefined, this)
|
|
638383
|
+
]
|
|
638384
|
+
}, undefined, true, undefined, this);
|
|
638385
|
+
};
|
|
638386
|
+
var init_PreflightModal = __esm(async () => {
|
|
638387
|
+
init_dist15();
|
|
638388
|
+
await __promiseAll([
|
|
638389
|
+
init_build2(),
|
|
638390
|
+
init_Select()
|
|
638391
|
+
]);
|
|
638392
|
+
jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
|
|
638393
|
+
approvalOptions = [
|
|
638394
|
+
{
|
|
638395
|
+
id: "approve",
|
|
638396
|
+
label: "Apply these changes",
|
|
638397
|
+
value: "approve",
|
|
638398
|
+
description: "Proceed with the integration and config changes"
|
|
638399
|
+
},
|
|
638400
|
+
{
|
|
638401
|
+
id: "cancel",
|
|
638402
|
+
label: "Cancel",
|
|
638403
|
+
value: "cancel",
|
|
638404
|
+
description: "Keep current state, do not apply changes"
|
|
638405
|
+
}
|
|
638406
|
+
];
|
|
638407
|
+
});
|
|
638408
|
+
|
|
637357
638409
|
// src/utils/assert-logged-in.ts
|
|
637358
638410
|
async function assertLoggedIn() {
|
|
637359
638411
|
try {
|
|
@@ -637400,8 +638452,8 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
|
|
|
637400
638452
|
const hasLinkingError = allErrors.some((error) => error.code === ValidationErrorCode.AGENT_NOT_LINKED);
|
|
637401
638453
|
if (hasLinkingError) {
|
|
637402
638454
|
if (!skipRender) {
|
|
637403
|
-
render_default(/* @__PURE__ */
|
|
637404
|
-
children: /* @__PURE__ */
|
|
638455
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ThemeProvider, {
|
|
638456
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(AgentNotLinkedError, {}, undefined, false, undefined, this)
|
|
637405
638457
|
}, undefined, false, undefined, this));
|
|
637406
638458
|
}
|
|
637407
638459
|
if (exitOnError) {
|
|
@@ -637412,27 +638464,27 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
|
|
|
637412
638464
|
if (hasErrors || allWarnings.length > 0 || validationResult.info.length > 0) {
|
|
637413
638465
|
const ValidationErrors2 = () => {
|
|
637414
638466
|
const theme = useTheme();
|
|
637415
|
-
return /* @__PURE__ */
|
|
638467
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637416
638468
|
flexDirection: "column",
|
|
637417
638469
|
paddingY: 1,
|
|
637418
638470
|
children: [
|
|
637419
|
-
allErrors.length > 0 && /* @__PURE__ */
|
|
638471
|
+
allErrors.length > 0 && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637420
638472
|
flexDirection: "column",
|
|
637421
638473
|
children: [
|
|
637422
|
-
/* @__PURE__ */
|
|
638474
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637423
638475
|
color: theme.status.error,
|
|
637424
638476
|
children: [
|
|
637425
638477
|
theme.symbols.cross,
|
|
637426
638478
|
" Project validation failed:"
|
|
637427
638479
|
]
|
|
637428
638480
|
}, undefined, true, undefined, this),
|
|
637429
|
-
allErrors.map((error, index) => /* @__PURE__ */
|
|
638481
|
+
allErrors.map((error, index) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637430
638482
|
flexDirection: "column",
|
|
637431
638483
|
marginTop: 1,
|
|
637432
638484
|
children: [
|
|
637433
|
-
/* @__PURE__ */
|
|
638485
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637434
638486
|
marginLeft: 2,
|
|
637435
|
-
children: /* @__PURE__ */
|
|
638487
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637436
638488
|
color: theme.status.error,
|
|
637437
638489
|
children: [
|
|
637438
638490
|
error.file || "Project",
|
|
@@ -637440,16 +638492,16 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
|
|
|
637440
638492
|
]
|
|
637441
638493
|
}, undefined, true, undefined, this)
|
|
637442
638494
|
}, undefined, false, undefined, this),
|
|
637443
|
-
/* @__PURE__ */
|
|
638495
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637444
638496
|
marginLeft: 4,
|
|
637445
|
-
children: /* @__PURE__ */
|
|
638497
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637446
638498
|
color: theme.status.error,
|
|
637447
638499
|
children: error.message
|
|
637448
638500
|
}, undefined, false, undefined, this)
|
|
637449
638501
|
}, undefined, false, undefined, this),
|
|
637450
|
-
error.hint && /* @__PURE__ */
|
|
638502
|
+
error.hint && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637451
638503
|
marginLeft: 4,
|
|
637452
|
-
children: /* @__PURE__ */
|
|
638504
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637453
638505
|
color: theme.text.dim,
|
|
637454
638506
|
children: [
|
|
637455
638507
|
theme.symbols.info,
|
|
@@ -637462,24 +638514,24 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
|
|
|
637462
638514
|
}, index, true, undefined, this))
|
|
637463
638515
|
]
|
|
637464
638516
|
}, undefined, true, undefined, this),
|
|
637465
|
-
allWarnings.length > 0 && /* @__PURE__ */
|
|
638517
|
+
allWarnings.length > 0 && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637466
638518
|
flexDirection: "column",
|
|
637467
638519
|
marginTop: allErrors.length > 0 ? 1 : 0,
|
|
637468
638520
|
children: [
|
|
637469
|
-
/* @__PURE__ */
|
|
638521
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637470
638522
|
color: theme.status.warning,
|
|
637471
638523
|
children: [
|
|
637472
638524
|
theme.symbols.warning,
|
|
637473
638525
|
" Warnings:"
|
|
637474
638526
|
]
|
|
637475
638527
|
}, undefined, true, undefined, this),
|
|
637476
|
-
allWarnings.map((warning, index) => /* @__PURE__ */
|
|
638528
|
+
allWarnings.map((warning, index) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637477
638529
|
flexDirection: "column",
|
|
637478
638530
|
marginTop: 1,
|
|
637479
638531
|
children: [
|
|
637480
|
-
/* @__PURE__ */
|
|
638532
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637481
638533
|
marginLeft: 2,
|
|
637482
|
-
children: /* @__PURE__ */
|
|
638534
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637483
638535
|
color: theme.status.warning,
|
|
637484
638536
|
children: [
|
|
637485
638537
|
warning.file || "Project",
|
|
@@ -637488,9 +638540,9 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
|
|
|
637488
638540
|
]
|
|
637489
638541
|
}, undefined, true, undefined, this)
|
|
637490
638542
|
}, undefined, false, undefined, this),
|
|
637491
|
-
warning.hint && /* @__PURE__ */
|
|
638543
|
+
warning.hint && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637492
638544
|
marginLeft: 4,
|
|
637493
|
-
children: /* @__PURE__ */
|
|
638545
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637494
638546
|
color: theme.text.dim,
|
|
637495
638547
|
children: [
|
|
637496
638548
|
theme.symbols.info,
|
|
@@ -637503,24 +638555,24 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
|
|
|
637503
638555
|
}, index, true, undefined, this))
|
|
637504
638556
|
]
|
|
637505
638557
|
}, undefined, true, undefined, this),
|
|
637506
|
-
validationResult.info.length > 0 && /* @__PURE__ */
|
|
638558
|
+
validationResult.info.length > 0 && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637507
638559
|
flexDirection: "column",
|
|
637508
638560
|
marginTop: allErrors.length > 0 || allWarnings.length > 0 ? 1 : 0,
|
|
637509
638561
|
children: [
|
|
637510
|
-
/* @__PURE__ */
|
|
638562
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637511
638563
|
color: theme.status.info,
|
|
637512
638564
|
children: [
|
|
637513
638565
|
theme.symbols.info,
|
|
637514
638566
|
" Info:"
|
|
637515
638567
|
]
|
|
637516
638568
|
}, undefined, true, undefined, this),
|
|
637517
|
-
validationResult.info.map((info2, index) => /* @__PURE__ */
|
|
638569
|
+
validationResult.info.map((info2, index) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637518
638570
|
flexDirection: "column",
|
|
637519
638571
|
marginTop: 1,
|
|
637520
638572
|
children: [
|
|
637521
|
-
/* @__PURE__ */
|
|
638573
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637522
638574
|
marginLeft: 2,
|
|
637523
|
-
children: /* @__PURE__ */
|
|
638575
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637524
638576
|
color: theme.status.info,
|
|
637525
638577
|
children: [
|
|
637526
638578
|
info2.file || "Project",
|
|
@@ -637529,9 +638581,9 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
|
|
|
637529
638581
|
]
|
|
637530
638582
|
}, undefined, true, undefined, this)
|
|
637531
638583
|
}, undefined, false, undefined, this),
|
|
637532
|
-
info2.hint && /* @__PURE__ */
|
|
638584
|
+
info2.hint && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637533
638585
|
marginLeft: 4,
|
|
637534
|
-
children: /* @__PURE__ */
|
|
638586
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637535
638587
|
color: theme.text.dim,
|
|
637536
638588
|
children: [
|
|
637537
638589
|
theme.symbols.info,
|
|
@@ -637548,8 +638600,8 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
|
|
|
637548
638600
|
}, undefined, true, undefined, this);
|
|
637549
638601
|
};
|
|
637550
638602
|
if (!skipRender) {
|
|
637551
|
-
render_default(/* @__PURE__ */
|
|
637552
|
-
children: /* @__PURE__ */
|
|
638603
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ThemeProvider, {
|
|
638604
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ValidationErrors2, {}, undefined, false, undefined, this)
|
|
637553
638605
|
}, undefined, false, undefined, this));
|
|
637554
638606
|
}
|
|
637555
638607
|
if (hasErrors && exitOnError) {
|
|
@@ -637558,37 +638610,37 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
|
|
|
637558
638610
|
}
|
|
637559
638611
|
return { ...validationResult, errors: allErrors, warnings: allWarnings };
|
|
637560
638612
|
}
|
|
637561
|
-
var
|
|
638613
|
+
var jsx_dev_runtime20, AgentNotLinkedError = () => {
|
|
637562
638614
|
const theme = useTheme();
|
|
637563
|
-
return /* @__PURE__ */
|
|
638615
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637564
638616
|
flexDirection: "column",
|
|
637565
638617
|
paddingY: 1,
|
|
637566
638618
|
children: [
|
|
637567
|
-
/* @__PURE__ */
|
|
638619
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637568
638620
|
color: theme.status.error,
|
|
637569
638621
|
children: [
|
|
637570
638622
|
theme.symbols.cross,
|
|
637571
638623
|
" Agent not linked to a bot"
|
|
637572
638624
|
]
|
|
637573
638625
|
}, undefined, true, undefined, this),
|
|
637574
|
-
/* @__PURE__ */
|
|
638626
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637575
638627
|
marginTop: 1,
|
|
637576
|
-
children: /* @__PURE__ */
|
|
638628
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637577
638629
|
color: theme.text.dim,
|
|
637578
638630
|
children: "Your local agent needs to be linked to a remote bot."
|
|
637579
638631
|
}, undefined, false, undefined, this)
|
|
637580
638632
|
}, undefined, false, undefined, this),
|
|
637581
|
-
/* @__PURE__ */
|
|
638633
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637582
638634
|
marginTop: 1,
|
|
637583
|
-
children: /* @__PURE__ */
|
|
638635
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637584
638636
|
color: theme.text.dim,
|
|
637585
638637
|
children: "Run the following command to link it:"
|
|
637586
638638
|
}, undefined, false, undefined, this)
|
|
637587
638639
|
}, undefined, false, undefined, this),
|
|
637588
|
-
/* @__PURE__ */
|
|
638640
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
637589
638641
|
marginLeft: 2,
|
|
637590
638642
|
marginTop: 1,
|
|
637591
|
-
children: /* @__PURE__ */
|
|
638643
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
637592
638644
|
color: theme.syntax.keyword,
|
|
637593
638645
|
children: "adk link"
|
|
637594
638646
|
}, undefined, false, undefined, this)
|
|
@@ -637600,7 +638652,7 @@ var init_assert_valid_project = __esm(async () => {
|
|
|
637600
638652
|
init_dist15();
|
|
637601
638653
|
init_theme();
|
|
637602
638654
|
await init_build2();
|
|
637603
|
-
|
|
638655
|
+
jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
|
|
637604
638656
|
});
|
|
637605
638657
|
|
|
637606
638658
|
// src/utils/CriticalError.ts
|
|
@@ -637619,15 +638671,15 @@ var init_CriticalError = __esm(() => {
|
|
|
637619
638671
|
});
|
|
637620
638672
|
|
|
637621
638673
|
// src/utils/runtime-version-check.ts
|
|
637622
|
-
import { readFileSync as
|
|
637623
|
-
import { join as
|
|
638674
|
+
import { readFileSync as readFileSync9, existsSync as existsSync9 } from "fs";
|
|
638675
|
+
import { join as join11 } from "path";
|
|
637624
638676
|
function getInstalledRuntimeVersion(agentRoot) {
|
|
637625
638677
|
try {
|
|
637626
|
-
const runtimePackagePath =
|
|
638678
|
+
const runtimePackagePath = join11(agentRoot, "node_modules", "@botpress", "runtime", "package.json");
|
|
637627
638679
|
if (!existsSync9(runtimePackagePath)) {
|
|
637628
638680
|
return null;
|
|
637629
638681
|
}
|
|
637630
|
-
const packageJson = JSON.parse(
|
|
638682
|
+
const packageJson = JSON.parse(readFileSync9(runtimePackagePath, "utf-8"));
|
|
637631
638683
|
return packageJson.version;
|
|
637632
638684
|
} catch {
|
|
637633
638685
|
return null;
|
|
@@ -637672,7 +638724,7 @@ function checkRuntimeVersion(agentRoot) {
|
|
|
637672
638724
|
`));
|
|
637673
638725
|
}
|
|
637674
638726
|
}
|
|
637675
|
-
var semver2, EXPECTED_RUNTIME_VERSION = "1.7.
|
|
638727
|
+
var semver2, EXPECTED_RUNTIME_VERSION = "1.7.12";
|
|
637676
638728
|
var init_runtime_version_check = __esm(() => {
|
|
637677
638729
|
init_source();
|
|
637678
638730
|
semver2 = __toESM(require_semver2(), 1);
|
|
@@ -637706,8 +638758,8 @@ function updateWorkerStats(stats) {
|
|
|
637706
638758
|
var serverConfig, serverStartTime, devCommandStatus = "running", latestWorkerStats = null;
|
|
637707
638759
|
|
|
637708
638760
|
// src/utils/trace-reader.ts
|
|
637709
|
-
import { existsSync as existsSync10, readFileSync as
|
|
637710
|
-
import { join as
|
|
638761
|
+
import { existsSync as existsSync10, readFileSync as readFileSync10 } from "fs";
|
|
638762
|
+
import { join as join12 } from "path";
|
|
637711
638763
|
import { Transform as Transform3 } from "stream";
|
|
637712
638764
|
|
|
637713
638765
|
class TraceReader {
|
|
@@ -637716,10 +638768,10 @@ class TraceReader {
|
|
|
637716
638768
|
indexDir;
|
|
637717
638769
|
liveFile;
|
|
637718
638770
|
constructor(agentPath) {
|
|
637719
|
-
this.traceDir = agentPath ?
|
|
637720
|
-
this.byTraceDir =
|
|
637721
|
-
this.indexDir =
|
|
637722
|
-
this.liveFile =
|
|
638771
|
+
this.traceDir = agentPath ? join12(agentPath, ".adk", "bot", "traces") : process.env.TRACE_DIR ?? "traces";
|
|
638772
|
+
this.byTraceDir = join12(this.traceDir, "by-trace");
|
|
638773
|
+
this.indexDir = join12(this.traceDir, "index");
|
|
638774
|
+
this.liveFile = join12(this.traceDir, "live.ndjson");
|
|
637723
638775
|
}
|
|
637724
638776
|
async getTraceByWorkflowId(workflowId) {
|
|
637725
638777
|
return this.getTraceByAttribute("workflowId", workflowId);
|
|
@@ -637731,7 +638783,7 @@ class TraceReader {
|
|
|
637731
638783
|
if (indexedAttributes.includes(attributeName)) {
|
|
637732
638784
|
const indexFile2 = this.getIndexFile();
|
|
637733
638785
|
if (existsSync10(indexFile2)) {
|
|
637734
|
-
const lines =
|
|
638786
|
+
const lines = readFileSync10(indexFile2, "utf-8").split(`
|
|
637735
638787
|
`).filter(Boolean);
|
|
637736
638788
|
for (let i2 = lines.length - 1;i2 >= 0; i2--) {
|
|
637737
638789
|
try {
|
|
@@ -637751,7 +638803,7 @@ class TraceReader {
|
|
|
637751
638803
|
} else {
|
|
637752
638804
|
const dayFile2 = this.getDayFile();
|
|
637753
638805
|
if (existsSync10(dayFile2)) {
|
|
637754
|
-
const lines =
|
|
638806
|
+
const lines = readFileSync10(dayFile2, "utf-8").split(`
|
|
637755
638807
|
`).filter(Boolean);
|
|
637756
638808
|
for (let i2 = lines.length - 1;i2 >= 0; i2--) {
|
|
637757
638809
|
try {
|
|
@@ -637770,9 +638822,9 @@ class TraceReader {
|
|
|
637770
638822
|
}
|
|
637771
638823
|
}
|
|
637772
638824
|
for (const traceId of relatedTraceIds) {
|
|
637773
|
-
const traceFile =
|
|
638825
|
+
const traceFile = join12(this.byTraceDir, `${traceId}.ndjson`);
|
|
637774
638826
|
if (existsSync10(traceFile)) {
|
|
637775
|
-
const traceLines =
|
|
638827
|
+
const traceLines = readFileSync10(traceFile, "utf-8").split(`
|
|
637776
638828
|
`).filter(Boolean);
|
|
637777
638829
|
for (const line of traceLines) {
|
|
637778
638830
|
try {
|
|
@@ -637785,9 +638837,9 @@ class TraceReader {
|
|
|
637785
638837
|
}
|
|
637786
638838
|
async getTraceById(traceId) {
|
|
637787
638839
|
const spans = [];
|
|
637788
|
-
const traceFile =
|
|
638840
|
+
const traceFile = join12(this.byTraceDir, `${traceId}.ndjson`);
|
|
637789
638841
|
if (existsSync10(traceFile)) {
|
|
637790
|
-
const lines =
|
|
638842
|
+
const lines = readFileSync10(traceFile, "utf-8").split(`
|
|
637791
638843
|
`).filter(Boolean);
|
|
637792
638844
|
for (const line of lines) {
|
|
637793
638845
|
try {
|
|
@@ -637801,7 +638853,7 @@ class TraceReader {
|
|
|
637801
638853
|
const spans = [];
|
|
637802
638854
|
const dayFile2 = this.getDayFile();
|
|
637803
638855
|
if (existsSync10(dayFile2)) {
|
|
637804
|
-
const lines =
|
|
638856
|
+
const lines = readFileSync10(dayFile2, "utf-8").split(`
|
|
637805
638857
|
`).filter(Boolean);
|
|
637806
638858
|
const recentLines = lines.slice(-limit);
|
|
637807
638859
|
for (const line of recentLines) {
|
|
@@ -637816,7 +638868,7 @@ class TraceReader {
|
|
|
637816
638868
|
const spans = [];
|
|
637817
638869
|
const dayFile2 = this.getDayFile();
|
|
637818
638870
|
if (existsSync10(dayFile2)) {
|
|
637819
|
-
const lines =
|
|
638871
|
+
const lines = readFileSync10(dayFile2, "utf-8").split(`
|
|
637820
638872
|
`).filter(Boolean);
|
|
637821
638873
|
for (const line of lines) {
|
|
637822
638874
|
try {
|
|
@@ -637840,7 +638892,7 @@ class TraceReader {
|
|
|
637840
638892
|
try {
|
|
637841
638893
|
const stats = existsSync10(this.liveFile) ? __require("fs").statSync(this.liveFile) : null;
|
|
637842
638894
|
if (stats && stats.size > lastSize) {
|
|
637843
|
-
const newContent =
|
|
638895
|
+
const newContent = readFileSync10(this.liveFile, "utf-8");
|
|
637844
638896
|
const lines = newContent.split(`
|
|
637845
638897
|
`);
|
|
637846
638898
|
const newLines = lines.slice(Math.max(0, lines.length - 10));
|
|
@@ -637961,11 +639013,11 @@ data: ${JSON.stringify({ type: "update", span: span2 })}
|
|
|
637961
639013
|
}
|
|
637962
639014
|
getDayFile(date = new Date) {
|
|
637963
639015
|
const dateStr = date.toISOString().slice(0, 10);
|
|
637964
|
-
return
|
|
639016
|
+
return join12(this.traceDir, `${dateStr}.ndjson`);
|
|
637965
639017
|
}
|
|
637966
639018
|
getIndexFile(date = new Date) {
|
|
637967
639019
|
const dateStr = date.toISOString().slice(0, 10);
|
|
637968
|
-
return
|
|
639020
|
+
return join12(this.indexDir, `${dateStr}.ndjson`);
|
|
637969
639021
|
}
|
|
637970
639022
|
}
|
|
637971
639023
|
var init_trace_reader = () => {};
|
|
@@ -638071,14 +639123,14 @@ var init_validation2 = __esm(() => {
|
|
|
638071
639123
|
});
|
|
638072
639124
|
|
|
638073
639125
|
// src/server/handlers/health.ts
|
|
638074
|
-
import { existsSync as existsSync11, readFileSync as
|
|
638075
|
-
import { join as
|
|
639126
|
+
import { existsSync as existsSync11, readFileSync as readFileSync11 } from "fs";
|
|
639127
|
+
import { join as join13 } from "path";
|
|
638076
639128
|
async function handleHealth() {
|
|
638077
639129
|
let adkVersion = "unknown";
|
|
638078
639130
|
try {
|
|
638079
|
-
const adkPackagePath =
|
|
639131
|
+
const adkPackagePath = join13(process.cwd(), "node_modules/@botpress/adk/package.json");
|
|
638080
639132
|
if (existsSync11(adkPackagePath)) {
|
|
638081
|
-
const pkg = JSON.parse(
|
|
639133
|
+
const pkg = JSON.parse(readFileSync11(adkPackagePath, "utf-8"));
|
|
638082
639134
|
adkVersion = pkg.version;
|
|
638083
639135
|
}
|
|
638084
639136
|
} catch {}
|
|
@@ -638127,18 +639179,18 @@ var init_worker_stats = __esm(() => {
|
|
|
638127
639179
|
});
|
|
638128
639180
|
|
|
638129
639181
|
// src/server/handlers/agent.ts
|
|
638130
|
-
import { existsSync as existsSync12, readFileSync as
|
|
638131
|
-
import { join as
|
|
639182
|
+
import { existsSync as existsSync12, readFileSync as readFileSync12 } from "fs";
|
|
639183
|
+
import { join as join14 } from "path";
|
|
638132
639184
|
function handleAgentInfo() {
|
|
638133
639185
|
const serverConfig2 = getServerConfig();
|
|
638134
639186
|
if (!serverConfig2.project) {
|
|
638135
|
-
const agentConfigPath =
|
|
638136
|
-
const agentJsonPath =
|
|
639187
|
+
const agentConfigPath = join14(serverConfig2.agentPath, "agent.config.ts");
|
|
639188
|
+
const agentJsonPath = join14(serverConfig2.agentPath, "agent.json");
|
|
638137
639189
|
let agentInfo = {
|
|
638138
639190
|
path: serverConfig2.agentPath
|
|
638139
639191
|
};
|
|
638140
639192
|
if (existsSync12(agentConfigPath)) {
|
|
638141
|
-
const configContent =
|
|
639193
|
+
const configContent = readFileSync12(agentConfigPath, "utf-8");
|
|
638142
639194
|
const nameMatch = configContent.match(/name:\s*['"`]([^'"`]+)['"`]/);
|
|
638143
639195
|
const versionMatch = configContent.match(/version:\s*['"`]([^'"`]+)['"`]/);
|
|
638144
639196
|
agentInfo.name = nameMatch?.[1] || "unknown";
|
|
@@ -638146,7 +639198,7 @@ function handleAgentInfo() {
|
|
|
638146
639198
|
}
|
|
638147
639199
|
if (existsSync12(agentJsonPath)) {
|
|
638148
639200
|
try {
|
|
638149
|
-
const agentJson = JSON.parse(
|
|
639201
|
+
const agentJson = JSON.parse(readFileSync12(agentJsonPath, "utf-8"));
|
|
638150
639202
|
agentInfo = { ...agentInfo, ...agentJson };
|
|
638151
639203
|
} catch {}
|
|
638152
639204
|
}
|
|
@@ -641332,16 +642384,16 @@ function getContentType(pathname) {
|
|
|
641332
642384
|
}
|
|
641333
642385
|
|
|
641334
642386
|
// src/server/routes/static.ts
|
|
641335
|
-
import { readFileSync as
|
|
641336
|
-
import { join as
|
|
641337
|
-
import
|
|
642387
|
+
import { readFileSync as readFileSync13, existsSync as existsSync14 } from "fs";
|
|
642388
|
+
import { join as join15, resolve as resolve4 } from "path";
|
|
642389
|
+
import path40 from "path";
|
|
641338
642390
|
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
641339
642391
|
function getUIDistPath() {
|
|
641340
642392
|
const __filename2 = fileURLToPath8(import.meta.url);
|
|
641341
|
-
const __dirname5 =
|
|
642393
|
+
const __dirname5 = path40.dirname(__filename2);
|
|
641342
642394
|
const isBinary = !__filename2.endsWith(".js") && !__filename2.endsWith(".ts");
|
|
641343
642395
|
if (isBinary) {
|
|
641344
|
-
const execDir =
|
|
642396
|
+
const execDir = path40.dirname(process.execPath);
|
|
641345
642397
|
return resolve4(execDir, "assets/ui-dist");
|
|
641346
642398
|
} else {
|
|
641347
642399
|
const isCompiledDist = __filename2.includes("/dist/");
|
|
@@ -641362,9 +642414,9 @@ function serveStaticFile(pathname, uiDistPath) {
|
|
|
641362
642414
|
});
|
|
641363
642415
|
}
|
|
641364
642416
|
}
|
|
641365
|
-
const indexPath2 =
|
|
642417
|
+
const indexPath2 = join15(uiDistPath, "index.html");
|
|
641366
642418
|
if (existsSync14(indexPath2)) {
|
|
641367
|
-
return new Response(
|
|
642419
|
+
return new Response(readFileSync13(indexPath2), {
|
|
641368
642420
|
headers: {
|
|
641369
642421
|
"Content-Type": "text/html",
|
|
641370
642422
|
...headers
|
|
@@ -641387,12 +642439,12 @@ function serveStaticFile(pathname, uiDistPath) {
|
|
|
641387
642439
|
});
|
|
641388
642440
|
}
|
|
641389
642441
|
}
|
|
641390
|
-
let filePath =
|
|
642442
|
+
let filePath = join15(uiDistPath, pathname);
|
|
641391
642443
|
if (pathname.startsWith("/assets/")) {
|
|
641392
|
-
filePath =
|
|
642444
|
+
filePath = join15(uiDistPath, pathname);
|
|
641393
642445
|
}
|
|
641394
642446
|
if (existsSync14(filePath)) {
|
|
641395
|
-
const file =
|
|
642447
|
+
const file = readFileSync13(filePath);
|
|
641396
642448
|
return new Response(file, {
|
|
641397
642449
|
headers: {
|
|
641398
642450
|
"Content-Type": getContentType(pathname),
|
|
@@ -641411,9 +642463,9 @@ function serveStaticFile(pathname, uiDistPath) {
|
|
|
641411
642463
|
});
|
|
641412
642464
|
}
|
|
641413
642465
|
}
|
|
641414
|
-
const indexPath =
|
|
642466
|
+
const indexPath = join15(uiDistPath, "index.html");
|
|
641415
642467
|
if (existsSync14(indexPath)) {
|
|
641416
|
-
return new Response(
|
|
642468
|
+
return new Response(readFileSync13(indexPath), {
|
|
641417
642469
|
headers: {
|
|
641418
642470
|
"Content-Type": "text/html",
|
|
641419
642471
|
...headers
|
|
@@ -641480,10 +642532,10 @@ var init_server = __esm(() => {
|
|
|
641480
642532
|
|
|
641481
642533
|
// src/utils/node-inspector.ts
|
|
641482
642534
|
import { spawn as spawn3 } from "child_process";
|
|
641483
|
-
import
|
|
641484
|
-
import
|
|
642535
|
+
import os11 from "os";
|
|
642536
|
+
import path41 from "path";
|
|
641485
642537
|
function openDevtools(url3) {
|
|
641486
|
-
const platform4 =
|
|
642538
|
+
const platform4 = os11.platform();
|
|
641487
642539
|
if (platform4 === "darwin") {
|
|
641488
642540
|
return spawn3("open", ["-a", "Google Chrome", url3], {
|
|
641489
642541
|
detached: true,
|
|
@@ -641500,9 +642552,9 @@ function openDevtools(url3) {
|
|
|
641500
642552
|
}).unref();
|
|
641501
642553
|
};
|
|
641502
642554
|
const candidates = [
|
|
641503
|
-
|
|
641504
|
-
|
|
641505
|
-
|
|
642555
|
+
path41.join(process.env["ProgramFiles"] ?? "", "Google/Chrome/Application/chrome.exe"),
|
|
642556
|
+
path41.join(process.env["ProgramFiles(x86)"] ?? "", "Google/Chrome/Application/chrome.exe"),
|
|
642557
|
+
path41.join(process.env["LocalAppData"] ?? "", "Google/Chrome/Application/chrome.exe")
|
|
641506
642558
|
].filter(Boolean);
|
|
641507
642559
|
return tryStart(candidates.find(() => true));
|
|
641508
642560
|
}
|
|
@@ -641601,12 +642653,12 @@ var init_debugger = __esm(() => {
|
|
|
641601
642653
|
});
|
|
641602
642654
|
|
|
641603
642655
|
// src/utils/inspector-pid-cache.ts
|
|
641604
|
-
import { existsSync as existsSync15, readFileSync as
|
|
641605
|
-
import { join as
|
|
642656
|
+
import { existsSync as existsSync15, readFileSync as readFileSync14, writeFileSync as writeFileSync4, mkdirSync as mkdirSync2 } from "fs";
|
|
642657
|
+
import { join as join16 } from "path";
|
|
641606
642658
|
function getCachePath(agentRoot) {
|
|
641607
|
-
const adkDir =
|
|
642659
|
+
const adkDir = join16(agentRoot, ".adk");
|
|
641608
642660
|
mkdirSync2(adkDir, { recursive: true });
|
|
641609
|
-
return
|
|
642661
|
+
return join16(adkDir, "inspector-pids.json");
|
|
641610
642662
|
}
|
|
641611
642663
|
function readCache2(agentRoot) {
|
|
641612
642664
|
const cachePath = getCachePath(agentRoot);
|
|
@@ -641614,7 +642666,7 @@ function readCache2(agentRoot) {
|
|
|
641614
642666
|
return { pids: [] };
|
|
641615
642667
|
}
|
|
641616
642668
|
try {
|
|
641617
|
-
const content =
|
|
642669
|
+
const content = readFileSync14(cachePath, "utf-8");
|
|
641618
642670
|
return JSON.parse(content);
|
|
641619
642671
|
} catch {
|
|
641620
642672
|
return { pids: [] };
|
|
@@ -641662,7 +642714,7 @@ __export(exports_adk_dev, {
|
|
|
641662
642714
|
adkDev: () => adkDev
|
|
641663
642715
|
});
|
|
641664
642716
|
import { createWriteStream as createWriteStream3, mkdirSync as mkdirSync3 } from "fs";
|
|
641665
|
-
import
|
|
642717
|
+
import path44 from "path";
|
|
641666
642718
|
async function adkDev(port = "3000", options = {
|
|
641667
642719
|
ui: true,
|
|
641668
642720
|
logs: false
|
|
@@ -641681,10 +642733,10 @@ async function adkDev(port = "3000", options = {
|
|
|
641681
642733
|
const dateStr = now2.toISOString().replace(/[:.]/g, "-").split("T")[0];
|
|
641682
642734
|
const timeStr = now2.toTimeString().split(" ")[0].replace(/:/g, "-");
|
|
641683
642735
|
const logFileName = `adk-dev-${dateStr}-${timeStr}.log`;
|
|
641684
|
-
const logsDir =
|
|
642736
|
+
const logsDir = path44.join(agentRoot, ".adk", "logs");
|
|
641685
642737
|
mkdirSync3(logsDir, { recursive: true });
|
|
641686
|
-
const logFilePath =
|
|
641687
|
-
const { unmount, waitUntilExit } = render_default(/* @__PURE__ */
|
|
642738
|
+
const logFilePath = path44.join(logsDir, logFileName);
|
|
642739
|
+
const { unmount, waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(DevUI, {
|
|
641688
642740
|
port,
|
|
641689
642741
|
portConsole,
|
|
641690
642742
|
options,
|
|
@@ -641693,7 +642745,7 @@ async function adkDev(port = "3000", options = {
|
|
|
641693
642745
|
}, undefined, false, undefined, this));
|
|
641694
642746
|
await waitUntilExit();
|
|
641695
642747
|
}
|
|
641696
|
-
var import_react38,
|
|
642748
|
+
var import_react38, jsx_dev_runtime21, DevUI = ({ port, portConsole, options, logFilePath, onReady }) => {
|
|
641697
642749
|
const [project, setProject] = import_react38.useState();
|
|
641698
642750
|
const [workspace, setWorkspace] = import_react38.useState();
|
|
641699
642751
|
const [uiServer, setUiServer] = import_react38.useState();
|
|
@@ -641707,10 +642759,18 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
641707
642759
|
const [runningEditor, setRunningEditor] = import_react38.useState(null);
|
|
641708
642760
|
const [viewMode, setViewMode] = import_react38.useState("summary");
|
|
641709
642761
|
const [workerStats, setWorkerStats] = import_react38.useState();
|
|
642762
|
+
const [showPreflightModal, setShowPreflightModal] = import_react38.useState(false);
|
|
642763
|
+
const [preflightState, setPreflightState] = import_react38.useState();
|
|
642764
|
+
const [isInitialPreflight, setIsInitialPreflight] = import_react38.useState(false);
|
|
642765
|
+
const [continueInitialization, setContinueInitialization] = import_react38.useState(false);
|
|
641710
642766
|
const debuggerRef = import_react38.useRef({
|
|
641711
642767
|
port: parseInt(port),
|
|
641712
642768
|
isActive: false
|
|
641713
642769
|
});
|
|
642770
|
+
const preflightRef = import_react38.useRef({
|
|
642771
|
+
initialPreflightDone: false,
|
|
642772
|
+
isCheckingPreflight: false
|
|
642773
|
+
});
|
|
641714
642774
|
import_react38.useEffect(() => {
|
|
641715
642775
|
debuggerRef.current.port = botPort;
|
|
641716
642776
|
}, [botPort]);
|
|
@@ -641782,6 +642842,32 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
641782
642842
|
const handleToggleView = () => {
|
|
641783
642843
|
setViewMode((prev) => prev === "summary" ? "logs" : "summary");
|
|
641784
642844
|
};
|
|
642845
|
+
const handlePreflightApprove = async () => {
|
|
642846
|
+
addActivity("\u2713 Changes approved", "success");
|
|
642847
|
+
setShowPreflightModal(false);
|
|
642848
|
+
if (preflightState) {
|
|
642849
|
+
try {
|
|
642850
|
+
await preflightState.apply({
|
|
642851
|
+
onProgress: (message3) => addActivity(message3),
|
|
642852
|
+
onSuccess: (message3) => addActivity(`\u2713 ${message3}`, "success"),
|
|
642853
|
+
onError: (message3) => addActivity(message3, "error")
|
|
642854
|
+
});
|
|
642855
|
+
} catch (error) {
|
|
642856
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
642857
|
+
addActivity(`Failed to apply changes: ${errorMsg}`, "error");
|
|
642858
|
+
}
|
|
642859
|
+
}
|
|
642860
|
+
if (isInitialPreflight) {
|
|
642861
|
+
setIsInitialPreflight(false);
|
|
642862
|
+
setContinueInitialization(true);
|
|
642863
|
+
}
|
|
642864
|
+
setPreflightState(undefined);
|
|
642865
|
+
};
|
|
642866
|
+
const handlePreflightCancel = () => {
|
|
642867
|
+
addActivity("Preflight check cancelled", "warn");
|
|
642868
|
+
setShowPreflightModal(false);
|
|
642869
|
+
setPreflightState(undefined);
|
|
642870
|
+
};
|
|
641785
642871
|
import_react38.useEffect(() => {
|
|
641786
642872
|
if (criticalError) {
|
|
641787
642873
|
const timer = setTimeout(() => {
|
|
@@ -641790,6 +642876,15 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
641790
642876
|
return () => clearTimeout(timer);
|
|
641791
642877
|
}
|
|
641792
642878
|
}, [criticalError]);
|
|
642879
|
+
import_react38.useEffect(() => {
|
|
642880
|
+
if (showPreflightModal) {
|
|
642881
|
+
const timeoutId = setTimeout(() => {
|
|
642882
|
+
addActivity("Preflight approval timed out (5 minutes) - modal closed", "warn");
|
|
642883
|
+
setShowPreflightModal(false);
|
|
642884
|
+
}, 5 * 60 * 1000);
|
|
642885
|
+
return () => clearTimeout(timeoutId);
|
|
642886
|
+
}
|
|
642887
|
+
}, [showPreflightModal]);
|
|
641793
642888
|
const initializeProject2 = async () => {
|
|
641794
642889
|
addActivity("Loading project...");
|
|
641795
642890
|
const agentRoot = await findAgentRootOrFail(process.cwd());
|
|
@@ -641809,7 +642904,7 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
641809
642904
|
};
|
|
641810
642905
|
const setupLogging = () => {
|
|
641811
642906
|
const agentRoot = debuggerRef.current.agentRoot;
|
|
641812
|
-
const logsDir =
|
|
642907
|
+
const logsDir = path44.join(agentRoot, ".adk", "logs");
|
|
641813
642908
|
mkdirSync3(logsDir, { recursive: true });
|
|
641814
642909
|
const logStream = createWriteStream3(logFilePath, { flags: "a" });
|
|
641815
642910
|
return logStream;
|
|
@@ -641826,7 +642921,7 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
641826
642921
|
};
|
|
641827
642922
|
const generateBot = async (agentProject2) => {
|
|
641828
642923
|
addActivity("Generating bot project...");
|
|
641829
|
-
const botPath =
|
|
642924
|
+
const botPath = path44.join(agentProject2.path, ".adk", "bot");
|
|
641830
642925
|
await generateBotProject({
|
|
641831
642926
|
projectPath: agentProject2.path,
|
|
641832
642927
|
outputPath: botPath
|
|
@@ -642170,7 +643265,7 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
642170
643265
|
});
|
|
642171
643266
|
}
|
|
642172
643267
|
};
|
|
642173
|
-
const setupFileWatcher = (agentProject2, botPath) => {
|
|
643268
|
+
const setupFileWatcher = (agentProject2, botPath, botIdForSync) => {
|
|
642174
643269
|
addActivity("Watching for changes...", "success");
|
|
642175
643270
|
const fileWatcher = new FileWatcher2({
|
|
642176
643271
|
projectPath: agentProject2.path,
|
|
@@ -642202,6 +643297,37 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
642202
643297
|
await agentProject2.reload();
|
|
642203
643298
|
setProjectVersion((v2) => v2 + 1);
|
|
642204
643299
|
addActivity("Agent project reloaded", "success");
|
|
643300
|
+
if (botIdForSync && !preflightRef.current.isCheckingPreflight) {
|
|
643301
|
+
preflightRef.current.isCheckingPreflight = true;
|
|
643302
|
+
try {
|
|
643303
|
+
addActivity("Running preflight checks...");
|
|
643304
|
+
const checker = new PreflightChecker(agentProject2.path);
|
|
643305
|
+
const pending = await checker.checkWithPendingApply(botIdForSync);
|
|
643306
|
+
if (pending.result.hasChanges) {
|
|
643307
|
+
setPreflightState(pending);
|
|
643308
|
+
if (!showPreflightModal) {
|
|
643309
|
+
setShowPreflightModal(true);
|
|
643310
|
+
addActivity("Preflight check completed - awaiting confirmation", "warn");
|
|
643311
|
+
} else {
|
|
643312
|
+
addActivity("Changes updated - modal refreshed", "info");
|
|
643313
|
+
}
|
|
643314
|
+
return;
|
|
643315
|
+
} else {
|
|
643316
|
+
if (showPreflightModal) {
|
|
643317
|
+
addActivity("\u2713 Changes reverted - no sync needed", "success");
|
|
643318
|
+
} else {
|
|
643319
|
+
addActivity("\u2713 No changes detected", "success");
|
|
643320
|
+
}
|
|
643321
|
+
setShowPreflightModal(false);
|
|
643322
|
+
setPreflightState(undefined);
|
|
643323
|
+
}
|
|
643324
|
+
} catch (error) {
|
|
643325
|
+
addActivity(`Preflight check failed: ${error.message}`, "error");
|
|
643326
|
+
return;
|
|
643327
|
+
} finally {
|
|
643328
|
+
preflightRef.current.isCheckingPreflight = false;
|
|
643329
|
+
}
|
|
643330
|
+
}
|
|
642205
643331
|
addActivity("Regenerating bot project...");
|
|
642206
643332
|
await generateBotProject({
|
|
642207
643333
|
projectPath: agentProject2.path,
|
|
@@ -642276,10 +643402,35 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
642276
643402
|
if (!botIdForSync) {
|
|
642277
643403
|
throw new CriticalError("Failed to obtain dev bot ID", "The development bot ID could not be detected after 30 seconds. Please check the logs for errors.");
|
|
642278
643404
|
}
|
|
643405
|
+
let shouldContinueWithBotGeneration = true;
|
|
643406
|
+
const botIdForInitialCheck = agentProject2.agentInfo?.devId || agentProject2.agentInfo?.botId;
|
|
643407
|
+
if (botIdForInitialCheck && !preflightRef.current.initialPreflightDone) {
|
|
643408
|
+
preflightRef.current.initialPreflightDone = true;
|
|
643409
|
+
addActivity("Running initial preflight checks...");
|
|
643410
|
+
try {
|
|
643411
|
+
const checker = new PreflightChecker(agentProject2.path);
|
|
643412
|
+
const pending = await checker.checkWithPendingApply(botIdForInitialCheck);
|
|
643413
|
+
if (pending.result.hasChanges) {
|
|
643414
|
+
setPreflightState(pending);
|
|
643415
|
+
setShowPreflightModal(true);
|
|
643416
|
+
setIsInitialPreflight(true);
|
|
643417
|
+
addActivity("Initial preflight check - awaiting confirmation", "warn");
|
|
643418
|
+
shouldContinueWithBotGeneration = false;
|
|
643419
|
+
} else {
|
|
643420
|
+
addActivity("\u2713 No preflight changes detected", "success");
|
|
643421
|
+
}
|
|
643422
|
+
} catch (error) {
|
|
643423
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
643424
|
+
addActivity(`Initial preflight check failed: ${errorMsg}`, "error");
|
|
643425
|
+
}
|
|
643426
|
+
}
|
|
643427
|
+
if (!shouldContinueWithBotGeneration) {
|
|
643428
|
+
return;
|
|
643429
|
+
}
|
|
642279
643430
|
const uiServerInstance = await startUiServer(agentProject2, credentials, workspaceId, botIdForSync);
|
|
642280
643431
|
await syncTables(agentProject2, botIdForSync);
|
|
642281
643432
|
await checkIntegrations(agentProject2, botIdForSync);
|
|
642282
|
-
const fileWatcher = setupFileWatcher(agentProject2, botPath);
|
|
643433
|
+
const fileWatcher = setupFileWatcher(agentProject2, botPath, botIdForSync);
|
|
642283
643434
|
onReady?.();
|
|
642284
643435
|
if (options.logs) {
|
|
642285
643436
|
process.stderr.write(`
|
|
@@ -642305,9 +643456,13 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
642305
643456
|
}
|
|
642306
643457
|
};
|
|
642307
643458
|
runDev();
|
|
642308
|
-
}, [port, options, logFilePath, onReady]);
|
|
642309
|
-
return /* @__PURE__ */
|
|
642310
|
-
children:
|
|
643459
|
+
}, [port, options, logFilePath, onReady, continueInitialization]);
|
|
643460
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ThemeProvider, {
|
|
643461
|
+
children: showPreflightModal && preflightState ? /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(PreflightModal, {
|
|
643462
|
+
result: preflightState.result,
|
|
643463
|
+
onApprove: handlePreflightApprove,
|
|
643464
|
+
onCancel: handlePreflightCancel
|
|
643465
|
+
}, undefined, false, undefined, this) : viewMode === "summary" ? /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(DevStatus, {
|
|
642311
643466
|
project,
|
|
642312
643467
|
workspace,
|
|
642313
643468
|
uiServer,
|
|
@@ -642323,7 +643478,7 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
|
|
|
642323
643478
|
runningEditor,
|
|
642324
643479
|
onToggleView: handleToggleView,
|
|
642325
643480
|
workerStats
|
|
642326
|
-
}, projectVersion, false, undefined, this) : /* @__PURE__ */
|
|
643481
|
+
}, projectVersion, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(LogsView, {
|
|
642327
643482
|
logFilePath,
|
|
642328
643483
|
onToggleView: handleToggleView
|
|
642329
643484
|
}, undefined, false, undefined, this)
|
|
@@ -642345,10 +643500,11 @@ var init_adk_dev = __esm(async () => {
|
|
|
642345
643500
|
init_build2(),
|
|
642346
643501
|
init_DevStatus(),
|
|
642347
643502
|
init_LogsView(),
|
|
643503
|
+
init_PreflightModal(),
|
|
642348
643504
|
init_assert_valid_project()
|
|
642349
643505
|
]);
|
|
642350
643506
|
import_react38 = __toESM(require_react(), 1);
|
|
642351
|
-
|
|
643507
|
+
jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
|
|
642352
643508
|
});
|
|
642353
643509
|
|
|
642354
643510
|
// src/commands/adk-build.ts
|
|
@@ -642356,7 +643512,7 @@ var exports_adk_build = {};
|
|
|
642356
643512
|
__export(exports_adk_build, {
|
|
642357
643513
|
adkBuild: () => adkBuild
|
|
642358
643514
|
});
|
|
642359
|
-
import
|
|
643515
|
+
import path46 from "path";
|
|
642360
643516
|
async function adkBuild(options = {}) {
|
|
642361
643517
|
const { silent = false } = options;
|
|
642362
643518
|
const log2 = silent ? () => {} : console.log;
|
|
@@ -642382,7 +643538,7 @@ async function adkBuild(options = {}) {
|
|
|
642382
643538
|
log2(source_default.yellow("\u26A0\uFE0F No assets directory found, skipping asset type generation"));
|
|
642383
643539
|
}
|
|
642384
643540
|
log2(source_default.cyan("\uD83D\uDD28 Generating Botpress bot project..."));
|
|
642385
|
-
const botPath =
|
|
643541
|
+
const botPath = path46.join(project.path, ".adk", "bot");
|
|
642386
643542
|
await generateBotProject({
|
|
642387
643543
|
projectPath: project.path,
|
|
642388
643544
|
outputPath: botPath
|
|
@@ -642394,7 +643550,7 @@ async function adkBuild(options = {}) {
|
|
|
642394
643550
|
await buildCommand.output();
|
|
642395
643551
|
log2(source_default.green(`
|
|
642396
643552
|
\u2705 Build completed successfully!`));
|
|
642397
|
-
log2(source_default.gray(`\uD83D\uDCE6 Output directory: ${
|
|
643553
|
+
log2(source_default.gray(`\uD83D\uDCE6 Output directory: ${path46.join(botPath, ".botpress", "dist")}`));
|
|
642398
643554
|
log2(source_default.gray(`
|
|
642399
643555
|
Next steps:`));
|
|
642400
643556
|
log2(source_default.gray(" - Run `adk deploy` to deploy your agent"));
|
|
@@ -642456,8 +643612,22 @@ var exports_adk_deploy = {};
|
|
|
642456
643612
|
__export(exports_adk_deploy, {
|
|
642457
643613
|
adkDeploy: () => adkDeploy
|
|
642458
643614
|
});
|
|
642459
|
-
import
|
|
642460
|
-
|
|
643615
|
+
import path47 from "path";
|
|
643616
|
+
import readline from "readline";
|
|
643617
|
+
async function promptUserApproval() {
|
|
643618
|
+
const readlineInterface = readline.createInterface({
|
|
643619
|
+
input: process.stdin,
|
|
643620
|
+
output: process.stdout
|
|
643621
|
+
});
|
|
643622
|
+
return new Promise((resolve5) => {
|
|
643623
|
+
readlineInterface.question(PreflightFormatter.formatPrompt(), (answer2) => {
|
|
643624
|
+
readlineInterface.close();
|
|
643625
|
+
const normalized = answer2.trim().toLowerCase();
|
|
643626
|
+
resolve5(normalized === "y" || normalized === "yes");
|
|
643627
|
+
});
|
|
643628
|
+
});
|
|
643629
|
+
}
|
|
643630
|
+
async function adkDeploy(environment = "production", options = {}) {
|
|
642461
643631
|
console.log(source_default.blue("\uD83D\uDE80 Deploying ADK agent to Botpress..."));
|
|
642462
643632
|
console.log(source_default.gray(`Environment: ${environment}`));
|
|
642463
643633
|
try {
|
|
@@ -642474,9 +643644,35 @@ async function adkDeploy(environment = "production") {
|
|
|
642474
643644
|
if (!botId) {
|
|
642475
643645
|
throw new Error('No botId found in agent.json. Please run "adk link" to link your agent to a bot.');
|
|
642476
643646
|
}
|
|
643647
|
+
const checker = new PreflightChecker(agentRoot);
|
|
643648
|
+
const { result, applied } = await checker.checkAndApply(botId, {
|
|
643649
|
+
shouldApply: async (_result, formatted) => {
|
|
643650
|
+
console.log(formatted);
|
|
643651
|
+
if (options.autoApprove) {
|
|
643652
|
+
console.log(source_default.green(`\u2713 Auto-approved. Applying changes...
|
|
643653
|
+
`));
|
|
643654
|
+
return true;
|
|
643655
|
+
}
|
|
643656
|
+
return promptUserApproval();
|
|
643657
|
+
},
|
|
643658
|
+
callbacks: {
|
|
643659
|
+
onProgress: (msg) => console.log(source_default.cyan(`\uD83D\uDD04 ${msg}`)),
|
|
643660
|
+
onSuccess: (msg) => console.log(source_default.green(`\u2705 ${msg}`)),
|
|
643661
|
+
onError: (msg) => console.log(source_default.red(`\u274C ${msg}`))
|
|
643662
|
+
}
|
|
643663
|
+
});
|
|
643664
|
+
if (!result.hasChanges) {
|
|
643665
|
+
console.log(source_default.gray(`\u2713 No changes detected. Proceeding...
|
|
643666
|
+
`));
|
|
643667
|
+
} else if (!applied) {
|
|
643668
|
+
console.log(source_default.red(`
|
|
643669
|
+
\u2717 Deployment cancelled by user.
|
|
643670
|
+
`));
|
|
643671
|
+
return;
|
|
643672
|
+
}
|
|
642477
643673
|
const credentials = await auth.getAgentCredentials(agentRoot);
|
|
642478
643674
|
const workspaceId = credentials.workspaceId;
|
|
642479
|
-
const botPath =
|
|
643675
|
+
const botPath = path47.join(project.path, ".adk", "bot");
|
|
642480
643676
|
console.log(source_default.cyan(`
|
|
642481
643677
|
\uD83D\uDCE4 Deploying bot to Botpress...`));
|
|
642482
643678
|
const deployCommand = new BpDeployCommand({
|
|
@@ -642555,7 +643751,7 @@ __export(exports_adk_profiles, {
|
|
|
642555
643751
|
adkProfilesSet: () => adkProfilesSet,
|
|
642556
643752
|
adkProfilesList: () => adkProfilesList
|
|
642557
643753
|
});
|
|
642558
|
-
var import_react39,
|
|
643754
|
+
var import_react39, jsx_dev_runtime22, ProfilesListComponent = () => {
|
|
642559
643755
|
const [state, setState] = import_react39.useState({
|
|
642560
643756
|
profiles: [],
|
|
642561
643757
|
currentProfile: "",
|
|
@@ -642585,17 +643781,17 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
|
|
|
642585
643781
|
process.exit(0);
|
|
642586
643782
|
};
|
|
642587
643783
|
if (state.loading) {
|
|
642588
|
-
return /* @__PURE__ */
|
|
643784
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642589
643785
|
flexDirection: "column",
|
|
642590
|
-
children: /* @__PURE__ */
|
|
643786
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642591
643787
|
children: "Loading profiles..."
|
|
642592
643788
|
}, undefined, false, undefined, this)
|
|
642593
643789
|
}, undefined, false, undefined, this);
|
|
642594
643790
|
}
|
|
642595
643791
|
if (state.error) {
|
|
642596
|
-
return /* @__PURE__ */
|
|
643792
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642597
643793
|
flexDirection: "column",
|
|
642598
|
-
children: /* @__PURE__ */
|
|
643794
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642599
643795
|
color: Theme.colors.error,
|
|
642600
643796
|
children: [
|
|
642601
643797
|
"Error: ",
|
|
@@ -642605,14 +643801,14 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
|
|
|
642605
643801
|
}, undefined, false, undefined, this);
|
|
642606
643802
|
}
|
|
642607
643803
|
if (state.profiles.length === 0) {
|
|
642608
|
-
return /* @__PURE__ */
|
|
643804
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642609
643805
|
flexDirection: "column",
|
|
642610
643806
|
children: [
|
|
642611
|
-
/* @__PURE__ */
|
|
643807
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642612
643808
|
color: Theme.colors.warning,
|
|
642613
643809
|
children: "No profiles found."
|
|
642614
643810
|
}, undefined, false, undefined, this),
|
|
642615
|
-
/* @__PURE__ */
|
|
643811
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642616
643812
|
color: Theme.colors.muted,
|
|
642617
643813
|
dimColor: true,
|
|
642618
643814
|
children: "Use 'adk login' to create your first profile."
|
|
@@ -642620,15 +643816,15 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
|
|
|
642620
643816
|
]
|
|
642621
643817
|
}, undefined, true, undefined, this);
|
|
642622
643818
|
}
|
|
642623
|
-
return /* @__PURE__ */
|
|
643819
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642624
643820
|
flexDirection: "column",
|
|
642625
643821
|
children: [
|
|
642626
|
-
/* @__PURE__ */
|
|
643822
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642627
643823
|
bold: true,
|
|
642628
643824
|
color: Theme.colors.primary,
|
|
642629
643825
|
children: "Botpress ADK Profiles"
|
|
642630
643826
|
}, undefined, false, undefined, this),
|
|
642631
|
-
/* @__PURE__ */
|
|
643827
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642632
643828
|
color: Theme.colors.muted,
|
|
642633
643829
|
dimColor: true,
|
|
642634
643830
|
children: [
|
|
@@ -642636,19 +643832,19 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
|
|
|
642636
643832
|
state.currentProfile
|
|
642637
643833
|
]
|
|
642638
643834
|
}, undefined, true, undefined, this),
|
|
642639
|
-
/* @__PURE__ */
|
|
643835
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642640
643836
|
flexDirection: "column",
|
|
642641
643837
|
marginTop: 1,
|
|
642642
643838
|
children: state.profiles.map((profile) => {
|
|
642643
643839
|
const isCurrent = profile.name === state.currentProfile;
|
|
642644
643840
|
const userDisplay = profile.displayName ? `${profile.displayName} (${profile.email})` : profile.email || "Unknown user";
|
|
642645
|
-
return /* @__PURE__ */
|
|
643841
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642646
643842
|
marginBottom: 1,
|
|
642647
643843
|
flexDirection: "column",
|
|
642648
643844
|
children: [
|
|
642649
|
-
/* @__PURE__ */
|
|
643845
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642650
643846
|
children: [
|
|
642651
|
-
/* @__PURE__ */
|
|
643847
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642652
643848
|
color: isCurrent ? Theme.colors.success : Theme.colors.primary,
|
|
642653
643849
|
bold: isCurrent,
|
|
642654
643850
|
children: [
|
|
@@ -642656,7 +643852,7 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
|
|
|
642656
643852
|
profile.name
|
|
642657
643853
|
]
|
|
642658
643854
|
}, undefined, true, undefined, this),
|
|
642659
|
-
isCurrent && /* @__PURE__ */
|
|
643855
|
+
isCurrent && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642660
643856
|
color: Theme.colors.success,
|
|
642661
643857
|
dimColor: true,
|
|
642662
643858
|
children: [
|
|
@@ -642666,23 +643862,23 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
|
|
|
642666
643862
|
}, undefined, true, undefined, this)
|
|
642667
643863
|
]
|
|
642668
643864
|
}, undefined, true, undefined, this),
|
|
642669
|
-
/* @__PURE__ */
|
|
643865
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642670
643866
|
paddingLeft: 2,
|
|
642671
|
-
children: /* @__PURE__ */
|
|
643867
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642672
643868
|
color: Theme.colors.text,
|
|
642673
643869
|
children: userDisplay
|
|
642674
643870
|
}, undefined, false, undefined, this)
|
|
642675
643871
|
}, undefined, false, undefined, this),
|
|
642676
|
-
/* @__PURE__ */
|
|
643872
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642677
643873
|
paddingLeft: 2,
|
|
642678
|
-
children: /* @__PURE__ */
|
|
643874
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642679
643875
|
color: Theme.colors.text,
|
|
642680
643876
|
children: profile.apiUrl.replace("https://", "")
|
|
642681
643877
|
}, undefined, false, undefined, this)
|
|
642682
643878
|
}, undefined, false, undefined, this),
|
|
642683
|
-
/* @__PURE__ */
|
|
643879
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642684
643880
|
paddingLeft: 2,
|
|
642685
|
-
children: /* @__PURE__ */
|
|
643881
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642686
643882
|
color: Theme.colors.muted,
|
|
642687
643883
|
children: [
|
|
642688
643884
|
"Used ",
|
|
@@ -642786,9 +643982,9 @@ ${lastUsed}`
|
|
|
642786
643982
|
process.exit(0);
|
|
642787
643983
|
};
|
|
642788
643984
|
if (state.loading) {
|
|
642789
|
-
return /* @__PURE__ */
|
|
643985
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642790
643986
|
flexDirection: "column",
|
|
642791
|
-
children: /* @__PURE__ */
|
|
643987
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642792
643988
|
children: "Setting profile..."
|
|
642793
643989
|
}, undefined, false, undefined, this)
|
|
642794
643990
|
}, undefined, false, undefined, this);
|
|
@@ -642797,17 +643993,17 @@ ${lastUsed}`
|
|
|
642797
643993
|
const selectedProfileInfo = profileOptions.find((p) => p.id === state.selectedProfile);
|
|
642798
643994
|
const userInfo = selectedProfileInfo?.description?.split(`
|
|
642799
643995
|
`)[0] || "Unknown user";
|
|
642800
|
-
return /* @__PURE__ */
|
|
643996
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642801
643997
|
flexDirection: "column",
|
|
642802
643998
|
children: [
|
|
642803
|
-
/* @__PURE__ */
|
|
643999
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642804
644000
|
color: Theme.colors.success,
|
|
642805
644001
|
children: [
|
|
642806
644002
|
"\u2713 Successfully switched to profile: ",
|
|
642807
644003
|
state.selectedProfile
|
|
642808
644004
|
]
|
|
642809
644005
|
}, undefined, true, undefined, this),
|
|
642810
|
-
/* @__PURE__ */
|
|
644006
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642811
644007
|
color: Theme.colors.text,
|
|
642812
644008
|
children: [
|
|
642813
644009
|
"Logged in as ",
|
|
@@ -642818,9 +644014,9 @@ ${lastUsed}`
|
|
|
642818
644014
|
}, undefined, true, undefined, this);
|
|
642819
644015
|
}
|
|
642820
644016
|
if (state.error) {
|
|
642821
|
-
return /* @__PURE__ */
|
|
644017
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642822
644018
|
flexDirection: "column",
|
|
642823
|
-
children: /* @__PURE__ */
|
|
644019
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642824
644020
|
color: Theme.colors.error,
|
|
642825
644021
|
children: [
|
|
642826
644022
|
"Error: ",
|
|
@@ -642829,20 +644025,20 @@ ${lastUsed}`
|
|
|
642829
644025
|
}, undefined, true, undefined, this)
|
|
642830
644026
|
}, undefined, false, undefined, this);
|
|
642831
644027
|
}
|
|
642832
|
-
return /* @__PURE__ */
|
|
644028
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
642833
644029
|
flexDirection: "column",
|
|
642834
644030
|
children: [
|
|
642835
|
-
/* @__PURE__ */
|
|
644031
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642836
644032
|
bold: true,
|
|
642837
644033
|
color: Theme.colors.primary,
|
|
642838
644034
|
children: "Select Profile"
|
|
642839
644035
|
}, undefined, false, undefined, this),
|
|
642840
|
-
/* @__PURE__ */
|
|
644036
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
642841
644037
|
color: Theme.colors.muted,
|
|
642842
644038
|
dimColor: true,
|
|
642843
644039
|
children: "Press Enter to switch to the selected profile"
|
|
642844
644040
|
}, undefined, false, undefined, this),
|
|
642845
|
-
/* @__PURE__ */
|
|
644041
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Select, {
|
|
642846
644042
|
options: profileOptions,
|
|
642847
644043
|
initialSelected: state.selectedProfile,
|
|
642848
644044
|
onSubmit: handleProfileSelect,
|
|
@@ -642881,8 +644077,8 @@ ${lastUsed}`
|
|
|
642881
644077
|
}
|
|
642882
644078
|
return;
|
|
642883
644079
|
}
|
|
642884
|
-
const { waitUntilExit } = render_default(/* @__PURE__ */
|
|
642885
|
-
children: /* @__PURE__ */
|
|
644080
|
+
const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(FocusProvider, {
|
|
644081
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ProfilesListComponent, {}, undefined, false, undefined, this)
|
|
642886
644082
|
}, undefined, false, undefined, this));
|
|
642887
644083
|
await waitUntilExit();
|
|
642888
644084
|
}, adkProfilesSet = async (profileName) => {
|
|
@@ -642896,8 +644092,8 @@ ${lastUsed}`
|
|
|
642896
644092
|
}
|
|
642897
644093
|
return;
|
|
642898
644094
|
}
|
|
642899
|
-
const { waitUntilExit } = render_default(/* @__PURE__ */
|
|
642900
|
-
children: /* @__PURE__ */
|
|
644095
|
+
const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(FocusProvider, {
|
|
644096
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ProfilesSetComponent, {
|
|
642901
644097
|
profileName: profileName || ""
|
|
642902
644098
|
}, undefined, false, undefined, this)
|
|
642903
644099
|
}, undefined, false, undefined, this));
|
|
@@ -642913,7 +644109,7 @@ var init_adk_profiles = __esm(async () => {
|
|
|
642913
644109
|
init_Select()
|
|
642914
644110
|
]);
|
|
642915
644111
|
import_react39 = __toESM(require_react(), 1);
|
|
642916
|
-
|
|
644112
|
+
jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
|
|
642917
644113
|
});
|
|
642918
644114
|
|
|
642919
644115
|
// src/commands/adk-add.tsx
|
|
@@ -642969,36 +644165,36 @@ async function adkAdd(resource2, options) {
|
|
|
642969
644165
|
}, []);
|
|
642970
644166
|
const resourceType = isInterface ? "interface" : "integration";
|
|
642971
644167
|
if (status === "adding") {
|
|
642972
|
-
return /* @__PURE__ */
|
|
644168
|
+
return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
642973
644169
|
flexDirection: "column",
|
|
642974
|
-
children: /* @__PURE__ */
|
|
644170
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
642975
644171
|
children: [
|
|
642976
|
-
/* @__PURE__ */
|
|
644172
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
642977
644173
|
color: "cyan",
|
|
642978
644174
|
children: "\u27A4"
|
|
642979
644175
|
}, undefined, false, undefined, this),
|
|
642980
644176
|
" Adding ",
|
|
642981
644177
|
resourceType,
|
|
642982
644178
|
" ",
|
|
642983
|
-
/* @__PURE__ */
|
|
644179
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
642984
644180
|
bold: true,
|
|
642985
644181
|
children: name2
|
|
642986
644182
|
}, undefined, false, undefined, this),
|
|
642987
|
-
version !== "latest" && /* @__PURE__ */
|
|
644183
|
+
version !== "latest" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
642988
644184
|
children: [
|
|
642989
644185
|
" ",
|
|
642990
644186
|
"version ",
|
|
642991
|
-
/* @__PURE__ */
|
|
644187
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
642992
644188
|
bold: true,
|
|
642993
644189
|
children: version
|
|
642994
644190
|
}, undefined, false, undefined, this)
|
|
642995
644191
|
]
|
|
642996
644192
|
}, undefined, true, undefined, this),
|
|
642997
|
-
options?.alias && /* @__PURE__ */
|
|
644193
|
+
options?.alias && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
642998
644194
|
children: [
|
|
642999
644195
|
" ",
|
|
643000
644196
|
"as ",
|
|
643001
|
-
/* @__PURE__ */
|
|
644197
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643002
644198
|
bold: true,
|
|
643003
644199
|
children: options.alias
|
|
643004
644200
|
}, undefined, false, undefined, this)
|
|
@@ -643010,9 +644206,9 @@ async function adkAdd(resource2, options) {
|
|
|
643010
644206
|
}, undefined, false, undefined, this);
|
|
643011
644207
|
}
|
|
643012
644208
|
if (status === "error") {
|
|
643013
|
-
return /* @__PURE__ */
|
|
644209
|
+
return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
643014
644210
|
flexDirection: "column",
|
|
643015
|
-
children: /* @__PURE__ */
|
|
644211
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643016
644212
|
color: "red",
|
|
643017
644213
|
children: [
|
|
643018
644214
|
"\u2717 Failed to add ",
|
|
@@ -643024,9 +644220,9 @@ async function adkAdd(resource2, options) {
|
|
|
643024
644220
|
}, undefined, false, undefined, this);
|
|
643025
644221
|
}
|
|
643026
644222
|
if (status === "warning" && result) {
|
|
643027
|
-
return /* @__PURE__ */
|
|
644223
|
+
return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
643028
644224
|
flexDirection: "column",
|
|
643029
|
-
children: /* @__PURE__ */
|
|
644225
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643030
644226
|
color: "yellow",
|
|
643031
644227
|
children: [
|
|
643032
644228
|
"\u26A0 ",
|
|
@@ -643037,32 +644233,32 @@ async function adkAdd(resource2, options) {
|
|
|
643037
644233
|
}
|
|
643038
644234
|
if (status === "success" && result) {
|
|
643039
644235
|
const alias = options?.alias || name2;
|
|
643040
|
-
return /* @__PURE__ */
|
|
644236
|
+
return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
643041
644237
|
flexDirection: "column",
|
|
643042
644238
|
children: [
|
|
643043
|
-
/* @__PURE__ */
|
|
644239
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643044
644240
|
color: "green",
|
|
643045
644241
|
children: [
|
|
643046
644242
|
"\u2713 Added ",
|
|
643047
|
-
/* @__PURE__ */
|
|
644243
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643048
644244
|
bold: true,
|
|
643049
644245
|
children: name2
|
|
643050
644246
|
}, undefined, false, undefined, this),
|
|
643051
|
-
result.newVersion && result.newVersion !== "latest" && /* @__PURE__ */
|
|
644247
|
+
result.newVersion && result.newVersion !== "latest" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643052
644248
|
children: [
|
|
643053
644249
|
" ",
|
|
643054
644250
|
"version ",
|
|
643055
|
-
/* @__PURE__ */
|
|
644251
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643056
644252
|
bold: true,
|
|
643057
644253
|
children: result.newVersion
|
|
643058
644254
|
}, undefined, false, undefined, this)
|
|
643059
644255
|
]
|
|
643060
644256
|
}, undefined, true, undefined, this),
|
|
643061
|
-
options?.alias && /* @__PURE__ */
|
|
644257
|
+
options?.alias && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643062
644258
|
children: [
|
|
643063
644259
|
" ",
|
|
643064
644260
|
"as ",
|
|
643065
|
-
/* @__PURE__ */
|
|
644261
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643066
644262
|
bold: true,
|
|
643067
644263
|
children: options.alias
|
|
643068
644264
|
}, undefined, false, undefined, this)
|
|
@@ -643072,13 +644268,13 @@ async function adkAdd(resource2, options) {
|
|
|
643072
644268
|
"to agent.config.ts dependencies"
|
|
643073
644269
|
]
|
|
643074
644270
|
}, undefined, true, undefined, this),
|
|
643075
|
-
/* @__PURE__ */
|
|
644271
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
643076
644272
|
marginTop: 1,
|
|
643077
|
-
children: /* @__PURE__ */
|
|
644273
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643078
644274
|
dimColor: true,
|
|
643079
644275
|
children: [
|
|
643080
644276
|
"Please configure it in the UI using the ",
|
|
643081
|
-
/* @__PURE__ */
|
|
644277
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643082
644278
|
color: "cyan",
|
|
643083
644279
|
children: "adk dev"
|
|
643084
644280
|
}, undefined, false, undefined, this),
|
|
@@ -643086,19 +644282,19 @@ async function adkAdd(resource2, options) {
|
|
|
643086
644282
|
]
|
|
643087
644283
|
}, undefined, true, undefined, this)
|
|
643088
644284
|
}, undefined, false, undefined, this),
|
|
643089
|
-
!isInterface && result.requiresConfiguration && /* @__PURE__ */
|
|
644285
|
+
!isInterface && result.requiresConfiguration && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
643090
644286
|
marginTop: 1,
|
|
643091
644287
|
flexDirection: "column",
|
|
643092
644288
|
children: [
|
|
643093
|
-
/* @__PURE__ */
|
|
644289
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643094
644290
|
color: "yellow",
|
|
643095
644291
|
children: "\u26A0 This integration requires configuration"
|
|
643096
644292
|
}, undefined, false, undefined, this),
|
|
643097
|
-
/* @__PURE__ */
|
|
644293
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643098
644294
|
dimColor: true,
|
|
643099
644295
|
children: [
|
|
643100
644296
|
"Run ",
|
|
643101
|
-
/* @__PURE__ */
|
|
644297
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
|
|
643102
644298
|
color: "cyan",
|
|
643103
644299
|
children: [
|
|
643104
644300
|
"adk connect ",
|
|
@@ -643115,19 +644311,19 @@ async function adkAdd(resource2, options) {
|
|
|
643115
644311
|
}
|
|
643116
644312
|
return null;
|
|
643117
644313
|
};
|
|
643118
|
-
render_default(/* @__PURE__ */
|
|
644314
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(AddResource, {}, undefined, false, undefined, this));
|
|
643119
644315
|
}
|
|
643120
|
-
var import_react40,
|
|
644316
|
+
var import_react40, jsx_dev_runtime23;
|
|
643121
644317
|
var init_adk_add = __esm(async () => {
|
|
643122
644318
|
init_assert_logged_in();
|
|
643123
644319
|
init_agent_root();
|
|
643124
644320
|
await init_build2();
|
|
643125
644321
|
import_react40 = __toESM(require_react(), 1);
|
|
643126
|
-
|
|
644322
|
+
jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
|
|
643127
644323
|
});
|
|
643128
644324
|
|
|
643129
644325
|
// src/components/MultiSelect.tsx
|
|
643130
|
-
var import_react41,
|
|
644326
|
+
var import_react41, jsx_dev_runtime24, MultiSelect = ({
|
|
643131
644327
|
prompt,
|
|
643132
644328
|
options,
|
|
643133
644329
|
initialSelected = [],
|
|
@@ -643200,30 +644396,30 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
|
|
|
643200
644396
|
handleSubmit();
|
|
643201
644397
|
}
|
|
643202
644398
|
});
|
|
643203
|
-
return /* @__PURE__ */
|
|
644399
|
+
return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
643204
644400
|
flexDirection: "column",
|
|
643205
644401
|
children: [
|
|
643206
|
-
/* @__PURE__ */
|
|
644402
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
643207
644403
|
marginBottom: 1,
|
|
643208
|
-
children: /* @__PURE__ */
|
|
644404
|
+
children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643209
644405
|
color: "cyan",
|
|
643210
644406
|
bold: true,
|
|
643211
644407
|
children: prompt
|
|
643212
644408
|
}, undefined, false, undefined, this)
|
|
643213
644409
|
}, undefined, false, undefined, this),
|
|
643214
|
-
/* @__PURE__ */
|
|
644410
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
643215
644411
|
flexDirection: "column",
|
|
643216
644412
|
children: options.map((option, index) => {
|
|
643217
644413
|
const isSelected = selectedIds.has(option.id);
|
|
643218
644414
|
const isFocused = index === focusedIndex;
|
|
643219
|
-
return /* @__PURE__ */
|
|
644415
|
+
return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
643220
644416
|
marginBottom: 0,
|
|
643221
644417
|
children: [
|
|
643222
|
-
/* @__PURE__ */
|
|
644418
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643223
644419
|
color: isFocused ? "cyan" : "gray",
|
|
643224
644420
|
children: isFocused ? "\u2192 " : " "
|
|
643225
644421
|
}, undefined, false, undefined, this),
|
|
643226
|
-
/* @__PURE__ */
|
|
644422
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643227
644423
|
color: isSelected ? "green" : "gray",
|
|
643228
644424
|
children: [
|
|
643229
644425
|
"[",
|
|
@@ -643231,15 +644427,15 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
|
|
|
643231
644427
|
"]"
|
|
643232
644428
|
]
|
|
643233
644429
|
}, undefined, true, undefined, this),
|
|
643234
|
-
/* @__PURE__ */
|
|
644430
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643235
644431
|
children: " "
|
|
643236
644432
|
}, undefined, false, undefined, this),
|
|
643237
|
-
/* @__PURE__ */
|
|
644433
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643238
644434
|
color: isFocused ? "cyan" : "white",
|
|
643239
644435
|
bold: isFocused,
|
|
643240
644436
|
children: option.label
|
|
643241
644437
|
}, undefined, false, undefined, this),
|
|
643242
|
-
option.description && /* @__PURE__ */
|
|
644438
|
+
option.description && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643243
644439
|
color: "gray",
|
|
643244
644440
|
dimColor: true,
|
|
643245
644441
|
children: [
|
|
@@ -643251,9 +644447,9 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
|
|
|
643251
644447
|
}, option.id, true, undefined, this);
|
|
643252
644448
|
})
|
|
643253
644449
|
}, undefined, false, undefined, this),
|
|
643254
|
-
selectedIds.size > 0 && /* @__PURE__ */
|
|
644450
|
+
selectedIds.size > 0 && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
643255
644451
|
marginTop: 1,
|
|
643256
|
-
children: /* @__PURE__ */
|
|
644452
|
+
children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643257
644453
|
color: "green",
|
|
643258
644454
|
dimColor: true,
|
|
643259
644455
|
children: [
|
|
@@ -643263,9 +644459,9 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
|
|
|
643263
644459
|
]
|
|
643264
644460
|
}, undefined, true, undefined, this)
|
|
643265
644461
|
}, undefined, false, undefined, this),
|
|
643266
|
-
validationError && /* @__PURE__ */
|
|
644462
|
+
validationError && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
643267
644463
|
marginTop: 1,
|
|
643268
|
-
children: /* @__PURE__ */
|
|
644464
|
+
children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643269
644465
|
color: "red",
|
|
643270
644466
|
bold: true,
|
|
643271
644467
|
children: [
|
|
@@ -643274,16 +644470,16 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
|
|
|
643274
644470
|
]
|
|
643275
644471
|
}, undefined, true, undefined, this)
|
|
643276
644472
|
}, undefined, false, undefined, this),
|
|
643277
|
-
/* @__PURE__ */
|
|
644473
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
643278
644474
|
marginTop: 1,
|
|
643279
|
-
children: /* @__PURE__ */
|
|
644475
|
+
children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643280
644476
|
color: "gray",
|
|
643281
644477
|
dimColor: true,
|
|
643282
644478
|
children: "\u2191\u2193 navigate \u2022 Space toggle \u2022 Enter submit \u2022 Esc cancel"
|
|
643283
644479
|
}, undefined, false, undefined, this)
|
|
643284
644480
|
}, undefined, false, undefined, this),
|
|
643285
|
-
/* @__PURE__ */
|
|
643286
|
-
children: /* @__PURE__ */
|
|
644481
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
644482
|
+
children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
|
|
643287
644483
|
color: "gray",
|
|
643288
644484
|
dimColor: true,
|
|
643289
644485
|
children: [
|
|
@@ -643300,7 +644496,7 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
|
|
|
643300
644496
|
var init_MultiSelect = __esm(async () => {
|
|
643301
644497
|
await init_build2();
|
|
643302
644498
|
import_react41 = __toESM(require_react(), 1);
|
|
643303
|
-
|
|
644499
|
+
jsx_dev_runtime24 = __toESM(require_jsx_dev_runtime(), 1);
|
|
643304
644500
|
});
|
|
643305
644501
|
|
|
643306
644502
|
// src/commands/adk-upgrade.tsx
|
|
@@ -643336,16 +644532,16 @@ async function adkUpgrade(resource2) {
|
|
|
643336
644532
|
runUpgrade();
|
|
643337
644533
|
}, []);
|
|
643338
644534
|
if (status === "upgrading") {
|
|
643339
|
-
return /* @__PURE__ */
|
|
644535
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643340
644536
|
flexDirection: "column",
|
|
643341
|
-
children: /* @__PURE__ */
|
|
644537
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643342
644538
|
children: [
|
|
643343
|
-
/* @__PURE__ */
|
|
644539
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643344
644540
|
color: "cyan",
|
|
643345
644541
|
children: "\u27A4"
|
|
643346
644542
|
}, undefined, false, undefined, this),
|
|
643347
644543
|
" Checking for updates to ",
|
|
643348
|
-
/* @__PURE__ */
|
|
644544
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643349
644545
|
bold: true,
|
|
643350
644546
|
children: cleanName
|
|
643351
644547
|
}, undefined, false, undefined, this),
|
|
@@ -643355,9 +644551,9 @@ async function adkUpgrade(resource2) {
|
|
|
643355
644551
|
}, undefined, false, undefined, this);
|
|
643356
644552
|
}
|
|
643357
644553
|
if (status === "error") {
|
|
643358
|
-
return /* @__PURE__ */
|
|
644554
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643359
644555
|
flexDirection: "column",
|
|
643360
|
-
children: /* @__PURE__ */
|
|
644556
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643361
644557
|
color: "red",
|
|
643362
644558
|
children: [
|
|
643363
644559
|
"\u2717 Failed to upgrade: ",
|
|
@@ -643367,25 +644563,25 @@ async function adkUpgrade(resource2) {
|
|
|
643367
644563
|
}, undefined, false, undefined, this);
|
|
643368
644564
|
}
|
|
643369
644565
|
if (result.upgraded.length === 0 && result.failed.length === 0) {
|
|
643370
|
-
return /* @__PURE__ */
|
|
644566
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643371
644567
|
flexDirection: "column",
|
|
643372
|
-
children: /* @__PURE__ */
|
|
644568
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643373
644569
|
color: "yellow",
|
|
643374
644570
|
children: "\u26A0 Already at the latest version"
|
|
643375
644571
|
}, undefined, false, undefined, this)
|
|
643376
644572
|
}, undefined, false, undefined, this);
|
|
643377
644573
|
}
|
|
643378
|
-
return /* @__PURE__ */
|
|
644574
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643379
644575
|
flexDirection: "column",
|
|
643380
644576
|
children: [
|
|
643381
|
-
result.upgraded.length > 0 && /* @__PURE__ */
|
|
644577
|
+
result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643382
644578
|
flexDirection: "column",
|
|
643383
644579
|
children: [
|
|
643384
|
-
/* @__PURE__ */
|
|
644580
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643385
644581
|
color: "green",
|
|
643386
644582
|
children: "\u2713 Upgraded:"
|
|
643387
644583
|
}, undefined, false, undefined, this),
|
|
643388
|
-
result.upgraded.map((item, i2) => /* @__PURE__ */
|
|
644584
|
+
result.upgraded.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643389
644585
|
color: "green",
|
|
643390
644586
|
children: [
|
|
643391
644587
|
" ",
|
|
@@ -643395,15 +644591,15 @@ async function adkUpgrade(resource2) {
|
|
|
643395
644591
|
}, i2, true, undefined, this))
|
|
643396
644592
|
]
|
|
643397
644593
|
}, undefined, true, undefined, this),
|
|
643398
|
-
result.failed.length > 0 && /* @__PURE__ */
|
|
644594
|
+
result.failed.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643399
644595
|
flexDirection: "column",
|
|
643400
644596
|
marginTop: 1,
|
|
643401
644597
|
children: [
|
|
643402
|
-
/* @__PURE__ */
|
|
644598
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643403
644599
|
color: "red",
|
|
643404
644600
|
children: "\u2717 Failed:"
|
|
643405
644601
|
}, undefined, false, undefined, this),
|
|
643406
|
-
result.failed.map((item, i2) => /* @__PURE__ */
|
|
644602
|
+
result.failed.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643407
644603
|
color: "red",
|
|
643408
644604
|
children: [
|
|
643409
644605
|
" ",
|
|
@@ -643413,13 +644609,13 @@ async function adkUpgrade(resource2) {
|
|
|
643413
644609
|
}, i2, true, undefined, this))
|
|
643414
644610
|
]
|
|
643415
644611
|
}, undefined, true, undefined, this),
|
|
643416
|
-
result.upgraded.length > 0 && /* @__PURE__ */
|
|
644612
|
+
result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643417
644613
|
marginTop: 1,
|
|
643418
|
-
children: /* @__PURE__ */
|
|
644614
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643419
644615
|
dimColor: true,
|
|
643420
644616
|
children: [
|
|
643421
644617
|
"Run ",
|
|
643422
|
-
/* @__PURE__ */
|
|
644618
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643423
644619
|
color: "cyan",
|
|
643424
644620
|
children: "adk dev"
|
|
643425
644621
|
}, undefined, false, undefined, this),
|
|
@@ -643430,7 +644626,7 @@ async function adkUpgrade(resource2) {
|
|
|
643430
644626
|
]
|
|
643431
644627
|
}, undefined, true, undefined, this);
|
|
643432
644628
|
};
|
|
643433
|
-
render_default(/* @__PURE__ */
|
|
644629
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(UpgradeIntegration, {}, undefined, false, undefined, this));
|
|
643434
644630
|
} else {
|
|
643435
644631
|
const InteractiveUpgrade = () => {
|
|
643436
644632
|
const [integrations, setIntegrations] = import_react42.default.useState([]);
|
|
@@ -643499,11 +644695,11 @@ async function adkUpgrade(resource2) {
|
|
|
643499
644695
|
setResult({ upgraded, failed });
|
|
643500
644696
|
};
|
|
643501
644697
|
if (checking) {
|
|
643502
|
-
return /* @__PURE__ */
|
|
644698
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643503
644699
|
flexDirection: "column",
|
|
643504
|
-
children: /* @__PURE__ */
|
|
644700
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643505
644701
|
children: [
|
|
643506
|
-
/* @__PURE__ */
|
|
644702
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643507
644703
|
color: "cyan",
|
|
643508
644704
|
children: "\u27A4"
|
|
643509
644705
|
}, undefined, false, undefined, this),
|
|
@@ -643513,11 +644709,11 @@ async function adkUpgrade(resource2) {
|
|
|
643513
644709
|
}, undefined, false, undefined, this);
|
|
643514
644710
|
}
|
|
643515
644711
|
if (upgrading && !result) {
|
|
643516
|
-
return /* @__PURE__ */
|
|
644712
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643517
644713
|
flexDirection: "column",
|
|
643518
|
-
children: /* @__PURE__ */
|
|
644714
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643519
644715
|
children: [
|
|
643520
|
-
/* @__PURE__ */
|
|
644716
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643521
644717
|
color: "cyan",
|
|
643522
644718
|
children: "\u27A4"
|
|
643523
644719
|
}, undefined, false, undefined, this),
|
|
@@ -643531,17 +644727,17 @@ async function adkUpgrade(resource2) {
|
|
|
643531
644727
|
}, undefined, false, undefined, this);
|
|
643532
644728
|
}
|
|
643533
644729
|
if (result) {
|
|
643534
|
-
return /* @__PURE__ */
|
|
644730
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643535
644731
|
flexDirection: "column",
|
|
643536
644732
|
children: [
|
|
643537
|
-
result.upgraded.length > 0 && /* @__PURE__ */
|
|
644733
|
+
result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643538
644734
|
flexDirection: "column",
|
|
643539
644735
|
children: [
|
|
643540
|
-
/* @__PURE__ */
|
|
644736
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643541
644737
|
color: "green",
|
|
643542
644738
|
children: "\u2713 Upgraded:"
|
|
643543
644739
|
}, undefined, false, undefined, this),
|
|
643544
|
-
result.upgraded.map((item, i2) => /* @__PURE__ */
|
|
644740
|
+
result.upgraded.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643545
644741
|
color: "green",
|
|
643546
644742
|
children: [
|
|
643547
644743
|
" ",
|
|
@@ -643551,15 +644747,15 @@ async function adkUpgrade(resource2) {
|
|
|
643551
644747
|
}, i2, true, undefined, this))
|
|
643552
644748
|
]
|
|
643553
644749
|
}, undefined, true, undefined, this),
|
|
643554
|
-
result.failed.length > 0 && /* @__PURE__ */
|
|
644750
|
+
result.failed.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643555
644751
|
flexDirection: "column",
|
|
643556
644752
|
marginTop: 1,
|
|
643557
644753
|
children: [
|
|
643558
|
-
/* @__PURE__ */
|
|
644754
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643559
644755
|
color: "red",
|
|
643560
644756
|
children: "\u2717 Failed:"
|
|
643561
644757
|
}, undefined, false, undefined, this),
|
|
643562
|
-
result.failed.map((item, i2) => /* @__PURE__ */
|
|
644758
|
+
result.failed.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643563
644759
|
color: "red",
|
|
643564
644760
|
children: [
|
|
643565
644761
|
" ",
|
|
@@ -643569,13 +644765,13 @@ async function adkUpgrade(resource2) {
|
|
|
643569
644765
|
}, i2, true, undefined, this))
|
|
643570
644766
|
]
|
|
643571
644767
|
}, undefined, true, undefined, this),
|
|
643572
|
-
result.upgraded.length > 0 && /* @__PURE__ */
|
|
644768
|
+
result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643573
644769
|
marginTop: 1,
|
|
643574
|
-
children: /* @__PURE__ */
|
|
644770
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643575
644771
|
dimColor: true,
|
|
643576
644772
|
children: [
|
|
643577
644773
|
"Run ",
|
|
643578
|
-
/* @__PURE__ */
|
|
644774
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643579
644775
|
color: "cyan",
|
|
643580
644776
|
children: "adk dev"
|
|
643581
644777
|
}, undefined, false, undefined, this),
|
|
@@ -643587,9 +644783,9 @@ async function adkUpgrade(resource2) {
|
|
|
643587
644783
|
}, undefined, true, undefined, this);
|
|
643588
644784
|
}
|
|
643589
644785
|
if (availableIntegrationUpdates.size === 0 && availableInterfaceUpdates.size === 0) {
|
|
643590
|
-
return /* @__PURE__ */
|
|
644786
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
643591
644787
|
flexDirection: "column",
|
|
643592
|
-
children: /* @__PURE__ */
|
|
644788
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
643593
644789
|
color: "green",
|
|
643594
644790
|
children: "\u2713 All integrations and interfaces are already at the latest version"
|
|
643595
644791
|
}, undefined, false, undefined, this)
|
|
@@ -643606,16 +644802,16 @@ async function adkUpgrade(resource2) {
|
|
|
643606
644802
|
value: `ifc:${i2.alias}`
|
|
643607
644803
|
}));
|
|
643608
644804
|
const options = [...intOptions, ...ifcOptions];
|
|
643609
|
-
return /* @__PURE__ */
|
|
644805
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(MultiSelect, {
|
|
643610
644806
|
prompt: "Select dependencies to upgrade:",
|
|
643611
644807
|
options,
|
|
643612
644808
|
onSubmit: handleSubmit
|
|
643613
644809
|
}, undefined, false, undefined, this);
|
|
643614
644810
|
};
|
|
643615
|
-
render_default(/* @__PURE__ */
|
|
644811
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(InteractiveUpgrade, {}, undefined, false, undefined, this));
|
|
643616
644812
|
}
|
|
643617
644813
|
}
|
|
643618
|
-
var import_react42,
|
|
644814
|
+
var import_react42, jsx_dev_runtime25;
|
|
643619
644815
|
var init_adk_upgrade = __esm(async () => {
|
|
643620
644816
|
init_dist15();
|
|
643621
644817
|
await __promiseAll([
|
|
@@ -643623,7 +644819,7 @@ var init_adk_upgrade = __esm(async () => {
|
|
|
643623
644819
|
init_MultiSelect()
|
|
643624
644820
|
]);
|
|
643625
644821
|
import_react42 = __toESM(require_react(), 1);
|
|
643626
|
-
|
|
644822
|
+
jsx_dev_runtime25 = __toESM(require_jsx_dev_runtime(), 1);
|
|
643627
644823
|
});
|
|
643628
644824
|
|
|
643629
644825
|
// src/commands/adk-remove.tsx
|
|
@@ -643707,18 +644903,18 @@ async function adkRemove(resource2) {
|
|
|
643707
644903
|
runRemove();
|
|
643708
644904
|
}, []);
|
|
643709
644905
|
if (status === "removing") {
|
|
643710
|
-
return /* @__PURE__ */
|
|
644906
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643711
644907
|
flexDirection: "column",
|
|
643712
|
-
children: /* @__PURE__ */
|
|
644908
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643713
644909
|
children: [
|
|
643714
|
-
/* @__PURE__ */
|
|
644910
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643715
644911
|
color: "cyan",
|
|
643716
644912
|
children: "\u27A4"
|
|
643717
644913
|
}, undefined, false, undefined, this),
|
|
643718
644914
|
" Removing ",
|
|
643719
644915
|
resourceType,
|
|
643720
644916
|
" ",
|
|
643721
|
-
/* @__PURE__ */
|
|
644917
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643722
644918
|
bold: true,
|
|
643723
644919
|
children: cleanName
|
|
643724
644920
|
}, undefined, false, undefined, this),
|
|
@@ -643728,9 +644924,9 @@ async function adkRemove(resource2) {
|
|
|
643728
644924
|
}, undefined, false, undefined, this);
|
|
643729
644925
|
}
|
|
643730
644926
|
if (status === "error") {
|
|
643731
|
-
return /* @__PURE__ */
|
|
644927
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643732
644928
|
flexDirection: "column",
|
|
643733
|
-
children: /* @__PURE__ */
|
|
644929
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643734
644930
|
color: "red",
|
|
643735
644931
|
children: [
|
|
643736
644932
|
"\u2717 Failed to remove ",
|
|
@@ -643741,27 +644937,27 @@ async function adkRemove(resource2) {
|
|
|
643741
644937
|
}, undefined, true, undefined, this)
|
|
643742
644938
|
}, undefined, false, undefined, this);
|
|
643743
644939
|
}
|
|
643744
|
-
return /* @__PURE__ */
|
|
644940
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643745
644941
|
flexDirection: "column",
|
|
643746
644942
|
children: [
|
|
643747
|
-
/* @__PURE__ */
|
|
644943
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643748
644944
|
color: "green",
|
|
643749
644945
|
children: [
|
|
643750
644946
|
"\u2713 Removed ",
|
|
643751
|
-
/* @__PURE__ */
|
|
644947
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643752
644948
|
bold: true,
|
|
643753
644949
|
children: cleanName
|
|
643754
644950
|
}, undefined, false, undefined, this),
|
|
643755
644951
|
" from agent.config.ts dependencies"
|
|
643756
644952
|
]
|
|
643757
644953
|
}, undefined, true, undefined, this),
|
|
643758
|
-
/* @__PURE__ */
|
|
644954
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643759
644955
|
marginTop: 1,
|
|
643760
|
-
children: /* @__PURE__ */
|
|
644956
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643761
644957
|
dimColor: true,
|
|
643762
644958
|
children: [
|
|
643763
644959
|
"Run ",
|
|
643764
|
-
/* @__PURE__ */
|
|
644960
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643765
644961
|
color: "cyan",
|
|
643766
644962
|
children: "adk dev"
|
|
643767
644963
|
}, undefined, false, undefined, this),
|
|
@@ -643772,7 +644968,7 @@ async function adkRemove(resource2) {
|
|
|
643772
644968
|
]
|
|
643773
644969
|
}, undefined, true, undefined, this);
|
|
643774
644970
|
};
|
|
643775
|
-
render_default(/* @__PURE__ */
|
|
644971
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(RemoveIntegration, {}, undefined, false, undefined, this));
|
|
643776
644972
|
} else {
|
|
643777
644973
|
const InteractiveRemove = () => {
|
|
643778
644974
|
const [integrations, setIntegrations] = import_react43.default.useState([]);
|
|
@@ -643807,11 +645003,11 @@ async function adkRemove(resource2) {
|
|
|
643807
645003
|
}
|
|
643808
645004
|
};
|
|
643809
645005
|
if (loading) {
|
|
643810
|
-
return /* @__PURE__ */
|
|
645006
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643811
645007
|
flexDirection: "column",
|
|
643812
|
-
children: /* @__PURE__ */
|
|
645008
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643813
645009
|
children: [
|
|
643814
|
-
/* @__PURE__ */
|
|
645010
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643815
645011
|
color: "cyan",
|
|
643816
645012
|
children: "\u27A4"
|
|
643817
645013
|
}, undefined, false, undefined, this),
|
|
@@ -643821,16 +645017,16 @@ async function adkRemove(resource2) {
|
|
|
643821
645017
|
}, undefined, false, undefined, this);
|
|
643822
645018
|
}
|
|
643823
645019
|
if (removing && status === "idle") {
|
|
643824
|
-
return /* @__PURE__ */
|
|
645020
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643825
645021
|
flexDirection: "column",
|
|
643826
|
-
children: /* @__PURE__ */
|
|
645022
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643827
645023
|
children: [
|
|
643828
|
-
/* @__PURE__ */
|
|
645024
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643829
645025
|
color: "cyan",
|
|
643830
645026
|
children: "\u27A4"
|
|
643831
645027
|
}, undefined, false, undefined, this),
|
|
643832
645028
|
" Removing integration ",
|
|
643833
|
-
/* @__PURE__ */
|
|
645029
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643834
645030
|
bold: true,
|
|
643835
645031
|
children: selected
|
|
643836
645032
|
}, undefined, false, undefined, this),
|
|
@@ -643840,9 +645036,9 @@ async function adkRemove(resource2) {
|
|
|
643840
645036
|
}, undefined, false, undefined, this);
|
|
643841
645037
|
}
|
|
643842
645038
|
if (status === "error") {
|
|
643843
|
-
return /* @__PURE__ */
|
|
645039
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643844
645040
|
flexDirection: "column",
|
|
643845
|
-
children: /* @__PURE__ */
|
|
645041
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643846
645042
|
color: "red",
|
|
643847
645043
|
children: [
|
|
643848
645044
|
"\u2717 Failed to remove integration: ",
|
|
@@ -643852,27 +645048,27 @@ async function adkRemove(resource2) {
|
|
|
643852
645048
|
}, undefined, false, undefined, this);
|
|
643853
645049
|
}
|
|
643854
645050
|
if (status === "success") {
|
|
643855
|
-
return /* @__PURE__ */
|
|
645051
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643856
645052
|
flexDirection: "column",
|
|
643857
645053
|
children: [
|
|
643858
|
-
/* @__PURE__ */
|
|
645054
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643859
645055
|
color: "green",
|
|
643860
645056
|
children: [
|
|
643861
645057
|
"\u2713 Removed ",
|
|
643862
|
-
/* @__PURE__ */
|
|
645058
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643863
645059
|
bold: true,
|
|
643864
645060
|
children: selected
|
|
643865
645061
|
}, undefined, false, undefined, this),
|
|
643866
645062
|
" from agent.config.ts dependencies"
|
|
643867
645063
|
]
|
|
643868
645064
|
}, undefined, true, undefined, this),
|
|
643869
|
-
/* @__PURE__ */
|
|
645065
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643870
645066
|
marginTop: 1,
|
|
643871
|
-
children: /* @__PURE__ */
|
|
645067
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643872
645068
|
dimColor: true,
|
|
643873
645069
|
children: [
|
|
643874
645070
|
"Run ",
|
|
643875
|
-
/* @__PURE__ */
|
|
645071
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643876
645072
|
color: "cyan",
|
|
643877
645073
|
children: "adk dev"
|
|
643878
645074
|
}, undefined, false, undefined, this),
|
|
@@ -643884,9 +645080,9 @@ async function adkRemove(resource2) {
|
|
|
643884
645080
|
}, undefined, true, undefined, this);
|
|
643885
645081
|
}
|
|
643886
645082
|
if (integrations.length === 0) {
|
|
643887
|
-
return /* @__PURE__ */
|
|
645083
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643888
645084
|
flexDirection: "column",
|
|
643889
|
-
children: /* @__PURE__ */
|
|
645085
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643890
645086
|
color: "yellow",
|
|
643891
645087
|
children: "\u26A0 No integrations found in agent.config.ts dependencies"
|
|
643892
645088
|
}, undefined, false, undefined, this)
|
|
@@ -643897,16 +645093,16 @@ async function adkRemove(resource2) {
|
|
|
643897
645093
|
label: `${i2.alias} (${i2.name}@${i2.version})`,
|
|
643898
645094
|
value: i2.alias
|
|
643899
645095
|
}));
|
|
643900
|
-
return /* @__PURE__ */
|
|
645096
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643901
645097
|
flexDirection: "column",
|
|
643902
645098
|
children: [
|
|
643903
|
-
/* @__PURE__ */
|
|
645099
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
643904
645100
|
color: "cyan",
|
|
643905
645101
|
children: "Select integration to remove:"
|
|
643906
645102
|
}, undefined, false, undefined, this),
|
|
643907
|
-
/* @__PURE__ */
|
|
645103
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
643908
645104
|
marginTop: 1,
|
|
643909
|
-
children: /* @__PURE__ */
|
|
645105
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Select, {
|
|
643910
645106
|
options,
|
|
643911
645107
|
onSubmit: handleSubmit
|
|
643912
645108
|
}, undefined, false, undefined, this)
|
|
@@ -643914,10 +645110,10 @@ async function adkRemove(resource2) {
|
|
|
643914
645110
|
]
|
|
643915
645111
|
}, undefined, true, undefined, this);
|
|
643916
645112
|
};
|
|
643917
|
-
render_default(/* @__PURE__ */
|
|
645113
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(InteractiveRemove, {}, undefined, false, undefined, this));
|
|
643918
645114
|
}
|
|
643919
645115
|
}
|
|
643920
|
-
var import_react43,
|
|
645116
|
+
var import_react43, jsx_dev_runtime26;
|
|
643921
645117
|
var init_adk_remove = __esm(async () => {
|
|
643922
645118
|
init_dist15();
|
|
643923
645119
|
init_agent_root();
|
|
@@ -643926,31 +645122,31 @@ var init_adk_remove = __esm(async () => {
|
|
|
643926
645122
|
init_Select()
|
|
643927
645123
|
]);
|
|
643928
645124
|
import_react43 = __toESM(require_react(), 1);
|
|
643929
|
-
|
|
645125
|
+
jsx_dev_runtime26 = __toESM(require_jsx_dev_runtime(), 1);
|
|
643930
645126
|
});
|
|
643931
645127
|
|
|
643932
645128
|
// src/components/Table.tsx
|
|
643933
645129
|
function Table({ columns, data, getKey }) {
|
|
643934
645130
|
const totalWidth = columns.reduce((sum, col) => sum + col.width, 0);
|
|
643935
|
-
return /* @__PURE__ */
|
|
645131
|
+
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
643936
645132
|
flexDirection: "column",
|
|
643937
645133
|
children: [
|
|
643938
|
-
/* @__PURE__ */
|
|
643939
|
-
children: columns.map((col, idx) => /* @__PURE__ */
|
|
645134
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
645135
|
+
children: columns.map((col, idx) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
643940
645136
|
width: col.width,
|
|
643941
|
-
children: /* @__PURE__ */
|
|
645137
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
643942
645138
|
bold: true,
|
|
643943
645139
|
dimColor: true,
|
|
643944
645140
|
children: col.header
|
|
643945
645141
|
}, undefined, false, undefined, this)
|
|
643946
645142
|
}, idx, false, undefined, this))
|
|
643947
645143
|
}, undefined, false, undefined, this),
|
|
643948
|
-
/* @__PURE__ */
|
|
645144
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
643949
645145
|
dimColor: true,
|
|
643950
645146
|
children: "\u2500".repeat(totalWidth)
|
|
643951
645147
|
}, undefined, false, undefined, this),
|
|
643952
|
-
data.map((row, idx) => /* @__PURE__ */
|
|
643953
|
-
children: columns.map((col, colIdx) => /* @__PURE__ */
|
|
645148
|
+
data.map((row, idx) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
645149
|
+
children: columns.map((col, colIdx) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
643954
645150
|
width: col.width,
|
|
643955
645151
|
children: col.render(row)
|
|
643956
645152
|
}, colIdx, false, undefined, this))
|
|
@@ -643958,10 +645154,10 @@ function Table({ columns, data, getKey }) {
|
|
|
643958
645154
|
]
|
|
643959
645155
|
}, undefined, true, undefined, this);
|
|
643960
645156
|
}
|
|
643961
|
-
var
|
|
645157
|
+
var jsx_dev_runtime27;
|
|
643962
645158
|
var init_Table = __esm(async () => {
|
|
643963
645159
|
await init_build2();
|
|
643964
|
-
|
|
645160
|
+
jsx_dev_runtime27 = __toESM(require_jsx_dev_runtime(), 1);
|
|
643965
645161
|
});
|
|
643966
645162
|
|
|
643967
645163
|
// src/commands/adk-search.tsx
|
|
@@ -643993,16 +645189,16 @@ async function adkSearch(query, options = {}) {
|
|
|
643993
645189
|
runSearch();
|
|
643994
645190
|
}, []);
|
|
643995
645191
|
if (status === "searching") {
|
|
643996
|
-
return /* @__PURE__ */
|
|
645192
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
643997
645193
|
flexDirection: "column",
|
|
643998
|
-
children: /* @__PURE__ */
|
|
645194
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
643999
645195
|
children: [
|
|
644000
|
-
/* @__PURE__ */
|
|
645196
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644001
645197
|
color: "cyan",
|
|
644002
645198
|
children: "\u27A4"
|
|
644003
645199
|
}, undefined, false, undefined, this),
|
|
644004
645200
|
" Searching integrations for ",
|
|
644005
|
-
/* @__PURE__ */
|
|
645201
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644006
645202
|
bold: true,
|
|
644007
645203
|
children: [
|
|
644008
645204
|
'"',
|
|
@@ -644016,9 +645212,9 @@ async function adkSearch(query, options = {}) {
|
|
|
644016
645212
|
}, undefined, false, undefined, this);
|
|
644017
645213
|
}
|
|
644018
645214
|
if (status === "error") {
|
|
644019
|
-
return /* @__PURE__ */
|
|
645215
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
644020
645216
|
flexDirection: "column",
|
|
644021
|
-
children: /* @__PURE__ */
|
|
645217
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644022
645218
|
color: "red",
|
|
644023
645219
|
children: [
|
|
644024
645220
|
"\u2717 Failed to search integrations: ",
|
|
@@ -644029,10 +645225,10 @@ async function adkSearch(query, options = {}) {
|
|
|
644029
645225
|
}
|
|
644030
645226
|
if (status === "success") {
|
|
644031
645227
|
if (results.length === 0) {
|
|
644032
|
-
return /* @__PURE__ */
|
|
645228
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
644033
645229
|
flexDirection: "column",
|
|
644034
645230
|
children: [
|
|
644035
|
-
/* @__PURE__ */
|
|
645231
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644036
645232
|
color: "yellow",
|
|
644037
645233
|
children: [
|
|
644038
645234
|
'No integrations found matching "',
|
|
@@ -644040,13 +645236,13 @@ async function adkSearch(query, options = {}) {
|
|
|
644040
645236
|
'"'
|
|
644041
645237
|
]
|
|
644042
645238
|
}, undefined, true, undefined, this),
|
|
644043
|
-
/* @__PURE__ */
|
|
645239
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
644044
645240
|
marginTop: 1,
|
|
644045
|
-
children: /* @__PURE__ */
|
|
645241
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644046
645242
|
dimColor: true,
|
|
644047
645243
|
children: [
|
|
644048
645244
|
"Try a different search term or run ",
|
|
644049
|
-
/* @__PURE__ */
|
|
645245
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644050
645246
|
color: "cyan",
|
|
644051
645247
|
children: "adk list --available"
|
|
644052
645248
|
}, undefined, false, undefined, this),
|
|
@@ -644058,17 +645254,17 @@ async function adkSearch(query, options = {}) {
|
|
|
644058
645254
|
}, undefined, true, undefined, this);
|
|
644059
645255
|
}
|
|
644060
645256
|
if (format4 === "json") {
|
|
644061
|
-
return /* @__PURE__ */
|
|
645257
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
644062
645258
|
flexDirection: "column",
|
|
644063
|
-
children: /* @__PURE__ */
|
|
645259
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644064
645260
|
children: JSON.stringify(results, null, 2)
|
|
644065
645261
|
}, undefined, false, undefined, this)
|
|
644066
645262
|
}, undefined, false, undefined, this);
|
|
644067
645263
|
}
|
|
644068
|
-
return /* @__PURE__ */
|
|
645264
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
644069
645265
|
flexDirection: "column",
|
|
644070
645266
|
children: [
|
|
644071
|
-
/* @__PURE__ */
|
|
645267
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644072
645268
|
bold: true,
|
|
644073
645269
|
children: [
|
|
644074
645270
|
"Found ",
|
|
@@ -644080,14 +645276,14 @@ async function adkSearch(query, options = {}) {
|
|
|
644080
645276
|
'"'
|
|
644081
645277
|
]
|
|
644082
645278
|
}, undefined, true, undefined, this),
|
|
644083
|
-
/* @__PURE__ */
|
|
645279
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
644084
645280
|
marginTop: 1,
|
|
644085
|
-
children: /* @__PURE__ */
|
|
645281
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Table, {
|
|
644086
645282
|
columns: [
|
|
644087
645283
|
{
|
|
644088
645284
|
header: "Name",
|
|
644089
645285
|
width: 25,
|
|
644090
|
-
render: (row) => /* @__PURE__ */
|
|
645286
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644091
645287
|
color: "cyan",
|
|
644092
645288
|
children: row.name
|
|
644093
645289
|
}, undefined, false, undefined, this)
|
|
@@ -644095,7 +645291,7 @@ async function adkSearch(query, options = {}) {
|
|
|
644095
645291
|
{
|
|
644096
645292
|
header: "Version",
|
|
644097
645293
|
width: 12,
|
|
644098
|
-
render: (row) => /* @__PURE__ */
|
|
645294
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644099
645295
|
dimColor: true,
|
|
644100
645296
|
children: row.version
|
|
644101
645297
|
}, undefined, false, undefined, this)
|
|
@@ -644103,14 +645299,14 @@ async function adkSearch(query, options = {}) {
|
|
|
644103
645299
|
{
|
|
644104
645300
|
header: "Title",
|
|
644105
645301
|
width: 25,
|
|
644106
|
-
render: (row) => /* @__PURE__ */
|
|
645302
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644107
645303
|
children: row.title || "-"
|
|
644108
645304
|
}, undefined, false, undefined, this)
|
|
644109
645305
|
},
|
|
644110
645306
|
{
|
|
644111
645307
|
header: "Description",
|
|
644112
645308
|
width: 40,
|
|
644113
|
-
render: (row) => /* @__PURE__ */
|
|
645309
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644114
645310
|
dimColor: true,
|
|
644115
645311
|
children: row.description ? row.description.length > 37 ? row.description.slice(0, 37) + "..." : row.description : "-"
|
|
644116
645312
|
}, undefined, false, undefined, this)
|
|
@@ -644120,15 +645316,15 @@ async function adkSearch(query, options = {}) {
|
|
|
644120
645316
|
getKey: (row) => row.name
|
|
644121
645317
|
}, undefined, false, undefined, this)
|
|
644122
645318
|
}, undefined, false, undefined, this),
|
|
644123
|
-
results.length >= limit && /* @__PURE__ */
|
|
645319
|
+
results.length >= limit && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
644124
645320
|
marginTop: 1,
|
|
644125
|
-
children: /* @__PURE__ */
|
|
645321
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644126
645322
|
dimColor: true,
|
|
644127
645323
|
children: [
|
|
644128
645324
|
"Showing first ",
|
|
644129
645325
|
limit,
|
|
644130
645326
|
" results. Use ",
|
|
644131
|
-
/* @__PURE__ */
|
|
645327
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644132
645328
|
color: "cyan",
|
|
644133
645329
|
children: "--limit"
|
|
644134
645330
|
}, undefined, false, undefined, this),
|
|
@@ -644136,13 +645332,13 @@ async function adkSearch(query, options = {}) {
|
|
|
644136
645332
|
]
|
|
644137
645333
|
}, undefined, true, undefined, this)
|
|
644138
645334
|
}, undefined, false, undefined, this),
|
|
644139
|
-
/* @__PURE__ */
|
|
645335
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
644140
645336
|
marginTop: 1,
|
|
644141
|
-
children: /* @__PURE__ */
|
|
645337
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644142
645338
|
dimColor: true,
|
|
644143
645339
|
children: [
|
|
644144
645340
|
"Run ",
|
|
644145
|
-
/* @__PURE__ */
|
|
645341
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
644146
645342
|
color: "cyan",
|
|
644147
645343
|
children: "adk info <name>"
|
|
644148
645344
|
}, undefined, false, undefined, this),
|
|
@@ -644155,16 +645351,16 @@ async function adkSearch(query, options = {}) {
|
|
|
644155
645351
|
}
|
|
644156
645352
|
return null;
|
|
644157
645353
|
};
|
|
644158
|
-
render_default(/* @__PURE__ */
|
|
645354
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(SearchIntegrations, {}, undefined, false, undefined, this));
|
|
644159
645355
|
}
|
|
644160
|
-
var import_react44,
|
|
645356
|
+
var import_react44, jsx_dev_runtime28;
|
|
644161
645357
|
var init_adk_search = __esm(async () => {
|
|
644162
645358
|
await __promiseAll([
|
|
644163
645359
|
init_build2(),
|
|
644164
645360
|
init_Table()
|
|
644165
645361
|
]);
|
|
644166
645362
|
import_react44 = __toESM(require_react(), 1);
|
|
644167
|
-
|
|
645363
|
+
jsx_dev_runtime28 = __toESM(require_jsx_dev_runtime(), 1);
|
|
644168
645364
|
});
|
|
644169
645365
|
|
|
644170
645366
|
// src/commands/adk-list.tsx
|
|
@@ -644224,11 +645420,11 @@ async function adkList(options = {}) {
|
|
|
644224
645420
|
loadIntegrations();
|
|
644225
645421
|
}, []);
|
|
644226
645422
|
if (status === "loading") {
|
|
644227
|
-
return /* @__PURE__ */
|
|
645423
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644228
645424
|
flexDirection: "column",
|
|
644229
|
-
children: /* @__PURE__ */
|
|
645425
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644230
645426
|
children: [
|
|
644231
|
-
/* @__PURE__ */
|
|
645427
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644232
645428
|
color: "cyan",
|
|
644233
645429
|
children: "\u27A4"
|
|
644234
645430
|
}, undefined, false, undefined, this),
|
|
@@ -644238,9 +645434,9 @@ async function adkList(options = {}) {
|
|
|
644238
645434
|
}, undefined, false, undefined, this);
|
|
644239
645435
|
}
|
|
644240
645436
|
if (status === "error") {
|
|
644241
|
-
return /* @__PURE__ */
|
|
645437
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644242
645438
|
flexDirection: "column",
|
|
644243
|
-
children: /* @__PURE__ */
|
|
645439
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644244
645440
|
color: "red",
|
|
644245
645441
|
children: [
|
|
644246
645442
|
"\u2717 Failed to list integrations: ",
|
|
@@ -644252,20 +645448,20 @@ async function adkList(options = {}) {
|
|
|
644252
645448
|
if (status === "success") {
|
|
644253
645449
|
if (integrations.length === 0) {
|
|
644254
645450
|
if (options.available) {
|
|
644255
|
-
return /* @__PURE__ */
|
|
645451
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644256
645452
|
flexDirection: "column",
|
|
644257
645453
|
children: [
|
|
644258
|
-
/* @__PURE__ */
|
|
645454
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644259
645455
|
color: "yellow",
|
|
644260
645456
|
children: "No integrations available"
|
|
644261
645457
|
}, undefined, false, undefined, this),
|
|
644262
|
-
/* @__PURE__ */
|
|
645458
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644263
645459
|
marginTop: 1,
|
|
644264
|
-
children: /* @__PURE__ */
|
|
645460
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644265
645461
|
dimColor: true,
|
|
644266
645462
|
children: [
|
|
644267
645463
|
"Try running ",
|
|
644268
|
-
/* @__PURE__ */
|
|
645464
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644269
645465
|
color: "cyan",
|
|
644270
645466
|
children: "adk hub refresh"
|
|
644271
645467
|
}, undefined, false, undefined, this),
|
|
@@ -644276,20 +645472,20 @@ async function adkList(options = {}) {
|
|
|
644276
645472
|
]
|
|
644277
645473
|
}, undefined, true, undefined, this);
|
|
644278
645474
|
} else {
|
|
644279
|
-
return /* @__PURE__ */
|
|
645475
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644280
645476
|
flexDirection: "column",
|
|
644281
645477
|
children: [
|
|
644282
|
-
/* @__PURE__ */
|
|
645478
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644283
645479
|
color: "yellow",
|
|
644284
645480
|
children: "No integrations installed"
|
|
644285
645481
|
}, undefined, false, undefined, this),
|
|
644286
|
-
/* @__PURE__ */
|
|
645482
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644287
645483
|
marginTop: 1,
|
|
644288
|
-
children: /* @__PURE__ */
|
|
645484
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644289
645485
|
dimColor: true,
|
|
644290
645486
|
children: [
|
|
644291
645487
|
"Run ",
|
|
644292
|
-
/* @__PURE__ */
|
|
645488
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644293
645489
|
color: "cyan",
|
|
644294
645490
|
children: "adk add <integration>"
|
|
644295
645491
|
}, undefined, false, undefined, this),
|
|
@@ -644302,9 +645498,9 @@ async function adkList(options = {}) {
|
|
|
644302
645498
|
}
|
|
644303
645499
|
}
|
|
644304
645500
|
if (format4 === "json") {
|
|
644305
|
-
return /* @__PURE__ */
|
|
645501
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644306
645502
|
flexDirection: "column",
|
|
644307
|
-
children: /* @__PURE__ */
|
|
645503
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644308
645504
|
children: JSON.stringify(integrations, null, 2)
|
|
644309
645505
|
}, undefined, false, undefined, this)
|
|
644310
645506
|
}, undefined, false, undefined, this);
|
|
@@ -644314,14 +645510,14 @@ async function adkList(options = {}) {
|
|
|
644314
645510
|
{
|
|
644315
645511
|
header: "Name",
|
|
644316
645512
|
width: 30,
|
|
644317
|
-
render: (row) => /* @__PURE__ */
|
|
645513
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644318
645514
|
children: row.name
|
|
644319
645515
|
}, undefined, false, undefined, this)
|
|
644320
645516
|
},
|
|
644321
645517
|
{
|
|
644322
645518
|
header: "Version",
|
|
644323
645519
|
width: 15,
|
|
644324
|
-
render: (row) => /* @__PURE__ */
|
|
645520
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644325
645521
|
dimColor: true,
|
|
644326
645522
|
children: row.version
|
|
644327
645523
|
}, undefined, false, undefined, this)
|
|
@@ -644329,7 +645525,7 @@ async function adkList(options = {}) {
|
|
|
644329
645525
|
{
|
|
644330
645526
|
header: "Title",
|
|
644331
645527
|
width: 35,
|
|
644332
|
-
render: (row) => /* @__PURE__ */
|
|
645528
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644333
645529
|
dimColor: true,
|
|
644334
645530
|
children: row.title || "-"
|
|
644335
645531
|
}, undefined, false, undefined, this)
|
|
@@ -644338,7 +645534,7 @@ async function adkList(options = {}) {
|
|
|
644338
645534
|
{
|
|
644339
645535
|
header: "Alias",
|
|
644340
645536
|
width: 20,
|
|
644341
|
-
render: (row) => /* @__PURE__ */
|
|
645537
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644342
645538
|
color: "cyan",
|
|
644343
645539
|
children: row.alias
|
|
644344
645540
|
}, undefined, false, undefined, this)
|
|
@@ -644346,43 +645542,43 @@ async function adkList(options = {}) {
|
|
|
644346
645542
|
{
|
|
644347
645543
|
header: "Name",
|
|
644348
645544
|
width: 30,
|
|
644349
|
-
render: (row) => /* @__PURE__ */
|
|
645545
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644350
645546
|
children: row.name
|
|
644351
645547
|
}, undefined, false, undefined, this)
|
|
644352
645548
|
},
|
|
644353
645549
|
{
|
|
644354
645550
|
header: "Version",
|
|
644355
645551
|
width: 15,
|
|
644356
|
-
render: (row) => /* @__PURE__ */
|
|
645552
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644357
645553
|
dimColor: true,
|
|
644358
645554
|
children: row.version
|
|
644359
645555
|
}, undefined, false, undefined, this)
|
|
644360
645556
|
}
|
|
644361
645557
|
];
|
|
644362
|
-
return /* @__PURE__ */
|
|
645558
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644363
645559
|
flexDirection: "column",
|
|
644364
645560
|
children: [
|
|
644365
|
-
/* @__PURE__ */
|
|
645561
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644366
645562
|
bold: true,
|
|
644367
645563
|
children: title
|
|
644368
645564
|
}, undefined, false, undefined, this),
|
|
644369
|
-
/* @__PURE__ */
|
|
645565
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644370
645566
|
marginTop: 1,
|
|
644371
|
-
children: /* @__PURE__ */
|
|
645567
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Table, {
|
|
644372
645568
|
columns,
|
|
644373
645569
|
data: integrations,
|
|
644374
645570
|
getKey: (row) => row.alias || row.name
|
|
644375
645571
|
}, undefined, false, undefined, this)
|
|
644376
645572
|
}, undefined, false, undefined, this),
|
|
644377
|
-
integrations.length >= limit && /* @__PURE__ */
|
|
645573
|
+
integrations.length >= limit && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644378
645574
|
marginTop: 1,
|
|
644379
|
-
children: /* @__PURE__ */
|
|
645575
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644380
645576
|
dimColor: true,
|
|
644381
645577
|
children: [
|
|
644382
645578
|
"Showing first ",
|
|
644383
645579
|
limit,
|
|
644384
645580
|
" results. Use ",
|
|
644385
|
-
/* @__PURE__ */
|
|
645581
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644386
645582
|
color: "cyan",
|
|
644387
645583
|
children: "--limit"
|
|
644388
645584
|
}, undefined, false, undefined, this),
|
|
@@ -644390,13 +645586,13 @@ async function adkList(options = {}) {
|
|
|
644390
645586
|
]
|
|
644391
645587
|
}, undefined, true, undefined, this)
|
|
644392
645588
|
}, undefined, false, undefined, this),
|
|
644393
|
-
!options.available && /* @__PURE__ */
|
|
645589
|
+
!options.available && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644394
645590
|
marginTop: 1,
|
|
644395
|
-
children: /* @__PURE__ */
|
|
645591
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644396
645592
|
dimColor: true,
|
|
644397
645593
|
children: [
|
|
644398
645594
|
"Run ",
|
|
644399
|
-
/* @__PURE__ */
|
|
645595
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644400
645596
|
color: "cyan",
|
|
644401
645597
|
children: "adk list --available"
|
|
644402
645598
|
}, undefined, false, undefined, this),
|
|
@@ -644404,13 +645600,13 @@ async function adkList(options = {}) {
|
|
|
644404
645600
|
]
|
|
644405
645601
|
}, undefined, true, undefined, this)
|
|
644406
645602
|
}, undefined, false, undefined, this),
|
|
644407
|
-
options.available && /* @__PURE__ */
|
|
645603
|
+
options.available && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
644408
645604
|
marginTop: 1,
|
|
644409
|
-
children: /* @__PURE__ */
|
|
645605
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644410
645606
|
dimColor: true,
|
|
644411
645607
|
children: [
|
|
644412
645608
|
"Run ",
|
|
644413
|
-
/* @__PURE__ */
|
|
645609
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
644414
645610
|
color: "cyan",
|
|
644415
645611
|
children: "adk add <name>"
|
|
644416
645612
|
}, undefined, false, undefined, this),
|
|
@@ -644423,9 +645619,9 @@ async function adkList(options = {}) {
|
|
|
644423
645619
|
}
|
|
644424
645620
|
return null;
|
|
644425
645621
|
};
|
|
644426
|
-
render_default(/* @__PURE__ */
|
|
645622
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(ListIntegrations, {}, undefined, false, undefined, this));
|
|
644427
645623
|
}
|
|
644428
|
-
var import_react45,
|
|
645624
|
+
var import_react45, jsx_dev_runtime29;
|
|
644429
645625
|
var init_adk_list = __esm(async () => {
|
|
644430
645626
|
init_agent_root();
|
|
644431
645627
|
await __promiseAll([
|
|
@@ -644433,7 +645629,7 @@ var init_adk_list = __esm(async () => {
|
|
|
644433
645629
|
init_Table()
|
|
644434
645630
|
]);
|
|
644435
645631
|
import_react45 = __toESM(require_react(), 1);
|
|
644436
|
-
|
|
645632
|
+
jsx_dev_runtime29 = __toESM(require_jsx_dev_runtime(), 1);
|
|
644437
645633
|
});
|
|
644438
645634
|
|
|
644439
645635
|
// src/commands/adk-integration.tsx
|
|
@@ -644445,17 +645641,17 @@ function renderSchema(schema) {
|
|
|
644445
645641
|
try {
|
|
644446
645642
|
if (schema.type === "object" && schema.properties) {
|
|
644447
645643
|
const required2 = schema.required || [];
|
|
644448
|
-
return /* @__PURE__ */
|
|
645644
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644449
645645
|
marginLeft: 2,
|
|
644450
645646
|
flexDirection: "column",
|
|
644451
645647
|
children: Object.entries(schema.properties).map(([key, prop]) => {
|
|
644452
645648
|
const isRequired = required2.includes(key);
|
|
644453
|
-
return /* @__PURE__ */
|
|
645649
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644454
645650
|
dimColor: true,
|
|
644455
645651
|
children: [
|
|
644456
645652
|
"\u2022 ",
|
|
644457
645653
|
key,
|
|
644458
|
-
isRequired && /* @__PURE__ */
|
|
645654
|
+
isRequired && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644459
645655
|
color: "yellow",
|
|
644460
645656
|
children: "*"
|
|
644461
645657
|
}, undefined, false, undefined, this),
|
|
@@ -644467,9 +645663,9 @@ function renderSchema(schema) {
|
|
|
644467
645663
|
})
|
|
644468
645664
|
}, undefined, false, undefined, this);
|
|
644469
645665
|
}
|
|
644470
|
-
return /* @__PURE__ */
|
|
645666
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644471
645667
|
marginLeft: 2,
|
|
644472
|
-
children: /* @__PURE__ */
|
|
645668
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644473
645669
|
dimColor: true,
|
|
644474
645670
|
children: [
|
|
644475
645671
|
"Type: ",
|
|
@@ -644478,9 +645674,9 @@ function renderSchema(schema) {
|
|
|
644478
645674
|
}, undefined, true, undefined, this)
|
|
644479
645675
|
}, undefined, false, undefined, this);
|
|
644480
645676
|
} catch {
|
|
644481
|
-
return /* @__PURE__ */
|
|
645677
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644482
645678
|
marginLeft: 2,
|
|
644483
|
-
children: /* @__PURE__ */
|
|
645679
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644484
645680
|
dimColor: true,
|
|
644485
645681
|
children: JSON.stringify(schema)
|
|
644486
645682
|
}, undefined, false, undefined, this)
|
|
@@ -644514,16 +645710,16 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644514
645710
|
loadIntegration();
|
|
644515
645711
|
}, []);
|
|
644516
645712
|
if (status === "loading") {
|
|
644517
|
-
return /* @__PURE__ */
|
|
645713
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644518
645714
|
flexDirection: "column",
|
|
644519
|
-
children: /* @__PURE__ */
|
|
645715
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644520
645716
|
children: [
|
|
644521
|
-
/* @__PURE__ */
|
|
645717
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644522
645718
|
color: "cyan",
|
|
644523
645719
|
children: "\u27A4"
|
|
644524
645720
|
}, undefined, false, undefined, this),
|
|
644525
645721
|
" Loading integration ",
|
|
644526
|
-
/* @__PURE__ */
|
|
645722
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644527
645723
|
bold: true,
|
|
644528
645724
|
children: integrationName
|
|
644529
645725
|
}, undefined, false, undefined, this),
|
|
@@ -644533,23 +645729,23 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644533
645729
|
}, undefined, false, undefined, this);
|
|
644534
645730
|
}
|
|
644535
645731
|
if (status === "error") {
|
|
644536
|
-
return /* @__PURE__ */
|
|
645732
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644537
645733
|
flexDirection: "column",
|
|
644538
645734
|
children: [
|
|
644539
|
-
/* @__PURE__ */
|
|
645735
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644540
645736
|
color: "red",
|
|
644541
645737
|
children: [
|
|
644542
645738
|
"\u2717 Failed to load integration: ",
|
|
644543
645739
|
error
|
|
644544
645740
|
]
|
|
644545
645741
|
}, undefined, true, undefined, this),
|
|
644546
|
-
/* @__PURE__ */
|
|
645742
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644547
645743
|
marginTop: 1,
|
|
644548
|
-
children: /* @__PURE__ */
|
|
645744
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644549
645745
|
dimColor: true,
|
|
644550
645746
|
children: [
|
|
644551
645747
|
"Run ",
|
|
644552
|
-
/* @__PURE__ */
|
|
645748
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644553
645749
|
color: "cyan",
|
|
644554
645750
|
children: [
|
|
644555
645751
|
"adk search ",
|
|
@@ -644584,9 +645780,9 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644584
645780
|
output.configuration = integration.configuration;
|
|
644585
645781
|
output.configurations = integration.configurations;
|
|
644586
645782
|
}
|
|
644587
|
-
return /* @__PURE__ */
|
|
645783
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644588
645784
|
flexDirection: "column",
|
|
644589
|
-
children: /* @__PURE__ */
|
|
645785
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644590
645786
|
children: JSON.stringify(output, null, 2)
|
|
644591
645787
|
}, undefined, false, undefined, this)
|
|
644592
645788
|
}, undefined, false, undefined, this);
|
|
@@ -644594,15 +645790,15 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644594
645790
|
const actionsCount = integration.actions ? Object.keys(integration.actions).length : 0;
|
|
644595
645791
|
const channelsCount = integration.channels ? Object.keys(integration.channels).length : 0;
|
|
644596
645792
|
const eventsCount = integration.events ? Object.keys(integration.events).length : 0;
|
|
644597
|
-
return /* @__PURE__ */
|
|
645793
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644598
645794
|
flexDirection: "column",
|
|
644599
645795
|
children: [
|
|
644600
|
-
/* @__PURE__ */
|
|
645796
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644601
645797
|
bold: true,
|
|
644602
645798
|
children: [
|
|
644603
645799
|
integration.title || integration.name,
|
|
644604
645800
|
" ",
|
|
644605
|
-
/* @__PURE__ */
|
|
645801
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644606
645802
|
dimColor: true,
|
|
644607
645803
|
children: [
|
|
644608
645804
|
"v",
|
|
@@ -644611,18 +645807,18 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644611
645807
|
}, undefined, true, undefined, this)
|
|
644612
645808
|
]
|
|
644613
645809
|
}, undefined, true, undefined, this),
|
|
644614
|
-
integration.description && /* @__PURE__ */
|
|
645810
|
+
integration.description && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644615
645811
|
marginTop: 1,
|
|
644616
|
-
children: /* @__PURE__ */
|
|
645812
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644617
645813
|
dimColor: true,
|
|
644618
645814
|
children: integration.description
|
|
644619
645815
|
}, undefined, false, undefined, this)
|
|
644620
645816
|
}, undefined, false, undefined, this),
|
|
644621
|
-
showAll && /* @__PURE__ */
|
|
645817
|
+
showAll && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644622
645818
|
marginTop: 1,
|
|
644623
645819
|
flexDirection: "column",
|
|
644624
645820
|
children: [
|
|
644625
|
-
/* @__PURE__ */
|
|
645821
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644626
645822
|
dimColor: true,
|
|
644627
645823
|
children: [
|
|
644628
645824
|
"\u2022 ",
|
|
@@ -644631,7 +645827,7 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644631
645827
|
actionsCount !== 1 ? "s" : ""
|
|
644632
645828
|
]
|
|
644633
645829
|
}, undefined, true, undefined, this),
|
|
644634
|
-
/* @__PURE__ */
|
|
645830
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644635
645831
|
dimColor: true,
|
|
644636
645832
|
children: [
|
|
644637
645833
|
"\u2022 ",
|
|
@@ -644640,7 +645836,7 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644640
645836
|
channelsCount !== 1 ? "s" : ""
|
|
644641
645837
|
]
|
|
644642
645838
|
}, undefined, true, undefined, this),
|
|
644643
|
-
/* @__PURE__ */
|
|
645839
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644644
645840
|
dimColor: true,
|
|
644645
645841
|
children: [
|
|
644646
645842
|
"\u2022 ",
|
|
@@ -644651,23 +645847,23 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644651
645847
|
}, undefined, true, undefined, this)
|
|
644652
645848
|
]
|
|
644653
645849
|
}, undefined, true, undefined, this),
|
|
644654
|
-
(options.actions || showAll) && integration.actions && Object.keys(integration.actions).length > 0 && /* @__PURE__ */
|
|
645850
|
+
(options.actions || showAll) && integration.actions && Object.keys(integration.actions).length > 0 && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644655
645851
|
marginTop: 1,
|
|
644656
645852
|
flexDirection: "column",
|
|
644657
645853
|
children: [
|
|
644658
|
-
/* @__PURE__ */
|
|
645854
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644659
645855
|
bold: true,
|
|
644660
645856
|
children: "Actions"
|
|
644661
645857
|
}, undefined, false, undefined, this),
|
|
644662
|
-
Object.entries(integration.actions).map(([actionName, action]) => /* @__PURE__ */
|
|
645858
|
+
Object.entries(integration.actions).map(([actionName, action]) => /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644663
645859
|
marginTop: 1,
|
|
644664
645860
|
flexDirection: "column",
|
|
644665
645861
|
children: [
|
|
644666
|
-
/* @__PURE__ */
|
|
645862
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644667
645863
|
color: "cyan",
|
|
644668
645864
|
children: [
|
|
644669
645865
|
actionName,
|
|
644670
|
-
action.title && /* @__PURE__ */
|
|
645866
|
+
action.title && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644671
645867
|
dimColor: true,
|
|
644672
645868
|
children: [
|
|
644673
645869
|
" - ",
|
|
@@ -644676,29 +645872,29 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644676
645872
|
}, undefined, true, undefined, this)
|
|
644677
645873
|
]
|
|
644678
645874
|
}, undefined, true, undefined, this),
|
|
644679
|
-
action.description && /* @__PURE__ */
|
|
645875
|
+
action.description && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644680
645876
|
dimColor: true,
|
|
644681
645877
|
children: [
|
|
644682
645878
|
" ",
|
|
644683
645879
|
action.description
|
|
644684
645880
|
]
|
|
644685
645881
|
}, undefined, true, undefined, this),
|
|
644686
|
-
action.input?.schema && /* @__PURE__ */
|
|
645882
|
+
action.input?.schema && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644687
645883
|
marginLeft: 2,
|
|
644688
645884
|
flexDirection: "column",
|
|
644689
645885
|
children: [
|
|
644690
|
-
/* @__PURE__ */
|
|
645886
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644691
645887
|
dimColor: true,
|
|
644692
645888
|
children: "Input:"
|
|
644693
645889
|
}, undefined, false, undefined, this),
|
|
644694
645890
|
renderSchema(action.input.schema)
|
|
644695
645891
|
]
|
|
644696
645892
|
}, undefined, true, undefined, this),
|
|
644697
|
-
action.output?.schema && /* @__PURE__ */
|
|
645893
|
+
action.output?.schema && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644698
645894
|
marginLeft: 2,
|
|
644699
645895
|
flexDirection: "column",
|
|
644700
645896
|
children: [
|
|
644701
|
-
/* @__PURE__ */
|
|
645897
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644702
645898
|
dimColor: true,
|
|
644703
645899
|
children: "Output:"
|
|
644704
645900
|
}, undefined, false, undefined, this),
|
|
@@ -644709,23 +645905,23 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644709
645905
|
}, actionName, true, undefined, this))
|
|
644710
645906
|
]
|
|
644711
645907
|
}, undefined, true, undefined, this),
|
|
644712
|
-
(options.channels || showAll) && integration.channels && Object.keys(integration.channels).length > 0 && /* @__PURE__ */
|
|
645908
|
+
(options.channels || showAll) && integration.channels && Object.keys(integration.channels).length > 0 && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644713
645909
|
marginTop: 1,
|
|
644714
645910
|
flexDirection: "column",
|
|
644715
645911
|
children: [
|
|
644716
|
-
/* @__PURE__ */
|
|
645912
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644717
645913
|
bold: true,
|
|
644718
645914
|
children: "Channels"
|
|
644719
645915
|
}, undefined, false, undefined, this),
|
|
644720
|
-
Object.entries(integration.channels).map(([channelName, channel]) => /* @__PURE__ */
|
|
645916
|
+
Object.entries(integration.channels).map(([channelName, channel]) => /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644721
645917
|
marginTop: 1,
|
|
644722
645918
|
flexDirection: "column",
|
|
644723
645919
|
children: [
|
|
644724
|
-
/* @__PURE__ */
|
|
645920
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644725
645921
|
color: "cyan",
|
|
644726
645922
|
children: [
|
|
644727
645923
|
channelName,
|
|
644728
|
-
channel.title && /* @__PURE__ */
|
|
645924
|
+
channel.title && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644729
645925
|
dimColor: true,
|
|
644730
645926
|
children: [
|
|
644731
645927
|
" - ",
|
|
@@ -644734,7 +645930,7 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644734
645930
|
}, undefined, true, undefined, this)
|
|
644735
645931
|
]
|
|
644736
645932
|
}, undefined, true, undefined, this),
|
|
644737
|
-
channel.description && /* @__PURE__ */
|
|
645933
|
+
channel.description && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644738
645934
|
dimColor: true,
|
|
644739
645935
|
children: [
|
|
644740
645936
|
" ",
|
|
@@ -644745,23 +645941,23 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644745
645941
|
}, channelName, true, undefined, this))
|
|
644746
645942
|
]
|
|
644747
645943
|
}, undefined, true, undefined, this),
|
|
644748
|
-
(options.events || showAll) && integration.events && Object.keys(integration.events).length > 0 && /* @__PURE__ */
|
|
645944
|
+
(options.events || showAll) && integration.events && Object.keys(integration.events).length > 0 && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644749
645945
|
marginTop: 1,
|
|
644750
645946
|
flexDirection: "column",
|
|
644751
645947
|
children: [
|
|
644752
|
-
/* @__PURE__ */
|
|
645948
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644753
645949
|
bold: true,
|
|
644754
645950
|
children: "Events"
|
|
644755
645951
|
}, undefined, false, undefined, this),
|
|
644756
|
-
Object.entries(integration.events).map(([eventName, event3]) => /* @__PURE__ */
|
|
645952
|
+
Object.entries(integration.events).map(([eventName, event3]) => /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644757
645953
|
marginTop: 1,
|
|
644758
645954
|
flexDirection: "column",
|
|
644759
645955
|
children: [
|
|
644760
|
-
/* @__PURE__ */
|
|
645956
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644761
645957
|
color: "cyan",
|
|
644762
645958
|
children: [
|
|
644763
645959
|
eventName,
|
|
644764
|
-
event3.title && /* @__PURE__ */
|
|
645960
|
+
event3.title && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644765
645961
|
dimColor: true,
|
|
644766
645962
|
children: [
|
|
644767
645963
|
" - ",
|
|
@@ -644770,7 +645966,7 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644770
645966
|
}, undefined, true, undefined, this)
|
|
644771
645967
|
]
|
|
644772
645968
|
}, undefined, true, undefined, this),
|
|
644773
|
-
event3.description && /* @__PURE__ */
|
|
645969
|
+
event3.description && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644774
645970
|
dimColor: true,
|
|
644775
645971
|
children: [
|
|
644776
645972
|
" ",
|
|
@@ -644781,13 +645977,13 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644781
645977
|
}, eventName, true, undefined, this))
|
|
644782
645978
|
]
|
|
644783
645979
|
}, undefined, true, undefined, this),
|
|
644784
|
-
/* @__PURE__ */
|
|
645980
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
644785
645981
|
marginTop: 1,
|
|
644786
|
-
children: /* @__PURE__ */
|
|
645982
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644787
645983
|
dimColor: true,
|
|
644788
645984
|
children: [
|
|
644789
645985
|
"Run ",
|
|
644790
|
-
/* @__PURE__ */
|
|
645986
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
|
|
644791
645987
|
color: "cyan",
|
|
644792
645988
|
children: [
|
|
644793
645989
|
"adk add ",
|
|
@@ -644803,13 +645999,13 @@ async function adkIntegrationInfo(integrationName, options = {}) {
|
|
|
644803
645999
|
}
|
|
644804
646000
|
return null;
|
|
644805
646001
|
};
|
|
644806
|
-
render_default(/* @__PURE__ */
|
|
646002
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(IntegrationInfo, {}, undefined, false, undefined, this));
|
|
644807
646003
|
}
|
|
644808
|
-
var import_react46,
|
|
646004
|
+
var import_react46, jsx_dev_runtime30;
|
|
644809
646005
|
var init_adk_integration = __esm(async () => {
|
|
644810
646006
|
await init_build2();
|
|
644811
646007
|
import_react46 = __toESM(require_react(), 1);
|
|
644812
|
-
|
|
646008
|
+
jsx_dev_runtime30 = __toESM(require_jsx_dev_runtime(), 1);
|
|
644813
646009
|
});
|
|
644814
646010
|
|
|
644815
646011
|
// ../../node_modules/minipass/dist/esm/index.js
|
|
@@ -647534,7 +648730,7 @@ var init_winchars = __esm(() => {
|
|
|
647534
648730
|
|
|
647535
648731
|
// ../../node_modules/tar/dist/esm/write-entry.js
|
|
647536
648732
|
import fs27 from "fs";
|
|
647537
|
-
import
|
|
648733
|
+
import path48 from "path";
|
|
647538
648734
|
var prefixPath = (path35, prefix) => {
|
|
647539
648735
|
if (!prefix) {
|
|
647540
648736
|
return normalizeWindowsPath(path35);
|
|
@@ -647632,7 +648828,7 @@ var init_write_entry = __esm(() => {
|
|
|
647632
648828
|
this.path = decode(this.path.replace(/\\/g, "/"));
|
|
647633
648829
|
p = p.replace(/\\/g, "/");
|
|
647634
648830
|
}
|
|
647635
|
-
this.absolute = normalizeWindowsPath(opt.absolute ||
|
|
648831
|
+
this.absolute = normalizeWindowsPath(opt.absolute || path48.resolve(this.cwd, p));
|
|
647636
648832
|
if (this.path === "") {
|
|
647637
648833
|
this.path = "./";
|
|
647638
648834
|
}
|
|
@@ -647766,7 +648962,7 @@ var init_write_entry = __esm(() => {
|
|
|
647766
648962
|
throw new Error("cannot create link entry without stat");
|
|
647767
648963
|
}
|
|
647768
648964
|
this.type = "Link";
|
|
647769
|
-
this.linkpath = normalizeWindowsPath(
|
|
648965
|
+
this.linkpath = normalizeWindowsPath(path48.relative(this.cwd, linkpath));
|
|
647770
648966
|
this.stat.size = 0;
|
|
647771
648967
|
this[HEADER]();
|
|
647772
648968
|
this.end();
|
|
@@ -648481,7 +649677,7 @@ var init_esm14 = __esm(() => {
|
|
|
648481
649677
|
|
|
648482
649678
|
// ../../node_modules/tar/dist/esm/pack.js
|
|
648483
649679
|
import fs28 from "fs";
|
|
648484
|
-
import
|
|
649680
|
+
import path49 from "path";
|
|
648485
649681
|
|
|
648486
649682
|
class PackJob {
|
|
648487
649683
|
path;
|
|
@@ -648655,7 +649851,7 @@ var init_pack = __esm(() => {
|
|
|
648655
649851
|
return this.flowing;
|
|
648656
649852
|
}
|
|
648657
649853
|
[ADDTARENTRY](p) {
|
|
648658
|
-
const absolute = normalizeWindowsPath(
|
|
649854
|
+
const absolute = normalizeWindowsPath(path49.resolve(this.cwd, p.path));
|
|
648659
649855
|
if (!this.filter(p.path, p)) {
|
|
648660
649856
|
p.resume();
|
|
648661
649857
|
} else {
|
|
@@ -648668,7 +649864,7 @@ var init_pack = __esm(() => {
|
|
|
648668
649864
|
this[PROCESS4]();
|
|
648669
649865
|
}
|
|
648670
649866
|
[ADDFSENTRY](p) {
|
|
648671
|
-
const absolute = normalizeWindowsPath(
|
|
649867
|
+
const absolute = normalizeWindowsPath(path49.resolve(this.cwd, p));
|
|
648672
649868
|
this[QUEUE2].push(new PackJob(p, absolute));
|
|
648673
649869
|
this[PROCESS4]();
|
|
648674
649870
|
}
|
|
@@ -648896,7 +650092,7 @@ var init_pack = __esm(() => {
|
|
|
648896
650092
|
});
|
|
648897
650093
|
|
|
648898
650094
|
// ../../node_modules/tar/dist/esm/create.js
|
|
648899
|
-
import
|
|
650095
|
+
import path50 from "path";
|
|
648900
650096
|
var createFileSync = (opt, files) => {
|
|
648901
650097
|
const p = new PackSync(opt);
|
|
648902
650098
|
const stream5 = new WriteStreamSync(opt.file, {
|
|
@@ -648921,7 +650117,7 @@ var createFileSync = (opt, files) => {
|
|
|
648921
650117
|
files.forEach((file) => {
|
|
648922
650118
|
if (file.charAt(0) === "@") {
|
|
648923
650119
|
list({
|
|
648924
|
-
file:
|
|
650120
|
+
file: path50.resolve(p.cwd, file.slice(1)),
|
|
648925
650121
|
sync: true,
|
|
648926
650122
|
noResume: true,
|
|
648927
650123
|
onReadEntry: (entry) => p.add(entry)
|
|
@@ -648936,7 +650132,7 @@ var createFileSync = (opt, files) => {
|
|
|
648936
650132
|
const file = String(files[i2]);
|
|
648937
650133
|
if (file.charAt(0) === "@") {
|
|
648938
650134
|
await list({
|
|
648939
|
-
file:
|
|
650135
|
+
file: path50.resolve(String(p.cwd), file.slice(1)),
|
|
648940
650136
|
noResume: true,
|
|
648941
650137
|
onReadEntry: (entry) => {
|
|
648942
650138
|
p.add(entry);
|
|
@@ -648984,7 +650180,7 @@ var init_get_write_flag = __esm(() => {
|
|
|
648984
650180
|
|
|
648985
650181
|
// ../../node_modules/chownr/dist/esm/index.js
|
|
648986
650182
|
import fs30 from "fs";
|
|
648987
|
-
import
|
|
650183
|
+
import path51 from "path";
|
|
648988
650184
|
var lchownSync = (path35, uid, gid) => {
|
|
648989
650185
|
try {
|
|
648990
650186
|
return fs30.lchownSync(path35, uid, gid);
|
|
@@ -648998,14 +650194,14 @@ var lchownSync = (path35, uid, gid) => {
|
|
|
648998
650194
|
});
|
|
648999
650195
|
}, chownrKid = (p, child, uid, gid, cb4) => {
|
|
649000
650196
|
if (child.isDirectory()) {
|
|
649001
|
-
chownr(
|
|
650197
|
+
chownr(path51.resolve(p, child.name), uid, gid, (er3) => {
|
|
649002
650198
|
if (er3)
|
|
649003
650199
|
return cb4(er3);
|
|
649004
|
-
const cpath =
|
|
650200
|
+
const cpath = path51.resolve(p, child.name);
|
|
649005
650201
|
chown(cpath, uid, gid, cb4);
|
|
649006
650202
|
});
|
|
649007
650203
|
} else {
|
|
649008
|
-
const cpath =
|
|
650204
|
+
const cpath = path51.resolve(p, child.name);
|
|
649009
650205
|
chown(cpath, uid, gid, cb4);
|
|
649010
650206
|
}
|
|
649011
650207
|
}, chownr = (p, uid, gid, cb4) => {
|
|
@@ -649034,8 +650230,8 @@ var lchownSync = (path35, uid, gid) => {
|
|
|
649034
650230
|
});
|
|
649035
650231
|
}, chownrKidSync = (p, child, uid, gid) => {
|
|
649036
650232
|
if (child.isDirectory())
|
|
649037
|
-
chownrSync(
|
|
649038
|
-
lchownSync(
|
|
650233
|
+
chownrSync(path51.resolve(p, child.name), uid, gid);
|
|
650234
|
+
lchownSync(path51.resolve(p, child.name), uid, gid);
|
|
649039
650235
|
}, chownrSync = (p, uid, gid) => {
|
|
649040
650236
|
let children;
|
|
649041
650237
|
try {
|
|
@@ -649096,7 +650292,7 @@ var init_symlink_error = __esm(() => {
|
|
|
649096
650292
|
// ../../node_modules/tar/dist/esm/mkdir.js
|
|
649097
650293
|
import fs31 from "fs";
|
|
649098
650294
|
import fsp from "fs/promises";
|
|
649099
|
-
import
|
|
650295
|
+
import path53 from "path";
|
|
649100
650296
|
var checkCwd = (dir, cb4) => {
|
|
649101
650297
|
fs31.stat(dir, (er3, st4) => {
|
|
649102
650298
|
if (er3 || !st4.isDirectory()) {
|
|
@@ -649134,7 +650330,7 @@ var checkCwd = (dir, cb4) => {
|
|
|
649134
650330
|
if (preserve) {
|
|
649135
650331
|
return fsp.mkdir(dir, { mode, recursive: true }).then((made) => done(null, made ?? undefined), done);
|
|
649136
650332
|
}
|
|
649137
|
-
const sub = normalizeWindowsPath(
|
|
650333
|
+
const sub = normalizeWindowsPath(path53.relative(cwd3, dir));
|
|
649138
650334
|
const parts = sub.split("/");
|
|
649139
650335
|
mkdir_(cwd3, parts, mode, unlink2, cwd3, undefined, done);
|
|
649140
650336
|
}, mkdir_ = (base3, parts, mode, unlink2, cwd3, created, cb4) => {
|
|
@@ -649142,7 +650338,7 @@ var checkCwd = (dir, cb4) => {
|
|
|
649142
650338
|
return cb4(null, created);
|
|
649143
650339
|
}
|
|
649144
650340
|
const p = parts.shift();
|
|
649145
|
-
const part = normalizeWindowsPath(
|
|
650341
|
+
const part = normalizeWindowsPath(path53.resolve(base3 + "/" + p));
|
|
649146
650342
|
fs31.mkdir(part, mode, onmkdir(part, parts, mode, unlink2, cwd3, created, cb4));
|
|
649147
650343
|
}, onmkdir = (part, parts, mode, unlink2, cwd3, created, cb4) => (er3) => {
|
|
649148
650344
|
if (er3) {
|
|
@@ -649207,11 +650403,11 @@ var checkCwd = (dir, cb4) => {
|
|
|
649207
650403
|
if (preserve) {
|
|
649208
650404
|
return done(fs31.mkdirSync(dir, { mode, recursive: true }) ?? undefined);
|
|
649209
650405
|
}
|
|
649210
|
-
const sub = normalizeWindowsPath(
|
|
650406
|
+
const sub = normalizeWindowsPath(path53.relative(cwd3, dir));
|
|
649211
650407
|
const parts = sub.split("/");
|
|
649212
650408
|
let created = undefined;
|
|
649213
650409
|
for (let p = parts.shift(), part = cwd3;p && (part += "/" + p); p = parts.shift()) {
|
|
649214
|
-
part = normalizeWindowsPath(
|
|
650410
|
+
part = normalizeWindowsPath(path53.resolve(part));
|
|
649215
650411
|
try {
|
|
649216
650412
|
fs31.mkdirSync(part, mode);
|
|
649217
650413
|
created = created || part;
|
|
@@ -649264,7 +650460,7 @@ var init_normalize_unicode = __esm(() => {
|
|
|
649264
650460
|
});
|
|
649265
650461
|
|
|
649266
650462
|
// ../../node_modules/tar/dist/esm/path-reservations.js
|
|
649267
|
-
import { join as
|
|
650463
|
+
import { join as join17 } from "path";
|
|
649268
650464
|
|
|
649269
650465
|
class PathReservations {
|
|
649270
650466
|
#queues = new Map;
|
|
@@ -649272,7 +650468,7 @@ class PathReservations {
|
|
|
649272
650468
|
#running = new Set;
|
|
649273
650469
|
reserve(paths, fn4) {
|
|
649274
650470
|
paths = isWindows4 ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
649275
|
-
return stripTrailingSlashes(
|
|
650471
|
+
return stripTrailingSlashes(join17(normalizeUnicode(p))).toLowerCase();
|
|
649276
650472
|
});
|
|
649277
650473
|
const dirs = new Set(paths.map((path35) => getDirs(path35)).reduce((a2, b4) => a2.concat(b4)));
|
|
649278
650474
|
this.#reservations.set(fn4, { dirs, paths });
|
|
@@ -649377,7 +650573,7 @@ var platform6, isWindows4, getDirs = (path35) => {
|
|
|
649377
650573
|
const dirs = path35.split("/").slice(0, -1).reduce((set, path45) => {
|
|
649378
650574
|
const s2 = set[set.length - 1];
|
|
649379
650575
|
if (s2 !== undefined) {
|
|
649380
|
-
path45 =
|
|
650576
|
+
path45 = join17(s2, path45);
|
|
649381
650577
|
}
|
|
649382
650578
|
set.push(path45 || "/");
|
|
649383
650579
|
return set;
|
|
@@ -649394,7 +650590,7 @@ var init_path_reservations = __esm(() => {
|
|
|
649394
650590
|
import assert5 from "assert";
|
|
649395
650591
|
import { randomBytes as randomBytes2 } from "crypto";
|
|
649396
650592
|
import fs33 from "fs";
|
|
649397
|
-
import
|
|
650593
|
+
import path55 from "path";
|
|
649398
650594
|
var ONENTRY, CHECKFS, CHECKFS2, ISREUSABLE, MAKEFS, FILE2, DIRECTORY2, LINK, SYMLINK2, HARDLINK2, UNSUPPORTED, CHECKPATH, MKDIR, ONERROR, PENDING, PEND, UNPEND, ENDED3, MAYBECLOSE, SKIP, DOCHOWN, UID, GID, CHECKED_CWD, platform7, isWindows5, DEFAULT_MAX_DEPTH = 1024, unlinkFile = (path35, cb4) => {
|
|
649399
650595
|
if (!isWindows5) {
|
|
649400
650596
|
return fs33.unlink(path35, cb4);
|
|
@@ -649522,7 +650718,7 @@ var init_unpack = __esm(() => {
|
|
|
649522
650718
|
this.noMtime = !!opt.noMtime;
|
|
649523
650719
|
this.preservePaths = !!opt.preservePaths;
|
|
649524
650720
|
this.unlink = !!opt.unlink;
|
|
649525
|
-
this.cwd = normalizeWindowsPath(
|
|
650721
|
+
this.cwd = normalizeWindowsPath(path55.resolve(opt.cwd || process.cwd()));
|
|
649526
650722
|
this.strip = Number(opt.strip) || 0;
|
|
649527
650723
|
this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask();
|
|
649528
650724
|
this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask;
|
|
@@ -649587,10 +650783,10 @@ var init_unpack = __esm(() => {
|
|
|
649587
650783
|
});
|
|
649588
650784
|
}
|
|
649589
650785
|
}
|
|
649590
|
-
if (
|
|
649591
|
-
entry.absolute = normalizeWindowsPath(
|
|
650786
|
+
if (path55.isAbsolute(entry.path)) {
|
|
650787
|
+
entry.absolute = normalizeWindowsPath(path55.resolve(entry.path));
|
|
649592
650788
|
} else {
|
|
649593
|
-
entry.absolute = normalizeWindowsPath(
|
|
650789
|
+
entry.absolute = normalizeWindowsPath(path55.resolve(this.cwd, entry.path));
|
|
649594
650790
|
}
|
|
649595
650791
|
if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
|
|
649596
650792
|
this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
@@ -649605,9 +650801,9 @@ var init_unpack = __esm(() => {
|
|
|
649605
650801
|
return false;
|
|
649606
650802
|
}
|
|
649607
650803
|
if (this.win32) {
|
|
649608
|
-
const { root: aRoot } =
|
|
650804
|
+
const { root: aRoot } = path55.win32.parse(String(entry.absolute));
|
|
649609
650805
|
entry.absolute = aRoot + encode5(String(entry.absolute).slice(aRoot.length));
|
|
649610
|
-
const { root: pRoot } =
|
|
650806
|
+
const { root: pRoot } = path55.win32.parse(entry.path);
|
|
649611
650807
|
entry.path = pRoot + encode5(entry.path.slice(pRoot.length));
|
|
649612
650808
|
}
|
|
649613
650809
|
return true;
|
|
@@ -649770,7 +650966,7 @@ var init_unpack = __esm(() => {
|
|
|
649770
650966
|
this[LINK](entry, String(entry.linkpath), "symlink", done);
|
|
649771
650967
|
}
|
|
649772
650968
|
[HARDLINK2](entry, done) {
|
|
649773
|
-
const linkpath = normalizeWindowsPath(
|
|
650969
|
+
const linkpath = normalizeWindowsPath(path55.resolve(this.cwd, String(entry.linkpath)));
|
|
649774
650970
|
this[LINK](entry, linkpath, "link", done);
|
|
649775
650971
|
}
|
|
649776
650972
|
[PEND]() {
|
|
@@ -649812,7 +651008,7 @@ var init_unpack = __esm(() => {
|
|
|
649812
651008
|
};
|
|
649813
651009
|
const start = () => {
|
|
649814
651010
|
if (entry.absolute !== this.cwd) {
|
|
649815
|
-
const parent2 = normalizeWindowsPath(
|
|
651011
|
+
const parent2 = normalizeWindowsPath(path55.dirname(String(entry.absolute)));
|
|
649816
651012
|
if (parent2 !== this.cwd) {
|
|
649817
651013
|
return this[MKDIR](parent2, this.dmode, (er3) => {
|
|
649818
651014
|
if (er3) {
|
|
@@ -649907,7 +651103,7 @@ var init_unpack = __esm(() => {
|
|
|
649907
651103
|
this[CHECKED_CWD] = true;
|
|
649908
651104
|
}
|
|
649909
651105
|
if (entry.absolute !== this.cwd) {
|
|
649910
|
-
const parent2 = normalizeWindowsPath(
|
|
651106
|
+
const parent2 = normalizeWindowsPath(path55.dirname(String(entry.absolute)));
|
|
649911
651107
|
if (parent2 !== this.cwd) {
|
|
649912
651108
|
const mkParent = this[MKDIR](parent2, this.dmode);
|
|
649913
651109
|
if (mkParent) {
|
|
@@ -650097,7 +651293,7 @@ var init_extract2 = __esm(() => {
|
|
|
650097
651293
|
|
|
650098
651294
|
// ../../node_modules/tar/dist/esm/replace.js
|
|
650099
651295
|
import fs36 from "fs";
|
|
650100
|
-
import
|
|
651296
|
+
import path56 from "path";
|
|
650101
651297
|
var replaceSync = (opt, files) => {
|
|
650102
651298
|
const p = new PackSync(opt);
|
|
650103
651299
|
let threw = true;
|
|
@@ -650243,7 +651439,7 @@ var replaceSync = (opt, files) => {
|
|
|
650243
651439
|
files.forEach((file) => {
|
|
650244
651440
|
if (file.charAt(0) === "@") {
|
|
650245
651441
|
list({
|
|
650246
|
-
file:
|
|
651442
|
+
file: path56.resolve(p.cwd, file.slice(1)),
|
|
650247
651443
|
sync: true,
|
|
650248
651444
|
noResume: true,
|
|
650249
651445
|
onReadEntry: (entry) => p.add(entry)
|
|
@@ -650258,7 +651454,7 @@ var replaceSync = (opt, files) => {
|
|
|
650258
651454
|
const file = String(files[i2]);
|
|
650259
651455
|
if (file.charAt(0) === "@") {
|
|
650260
651456
|
await list({
|
|
650261
|
-
file:
|
|
651457
|
+
file: path56.resolve(String(p.cwd), file.slice(1)),
|
|
650262
651458
|
noResume: true,
|
|
650263
651459
|
onReadEntry: (entry) => p.add(entry)
|
|
650264
651460
|
});
|
|
@@ -652103,8 +653299,8 @@ var require_adm_zip = __commonJS((exports, module) => {
|
|
|
652103
653299
|
return null;
|
|
652104
653300
|
}
|
|
652105
653301
|
function fixPath(zipPath) {
|
|
652106
|
-
const { join:
|
|
652107
|
-
return
|
|
653302
|
+
const { join: join10, normalize: normalize2, sep: sep2 } = pth.posix;
|
|
653303
|
+
return join10(".", normalize2(sep2 + zipPath.split("\\").join(sep2) + sep2));
|
|
652108
653304
|
}
|
|
652109
653305
|
function filenameFilter(filterfn) {
|
|
652110
653306
|
if (filterfn instanceof RegExp) {
|
|
@@ -652628,8 +653824,8 @@ var exports_upgrade = {};
|
|
|
652628
653824
|
__export(exports_upgrade, {
|
|
652629
653825
|
adkSelfUpgrade: () => adkSelfUpgrade
|
|
652630
653826
|
});
|
|
652631
|
-
import { existsSync as existsSync16, writeFileSync as writeFileSync5, chmodSync, renameSync, unlinkSync, readFileSync as
|
|
652632
|
-
import { join as
|
|
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";
|
|
652633
653829
|
import { tmpdir } from "os";
|
|
652634
653830
|
import { execSync as execSync4 } from "child_process";
|
|
652635
653831
|
function getPlatformInfo() {
|
|
@@ -652675,17 +653871,17 @@ async function downloadBinary(version, target, extension) {
|
|
|
652675
653871
|
throw new Error(`Failed to download: ${response.status} ${response.statusText}`);
|
|
652676
653872
|
}
|
|
652677
653873
|
const buffer = Buffer.from(await response.arrayBuffer());
|
|
652678
|
-
const tmpDir =
|
|
653874
|
+
const tmpDir = join18(tmpdir(), `adk-upgrade-${Date.now()}`);
|
|
652679
653875
|
mkdirSync5(tmpDir, { recursive: true });
|
|
652680
|
-
const tarPath =
|
|
653876
|
+
const tarPath = join18(tmpDir, "adk.tar.gz");
|
|
652681
653877
|
writeFileSync5(tarPath, buffer);
|
|
652682
653878
|
extract2({
|
|
652683
653879
|
file: tarPath,
|
|
652684
653880
|
cwd: tmpDir,
|
|
652685
653881
|
sync: true
|
|
652686
653882
|
});
|
|
652687
|
-
const binaryPath =
|
|
652688
|
-
const binaryBuffer =
|
|
653883
|
+
const binaryPath = join18(tmpDir, fileName);
|
|
653884
|
+
const binaryBuffer = readFileSync15(binaryPath);
|
|
652689
653885
|
try {
|
|
652690
653886
|
unlinkSync(tarPath);
|
|
652691
653887
|
unlinkSync(binaryPath);
|
|
@@ -652723,7 +653919,7 @@ timeout /t 1 /nobreak >nul
|
|
|
652723
653919
|
move /y "${currentPath}.new" "${currentPath}"
|
|
652724
653920
|
del "%~f0"
|
|
652725
653921
|
`.trim();
|
|
652726
|
-
const batchPath =
|
|
653922
|
+
const batchPath = join18(tmpdir(), "adk-upgrade.bat");
|
|
652727
653923
|
writeFileSync5(batchPath, batchScript);
|
|
652728
653924
|
writeFileSync5(currentPath + ".new", newBinaryBuffer);
|
|
652729
653925
|
console.log("\u2705 Update downloaded!");
|
|
@@ -652899,8 +654095,8 @@ async function adkAssetsSync(options) {
|
|
|
652899
654095
|
return;
|
|
652900
654096
|
}
|
|
652901
654097
|
if (!options?.yes) {
|
|
652902
|
-
const
|
|
652903
|
-
const rl2 =
|
|
654098
|
+
const readline2 = await import("readline");
|
|
654099
|
+
const rl2 = readline2.createInterface({
|
|
652904
654100
|
input: process.stdin,
|
|
652905
654101
|
output: process.stdout
|
|
652906
654102
|
});
|
|
@@ -653225,8 +654421,8 @@ var {
|
|
|
653225
654421
|
} = import__.default;
|
|
653226
654422
|
|
|
653227
654423
|
// src/cli.ts
|
|
653228
|
-
import { readFileSync as
|
|
653229
|
-
import { join as
|
|
654424
|
+
import { readFileSync as readFileSync16 } from "fs";
|
|
654425
|
+
import { join as join19, dirname as dirname3 } from "path";
|
|
653230
654426
|
import { fileURLToPath as fileURLToPath9 } from "url";
|
|
653231
654427
|
|
|
653232
654428
|
// src/utils/version-check.tsx
|
|
@@ -653466,11 +654662,8 @@ if (!checkNodeVersion(true)) {
|
|
|
653466
654662
|
checkNodeVersion(false);
|
|
653467
654663
|
process.exit(1);
|
|
653468
654664
|
}
|
|
653469
|
-
var
|
|
653470
|
-
|
|
653471
|
-
var packageJsonPath = existsSync17(join18(__dirname5, "package.json")) ? join18(__dirname5, "package.json") : join18(__dirname5, "../package.json");
|
|
653472
|
-
var packageJson = JSON.parse(readFileSync15(packageJsonPath, "utf-8"));
|
|
653473
|
-
var CLI_VERSION = packageJson.version;
|
|
654665
|
+
var CLI_VERSION = "1.7.12";
|
|
654666
|
+
|
|
653474
654667
|
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({
|
|
653475
654668
|
formatHelp: () => formatHelp(program, CLI_VERSION)
|
|
653476
654669
|
});
|
|
@@ -653507,10 +654700,10 @@ program.command("build").description("Build the agent for production").action(as
|
|
|
653507
654700
|
process.exit(1);
|
|
653508
654701
|
}
|
|
653509
654702
|
});
|
|
653510
|
-
program.command("deploy").description("Deploy the agent to Botpress").option("-e, --env <environment>", "deployment environment", "production").action(async (options) => {
|
|
654703
|
+
program.command("deploy").description("Deploy the agent to Botpress").option("-e, --env <environment>", "deployment environment", "production").option("-y, --yes", "auto-approve preflight changes without prompting").action(async (options) => {
|
|
653511
654704
|
try {
|
|
653512
654705
|
const { adkDeploy: adkDeploy2 } = await init_adk_deploy().then(() => exports_adk_deploy);
|
|
653513
|
-
await adkDeploy2(options.env);
|
|
654706
|
+
await adkDeploy2(options.env, { autoApprove: options.yes });
|
|
653514
654707
|
} catch (error) {
|
|
653515
654708
|
console.error("Error:", error instanceof Error ? error.message : String(error));
|
|
653516
654709
|
process.exit(1);
|