@integrity-labs/agt-cli 0.28.971 → 0.28.973
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-
|
|
43
|
+
} from "../chunk-FTEQGZHK.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
@@ -5471,7 +5471,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5471
5471
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5472
5472
|
import chalk18 from "chalk";
|
|
5473
5473
|
import ora16 from "ora";
|
|
5474
|
-
var cliVersion = true ? "0.28.
|
|
5474
|
+
var cliVersion = true ? "0.28.973" : "dev";
|
|
5475
5475
|
async function fetchLatestVersion() {
|
|
5476
5476
|
const host2 = getHost();
|
|
5477
5477
|
if (!host2) return null;
|
|
@@ -6731,7 +6731,7 @@ function handleError(err) {
|
|
|
6731
6731
|
}
|
|
6732
6732
|
|
|
6733
6733
|
// src/bin/agt.ts
|
|
6734
|
-
var cliVersion2 = true ? "0.28.
|
|
6734
|
+
var cliVersion2 = true ? "0.28.973" : "dev";
|
|
6735
6735
|
var program = new Command();
|
|
6736
6736
|
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");
|
|
6737
6737
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -6967,7 +6967,7 @@ function exchangeFailureKind(err) {
|
|
|
6967
6967
|
}
|
|
6968
6968
|
|
|
6969
6969
|
// src/lib/api-client.ts
|
|
6970
|
-
var agtCliVersion = true ? "0.28.
|
|
6970
|
+
var agtCliVersion = true ? "0.28.973" : "dev";
|
|
6971
6971
|
var lastConfigHash = null;
|
|
6972
6972
|
function setConfigHash(hash) {
|
|
6973
6973
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -9453,10 +9453,41 @@ function redactAndBound(line) {
|
|
|
9453
9453
|
return redacted.length > MAX_MESSAGE_CHARS ? `${redacted.slice(0, MAX_MESSAGE_CHARS - 1)}\u2026` : redacted;
|
|
9454
9454
|
}
|
|
9455
9455
|
function firstMeaningfulLine(stderr, stdout, fallback) {
|
|
9456
|
-
const
|
|
9457
|
-
const line = firstLineOf(stderr) ?? firstLineOf(stdout) ?? firstLineOf(fallback) ?? "";
|
|
9456
|
+
const line = firstReasonLine(stderr, "failure") ?? firstReasonLine(stdout, "failure") ?? firstReasonLine(fallback, "failure") ?? "";
|
|
9458
9457
|
return redactAndBound(line);
|
|
9459
9458
|
}
|
|
9459
|
+
function firstReasonLine(v, lane = "ok") {
|
|
9460
|
+
const contradicts = lane === "failure" ? GH_SUCCESS_MARKER : GH_FAILURE_MARKER;
|
|
9461
|
+
const agrees = lane === "failure" ? GH_FAILURE_MARKER : GH_SUCCESS_MARKER;
|
|
9462
|
+
const lines = String(v ?? "").split(/\r?\n/);
|
|
9463
|
+
for (let i = 0; i < lines.length; i++) {
|
|
9464
|
+
const raw = lines[i] ?? "";
|
|
9465
|
+
const trimmed = raw.trim();
|
|
9466
|
+
if (trimmed.length === 0) continue;
|
|
9467
|
+
const next = (lines[i + 1] ?? "").replace(/\r$/, "");
|
|
9468
|
+
const indent = raw.length - raw.replace(/^\s+/, "").length;
|
|
9469
|
+
const nextIndent = next.length - next.replace(/^\s+/, "").length;
|
|
9470
|
+
const detailFollows = /^\s+\S/.test(next) && nextIndent > indent;
|
|
9471
|
+
const looksLikeHeading = indent === 0 && /^[A-Za-z0-9][A-Za-z0-9.-]*$/.test(trimmed);
|
|
9472
|
+
if (detailFollows && looksLikeHeading) {
|
|
9473
|
+
const under = lines.slice(i + 1).find((l) => l.trim().length > 0)?.trim();
|
|
9474
|
+
const marked2 = under !== void 0 && contradicts.test(under) ? firstLineMarked(lines, i + 1, agrees) : void 0;
|
|
9475
|
+
return marked2 ?? under ?? trimmed;
|
|
9476
|
+
}
|
|
9477
|
+
const marked = contradicts.test(trimmed) ? firstLineMarked(lines, i, agrees) : void 0;
|
|
9478
|
+
return marked ?? trimmed;
|
|
9479
|
+
}
|
|
9480
|
+
return void 0;
|
|
9481
|
+
}
|
|
9482
|
+
var GH_SUCCESS_MARKER = /^(?:\u2713|\u2714)\s+\S/;
|
|
9483
|
+
var GH_FAILURE_MARKER = /^(?:\u2717|\u2718|X)\s+\S/;
|
|
9484
|
+
function firstLineMarked(lines, from, marker) {
|
|
9485
|
+
for (let i = from; i < lines.length; i++) {
|
|
9486
|
+
const trimmed = (lines[i] ?? "").trim();
|
|
9487
|
+
if (marker.test(trimmed)) return trimmed;
|
|
9488
|
+
}
|
|
9489
|
+
return void 0;
|
|
9490
|
+
}
|
|
9460
9491
|
function logSearchedPath(binary, env, why) {
|
|
9461
9492
|
console.warn(
|
|
9462
9493
|
`[connectivity-probe] ${binary} did not run (${why}). PATH searched: ${effectiveSearchPath(env)}`
|
|
@@ -9480,7 +9511,7 @@ function runCliProbe(binary, args, opts = {}) {
|
|
|
9480
9511
|
{ timeout: timeoutMs, env: childEnv, windowsHide: true },
|
|
9481
9512
|
(err, stdout, stderr) => {
|
|
9482
9513
|
if (!err) {
|
|
9483
|
-
const firstLine =
|
|
9514
|
+
const firstLine = firstReasonLine(stdout, "ok");
|
|
9484
9515
|
resolve({
|
|
9485
9516
|
status: "ok",
|
|
9486
9517
|
message: firstLine ? `${binary}: ${redactAndBound(firstLine)}` : `${binary}: ok`
|
|
@@ -11678,4 +11709,4 @@ export {
|
|
|
11678
11709
|
managerInstallSystemUnitCommand,
|
|
11679
11710
|
managerUninstallSystemUnitCommand
|
|
11680
11711
|
};
|
|
11681
|
-
//# sourceMappingURL=chunk-
|
|
11712
|
+
//# sourceMappingURL=chunk-FTEQGZHK.js.map
|