@integrity-labs/agt-cli 0.28.519 → 0.28.521

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,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-FRIAJDCT.js";
43
+ } from "../chunk-UAHIRLPO.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -71,7 +71,7 @@ import {
71
71
  requiredMcpWildcard,
72
72
  resolveChannels,
73
73
  serializeManifestForSlackCli
74
- } from "../chunk-XH3O62OZ.js";
74
+ } from "../chunk-STNEJC5S.js";
75
75
  import "../chunk-XWVM4KPK.js";
76
76
 
77
77
  // src/bin/agt.ts
@@ -4834,7 +4834,7 @@ import { execFileSync, execSync } from "child_process";
4834
4834
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4835
4835
  import chalk18 from "chalk";
4836
4836
  import ora16 from "ora";
4837
- var cliVersion = true ? "0.28.519" : "dev";
4837
+ var cliVersion = true ? "0.28.521" : "dev";
4838
4838
  async function fetchLatestVersion() {
4839
4839
  const host2 = getHost();
4840
4840
  if (!host2) return null;
@@ -6006,7 +6006,7 @@ function handleError(err) {
6006
6006
  }
6007
6007
 
6008
6008
  // src/bin/agt.ts
6009
- var cliVersion2 = true ? "0.28.519" : "dev";
6009
+ var cliVersion2 = true ? "0.28.521" : "dev";
6010
6010
  var program = new Command();
6011
6011
  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");
6012
6012
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -5296,7 +5296,17 @@ var HTTP_PROBE_PROVIDERS = /* @__PURE__ */ new Set([
5296
5296
  // became both the likeliest failure AND an invisible one. This entry is what
5297
5297
  // routes it to the real `api.vercel.com/v2/user` probe — `probeVercel` is
5298
5298
  // unreachable without it.
5299
- "vercel"
5299
+ "vercel",
5300
+ // ENG-8502: Higgsfield, for exactly the reasons given for Vercel above.
5301
+ // ENG-8440 made it a customer-supplied api_key but left it out of this set,
5302
+ // so it fell through to `builtin` and reported `unverified` having contacted
5303
+ // nothing. The consequence was worse than an uninformative chip: nothing
5304
+ // promotes an install off `status='configured'` without a real verdict, and
5305
+ // the console renders `configured` as "not connected" — so scout's WORKING
5306
+ // install (121 motion presets fetched through the broker) told the customer
5307
+ // it had never connected. Routes to `probeHiggsfield`: `Authorization: Key`
5308
+ // against the free, read-only `/v1/motions`.
5309
+ "higgsfield"
5300
5310
  // ENG-6100: GitHub is deliberately NOT here. This set drives the ASYNC
5301
5311
  // connectivity monitor's routing, where github (source_type='native')
5302
5312
  // stays host-side (cli_command — `gh`, the credential the agent actually
@@ -5980,11 +5990,20 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
5980
5990
 
5981
5991
  // ../../packages/core/dist/integrations/connectivity-http-probes.js
5982
5992
  var PROBE_TIMEOUT_MS2 = 1e4;
5993
+ var NULL_BODY_STATUSES = /* @__PURE__ */ new Set([101, 204, 205, 304]);
5983
5994
  async function timedFetch2(fetchImpl, url, init) {
5984
5995
  const controller = new AbortController();
5985
5996
  const timer = setTimeout(() => controller.abort(), PROBE_TIMEOUT_MS2);
5986
5997
  try {
5987
- return await fetchImpl(url, { ...init, signal: controller.signal });
5998
+ const res = await fetchImpl(url, { ...init, signal: controller.signal });
5999
+ if (NULL_BODY_STATUSES.has(res.status))
6000
+ return res;
6001
+ const body = await res.text();
6002
+ return new Response(body, {
6003
+ status: res.status,
6004
+ statusText: res.statusText,
6005
+ headers: res.headers
6006
+ });
5988
6007
  } finally {
5989
6008
  clearTimeout(timer);
5990
6009
  }
@@ -6094,6 +6113,43 @@ async function probeVercel(creds, fetchImpl) {
6094
6113
  return networkOutcome(err, String(token ?? ""));
6095
6114
  }
6096
6115
  }
6116
+ async function probeHiggsfield(creds, fetchImpl) {
6117
+ const token = creds.api_key ?? creds.access_token;
6118
+ if (!token)
6119
+ return { status: "down", message: "No Higgsfield credential present" };
6120
+ if (!token.includes(":")) {
6121
+ return {
6122
+ status: "down",
6123
+ message: "Higgsfield credential is not in KEY_ID:KEY_SECRET form \u2014 re-paste it from cloud.higgsfield.ai/api-keys"
6124
+ };
6125
+ }
6126
+ try {
6127
+ const res = await timedFetch2(fetchImpl, "https://platform.higgsfield.ai/v1/motions", {
6128
+ headers: { Authorization: `Key ${token}` }
6129
+ });
6130
+ if (!res.ok) {
6131
+ if (res.status === 429) {
6132
+ return { status: "transient_error", message: "Higgsfield rate limit (429) \u2014 not a credential failure" };
6133
+ }
6134
+ const body = await res.text().catch(() => "");
6135
+ if (res.status === 403 && /credit/i.test(body)) {
6136
+ return {
6137
+ status: "degraded",
6138
+ message: "Higgsfield authenticated, but the account is out of credits \u2014 generation will fail"
6139
+ };
6140
+ }
6141
+ const message = res.status === 401 || res.status === 403 ? `Higgsfield rejected the key pair (${res.status}) \u2014 invalid or revoked API key` : `Higgsfield API returned ${res.status}`;
6142
+ return { status: statusForHttp(res.status), message };
6143
+ }
6144
+ const motions = await res.json();
6145
+ if (!Array.isArray(motions) || motions.length === 0) {
6146
+ return { status: "down", message: "Higgsfield returned no motion presets for this key" };
6147
+ }
6148
+ return { status: "ok", message: `Higgsfield reachable \u2014 ${motions.length} motion presets` };
6149
+ } catch (err) {
6150
+ return networkOutcome(err, String(token ?? ""));
6151
+ }
6152
+ }
6097
6153
  async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
6098
6154
  switch (definitionId) {
6099
6155
  case "linear":
@@ -6102,6 +6158,8 @@ async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
6102
6158
  return probeBuffer(credentials, fetchImpl);
6103
6159
  case "vercel":
6104
6160
  return probeVercel(credentials, fetchImpl);
6161
+ case "higgsfield":
6162
+ return probeHiggsfield(credentials, fetchImpl);
6105
6163
  case "google-workspace":
6106
6164
  return probeBearerJson("https://www.googleapis.com/oauth2/v2/userinfo", credentials, fetchImpl, (body) => {
6107
6165
  const info = body;
@@ -15112,4 +15170,4 @@ export {
15112
15170
  stopAllSessionsAndWait,
15113
15171
  getProjectDir
15114
15172
  };
15115
- //# sourceMappingURL=chunk-XH3O62OZ.js.map
15173
+ //# sourceMappingURL=chunk-STNEJC5S.js.map