@integrity-labs/agt-cli 0.28.591 → 0.28.593
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-KR4AZ4EF.js → chunk-BYCE4V7Q.js} +69 -6
- package/dist/{chunk-KR4AZ4EF.js.map → chunk-BYCE4V7Q.js.map} +1 -1
- package/dist/{chunk-QDJEEGZB.js → chunk-TKWDYMM3.js} +35 -1
- package/dist/chunk-TKWDYMM3.js.map +1 -0
- package/dist/{claude-pair-runtime-673RQWL5.js → claude-pair-runtime-PBFR6UGJ.js} +2 -2
- package/dist/lib/manager-worker.js +57 -15
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-D4NE7KEU.js → persistent-session-JLTLTQHQ.js} +2 -2
- package/dist/{responsiveness-probe-5JWPNTA7.js → responsiveness-probe-4GJUK5GG.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-QDJEEGZB.js.map +0 -1
- /package/dist/{claude-pair-runtime-673RQWL5.js.map → claude-pair-runtime-PBFR6UGJ.js.map} +0 -0
- /package/dist/{persistent-session-D4NE7KEU.js.map → persistent-session-JLTLTQHQ.js.map} +0 -0
- /package/dist/{responsiveness-probe-5JWPNTA7.js.map → responsiveness-probe-4GJUK5GG.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-BYCE4V7Q.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-TKWDYMM3.js";
|
|
75
75
|
import "../chunk-XWVM4KPK.js";
|
|
76
76
|
|
|
77
77
|
// src/bin/agt.ts
|
|
@@ -4908,7 +4908,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4908
4908
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4909
4909
|
import chalk18 from "chalk";
|
|
4910
4910
|
import ora16 from "ora";
|
|
4911
|
-
var cliVersion = true ? "0.28.
|
|
4911
|
+
var cliVersion = true ? "0.28.593" : "dev";
|
|
4912
4912
|
async function fetchLatestVersion() {
|
|
4913
4913
|
const host2 = getHost();
|
|
4914
4914
|
if (!host2) return null;
|
|
@@ -6088,7 +6088,7 @@ function handleError(err) {
|
|
|
6088
6088
|
}
|
|
6089
6089
|
|
|
6090
6090
|
// src/bin/agt.ts
|
|
6091
|
-
var cliVersion2 = true ? "0.28.
|
|
6091
|
+
var cliVersion2 = true ? "0.28.593" : "dev";
|
|
6092
6092
|
var program = new Command();
|
|
6093
6093
|
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");
|
|
6094
6094
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
resolveConnectivityProbe,
|
|
47
47
|
worseConnectivityOutcome,
|
|
48
48
|
wrapScheduledTaskPrompt
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-TKWDYMM3.js";
|
|
50
50
|
import {
|
|
51
51
|
parsePsRows
|
|
52
52
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -5971,7 +5971,7 @@ function exchangeFailureKind(err) {
|
|
|
5971
5971
|
}
|
|
5972
5972
|
|
|
5973
5973
|
// src/lib/api-client.ts
|
|
5974
|
-
var agtCliVersion = true ? "0.28.
|
|
5974
|
+
var agtCliVersion = true ? "0.28.593" : "dev";
|
|
5975
5975
|
var lastConfigHash = null;
|
|
5976
5976
|
function setConfigHash(hash) {
|
|
5977
5977
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -7952,6 +7952,52 @@ async function probeMcpStdio(config) {
|
|
|
7952
7952
|
// src/lib/cli-probe.ts
|
|
7953
7953
|
import { execFile as execFile2 } from "child_process";
|
|
7954
7954
|
var DEFAULT_TIMEOUT_MS2 = 8e3;
|
|
7955
|
+
var STATUS_CTX = String.raw`(?:\bhttps?\/?\s*(?:1\.[01]\s+)?|\bstatus(?:\s*code)?\s*[:=]?\s*|\bcode\s*[:=]?\s*|\breturned\s+(?:http\s*)?)`;
|
|
7956
|
+
var TRANSIENT_SIGNATURES = [
|
|
7957
|
+
// Vendor rate limiting. RFC 6585 for 429; GitHub's secondary limits and
|
|
7958
|
+
// Google's quota wording do not use the number at all.
|
|
7959
|
+
{
|
|
7960
|
+
re: new RegExp(`${STATUS_CTX}429\\b|too many requests|rate limit|secondary rate|quota exceeded|abuse detection`, "i"),
|
|
7961
|
+
reason: "rate limited by the provider"
|
|
7962
|
+
},
|
|
7963
|
+
// Vendor-side server errors. Anchored on the phrase or on an explicit
|
|
7964
|
+
// HTTP-status context so a bare 3-digit number cannot match.
|
|
7965
|
+
{
|
|
7966
|
+
re: new RegExp(`${STATUS_CTX}(?:502|503|504)\\b|bad gateway|service unavailable|gateway time-?out|internal server error|server error \\(5\\d\\d\\)`, "i"),
|
|
7967
|
+
reason: "provider returned a server error"
|
|
7968
|
+
},
|
|
7969
|
+
// Transport. The provider may be fine and simply unreachable from here.
|
|
7970
|
+
{
|
|
7971
|
+
re: /ECONNREFUSED|ECONNRESET|ETIMEDOUT|ENOTFOUND|EAI_AGAIN|EHOSTUNREACH|ENETUNREACH|connection refused|connection reset|network is unreachable|temporary failure in name resolution|tls handshake|dial tcp/i,
|
|
7972
|
+
reason: "network failure reaching the provider"
|
|
7973
|
+
},
|
|
7974
|
+
// OUR failure, not the credential's. ENG-8344 fetches the token per use
|
|
7975
|
+
// through the platform, so an identity-tier outage surfaces here as a
|
|
7976
|
+
// non-zero exit from a CLI whose credential never became available. Grading
|
|
7977
|
+
// that `down` blames the customer's token for our own outage — it is the
|
|
7978
|
+
// exact case that would have paged the fleet on 2026-08-14.
|
|
7979
|
+
{
|
|
7980
|
+
re: /credential fetch failed|key exchange failed|host\/exchange|upstream connect error|could not read Username/i,
|
|
7981
|
+
reason: "our credential broker could not supply a token"
|
|
7982
|
+
}
|
|
7983
|
+
];
|
|
7984
|
+
function transientReasonFor(text) {
|
|
7985
|
+
for (const { re, reason } of TRANSIENT_SIGNATURES) {
|
|
7986
|
+
if (re.test(text)) return reason;
|
|
7987
|
+
}
|
|
7988
|
+
return null;
|
|
7989
|
+
}
|
|
7990
|
+
var CREDENTIAL_SHAPED = /\b(gh[pousr]_[A-Za-z0-9]{16,}|github_pat_[A-Za-z0-9_]{20,}|xox[abprs]-[A-Za-z0-9-]{10,}|sk-[A-Za-z0-9]{20,}|eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}|AKIA[0-9A-Z]{16})\b/g;
|
|
7991
|
+
var MAX_MESSAGE_CHARS = 200;
|
|
7992
|
+
function redactAndBound(line) {
|
|
7993
|
+
const redacted = line.replace(CREDENTIAL_SHAPED, "<redacted>");
|
|
7994
|
+
return redacted.length > MAX_MESSAGE_CHARS ? `${redacted.slice(0, MAX_MESSAGE_CHARS - 1)}\u2026` : redacted;
|
|
7995
|
+
}
|
|
7996
|
+
function firstMeaningfulLine(stderr, stdout, fallback) {
|
|
7997
|
+
const firstLineOf = (v) => String(v ?? "").split(/\r?\n/).map((l) => l.trim()).find((l) => l.length > 0);
|
|
7998
|
+
const line = firstLineOf(stderr) ?? firstLineOf(stdout) ?? firstLineOf(fallback) ?? "";
|
|
7999
|
+
return redactAndBound(line);
|
|
8000
|
+
}
|
|
7955
8001
|
function runCliProbe(binary, args, opts = {}) {
|
|
7956
8002
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS2;
|
|
7957
8003
|
return new Promise((resolve) => {
|
|
@@ -7959,10 +8005,13 @@ function runCliProbe(binary, args, opts = {}) {
|
|
|
7959
8005
|
binary,
|
|
7960
8006
|
args,
|
|
7961
8007
|
{ timeout: timeoutMs, env: opts.env ?? process.env, windowsHide: true },
|
|
7962
|
-
(err, stdout) => {
|
|
8008
|
+
(err, stdout, stderr) => {
|
|
7963
8009
|
if (!err) {
|
|
7964
8010
|
const firstLine = String(stdout).split(/\r?\n/, 1)[0]?.trim();
|
|
7965
|
-
resolve({
|
|
8011
|
+
resolve({
|
|
8012
|
+
status: "ok",
|
|
8013
|
+
message: firstLine ? `${binary}: ${redactAndBound(firstLine)}` : `${binary}: ok`
|
|
8014
|
+
});
|
|
7966
8015
|
return;
|
|
7967
8016
|
}
|
|
7968
8017
|
const e = err;
|
|
@@ -7974,7 +8023,21 @@ function runCliProbe(binary, args, opts = {}) {
|
|
|
7974
8023
|
resolve({ status: "transient_error", message: `${binary} probe timed out after ${timeoutMs / 1e3}s` });
|
|
7975
8024
|
return;
|
|
7976
8025
|
}
|
|
7977
|
-
|
|
8026
|
+
const diagnostic = `${stderr ?? ""}
|
|
8027
|
+
${stdout ?? ""}
|
|
8028
|
+
${e.message}`;
|
|
8029
|
+
const transient = transientReasonFor(diagnostic);
|
|
8030
|
+
if (transient) {
|
|
8031
|
+
resolve({
|
|
8032
|
+
status: "transient_error",
|
|
8033
|
+
message: `${binary} probe inconclusive \u2014 ${transient}: ${firstMeaningfulLine(stderr, stdout, e.message)}`
|
|
8034
|
+
});
|
|
8035
|
+
return;
|
|
8036
|
+
}
|
|
8037
|
+
resolve({
|
|
8038
|
+
status: "down",
|
|
8039
|
+
message: `${binary} exited non-zero: ${firstMeaningfulLine(stderr, stdout, e.message)}`
|
|
8040
|
+
});
|
|
7978
8041
|
}
|
|
7979
8042
|
);
|
|
7980
8043
|
});
|
|
@@ -9353,4 +9416,4 @@ export {
|
|
|
9353
9416
|
managerInstallSystemUnitCommand,
|
|
9354
9417
|
managerUninstallSystemUnitCommand
|
|
9355
9418
|
};
|
|
9356
|
-
//# sourceMappingURL=chunk-
|
|
9419
|
+
//# sourceMappingURL=chunk-BYCE4V7Q.js.map
|