@botpress/adk-cli 1.7.11 → 1.7.13

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 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.11", adk: "1.7.11", sdk: "4.19.0", llmz: "0.0.31", zai: "2.5.0", cognitive: "0.2.0" };
346927
+ define_PACKAGE_VERSIONS_default = { runtime: "1.7.13", adk: "1.7.13", sdk: "4.19.0", llmz: "0.0.31", zai: "2.5.0", cognitive: "0.2.0" };
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,33 @@ 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 { readFileSync as readFileSync5 } from "fs";
623995
+ import { join as join8 } from "path";
623990
623996
 
623991
623997
  class ValidationErrors {
623992
623998
  static $type = "ValidationError";
623993
623999
  static isValidationError(error) {
623994
624000
  return error !== null && typeof error === "object" && "$type" in error && error.$type === "ValidationError";
623995
624001
  }
623996
- static directoryNotFound(path31) {
624002
+ static directoryNotFound(path34) {
623997
624003
  return {
623998
624004
  $type: ValidationErrors.$type,
623999
624005
  code: "DIRECTORY_NOT_FOUND",
624000
624006
  severity: "error",
624001
- message: `Project directory not found: ${path31}`,
624007
+ message: `Project directory not found: ${path34}`,
624002
624008
  hint: "Ensure the directory exists and you have permission to access it",
624003
- context: { path: path31 }
624009
+ context: { path: path34 }
624004
624010
  };
624005
624011
  }
624006
- static directoryAccessError(path31, error) {
624012
+ static directoryAccessError(path34, error) {
624007
624013
  return {
624008
624014
  $type: ValidationErrors.$type,
624009
624015
  code: "DIRECTORY_ACCESS_ERROR",
624010
624016
  severity: "error",
624011
624017
  message: `Cannot access project directory: ${error}`,
624012
624018
  hint: "Check file system permissions",
624013
- context: { path: path31, error }
624019
+ context: { path: path34, error }
624014
624020
  };
624015
624021
  }
624016
624022
  static requiredFileMissing(file) {
@@ -625926,7 +625932,7 @@ class IntegrationManager {
625926
625932
  return { valid: false, errors, warnings };
625927
625933
  }
625928
625934
  const hasChannels = integration.definition.channels && Object.keys(integration.definition.channels).length > 0;
625929
- if (!integration.connection) {
625935
+ if (!integration.config) {
625930
625936
  let requiresConfig = false;
625931
625937
  if (integration.definition.configurations) {
625932
625938
  requiresConfig = Object.values(integration.definition.configurations).some((config) => config.identifier?.required === true);
@@ -625937,7 +625943,7 @@ class IntegrationManager {
625937
625943
  requiresConfig = schema?.required && schema.required.length > 0;
625938
625944
  }
625939
625945
  if (requiresConfig) {
625940
- warnings.push(`Integration '${integration.alias}' requires configuration. Add a connection in agent.config.ts dependencies`);
625946
+ warnings.push(`Integration '${integration.alias}' requires configuration. Add a config object in agent.config.ts dependencies`);
625941
625947
  }
625942
625948
  }
625943
625949
  return {
@@ -626515,8 +626521,8 @@ class IntegrationChecker {
626515
626521
  }
626516
626522
  }
626517
626523
  if (!installedIntegration) {
626518
- result.needsInstall = true;
626519
- if (config) {
626524
+ result.needsInstall = enabled !== false;
626525
+ if (result.needsInstall && config) {
626520
626526
  result.needsConfiguration = true;
626521
626527
  }
626522
626528
  } else {
@@ -626530,24 +626536,23 @@ class IntegrationChecker {
626530
626536
  const configType = configurationType ?? installedIntegration.configurationType ?? "default";
626531
626537
  const schema = configType === "default" ? definition.configuration?.schema : definition.configurations?.[configType]?.schema;
626532
626538
  const schemaProperties = schema?.properties || {};
626533
- const propertyKeys = Object.keys(schemaProperties);
626534
- const filterConfig = (cfg) => {
626535
- const filtered = {};
626536
- for (const key of propertyKeys) {
626537
- if (key in cfg) {
626538
- filtered[key] = cfg[key];
626539
- }
626540
- }
626541
- return filtered;
626542
- };
626543
- const currentConfig = filterConfig(installedIntegration.configuration || {});
626544
- const desiredConfig = filterConfig(config || {});
626545
- if (JSON.stringify(currentConfig) !== JSON.stringify(desiredConfig)) {
626539
+ const allKeys = new Set([
626540
+ ...Object.keys(installedIntegration.configuration || {}),
626541
+ ...Object.keys(config || {})
626542
+ ]);
626543
+ const configsMatch = Array.from(allKeys).every((key) => {
626544
+ const currentValue = installedIntegration.configuration?.[key] ?? schemaProperties[key]?.default;
626545
+ const desiredValue = config?.[key] ?? schemaProperties[key]?.default;
626546
+ return JSON.stringify(currentValue) === JSON.stringify(desiredValue);
626547
+ });
626548
+ if (!configsMatch) {
626546
626549
  result.needsConfiguration = true;
626547
626550
  }
626548
626551
  }
626549
- if (enabled !== undefined) {
626550
- if (enabled === false && installedIntegration.enabled || enabled === true && !installedIntegration.enabled) {
626552
+ if (enabled !== undefined && enabled !== installedIntegration.enabled) {
626553
+ if (enabled === false) {
626554
+ result.needsRemoval = true;
626555
+ } else if (enabled === true && result.installStatus === "disabled") {
626551
626556
  result.needsConfiguration = true;
626552
626557
  }
626553
626558
  }
@@ -626556,6 +626561,98 @@ class IntegrationChecker {
626556
626561
  }
626557
626562
  }
626558
626563
 
626564
+ class IntegrationSyncManager {
626565
+ projectPath;
626566
+ client;
626567
+ constructor(projectPath) {
626568
+ this.projectPath = projectPath;
626569
+ }
626570
+ async getClient() {
626571
+ if (!this.client) {
626572
+ const credentials = await auth.getActiveCredentials();
626573
+ const project = await AgentProject.load(this.projectPath);
626574
+ const workspaceId = project.agentInfo?.workspaceId || credentials.workspaceId;
626575
+ if (!workspaceId) {
626576
+ throw new Error('No workspace ID found. Please login with "adk login"');
626577
+ }
626578
+ this.client = new Vx({
626579
+ token: credentials.token,
626580
+ apiUrl: credentials.apiUrl,
626581
+ workspaceId,
626582
+ headers: {
626583
+ "x-multiple-integrations": "true"
626584
+ }
626585
+ });
626586
+ }
626587
+ return this.client;
626588
+ }
626589
+ async applySyncPlan(checkResults, botId) {
626590
+ const summary = {
626591
+ installed: 0,
626592
+ updated: 0,
626593
+ removed: 0,
626594
+ failed: 0,
626595
+ errors: []
626596
+ };
626597
+ const client = await this.getClient();
626598
+ for (const result of checkResults) {
626599
+ if (result.needsRemoval && result.installStatus !== "not_installed") {
626600
+ try {
626601
+ await client.updateBot({
626602
+ id: botId,
626603
+ integrations: {
626604
+ [result.alias]: null
626605
+ }
626606
+ });
626607
+ summary.removed++;
626608
+ } catch (error) {
626609
+ const errorMsg = error instanceof Error ? error.message : String(error);
626610
+ summary.failed++;
626611
+ summary.errors.push({ alias: result.alias, error: errorMsg });
626612
+ }
626613
+ } else if (result.needsInstall) {
626614
+ try {
626615
+ await client.updateBot({
626616
+ id: botId,
626617
+ integrations: {
626618
+ [result.alias]: {
626619
+ integrationId: result.desiredIntegrationId || result.definition.id,
626620
+ enabled: result.desiredInstallStatus === "enabled",
626621
+ configuration: result.desiredConfiguration || {}
626622
+ }
626623
+ }
626624
+ });
626625
+ summary.installed++;
626626
+ } catch (error) {
626627
+ const errorMsg = error instanceof Error ? error.message : String(error);
626628
+ summary.failed++;
626629
+ summary.errors.push({ alias: result.alias, error: errorMsg });
626630
+ }
626631
+ } else if ((result.needsUpdate || result.needsConfiguration) && result.installStatus !== "not_installed") {
626632
+ try {
626633
+ await client.updateBot({
626634
+ id: botId,
626635
+ integrations: {
626636
+ [result.alias]: {
626637
+ integrationId: result.desiredIntegrationId || result.definition.id,
626638
+ enabled: result.desiredInstallStatus === "enabled",
626639
+ configuration: result.desiredConfiguration || {},
626640
+ configurationType: result.desiredConfigurationType
626641
+ }
626642
+ }
626643
+ });
626644
+ summary.updated++;
626645
+ } catch (error) {
626646
+ const errorMsg = error instanceof Error ? error.message : String(error);
626647
+ summary.failed++;
626648
+ summary.errors.push({ alias: result.alias, error: errorMsg });
626649
+ }
626650
+ }
626651
+ }
626652
+ return summary;
626653
+ }
626654
+ }
626655
+
626559
626656
  class EnhancedInterfaceCache {
626560
626657
  cacheDir;
626561
626658
  resolutionsDir;
@@ -627003,7 +627100,7 @@ class AgentProjectGenerator {
627003
627100
  deploy: "adk deploy"
627004
627101
  },
627005
627102
  dependencies: {
627006
- "@botpress/runtime": "^1.7.11"
627103
+ "@botpress/runtime": "^1.7.13"
627007
627104
  },
627008
627105
  devDependencies: {
627009
627106
  typescript: "^5.9.3"
@@ -628621,9 +628718,13 @@ declare module "@botpress/runtime/_types/state" {
628621
628718
  const integrations = project.dependencies?.integrations || {};
628622
628719
  const imports = [];
628623
628720
  const integrationDefs = [];
628624
- for (const alias of Object.keys(integrations).map(getIntegrationAlias)) {
628625
- imports.push(`import integration_${alias} from "../bp_modules/integration_${alias}";`);
628626
- integrationDefs.push(`${alias}: integration_${alias}`);
628721
+ for (const [alias, config] of Object.entries(integrations)) {
628722
+ if (config.enabled === false) {
628723
+ continue;
628724
+ }
628725
+ const normalizedAlias = getIntegrationAlias(alias);
628726
+ imports.push(`import integration_${normalizedAlias} from "../bp_modules/integration_${normalizedAlias}";`);
628727
+ integrationDefs.push(`${normalizedAlias}: integration_${normalizedAlias}`);
628627
628728
  }
628628
628729
  const content = dedent_default`
628629
628730
  import { IntegrationPackage } from "@botpress/sdk";
@@ -628667,10 +628768,13 @@ declare module "@botpress/runtime/_types/state" {
628667
628768
  const integrations = project.integrations;
628668
628769
  const imports = [];
628669
628770
  const addIntegrations = [];
628670
- for (const { alias } of integrations.filter((i2) => i2.enabled)) {
628771
+ for (const integration of integrations.filter((i2) => i2.enabled)) {
628772
+ const { alias, configurationType, config } = integration;
628671
628773
  const importName = `integration_${getIntegrationAlias(alias)}`;
628672
628774
  imports.push(`import ${importName} from "./bp_modules/${importName}";`);
628673
- addIntegrations.push(`bot.addIntegration(${importName}, { alias: "${alias}" });`);
628775
+ const configType = configurationType ? `, configurationType: "${configurationType}"` : "";
628776
+ const configData = config && Object.keys(config).length > 0 ? `, configuration: ${JSON.stringify(config)}` : "";
628777
+ addIntegrations.push(`bot.addIntegration(${importName}, { alias: "${alias}", enabled: true${configType}${configData} });`);
628674
628778
  }
628675
628779
  const conversationTags = {};
628676
628780
  const workflowTags = {};
@@ -629575,7 +629679,351 @@ class TableManager {
629575
629679
  };
629576
629680
  }
629577
629681
  }
629578
- var import_ts_morph, __defProp9, __export7 = (target, all4) => {
629682
+ function hasIntegrationChanges(integrations) {
629683
+ return integrations.toInstall.length > 0 || integrations.toRemove.length > 0 || integrations.toUpdate.length > 0;
629684
+ }
629685
+ function pluralize2(count2, word) {
629686
+ return `${count2} ${word}${count2 > 1 ? "s" : ""}`;
629687
+ }
629688
+
629689
+ class AgentConfigSyncManager {
629690
+ client;
629691
+ constructor(client) {
629692
+ this.client = client;
629693
+ }
629694
+ async performSync(botId, updates, options) {
629695
+ if (Object.keys(updates).length === 0) {
629696
+ return false;
629697
+ }
629698
+ try {
629699
+ options?.onProgress?.("Updating bot configuration...");
629700
+ await this.client.updateBot({ id: botId, ...updates });
629701
+ options?.onSuccess?.("Bot configuration updated");
629702
+ return true;
629703
+ } catch (error) {
629704
+ const errorMsg = error instanceof Error ? error.message : String(error);
629705
+ options?.onError?.(`Failed to sync agent config: ${errorMsg}`);
629706
+ throw error;
629707
+ }
629708
+ }
629709
+ async syncFromConfig(botId, config, options) {
629710
+ const updates = {};
629711
+ if (config.name !== undefined) {
629712
+ updates.name = config.name;
629713
+ }
629714
+ return this.performSync(botId, updates, options);
629715
+ }
629716
+ async syncFromChanges(botId, configChanges, options) {
629717
+ if (!configChanges || configChanges.length === 0) {
629718
+ return false;
629719
+ }
629720
+ const updates = {};
629721
+ for (const change of configChanges) {
629722
+ switch (change.field) {
629723
+ case "name":
629724
+ updates.name = change.newValue;
629725
+ break;
629726
+ default:
629727
+ options?.onProgress?.(`Warning: Unknown config field '${change.field}' - skipping sync`);
629728
+ }
629729
+ }
629730
+ return this.performSync(botId, updates, options);
629731
+ }
629732
+ }
629733
+
629734
+ class PreflightFormatter {
629735
+ static format(result) {
629736
+ const sections = [];
629737
+ sections.push("");
629738
+ sections.push(" \u2584\u2580\u2588 \u2588\u2580\u2584 \u2588\u2584\u2580 Botpress ADK");
629739
+ sections.push(` \u2588\u2580\u2588 \u2588\u2584\u2580 \u2588\u2591\u2588 v${getAdkVersion()}`);
629740
+ sections.push("");
629741
+ sections.push("Running preflight checks...");
629742
+ sections.push("");
629743
+ const allIntegrations = [
629744
+ ...result.integrations.toRemove,
629745
+ ...result.integrations.toInstall,
629746
+ ...result.integrations.toUpdate
629747
+ ];
629748
+ const maxWidth = Math.max(...allIntegrations.map((i2) => `${i2.alias} (v${i2.version})`.length), 30);
629749
+ if (hasIntegrationChanges(result.integrations)) {
629750
+ sections.push(`Integrations:
629751
+ `);
629752
+ if (result.integrations.toRemove.length > 0) {
629753
+ sections.push("Installed Remotely but NOT in agent.config.ts");
629754
+ sections.push(`(these will be DISABLED or REMOVED)
629755
+ `);
629756
+ for (const integration of result.integrations.toRemove) {
629757
+ const name2 = `${integration.alias} (v${integration.version})`;
629758
+ const padding = " ".repeat(maxWidth - name2.length + 4);
629759
+ sections.push(` \u2014 ${name2}${padding}\u2717 Not present locally`);
629760
+ sections.push(` Action: Remove
629761
+ `);
629762
+ }
629763
+ }
629764
+ if (result.integrations.toInstall.length > 0) {
629765
+ sections.push("Present Locally but NOT Installed Remotely");
629766
+ sections.push(`(these will be INSTALLED)
629767
+ `);
629768
+ for (const integration of result.integrations.toInstall) {
629769
+ const name2 = `${integration.alias} (v${integration.version})`;
629770
+ const padding = " ".repeat(maxWidth - name2.length + 4);
629771
+ sections.push(` \u2014 ${name2}${padding}+ Missing remotely`);
629772
+ sections.push(` Action: Install
629773
+ `);
629774
+ }
629775
+ }
629776
+ if (result.integrations.toUpdate.length > 0) {
629777
+ sections.push("Present on both, but config DIFFERS");
629778
+ sections.push(`(these will be UPDATED)
629779
+ `);
629780
+ for (const integration of result.integrations.toUpdate) {
629781
+ sections.push(` \u2014 ${integration.alias} (v${integration.version})`);
629782
+ if (integration.configChanges && integration.configChanges.length > 0) {
629783
+ sections.push(` Configuration differences:
629784
+ `);
629785
+ for (const change of integration.configChanges) {
629786
+ sections.push(` ${change.field}:`);
629787
+ sections.push(` - Remote: ${this.formatValue(change.oldValue)}`);
629788
+ sections.push(` + Local: ${this.formatValue(change.newValue)}
629789
+ `);
629790
+ }
629791
+ }
629792
+ }
629793
+ }
629794
+ }
629795
+ if (result.agentConfig.length > 0) {
629796
+ sections.push("Agent Configuration Differences");
629797
+ sections.push(`(These are top-level agent settings, not integration settings)
629798
+ `);
629799
+ for (const diff3 of result.agentConfig) {
629800
+ sections.push(` agent.${diff3.field}:`);
629801
+ sections.push(` - Remote: ${this.formatValue(diff3.oldValue)}`);
629802
+ sections.push(` + Local: ${this.formatValue(diff3.newValue)}
629803
+ `);
629804
+ }
629805
+ }
629806
+ sections.push(`Summary of Actions
629807
+ `);
629808
+ const install = result.integrations.toInstall.length;
629809
+ const remove = result.integrations.toRemove.length;
629810
+ const update = result.integrations.toUpdate.length;
629811
+ const agentConfig = result.agentConfig.length;
629812
+ if (install > 0) {
629813
+ sections.push(` \u2022 Install: ${pluralize2(install, "integration")}`);
629814
+ }
629815
+ if (remove > 0) {
629816
+ sections.push(` \u2022 Remove: ${pluralize2(remove, "integration")}`);
629817
+ }
629818
+ if (update > 0) {
629819
+ sections.push(` \u2022 Update: ${pluralize2(update, "integration")}`);
629820
+ }
629821
+ if (agentConfig > 0) {
629822
+ sections.push(` \u2022 Agent config: ${pluralize2(agentConfig, "change")}`);
629823
+ }
629824
+ sections.push("");
629825
+ return sections.join(`
629826
+ `);
629827
+ }
629828
+ static formatPrompt() {
629829
+ return `\u2753 Apply these changes before continuing?
629830
+ Proceed? [y/N] `;
629831
+ }
629832
+ static formatValue(value2) {
629833
+ if (value2 === undefined || value2 === null) {
629834
+ return "(not set)";
629835
+ }
629836
+ if (typeof value2 === "string") {
629837
+ return `"${value2}"`;
629838
+ }
629839
+ if (typeof value2 === "boolean") {
629840
+ return value2 ? "true" : "false";
629841
+ }
629842
+ if (Array.isArray(value2)) {
629843
+ return `[${value2.map((v2) => this.formatValue(v2)).join(", ")}]`;
629844
+ }
629845
+ if (typeof value2 === "object") {
629846
+ return JSON.stringify(value2);
629847
+ }
629848
+ return String(value2);
629849
+ }
629850
+ }
629851
+
629852
+ class PreflightChecker {
629853
+ projectPath;
629854
+ client;
629855
+ project;
629856
+ constructor(projectPath) {
629857
+ this.projectPath = projectPath;
629858
+ }
629859
+ async getProject() {
629860
+ if (!this.project) {
629861
+ this.project = await AgentProject.load(this.projectPath);
629862
+ }
629863
+ return this.project;
629864
+ }
629865
+ async getClient() {
629866
+ if (!this.client) {
629867
+ const credentials = await auth.getActiveCredentials();
629868
+ const project = await this.getProject();
629869
+ const workspaceId = project.agentInfo?.workspaceId || credentials.workspaceId;
629870
+ if (!workspaceId) {
629871
+ throw new Error('No workspace ID found. Please login with "adk login"');
629872
+ }
629873
+ this.client = new Vx({
629874
+ token: credentials.token,
629875
+ apiUrl: credentials.apiUrl,
629876
+ workspaceId,
629877
+ headers: {
629878
+ "x-multiple-integrations": "true"
629879
+ }
629880
+ });
629881
+ }
629882
+ return this.client;
629883
+ }
629884
+ async performCheck(botId) {
629885
+ const client = await this.getClient();
629886
+ const project = await this.getProject();
629887
+ const { bot } = await client.getBot({ id: botId });
629888
+ const integrationChecker = new IntegrationChecker(this.projectPath);
629889
+ const integrationResults = await integrationChecker.checkIntegrations(botId);
629890
+ const integrationDiffs = this.buildIntegrationDiffs(integrationResults);
629891
+ const agentConfigDiffs = this.buildAgentConfigDiffs(project, bot);
629892
+ const hasChanges = hasIntegrationChanges(integrationDiffs) || agentConfigDiffs.length > 0;
629893
+ return {
629894
+ result: {
629895
+ integrations: integrationDiffs,
629896
+ agentConfig: agentConfigDiffs,
629897
+ hasChanges
629898
+ },
629899
+ integrationResults
629900
+ };
629901
+ }
629902
+ buildIntegrationDiffs(results) {
629903
+ const toInstall = [];
629904
+ const toRemove = [];
629905
+ const toUpdate = [];
629906
+ for (const result of results) {
629907
+ if (result.desiredInstallStatus === "disabled" && !result.needsRemoval && !result.needsConfiguration) {
629908
+ continue;
629909
+ }
629910
+ if (result.needsInstall) {
629911
+ toInstall.push({
629912
+ alias: result.alias,
629913
+ name: result.name,
629914
+ version: result.desiredVersion,
629915
+ action: "install"
629916
+ });
629917
+ } else if (result.needsRemoval) {
629918
+ toRemove.push({
629919
+ alias: result.alias,
629920
+ name: result.name,
629921
+ version: result.installedVersion || result.desiredVersion,
629922
+ action: "remove"
629923
+ });
629924
+ } else if (result.needsUpdate || result.needsConfiguration) {
629925
+ const configChanges = this.buildConfigDiff(result.currentConfiguration || {}, result.desiredConfiguration || {}, result.definition.configuration?.schema?.properties || {});
629926
+ toUpdate.push({
629927
+ alias: result.alias,
629928
+ name: result.name,
629929
+ version: result.desiredVersion,
629930
+ action: "update",
629931
+ configChanges: configChanges.length > 0 ? configChanges : undefined
629932
+ });
629933
+ }
629934
+ }
629935
+ return { toInstall, toRemove, toUpdate };
629936
+ }
629937
+ buildConfigDiff(current, desired, schema) {
629938
+ const diffs = [];
629939
+ const currentObj = current ?? {};
629940
+ const desiredObj = desired ?? {};
629941
+ const allKeys = new Set([...Object.keys(currentObj), ...Object.keys(desiredObj)]);
629942
+ for (const key of allKeys) {
629943
+ const schemaDefault = schema.properties?.[key]?.default;
629944
+ const currentValue = currentObj[key] ?? schemaDefault;
629945
+ const desiredValue = desiredObj[key] ?? schemaDefault;
629946
+ if (JSON.stringify(currentValue) !== JSON.stringify(desiredValue)) {
629947
+ const type = currentValue === undefined ? "added" : desiredValue === undefined ? "removed" : "changed";
629948
+ diffs.push({
629949
+ field: key,
629950
+ oldValue: currentValue,
629951
+ newValue: desiredValue,
629952
+ type
629953
+ });
629954
+ }
629955
+ }
629956
+ return diffs;
629957
+ }
629958
+ buildAgentConfigDiffs(project, bot) {
629959
+ if (project.config?.name !== undefined && project.config.name !== bot.name) {
629960
+ return [
629961
+ {
629962
+ field: "name",
629963
+ oldValue: bot.name,
629964
+ newValue: project.config.name
629965
+ }
629966
+ ];
629967
+ }
629968
+ return [];
629969
+ }
629970
+ async checkWithPendingApply(botId) {
629971
+ const { result, integrationResults } = await this.performCheck(botId);
629972
+ return {
629973
+ result,
629974
+ apply: (callbacks) => this.apply(botId, result, integrationResults, callbacks)
629975
+ };
629976
+ }
629977
+ async checkAndApply(botId, options = {}) {
629978
+ const { result, integrationResults } = await this.performCheck(botId);
629979
+ if (!result.hasChanges) {
629980
+ return { result, applied: false };
629981
+ }
629982
+ if (options.shouldApply) {
629983
+ const formatted = PreflightFormatter.format(result);
629984
+ const approved = await options.shouldApply(result, formatted);
629985
+ if (!approved) {
629986
+ return { result, applied: false };
629987
+ }
629988
+ }
629989
+ await this.apply(botId, result, integrationResults, options.callbacks);
629990
+ return { result, applied: true };
629991
+ }
629992
+ async apply(botId, result, integrationResults, options) {
629993
+ const client = await this.getClient();
629994
+ if (hasIntegrationChanges(result.integrations)) {
629995
+ options?.onProgress?.("Syncing integrations to bot...");
629996
+ const integrationSyncer = new IntegrationSyncManager(this.projectPath);
629997
+ const syncResult = await integrationSyncer.applySyncPlan(integrationResults, botId);
629998
+ if (syncResult.installed > 0) {
629999
+ options?.onSuccess?.(`Installed ${pluralize2(syncResult.installed, "integration")}`);
630000
+ }
630001
+ if (syncResult.updated > 0) {
630002
+ options?.onSuccess?.(`Updated ${pluralize2(syncResult.updated, "integration")}`);
630003
+ }
630004
+ if (syncResult.removed > 0) {
630005
+ options?.onSuccess?.(`Removed ${pluralize2(syncResult.removed, "integration")}`);
630006
+ }
630007
+ if (syncResult.failed > 0) {
630008
+ options?.onError?.(`Failed to sync ${pluralize2(syncResult.failed, "integration")}`);
630009
+ for (const { alias, error } of syncResult.errors) {
630010
+ options?.onError?.(` ${alias}: ${error}`);
630011
+ }
630012
+ }
630013
+ }
630014
+ if (result.agentConfig.length > 0) {
630015
+ const configSyncer = new AgentConfigSyncManager(client);
630016
+ await configSyncer.syncFromChanges(botId, result.agentConfig, options);
630017
+ }
630018
+ options?.onProgress?.("Regenerating bot project...");
630019
+ await generateBotProject({
630020
+ projectPath: this.projectPath,
630021
+ outputPath: path31.join(this.projectPath, ".adk", "bot")
630022
+ });
630023
+ options?.onSuccess?.("Bot project regenerated");
630024
+ }
630025
+ }
630026
+ var import_ts_morph, __defProp9, __commonJS5 = (cb4, mod) => () => (mod || cb4((mod = { exports: {} }).exports, mod), mod.exports), __export7 = (target, all4) => {
629579
630027
  for (var name2 in all4)
629580
630028
  __defProp9(target, name2, {
629581
630029
  get: all4[name2],
@@ -629603,11 +630051,11 @@ var import_ts_morph, __defProp9, __export7 = (target, all4) => {
629603
630051
  `));
629604
630052
  return code;
629605
630053
  }
629606
- }, ADK_VERSION = "1.7.11", relative2 = (from, to3) => {
630054
+ }, ADK_VERSION = "1.7.13", relative2 = (from, to3) => {
629607
630055
  const fromDir = path10.dirname(from);
629608
630056
  const relative32 = path10.relative(fromDir, to3);
629609
630057
  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) => {
630058
+ }, 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
630059
  return crypto23.createHash("sha256").update(`${integration.alias}|${integration.definition?.id}|${integration.definition?.version}|${integration.definition?.updatedAt}`).digest("hex");
629612
630060
  }, getPascalAlias = (integration) => pascalCase(getIntegrationAlias(integration.alias)), getIntegrationNames = (integration) => ({
629613
630061
  typings: {
@@ -629645,7 +630093,20 @@ var import_ts_morph, __defProp9, __export7 = (target, all4) => {
629645
630093
  index: path18.join(snakeCase(int2.name), `index.ts`),
629646
630094
  actions: path18.join(snakeCase(int2.name), `actions.ts`)
629647
630095
  }
629648
- }), FileWatcher2;
630096
+ }), FileWatcher2, getAdkVersion = () => {
630097
+ try {
630098
+ const packageJson = require_package3();
630099
+ return packageJson.version;
630100
+ } catch {
630101
+ try {
630102
+ const adkPackagePath = join8(process.cwd(), "node_modules/@botpress/adk/package.json");
630103
+ const pkg = JSON.parse(readFileSync5(adkPackagePath, "utf-8"));
630104
+ return pkg.version;
630105
+ } catch {
630106
+ return "unknown";
630107
+ }
630108
+ }
630109
+ };
629649
630110
  var init_dist15 = __esm(() => {
629650
630111
  init_dist5();
629651
630112
  init_dist4();
@@ -629665,6 +630126,7 @@ var init_dist15 = __esm(() => {
629665
630126
  init_dist4();
629666
630127
  init_dist4();
629667
630128
  init_dist4();
630129
+ init_dist4();
629668
630130
  init_internal();
629669
630131
  init_dist5();
629670
630132
  init_dedent();
@@ -629675,6 +630137,7 @@ var init_dist15 = __esm(() => {
629675
630137
  init_internal();
629676
630138
  init_dist4();
629677
630139
  init_dist5();
630140
+ init_dist4();
629678
630141
  import_ts_morph = __toESM(require_ts_morph(), 1);
629679
630142
  __defProp9 = Object.defineProperty;
629680
630143
  __require3 = /* @__PURE__ */ createRequire(import.meta.url);
@@ -629684,7 +630147,6 @@ var init_dist15 = __esm(() => {
629684
630147
  version: X.string(),
629685
630148
  enabled: X.boolean(),
629686
630149
  configurationType: X.string().optional(),
629687
- connection: X.string().optional(),
629688
630150
  config: X.record(X.any()).optional()
629689
630151
  })).optional()
629690
630152
  });
@@ -629784,6 +630246,84 @@ var init_dist15 = __esm(() => {
629784
630246
  init_utils4();
629785
630247
  init_fs();
629786
630248
  });
630249
+ require_package3 = __commonJS5((exports, module) => {
630250
+ module.exports = {
630251
+ name: "@botpress/adk",
630252
+ version: "1.7.13",
630253
+ description: "Core ADK library for building AI agents on Botpress",
630254
+ type: "module",
630255
+ main: "dist/index.js",
630256
+ types: "dist/index.d.ts",
630257
+ files: [
630258
+ "dist/**/*",
630259
+ "package.json",
630260
+ "README.md"
630261
+ ],
630262
+ exports: {
630263
+ ".": {
630264
+ types: "./dist/index.d.ts",
630265
+ import: "./dist/index.js"
630266
+ },
630267
+ "./schemas/*": "./schemas/*"
630268
+ },
630269
+ scripts: {
630270
+ build: "bun run build:types && bun run build.ts",
630271
+ "build:types": "tsc --emitDeclarationOnly",
630272
+ watch: "bun run build:types && bun build ./src/index.ts --outdir ./dist --target node --format esm --sourcemap --watch",
630273
+ clean: "rm -rf dist",
630274
+ prepublishOnly: "bun run clean && bun run build",
630275
+ test: "vitest run",
630276
+ "test:watch": "vitest",
630277
+ "test:ui": "vitest --ui",
630278
+ "test:coverage": "vitest run --coverage"
630279
+ },
630280
+ keywords: [
630281
+ "botpress",
630282
+ "adk",
630283
+ "agent",
630284
+ "ai",
630285
+ "chatbot",
630286
+ "conversational-ai",
630287
+ "development-kit"
630288
+ ],
630289
+ author: "Botpress",
630290
+ license: "MIT",
630291
+ repository: {
630292
+ type: "git",
630293
+ url: "https://github.com/botpress/adk"
630294
+ },
630295
+ dependencies: {
630296
+ "@botpress/cli": "^4.23",
630297
+ "@botpress/client": "^1.27.0",
630298
+ "@botpress/cognitive": "^0.2.0",
630299
+ "@botpress/runtime": "^1.7.13",
630300
+ "@botpress/sdk": "^4.18.1",
630301
+ "@bpinternal/yargs-extra": "^0.0.21",
630302
+ "@parcel/watcher": "^2.5.1",
630303
+ "@types/glob": "^9.0.0",
630304
+ "@types/luxon": "^3.7.1",
630305
+ "@types/semver": "^7.7.1",
630306
+ dedent: "^1.7.0",
630307
+ execa: "9.6.0",
630308
+ glob: "^11.0.3",
630309
+ luxon: "^3.7.2",
630310
+ prettier: "^3.6.2",
630311
+ semver: "^7.7.2",
630312
+ "ts-morph": "^27.0.2"
630313
+ },
630314
+ devDependencies: {
630315
+ dotenv: "^17.2.3"
630316
+ },
630317
+ peerDependencies: {
630318
+ typescript: ">=4.5.0"
630319
+ },
630320
+ engines: {
630321
+ node: ">=22.0.0",
630322
+ bun: ">=1.3.0"
630323
+ },
630324
+ packageManager: "bun@1.3.0"
630325
+ };
630326
+ });
629787
630327
  init_credentials();
629788
630328
  init_credentials();
629789
630329
  bpCliImporter = new BpCliImporter;
@@ -630241,7 +630781,7 @@ ${this.stderrLines.join(`
630241
630781
  workspaceCache = new WorkspaceCache;
630242
630782
  agentInfoKeyOrder = ["botId", "workspaceId", "apiUrl", "devId"];
630243
630783
  dependenciesKeyOrder = ["integrations"];
630244
- integrationKeyOrder = ["version", "enabled", "configurationType", "connection", "config"];
630784
+ integrationKeyOrder = ["version", "enabled", "configurationType", "config"];
630245
630785
  init_fs();
630246
630786
  init_validation_errors();
630247
630787
  integrationRefSchema = X.string().transform((val, ctx) => {
@@ -630647,7 +631187,6 @@ ${this.stderrLines.join(`
630647
631187
  name: parsed.alias,
630648
631188
  version: parsed.ref.version,
630649
631189
  workspace: parsed.ref.workspace,
630650
- connection: parsed.connection,
630651
631190
  config: parsed.config,
630652
631191
  installed: false,
630653
631192
  installedVersion: undefined,
@@ -631454,7 +631993,7 @@ function pathKey2(options = {}) {
631454
631993
 
631455
631994
  // ../../node_modules/clipboardy/node_modules/execa/node_modules/npm-run-path/index.js
631456
631995
  import process23 from "process";
631457
- import path31 from "path";
631996
+ import path34 from "path";
631458
631997
  import { fileURLToPath as fileURLToPath4 } from "url";
631459
631998
  var npmRunPath2 = ({
631460
631999
  cwd: cwd3 = process23.cwd(),
@@ -631464,7 +632003,7 @@ var npmRunPath2 = ({
631464
632003
  addExecPath = true
631465
632004
  } = {}) => {
631466
632005
  const cwdString = cwd3 instanceof URL ? fileURLToPath4(cwd3) : cwd3;
631467
- const cwdPath = path31.resolve(cwdString);
632006
+ const cwdPath = path34.resolve(cwdString);
631468
632007
  const result = [];
631469
632008
  if (preferLocal) {
631470
632009
  applyPreferLocal2(result, cwdPath);
@@ -631472,17 +632011,17 @@ var npmRunPath2 = ({
631472
632011
  if (addExecPath) {
631473
632012
  applyExecPath2(result, execPath2, cwdPath);
631474
632013
  }
631475
- return [...result, pathOption].join(path31.delimiter);
632014
+ return [...result, pathOption].join(path34.delimiter);
631476
632015
  }, applyPreferLocal2 = (result, cwdPath) => {
631477
632016
  let previous;
631478
632017
  while (previous !== cwdPath) {
631479
- result.push(path31.join(cwdPath, "node_modules/.bin"));
632018
+ result.push(path34.join(cwdPath, "node_modules/.bin"));
631480
632019
  previous = cwdPath;
631481
- cwdPath = path31.resolve(cwdPath, "..");
632020
+ cwdPath = path34.resolve(cwdPath, "..");
631482
632021
  }
631483
632022
  }, applyExecPath2 = (result, execPath2, cwdPath) => {
631484
632023
  const execPathString = execPath2 instanceof URL ? fileURLToPath4(execPath2) : execPath2;
631485
- result.push(path31.resolve(cwdPath, execPathString, ".."));
632024
+ result.push(path34.resolve(cwdPath, execPathString, ".."));
631486
632025
  }, npmRunPathEnv2 = ({ env: env4 = process23.env, ...options } = {}) => {
631487
632026
  env4 = { ...env4 };
631488
632027
  const pathName = pathKey2({ env: env4 });
@@ -632361,7 +632900,7 @@ var require_merge_stream = __commonJS((exports, module) => {
632361
632900
  });
632362
632901
 
632363
632902
  // ../../node_modules/clipboardy/node_modules/execa/lib/stream.js
632364
- import { createReadStream as createReadStream2, readFileSync as readFileSync5 } from "fs";
632903
+ import { createReadStream as createReadStream2, readFileSync as readFileSync6 } from "fs";
632365
632904
  import { setTimeout as setTimeout4 } from "timers/promises";
632366
632905
  var import_merge_stream, validateInputOptions = (input) => {
632367
632906
  if (input !== undefined) {
@@ -632372,7 +632911,7 @@ var import_merge_stream, validateInputOptions = (input) => {
632372
632911
  return input;
632373
632912
  }
632374
632913
  validateInputOptions(input);
632375
- return readFileSync5(inputFile);
632914
+ return readFileSync6(inputFile);
632376
632915
  }, handleInputSync = (options) => {
632377
632916
  const input = getInputSync(options);
632378
632917
  if (isStream4(input)) {
@@ -632556,7 +633095,7 @@ var init_verbose = __esm(() => {
632556
633095
 
632557
633096
  // ../../node_modules/clipboardy/node_modules/execa/index.js
632558
633097
  import { Buffer as Buffer7 } from "buffer";
632559
- import path34 from "path";
633098
+ import path36 from "path";
632560
633099
  import childProcess from "child_process";
632561
633100
  import process27 from "process";
632562
633101
  function execa2(file, args, options) {
@@ -632738,7 +633277,7 @@ var import_cross_spawn2, DEFAULT_MAX_BUFFER, getEnv2 = ({ env: envOption, extend
632738
633277
  };
632739
633278
  options.env = getEnv2(options);
632740
633279
  options.stdio = normalizeStdio(options);
632741
- if (process27.platform === "win32" && path34.basename(file, ".exe") === "cmd") {
633280
+ if (process27.platform === "win32" && path36.basename(file, ".exe") === "cmd") {
632742
633281
  args.unshift("/q");
632743
633282
  }
632744
633283
  return { file, args, options, parsed };
@@ -632815,7 +633354,7 @@ var init_termux = __esm(() => {
632815
633354
  });
632816
633355
 
632817
633356
  // ../../node_modules/clipboardy/lib/linux.js
632818
- import path36 from "path";
633357
+ import path37 from "path";
632819
633358
  import { fileURLToPath as fileURLToPath5 } from "url";
632820
633359
  var __dirname2, xsel = "xsel", xselFallback, copyArguments, pasteArguments, makeError3 = (xselError, fallbackError) => {
632821
633360
  let error;
@@ -632852,8 +633391,8 @@ var __dirname2, xsel = "xsel", xselFallback, copyArguments, pasteArguments, make
632852
633391
  }, clipboard2, linux_default;
632853
633392
  var init_linux = __esm(() => {
632854
633393
  init_execa2();
632855
- __dirname2 = path36.dirname(fileURLToPath5(import.meta.url));
632856
- xselFallback = path36.join(__dirname2, "../fallbacks/linux/xsel");
633394
+ __dirname2 = path37.dirname(fileURLToPath5(import.meta.url));
633395
+ xselFallback = path37.join(__dirname2, "../fallbacks/linux/xsel");
632857
633396
  copyArguments = ["--clipboard", "--input"];
632858
633397
  pasteArguments = ["--clipboard", "--output"];
632859
633398
  clipboard2 = {
@@ -632933,15 +633472,15 @@ var init_is64bit = __esm(() => {
632933
633472
  });
632934
633473
 
632935
633474
  // ../../node_modules/clipboardy/lib/windows.js
632936
- import path37 from "path";
633475
+ import path38 from "path";
632937
633476
  import { fileURLToPath as fileURLToPath6 } from "url";
632938
633477
  var __dirname3, binarySuffix, windowBinaryPath, clipboard4, windows_default;
632939
633478
  var init_windows = __esm(() => {
632940
633479
  init_execa2();
632941
633480
  init_is64bit();
632942
- __dirname3 = path37.dirname(fileURLToPath6(import.meta.url));
633481
+ __dirname3 = path38.dirname(fileURLToPath6(import.meta.url));
632943
633482
  binarySuffix = is64bitSync() ? "x86_64" : "i686";
632944
- windowBinaryPath = path37.join(__dirname3, `../fallbacks/windows/clipboard_${binarySuffix}.exe`);
633483
+ windowBinaryPath = path38.join(__dirname3, `../fallbacks/windows/clipboard_${binarySuffix}.exe`);
632945
633484
  clipboard4 = {
632946
633485
  copy: async (options) => execa2(windowBinaryPath, ["--copy"], options),
632947
633486
  async paste(options) {
@@ -634652,7 +635191,7 @@ var init_default_browser = __esm(() => {
634652
635191
  // ../../node_modules/open/index.js
634653
635192
  import process34 from "process";
634654
635193
  import { Buffer as Buffer8 } from "buffer";
634655
- import path38 from "path";
635194
+ import path39 from "path";
634656
635195
  import { fileURLToPath as fileURLToPath7 } from "url";
634657
635196
  import { promisify as promisify8 } from "util";
634658
635197
  import childProcess3 from "child_process";
@@ -634862,8 +635401,8 @@ var init_open = __esm(() => {
634862
635401
  init_default_browser();
634863
635402
  init_is_inside_container();
634864
635403
  execFile5 = promisify8(childProcess3.execFile);
634865
- __dirname4 = path38.dirname(fileURLToPath7(import.meta.url));
634866
- localXdgOpenPath = path38.join(__dirname4, "xdg-open");
635404
+ __dirname4 = path39.dirname(fileURLToPath7(import.meta.url));
635405
+ localXdgOpenPath = path39.join(__dirname4, "xdg-open");
634867
635406
  ({ platform: platform3, arch } = process34);
634868
635407
  apps = {};
634869
635408
  defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
@@ -636233,10 +636772,10 @@ var init_Separator = __esm(async () => {
636233
636772
  });
636234
636773
 
636235
636774
  // ../adk/package.json
636236
- var require_package3 = __commonJS((exports, module) => {
636775
+ var require_package4 = __commonJS((exports, module) => {
636237
636776
  module.exports = {
636238
636777
  name: "@botpress/adk",
636239
- version: "1.7.11",
636778
+ version: "1.7.13",
636240
636779
  description: "Core ADK library for building AI agents on Botpress",
636241
636780
  type: "module",
636242
636781
  main: "dist/index.js",
@@ -636283,7 +636822,7 @@ var require_package3 = __commonJS((exports, module) => {
636283
636822
  "@botpress/cli": "^4.23",
636284
636823
  "@botpress/client": "^1.27.0",
636285
636824
  "@botpress/cognitive": "^0.2.0",
636286
- "@botpress/runtime": "^1.7.11",
636825
+ "@botpress/runtime": "^1.7.13",
636287
636826
  "@botpress/sdk": "^4.18.1",
636288
636827
  "@bpinternal/yargs-extra": "^0.0.21",
636289
636828
  "@parcel/watcher": "^2.5.1",
@@ -636314,8 +636853,8 @@ var require_package3 = __commonJS((exports, module) => {
636314
636853
 
636315
636854
  // src/components/DevStatus.tsx
636316
636855
  import { exec as exec3 } from "child_process";
636317
- import { readFileSync as readFileSync6 } from "fs";
636318
- import { join as join8 } from "path";
636856
+ import { readFileSync as readFileSync7 } from "fs";
636857
+ import { join as join9 } from "path";
636319
636858
  var import_react36, jsx_dev_runtime17, BlinkingCursor = () => {
636320
636859
  const [visible, setVisible] = import_react36.useState(true);
636321
636860
  const theme = useTheme();
@@ -636342,14 +636881,14 @@ var import_react36, jsx_dev_runtime17, BlinkingCursor = () => {
636342
636881
  return () => clearInterval(interval);
636343
636882
  }, []);
636344
636883
  return opacity;
636345
- }, getAdkVersion = () => {
636884
+ }, getAdkVersion2 = () => {
636346
636885
  try {
636347
636886
  try {
636348
- const packageJson = require_package3();
636887
+ const packageJson = require_package4();
636349
636888
  return packageJson.version;
636350
636889
  } catch {
636351
- const adkPackagePath = join8(process.cwd(), "node_modules/@botpress/adk/package.json");
636352
- const pkg = JSON.parse(readFileSync6(adkPackagePath, "utf-8"));
636890
+ const adkPackagePath = join9(process.cwd(), "node_modules/@botpress/adk/package.json");
636891
+ const pkg = JSON.parse(readFileSync7(adkPackagePath, "utf-8"));
636353
636892
  return pkg.version;
636354
636893
  }
636355
636894
  } catch {
@@ -636529,7 +637068,7 @@ var import_react36, jsx_dev_runtime17, BlinkingCursor = () => {
636529
637068
  color: theme.text.dim,
636530
637069
  children: [
636531
637070
  "v",
636532
- getAdkVersion()
637071
+ getAdkVersion2()
636533
637072
  ]
636534
637073
  }, undefined, true, undefined, this)
636535
637074
  ]
@@ -637176,7 +637715,7 @@ var init_DevStatus = __esm(async () => {
637176
637715
  });
637177
637716
 
637178
637717
  // src/components/LogsView.tsx
637179
- import { readFileSync as readFileSync7, existsSync as existsSync7, statSync as statSync2, watchFile, unwatchFile } from "fs";
637718
+ import { readFileSync as readFileSync8, existsSync as existsSync7, statSync as statSync2, watchFile, unwatchFile } from "fs";
637180
637719
  var import_react37, jsx_dev_runtime18, parseLogLine = (line, lineNumber) => {
637181
637720
  try {
637182
637721
  const parsed = JSON.parse(line);
@@ -637230,7 +637769,7 @@ var import_react37, jsx_dev_runtime18, parseLogLine = (line, lineNumber) => {
637230
637769
  return;
637231
637770
  }
637232
637771
  lastSize.current = stats.size;
637233
- const content = readFileSync7(logFilePath, "utf-8");
637772
+ const content = readFileSync8(logFilePath, "utf-8");
637234
637773
  const lines = content.split(`
637235
637774
  `);
637236
637775
  const entries = [];
@@ -637354,6 +637893,93 @@ var init_LogsView = __esm(async () => {
637354
637893
  jsx_dev_runtime18 = __toESM(require_jsx_dev_runtime(), 1);
637355
637894
  });
637356
637895
 
637896
+ // src/utils/preflight-formatter.ts
637897
+ class PreflightFormatter2 {
637898
+ static format(result) {
637899
+ const plainText = PreflightFormatter.format(result);
637900
+ let formatted = plainText;
637901
+ const purple = "#D2A6FF";
637902
+ formatted = formatted.replace(/( \u2584\u2580\u2588 \u2588\u2580\u2584 \u2588\u2584\u2580 Botpress ADK)/g, source_default.hex(purple)("$1"));
637903
+ formatted = formatted.replace(/( \u2588\u2580\u2588 \u2588\u2584\u2580 \u2588\u2591\u2588 v[\d.]+)/g, source_default.hex(purple)("$1"));
637904
+ formatted = formatted.replace(/(Running preflight checks\.\.\.)/g, source_default.hex(purple)("$1"));
637905
+ formatted = formatted.replace(/^(Integrations:)$/gm, source_default.bold("$1"));
637906
+ formatted = formatted.replace(/^(Installed Remotely but NOT in agent\.config\.ts)$/gm, source_default.bold("$1"));
637907
+ formatted = formatted.replace(/^(Present Locally but NOT Installed Remotely)$/gm, source_default.bold("$1"));
637908
+ formatted = formatted.replace(/^(Present on both, but config DIFFERS)$/gm, source_default.bold("$1"));
637909
+ formatted = formatted.replace(/^(Agent Configuration Differences)$/gm, source_default.bold("$1"));
637910
+ formatted = formatted.replace(/^(Summary of Actions)$/gm, source_default.bold("$1"));
637911
+ formatted = formatted.replace(/^\(these will be DISABLED or REMOVED\)$/gm, source_default.gray("$1"));
637912
+ formatted = formatted.replace(/^\(these will be INSTALLED\)$/gm, source_default.gray("$1"));
637913
+ formatted = formatted.replace(/^\(these will be UPDATED\)$/gm, source_default.gray("$1"));
637914
+ formatted = formatted.replace(/^\(These are top-level agent settings.*\)$/gm, source_default.gray("$1"));
637915
+ formatted = formatted.replace(/(\u2014 )([\w-]+)( \(v[\d.]+\))(.*)(\u2717 Not present locally)/g, `${source_default.red("$1")}$2$3$4${source_default.red("$5")}`);
637916
+ formatted = formatted.replace(/(Action: )(Remove)/g, `$1${source_default.red("$2")}`);
637917
+ formatted = formatted.replace(/(\u2014 )([\w-]+)( \(v[\d.]+\))(.*)\(\+ Missing remotely\)/g, `${source_default.green("$1")}$2$3$4${source_default.green("(+ Missing remotely)")}`);
637918
+ formatted = formatted.replace(/(Action: )(Install)/g, `$1${source_default.green("$2")}`);
637919
+ formatted = formatted.replace(/(\u2014 )([\w-]+)( \(v[\d.]+\))/g, `${source_default.yellow("$1")}$2$3`);
637920
+ formatted = formatted.replace(/(Configuration differences:)/g, source_default.yellow("$1"));
637921
+ formatted = formatted.replace(/(Action: )(Update)/g, `$1${source_default.yellow("$2")}`);
637922
+ formatted = formatted.replace(/^(\s+)- (Remote:.*)/gm, `$1${source_default.red("- $2")}`);
637923
+ formatted = formatted.replace(/^(\s+)\+ (Local:.*)/gm, `$1${source_default.green("+ $2")}`);
637924
+ formatted = formatted.replace(/(\u2022 )(Install:)/g, `$1${source_default.green("$2")}`);
637925
+ formatted = formatted.replace(/(\u2022 )(Remove:)/g, `$1${source_default.red("$2")}`);
637926
+ formatted = formatted.replace(/(\u2022 )(Update:)/g, `$1${source_default.yellow("$2")}`);
637927
+ formatted = formatted.replace(/(\u2022 )(Agent config:)/g, `$1${source_default.cyan("$2")}`);
637928
+ formatted = formatted.replace(/\(not set\)/g, source_default.gray("(not set)"));
637929
+ formatted = formatted.replace(/: (true)\b/g, `: ${source_default.green("true")}`);
637930
+ formatted = formatted.replace(/: (false)\b/g, `: ${source_default.red("false")}`);
637931
+ return formatted;
637932
+ }
637933
+ static formatPrompt() {
637934
+ return source_default.bold.red(`\u2753 Apply these changes before continuing?
637935
+ `) + source_default.gray("Proceed? [y/N] ");
637936
+ }
637937
+ }
637938
+ var init_preflight_formatter = __esm(() => {
637939
+ init_source();
637940
+ init_dist15();
637941
+ });
637942
+
637943
+ // src/components/PreflightModal.tsx
637944
+ var jsx_dev_runtime19, approvalOptions, PreflightModal = ({ result, onApprove, onCancel }) => {
637945
+ return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
637946
+ flexDirection: "column",
637947
+ children: [
637948
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
637949
+ children: PreflightFormatter2.format(result)
637950
+ }, undefined, false, undefined, this),
637951
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Select, {
637952
+ options: approvalOptions,
637953
+ initialSelected: "approve",
637954
+ onSubmit: (value2) => value2 === "approve" ? onApprove() : onCancel(),
637955
+ onCancel
637956
+ }, undefined, false, undefined, this)
637957
+ ]
637958
+ }, undefined, true, undefined, this);
637959
+ };
637960
+ var init_PreflightModal = __esm(async () => {
637961
+ init_preflight_formatter();
637962
+ await __promiseAll([
637963
+ init_build2(),
637964
+ init_Select()
637965
+ ]);
637966
+ jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
637967
+ approvalOptions = [
637968
+ {
637969
+ id: "approve",
637970
+ label: "Apply these changes",
637971
+ value: "approve",
637972
+ description: "Proceed with the integration and config changes"
637973
+ },
637974
+ {
637975
+ id: "cancel",
637976
+ label: "Cancel",
637977
+ value: "cancel",
637978
+ description: "Keep current state, do not apply changes"
637979
+ }
637980
+ ];
637981
+ });
637982
+
637357
637983
  // src/utils/assert-logged-in.ts
637358
637984
  async function assertLoggedIn() {
637359
637985
  try {
@@ -637400,8 +638026,8 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
637400
638026
  const hasLinkingError = allErrors.some((error) => error.code === ValidationErrorCode.AGENT_NOT_LINKED);
637401
638027
  if (hasLinkingError) {
637402
638028
  if (!skipRender) {
637403
- render_default(/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(ThemeProvider, {
637404
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(AgentNotLinkedError, {}, undefined, false, undefined, this)
638029
+ render_default(/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ThemeProvider, {
638030
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(AgentNotLinkedError, {}, undefined, false, undefined, this)
637405
638031
  }, undefined, false, undefined, this));
637406
638032
  }
637407
638033
  if (exitOnError) {
@@ -637412,27 +638038,27 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
637412
638038
  if (hasErrors || allWarnings.length > 0 || validationResult.info.length > 0) {
637413
638039
  const ValidationErrors2 = () => {
637414
638040
  const theme = useTheme();
637415
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638041
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637416
638042
  flexDirection: "column",
637417
638043
  paddingY: 1,
637418
638044
  children: [
637419
- allErrors.length > 0 && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638045
+ allErrors.length > 0 && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637420
638046
  flexDirection: "column",
637421
638047
  children: [
637422
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638048
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637423
638049
  color: theme.status.error,
637424
638050
  children: [
637425
638051
  theme.symbols.cross,
637426
638052
  " Project validation failed:"
637427
638053
  ]
637428
638054
  }, undefined, true, undefined, this),
637429
- allErrors.map((error, index) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638055
+ allErrors.map((error, index) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637430
638056
  flexDirection: "column",
637431
638057
  marginTop: 1,
637432
638058
  children: [
637433
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638059
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637434
638060
  marginLeft: 2,
637435
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638061
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637436
638062
  color: theme.status.error,
637437
638063
  children: [
637438
638064
  error.file || "Project",
@@ -637440,16 +638066,16 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
637440
638066
  ]
637441
638067
  }, undefined, true, undefined, this)
637442
638068
  }, undefined, false, undefined, this),
637443
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638069
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637444
638070
  marginLeft: 4,
637445
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638071
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637446
638072
  color: theme.status.error,
637447
638073
  children: error.message
637448
638074
  }, undefined, false, undefined, this)
637449
638075
  }, undefined, false, undefined, this),
637450
- error.hint && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638076
+ error.hint && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637451
638077
  marginLeft: 4,
637452
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638078
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637453
638079
  color: theme.text.dim,
637454
638080
  children: [
637455
638081
  theme.symbols.info,
@@ -637462,24 +638088,24 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
637462
638088
  }, index, true, undefined, this))
637463
638089
  ]
637464
638090
  }, undefined, true, undefined, this),
637465
- allWarnings.length > 0 && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638091
+ allWarnings.length > 0 && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637466
638092
  flexDirection: "column",
637467
638093
  marginTop: allErrors.length > 0 ? 1 : 0,
637468
638094
  children: [
637469
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638095
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637470
638096
  color: theme.status.warning,
637471
638097
  children: [
637472
638098
  theme.symbols.warning,
637473
638099
  " Warnings:"
637474
638100
  ]
637475
638101
  }, undefined, true, undefined, this),
637476
- allWarnings.map((warning, index) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638102
+ allWarnings.map((warning, index) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637477
638103
  flexDirection: "column",
637478
638104
  marginTop: 1,
637479
638105
  children: [
637480
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638106
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637481
638107
  marginLeft: 2,
637482
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638108
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637483
638109
  color: theme.status.warning,
637484
638110
  children: [
637485
638111
  warning.file || "Project",
@@ -637488,9 +638114,9 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
637488
638114
  ]
637489
638115
  }, undefined, true, undefined, this)
637490
638116
  }, undefined, false, undefined, this),
637491
- warning.hint && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638117
+ warning.hint && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637492
638118
  marginLeft: 4,
637493
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638119
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637494
638120
  color: theme.text.dim,
637495
638121
  children: [
637496
638122
  theme.symbols.info,
@@ -637503,24 +638129,24 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
637503
638129
  }, index, true, undefined, this))
637504
638130
  ]
637505
638131
  }, undefined, true, undefined, this),
637506
- validationResult.info.length > 0 && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638132
+ validationResult.info.length > 0 && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637507
638133
  flexDirection: "column",
637508
638134
  marginTop: allErrors.length > 0 || allWarnings.length > 0 ? 1 : 0,
637509
638135
  children: [
637510
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638136
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637511
638137
  color: theme.status.info,
637512
638138
  children: [
637513
638139
  theme.symbols.info,
637514
638140
  " Info:"
637515
638141
  ]
637516
638142
  }, undefined, true, undefined, this),
637517
- validationResult.info.map((info2, index) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638143
+ validationResult.info.map((info2, index) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637518
638144
  flexDirection: "column",
637519
638145
  marginTop: 1,
637520
638146
  children: [
637521
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638147
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637522
638148
  marginLeft: 2,
637523
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638149
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637524
638150
  color: theme.status.info,
637525
638151
  children: [
637526
638152
  info2.file || "Project",
@@ -637529,9 +638155,9 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
637529
638155
  ]
637530
638156
  }, undefined, true, undefined, this)
637531
638157
  }, undefined, false, undefined, this),
637532
- info2.hint && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638158
+ info2.hint && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637533
638159
  marginLeft: 4,
637534
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638160
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637535
638161
  color: theme.text.dim,
637536
638162
  children: [
637537
638163
  theme.symbols.info,
@@ -637548,8 +638174,8 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
637548
638174
  }, undefined, true, undefined, this);
637549
638175
  };
637550
638176
  if (!skipRender) {
637551
- render_default(/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(ThemeProvider, {
637552
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(ValidationErrors2, {}, undefined, false, undefined, this)
638177
+ render_default(/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ThemeProvider, {
638178
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ValidationErrors2, {}, undefined, false, undefined, this)
637553
638179
  }, undefined, false, undefined, this));
637554
638180
  }
637555
638181
  if (hasErrors && exitOnError) {
@@ -637558,37 +638184,37 @@ async function assertValidProject(project, exitOnError = true, skipRender = fals
637558
638184
  }
637559
638185
  return { ...validationResult, errors: allErrors, warnings: allWarnings };
637560
638186
  }
637561
- var jsx_dev_runtime19, AgentNotLinkedError = () => {
638187
+ var jsx_dev_runtime20, AgentNotLinkedError = () => {
637562
638188
  const theme = useTheme();
637563
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638189
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637564
638190
  flexDirection: "column",
637565
638191
  paddingY: 1,
637566
638192
  children: [
637567
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638193
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637568
638194
  color: theme.status.error,
637569
638195
  children: [
637570
638196
  theme.symbols.cross,
637571
638197
  " Agent not linked to a bot"
637572
638198
  ]
637573
638199
  }, undefined, true, undefined, this),
637574
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638200
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637575
638201
  marginTop: 1,
637576
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638202
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637577
638203
  color: theme.text.dim,
637578
638204
  children: "Your local agent needs to be linked to a remote bot."
637579
638205
  }, undefined, false, undefined, this)
637580
638206
  }, undefined, false, undefined, this),
637581
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638207
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637582
638208
  marginTop: 1,
637583
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638209
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637584
638210
  color: theme.text.dim,
637585
638211
  children: "Run the following command to link it:"
637586
638212
  }, undefined, false, undefined, this)
637587
638213
  }, undefined, false, undefined, this),
637588
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
638214
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
637589
638215
  marginLeft: 2,
637590
638216
  marginTop: 1,
637591
- children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
638217
+ children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
637592
638218
  color: theme.syntax.keyword,
637593
638219
  children: "adk link"
637594
638220
  }, undefined, false, undefined, this)
@@ -637600,7 +638226,7 @@ var init_assert_valid_project = __esm(async () => {
637600
638226
  init_dist15();
637601
638227
  init_theme();
637602
638228
  await init_build2();
637603
- jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
638229
+ jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
637604
638230
  });
637605
638231
 
637606
638232
  // src/utils/CriticalError.ts
@@ -637619,15 +638245,15 @@ var init_CriticalError = __esm(() => {
637619
638245
  });
637620
638246
 
637621
638247
  // src/utils/runtime-version-check.ts
637622
- import { readFileSync as readFileSync8, existsSync as existsSync9 } from "fs";
637623
- import { join as join10 } from "path";
638248
+ import { readFileSync as readFileSync9, existsSync as existsSync9 } from "fs";
638249
+ import { join as join11 } from "path";
637624
638250
  function getInstalledRuntimeVersion(agentRoot) {
637625
638251
  try {
637626
- const runtimePackagePath = join10(agentRoot, "node_modules", "@botpress", "runtime", "package.json");
638252
+ const runtimePackagePath = join11(agentRoot, "node_modules", "@botpress", "runtime", "package.json");
637627
638253
  if (!existsSync9(runtimePackagePath)) {
637628
638254
  return null;
637629
638255
  }
637630
- const packageJson = JSON.parse(readFileSync8(runtimePackagePath, "utf-8"));
638256
+ const packageJson = JSON.parse(readFileSync9(runtimePackagePath, "utf-8"));
637631
638257
  return packageJson.version;
637632
638258
  } catch {
637633
638259
  return null;
@@ -637672,7 +638298,7 @@ function checkRuntimeVersion(agentRoot) {
637672
638298
  `));
637673
638299
  }
637674
638300
  }
637675
- var semver2, EXPECTED_RUNTIME_VERSION = "1.7.11";
638301
+ var semver2, EXPECTED_RUNTIME_VERSION = "1.7.13";
637676
638302
  var init_runtime_version_check = __esm(() => {
637677
638303
  init_source();
637678
638304
  semver2 = __toESM(require_semver2(), 1);
@@ -637706,8 +638332,8 @@ function updateWorkerStats(stats) {
637706
638332
  var serverConfig, serverStartTime, devCommandStatus = "running", latestWorkerStats = null;
637707
638333
 
637708
638334
  // src/utils/trace-reader.ts
637709
- import { existsSync as existsSync10, readFileSync as readFileSync9 } from "fs";
637710
- import { join as join11 } from "path";
638335
+ import { existsSync as existsSync10, readFileSync as readFileSync10 } from "fs";
638336
+ import { join as join12 } from "path";
637711
638337
  import { Transform as Transform3 } from "stream";
637712
638338
 
637713
638339
  class TraceReader {
@@ -637716,10 +638342,10 @@ class TraceReader {
637716
638342
  indexDir;
637717
638343
  liveFile;
637718
638344
  constructor(agentPath) {
637719
- this.traceDir = agentPath ? join11(agentPath, ".adk", "bot", "traces") : process.env.TRACE_DIR ?? "traces";
637720
- this.byTraceDir = join11(this.traceDir, "by-trace");
637721
- this.indexDir = join11(this.traceDir, "index");
637722
- this.liveFile = join11(this.traceDir, "live.ndjson");
638345
+ this.traceDir = agentPath ? join12(agentPath, ".adk", "bot", "traces") : process.env.TRACE_DIR ?? "traces";
638346
+ this.byTraceDir = join12(this.traceDir, "by-trace");
638347
+ this.indexDir = join12(this.traceDir, "index");
638348
+ this.liveFile = join12(this.traceDir, "live.ndjson");
637723
638349
  }
637724
638350
  async getTraceByWorkflowId(workflowId) {
637725
638351
  return this.getTraceByAttribute("workflowId", workflowId);
@@ -637731,7 +638357,7 @@ class TraceReader {
637731
638357
  if (indexedAttributes.includes(attributeName)) {
637732
638358
  const indexFile2 = this.getIndexFile();
637733
638359
  if (existsSync10(indexFile2)) {
637734
- const lines = readFileSync9(indexFile2, "utf-8").split(`
638360
+ const lines = readFileSync10(indexFile2, "utf-8").split(`
637735
638361
  `).filter(Boolean);
637736
638362
  for (let i2 = lines.length - 1;i2 >= 0; i2--) {
637737
638363
  try {
@@ -637751,7 +638377,7 @@ class TraceReader {
637751
638377
  } else {
637752
638378
  const dayFile2 = this.getDayFile();
637753
638379
  if (existsSync10(dayFile2)) {
637754
- const lines = readFileSync9(dayFile2, "utf-8").split(`
638380
+ const lines = readFileSync10(dayFile2, "utf-8").split(`
637755
638381
  `).filter(Boolean);
637756
638382
  for (let i2 = lines.length - 1;i2 >= 0; i2--) {
637757
638383
  try {
@@ -637770,9 +638396,9 @@ class TraceReader {
637770
638396
  }
637771
638397
  }
637772
638398
  for (const traceId of relatedTraceIds) {
637773
- const traceFile = join11(this.byTraceDir, `${traceId}.ndjson`);
638399
+ const traceFile = join12(this.byTraceDir, `${traceId}.ndjson`);
637774
638400
  if (existsSync10(traceFile)) {
637775
- const traceLines = readFileSync9(traceFile, "utf-8").split(`
638401
+ const traceLines = readFileSync10(traceFile, "utf-8").split(`
637776
638402
  `).filter(Boolean);
637777
638403
  for (const line of traceLines) {
637778
638404
  try {
@@ -637785,9 +638411,9 @@ class TraceReader {
637785
638411
  }
637786
638412
  async getTraceById(traceId) {
637787
638413
  const spans = [];
637788
- const traceFile = join11(this.byTraceDir, `${traceId}.ndjson`);
638414
+ const traceFile = join12(this.byTraceDir, `${traceId}.ndjson`);
637789
638415
  if (existsSync10(traceFile)) {
637790
- const lines = readFileSync9(traceFile, "utf-8").split(`
638416
+ const lines = readFileSync10(traceFile, "utf-8").split(`
637791
638417
  `).filter(Boolean);
637792
638418
  for (const line of lines) {
637793
638419
  try {
@@ -637801,7 +638427,7 @@ class TraceReader {
637801
638427
  const spans = [];
637802
638428
  const dayFile2 = this.getDayFile();
637803
638429
  if (existsSync10(dayFile2)) {
637804
- const lines = readFileSync9(dayFile2, "utf-8").split(`
638430
+ const lines = readFileSync10(dayFile2, "utf-8").split(`
637805
638431
  `).filter(Boolean);
637806
638432
  const recentLines = lines.slice(-limit);
637807
638433
  for (const line of recentLines) {
@@ -637816,7 +638442,7 @@ class TraceReader {
637816
638442
  const spans = [];
637817
638443
  const dayFile2 = this.getDayFile();
637818
638444
  if (existsSync10(dayFile2)) {
637819
- const lines = readFileSync9(dayFile2, "utf-8").split(`
638445
+ const lines = readFileSync10(dayFile2, "utf-8").split(`
637820
638446
  `).filter(Boolean);
637821
638447
  for (const line of lines) {
637822
638448
  try {
@@ -637840,7 +638466,7 @@ class TraceReader {
637840
638466
  try {
637841
638467
  const stats = existsSync10(this.liveFile) ? __require("fs").statSync(this.liveFile) : null;
637842
638468
  if (stats && stats.size > lastSize) {
637843
- const newContent = readFileSync9(this.liveFile, "utf-8");
638469
+ const newContent = readFileSync10(this.liveFile, "utf-8");
637844
638470
  const lines = newContent.split(`
637845
638471
  `);
637846
638472
  const newLines = lines.slice(Math.max(0, lines.length - 10));
@@ -637961,11 +638587,11 @@ data: ${JSON.stringify({ type: "update", span: span2 })}
637961
638587
  }
637962
638588
  getDayFile(date = new Date) {
637963
638589
  const dateStr = date.toISOString().slice(0, 10);
637964
- return join11(this.traceDir, `${dateStr}.ndjson`);
638590
+ return join12(this.traceDir, `${dateStr}.ndjson`);
637965
638591
  }
637966
638592
  getIndexFile(date = new Date) {
637967
638593
  const dateStr = date.toISOString().slice(0, 10);
637968
- return join11(this.indexDir, `${dateStr}.ndjson`);
638594
+ return join12(this.indexDir, `${dateStr}.ndjson`);
637969
638595
  }
637970
638596
  }
637971
638597
  var init_trace_reader = () => {};
@@ -638071,14 +638697,14 @@ var init_validation2 = __esm(() => {
638071
638697
  });
638072
638698
 
638073
638699
  // src/server/handlers/health.ts
638074
- import { existsSync as existsSync11, readFileSync as readFileSync10 } from "fs";
638075
- import { join as join12 } from "path";
638700
+ import { existsSync as existsSync11, readFileSync as readFileSync11 } from "fs";
638701
+ import { join as join13 } from "path";
638076
638702
  async function handleHealth() {
638077
638703
  let adkVersion = "unknown";
638078
638704
  try {
638079
- const adkPackagePath = join12(process.cwd(), "node_modules/@botpress/adk/package.json");
638705
+ const adkPackagePath = join13(process.cwd(), "node_modules/@botpress/adk/package.json");
638080
638706
  if (existsSync11(adkPackagePath)) {
638081
- const pkg = JSON.parse(readFileSync10(adkPackagePath, "utf-8"));
638707
+ const pkg = JSON.parse(readFileSync11(adkPackagePath, "utf-8"));
638082
638708
  adkVersion = pkg.version;
638083
638709
  }
638084
638710
  } catch {}
@@ -638127,18 +638753,18 @@ var init_worker_stats = __esm(() => {
638127
638753
  });
638128
638754
 
638129
638755
  // src/server/handlers/agent.ts
638130
- import { existsSync as existsSync12, readFileSync as readFileSync11 } from "fs";
638131
- import { join as join13 } from "path";
638756
+ import { existsSync as existsSync12, readFileSync as readFileSync12 } from "fs";
638757
+ import { join as join14 } from "path";
638132
638758
  function handleAgentInfo() {
638133
638759
  const serverConfig2 = getServerConfig();
638134
638760
  if (!serverConfig2.project) {
638135
- const agentConfigPath = join13(serverConfig2.agentPath, "agent.config.ts");
638136
- const agentJsonPath = join13(serverConfig2.agentPath, "agent.json");
638761
+ const agentConfigPath = join14(serverConfig2.agentPath, "agent.config.ts");
638762
+ const agentJsonPath = join14(serverConfig2.agentPath, "agent.json");
638137
638763
  let agentInfo = {
638138
638764
  path: serverConfig2.agentPath
638139
638765
  };
638140
638766
  if (existsSync12(agentConfigPath)) {
638141
- const configContent = readFileSync11(agentConfigPath, "utf-8");
638767
+ const configContent = readFileSync12(agentConfigPath, "utf-8");
638142
638768
  const nameMatch = configContent.match(/name:\s*['"`]([^'"`]+)['"`]/);
638143
638769
  const versionMatch = configContent.match(/version:\s*['"`]([^'"`]+)['"`]/);
638144
638770
  agentInfo.name = nameMatch?.[1] || "unknown";
@@ -638146,7 +638772,7 @@ function handleAgentInfo() {
638146
638772
  }
638147
638773
  if (existsSync12(agentJsonPath)) {
638148
638774
  try {
638149
- const agentJson = JSON.parse(readFileSync11(agentJsonPath, "utf-8"));
638775
+ const agentJson = JSON.parse(readFileSync12(agentJsonPath, "utf-8"));
638150
638776
  agentInfo = { ...agentInfo, ...agentJson };
638151
638777
  } catch {}
638152
638778
  }
@@ -641332,16 +641958,16 @@ function getContentType(pathname) {
641332
641958
  }
641333
641959
 
641334
641960
  // src/server/routes/static.ts
641335
- import { readFileSync as readFileSync12, existsSync as existsSync14 } from "fs";
641336
- import { join as join14, resolve as resolve4 } from "path";
641337
- import path39 from "path";
641961
+ import { readFileSync as readFileSync13, existsSync as existsSync14 } from "fs";
641962
+ import { join as join15, resolve as resolve4 } from "path";
641963
+ import path40 from "path";
641338
641964
  import { fileURLToPath as fileURLToPath8 } from "url";
641339
641965
  function getUIDistPath() {
641340
641966
  const __filename2 = fileURLToPath8(import.meta.url);
641341
- const __dirname5 = path39.dirname(__filename2);
641967
+ const __dirname5 = path40.dirname(__filename2);
641342
641968
  const isBinary = !__filename2.endsWith(".js") && !__filename2.endsWith(".ts");
641343
641969
  if (isBinary) {
641344
- const execDir = path39.dirname(process.execPath);
641970
+ const execDir = path40.dirname(process.execPath);
641345
641971
  return resolve4(execDir, "assets/ui-dist");
641346
641972
  } else {
641347
641973
  const isCompiledDist = __filename2.includes("/dist/");
@@ -641362,9 +641988,9 @@ function serveStaticFile(pathname, uiDistPath) {
641362
641988
  });
641363
641989
  }
641364
641990
  }
641365
- const indexPath2 = join14(uiDistPath, "index.html");
641991
+ const indexPath2 = join15(uiDistPath, "index.html");
641366
641992
  if (existsSync14(indexPath2)) {
641367
- return new Response(readFileSync12(indexPath2), {
641993
+ return new Response(readFileSync13(indexPath2), {
641368
641994
  headers: {
641369
641995
  "Content-Type": "text/html",
641370
641996
  ...headers
@@ -641387,12 +642013,12 @@ function serveStaticFile(pathname, uiDistPath) {
641387
642013
  });
641388
642014
  }
641389
642015
  }
641390
- let filePath = join14(uiDistPath, pathname);
642016
+ let filePath = join15(uiDistPath, pathname);
641391
642017
  if (pathname.startsWith("/assets/")) {
641392
- filePath = join14(uiDistPath, pathname);
642018
+ filePath = join15(uiDistPath, pathname);
641393
642019
  }
641394
642020
  if (existsSync14(filePath)) {
641395
- const file = readFileSync12(filePath);
642021
+ const file = readFileSync13(filePath);
641396
642022
  return new Response(file, {
641397
642023
  headers: {
641398
642024
  "Content-Type": getContentType(pathname),
@@ -641411,9 +642037,9 @@ function serveStaticFile(pathname, uiDistPath) {
641411
642037
  });
641412
642038
  }
641413
642039
  }
641414
- const indexPath = join14(uiDistPath, "index.html");
642040
+ const indexPath = join15(uiDistPath, "index.html");
641415
642041
  if (existsSync14(indexPath)) {
641416
- return new Response(readFileSync12(indexPath), {
642042
+ return new Response(readFileSync13(indexPath), {
641417
642043
  headers: {
641418
642044
  "Content-Type": "text/html",
641419
642045
  ...headers
@@ -641481,7 +642107,7 @@ var init_server = __esm(() => {
641481
642107
  // src/utils/node-inspector.ts
641482
642108
  import { spawn as spawn3 } from "child_process";
641483
642109
  import os10 from "os";
641484
- import path40 from "path";
642110
+ import path41 from "path";
641485
642111
  function openDevtools(url3) {
641486
642112
  const platform4 = os10.platform();
641487
642113
  if (platform4 === "darwin") {
@@ -641500,9 +642126,9 @@ function openDevtools(url3) {
641500
642126
  }).unref();
641501
642127
  };
641502
642128
  const candidates = [
641503
- path40.join(process.env["ProgramFiles"] ?? "", "Google/Chrome/Application/chrome.exe"),
641504
- path40.join(process.env["ProgramFiles(x86)"] ?? "", "Google/Chrome/Application/chrome.exe"),
641505
- path40.join(process.env["LocalAppData"] ?? "", "Google/Chrome/Application/chrome.exe")
642129
+ path41.join(process.env["ProgramFiles"] ?? "", "Google/Chrome/Application/chrome.exe"),
642130
+ path41.join(process.env["ProgramFiles(x86)"] ?? "", "Google/Chrome/Application/chrome.exe"),
642131
+ path41.join(process.env["LocalAppData"] ?? "", "Google/Chrome/Application/chrome.exe")
641506
642132
  ].filter(Boolean);
641507
642133
  return tryStart(candidates.find(() => true));
641508
642134
  }
@@ -641601,12 +642227,12 @@ var init_debugger = __esm(() => {
641601
642227
  });
641602
642228
 
641603
642229
  // src/utils/inspector-pid-cache.ts
641604
- import { existsSync as existsSync15, readFileSync as readFileSync13, writeFileSync as writeFileSync4, mkdirSync as mkdirSync2 } from "fs";
641605
- import { join as join15 } from "path";
642230
+ import { existsSync as existsSync15, readFileSync as readFileSync14, writeFileSync as writeFileSync4, mkdirSync as mkdirSync2 } from "fs";
642231
+ import { join as join16 } from "path";
641606
642232
  function getCachePath(agentRoot) {
641607
- const adkDir = join15(agentRoot, ".adk");
642233
+ const adkDir = join16(agentRoot, ".adk");
641608
642234
  mkdirSync2(adkDir, { recursive: true });
641609
- return join15(adkDir, "inspector-pids.json");
642235
+ return join16(adkDir, "inspector-pids.json");
641610
642236
  }
641611
642237
  function readCache2(agentRoot) {
641612
642238
  const cachePath = getCachePath(agentRoot);
@@ -641614,7 +642240,7 @@ function readCache2(agentRoot) {
641614
642240
  return { pids: [] };
641615
642241
  }
641616
642242
  try {
641617
- const content = readFileSync13(cachePath, "utf-8");
642243
+ const content = readFileSync14(cachePath, "utf-8");
641618
642244
  return JSON.parse(content);
641619
642245
  } catch {
641620
642246
  return { pids: [] };
@@ -641662,7 +642288,7 @@ __export(exports_adk_dev, {
641662
642288
  adkDev: () => adkDev
641663
642289
  });
641664
642290
  import { createWriteStream as createWriteStream3, mkdirSync as mkdirSync3 } from "fs";
641665
- import path41 from "path";
642291
+ import path44 from "path";
641666
642292
  async function adkDev(port = "3000", options = {
641667
642293
  ui: true,
641668
642294
  logs: false
@@ -641681,10 +642307,10 @@ async function adkDev(port = "3000", options = {
641681
642307
  const dateStr = now2.toISOString().replace(/[:.]/g, "-").split("T")[0];
641682
642308
  const timeStr = now2.toTimeString().split(" ")[0].replace(/:/g, "-");
641683
642309
  const logFileName = `adk-dev-${dateStr}-${timeStr}.log`;
641684
- const logsDir = path41.join(agentRoot, ".adk", "logs");
642310
+ const logsDir = path44.join(agentRoot, ".adk", "logs");
641685
642311
  mkdirSync3(logsDir, { recursive: true });
641686
- const logFilePath = path41.join(logsDir, logFileName);
641687
- const { unmount, waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(DevUI, {
642312
+ const logFilePath = path44.join(logsDir, logFileName);
642313
+ const { unmount, waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(DevUI, {
641688
642314
  port,
641689
642315
  portConsole,
641690
642316
  options,
@@ -641693,7 +642319,7 @@ async function adkDev(port = "3000", options = {
641693
642319
  }, undefined, false, undefined, this));
641694
642320
  await waitUntilExit();
641695
642321
  }
641696
- var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, logFilePath, onReady }) => {
642322
+ var import_react38, jsx_dev_runtime21, DevUI = ({ port, portConsole, options, logFilePath, onReady }) => {
641697
642323
  const [project, setProject] = import_react38.useState();
641698
642324
  const [workspace, setWorkspace] = import_react38.useState();
641699
642325
  const [uiServer, setUiServer] = import_react38.useState();
@@ -641707,10 +642333,18 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
641707
642333
  const [runningEditor, setRunningEditor] = import_react38.useState(null);
641708
642334
  const [viewMode, setViewMode] = import_react38.useState("summary");
641709
642335
  const [workerStats, setWorkerStats] = import_react38.useState();
642336
+ const [showPreflightModal, setShowPreflightModal] = import_react38.useState(false);
642337
+ const [preflightState, setPreflightState] = import_react38.useState();
642338
+ const [isInitialPreflight, setIsInitialPreflight] = import_react38.useState(false);
642339
+ const [continueInitialization, setContinueInitialization] = import_react38.useState(false);
641710
642340
  const debuggerRef = import_react38.useRef({
641711
642341
  port: parseInt(port),
641712
642342
  isActive: false
641713
642343
  });
642344
+ const preflightRef = import_react38.useRef({
642345
+ initialPreflightDone: false,
642346
+ isCheckingPreflight: false
642347
+ });
641714
642348
  import_react38.useEffect(() => {
641715
642349
  debuggerRef.current.port = botPort;
641716
642350
  }, [botPort]);
@@ -641782,6 +642416,32 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
641782
642416
  const handleToggleView = () => {
641783
642417
  setViewMode((prev) => prev === "summary" ? "logs" : "summary");
641784
642418
  };
642419
+ const handlePreflightApprove = async () => {
642420
+ addActivity("\u2713 Changes approved", "success");
642421
+ setShowPreflightModal(false);
642422
+ if (preflightState) {
642423
+ try {
642424
+ await preflightState.apply({
642425
+ onProgress: (message3) => addActivity(message3),
642426
+ onSuccess: (message3) => addActivity(`\u2713 ${message3}`, "success"),
642427
+ onError: (message3) => addActivity(message3, "error")
642428
+ });
642429
+ } catch (error) {
642430
+ const errorMsg = error instanceof Error ? error.message : String(error);
642431
+ addActivity(`Failed to apply changes: ${errorMsg}`, "error");
642432
+ }
642433
+ }
642434
+ if (isInitialPreflight) {
642435
+ setIsInitialPreflight(false);
642436
+ setContinueInitialization(true);
642437
+ }
642438
+ setPreflightState(undefined);
642439
+ };
642440
+ const handlePreflightCancel = () => {
642441
+ addActivity("Preflight check cancelled", "warn");
642442
+ setShowPreflightModal(false);
642443
+ setPreflightState(undefined);
642444
+ };
641785
642445
  import_react38.useEffect(() => {
641786
642446
  if (criticalError) {
641787
642447
  const timer = setTimeout(() => {
@@ -641790,6 +642450,15 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
641790
642450
  return () => clearTimeout(timer);
641791
642451
  }
641792
642452
  }, [criticalError]);
642453
+ import_react38.useEffect(() => {
642454
+ if (showPreflightModal) {
642455
+ const timeoutId = setTimeout(() => {
642456
+ addActivity("Preflight approval timed out (5 minutes) - modal closed", "warn");
642457
+ setShowPreflightModal(false);
642458
+ }, 5 * 60 * 1000);
642459
+ return () => clearTimeout(timeoutId);
642460
+ }
642461
+ }, [showPreflightModal]);
641793
642462
  const initializeProject2 = async () => {
641794
642463
  addActivity("Loading project...");
641795
642464
  const agentRoot = await findAgentRootOrFail(process.cwd());
@@ -641809,7 +642478,7 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
641809
642478
  };
641810
642479
  const setupLogging = () => {
641811
642480
  const agentRoot = debuggerRef.current.agentRoot;
641812
- const logsDir = path41.join(agentRoot, ".adk", "logs");
642481
+ const logsDir = path44.join(agentRoot, ".adk", "logs");
641813
642482
  mkdirSync3(logsDir, { recursive: true });
641814
642483
  const logStream = createWriteStream3(logFilePath, { flags: "a" });
641815
642484
  return logStream;
@@ -641826,7 +642495,7 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
641826
642495
  };
641827
642496
  const generateBot = async (agentProject2) => {
641828
642497
  addActivity("Generating bot project...");
641829
- const botPath = path41.join(agentProject2.path, ".adk", "bot");
642498
+ const botPath = path44.join(agentProject2.path, ".adk", "bot");
641830
642499
  await generateBotProject({
641831
642500
  projectPath: agentProject2.path,
641832
642501
  outputPath: botPath
@@ -642170,7 +642839,7 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
642170
642839
  });
642171
642840
  }
642172
642841
  };
642173
- const setupFileWatcher = (agentProject2, botPath) => {
642842
+ const setupFileWatcher = (agentProject2, botPath, botIdForSync) => {
642174
642843
  addActivity("Watching for changes...", "success");
642175
642844
  const fileWatcher = new FileWatcher2({
642176
642845
  projectPath: agentProject2.path,
@@ -642202,6 +642871,37 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
642202
642871
  await agentProject2.reload();
642203
642872
  setProjectVersion((v2) => v2 + 1);
642204
642873
  addActivity("Agent project reloaded", "success");
642874
+ if (botIdForSync && !preflightRef.current.isCheckingPreflight) {
642875
+ preflightRef.current.isCheckingPreflight = true;
642876
+ try {
642877
+ addActivity("Running preflight checks...");
642878
+ const checker = new PreflightChecker(agentProject2.path);
642879
+ const pending = await checker.checkWithPendingApply(botIdForSync);
642880
+ if (pending.result.hasChanges) {
642881
+ setPreflightState(pending);
642882
+ if (!showPreflightModal) {
642883
+ setShowPreflightModal(true);
642884
+ addActivity("Preflight check completed - awaiting confirmation", "warn");
642885
+ } else {
642886
+ addActivity("Changes updated - modal refreshed", "info");
642887
+ }
642888
+ return;
642889
+ } else {
642890
+ if (showPreflightModal) {
642891
+ addActivity("\u2713 Changes reverted - no sync needed", "success");
642892
+ } else {
642893
+ addActivity("\u2713 No changes detected", "success");
642894
+ }
642895
+ setShowPreflightModal(false);
642896
+ setPreflightState(undefined);
642897
+ }
642898
+ } catch (error) {
642899
+ addActivity(`Preflight check failed: ${error.message}`, "error");
642900
+ return;
642901
+ } finally {
642902
+ preflightRef.current.isCheckingPreflight = false;
642903
+ }
642904
+ }
642205
642905
  addActivity("Regenerating bot project...");
642206
642906
  await generateBotProject({
642207
642907
  projectPath: agentProject2.path,
@@ -642276,10 +642976,35 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
642276
642976
  if (!botIdForSync) {
642277
642977
  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
642978
  }
642979
+ let shouldContinueWithBotGeneration = true;
642980
+ const botIdForInitialCheck = agentProject2.agentInfo?.devId || agentProject2.agentInfo?.botId;
642981
+ if (botIdForInitialCheck && !preflightRef.current.initialPreflightDone) {
642982
+ preflightRef.current.initialPreflightDone = true;
642983
+ addActivity("Running initial preflight checks...");
642984
+ try {
642985
+ const checker = new PreflightChecker(agentProject2.path);
642986
+ const pending = await checker.checkWithPendingApply(botIdForInitialCheck);
642987
+ if (pending.result.hasChanges) {
642988
+ setPreflightState(pending);
642989
+ setShowPreflightModal(true);
642990
+ setIsInitialPreflight(true);
642991
+ addActivity("Initial preflight check - awaiting confirmation", "warn");
642992
+ shouldContinueWithBotGeneration = false;
642993
+ } else {
642994
+ addActivity("\u2713 No preflight changes detected", "success");
642995
+ }
642996
+ } catch (error) {
642997
+ const errorMsg = error instanceof Error ? error.message : String(error);
642998
+ addActivity(`Initial preflight check failed: ${errorMsg}`, "error");
642999
+ }
643000
+ }
643001
+ if (!shouldContinueWithBotGeneration) {
643002
+ return;
643003
+ }
642279
643004
  const uiServerInstance = await startUiServer(agentProject2, credentials, workspaceId, botIdForSync);
642280
643005
  await syncTables(agentProject2, botIdForSync);
642281
643006
  await checkIntegrations(agentProject2, botIdForSync);
642282
- const fileWatcher = setupFileWatcher(agentProject2, botPath);
643007
+ const fileWatcher = setupFileWatcher(agentProject2, botPath, botIdForSync);
642283
643008
  onReady?.();
642284
643009
  if (options.logs) {
642285
643010
  process.stderr.write(`
@@ -642305,9 +643030,13 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
642305
643030
  }
642306
643031
  };
642307
643032
  runDev();
642308
- }, [port, options, logFilePath, onReady]);
642309
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(ThemeProvider, {
642310
- children: viewMode === "summary" ? /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(DevStatus, {
643033
+ }, [port, options, logFilePath, onReady, continueInitialization]);
643034
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ThemeProvider, {
643035
+ children: showPreflightModal && preflightState ? /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(PreflightModal, {
643036
+ result: preflightState.result,
643037
+ onApprove: handlePreflightApprove,
643038
+ onCancel: handlePreflightCancel
643039
+ }, undefined, false, undefined, this) : viewMode === "summary" ? /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(DevStatus, {
642311
643040
  project,
642312
643041
  workspace,
642313
643042
  uiServer,
@@ -642323,7 +643052,7 @@ var import_react38, jsx_dev_runtime20, DevUI = ({ port, portConsole, options, lo
642323
643052
  runningEditor,
642324
643053
  onToggleView: handleToggleView,
642325
643054
  workerStats
642326
- }, projectVersion, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(LogsView, {
643055
+ }, projectVersion, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(LogsView, {
642327
643056
  logFilePath,
642328
643057
  onToggleView: handleToggleView
642329
643058
  }, undefined, false, undefined, this)
@@ -642345,10 +643074,11 @@ var init_adk_dev = __esm(async () => {
642345
643074
  init_build2(),
642346
643075
  init_DevStatus(),
642347
643076
  init_LogsView(),
643077
+ init_PreflightModal(),
642348
643078
  init_assert_valid_project()
642349
643079
  ]);
642350
643080
  import_react38 = __toESM(require_react(), 1);
642351
- jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
643081
+ jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
642352
643082
  });
642353
643083
 
642354
643084
  // src/commands/adk-build.ts
@@ -642356,7 +643086,7 @@ var exports_adk_build = {};
642356
643086
  __export(exports_adk_build, {
642357
643087
  adkBuild: () => adkBuild
642358
643088
  });
642359
- import path44 from "path";
643089
+ import path46 from "path";
642360
643090
  async function adkBuild(options = {}) {
642361
643091
  const { silent = false } = options;
642362
643092
  const log2 = silent ? () => {} : console.log;
@@ -642382,7 +643112,7 @@ async function adkBuild(options = {}) {
642382
643112
  log2(source_default.yellow("\u26A0\uFE0F No assets directory found, skipping asset type generation"));
642383
643113
  }
642384
643114
  log2(source_default.cyan("\uD83D\uDD28 Generating Botpress bot project..."));
642385
- const botPath = path44.join(project.path, ".adk", "bot");
643115
+ const botPath = path46.join(project.path, ".adk", "bot");
642386
643116
  await generateBotProject({
642387
643117
  projectPath: project.path,
642388
643118
  outputPath: botPath
@@ -642394,7 +643124,7 @@ async function adkBuild(options = {}) {
642394
643124
  await buildCommand.output();
642395
643125
  log2(source_default.green(`
642396
643126
  \u2705 Build completed successfully!`));
642397
- log2(source_default.gray(`\uD83D\uDCE6 Output directory: ${path44.join(botPath, ".botpress", "dist")}`));
643127
+ log2(source_default.gray(`\uD83D\uDCE6 Output directory: ${path46.join(botPath, ".botpress", "dist")}`));
642398
643128
  log2(source_default.gray(`
642399
643129
  Next steps:`));
642400
643130
  log2(source_default.gray(" - Run `adk deploy` to deploy your agent"));
@@ -642456,8 +643186,22 @@ var exports_adk_deploy = {};
642456
643186
  __export(exports_adk_deploy, {
642457
643187
  adkDeploy: () => adkDeploy
642458
643188
  });
642459
- import path46 from "path";
642460
- async function adkDeploy(environment = "production") {
643189
+ import path47 from "path";
643190
+ import readline from "readline";
643191
+ async function promptUserApproval() {
643192
+ const readlineInterface = readline.createInterface({
643193
+ input: process.stdin,
643194
+ output: process.stdout
643195
+ });
643196
+ return new Promise((resolve5) => {
643197
+ readlineInterface.question(PreflightFormatter2.formatPrompt(), (answer2) => {
643198
+ readlineInterface.close();
643199
+ const normalized = answer2.trim().toLowerCase();
643200
+ resolve5(normalized === "y" || normalized === "yes");
643201
+ });
643202
+ });
643203
+ }
643204
+ async function adkDeploy(environment = "production", options = {}) {
642461
643205
  console.log(source_default.blue("\uD83D\uDE80 Deploying ADK agent to Botpress..."));
642462
643206
  console.log(source_default.gray(`Environment: ${environment}`));
642463
643207
  try {
@@ -642474,9 +643218,35 @@ async function adkDeploy(environment = "production") {
642474
643218
  if (!botId) {
642475
643219
  throw new Error('No botId found in agent.json. Please run "adk link" to link your agent to a bot.');
642476
643220
  }
643221
+ const checker = new PreflightChecker(agentRoot);
643222
+ const { result, applied } = await checker.checkAndApply(botId, {
643223
+ shouldApply: async (_result, formatted) => {
643224
+ console.log(formatted);
643225
+ if (options.autoApprove) {
643226
+ console.log(source_default.green(`\u2713 Auto-approved. Applying changes...
643227
+ `));
643228
+ return true;
643229
+ }
643230
+ return promptUserApproval();
643231
+ },
643232
+ callbacks: {
643233
+ onProgress: (msg) => console.log(source_default.cyan(`\uD83D\uDD04 ${msg}`)),
643234
+ onSuccess: (msg) => console.log(source_default.green(`\u2705 ${msg}`)),
643235
+ onError: (msg) => console.log(source_default.red(`\u274C ${msg}`))
643236
+ }
643237
+ });
643238
+ if (!result.hasChanges) {
643239
+ console.log(source_default.gray(`\u2713 No changes detected. Proceeding...
643240
+ `));
643241
+ } else if (!applied) {
643242
+ console.log(source_default.red(`
643243
+ \u2717 Deployment cancelled by user.
643244
+ `));
643245
+ return;
643246
+ }
642477
643247
  const credentials = await auth.getAgentCredentials(agentRoot);
642478
643248
  const workspaceId = credentials.workspaceId;
642479
- const botPath = path46.join(project.path, ".adk", "bot");
643249
+ const botPath = path47.join(project.path, ".adk", "bot");
642480
643250
  console.log(source_default.cyan(`
642481
643251
  \uD83D\uDCE4 Deploying bot to Botpress...`));
642482
643252
  const deployCommand = new BpDeployCommand({
@@ -642546,6 +643316,7 @@ var init_adk_deploy = __esm(async () => {
642546
643316
  init_workspace_display();
642547
643317
  init_assert_logged_in();
642548
643318
  init_agent_root();
643319
+ init_preflight_formatter();
642549
643320
  await init_adk_build();
642550
643321
  });
642551
643322
 
@@ -642555,7 +643326,7 @@ __export(exports_adk_profiles, {
642555
643326
  adkProfilesSet: () => adkProfilesSet,
642556
643327
  adkProfilesList: () => adkProfilesList
642557
643328
  });
642558
- var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
643329
+ var import_react39, jsx_dev_runtime22, ProfilesListComponent = () => {
642559
643330
  const [state, setState] = import_react39.useState({
642560
643331
  profiles: [],
642561
643332
  currentProfile: "",
@@ -642585,17 +643356,17 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
642585
643356
  process.exit(0);
642586
643357
  };
642587
643358
  if (state.loading) {
642588
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643359
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642589
643360
  flexDirection: "column",
642590
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643361
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642591
643362
  children: "Loading profiles..."
642592
643363
  }, undefined, false, undefined, this)
642593
643364
  }, undefined, false, undefined, this);
642594
643365
  }
642595
643366
  if (state.error) {
642596
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643367
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642597
643368
  flexDirection: "column",
642598
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643369
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642599
643370
  color: Theme.colors.error,
642600
643371
  children: [
642601
643372
  "Error: ",
@@ -642605,14 +643376,14 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
642605
643376
  }, undefined, false, undefined, this);
642606
643377
  }
642607
643378
  if (state.profiles.length === 0) {
642608
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643379
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642609
643380
  flexDirection: "column",
642610
643381
  children: [
642611
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643382
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642612
643383
  color: Theme.colors.warning,
642613
643384
  children: "No profiles found."
642614
643385
  }, undefined, false, undefined, this),
642615
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643386
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642616
643387
  color: Theme.colors.muted,
642617
643388
  dimColor: true,
642618
643389
  children: "Use 'adk login' to create your first profile."
@@ -642620,15 +643391,15 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
642620
643391
  ]
642621
643392
  }, undefined, true, undefined, this);
642622
643393
  }
642623
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643394
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642624
643395
  flexDirection: "column",
642625
643396
  children: [
642626
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643397
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642627
643398
  bold: true,
642628
643399
  color: Theme.colors.primary,
642629
643400
  children: "Botpress ADK Profiles"
642630
643401
  }, undefined, false, undefined, this),
642631
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643402
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642632
643403
  color: Theme.colors.muted,
642633
643404
  dimColor: true,
642634
643405
  children: [
@@ -642636,19 +643407,19 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
642636
643407
  state.currentProfile
642637
643408
  ]
642638
643409
  }, undefined, true, undefined, this),
642639
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643410
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642640
643411
  flexDirection: "column",
642641
643412
  marginTop: 1,
642642
643413
  children: state.profiles.map((profile) => {
642643
643414
  const isCurrent = profile.name === state.currentProfile;
642644
643415
  const userDisplay = profile.displayName ? `${profile.displayName} (${profile.email})` : profile.email || "Unknown user";
642645
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643416
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642646
643417
  marginBottom: 1,
642647
643418
  flexDirection: "column",
642648
643419
  children: [
642649
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643420
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642650
643421
  children: [
642651
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643422
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642652
643423
  color: isCurrent ? Theme.colors.success : Theme.colors.primary,
642653
643424
  bold: isCurrent,
642654
643425
  children: [
@@ -642656,7 +643427,7 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
642656
643427
  profile.name
642657
643428
  ]
642658
643429
  }, undefined, true, undefined, this),
642659
- isCurrent && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643430
+ isCurrent && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642660
643431
  color: Theme.colors.success,
642661
643432
  dimColor: true,
642662
643433
  children: [
@@ -642666,23 +643437,23 @@ var import_react39, jsx_dev_runtime21, ProfilesListComponent = () => {
642666
643437
  }, undefined, true, undefined, this)
642667
643438
  ]
642668
643439
  }, undefined, true, undefined, this),
642669
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643440
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642670
643441
  paddingLeft: 2,
642671
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643442
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642672
643443
  color: Theme.colors.text,
642673
643444
  children: userDisplay
642674
643445
  }, undefined, false, undefined, this)
642675
643446
  }, undefined, false, undefined, this),
642676
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643447
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642677
643448
  paddingLeft: 2,
642678
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643449
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642679
643450
  color: Theme.colors.text,
642680
643451
  children: profile.apiUrl.replace("https://", "")
642681
643452
  }, undefined, false, undefined, this)
642682
643453
  }, undefined, false, undefined, this),
642683
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643454
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642684
643455
  paddingLeft: 2,
642685
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643456
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642686
643457
  color: Theme.colors.muted,
642687
643458
  children: [
642688
643459
  "Used ",
@@ -642786,9 +643557,9 @@ ${lastUsed}`
642786
643557
  process.exit(0);
642787
643558
  };
642788
643559
  if (state.loading) {
642789
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643560
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642790
643561
  flexDirection: "column",
642791
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643562
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642792
643563
  children: "Setting profile..."
642793
643564
  }, undefined, false, undefined, this)
642794
643565
  }, undefined, false, undefined, this);
@@ -642797,17 +643568,17 @@ ${lastUsed}`
642797
643568
  const selectedProfileInfo = profileOptions.find((p) => p.id === state.selectedProfile);
642798
643569
  const userInfo = selectedProfileInfo?.description?.split(`
642799
643570
  `)[0] || "Unknown user";
642800
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643571
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642801
643572
  flexDirection: "column",
642802
643573
  children: [
642803
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643574
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642804
643575
  color: Theme.colors.success,
642805
643576
  children: [
642806
643577
  "\u2713 Successfully switched to profile: ",
642807
643578
  state.selectedProfile
642808
643579
  ]
642809
643580
  }, undefined, true, undefined, this),
642810
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643581
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642811
643582
  color: Theme.colors.text,
642812
643583
  children: [
642813
643584
  "Logged in as ",
@@ -642818,9 +643589,9 @@ ${lastUsed}`
642818
643589
  }, undefined, true, undefined, this);
642819
643590
  }
642820
643591
  if (state.error) {
642821
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643592
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642822
643593
  flexDirection: "column",
642823
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643594
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642824
643595
  color: Theme.colors.error,
642825
643596
  children: [
642826
643597
  "Error: ",
@@ -642829,20 +643600,20 @@ ${lastUsed}`
642829
643600
  }, undefined, true, undefined, this)
642830
643601
  }, undefined, false, undefined, this);
642831
643602
  }
642832
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
643603
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
642833
643604
  flexDirection: "column",
642834
643605
  children: [
642835
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643606
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642836
643607
  bold: true,
642837
643608
  color: Theme.colors.primary,
642838
643609
  children: "Select Profile"
642839
643610
  }, undefined, false, undefined, this),
642840
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
643611
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
642841
643612
  color: Theme.colors.muted,
642842
643613
  dimColor: true,
642843
643614
  children: "Press Enter to switch to the selected profile"
642844
643615
  }, undefined, false, undefined, this),
642845
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Select, {
643616
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Select, {
642846
643617
  options: profileOptions,
642847
643618
  initialSelected: state.selectedProfile,
642848
643619
  onSubmit: handleProfileSelect,
@@ -642881,8 +643652,8 @@ ${lastUsed}`
642881
643652
  }
642882
643653
  return;
642883
643654
  }
642884
- const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(FocusProvider, {
642885
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ProfilesListComponent, {}, undefined, false, undefined, this)
643655
+ const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(FocusProvider, {
643656
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ProfilesListComponent, {}, undefined, false, undefined, this)
642886
643657
  }, undefined, false, undefined, this));
642887
643658
  await waitUntilExit();
642888
643659
  }, adkProfilesSet = async (profileName) => {
@@ -642896,8 +643667,8 @@ ${lastUsed}`
642896
643667
  }
642897
643668
  return;
642898
643669
  }
642899
- const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(FocusProvider, {
642900
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ProfilesSetComponent, {
643670
+ const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(FocusProvider, {
643671
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ProfilesSetComponent, {
642901
643672
  profileName: profileName || ""
642902
643673
  }, undefined, false, undefined, this)
642903
643674
  }, undefined, false, undefined, this));
@@ -642913,7 +643684,7 @@ var init_adk_profiles = __esm(async () => {
642913
643684
  init_Select()
642914
643685
  ]);
642915
643686
  import_react39 = __toESM(require_react(), 1);
642916
- jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
643687
+ jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
642917
643688
  });
642918
643689
 
642919
643690
  // src/commands/adk-add.tsx
@@ -642969,36 +643740,36 @@ async function adkAdd(resource2, options) {
642969
643740
  }, []);
642970
643741
  const resourceType = isInterface ? "interface" : "integration";
642971
643742
  if (status === "adding") {
642972
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
643743
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
642973
643744
  flexDirection: "column",
642974
- children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643745
+ children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
642975
643746
  children: [
642976
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643747
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
642977
643748
  color: "cyan",
642978
643749
  children: "\u27A4"
642979
643750
  }, undefined, false, undefined, this),
642980
643751
  " Adding ",
642981
643752
  resourceType,
642982
643753
  " ",
642983
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643754
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
642984
643755
  bold: true,
642985
643756
  children: name2
642986
643757
  }, undefined, false, undefined, this),
642987
- version !== "latest" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643758
+ version !== "latest" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
642988
643759
  children: [
642989
643760
  " ",
642990
643761
  "version ",
642991
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643762
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
642992
643763
  bold: true,
642993
643764
  children: version
642994
643765
  }, undefined, false, undefined, this)
642995
643766
  ]
642996
643767
  }, undefined, true, undefined, this),
642997
- options?.alias && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643768
+ options?.alias && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
642998
643769
  children: [
642999
643770
  " ",
643000
643771
  "as ",
643001
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643772
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643002
643773
  bold: true,
643003
643774
  children: options.alias
643004
643775
  }, undefined, false, undefined, this)
@@ -643010,9 +643781,9 @@ async function adkAdd(resource2, options) {
643010
643781
  }, undefined, false, undefined, this);
643011
643782
  }
643012
643783
  if (status === "error") {
643013
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
643784
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643014
643785
  flexDirection: "column",
643015
- children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643786
+ children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643016
643787
  color: "red",
643017
643788
  children: [
643018
643789
  "\u2717 Failed to add ",
@@ -643024,9 +643795,9 @@ async function adkAdd(resource2, options) {
643024
643795
  }, undefined, false, undefined, this);
643025
643796
  }
643026
643797
  if (status === "warning" && result) {
643027
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
643798
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643028
643799
  flexDirection: "column",
643029
- children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643800
+ children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643030
643801
  color: "yellow",
643031
643802
  children: [
643032
643803
  "\u26A0 ",
@@ -643037,32 +643808,32 @@ async function adkAdd(resource2, options) {
643037
643808
  }
643038
643809
  if (status === "success" && result) {
643039
643810
  const alias = options?.alias || name2;
643040
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
643811
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643041
643812
  flexDirection: "column",
643042
643813
  children: [
643043
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643814
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643044
643815
  color: "green",
643045
643816
  children: [
643046
643817
  "\u2713 Added ",
643047
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643818
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643048
643819
  bold: true,
643049
643820
  children: name2
643050
643821
  }, undefined, false, undefined, this),
643051
- result.newVersion && result.newVersion !== "latest" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643822
+ result.newVersion && result.newVersion !== "latest" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643052
643823
  children: [
643053
643824
  " ",
643054
643825
  "version ",
643055
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643826
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643056
643827
  bold: true,
643057
643828
  children: result.newVersion
643058
643829
  }, undefined, false, undefined, this)
643059
643830
  ]
643060
643831
  }, undefined, true, undefined, this),
643061
- options?.alias && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643832
+ options?.alias && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643062
643833
  children: [
643063
643834
  " ",
643064
643835
  "as ",
643065
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643836
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643066
643837
  bold: true,
643067
643838
  children: options.alias
643068
643839
  }, undefined, false, undefined, this)
@@ -643072,13 +643843,13 @@ async function adkAdd(resource2, options) {
643072
643843
  "to agent.config.ts dependencies"
643073
643844
  ]
643074
643845
  }, undefined, true, undefined, this),
643075
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
643846
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643076
643847
  marginTop: 1,
643077
- children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643848
+ children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643078
643849
  dimColor: true,
643079
643850
  children: [
643080
643851
  "Please configure it in the UI using the ",
643081
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643852
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643082
643853
  color: "cyan",
643083
643854
  children: "adk dev"
643084
643855
  }, undefined, false, undefined, this),
@@ -643086,19 +643857,19 @@ async function adkAdd(resource2, options) {
643086
643857
  ]
643087
643858
  }, undefined, true, undefined, this)
643088
643859
  }, undefined, false, undefined, this),
643089
- !isInterface && result.requiresConfiguration && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
643860
+ !isInterface && result.requiresConfiguration && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643090
643861
  marginTop: 1,
643091
643862
  flexDirection: "column",
643092
643863
  children: [
643093
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643864
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643094
643865
  color: "yellow",
643095
643866
  children: "\u26A0 This integration requires configuration"
643096
643867
  }, undefined, false, undefined, this),
643097
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643868
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643098
643869
  dimColor: true,
643099
643870
  children: [
643100
643871
  "Run ",
643101
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
643872
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643102
643873
  color: "cyan",
643103
643874
  children: [
643104
643875
  "adk connect ",
@@ -643115,19 +643886,19 @@ async function adkAdd(resource2, options) {
643115
643886
  }
643116
643887
  return null;
643117
643888
  };
643118
- render_default(/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(AddResource, {}, undefined, false, undefined, this));
643889
+ render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(AddResource, {}, undefined, false, undefined, this));
643119
643890
  }
643120
- var import_react40, jsx_dev_runtime22;
643891
+ var import_react40, jsx_dev_runtime23;
643121
643892
  var init_adk_add = __esm(async () => {
643122
643893
  init_assert_logged_in();
643123
643894
  init_agent_root();
643124
643895
  await init_build2();
643125
643896
  import_react40 = __toESM(require_react(), 1);
643126
- jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
643897
+ jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
643127
643898
  });
643128
643899
 
643129
643900
  // src/components/MultiSelect.tsx
643130
- var import_react41, jsx_dev_runtime23, MultiSelect = ({
643901
+ var import_react41, jsx_dev_runtime24, MultiSelect = ({
643131
643902
  prompt,
643132
643903
  options,
643133
643904
  initialSelected = [],
@@ -643200,30 +643971,30 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
643200
643971
  handleSubmit();
643201
643972
  }
643202
643973
  });
643203
- return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643974
+ return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
643204
643975
  flexDirection: "column",
643205
643976
  children: [
643206
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643977
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
643207
643978
  marginBottom: 1,
643208
- children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643979
+ children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643209
643980
  color: "cyan",
643210
643981
  bold: true,
643211
643982
  children: prompt
643212
643983
  }, undefined, false, undefined, this)
643213
643984
  }, undefined, false, undefined, this),
643214
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643985
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
643215
643986
  flexDirection: "column",
643216
643987
  children: options.map((option, index) => {
643217
643988
  const isSelected = selectedIds.has(option.id);
643218
643989
  const isFocused = index === focusedIndex;
643219
- return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643990
+ return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
643220
643991
  marginBottom: 0,
643221
643992
  children: [
643222
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643993
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643223
643994
  color: isFocused ? "cyan" : "gray",
643224
643995
  children: isFocused ? "\u2192 " : " "
643225
643996
  }, undefined, false, undefined, this),
643226
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
643997
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643227
643998
  color: isSelected ? "green" : "gray",
643228
643999
  children: [
643229
644000
  "[",
@@ -643231,15 +644002,15 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
643231
644002
  "]"
643232
644003
  ]
643233
644004
  }, undefined, true, undefined, this),
643234
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
644005
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643235
644006
  children: " "
643236
644007
  }, undefined, false, undefined, this),
643237
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
644008
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643238
644009
  color: isFocused ? "cyan" : "white",
643239
644010
  bold: isFocused,
643240
644011
  children: option.label
643241
644012
  }, undefined, false, undefined, this),
643242
- option.description && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
644013
+ option.description && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643243
644014
  color: "gray",
643244
644015
  dimColor: true,
643245
644016
  children: [
@@ -643251,9 +644022,9 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
643251
644022
  }, option.id, true, undefined, this);
643252
644023
  })
643253
644024
  }, undefined, false, undefined, this),
643254
- selectedIds.size > 0 && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
644025
+ selectedIds.size > 0 && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
643255
644026
  marginTop: 1,
643256
- children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
644027
+ children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643257
644028
  color: "green",
643258
644029
  dimColor: true,
643259
644030
  children: [
@@ -643263,9 +644034,9 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
643263
644034
  ]
643264
644035
  }, undefined, true, undefined, this)
643265
644036
  }, undefined, false, undefined, this),
643266
- validationError && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
644037
+ validationError && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
643267
644038
  marginTop: 1,
643268
- children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
644039
+ children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643269
644040
  color: "red",
643270
644041
  bold: true,
643271
644042
  children: [
@@ -643274,16 +644045,16 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
643274
644045
  ]
643275
644046
  }, undefined, true, undefined, this)
643276
644047
  }, undefined, false, undefined, this),
643277
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
644048
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
643278
644049
  marginTop: 1,
643279
- children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
644050
+ children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643280
644051
  color: "gray",
643281
644052
  dimColor: true,
643282
644053
  children: "\u2191\u2193 navigate \u2022 Space toggle \u2022 Enter submit \u2022 Esc cancel"
643283
644054
  }, undefined, false, undefined, this)
643284
644055
  }, undefined, false, undefined, this),
643285
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
643286
- children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
644056
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644057
+ children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
643287
644058
  color: "gray",
643288
644059
  dimColor: true,
643289
644060
  children: [
@@ -643300,7 +644071,7 @@ var import_react41, jsx_dev_runtime23, MultiSelect = ({
643300
644071
  var init_MultiSelect = __esm(async () => {
643301
644072
  await init_build2();
643302
644073
  import_react41 = __toESM(require_react(), 1);
643303
- jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
644074
+ jsx_dev_runtime24 = __toESM(require_jsx_dev_runtime(), 1);
643304
644075
  });
643305
644076
 
643306
644077
  // src/commands/adk-upgrade.tsx
@@ -643336,16 +644107,16 @@ async function adkUpgrade(resource2) {
643336
644107
  runUpgrade();
643337
644108
  }, []);
643338
644109
  if (status === "upgrading") {
643339
- return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644110
+ return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643340
644111
  flexDirection: "column",
643341
- children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644112
+ children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643342
644113
  children: [
643343
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644114
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643344
644115
  color: "cyan",
643345
644116
  children: "\u27A4"
643346
644117
  }, undefined, false, undefined, this),
643347
644118
  " Checking for updates to ",
643348
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644119
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643349
644120
  bold: true,
643350
644121
  children: cleanName
643351
644122
  }, undefined, false, undefined, this),
@@ -643355,9 +644126,9 @@ async function adkUpgrade(resource2) {
643355
644126
  }, undefined, false, undefined, this);
643356
644127
  }
643357
644128
  if (status === "error") {
643358
- return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644129
+ return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643359
644130
  flexDirection: "column",
643360
- children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644131
+ children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643361
644132
  color: "red",
643362
644133
  children: [
643363
644134
  "\u2717 Failed to upgrade: ",
@@ -643367,25 +644138,25 @@ async function adkUpgrade(resource2) {
643367
644138
  }, undefined, false, undefined, this);
643368
644139
  }
643369
644140
  if (result.upgraded.length === 0 && result.failed.length === 0) {
643370
- return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644141
+ return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643371
644142
  flexDirection: "column",
643372
- children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644143
+ children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643373
644144
  color: "yellow",
643374
644145
  children: "\u26A0 Already at the latest version"
643375
644146
  }, undefined, false, undefined, this)
643376
644147
  }, undefined, false, undefined, this);
643377
644148
  }
643378
- return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644149
+ return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643379
644150
  flexDirection: "column",
643380
644151
  children: [
643381
- result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644152
+ result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643382
644153
  flexDirection: "column",
643383
644154
  children: [
643384
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644155
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643385
644156
  color: "green",
643386
644157
  children: "\u2713 Upgraded:"
643387
644158
  }, undefined, false, undefined, this),
643388
- result.upgraded.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644159
+ result.upgraded.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643389
644160
  color: "green",
643390
644161
  children: [
643391
644162
  " ",
@@ -643395,15 +644166,15 @@ async function adkUpgrade(resource2) {
643395
644166
  }, i2, true, undefined, this))
643396
644167
  ]
643397
644168
  }, undefined, true, undefined, this),
643398
- result.failed.length > 0 && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644169
+ result.failed.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643399
644170
  flexDirection: "column",
643400
644171
  marginTop: 1,
643401
644172
  children: [
643402
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644173
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643403
644174
  color: "red",
643404
644175
  children: "\u2717 Failed:"
643405
644176
  }, undefined, false, undefined, this),
643406
- result.failed.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644177
+ result.failed.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643407
644178
  color: "red",
643408
644179
  children: [
643409
644180
  " ",
@@ -643413,13 +644184,13 @@ async function adkUpgrade(resource2) {
643413
644184
  }, i2, true, undefined, this))
643414
644185
  ]
643415
644186
  }, undefined, true, undefined, this),
643416
- result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644187
+ result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643417
644188
  marginTop: 1,
643418
- children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644189
+ children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643419
644190
  dimColor: true,
643420
644191
  children: [
643421
644192
  "Run ",
643422
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644193
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643423
644194
  color: "cyan",
643424
644195
  children: "adk dev"
643425
644196
  }, undefined, false, undefined, this),
@@ -643430,7 +644201,7 @@ async function adkUpgrade(resource2) {
643430
644201
  ]
643431
644202
  }, undefined, true, undefined, this);
643432
644203
  };
643433
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(UpgradeIntegration, {}, undefined, false, undefined, this));
644204
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(UpgradeIntegration, {}, undefined, false, undefined, this));
643434
644205
  } else {
643435
644206
  const InteractiveUpgrade = () => {
643436
644207
  const [integrations, setIntegrations] = import_react42.default.useState([]);
@@ -643499,11 +644270,11 @@ async function adkUpgrade(resource2) {
643499
644270
  setResult({ upgraded, failed });
643500
644271
  };
643501
644272
  if (checking) {
643502
- return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644273
+ return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643503
644274
  flexDirection: "column",
643504
- children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644275
+ children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643505
644276
  children: [
643506
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644277
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643507
644278
  color: "cyan",
643508
644279
  children: "\u27A4"
643509
644280
  }, undefined, false, undefined, this),
@@ -643513,11 +644284,11 @@ async function adkUpgrade(resource2) {
643513
644284
  }, undefined, false, undefined, this);
643514
644285
  }
643515
644286
  if (upgrading && !result) {
643516
- return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644287
+ return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643517
644288
  flexDirection: "column",
643518
- children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644289
+ children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643519
644290
  children: [
643520
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644291
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643521
644292
  color: "cyan",
643522
644293
  children: "\u27A4"
643523
644294
  }, undefined, false, undefined, this),
@@ -643531,17 +644302,17 @@ async function adkUpgrade(resource2) {
643531
644302
  }, undefined, false, undefined, this);
643532
644303
  }
643533
644304
  if (result) {
643534
- return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644305
+ return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643535
644306
  flexDirection: "column",
643536
644307
  children: [
643537
- result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644308
+ result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643538
644309
  flexDirection: "column",
643539
644310
  children: [
643540
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644311
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643541
644312
  color: "green",
643542
644313
  children: "\u2713 Upgraded:"
643543
644314
  }, undefined, false, undefined, this),
643544
- result.upgraded.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644315
+ result.upgraded.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643545
644316
  color: "green",
643546
644317
  children: [
643547
644318
  " ",
@@ -643551,15 +644322,15 @@ async function adkUpgrade(resource2) {
643551
644322
  }, i2, true, undefined, this))
643552
644323
  ]
643553
644324
  }, undefined, true, undefined, this),
643554
- result.failed.length > 0 && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644325
+ result.failed.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643555
644326
  flexDirection: "column",
643556
644327
  marginTop: 1,
643557
644328
  children: [
643558
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644329
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643559
644330
  color: "red",
643560
644331
  children: "\u2717 Failed:"
643561
644332
  }, undefined, false, undefined, this),
643562
- result.failed.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644333
+ result.failed.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643563
644334
  color: "red",
643564
644335
  children: [
643565
644336
  " ",
@@ -643569,13 +644340,13 @@ async function adkUpgrade(resource2) {
643569
644340
  }, i2, true, undefined, this))
643570
644341
  ]
643571
644342
  }, undefined, true, undefined, this),
643572
- result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644343
+ result.upgraded.length > 0 && /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643573
644344
  marginTop: 1,
643574
- children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644345
+ children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643575
644346
  dimColor: true,
643576
644347
  children: [
643577
644348
  "Run ",
643578
- /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644349
+ /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643579
644350
  color: "cyan",
643580
644351
  children: "adk dev"
643581
644352
  }, undefined, false, undefined, this),
@@ -643587,9 +644358,9 @@ async function adkUpgrade(resource2) {
643587
644358
  }, undefined, true, undefined, this);
643588
644359
  }
643589
644360
  if (availableIntegrationUpdates.size === 0 && availableInterfaceUpdates.size === 0) {
643590
- return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
644361
+ return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
643591
644362
  flexDirection: "column",
643592
- children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
644363
+ children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
643593
644364
  color: "green",
643594
644365
  children: "\u2713 All integrations and interfaces are already at the latest version"
643595
644366
  }, undefined, false, undefined, this)
@@ -643606,16 +644377,16 @@ async function adkUpgrade(resource2) {
643606
644377
  value: `ifc:${i2.alias}`
643607
644378
  }));
643608
644379
  const options = [...intOptions, ...ifcOptions];
643609
- return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(MultiSelect, {
644380
+ return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(MultiSelect, {
643610
644381
  prompt: "Select dependencies to upgrade:",
643611
644382
  options,
643612
644383
  onSubmit: handleSubmit
643613
644384
  }, undefined, false, undefined, this);
643614
644385
  };
643615
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(InteractiveUpgrade, {}, undefined, false, undefined, this));
644386
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(InteractiveUpgrade, {}, undefined, false, undefined, this));
643616
644387
  }
643617
644388
  }
643618
- var import_react42, jsx_dev_runtime24;
644389
+ var import_react42, jsx_dev_runtime25;
643619
644390
  var init_adk_upgrade = __esm(async () => {
643620
644391
  init_dist15();
643621
644392
  await __promiseAll([
@@ -643623,7 +644394,7 @@ var init_adk_upgrade = __esm(async () => {
643623
644394
  init_MultiSelect()
643624
644395
  ]);
643625
644396
  import_react42 = __toESM(require_react(), 1);
643626
- jsx_dev_runtime24 = __toESM(require_jsx_dev_runtime(), 1);
644397
+ jsx_dev_runtime25 = __toESM(require_jsx_dev_runtime(), 1);
643627
644398
  });
643628
644399
 
643629
644400
  // src/commands/adk-remove.tsx
@@ -643707,18 +644478,18 @@ async function adkRemove(resource2) {
643707
644478
  runRemove();
643708
644479
  }, []);
643709
644480
  if (status === "removing") {
643710
- return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644481
+ return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643711
644482
  flexDirection: "column",
643712
- children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644483
+ children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643713
644484
  children: [
643714
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644485
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643715
644486
  color: "cyan",
643716
644487
  children: "\u27A4"
643717
644488
  }, undefined, false, undefined, this),
643718
644489
  " Removing ",
643719
644490
  resourceType,
643720
644491
  " ",
643721
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644492
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643722
644493
  bold: true,
643723
644494
  children: cleanName
643724
644495
  }, undefined, false, undefined, this),
@@ -643728,9 +644499,9 @@ async function adkRemove(resource2) {
643728
644499
  }, undefined, false, undefined, this);
643729
644500
  }
643730
644501
  if (status === "error") {
643731
- return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644502
+ return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643732
644503
  flexDirection: "column",
643733
- children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644504
+ children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643734
644505
  color: "red",
643735
644506
  children: [
643736
644507
  "\u2717 Failed to remove ",
@@ -643741,27 +644512,27 @@ async function adkRemove(resource2) {
643741
644512
  }, undefined, true, undefined, this)
643742
644513
  }, undefined, false, undefined, this);
643743
644514
  }
643744
- return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644515
+ return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643745
644516
  flexDirection: "column",
643746
644517
  children: [
643747
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644518
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643748
644519
  color: "green",
643749
644520
  children: [
643750
644521
  "\u2713 Removed ",
643751
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644522
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643752
644523
  bold: true,
643753
644524
  children: cleanName
643754
644525
  }, undefined, false, undefined, this),
643755
644526
  " from agent.config.ts dependencies"
643756
644527
  ]
643757
644528
  }, undefined, true, undefined, this),
643758
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644529
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643759
644530
  marginTop: 1,
643760
- children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644531
+ children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643761
644532
  dimColor: true,
643762
644533
  children: [
643763
644534
  "Run ",
643764
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644535
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643765
644536
  color: "cyan",
643766
644537
  children: "adk dev"
643767
644538
  }, undefined, false, undefined, this),
@@ -643772,7 +644543,7 @@ async function adkRemove(resource2) {
643772
644543
  ]
643773
644544
  }, undefined, true, undefined, this);
643774
644545
  };
643775
- render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(RemoveIntegration, {}, undefined, false, undefined, this));
644546
+ render_default(/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(RemoveIntegration, {}, undefined, false, undefined, this));
643776
644547
  } else {
643777
644548
  const InteractiveRemove = () => {
643778
644549
  const [integrations, setIntegrations] = import_react43.default.useState([]);
@@ -643807,11 +644578,11 @@ async function adkRemove(resource2) {
643807
644578
  }
643808
644579
  };
643809
644580
  if (loading) {
643810
- return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644581
+ return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643811
644582
  flexDirection: "column",
643812
- children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644583
+ children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643813
644584
  children: [
643814
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644585
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643815
644586
  color: "cyan",
643816
644587
  children: "\u27A4"
643817
644588
  }, undefined, false, undefined, this),
@@ -643821,16 +644592,16 @@ async function adkRemove(resource2) {
643821
644592
  }, undefined, false, undefined, this);
643822
644593
  }
643823
644594
  if (removing && status === "idle") {
643824
- return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644595
+ return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643825
644596
  flexDirection: "column",
643826
- children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644597
+ children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643827
644598
  children: [
643828
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644599
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643829
644600
  color: "cyan",
643830
644601
  children: "\u27A4"
643831
644602
  }, undefined, false, undefined, this),
643832
644603
  " Removing integration ",
643833
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644604
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643834
644605
  bold: true,
643835
644606
  children: selected
643836
644607
  }, undefined, false, undefined, this),
@@ -643840,9 +644611,9 @@ async function adkRemove(resource2) {
643840
644611
  }, undefined, false, undefined, this);
643841
644612
  }
643842
644613
  if (status === "error") {
643843
- return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644614
+ return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643844
644615
  flexDirection: "column",
643845
- children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644616
+ children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643846
644617
  color: "red",
643847
644618
  children: [
643848
644619
  "\u2717 Failed to remove integration: ",
@@ -643852,27 +644623,27 @@ async function adkRemove(resource2) {
643852
644623
  }, undefined, false, undefined, this);
643853
644624
  }
643854
644625
  if (status === "success") {
643855
- return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644626
+ return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643856
644627
  flexDirection: "column",
643857
644628
  children: [
643858
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644629
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643859
644630
  color: "green",
643860
644631
  children: [
643861
644632
  "\u2713 Removed ",
643862
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644633
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643863
644634
  bold: true,
643864
644635
  children: selected
643865
644636
  }, undefined, false, undefined, this),
643866
644637
  " from agent.config.ts dependencies"
643867
644638
  ]
643868
644639
  }, undefined, true, undefined, this),
643869
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644640
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643870
644641
  marginTop: 1,
643871
- children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644642
+ children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643872
644643
  dimColor: true,
643873
644644
  children: [
643874
644645
  "Run ",
643875
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644646
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643876
644647
  color: "cyan",
643877
644648
  children: "adk dev"
643878
644649
  }, undefined, false, undefined, this),
@@ -643884,9 +644655,9 @@ async function adkRemove(resource2) {
643884
644655
  }, undefined, true, undefined, this);
643885
644656
  }
643886
644657
  if (integrations.length === 0) {
643887
- return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644658
+ return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643888
644659
  flexDirection: "column",
643889
- children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644660
+ children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643890
644661
  color: "yellow",
643891
644662
  children: "\u26A0 No integrations found in agent.config.ts dependencies"
643892
644663
  }, undefined, false, undefined, this)
@@ -643897,16 +644668,16 @@ async function adkRemove(resource2) {
643897
644668
  label: `${i2.alias} (${i2.name}@${i2.version})`,
643898
644669
  value: i2.alias
643899
644670
  }));
643900
- return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644671
+ return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643901
644672
  flexDirection: "column",
643902
644673
  children: [
643903
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
644674
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
643904
644675
  color: "cyan",
643905
644676
  children: "Select integration to remove:"
643906
644677
  }, undefined, false, undefined, this),
643907
- /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
644678
+ /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643908
644679
  marginTop: 1,
643909
- children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Select, {
644680
+ children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Select, {
643910
644681
  options,
643911
644682
  onSubmit: handleSubmit
643912
644683
  }, undefined, false, undefined, this)
@@ -643914,10 +644685,10 @@ async function adkRemove(resource2) {
643914
644685
  ]
643915
644686
  }, undefined, true, undefined, this);
643916
644687
  };
643917
- render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(InteractiveRemove, {}, undefined, false, undefined, this));
644688
+ render_default(/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(InteractiveRemove, {}, undefined, false, undefined, this));
643918
644689
  }
643919
644690
  }
643920
- var import_react43, jsx_dev_runtime25;
644691
+ var import_react43, jsx_dev_runtime26;
643921
644692
  var init_adk_remove = __esm(async () => {
643922
644693
  init_dist15();
643923
644694
  init_agent_root();
@@ -643926,31 +644697,31 @@ var init_adk_remove = __esm(async () => {
643926
644697
  init_Select()
643927
644698
  ]);
643928
644699
  import_react43 = __toESM(require_react(), 1);
643929
- jsx_dev_runtime25 = __toESM(require_jsx_dev_runtime(), 1);
644700
+ jsx_dev_runtime26 = __toESM(require_jsx_dev_runtime(), 1);
643930
644701
  });
643931
644702
 
643932
644703
  // src/components/Table.tsx
643933
644704
  function Table({ columns, data, getKey }) {
643934
644705
  const totalWidth = columns.reduce((sum, col) => sum + col.width, 0);
643935
- return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
644706
+ return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
643936
644707
  flexDirection: "column",
643937
644708
  children: [
643938
- /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643939
- children: columns.map((col, idx) => /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
644709
+ /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644710
+ children: columns.map((col, idx) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
643940
644711
  width: col.width,
643941
- children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
644712
+ children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
643942
644713
  bold: true,
643943
644714
  dimColor: true,
643944
644715
  children: col.header
643945
644716
  }, undefined, false, undefined, this)
643946
644717
  }, idx, false, undefined, this))
643947
644718
  }, undefined, false, undefined, this),
643948
- /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
644719
+ /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
643949
644720
  dimColor: true,
643950
644721
  children: "\u2500".repeat(totalWidth)
643951
644722
  }, undefined, false, undefined, this),
643952
- data.map((row, idx) => /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
643953
- children: columns.map((col, colIdx) => /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
644723
+ data.map((row, idx) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644724
+ children: columns.map((col, colIdx) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
643954
644725
  width: col.width,
643955
644726
  children: col.render(row)
643956
644727
  }, colIdx, false, undefined, this))
@@ -643958,10 +644729,10 @@ function Table({ columns, data, getKey }) {
643958
644729
  ]
643959
644730
  }, undefined, true, undefined, this);
643960
644731
  }
643961
- var jsx_dev_runtime26;
644732
+ var jsx_dev_runtime27;
643962
644733
  var init_Table = __esm(async () => {
643963
644734
  await init_build2();
643964
- jsx_dev_runtime26 = __toESM(require_jsx_dev_runtime(), 1);
644735
+ jsx_dev_runtime27 = __toESM(require_jsx_dev_runtime(), 1);
643965
644736
  });
643966
644737
 
643967
644738
  // src/commands/adk-search.tsx
@@ -643993,16 +644764,16 @@ async function adkSearch(query, options = {}) {
643993
644764
  runSearch();
643994
644765
  }, []);
643995
644766
  if (status === "searching") {
643996
- return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644767
+ return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
643997
644768
  flexDirection: "column",
643998
- children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644769
+ children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
643999
644770
  children: [
644000
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644771
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644001
644772
  color: "cyan",
644002
644773
  children: "\u27A4"
644003
644774
  }, undefined, false, undefined, this),
644004
644775
  " Searching integrations for ",
644005
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644776
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644006
644777
  bold: true,
644007
644778
  children: [
644008
644779
  '"',
@@ -644016,9 +644787,9 @@ async function adkSearch(query, options = {}) {
644016
644787
  }, undefined, false, undefined, this);
644017
644788
  }
644018
644789
  if (status === "error") {
644019
- return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644790
+ return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
644020
644791
  flexDirection: "column",
644021
- children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644792
+ children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644022
644793
  color: "red",
644023
644794
  children: [
644024
644795
  "\u2717 Failed to search integrations: ",
@@ -644029,10 +644800,10 @@ async function adkSearch(query, options = {}) {
644029
644800
  }
644030
644801
  if (status === "success") {
644031
644802
  if (results.length === 0) {
644032
- return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644803
+ return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
644033
644804
  flexDirection: "column",
644034
644805
  children: [
644035
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644806
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644036
644807
  color: "yellow",
644037
644808
  children: [
644038
644809
  'No integrations found matching "',
@@ -644040,13 +644811,13 @@ async function adkSearch(query, options = {}) {
644040
644811
  '"'
644041
644812
  ]
644042
644813
  }, undefined, true, undefined, this),
644043
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644814
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
644044
644815
  marginTop: 1,
644045
- children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644816
+ children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644046
644817
  dimColor: true,
644047
644818
  children: [
644048
644819
  "Try a different search term or run ",
644049
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644820
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644050
644821
  color: "cyan",
644051
644822
  children: "adk list --available"
644052
644823
  }, undefined, false, undefined, this),
@@ -644058,17 +644829,17 @@ async function adkSearch(query, options = {}) {
644058
644829
  }, undefined, true, undefined, this);
644059
644830
  }
644060
644831
  if (format4 === "json") {
644061
- return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644832
+ return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
644062
644833
  flexDirection: "column",
644063
- children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644834
+ children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644064
644835
  children: JSON.stringify(results, null, 2)
644065
644836
  }, undefined, false, undefined, this)
644066
644837
  }, undefined, false, undefined, this);
644067
644838
  }
644068
- return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644839
+ return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
644069
644840
  flexDirection: "column",
644070
644841
  children: [
644071
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644842
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644072
644843
  bold: true,
644073
644844
  children: [
644074
644845
  "Found ",
@@ -644080,14 +644851,14 @@ async function adkSearch(query, options = {}) {
644080
644851
  '"'
644081
644852
  ]
644082
644853
  }, undefined, true, undefined, this),
644083
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644854
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
644084
644855
  marginTop: 1,
644085
- children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Table, {
644856
+ children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Table, {
644086
644857
  columns: [
644087
644858
  {
644088
644859
  header: "Name",
644089
644860
  width: 25,
644090
- render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644861
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644091
644862
  color: "cyan",
644092
644863
  children: row.name
644093
644864
  }, undefined, false, undefined, this)
@@ -644095,7 +644866,7 @@ async function adkSearch(query, options = {}) {
644095
644866
  {
644096
644867
  header: "Version",
644097
644868
  width: 12,
644098
- render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644869
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644099
644870
  dimColor: true,
644100
644871
  children: row.version
644101
644872
  }, undefined, false, undefined, this)
@@ -644103,14 +644874,14 @@ async function adkSearch(query, options = {}) {
644103
644874
  {
644104
644875
  header: "Title",
644105
644876
  width: 25,
644106
- render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644877
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644107
644878
  children: row.title || "-"
644108
644879
  }, undefined, false, undefined, this)
644109
644880
  },
644110
644881
  {
644111
644882
  header: "Description",
644112
644883
  width: 40,
644113
- render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644884
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644114
644885
  dimColor: true,
644115
644886
  children: row.description ? row.description.length > 37 ? row.description.slice(0, 37) + "..." : row.description : "-"
644116
644887
  }, undefined, false, undefined, this)
@@ -644120,15 +644891,15 @@ async function adkSearch(query, options = {}) {
644120
644891
  getKey: (row) => row.name
644121
644892
  }, undefined, false, undefined, this)
644122
644893
  }, undefined, false, undefined, this),
644123
- results.length >= limit && /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644894
+ results.length >= limit && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
644124
644895
  marginTop: 1,
644125
- children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644896
+ children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644126
644897
  dimColor: true,
644127
644898
  children: [
644128
644899
  "Showing first ",
644129
644900
  limit,
644130
644901
  " results. Use ",
644131
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644902
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644132
644903
  color: "cyan",
644133
644904
  children: "--limit"
644134
644905
  }, undefined, false, undefined, this),
@@ -644136,13 +644907,13 @@ async function adkSearch(query, options = {}) {
644136
644907
  ]
644137
644908
  }, undefined, true, undefined, this)
644138
644909
  }, undefined, false, undefined, this),
644139
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
644910
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
644140
644911
  marginTop: 1,
644141
- children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644912
+ children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644142
644913
  dimColor: true,
644143
644914
  children: [
644144
644915
  "Run ",
644145
- /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
644916
+ /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
644146
644917
  color: "cyan",
644147
644918
  children: "adk info <name>"
644148
644919
  }, undefined, false, undefined, this),
@@ -644155,16 +644926,16 @@ async function adkSearch(query, options = {}) {
644155
644926
  }
644156
644927
  return null;
644157
644928
  };
644158
- render_default(/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(SearchIntegrations, {}, undefined, false, undefined, this));
644929
+ render_default(/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(SearchIntegrations, {}, undefined, false, undefined, this));
644159
644930
  }
644160
- var import_react44, jsx_dev_runtime27;
644931
+ var import_react44, jsx_dev_runtime28;
644161
644932
  var init_adk_search = __esm(async () => {
644162
644933
  await __promiseAll([
644163
644934
  init_build2(),
644164
644935
  init_Table()
644165
644936
  ]);
644166
644937
  import_react44 = __toESM(require_react(), 1);
644167
- jsx_dev_runtime27 = __toESM(require_jsx_dev_runtime(), 1);
644938
+ jsx_dev_runtime28 = __toESM(require_jsx_dev_runtime(), 1);
644168
644939
  });
644169
644940
 
644170
644941
  // src/commands/adk-list.tsx
@@ -644224,11 +644995,11 @@ async function adkList(options = {}) {
644224
644995
  loadIntegrations();
644225
644996
  }, []);
644226
644997
  if (status === "loading") {
644227
- return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
644998
+ return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644228
644999
  flexDirection: "column",
644229
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645000
+ children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644230
645001
  children: [
644231
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645002
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644232
645003
  color: "cyan",
644233
645004
  children: "\u27A4"
644234
645005
  }, undefined, false, undefined, this),
@@ -644238,9 +645009,9 @@ async function adkList(options = {}) {
644238
645009
  }, undefined, false, undefined, this);
644239
645010
  }
644240
645011
  if (status === "error") {
644241
- return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645012
+ return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644242
645013
  flexDirection: "column",
644243
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645014
+ children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644244
645015
  color: "red",
644245
645016
  children: [
644246
645017
  "\u2717 Failed to list integrations: ",
@@ -644252,20 +645023,20 @@ async function adkList(options = {}) {
644252
645023
  if (status === "success") {
644253
645024
  if (integrations.length === 0) {
644254
645025
  if (options.available) {
644255
- return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645026
+ return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644256
645027
  flexDirection: "column",
644257
645028
  children: [
644258
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645029
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644259
645030
  color: "yellow",
644260
645031
  children: "No integrations available"
644261
645032
  }, undefined, false, undefined, this),
644262
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645033
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644263
645034
  marginTop: 1,
644264
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645035
+ children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644265
645036
  dimColor: true,
644266
645037
  children: [
644267
645038
  "Try running ",
644268
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645039
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644269
645040
  color: "cyan",
644270
645041
  children: "adk hub refresh"
644271
645042
  }, undefined, false, undefined, this),
@@ -644276,20 +645047,20 @@ async function adkList(options = {}) {
644276
645047
  ]
644277
645048
  }, undefined, true, undefined, this);
644278
645049
  } else {
644279
- return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645050
+ return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644280
645051
  flexDirection: "column",
644281
645052
  children: [
644282
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645053
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644283
645054
  color: "yellow",
644284
645055
  children: "No integrations installed"
644285
645056
  }, undefined, false, undefined, this),
644286
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645057
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644287
645058
  marginTop: 1,
644288
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645059
+ children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644289
645060
  dimColor: true,
644290
645061
  children: [
644291
645062
  "Run ",
644292
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645063
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644293
645064
  color: "cyan",
644294
645065
  children: "adk add <integration>"
644295
645066
  }, undefined, false, undefined, this),
@@ -644302,9 +645073,9 @@ async function adkList(options = {}) {
644302
645073
  }
644303
645074
  }
644304
645075
  if (format4 === "json") {
644305
- return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645076
+ return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644306
645077
  flexDirection: "column",
644307
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645078
+ children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644308
645079
  children: JSON.stringify(integrations, null, 2)
644309
645080
  }, undefined, false, undefined, this)
644310
645081
  }, undefined, false, undefined, this);
@@ -644314,14 +645085,14 @@ async function adkList(options = {}) {
644314
645085
  {
644315
645086
  header: "Name",
644316
645087
  width: 30,
644317
- render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645088
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644318
645089
  children: row.name
644319
645090
  }, undefined, false, undefined, this)
644320
645091
  },
644321
645092
  {
644322
645093
  header: "Version",
644323
645094
  width: 15,
644324
- render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645095
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644325
645096
  dimColor: true,
644326
645097
  children: row.version
644327
645098
  }, undefined, false, undefined, this)
@@ -644329,7 +645100,7 @@ async function adkList(options = {}) {
644329
645100
  {
644330
645101
  header: "Title",
644331
645102
  width: 35,
644332
- render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645103
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644333
645104
  dimColor: true,
644334
645105
  children: row.title || "-"
644335
645106
  }, undefined, false, undefined, this)
@@ -644338,7 +645109,7 @@ async function adkList(options = {}) {
644338
645109
  {
644339
645110
  header: "Alias",
644340
645111
  width: 20,
644341
- render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645112
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644342
645113
  color: "cyan",
644343
645114
  children: row.alias
644344
645115
  }, undefined, false, undefined, this)
@@ -644346,43 +645117,43 @@ async function adkList(options = {}) {
644346
645117
  {
644347
645118
  header: "Name",
644348
645119
  width: 30,
644349
- render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645120
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644350
645121
  children: row.name
644351
645122
  }, undefined, false, undefined, this)
644352
645123
  },
644353
645124
  {
644354
645125
  header: "Version",
644355
645126
  width: 15,
644356
- render: (row) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645127
+ render: (row) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644357
645128
  dimColor: true,
644358
645129
  children: row.version
644359
645130
  }, undefined, false, undefined, this)
644360
645131
  }
644361
645132
  ];
644362
- return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645133
+ return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644363
645134
  flexDirection: "column",
644364
645135
  children: [
644365
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645136
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644366
645137
  bold: true,
644367
645138
  children: title
644368
645139
  }, undefined, false, undefined, this),
644369
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645140
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644370
645141
  marginTop: 1,
644371
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Table, {
645142
+ children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Table, {
644372
645143
  columns,
644373
645144
  data: integrations,
644374
645145
  getKey: (row) => row.alias || row.name
644375
645146
  }, undefined, false, undefined, this)
644376
645147
  }, undefined, false, undefined, this),
644377
- integrations.length >= limit && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645148
+ integrations.length >= limit && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644378
645149
  marginTop: 1,
644379
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645150
+ children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644380
645151
  dimColor: true,
644381
645152
  children: [
644382
645153
  "Showing first ",
644383
645154
  limit,
644384
645155
  " results. Use ",
644385
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645156
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644386
645157
  color: "cyan",
644387
645158
  children: "--limit"
644388
645159
  }, undefined, false, undefined, this),
@@ -644390,13 +645161,13 @@ async function adkList(options = {}) {
644390
645161
  ]
644391
645162
  }, undefined, true, undefined, this)
644392
645163
  }, undefined, false, undefined, this),
644393
- !options.available && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645164
+ !options.available && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644394
645165
  marginTop: 1,
644395
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645166
+ children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644396
645167
  dimColor: true,
644397
645168
  children: [
644398
645169
  "Run ",
644399
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645170
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644400
645171
  color: "cyan",
644401
645172
  children: "adk list --available"
644402
645173
  }, undefined, false, undefined, this),
@@ -644404,13 +645175,13 @@ async function adkList(options = {}) {
644404
645175
  ]
644405
645176
  }, undefined, true, undefined, this)
644406
645177
  }, undefined, false, undefined, this),
644407
- options.available && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
645178
+ options.available && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
644408
645179
  marginTop: 1,
644409
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645180
+ children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644410
645181
  dimColor: true,
644411
645182
  children: [
644412
645183
  "Run ",
644413
- /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
645184
+ /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
644414
645185
  color: "cyan",
644415
645186
  children: "adk add <name>"
644416
645187
  }, undefined, false, undefined, this),
@@ -644423,9 +645194,9 @@ async function adkList(options = {}) {
644423
645194
  }
644424
645195
  return null;
644425
645196
  };
644426
- render_default(/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(ListIntegrations, {}, undefined, false, undefined, this));
645197
+ render_default(/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(ListIntegrations, {}, undefined, false, undefined, this));
644427
645198
  }
644428
- var import_react45, jsx_dev_runtime28;
645199
+ var import_react45, jsx_dev_runtime29;
644429
645200
  var init_adk_list = __esm(async () => {
644430
645201
  init_agent_root();
644431
645202
  await __promiseAll([
@@ -644433,7 +645204,7 @@ var init_adk_list = __esm(async () => {
644433
645204
  init_Table()
644434
645205
  ]);
644435
645206
  import_react45 = __toESM(require_react(), 1);
644436
- jsx_dev_runtime28 = __toESM(require_jsx_dev_runtime(), 1);
645207
+ jsx_dev_runtime29 = __toESM(require_jsx_dev_runtime(), 1);
644437
645208
  });
644438
645209
 
644439
645210
  // src/commands/adk-integration.tsx
@@ -644445,17 +645216,17 @@ function renderSchema(schema) {
644445
645216
  try {
644446
645217
  if (schema.type === "object" && schema.properties) {
644447
645218
  const required2 = schema.required || [];
644448
- return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645219
+ return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644449
645220
  marginLeft: 2,
644450
645221
  flexDirection: "column",
644451
645222
  children: Object.entries(schema.properties).map(([key, prop]) => {
644452
645223
  const isRequired = required2.includes(key);
644453
- return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645224
+ return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644454
645225
  dimColor: true,
644455
645226
  children: [
644456
645227
  "\u2022 ",
644457
645228
  key,
644458
- isRequired && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645229
+ isRequired && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644459
645230
  color: "yellow",
644460
645231
  children: "*"
644461
645232
  }, undefined, false, undefined, this),
@@ -644467,9 +645238,9 @@ function renderSchema(schema) {
644467
645238
  })
644468
645239
  }, undefined, false, undefined, this);
644469
645240
  }
644470
- return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645241
+ return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644471
645242
  marginLeft: 2,
644472
- children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645243
+ children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644473
645244
  dimColor: true,
644474
645245
  children: [
644475
645246
  "Type: ",
@@ -644478,9 +645249,9 @@ function renderSchema(schema) {
644478
645249
  }, undefined, true, undefined, this)
644479
645250
  }, undefined, false, undefined, this);
644480
645251
  } catch {
644481
- return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645252
+ return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644482
645253
  marginLeft: 2,
644483
- children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645254
+ children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644484
645255
  dimColor: true,
644485
645256
  children: JSON.stringify(schema)
644486
645257
  }, undefined, false, undefined, this)
@@ -644514,16 +645285,16 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644514
645285
  loadIntegration();
644515
645286
  }, []);
644516
645287
  if (status === "loading") {
644517
- return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645288
+ return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644518
645289
  flexDirection: "column",
644519
- children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645290
+ children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644520
645291
  children: [
644521
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645292
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644522
645293
  color: "cyan",
644523
645294
  children: "\u27A4"
644524
645295
  }, undefined, false, undefined, this),
644525
645296
  " Loading integration ",
644526
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645297
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644527
645298
  bold: true,
644528
645299
  children: integrationName
644529
645300
  }, undefined, false, undefined, this),
@@ -644533,23 +645304,23 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644533
645304
  }, undefined, false, undefined, this);
644534
645305
  }
644535
645306
  if (status === "error") {
644536
- return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645307
+ return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644537
645308
  flexDirection: "column",
644538
645309
  children: [
644539
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645310
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644540
645311
  color: "red",
644541
645312
  children: [
644542
645313
  "\u2717 Failed to load integration: ",
644543
645314
  error
644544
645315
  ]
644545
645316
  }, undefined, true, undefined, this),
644546
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645317
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644547
645318
  marginTop: 1,
644548
- children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645319
+ children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644549
645320
  dimColor: true,
644550
645321
  children: [
644551
645322
  "Run ",
644552
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645323
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644553
645324
  color: "cyan",
644554
645325
  children: [
644555
645326
  "adk search ",
@@ -644584,9 +645355,9 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644584
645355
  output.configuration = integration.configuration;
644585
645356
  output.configurations = integration.configurations;
644586
645357
  }
644587
- return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645358
+ return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644588
645359
  flexDirection: "column",
644589
- children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645360
+ children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644590
645361
  children: JSON.stringify(output, null, 2)
644591
645362
  }, undefined, false, undefined, this)
644592
645363
  }, undefined, false, undefined, this);
@@ -644594,15 +645365,15 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644594
645365
  const actionsCount = integration.actions ? Object.keys(integration.actions).length : 0;
644595
645366
  const channelsCount = integration.channels ? Object.keys(integration.channels).length : 0;
644596
645367
  const eventsCount = integration.events ? Object.keys(integration.events).length : 0;
644597
- return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645368
+ return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644598
645369
  flexDirection: "column",
644599
645370
  children: [
644600
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645371
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644601
645372
  bold: true,
644602
645373
  children: [
644603
645374
  integration.title || integration.name,
644604
645375
  " ",
644605
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645376
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644606
645377
  dimColor: true,
644607
645378
  children: [
644608
645379
  "v",
@@ -644611,18 +645382,18 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644611
645382
  }, undefined, true, undefined, this)
644612
645383
  ]
644613
645384
  }, undefined, true, undefined, this),
644614
- integration.description && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645385
+ integration.description && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644615
645386
  marginTop: 1,
644616
- children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645387
+ children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644617
645388
  dimColor: true,
644618
645389
  children: integration.description
644619
645390
  }, undefined, false, undefined, this)
644620
645391
  }, undefined, false, undefined, this),
644621
- showAll && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645392
+ showAll && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644622
645393
  marginTop: 1,
644623
645394
  flexDirection: "column",
644624
645395
  children: [
644625
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645396
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644626
645397
  dimColor: true,
644627
645398
  children: [
644628
645399
  "\u2022 ",
@@ -644631,7 +645402,7 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644631
645402
  actionsCount !== 1 ? "s" : ""
644632
645403
  ]
644633
645404
  }, undefined, true, undefined, this),
644634
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645405
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644635
645406
  dimColor: true,
644636
645407
  children: [
644637
645408
  "\u2022 ",
@@ -644640,7 +645411,7 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644640
645411
  channelsCount !== 1 ? "s" : ""
644641
645412
  ]
644642
645413
  }, undefined, true, undefined, this),
644643
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645414
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644644
645415
  dimColor: true,
644645
645416
  children: [
644646
645417
  "\u2022 ",
@@ -644651,23 +645422,23 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644651
645422
  }, undefined, true, undefined, this)
644652
645423
  ]
644653
645424
  }, undefined, true, undefined, this),
644654
- (options.actions || showAll) && integration.actions && Object.keys(integration.actions).length > 0 && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645425
+ (options.actions || showAll) && integration.actions && Object.keys(integration.actions).length > 0 && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644655
645426
  marginTop: 1,
644656
645427
  flexDirection: "column",
644657
645428
  children: [
644658
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645429
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644659
645430
  bold: true,
644660
645431
  children: "Actions"
644661
645432
  }, undefined, false, undefined, this),
644662
- Object.entries(integration.actions).map(([actionName, action]) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645433
+ Object.entries(integration.actions).map(([actionName, action]) => /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644663
645434
  marginTop: 1,
644664
645435
  flexDirection: "column",
644665
645436
  children: [
644666
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645437
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644667
645438
  color: "cyan",
644668
645439
  children: [
644669
645440
  actionName,
644670
- action.title && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645441
+ action.title && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644671
645442
  dimColor: true,
644672
645443
  children: [
644673
645444
  " - ",
@@ -644676,29 +645447,29 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644676
645447
  }, undefined, true, undefined, this)
644677
645448
  ]
644678
645449
  }, undefined, true, undefined, this),
644679
- action.description && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645450
+ action.description && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644680
645451
  dimColor: true,
644681
645452
  children: [
644682
645453
  " ",
644683
645454
  action.description
644684
645455
  ]
644685
645456
  }, undefined, true, undefined, this),
644686
- action.input?.schema && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645457
+ action.input?.schema && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644687
645458
  marginLeft: 2,
644688
645459
  flexDirection: "column",
644689
645460
  children: [
644690
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645461
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644691
645462
  dimColor: true,
644692
645463
  children: "Input:"
644693
645464
  }, undefined, false, undefined, this),
644694
645465
  renderSchema(action.input.schema)
644695
645466
  ]
644696
645467
  }, undefined, true, undefined, this),
644697
- action.output?.schema && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645468
+ action.output?.schema && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644698
645469
  marginLeft: 2,
644699
645470
  flexDirection: "column",
644700
645471
  children: [
644701
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645472
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644702
645473
  dimColor: true,
644703
645474
  children: "Output:"
644704
645475
  }, undefined, false, undefined, this),
@@ -644709,23 +645480,23 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644709
645480
  }, actionName, true, undefined, this))
644710
645481
  ]
644711
645482
  }, undefined, true, undefined, this),
644712
- (options.channels || showAll) && integration.channels && Object.keys(integration.channels).length > 0 && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645483
+ (options.channels || showAll) && integration.channels && Object.keys(integration.channels).length > 0 && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644713
645484
  marginTop: 1,
644714
645485
  flexDirection: "column",
644715
645486
  children: [
644716
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645487
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644717
645488
  bold: true,
644718
645489
  children: "Channels"
644719
645490
  }, undefined, false, undefined, this),
644720
- Object.entries(integration.channels).map(([channelName, channel]) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645491
+ Object.entries(integration.channels).map(([channelName, channel]) => /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644721
645492
  marginTop: 1,
644722
645493
  flexDirection: "column",
644723
645494
  children: [
644724
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645495
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644725
645496
  color: "cyan",
644726
645497
  children: [
644727
645498
  channelName,
644728
- channel.title && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645499
+ channel.title && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644729
645500
  dimColor: true,
644730
645501
  children: [
644731
645502
  " - ",
@@ -644734,7 +645505,7 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644734
645505
  }, undefined, true, undefined, this)
644735
645506
  ]
644736
645507
  }, undefined, true, undefined, this),
644737
- channel.description && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645508
+ channel.description && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644738
645509
  dimColor: true,
644739
645510
  children: [
644740
645511
  " ",
@@ -644745,23 +645516,23 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644745
645516
  }, channelName, true, undefined, this))
644746
645517
  ]
644747
645518
  }, undefined, true, undefined, this),
644748
- (options.events || showAll) && integration.events && Object.keys(integration.events).length > 0 && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645519
+ (options.events || showAll) && integration.events && Object.keys(integration.events).length > 0 && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644749
645520
  marginTop: 1,
644750
645521
  flexDirection: "column",
644751
645522
  children: [
644752
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645523
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644753
645524
  bold: true,
644754
645525
  children: "Events"
644755
645526
  }, undefined, false, undefined, this),
644756
- Object.entries(integration.events).map(([eventName, event3]) => /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645527
+ Object.entries(integration.events).map(([eventName, event3]) => /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644757
645528
  marginTop: 1,
644758
645529
  flexDirection: "column",
644759
645530
  children: [
644760
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645531
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644761
645532
  color: "cyan",
644762
645533
  children: [
644763
645534
  eventName,
644764
- event3.title && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645535
+ event3.title && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644765
645536
  dimColor: true,
644766
645537
  children: [
644767
645538
  " - ",
@@ -644770,7 +645541,7 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644770
645541
  }, undefined, true, undefined, this)
644771
645542
  ]
644772
645543
  }, undefined, true, undefined, this),
644773
- event3.description && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645544
+ event3.description && /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644774
645545
  dimColor: true,
644775
645546
  children: [
644776
645547
  " ",
@@ -644781,13 +645552,13 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644781
645552
  }, eventName, true, undefined, this))
644782
645553
  ]
644783
645554
  }, undefined, true, undefined, this),
644784
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
645555
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
644785
645556
  marginTop: 1,
644786
- children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645557
+ children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644787
645558
  dimColor: true,
644788
645559
  children: [
644789
645560
  "Run ",
644790
- /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
645561
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text, {
644791
645562
  color: "cyan",
644792
645563
  children: [
644793
645564
  "adk add ",
@@ -644803,13 +645574,13 @@ async function adkIntegrationInfo(integrationName, options = {}) {
644803
645574
  }
644804
645575
  return null;
644805
645576
  };
644806
- render_default(/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(IntegrationInfo, {}, undefined, false, undefined, this));
645577
+ render_default(/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(IntegrationInfo, {}, undefined, false, undefined, this));
644807
645578
  }
644808
- var import_react46, jsx_dev_runtime29;
645579
+ var import_react46, jsx_dev_runtime30;
644809
645580
  var init_adk_integration = __esm(async () => {
644810
645581
  await init_build2();
644811
645582
  import_react46 = __toESM(require_react(), 1);
644812
- jsx_dev_runtime29 = __toESM(require_jsx_dev_runtime(), 1);
645583
+ jsx_dev_runtime30 = __toESM(require_jsx_dev_runtime(), 1);
644813
645584
  });
644814
645585
 
644815
645586
  // ../../node_modules/minipass/dist/esm/index.js
@@ -647534,7 +648305,7 @@ var init_winchars = __esm(() => {
647534
648305
 
647535
648306
  // ../../node_modules/tar/dist/esm/write-entry.js
647536
648307
  import fs27 from "fs";
647537
- import path47 from "path";
648308
+ import path48 from "path";
647538
648309
  var prefixPath = (path35, prefix) => {
647539
648310
  if (!prefix) {
647540
648311
  return normalizeWindowsPath(path35);
@@ -647632,7 +648403,7 @@ var init_write_entry = __esm(() => {
647632
648403
  this.path = decode(this.path.replace(/\\/g, "/"));
647633
648404
  p = p.replace(/\\/g, "/");
647634
648405
  }
647635
- this.absolute = normalizeWindowsPath(opt.absolute || path47.resolve(this.cwd, p));
648406
+ this.absolute = normalizeWindowsPath(opt.absolute || path48.resolve(this.cwd, p));
647636
648407
  if (this.path === "") {
647637
648408
  this.path = "./";
647638
648409
  }
@@ -647766,7 +648537,7 @@ var init_write_entry = __esm(() => {
647766
648537
  throw new Error("cannot create link entry without stat");
647767
648538
  }
647768
648539
  this.type = "Link";
647769
- this.linkpath = normalizeWindowsPath(path47.relative(this.cwd, linkpath));
648540
+ this.linkpath = normalizeWindowsPath(path48.relative(this.cwd, linkpath));
647770
648541
  this.stat.size = 0;
647771
648542
  this[HEADER]();
647772
648543
  this.end();
@@ -648481,7 +649252,7 @@ var init_esm14 = __esm(() => {
648481
649252
 
648482
649253
  // ../../node_modules/tar/dist/esm/pack.js
648483
649254
  import fs28 from "fs";
648484
- import path48 from "path";
649255
+ import path49 from "path";
648485
649256
 
648486
649257
  class PackJob {
648487
649258
  path;
@@ -648655,7 +649426,7 @@ var init_pack = __esm(() => {
648655
649426
  return this.flowing;
648656
649427
  }
648657
649428
  [ADDTARENTRY](p) {
648658
- const absolute = normalizeWindowsPath(path48.resolve(this.cwd, p.path));
649429
+ const absolute = normalizeWindowsPath(path49.resolve(this.cwd, p.path));
648659
649430
  if (!this.filter(p.path, p)) {
648660
649431
  p.resume();
648661
649432
  } else {
@@ -648668,7 +649439,7 @@ var init_pack = __esm(() => {
648668
649439
  this[PROCESS4]();
648669
649440
  }
648670
649441
  [ADDFSENTRY](p) {
648671
- const absolute = normalizeWindowsPath(path48.resolve(this.cwd, p));
649442
+ const absolute = normalizeWindowsPath(path49.resolve(this.cwd, p));
648672
649443
  this[QUEUE2].push(new PackJob(p, absolute));
648673
649444
  this[PROCESS4]();
648674
649445
  }
@@ -648896,7 +649667,7 @@ var init_pack = __esm(() => {
648896
649667
  });
648897
649668
 
648898
649669
  // ../../node_modules/tar/dist/esm/create.js
648899
- import path49 from "path";
649670
+ import path50 from "path";
648900
649671
  var createFileSync = (opt, files) => {
648901
649672
  const p = new PackSync(opt);
648902
649673
  const stream5 = new WriteStreamSync(opt.file, {
@@ -648921,7 +649692,7 @@ var createFileSync = (opt, files) => {
648921
649692
  files.forEach((file) => {
648922
649693
  if (file.charAt(0) === "@") {
648923
649694
  list({
648924
- file: path49.resolve(p.cwd, file.slice(1)),
649695
+ file: path50.resolve(p.cwd, file.slice(1)),
648925
649696
  sync: true,
648926
649697
  noResume: true,
648927
649698
  onReadEntry: (entry) => p.add(entry)
@@ -648936,7 +649707,7 @@ var createFileSync = (opt, files) => {
648936
649707
  const file = String(files[i2]);
648937
649708
  if (file.charAt(0) === "@") {
648938
649709
  await list({
648939
- file: path49.resolve(String(p.cwd), file.slice(1)),
649710
+ file: path50.resolve(String(p.cwd), file.slice(1)),
648940
649711
  noResume: true,
648941
649712
  onReadEntry: (entry) => {
648942
649713
  p.add(entry);
@@ -648984,7 +649755,7 @@ var init_get_write_flag = __esm(() => {
648984
649755
 
648985
649756
  // ../../node_modules/chownr/dist/esm/index.js
648986
649757
  import fs30 from "fs";
648987
- import path50 from "path";
649758
+ import path51 from "path";
648988
649759
  var lchownSync = (path35, uid, gid) => {
648989
649760
  try {
648990
649761
  return fs30.lchownSync(path35, uid, gid);
@@ -648998,14 +649769,14 @@ var lchownSync = (path35, uid, gid) => {
648998
649769
  });
648999
649770
  }, chownrKid = (p, child, uid, gid, cb4) => {
649000
649771
  if (child.isDirectory()) {
649001
- chownr(path50.resolve(p, child.name), uid, gid, (er3) => {
649772
+ chownr(path51.resolve(p, child.name), uid, gid, (er3) => {
649002
649773
  if (er3)
649003
649774
  return cb4(er3);
649004
- const cpath = path50.resolve(p, child.name);
649775
+ const cpath = path51.resolve(p, child.name);
649005
649776
  chown(cpath, uid, gid, cb4);
649006
649777
  });
649007
649778
  } else {
649008
- const cpath = path50.resolve(p, child.name);
649779
+ const cpath = path51.resolve(p, child.name);
649009
649780
  chown(cpath, uid, gid, cb4);
649010
649781
  }
649011
649782
  }, chownr = (p, uid, gid, cb4) => {
@@ -649034,8 +649805,8 @@ var lchownSync = (path35, uid, gid) => {
649034
649805
  });
649035
649806
  }, chownrKidSync = (p, child, uid, gid) => {
649036
649807
  if (child.isDirectory())
649037
- chownrSync(path50.resolve(p, child.name), uid, gid);
649038
- lchownSync(path50.resolve(p, child.name), uid, gid);
649808
+ chownrSync(path51.resolve(p, child.name), uid, gid);
649809
+ lchownSync(path51.resolve(p, child.name), uid, gid);
649039
649810
  }, chownrSync = (p, uid, gid) => {
649040
649811
  let children;
649041
649812
  try {
@@ -649096,7 +649867,7 @@ var init_symlink_error = __esm(() => {
649096
649867
  // ../../node_modules/tar/dist/esm/mkdir.js
649097
649868
  import fs31 from "fs";
649098
649869
  import fsp from "fs/promises";
649099
- import path51 from "path";
649870
+ import path53 from "path";
649100
649871
  var checkCwd = (dir, cb4) => {
649101
649872
  fs31.stat(dir, (er3, st4) => {
649102
649873
  if (er3 || !st4.isDirectory()) {
@@ -649134,7 +649905,7 @@ var checkCwd = (dir, cb4) => {
649134
649905
  if (preserve) {
649135
649906
  return fsp.mkdir(dir, { mode, recursive: true }).then((made) => done(null, made ?? undefined), done);
649136
649907
  }
649137
- const sub = normalizeWindowsPath(path51.relative(cwd3, dir));
649908
+ const sub = normalizeWindowsPath(path53.relative(cwd3, dir));
649138
649909
  const parts = sub.split("/");
649139
649910
  mkdir_(cwd3, parts, mode, unlink2, cwd3, undefined, done);
649140
649911
  }, mkdir_ = (base3, parts, mode, unlink2, cwd3, created, cb4) => {
@@ -649142,7 +649913,7 @@ var checkCwd = (dir, cb4) => {
649142
649913
  return cb4(null, created);
649143
649914
  }
649144
649915
  const p = parts.shift();
649145
- const part = normalizeWindowsPath(path51.resolve(base3 + "/" + p));
649916
+ const part = normalizeWindowsPath(path53.resolve(base3 + "/" + p));
649146
649917
  fs31.mkdir(part, mode, onmkdir(part, parts, mode, unlink2, cwd3, created, cb4));
649147
649918
  }, onmkdir = (part, parts, mode, unlink2, cwd3, created, cb4) => (er3) => {
649148
649919
  if (er3) {
@@ -649207,11 +649978,11 @@ var checkCwd = (dir, cb4) => {
649207
649978
  if (preserve) {
649208
649979
  return done(fs31.mkdirSync(dir, { mode, recursive: true }) ?? undefined);
649209
649980
  }
649210
- const sub = normalizeWindowsPath(path51.relative(cwd3, dir));
649981
+ const sub = normalizeWindowsPath(path53.relative(cwd3, dir));
649211
649982
  const parts = sub.split("/");
649212
649983
  let created = undefined;
649213
649984
  for (let p = parts.shift(), part = cwd3;p && (part += "/" + p); p = parts.shift()) {
649214
- part = normalizeWindowsPath(path51.resolve(part));
649985
+ part = normalizeWindowsPath(path53.resolve(part));
649215
649986
  try {
649216
649987
  fs31.mkdirSync(part, mode);
649217
649988
  created = created || part;
@@ -649264,7 +650035,7 @@ var init_normalize_unicode = __esm(() => {
649264
650035
  });
649265
650036
 
649266
650037
  // ../../node_modules/tar/dist/esm/path-reservations.js
649267
- import { join as join16 } from "path";
650038
+ import { join as join17 } from "path";
649268
650039
 
649269
650040
  class PathReservations {
649270
650041
  #queues = new Map;
@@ -649272,7 +650043,7 @@ class PathReservations {
649272
650043
  #running = new Set;
649273
650044
  reserve(paths, fn4) {
649274
650045
  paths = isWindows4 ? ["win32 parallelization disabled"] : paths.map((p) => {
649275
- return stripTrailingSlashes(join16(normalizeUnicode(p))).toLowerCase();
650046
+ return stripTrailingSlashes(join17(normalizeUnicode(p))).toLowerCase();
649276
650047
  });
649277
650048
  const dirs = new Set(paths.map((path35) => getDirs(path35)).reduce((a2, b4) => a2.concat(b4)));
649278
650049
  this.#reservations.set(fn4, { dirs, paths });
@@ -649377,7 +650148,7 @@ var platform6, isWindows4, getDirs = (path35) => {
649377
650148
  const dirs = path35.split("/").slice(0, -1).reduce((set, path45) => {
649378
650149
  const s2 = set[set.length - 1];
649379
650150
  if (s2 !== undefined) {
649380
- path45 = join16(s2, path45);
650151
+ path45 = join17(s2, path45);
649381
650152
  }
649382
650153
  set.push(path45 || "/");
649383
650154
  return set;
@@ -649394,7 +650165,7 @@ var init_path_reservations = __esm(() => {
649394
650165
  import assert5 from "assert";
649395
650166
  import { randomBytes as randomBytes2 } from "crypto";
649396
650167
  import fs33 from "fs";
649397
- import path53 from "path";
650168
+ import path55 from "path";
649398
650169
  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
650170
  if (!isWindows5) {
649400
650171
  return fs33.unlink(path35, cb4);
@@ -649522,7 +650293,7 @@ var init_unpack = __esm(() => {
649522
650293
  this.noMtime = !!opt.noMtime;
649523
650294
  this.preservePaths = !!opt.preservePaths;
649524
650295
  this.unlink = !!opt.unlink;
649525
- this.cwd = normalizeWindowsPath(path53.resolve(opt.cwd || process.cwd()));
650296
+ this.cwd = normalizeWindowsPath(path55.resolve(opt.cwd || process.cwd()));
649526
650297
  this.strip = Number(opt.strip) || 0;
649527
650298
  this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask();
649528
650299
  this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask;
@@ -649587,10 +650358,10 @@ var init_unpack = __esm(() => {
649587
650358
  });
649588
650359
  }
649589
650360
  }
649590
- if (path53.isAbsolute(entry.path)) {
649591
- entry.absolute = normalizeWindowsPath(path53.resolve(entry.path));
650361
+ if (path55.isAbsolute(entry.path)) {
650362
+ entry.absolute = normalizeWindowsPath(path55.resolve(entry.path));
649592
650363
  } else {
649593
- entry.absolute = normalizeWindowsPath(path53.resolve(this.cwd, entry.path));
650364
+ entry.absolute = normalizeWindowsPath(path55.resolve(this.cwd, entry.path));
649594
650365
  }
649595
650366
  if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
649596
650367
  this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
@@ -649605,9 +650376,9 @@ var init_unpack = __esm(() => {
649605
650376
  return false;
649606
650377
  }
649607
650378
  if (this.win32) {
649608
- const { root: aRoot } = path53.win32.parse(String(entry.absolute));
650379
+ const { root: aRoot } = path55.win32.parse(String(entry.absolute));
649609
650380
  entry.absolute = aRoot + encode5(String(entry.absolute).slice(aRoot.length));
649610
- const { root: pRoot } = path53.win32.parse(entry.path);
650381
+ const { root: pRoot } = path55.win32.parse(entry.path);
649611
650382
  entry.path = pRoot + encode5(entry.path.slice(pRoot.length));
649612
650383
  }
649613
650384
  return true;
@@ -649770,7 +650541,7 @@ var init_unpack = __esm(() => {
649770
650541
  this[LINK](entry, String(entry.linkpath), "symlink", done);
649771
650542
  }
649772
650543
  [HARDLINK2](entry, done) {
649773
- const linkpath = normalizeWindowsPath(path53.resolve(this.cwd, String(entry.linkpath)));
650544
+ const linkpath = normalizeWindowsPath(path55.resolve(this.cwd, String(entry.linkpath)));
649774
650545
  this[LINK](entry, linkpath, "link", done);
649775
650546
  }
649776
650547
  [PEND]() {
@@ -649812,7 +650583,7 @@ var init_unpack = __esm(() => {
649812
650583
  };
649813
650584
  const start = () => {
649814
650585
  if (entry.absolute !== this.cwd) {
649815
- const parent2 = normalizeWindowsPath(path53.dirname(String(entry.absolute)));
650586
+ const parent2 = normalizeWindowsPath(path55.dirname(String(entry.absolute)));
649816
650587
  if (parent2 !== this.cwd) {
649817
650588
  return this[MKDIR](parent2, this.dmode, (er3) => {
649818
650589
  if (er3) {
@@ -649907,7 +650678,7 @@ var init_unpack = __esm(() => {
649907
650678
  this[CHECKED_CWD] = true;
649908
650679
  }
649909
650680
  if (entry.absolute !== this.cwd) {
649910
- const parent2 = normalizeWindowsPath(path53.dirname(String(entry.absolute)));
650681
+ const parent2 = normalizeWindowsPath(path55.dirname(String(entry.absolute)));
649911
650682
  if (parent2 !== this.cwd) {
649912
650683
  const mkParent = this[MKDIR](parent2, this.dmode);
649913
650684
  if (mkParent) {
@@ -650097,7 +650868,7 @@ var init_extract2 = __esm(() => {
650097
650868
 
650098
650869
  // ../../node_modules/tar/dist/esm/replace.js
650099
650870
  import fs36 from "fs";
650100
- import path55 from "path";
650871
+ import path56 from "path";
650101
650872
  var replaceSync = (opt, files) => {
650102
650873
  const p = new PackSync(opt);
650103
650874
  let threw = true;
@@ -650243,7 +651014,7 @@ var replaceSync = (opt, files) => {
650243
651014
  files.forEach((file) => {
650244
651015
  if (file.charAt(0) === "@") {
650245
651016
  list({
650246
- file: path55.resolve(p.cwd, file.slice(1)),
651017
+ file: path56.resolve(p.cwd, file.slice(1)),
650247
651018
  sync: true,
650248
651019
  noResume: true,
650249
651020
  onReadEntry: (entry) => p.add(entry)
@@ -650258,7 +651029,7 @@ var replaceSync = (opt, files) => {
650258
651029
  const file = String(files[i2]);
650259
651030
  if (file.charAt(0) === "@") {
650260
651031
  await list({
650261
- file: path55.resolve(String(p.cwd), file.slice(1)),
651032
+ file: path56.resolve(String(p.cwd), file.slice(1)),
650262
651033
  noResume: true,
650263
651034
  onReadEntry: (entry) => p.add(entry)
650264
651035
  });
@@ -652103,8 +652874,8 @@ var require_adm_zip = __commonJS((exports, module) => {
652103
652874
  return null;
652104
652875
  }
652105
652876
  function fixPath(zipPath) {
652106
- const { join: join9, normalize: normalize2, sep: sep2 } = pth.posix;
652107
- return join9(".", normalize2(sep2 + zipPath.split("\\").join(sep2) + sep2));
652877
+ const { join: join10, normalize: normalize2, sep: sep2 } = pth.posix;
652878
+ return join10(".", normalize2(sep2 + zipPath.split("\\").join(sep2) + sep2));
652108
652879
  }
652109
652880
  function filenameFilter(filterfn) {
652110
652881
  if (filterfn instanceof RegExp) {
@@ -652628,8 +653399,8 @@ var exports_upgrade = {};
652628
653399
  __export(exports_upgrade, {
652629
653400
  adkSelfUpgrade: () => adkSelfUpgrade
652630
653401
  });
652631
- import { existsSync as existsSync16, writeFileSync as writeFileSync5, chmodSync, renameSync, unlinkSync, readFileSync as readFileSync14, mkdirSync as mkdirSync5, rmdirSync } from "fs";
652632
- import { join as join17 } from "path";
653402
+ import { existsSync as existsSync16, writeFileSync as writeFileSync5, chmodSync, renameSync, unlinkSync, readFileSync as readFileSync15, mkdirSync as mkdirSync5, rmdirSync } from "fs";
653403
+ import { join as join18 } from "path";
652633
653404
  import { tmpdir } from "os";
652634
653405
  import { execSync as execSync4 } from "child_process";
652635
653406
  function getPlatformInfo() {
@@ -652675,17 +653446,17 @@ async function downloadBinary(version, target, extension) {
652675
653446
  throw new Error(`Failed to download: ${response.status} ${response.statusText}`);
652676
653447
  }
652677
653448
  const buffer = Buffer.from(await response.arrayBuffer());
652678
- const tmpDir = join17(tmpdir(), `adk-upgrade-${Date.now()}`);
653449
+ const tmpDir = join18(tmpdir(), `adk-upgrade-${Date.now()}`);
652679
653450
  mkdirSync5(tmpDir, { recursive: true });
652680
- const tarPath = join17(tmpDir, "adk.tar.gz");
653451
+ const tarPath = join18(tmpDir, "adk.tar.gz");
652681
653452
  writeFileSync5(tarPath, buffer);
652682
653453
  extract2({
652683
653454
  file: tarPath,
652684
653455
  cwd: tmpDir,
652685
653456
  sync: true
652686
653457
  });
652687
- const binaryPath = join17(tmpDir, fileName);
652688
- const binaryBuffer = readFileSync14(binaryPath);
653458
+ const binaryPath = join18(tmpDir, fileName);
653459
+ const binaryBuffer = readFileSync15(binaryPath);
652689
653460
  try {
652690
653461
  unlinkSync(tarPath);
652691
653462
  unlinkSync(binaryPath);
@@ -652723,7 +653494,7 @@ timeout /t 1 /nobreak >nul
652723
653494
  move /y "${currentPath}.new" "${currentPath}"
652724
653495
  del "%~f0"
652725
653496
  `.trim();
652726
- const batchPath = join17(tmpdir(), "adk-upgrade.bat");
653497
+ const batchPath = join18(tmpdir(), "adk-upgrade.bat");
652727
653498
  writeFileSync5(batchPath, batchScript);
652728
653499
  writeFileSync5(currentPath + ".new", newBinaryBuffer);
652729
653500
  console.log("\u2705 Update downloaded!");
@@ -652899,8 +653670,8 @@ async function adkAssetsSync(options) {
652899
653670
  return;
652900
653671
  }
652901
653672
  if (!options?.yes) {
652902
- const readline = await import("readline");
652903
- const rl2 = readline.createInterface({
653673
+ const readline2 = await import("readline");
653674
+ const rl2 = readline2.createInterface({
652904
653675
  input: process.stdin,
652905
653676
  output: process.stdout
652906
653677
  });
@@ -653225,8 +653996,8 @@ var {
653225
653996
  } = import__.default;
653226
653997
 
653227
653998
  // src/cli.ts
653228
- import { readFileSync as readFileSync15, existsSync as existsSync17 } from "fs";
653229
- import { join as join18, dirname as dirname3 } from "path";
653999
+ import { readFileSync as readFileSync16 } from "fs";
654000
+ import { join as join19, dirname as dirname3 } from "path";
653230
654001
  import { fileURLToPath as fileURLToPath9 } from "url";
653231
654002
 
653232
654003
  // src/utils/version-check.tsx
@@ -653466,11 +654237,8 @@ if (!checkNodeVersion(true)) {
653466
654237
  checkNodeVersion(false);
653467
654238
  process.exit(1);
653468
654239
  }
653469
- var __filename2 = fileURLToPath9(import.meta.url);
653470
- var __dirname5 = dirname3(__filename2);
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;
654240
+ var CLI_VERSION = "1.7.13";
654241
+
653474
654242
  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
654243
  formatHelp: () => formatHelp(program, CLI_VERSION)
653476
654244
  });
@@ -653507,10 +654275,10 @@ program.command("build").description("Build the agent for production").action(as
653507
654275
  process.exit(1);
653508
654276
  }
653509
654277
  });
653510
- program.command("deploy").description("Deploy the agent to Botpress").option("-e, --env <environment>", "deployment environment", "production").action(async (options) => {
654278
+ 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
654279
  try {
653512
654280
  const { adkDeploy: adkDeploy2 } = await init_adk_deploy().then(() => exports_adk_deploy);
653513
- await adkDeploy2(options.env);
654281
+ await adkDeploy2(options.env, { autoApprove: options.yes });
653514
654282
  } catch (error) {
653515
654283
  console.error("Error:", error instanceof Error ? error.message : String(error));
653516
654284
  process.exit(1);