@integrity-labs/agt-cli 0.28.511 → 0.28.513

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-I3DZ3LI5.js";
43
+ } from "../chunk-PZ3RIMNA.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-OQBHTDWK.js";
74
+ } from "../chunk-MDEA3PIS.js";
75
75
  import "../chunk-XWVM4KPK.js";
76
76
 
77
77
  // src/bin/agt.ts
@@ -4830,7 +4830,7 @@ import { execFileSync, execSync } from "child_process";
4830
4830
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4831
4831
  import chalk18 from "chalk";
4832
4832
  import ora16 from "ora";
4833
- var cliVersion = true ? "0.28.511" : "dev";
4833
+ var cliVersion = true ? "0.28.513" : "dev";
4834
4834
  async function fetchLatestVersion() {
4835
4835
  const host2 = getHost();
4836
4836
  if (!host2) return null;
@@ -6002,7 +6002,7 @@ function handleError(err) {
6002
6002
  }
6003
6003
 
6004
6004
  // src/bin/agt.ts
6005
- var cliVersion2 = true ? "0.28.511" : "dev";
6005
+ var cliVersion2 = true ? "0.28.513" : "dev";
6006
6006
  var program = new Command();
6007
6007
  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");
6008
6008
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -826,6 +826,11 @@ var integration_metadata_v1_default = {
826
826
  pattern: "^https://",
827
827
  description: "Absolute HTTPS URL the broker uses as the vendor API root. Required when any tool descriptor relies on http_templater (i.e. whenever `tools[]` is non-empty)."
828
828
  },
829
+ auth_scheme: {
830
+ type: "string",
831
+ pattern: "^[A-Za-z0-9!#$%&'*+.^_`|~-]+$",
832
+ description: "Authorization scheme word placed before the credential, e.g. `Key` for Higgsfield's `Authorization: Key KEY_ID:KEY_SECRET` (ENG-8440). Omit for the `Bearer` default. Constrained to a single RFC 7230 token because it is concatenated straight into a header value."
833
+ },
829
834
  runtime_scopes: {
830
835
  type: "object",
831
836
  description: "Per-runtime-scope support map. Each slot is either null (the integration does not support installs at this scope) or an object describing how token resolution and auth work for that scope.",
@@ -5231,7 +5236,18 @@ var HTTP_PROBE_PROVIDERS = /* @__PURE__ */ new Set([
5231
5236
  // so its honest health signal is the same: a central read-only check that the
5232
5237
  // stored token still authenticates. Routes to the OIDC userinfo probe in
5233
5238
  // connectivity-http-probes.ts.
5234
- "linkedin-ads"
5239
+ "linkedin-ads",
5240
+ // ENG-8422: Vercel is `source_type: 'native'`, so without this entry it falls
5241
+ // through to the `builtin` branch below — a hardcoded `unverified` verdict
5242
+ // having contacted nothing. `unverified` is neutral to hysteresis, so such an
5243
+ // integration can never report itself broken however bad its credential is.
5244
+ // That was tolerable while Vercel's auth was browser-OAuth brokered by Claude
5245
+ // Code (no server-held credential to check); ENG-8421 made it a
5246
+ // customer-supplied API token, at which point a revoked or mistyped token
5247
+ // became both the likeliest failure AND an invisible one. This entry is what
5248
+ // routes it to the real `api.vercel.com/v2/user` probe — `probeVercel` is
5249
+ // unreachable without it.
5250
+ "vercel"
5235
5251
  // ENG-6100: GitHub is deliberately NOT here. This set drives the ASYNC
5236
5252
  // connectivity monitor's routing, where github (source_type='native')
5237
5253
  // stays host-side (cli_command — `gh`, the credential the agent actually
@@ -5931,12 +5947,15 @@ function statusForHttp(httpStatus) {
5931
5947
  return "transient_error";
5932
5948
  return "down";
5933
5949
  }
5934
- function networkOutcome(err) {
5950
+ function redactSecret(message, secret) {
5951
+ if (typeof secret !== "string" || secret.length < 4)
5952
+ return message;
5953
+ return message.split(secret).join("[redacted]");
5954
+ }
5955
+ function networkOutcome(err, secret) {
5935
5956
  const isAbort = err?.name === "AbortError";
5936
- return {
5937
- status: "transient_error",
5938
- message: isAbort ? `Connection timed out after ${PROBE_TIMEOUT_MS2 / 1e3}s` : `Connection failed: ${err.message}`
5939
- };
5957
+ const message = isAbort ? `Connection timed out after ${PROBE_TIMEOUT_MS2 / 1e3}s` : `Connection failed: ${err.message}`;
5958
+ return { status: "transient_error", message: redactSecret(message, secret) };
5940
5959
  }
5941
5960
  async function probeLinear(creds, fetchImpl) {
5942
5961
  const key = creds.api_key ?? creds.access_token;
@@ -5958,7 +5977,7 @@ async function probeLinear(creds, fetchImpl) {
5958
5977
  return { status: "down", message: "Invalid key \u2014 no viewer returned" };
5959
5978
  return { status: "ok", message: `Connected as ${viewer.name ?? viewer.email ?? "unknown"}` };
5960
5979
  } catch (err) {
5961
- return networkOutcome(err);
5980
+ return networkOutcome(err, String(key ?? ""));
5962
5981
  }
5963
5982
  }
5964
5983
  async function probeBearerJson(url, creds, fetchImpl, interpret, extraHeaders) {
@@ -5973,7 +5992,7 @@ async function probeBearerJson(url, creds, fetchImpl, interpret, extraHeaders) {
5973
5992
  }
5974
5993
  return interpret(await res.json());
5975
5994
  } catch (err) {
5976
- return networkOutcome(err);
5995
+ return networkOutcome(err, String(token ?? ""));
5977
5996
  }
5978
5997
  }
5979
5998
  async function probeBuffer(creds, fetchImpl) {
@@ -5998,7 +6017,32 @@ async function probeBuffer(creds, fetchImpl) {
5998
6017
  return { status: "down", message: "No Buffer organizations on this account" };
5999
6018
  return { status: "ok", message: `Connected to ${orgs[0]?.name ?? "Buffer"}` };
6000
6019
  } catch (err) {
6001
- return networkOutcome(err);
6020
+ return networkOutcome(err, String(key ?? ""));
6021
+ }
6022
+ }
6023
+ async function probeVercel(creds, fetchImpl) {
6024
+ const token = creds.api_key ?? creds.access_token;
6025
+ if (!token)
6026
+ return { status: "down", message: "No Vercel credential present" };
6027
+ try {
6028
+ const res = await timedFetch2(fetchImpl, "https://api.vercel.com/v2/user", {
6029
+ headers: { Authorization: `Bearer ${token}` }
6030
+ });
6031
+ if (!res.ok) {
6032
+ if (res.status === 429) {
6033
+ return { status: "transient_error", message: "Vercel rate limit (429) \u2014 not a credential failure" };
6034
+ }
6035
+ const message = res.status === 401 || res.status === 403 ? `Vercel rejected the token (${res.status}) \u2014 invalid or revoked API token` : `Vercel API returned ${res.status}`;
6036
+ return { status: statusForHttp(res.status), message };
6037
+ }
6038
+ const body = await res.json();
6039
+ const user = body?.user;
6040
+ const identity = [user?.username, user?.email, user?.name, user?.id].find((value) => typeof value === "string" && value.trim().length > 0);
6041
+ if (!identity)
6042
+ return { status: "down", message: "Vercel returned no user for this token" };
6043
+ return { status: "ok", message: `Connected as ${identity}` };
6044
+ } catch (err) {
6045
+ return networkOutcome(err, String(token ?? ""));
6002
6046
  }
6003
6047
  }
6004
6048
  async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
@@ -6007,6 +6051,8 @@ async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
6007
6051
  return probeLinear(credentials, fetchImpl);
6008
6052
  case "buffer":
6009
6053
  return probeBuffer(credentials, fetchImpl);
6054
+ case "vercel":
6055
+ return probeVercel(credentials, fetchImpl);
6010
6056
  case "google-workspace":
6011
6057
  return probeBearerJson("https://www.googleapis.com/oauth2/v2/userinfo", credentials, fetchImpl, (body) => {
6012
6058
  const info = body;
@@ -6677,16 +6723,43 @@ var INTEGRATION_REGISTRY = [
6677
6723
  id: "higgsfield",
6678
6724
  name: "Higgsfield",
6679
6725
  category: "media",
6680
- description: "Generative media \u2014 image (Soul, Nano Banana) and video (Kling, Veo, Seedance) generation, character training (Soul ID), and generation history. Remote streamable-HTTP MCP at https://mcp.higgsfield.ai/mcp.",
6681
- // Same OAuth pattern as Granola: Claude Code brokers the browser
6682
- // sign-in at runtime; nothing for the manager API to provision.
6683
- supported_auth_types: ["none"],
6726
+ description: "Generative media \u2014 Soul text-to-image with style presets and trained-character consistency, DoP image-to-video with motion presets, and lip-synced talking video. Uses Higgsfield's REST API with your own API key.",
6727
+ // ENG-8440: api_key, NOT the host-brokered MCP this used to be.
6728
+ //
6729
+ // Higgsfield MCP (`https://mcp.higgsfield.ai/mcp`) cannot be completed from
6730
+ // the console, and that is a vendor constraint rather than a gap in our
6731
+ // plumbing. Its `oauth-protected-resource` metadata offers two flows and
6732
+ // names the clients each is for: the redirect flow lists
6733
+ // ["anthropic","claude","claude-ai","claude-code"] and the device-code flow
6734
+ // lists ["openclaw","hermes","memoclaw"]. Our console appears in neither,
6735
+ // and the device authorization server
6736
+ // (`fnf-device-auth.higgsfield.ai/.well-known/oauth-authorization-server`)
6737
+ // still returns 404, so there is no discovery document to probe either.
6738
+ // The only client Higgsfield permits is Claude Code on the agent's own
6739
+ // host, driven by an operator in tmux — no console work removes that step.
6740
+ //
6741
+ // The REST API (`platform.higgsfield.ai`) has none of those constraints: a
6742
+ // static key pair the customer creates in their own Higgsfield account,
6743
+ // sent as `Authorization: Key KEY_ID:KEY_SECRET`. That makes this an
6744
+ // ordinary paste-a-key integration, and it means WE hold the credential —
6745
+ // storable, rotatable, revocable and auditable, none of which was true
6746
+ // under the MCP.
6747
+ //
6748
+ // Bring-your-own-key: generations bill to the customer's own Higgsfield
6749
+ // account, so an install is never metered by Augmented Team.
6750
+ //
6751
+ // NOTE: this entry carries no `remoteMcp`, so it contributes nothing to
6752
+ // `registryRemoteMcpKeys` and cannot prune the `higgsfield` key an older
6753
+ // host already wrote to `.mcp.json`. That pruning is why `'higgsfield'` is
6754
+ // a literal in `integrationDerivedKeys` in the claudecode adapter — do not
6755
+ // drop it while any host may still be carrying the retired MCP entry.
6756
+ supported_auth_types: ["api_key"],
6684
6757
  capabilities: [
6685
- { id: "higgsfield:generate-image", name: "Generate Image", description: "Create images via Soul, Nano Banana, and other image models \u2014 up to 4K. Includes Soul ID character consistency.", access: "write" },
6686
- { id: "higgsfield:generate-video", name: "Generate Video", description: "Create videos via Kling, Veo, Seedance \u2014 up to 15s. Includes UGC, product review, TV spot presets.", access: "write" },
6687
- { id: "higgsfield:read-history", name: "Read History", description: "Browse generation history for iterative workflows; reuse prior outputs as references.", access: "read" }
6758
+ { id: "higgsfield:generate-image", name: "Generate Image", description: "Create stills with Soul \u2014 style presets, plus trained-character consistency for a repeated face or product.", access: "write" },
6759
+ { id: "higgsfield:generate-video", name: "Generate Video", description: "Animate a still into a short clip with DoP motion presets, or lip-sync a talking video from an image plus audio.", access: "write" },
6760
+ { id: "higgsfield:read-jobs", name: "Poll Jobs & Presets", description: "Poll asynchronous generations to completion, and list the style and motion presets the generate tools accept.", access: "read" }
6688
6761
  ],
6689
- docs_url: "https://higgsfield.ai/mcp",
6762
+ docs_url: "https://docs.higgsfield.ai/",
6690
6763
  beta: true
6691
6764
  },
6692
6765
  {
@@ -11083,9 +11156,6 @@ function buildRemoteMcpEntry(definitionId, dbSpec, connectionKey) {
11083
11156
  }
11084
11157
  };
11085
11158
  }
11086
- function buildHostBrokeredRemoteMcpEntry(url) {
11087
- return { type: "http", url };
11088
- }
11089
11159
  function extractHeaderVarName(value) {
11090
11160
  const m = /^\$\{([A-Za-z_][A-Za-z0-9_]*)\}$/.exec(value.trim());
11091
11161
  return m ? m[1] : null;
@@ -14780,7 +14850,6 @@ export {
14780
14850
  remoteMcpEnvPrefix,
14781
14851
  remoteMcpConnectionScopedEnvVar,
14782
14852
  buildRemoteMcpEntry,
14783
- buildHostBrokeredRemoteMcpEntry,
14784
14853
  buildLiveHeaderRemoteMcpProxyEntry,
14785
14854
  buildOAuthRemoteMcpProxyEntry,
14786
14855
  buildNativeMcpEntry,
@@ -14939,4 +15008,4 @@ export {
14939
15008
  stopAllSessionsAndWait,
14940
15009
  getProjectDir
14941
15010
  };
14942
- //# sourceMappingURL=chunk-OQBHTDWK.js.map
15011
+ //# sourceMappingURL=chunk-MDEA3PIS.js.map