@integrity-labs/agt-cli 0.10.19 → 0.10.22

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
@@ -32,7 +32,7 @@ import {
32
32
  resolveChannels,
33
33
  serializeManifestForSlackCli,
34
34
  setActiveTeam
35
- } from "../chunk-XTETZ2D5.js";
35
+ } from "../chunk-VWYAPGHB.js";
36
36
 
37
37
  // src/bin/agt.ts
38
38
  import { join as join11 } from "path";
@@ -103,6 +103,8 @@ async function whoamiCommand() {
103
103
  try {
104
104
  const exchange = await exchangeApiKey(apiKey);
105
105
  spinner.stop();
106
+ const framework = exchange.framework ?? "unset";
107
+ const claudeAuthLabel = exchange.claudeAuthMode === "api_key" ? `api_key (fp: ${exchange.anthropicApiKeyFingerprint ?? "unknown"})` : "subscription";
106
108
  if (json) {
107
109
  jsonOutput({
108
110
  ok: true,
@@ -111,7 +113,10 @@ async function whoamiCommand() {
111
113
  host_id: exchange.hostId,
112
114
  team: exchange.teamSlug,
113
115
  team_id: exchange.teamId,
114
- email: exchange.userEmail
116
+ email: exchange.userEmail,
117
+ framework: exchange.framework,
118
+ claude_auth_mode: exchange.claudeAuthMode,
119
+ anthropic_api_key_fingerprint: exchange.anthropicApiKeyFingerprint
115
120
  });
116
121
  return;
117
122
  }
@@ -121,6 +126,10 @@ async function whoamiCommand() {
121
126
  info(`Host ID: ${exchange.hostId}`);
122
127
  info(`Team: ${chalk3.bold(exchange.teamSlug ?? exchange.teamId)}`);
123
128
  info(`User: ${chalk3.bold(exchange.userEmail ?? "unknown")}`);
129
+ info(`Framework: ${chalk3.bold(framework)}`);
130
+ if (framework === "claude-code") {
131
+ info(`Claude Auth: ${chalk3.bold(claudeAuthLabel)}`);
132
+ }
124
133
  } catch (err) {
125
134
  spinner.fail("Failed to exchange API key.");
126
135
  if (json) {
@@ -3702,11 +3711,11 @@ async function acpxCloseCommand(agent2, _opts, cmd) {
3702
3711
  }
3703
3712
 
3704
3713
  // src/commands/update.ts
3705
- import { execSync } from "child_process";
3714
+ import { execFileSync, execSync } from "child_process";
3706
3715
  import { existsSync as existsSync5, realpathSync } from "fs";
3707
3716
  import chalk20 from "chalk";
3708
3717
  import ora15 from "ora";
3709
- var cliVersion = true ? "0.10.19" : "dev";
3718
+ var cliVersion = true ? "0.10.22" : "dev";
3710
3719
  async function fetchLatestVersion() {
3711
3720
  const host2 = getHost();
3712
3721
  if (!host2) return null;
@@ -3762,7 +3771,7 @@ function detectActiveSessions() {
3762
3771
  function detectInstallSource() {
3763
3772
  try {
3764
3773
  const resolved = realpathSync(process.argv[1] ?? "");
3765
- if (resolved.includes("/linuxbrew/") || resolved.includes("/homebrew/") || resolved.includes("/Cellar/")) {
3774
+ if (/\/Cellar\/[^/]+\//.test(resolved)) {
3766
3775
  return "brew";
3767
3776
  }
3768
3777
  } catch {
@@ -3773,20 +3782,30 @@ function performUpdate(version) {
3773
3782
  const source = detectInstallSource();
3774
3783
  if (source === "brew") {
3775
3784
  try {
3776
- execSync("brew upgrade integrity-labs/tap/agt", { stdio: "inherit" });
3777
- } catch {
3785
+ execFileSync("brew", ["upgrade", "integrity-labs/tap/agt"], { stdio: "inherit" });
3786
+ return;
3787
+ } catch (err) {
3788
+ const isRoot = typeof process.getuid === "function" && process.getuid() === 0;
3789
+ if (!isRoot) throw err;
3778
3790
  const cellarOwner = detectBrewOwner();
3779
- if (cellarOwner) {
3780
- execSync(`sudo -u ${cellarOwner} -H bash -c 'brew tap integrity-labs/tap 2>/dev/null || true; brew upgrade integrity-labs/tap/agt'`, { stdio: "inherit" });
3781
- } else {
3782
- throw new Error("brew upgrade failed and no brew owner detected");
3783
- }
3791
+ if (!cellarOwner) throw err;
3792
+ execFileSync("sudo", [
3793
+ "-u",
3794
+ cellarOwner,
3795
+ "-H",
3796
+ "bash",
3797
+ "-c",
3798
+ "brew tap integrity-labs/tap 2>/dev/null || true; brew upgrade integrity-labs/tap/agt"
3799
+ ], { stdio: "inherit" });
3784
3800
  }
3785
3801
  return;
3786
3802
  }
3787
- execSync(`npm install -g @integrity-labs/agt-cli@${version} --registry=https://registry.npmjs.org`, {
3788
- stdio: "inherit"
3789
- });
3803
+ execFileSync("npm", [
3804
+ "install",
3805
+ "-g",
3806
+ `@integrity-labs/agt-cli@${version}`,
3807
+ "--registry=https://registry.npmjs.org"
3808
+ ], { stdio: "inherit" });
3790
3809
  }
3791
3810
  function detectBrewOwner() {
3792
3811
  for (const prefix of ["/home/linuxbrew/.linuxbrew", "/opt/homebrew", "/usr/local"]) {
@@ -4145,7 +4164,7 @@ function handleError(err) {
4145
4164
  }
4146
4165
 
4147
4166
  // src/bin/agt.ts
4148
- var cliVersion2 = true ? "0.10.19" : "dev";
4167
+ var cliVersion2 = true ? "0.10.22" : "dev";
4149
4168
  var program = new Command();
4150
4169
  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");
4151
4170
  program.hook("preAction", (thisCommand) => {