@integrity-labs/agt-cli 0.28.955 → 0.28.957

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,12 +40,12 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-JUGPOONU.js";
43
+ } from "../chunk-W4WCFH5J.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-ZV4R5NVN.js";
48
+ } from "../chunk-WU3POTSH.js";
49
49
  import {
50
50
  AnchorSessionClient,
51
51
  CHANNEL_REGISTRY,
@@ -79,7 +79,7 @@ import {
79
79
  serializeManifestForSlackCli,
80
80
  sessionFileExists,
81
81
  sessionTranscriptDir
82
- } from "../chunk-K42A4EG3.js";
82
+ } from "../chunk-CRM7ITIY.js";
83
83
  import "../chunk-DHWNVVX4.js";
84
84
  import "../chunk-XWVM4KPK.js";
85
85
 
@@ -5471,7 +5471,7 @@ import { execFileSync, execSync } from "child_process";
5471
5471
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5472
5472
  import chalk18 from "chalk";
5473
5473
  import ora16 from "ora";
5474
- var cliVersion = true ? "0.28.955" : "dev";
5474
+ var cliVersion = true ? "0.28.957" : "dev";
5475
5475
  async function fetchLatestVersion() {
5476
5476
  const host2 = getHost();
5477
5477
  if (!host2) return null;
@@ -6731,7 +6731,7 @@ function handleError(err) {
6731
6731
  }
6732
6732
 
6733
6733
  // src/bin/agt.ts
6734
- var cliVersion2 = true ? "0.28.955" : "dev";
6734
+ var cliVersion2 = true ? "0.28.957" : "dev";
6735
6735
  var program = new Command();
6736
6736
  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");
6737
6737
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -10881,7 +10881,14 @@ var HTTP_PROBE_PROVIDERS = /* @__PURE__ */ new Set([
10881
10881
  //
10882
10882
  // Routes to `probeSportsyear`: HTTP Basic (key as username, empty password)
10883
10883
  // against the free, read-only, no-argument `GET /api/v1/member`.
10884
- "sportsyear"
10884
+ "sportsyear",
10885
+ // ENG-10608: Instantly, added with the integration for the same reason as
10886
+ // Sportsyear. Its key is a customer-held, non-expiring API v2 key that dies
10887
+ // only when revoked, so only a call can tell a dead key from a live one.
10888
+ // Routes to `probeInstantly` against `GET /api/v2/accounts?limit=1`: free,
10889
+ // read-only, no required arguments. It needs `accounts:read`, which a
10890
+ // customer may leave off their key, so a 403 grades `degraded`, not `down`.
10891
+ "instantly"
10885
10892
  // ENG-6100: GitHub is deliberately NOT here. This set drives the ASYNC
10886
10893
  // connectivity monitor's routing, where github (source_type='native')
10887
10894
  // stays host-side (cli_command — `gh`, the credential the agent actually
@@ -11310,6 +11317,29 @@ async function probeSportsyear(creds, fetchImpl) {
11310
11317
  return outcome.message === void 0 ? outcome : { ...outcome, message: redactSecret(outcome.message, encoded) };
11311
11318
  }
11312
11319
  }
11320
+ async function probeInstantly(creds, fetchImpl) {
11321
+ const token = creds.api_key ?? creds.access_token;
11322
+ if (!token)
11323
+ return { status: "down", message: "No credential present" };
11324
+ try {
11325
+ const res = await timedFetch(fetchImpl, "https://api.instantly.ai/api/v2/accounts?limit=1", {
11326
+ headers: { Authorization: `Bearer ${token}` }
11327
+ });
11328
+ if (res.status === 403) {
11329
+ return {
11330
+ status: "degraded",
11331
+ message: "Instantly accepted the key, but it lacks the accounts:read scope - tools needing other scopes may still work"
11332
+ };
11333
+ }
11334
+ if (!res.ok) {
11335
+ const message = res.status === 401 ? "Instantly rejected the key (401) - invalid or revoked API key" : res.status === 429 ? rateLimitMessage("Instantly", res.status) : `Instantly API returned ${res.status}`;
11336
+ return { status: statusForHttp(res.status), cause: causeForHttp(res.status), message };
11337
+ }
11338
+ return { status: "ok", message: "Connected to Instantly" };
11339
+ } catch (err) {
11340
+ return networkOutcome(err, String(token));
11341
+ }
11342
+ }
11313
11343
  async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
11314
11344
  switch (definitionId) {
11315
11345
  case "linear":
@@ -11322,6 +11352,8 @@ async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
11322
11352
  return probeHiggsfield(credentials, fetchImpl);
11323
11353
  case "sportsyear":
11324
11354
  return probeSportsyear(credentials, fetchImpl);
11355
+ case "instantly":
11356
+ return probeInstantly(credentials, fetchImpl);
11325
11357
  case "google-workspace":
11326
11358
  return probeBearerJson("https://www.googleapis.com/oauth2/v2/userinfo", credentials, fetchImpl, (body) => {
11327
11359
  const info = body;
@@ -14879,4 +14911,4 @@ export {
14879
14911
  peekCurrentSession,
14880
14912
  readDailySessionPin
14881
14913
  };
14882
- //# sourceMappingURL=chunk-K42A4EG3.js.map
14914
+ //# sourceMappingURL=chunk-CRM7ITIY.js.map