@integrity-labs/agt-cli 0.7.1 → 0.7.3

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.
@@ -2500,6 +2500,27 @@ function ensureAugmentedDir() {
2500
2500
  mkdirSync4(AUGMENTED_DIR2, { recursive: true });
2501
2501
  }
2502
2502
  }
2503
+ function loadFromShellProfile() {
2504
+ if (process.env["AGT_HOST"] && process.env["AGT_API_KEY"]) return;
2505
+ const shell = process.env["SHELL"] ?? "";
2506
+ const home = homedir3();
2507
+ const candidates = shell.includes("zsh") ? [join4(home, ".zshrc"), join4(home, ".zprofile")] : shell.includes("fish") ? [join4(home, ".config", "fish", "config.fish")] : [join4(home, ".bashrc"), join4(home, ".bash_profile")];
2508
+ for (const profile of candidates) {
2509
+ try {
2510
+ const content = readFileSync4(profile, "utf-8");
2511
+ for (const key of ["AGT_HOST", "AGT_API_KEY", "AGT_TEAM"]) {
2512
+ if (process.env[key]) continue;
2513
+ const match = content.match(new RegExp(`(?:export\\s+${key}=["']([^"']+)["']|set\\s+-gx\\s+${key}\\s+["']([^"']+)["'])`));
2514
+ if (match) {
2515
+ process.env[key] = match[1] ?? match[2];
2516
+ }
2517
+ }
2518
+ } catch {
2519
+ }
2520
+ if (process.env["AGT_HOST"] && process.env["AGT_API_KEY"]) break;
2521
+ }
2522
+ }
2523
+ loadFromShellProfile();
2503
2524
  function getApiKey() {
2504
2525
  return process.env["AGT_API_KEY"] ?? null;
2505
2526
  }
@@ -4560,4 +4581,4 @@ export {
4560
4581
  detectDrift,
4561
4582
  provision
4562
4583
  };
4563
- //# sourceMappingURL=chunk-3S5KUXZ7.js.map
4584
+ //# sourceMappingURL=chunk-GBTJNYNP.js.map