@integrity-labs/agt-cli 0.27.129 → 0.27.130

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/bin/agt.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  success,
29
29
  table,
30
30
  warn
31
- } from "../chunk-A64MR5QP.js";
31
+ } from "../chunk-H4QCCP2M.js";
32
32
  import {
33
33
  CHANNEL_REGISTRY,
34
34
  DEPLOYMENT_TEMPLATES,
@@ -54,7 +54,7 @@ import {
54
54
  renderTemplate,
55
55
  resolveChannels,
56
56
  serializeManifestForSlackCli
57
- } from "../chunk-MH7HA6QV.js";
57
+ } from "../chunk-XCV5NU45.js";
58
58
 
59
59
  // src/bin/agt.ts
60
60
  import { join as join20 } from "path";
@@ -4934,7 +4934,7 @@ import { execFileSync, execSync } from "child_process";
4934
4934
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4935
4935
  import chalk18 from "chalk";
4936
4936
  import ora16 from "ora";
4937
- var cliVersion = true ? "0.27.129" : "dev";
4937
+ var cliVersion = true ? "0.27.130" : "dev";
4938
4938
  async function fetchLatestVersion() {
4939
4939
  const host2 = getHost();
4940
4940
  if (!host2) return null;
@@ -5857,7 +5857,7 @@ function handleError(err) {
5857
5857
  }
5858
5858
 
5859
5859
  // src/bin/agt.ts
5860
- var cliVersion2 = true ? "0.27.129" : "dev";
5860
+ var cliVersion2 = true ? "0.27.130" : "dev";
5861
5861
  var program = new Command();
5862
5862
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
5863
5863
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -9,7 +9,7 @@ import {
9
9
  parseDeliveryTarget,
10
10
  registerFramework,
11
11
  wrapScheduledTaskPrompt
12
- } from "./chunk-MH7HA6QV.js";
12
+ } from "./chunk-XCV5NU45.js";
13
13
 
14
14
  // ../../packages/core/dist/integrations/registry.js
15
15
  var INTEGRATION_REGISTRY = [
@@ -49,7 +49,13 @@ var INTEGRATION_REGISTRY = [
49
49
  binary: "gh",
50
50
  env_key: "GITHUB_TOKEN",
51
51
  skill_id: "gh-cli",
52
- installer: "brew"
52
+ // ENG-6206: `brew` never installs on the Linux fleet (root-on-AL2023,
53
+ // no Homebrew) — gh was permanently missing. Use an OS-detecting script
54
+ // that installs from GitHub's official repos: dnf (AL2023 / RHEL),
55
+ // apt (Debian / Ubuntu), and brew (macOS hosts). The catalog is the
56
+ // trust boundary — this string is source-controlled, never runtime data.
57
+ installer: "script",
58
+ script: 'if command -v dnf >/dev/null 2>&1; then curl -fsSL https://cli.github.com/packages/rpm/gh-cli.repo -o /etc/yum.repos.d/gh-cli.repo && dnf install -y gh; elif command -v apt-get >/dev/null 2>&1; then curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg -o /usr/share/keyrings/githubcli-archive-keyring.gpg && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list && apt-get update && apt-get install -y gh; elif command -v brew >/dev/null 2>&1; then brew install gh; else echo "gh: no supported installer (need dnf, apt-get, or brew)" >&2; exit 1; fi'
53
59
  }
54
60
  },
55
61
  {
@@ -5956,15 +5962,30 @@ ${sections}`
5956
5962
  for (const integration of decryptedIntegrations) {
5957
5963
  const prefix = integration.definition_id.toUpperCase().replace(/[^A-Z0-9]/g, "_");
5958
5964
  const creds = integration.credentials;
5965
+ const def = INTEGRATION_REGISTRY.find((d) => d.id === integration.definition_id);
5966
+ let token;
5959
5967
  if (integration.auth_type === "oauth2") {
5960
- const accessToken = creds.access_token;
5961
- if (accessToken) {
5962
- envUpdates[`${prefix}_ACCESS_TOKEN`] = accessToken;
5968
+ token = creds.access_token;
5969
+ if (token) {
5970
+ envUpdates[`${prefix}_ACCESS_TOKEN`] = token;
5963
5971
  }
5964
5972
  } else if (integration.auth_type === "api_key") {
5965
- const apiKey = creds.api_key;
5966
- if (apiKey) {
5967
- envUpdates[`${prefix}_API_KEY`] = apiKey;
5973
+ token = creds.api_key;
5974
+ if (token) {
5975
+ envUpdates[`${prefix}_API_KEY`] = token;
5976
+ }
5977
+ }
5978
+ if (def?.cli_tool) {
5979
+ const { env_key, extra_env } = def.cli_tool;
5980
+ if (env_key && token && !(env_key in envUpdates)) {
5981
+ envUpdates[env_key] = token;
5982
+ }
5983
+ if (extra_env) {
5984
+ for (const [k, v] of Object.entries(extra_env)) {
5985
+ if (typeof v === "string" && v && !(k in envUpdates)) {
5986
+ envUpdates[k] = v;
5987
+ }
5988
+ }
5968
5989
  }
5969
5990
  }
5970
5991
  if (integration.config) {
@@ -7653,4 +7674,4 @@ export {
7653
7674
  managerInstallSystemUnitCommand,
7654
7675
  managerUninstallSystemUnitCommand
7655
7676
  };
7656
- //# sourceMappingURL=chunk-A64MR5QP.js.map
7677
+ //# sourceMappingURL=chunk-H4QCCP2M.js.map