@integrity-labs/agt-cli 0.28.663 → 0.28.665

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
@@ -40,10 +40,10 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-I7R5DFBQ.js";
43
+ } from "../chunk-FQUJWSWQ.js";
44
44
  import {
45
45
  readDirectChatSessionState
46
- } from "../chunk-ZHLGAOYL.js";
46
+ } from "../chunk-EX5XJEGF.js";
47
47
  import {
48
48
  AnchorSessionClient,
49
49
  CHANNEL_REGISTRY,
@@ -73,7 +73,7 @@ import {
73
73
  requiredMcpWildcard,
74
74
  resolveChannels,
75
75
  serializeManifestForSlackCli
76
- } from "../chunk-MRHKXV7D.js";
76
+ } from "../chunk-FYZOD3SS.js";
77
77
  import "../chunk-XWVM4KPK.js";
78
78
 
79
79
  // src/bin/agt.ts
@@ -4909,7 +4909,7 @@ import { execFileSync, execSync } from "child_process";
4909
4909
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4910
4910
  import chalk18 from "chalk";
4911
4911
  import ora16 from "ora";
4912
- var cliVersion = true ? "0.28.663" : "dev";
4912
+ var cliVersion = true ? "0.28.665" : "dev";
4913
4913
  async function fetchLatestVersion() {
4914
4914
  const host2 = getHost();
4915
4915
  if (!host2) return null;
@@ -6089,7 +6089,7 @@ function handleError(err) {
6089
6089
  }
6090
6090
 
6091
6091
  // src/bin/agt.ts
6092
- var cliVersion2 = true ? "0.28.663" : "dev";
6092
+ var cliVersion2 = true ? "0.28.665" : "dev";
6093
6093
  var program = new Command();
6094
6094
  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");
6095
6095
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -16,7 +16,7 @@ import {
16
16
  rotateDailySession,
17
17
  sessionFileExists,
18
18
  todayLocalIso
19
- } from "./chunk-MRHKXV7D.js";
19
+ } from "./chunk-FYZOD3SS.js";
20
20
  import {
21
21
  reapOrphanChannelMcps
22
22
  } from "./chunk-XWVM4KPK.js";
@@ -4322,4 +4322,4 @@ export {
4322
4322
  stopAllSessionsAndWait,
4323
4323
  getProjectDir
4324
4324
  };
4325
- //# sourceMappingURL=chunk-ZHLGAOYL.js.map
4325
+ //# sourceMappingURL=chunk-EX5XJEGF.js.map
@@ -8,7 +8,7 @@ import {
8
8
  isolationMode,
9
9
  log,
10
10
  parseEnvIntegrations
11
- } from "./chunk-ZHLGAOYL.js";
11
+ } from "./chunk-EX5XJEGF.js";
12
12
  import {
13
13
  BIND_FAILURE_QUARANTINE_THRESHOLD,
14
14
  INTEGRATIONS_SECTION_END,
@@ -55,7 +55,7 @@ import {
55
55
  resolveConnectivityProbe,
56
56
  worseConnectivityOutcome,
57
57
  wrapScheduledTaskPrompt
58
- } from "./chunk-MRHKXV7D.js";
58
+ } from "./chunk-FYZOD3SS.js";
59
59
  import {
60
60
  parsePsRows
61
61
  } from "./chunk-XWVM4KPK.js";
@@ -6342,7 +6342,7 @@ function exchangeFailureKind(err) {
6342
6342
  }
6343
6343
 
6344
6344
  // src/lib/api-client.ts
6345
- var agtCliVersion = true ? "0.28.663" : "dev";
6345
+ var agtCliVersion = true ? "0.28.665" : "dev";
6346
6346
  var lastConfigHash = null;
6347
6347
  function setConfigHash(hash) {
6348
6348
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10084,4 +10084,4 @@ export {
10084
10084
  managerInstallSystemUnitCommand,
10085
10085
  managerUninstallSystemUnitCommand
10086
10086
  };
10087
- //# sourceMappingURL=chunk-I7R5DFBQ.js.map
10087
+ //# sourceMappingURL=chunk-FQUJWSWQ.js.map
@@ -9904,6 +9904,17 @@ function statusForHttp(httpStatus, opts) {
9904
9904
  return "transient_error";
9905
9905
  return "down";
9906
9906
  }
9907
+ function causeForHttp(httpStatus, opts) {
9908
+ if (httpStatus === 429)
9909
+ return "rate_limited";
9910
+ if (httpStatus === 403 && opts?.rateLimited)
9911
+ return "rate_limited";
9912
+ if (httpStatus === 401 || httpStatus === 403)
9913
+ return "auth_rejected";
9914
+ if (httpStatus >= 500)
9915
+ return "server_error";
9916
+ return "semantic";
9917
+ }
9907
9918
  function rateLimitMessage(provider, httpStatus) {
9908
9919
  const subject = provider ? `${provider} rate limit` : "Rate limited by the provider";
9909
9920
  return `${subject} (${httpStatus}) \u2014 not a credential failure`;
@@ -9916,7 +9927,7 @@ function redactSecret(message, secret) {
9916
9927
  function networkOutcome(err, secret) {
9917
9928
  const isAbort = err?.name === "AbortError";
9918
9929
  const message = isAbort ? `Connection timed out after ${PROBE_TIMEOUT_MS2 / 1e3}s` : `Connection failed: ${err.message}`;
9919
- return { status: "transient_error", message: redactSecret(message, secret) };
9930
+ return { status: "transient_error", cause: "unreachable", message: redactSecret(message, secret) };
9920
9931
  }
9921
9932
  async function probeLinear(creds, fetchImpl) {
9922
9933
  const key = creds.api_key ?? creds.access_token;
@@ -9931,7 +9942,11 @@ async function probeLinear(creds, fetchImpl) {
9931
9942
  if (!res.ok) {
9932
9943
  const rateLimited = isRateLimited(res);
9933
9944
  const message = res.status === 429 || res.status === 403 && rateLimited ? rateLimitMessage("Linear", res.status) : `Linear API returned ${res.status}`;
9934
- return { status: statusForHttp(res.status, { rateLimited }), message };
9945
+ return {
9946
+ status: statusForHttp(res.status, { rateLimited }),
9947
+ cause: causeForHttp(res.status, { rateLimited }),
9948
+ message
9949
+ };
9935
9950
  }
9936
9951
  const body = await res.json();
9937
9952
  if (body.errors?.length)
@@ -9953,7 +9968,11 @@ async function probeBearerJson(url, creds, fetchImpl, interpret, extraHeaders) {
9953
9968
  if (!res.ok) {
9954
9969
  const rateLimited = isRateLimited(res);
9955
9970
  const message = res.status === 401 ? "Token expired or revoked \u2014 reconnect required" : res.status === 429 || res.status === 403 && rateLimited ? rateLimitMessage(null, res.status) : `API returned ${res.status}`;
9956
- return { status: statusForHttp(res.status, { rateLimited }), message };
9971
+ return {
9972
+ status: statusForHttp(res.status, { rateLimited }),
9973
+ cause: causeForHttp(res.status, { rateLimited }),
9974
+ message
9975
+ };
9957
9976
  }
9958
9977
  return interpret(await res.json());
9959
9978
  } catch (err) {
@@ -9973,7 +9992,11 @@ async function probeBuffer(creds, fetchImpl) {
9973
9992
  if (!res.ok) {
9974
9993
  const rateLimited = isRateLimited(res);
9975
9994
  const message = res.status === 401 ? "Buffer API key expired or revoked \u2014 reconnect required" : res.status === 429 || res.status === 403 && rateLimited ? rateLimitMessage("Buffer", res.status) : `Buffer API returned ${res.status}`;
9976
- return { status: statusForHttp(res.status, { rateLimited }), message };
9995
+ return {
9996
+ status: statusForHttp(res.status, { rateLimited }),
9997
+ cause: causeForHttp(res.status, { rateLimited }),
9998
+ message
9999
+ };
9977
10000
  }
9978
10001
  const body = await res.json();
9979
10002
  if (body.errors?.length)
@@ -9996,7 +10019,11 @@ async function probeVercel(creds, fetchImpl) {
9996
10019
  });
9997
10020
  if (!res.ok) {
9998
10021
  const message = res.status === 429 ? rateLimitMessage("Vercel", res.status) : res.status === 401 || res.status === 403 ? `Vercel rejected the token (${res.status}) \u2014 invalid or revoked API token` : `Vercel API returned ${res.status}`;
9999
- return { status: statusForHttp(res.status), message };
10022
+ return {
10023
+ status: statusForHttp(res.status),
10024
+ cause: causeForHttp(res.status),
10025
+ message
10026
+ };
10000
10027
  }
10001
10028
  const body = await res.json();
10002
10029
  const user = body?.user;
@@ -10031,7 +10058,11 @@ async function probeHiggsfield(creds, fetchImpl) {
10031
10058
  };
10032
10059
  }
10033
10060
  const message = res.status === 429 ? rateLimitMessage("Higgsfield", res.status) : res.status === 401 || res.status === 403 ? `Higgsfield rejected the key pair (${res.status}) \u2014 invalid or revoked API key` : `Higgsfield API returned ${res.status}`;
10034
- return { status: statusForHttp(res.status), message };
10061
+ return {
10062
+ status: statusForHttp(res.status),
10063
+ cause: causeForHttp(res.status),
10064
+ message
10065
+ };
10035
10066
  }
10036
10067
  const motions = await res.json();
10037
10068
  if (!Array.isArray(motions) || motions.length === 0) {
@@ -12334,4 +12365,4 @@ export {
12334
12365
  minutesSinceLocalMidnight,
12335
12366
  peekCurrentSession
12336
12367
  };
12337
- //# sourceMappingURL=chunk-MRHKXV7D.js.map
12368
+ //# sourceMappingURL=chunk-FYZOD3SS.js.map