@integrity-labs/agt-cli 0.28.1103 → 0.28.1105

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-HTK57ZUK.js";
43
+ } from "../chunk-BJK3255J.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-FQPGSXUX.js";
48
+ } from "../chunk-UUCJYW6D.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-NNCRFBTL.js";
82
+ } from "../chunk-FWWOW7YA.js";
83
83
  import "../chunk-OCMJ5E6J.js";
84
84
  import "../chunk-XWVM4KPK.js";
85
85
  import "../chunk-EL5MWGGH.js";
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
5474
5474
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5475
5475
  import chalk18 from "chalk";
5476
5476
  import ora16 from "ora";
5477
- var cliVersion = true ? "0.28.1103" : "dev";
5477
+ var cliVersion = true ? "0.28.1105" : "dev";
5478
5478
  async function fetchLatestVersion() {
5479
5479
  const host2 = getHost();
5480
5480
  if (!host2) return null;
@@ -6734,7 +6734,7 @@ function handleError(err) {
6734
6734
  }
6735
6735
 
6736
6736
  // src/bin/agt.ts
6737
- var cliVersion2 = true ? "0.28.1103" : "dev";
6737
+ var cliVersion2 = true ? "0.28.1105" : "dev";
6738
6738
  var program = new Command();
6739
6739
  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");
6740
6740
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -16,7 +16,7 @@ import {
16
16
  parseEnvFileEntries,
17
17
  parseEnvIntegrations,
18
18
  shellQuote
19
- } from "./chunk-FQPGSXUX.js";
19
+ } from "./chunk-UUCJYW6D.js";
20
20
  import {
21
21
  BIND_FAILURE_QUARANTINE_THRESHOLD,
22
22
  INTEGRATIONS_SECTION_END,
@@ -79,7 +79,7 @@ import {
79
79
  sessionTranscriptDir,
80
80
  worseConnectivityOutcome,
81
81
  wrapScheduledTaskPrompt
82
- } from "./chunk-NNCRFBTL.js";
82
+ } from "./chunk-FWWOW7YA.js";
83
83
  import {
84
84
  classifyUnanswerablePane,
85
85
  isConsumerTermsDialogVisible,
@@ -7518,7 +7518,7 @@ function exchangeFailureKind(err) {
7518
7518
  }
7519
7519
 
7520
7520
  // src/lib/api-client.ts
7521
- var agtCliVersion = true ? "0.28.1103" : "dev";
7521
+ var agtCliVersion = true ? "0.28.1105" : "dev";
7522
7522
  var lastConfigHash = null;
7523
7523
  function setConfigHash(hash) {
7524
7524
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -12492,4 +12492,4 @@ export {
12492
12492
  managerInstallSystemUnitCommand,
12493
12493
  managerUninstallSystemUnitCommand
12494
12494
  };
12495
- //# sourceMappingURL=chunk-HTK57ZUK.js.map
12495
+ //# sourceMappingURL=chunk-BJK3255J.js.map
@@ -12048,7 +12048,13 @@ var HTTP_PROBE_PROVIDERS = /* @__PURE__ */ new Set([
12048
12048
  // integration is read-only, so without a probe a dead token would surface
12049
12049
  // only as failed queries. Routes to `probeBotify` against the install's
12050
12050
  // `GET /projects/{username}`.
12051
- "botify"
12051
+ "botify",
12052
+ // CS-1992: Omnisend, added with the integration. An Omnisend API key never
12053
+ // expires on its own - it dies when someone deletes it in Store settings - and
12054
+ // the integration is read-only, so without a probe a dead key would surface
12055
+ // only as failed reports. Routes to `probeOmnisend` against
12056
+ // `GET /brands/current`, never the rate-capped analytics endpoints.
12057
+ "omnisend"
12052
12058
  // ENG-6100: GitHub is deliberately NOT here. This set drives the ASYNC
12053
12059
  // connectivity monitor's routing, where github (source_type='native')
12054
12060
  // stays host-side (cli_command — `gh`, the credential the agent actually
@@ -12722,6 +12728,56 @@ async function probeBotify(creds, fetchImpl, config) {
12722
12728
  return networkOutcome(err, String(token));
12723
12729
  }
12724
12730
  }
12731
+ async function probeOmnisend(creds, fetchImpl) {
12732
+ const key = creds.api_key ?? creds.access_token;
12733
+ if (!key)
12734
+ return { status: "down", message: "No Omnisend API key present" };
12735
+ try {
12736
+ const res = await timedFetch(fetchImpl, "https://api.omnisend.com/api/brands/current", {
12737
+ headers: {
12738
+ Authorization: `Omnisend-API-Key ${key}`,
12739
+ "Omnisend-Version": "2026-03-15",
12740
+ Accept: "application/json"
12741
+ }
12742
+ });
12743
+ if (res.status === 401) {
12744
+ return {
12745
+ status: "down",
12746
+ cause: "auth_rejected",
12747
+ message: "Omnisend rejected the API key (401) - it was deleted, mistyped or belongs to another store"
12748
+ };
12749
+ }
12750
+ if (res.status === 403) {
12751
+ return {
12752
+ status: "degraded",
12753
+ cause: "auth_rejected",
12754
+ message: (
12755
+ // Obi Wan 534941544650 / CodeRabbit on #6868: /brands/current is gated
12756
+ // on brands.read (Omnisend API docs), not on Campaigns, so a 403 here
12757
+ // names that one permission and nothing else.
12758
+ "Omnisend accepted the API key but it lacks read access to brands (store details) (403) - edit the key's permissions under Store settings > API keys"
12759
+ )
12760
+ };
12761
+ }
12762
+ if (!res.ok) {
12763
+ const message = res.status === 429 ? rateLimitMessage("Omnisend", res.status) : `Omnisend API returned ${res.status}`;
12764
+ return { status: statusForHttp(res.status), cause: causeForHttp(res.status), message };
12765
+ }
12766
+ let body = null;
12767
+ try {
12768
+ body = await res.json();
12769
+ } catch {
12770
+ body = null;
12771
+ }
12772
+ if (typeof body?.brandID !== "string" || body.brandID === "") {
12773
+ return { status: "down", message: "Omnisend returned 200 without a brand - not an Omnisend API response" };
12774
+ }
12775
+ const name = typeof body.name === "string" && body.name.trim() !== "" ? body.name.trim() : body.brandID;
12776
+ return { status: "ok", message: `Connected to Omnisend (${name})` };
12777
+ } catch (err) {
12778
+ return networkOutcome(err, String(key));
12779
+ }
12780
+ }
12725
12781
  async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch, config) {
12726
12782
  switch (definitionId) {
12727
12783
  case "storrito":
@@ -12744,6 +12800,8 @@ async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch, c
12744
12800
  return probeMitti(credentials, fetchImpl);
12745
12801
  case "projectworks":
12746
12802
  return probeProjectworks(credentials, fetchImpl);
12803
+ case "omnisend":
12804
+ return probeOmnisend(credentials, fetchImpl);
12747
12805
  case "google-workspace":
12748
12806
  return probeBearerJson("https://www.googleapis.com/oauth2/v2/userinfo", credentials, fetchImpl, (body) => {
12749
12807
  const info = body;
@@ -16540,4 +16598,4 @@ export {
16540
16598
  peekCurrentSession,
16541
16599
  readDailySessionPin
16542
16600
  };
16543
- //# sourceMappingURL=chunk-NNCRFBTL.js.map
16601
+ //# sourceMappingURL=chunk-FWWOW7YA.js.map