@integrity-labs/agt-cli 0.28.511 → 0.28.512
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 +4 -4
- package/dist/{chunk-OQBHTDWK.js → chunk-M3ICTPSG.js} +51 -10
- package/dist/{chunk-OQBHTDWK.js.map → chunk-M3ICTPSG.js.map} +1 -1
- package/dist/{chunk-I3DZ3LI5.js → chunk-Z7DMKSCU.js} +3 -3
- package/dist/{claude-pair-runtime-AK6RLKSR.js → claude-pair-runtime-MNO6DCMX.js} +2 -2
- package/dist/lib/manager-worker.js +10 -10
- package/dist/{persistent-session-CMG4VWT6.js → persistent-session-HUKX54KL.js} +2 -2
- package/dist/{responsiveness-probe-COMUJVPF.js → responsiveness-probe-HN7KBLJP.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-I3DZ3LI5.js.map → chunk-Z7DMKSCU.js.map} +0 -0
- /package/dist/{claude-pair-runtime-AK6RLKSR.js.map → claude-pair-runtime-MNO6DCMX.js.map} +0 -0
- /package/dist/{persistent-session-CMG4VWT6.js.map → persistent-session-HUKX54KL.js.map} +0 -0
- /package/dist/{responsiveness-probe-COMUJVPF.js.map → responsiveness-probe-HN7KBLJP.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-Z7DMKSCU.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-
|
|
74
|
+
} from "../chunk-M3ICTPSG.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.
|
|
4833
|
+
var cliVersion = true ? "0.28.512" : "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.
|
|
6005
|
+
var cliVersion2 = true ? "0.28.512" : "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) => {
|
|
@@ -5231,7 +5231,18 @@ var HTTP_PROBE_PROVIDERS = /* @__PURE__ */ new Set([
|
|
|
5231
5231
|
// so its honest health signal is the same: a central read-only check that the
|
|
5232
5232
|
// stored token still authenticates. Routes to the OIDC userinfo probe in
|
|
5233
5233
|
// connectivity-http-probes.ts.
|
|
5234
|
-
"linkedin-ads"
|
|
5234
|
+
"linkedin-ads",
|
|
5235
|
+
// ENG-8422: Vercel is `source_type: 'native'`, so without this entry it falls
|
|
5236
|
+
// through to the `builtin` branch below — a hardcoded `unverified` verdict
|
|
5237
|
+
// having contacted nothing. `unverified` is neutral to hysteresis, so such an
|
|
5238
|
+
// integration can never report itself broken however bad its credential is.
|
|
5239
|
+
// That was tolerable while Vercel's auth was browser-OAuth brokered by Claude
|
|
5240
|
+
// Code (no server-held credential to check); ENG-8421 made it a
|
|
5241
|
+
// customer-supplied API token, at which point a revoked or mistyped token
|
|
5242
|
+
// became both the likeliest failure AND an invisible one. This entry is what
|
|
5243
|
+
// routes it to the real `api.vercel.com/v2/user` probe — `probeVercel` is
|
|
5244
|
+
// unreachable without it.
|
|
5245
|
+
"vercel"
|
|
5235
5246
|
// ENG-6100: GitHub is deliberately NOT here. This set drives the ASYNC
|
|
5236
5247
|
// connectivity monitor's routing, where github (source_type='native')
|
|
5237
5248
|
// stays host-side (cli_command — `gh`, the credential the agent actually
|
|
@@ -5931,12 +5942,15 @@ function statusForHttp(httpStatus) {
|
|
|
5931
5942
|
return "transient_error";
|
|
5932
5943
|
return "down";
|
|
5933
5944
|
}
|
|
5934
|
-
function
|
|
5945
|
+
function redactSecret(message, secret) {
|
|
5946
|
+
if (typeof secret !== "string" || secret.length < 4)
|
|
5947
|
+
return message;
|
|
5948
|
+
return message.split(secret).join("[redacted]");
|
|
5949
|
+
}
|
|
5950
|
+
function networkOutcome(err, secret) {
|
|
5935
5951
|
const isAbort = err?.name === "AbortError";
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
message: isAbort ? `Connection timed out after ${PROBE_TIMEOUT_MS2 / 1e3}s` : `Connection failed: ${err.message}`
|
|
5939
|
-
};
|
|
5952
|
+
const message = isAbort ? `Connection timed out after ${PROBE_TIMEOUT_MS2 / 1e3}s` : `Connection failed: ${err.message}`;
|
|
5953
|
+
return { status: "transient_error", message: redactSecret(message, secret) };
|
|
5940
5954
|
}
|
|
5941
5955
|
async function probeLinear(creds, fetchImpl) {
|
|
5942
5956
|
const key = creds.api_key ?? creds.access_token;
|
|
@@ -5958,7 +5972,7 @@ async function probeLinear(creds, fetchImpl) {
|
|
|
5958
5972
|
return { status: "down", message: "Invalid key \u2014 no viewer returned" };
|
|
5959
5973
|
return { status: "ok", message: `Connected as ${viewer.name ?? viewer.email ?? "unknown"}` };
|
|
5960
5974
|
} catch (err) {
|
|
5961
|
-
return networkOutcome(err);
|
|
5975
|
+
return networkOutcome(err, String(key ?? ""));
|
|
5962
5976
|
}
|
|
5963
5977
|
}
|
|
5964
5978
|
async function probeBearerJson(url, creds, fetchImpl, interpret, extraHeaders) {
|
|
@@ -5973,7 +5987,7 @@ async function probeBearerJson(url, creds, fetchImpl, interpret, extraHeaders) {
|
|
|
5973
5987
|
}
|
|
5974
5988
|
return interpret(await res.json());
|
|
5975
5989
|
} catch (err) {
|
|
5976
|
-
return networkOutcome(err);
|
|
5990
|
+
return networkOutcome(err, String(token ?? ""));
|
|
5977
5991
|
}
|
|
5978
5992
|
}
|
|
5979
5993
|
async function probeBuffer(creds, fetchImpl) {
|
|
@@ -5998,7 +6012,32 @@ async function probeBuffer(creds, fetchImpl) {
|
|
|
5998
6012
|
return { status: "down", message: "No Buffer organizations on this account" };
|
|
5999
6013
|
return { status: "ok", message: `Connected to ${orgs[0]?.name ?? "Buffer"}` };
|
|
6000
6014
|
} catch (err) {
|
|
6001
|
-
return networkOutcome(err);
|
|
6015
|
+
return networkOutcome(err, String(key ?? ""));
|
|
6016
|
+
}
|
|
6017
|
+
}
|
|
6018
|
+
async function probeVercel(creds, fetchImpl) {
|
|
6019
|
+
const token = creds.api_key ?? creds.access_token;
|
|
6020
|
+
if (!token)
|
|
6021
|
+
return { status: "down", message: "No Vercel credential present" };
|
|
6022
|
+
try {
|
|
6023
|
+
const res = await timedFetch2(fetchImpl, "https://api.vercel.com/v2/user", {
|
|
6024
|
+
headers: { Authorization: `Bearer ${token}` }
|
|
6025
|
+
});
|
|
6026
|
+
if (!res.ok) {
|
|
6027
|
+
if (res.status === 429) {
|
|
6028
|
+
return { status: "transient_error", message: "Vercel rate limit (429) \u2014 not a credential failure" };
|
|
6029
|
+
}
|
|
6030
|
+
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}`;
|
|
6031
|
+
return { status: statusForHttp(res.status), message };
|
|
6032
|
+
}
|
|
6033
|
+
const body = await res.json();
|
|
6034
|
+
const user = body?.user;
|
|
6035
|
+
const identity = [user?.username, user?.email, user?.name, user?.id].find((value) => typeof value === "string" && value.trim().length > 0);
|
|
6036
|
+
if (!identity)
|
|
6037
|
+
return { status: "down", message: "Vercel returned no user for this token" };
|
|
6038
|
+
return { status: "ok", message: `Connected as ${identity}` };
|
|
6039
|
+
} catch (err) {
|
|
6040
|
+
return networkOutcome(err, String(token ?? ""));
|
|
6002
6041
|
}
|
|
6003
6042
|
}
|
|
6004
6043
|
async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
|
|
@@ -6007,6 +6046,8 @@ async function probeHttpProvider(definitionId, credentials, fetchImpl = fetch) {
|
|
|
6007
6046
|
return probeLinear(credentials, fetchImpl);
|
|
6008
6047
|
case "buffer":
|
|
6009
6048
|
return probeBuffer(credentials, fetchImpl);
|
|
6049
|
+
case "vercel":
|
|
6050
|
+
return probeVercel(credentials, fetchImpl);
|
|
6010
6051
|
case "google-workspace":
|
|
6011
6052
|
return probeBearerJson("https://www.googleapis.com/oauth2/v2/userinfo", credentials, fetchImpl, (body) => {
|
|
6012
6053
|
const info = body;
|
|
@@ -14939,4 +14980,4 @@ export {
|
|
|
14939
14980
|
stopAllSessionsAndWait,
|
|
14940
14981
|
getProjectDir
|
|
14941
14982
|
};
|
|
14942
|
-
//# sourceMappingURL=chunk-
|
|
14983
|
+
//# sourceMappingURL=chunk-M3ICTPSG.js.map
|