@integrity-labs/agt-cli 0.28.97 → 0.28.99

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
@@ -37,7 +37,7 @@ import {
37
37
  success,
38
38
  table,
39
39
  warn
40
- } from "../chunk-EN7ZKY4A.js";
40
+ } from "../chunk-QPQRF6F4.js";
41
41
  import {
42
42
  CHANNEL_REGISTRY,
43
43
  DEPLOYMENT_TEMPLATES,
@@ -64,7 +64,7 @@ import {
64
64
  renderTemplate,
65
65
  resolveChannels,
66
66
  serializeManifestForSlackCli
67
- } from "../chunk-TRKWWYRN.js";
67
+ } from "../chunk-IPSZZQ3D.js";
68
68
 
69
69
  // src/bin/agt.ts
70
70
  import { join as join22 } from "path";
@@ -4777,7 +4777,7 @@ import { execFileSync, execSync } from "child_process";
4777
4777
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4778
4778
  import chalk18 from "chalk";
4779
4779
  import ora16 from "ora";
4780
- var cliVersion = true ? "0.28.97" : "dev";
4780
+ var cliVersion = true ? "0.28.99" : "dev";
4781
4781
  async function fetchLatestVersion() {
4782
4782
  const host2 = getHost();
4783
4783
  if (!host2) return null;
@@ -5791,7 +5791,7 @@ function handleError(err) {
5791
5791
  }
5792
5792
 
5793
5793
  // src/bin/agt.ts
5794
- var cliVersion2 = true ? "0.28.97" : "dev";
5794
+ var cliVersion2 = true ? "0.28.99" : "dev";
5795
5795
  var program = new Command();
5796
5796
  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");
5797
5797
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -3603,7 +3603,13 @@ var HTTP_PROBE_PROVIDERS = /* @__PURE__ */ new Set([
3603
3603
  "linear",
3604
3604
  "google-workspace",
3605
3605
  "xero",
3606
- "v0"
3606
+ "v0",
3607
+ // ENG-6642: Buffer is a direct-API GraphQL integration (api_key → Bearer),
3608
+ // not a CLI tool. Route it to the read-only org-details HTTP probe so health
3609
+ // reflects real API reachability, not a `buffer` binary on PATH. This wins
3610
+ // over its toolkit source_type, so the probe is honest regardless of how the
3611
+ // toolkit row is classified.
3612
+ "buffer"
3607
3613
  // ENG-6100: GitHub is deliberately NOT here. This set drives the ASYNC
3608
3614
  // connectivity monitor's routing, where github (source_type='native')
3609
3615
  // stays host-side (cli_command — `gh`, the credential the agent actually
@@ -4295,10 +4301,37 @@ async function probeBearerJson(url, creds, fetchImpl, interpret, extraHeaders) {
4295
4301
  return networkOutcome(err);
4296
4302
  }
4297
4303
  }
4304
+ async function probeBuffer(creds, fetchImpl) {
4305
+ const key = creds.api_key ?? creds.access_token;
4306
+ if (!key)
4307
+ return { status: "down", message: "No Buffer credential present" };
4308
+ try {
4309
+ const res = await timedFetch2(fetchImpl, "https://api.buffer.com", {
4310
+ method: "POST",
4311
+ headers: { "Content-Type": "application/json", Authorization: `Bearer ${key}` },
4312
+ body: JSON.stringify({ query: "{ account { organizations { id name } } }" })
4313
+ });
4314
+ if (!res.ok) {
4315
+ const message = res.status === 401 ? "Buffer API key expired or revoked \u2014 reconnect required" : `Buffer API returned ${res.status}`;
4316
+ return { status: statusForHttp(res.status), message };
4317
+ }
4318
+ const body = await res.json();
4319
+ if (body.errors?.length)
4320
+ return { status: "down", message: body.errors[0]?.message ?? "Unknown Buffer error" };
4321
+ const orgs = body.data?.account?.organizations ?? [];
4322
+ if (!orgs.length)
4323
+ return { status: "down", message: "No Buffer organizations on this account" };
4324
+ return { status: "ok", message: `Connected to ${orgs[0]?.name ?? "Buffer"}` };
4325
+ } catch (err) {
4326
+ return networkOutcome(err);
4327
+ }
4328
+ }
4298
4329
  async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
4299
4330
  switch (definitionId) {
4300
4331
  case "linear":
4301
4332
  return probeLinear(credentials, fetchImpl);
4333
+ case "buffer":
4334
+ return probeBuffer(credentials, fetchImpl);
4302
4335
  case "google-workspace":
4303
4336
  return probeBearerJson("https://www.googleapis.com/oauth2/v2/userinfo", credentials, fetchImpl, (body) => {
4304
4337
  const info = body;
@@ -5663,4 +5696,4 @@ export {
5663
5696
  parseEnvIntegrations,
5664
5697
  probeMcpEnvSubstitution
5665
5698
  };
5666
- //# sourceMappingURL=chunk-TRKWWYRN.js.map
5699
+ //# sourceMappingURL=chunk-IPSZZQ3D.js.map