@integrity-labs/agt-cli 0.28.31 → 0.28.32
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
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
success,
|
|
34
34
|
table,
|
|
35
35
|
warn
|
|
36
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-KJVDXL3L.js";
|
|
37
37
|
import {
|
|
38
38
|
CHANNEL_REGISTRY,
|
|
39
39
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -4773,7 +4773,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4773
4773
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4774
4774
|
import chalk18 from "chalk";
|
|
4775
4775
|
import ora16 from "ora";
|
|
4776
|
-
var cliVersion = true ? "0.28.
|
|
4776
|
+
var cliVersion = true ? "0.28.32" : "dev";
|
|
4777
4777
|
async function fetchLatestVersion() {
|
|
4778
4778
|
const host2 = getHost();
|
|
4779
4779
|
if (!host2) return null;
|
|
@@ -5696,7 +5696,7 @@ function handleError(err) {
|
|
|
5696
5696
|
}
|
|
5697
5697
|
|
|
5698
5698
|
// src/bin/agt.ts
|
|
5699
|
-
var cliVersion2 = true ? "0.28.
|
|
5699
|
+
var cliVersion2 = true ? "0.28.32" : "dev";
|
|
5700
5700
|
var program = new Command();
|
|
5701
5701
|
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");
|
|
5702
5702
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -7266,7 +7266,7 @@ function requireHost() {
|
|
|
7266
7266
|
}
|
|
7267
7267
|
|
|
7268
7268
|
// src/lib/api-client.ts
|
|
7269
|
-
var agtCliVersion = true ? "0.28.
|
|
7269
|
+
var agtCliVersion = true ? "0.28.32" : "dev";
|
|
7270
7270
|
var cachedExchange = null;
|
|
7271
7271
|
var exchangeInFlight = null;
|
|
7272
7272
|
function invalidateExchange() {
|
|
@@ -8317,4 +8317,4 @@ export {
|
|
|
8317
8317
|
managerInstallSystemUnitCommand,
|
|
8318
8318
|
managerUninstallSystemUnitCommand
|
|
8319
8319
|
};
|
|
8320
|
-
//# sourceMappingURL=chunk-
|
|
8320
|
+
//# sourceMappingURL=chunk-KJVDXL3L.js.map
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
provisionStopHook,
|
|
23
23
|
requireHost,
|
|
24
24
|
safeWriteJsonAtomic
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-KJVDXL3L.js";
|
|
26
26
|
import {
|
|
27
27
|
getProjectDir as getProjectDir2,
|
|
28
28
|
getReadyTasks,
|
|
@@ -5489,6 +5489,8 @@ var AUTO_RESUME_SELF_WINDOW_MS = 12e4;
|
|
|
5489
5489
|
var autoResumeLoggedSkips = /* @__PURE__ */ new Map();
|
|
5490
5490
|
var autoResumeStandDowns = /* @__PURE__ */ new Set();
|
|
5491
5491
|
var dependencyRecoveryLedger = new DependencyRecoveryLedger();
|
|
5492
|
+
var unstableLatchUnreported = /* @__PURE__ */ new Set();
|
|
5493
|
+
var unstableLatchReportInFlight = /* @__PURE__ */ new Set();
|
|
5492
5494
|
var killPausedCodeNames = /* @__PURE__ */ new Set();
|
|
5493
5495
|
var BACK_ONLINE_GREETING_GUIDANCE = " When you reconnect, if you tell anyone you are back, start that message with a \u{1F44B} wave emoji and do not use a \u{1F7E2} green-light emoji.";
|
|
5494
5496
|
function maybeAutoResume(agent) {
|
|
@@ -5556,13 +5558,34 @@ function logResumeReconcileHoldOnce(codeName, trippedAt, reason, detail) {
|
|
|
5556
5558
|
log(`[resume-reconciler] agent=${codeName} decision=hold reason=${reason}${detail ? ` (${detail})` : ""} (ENG-6383)`);
|
|
5557
5559
|
}
|
|
5558
5560
|
}
|
|
5561
|
+
function reportUnstableLatch(agent, trippedAt, standDownKey) {
|
|
5562
|
+
if (unstableLatchReportInFlight.has(standDownKey)) return;
|
|
5563
|
+
unstableLatchReportInFlight.add(standDownKey);
|
|
5564
|
+
void api.post("/host/circuit-breaker/unstable-latch", {
|
|
5565
|
+
agent_id: agent.agent_id,
|
|
5566
|
+
tripped_at: new Date(trippedAt).toISOString()
|
|
5567
|
+
}).then(() => {
|
|
5568
|
+
unstableLatchUnreported.delete(standDownKey);
|
|
5569
|
+
}).catch((err) => {
|
|
5570
|
+
log(
|
|
5571
|
+
`[resume-reconciler] agent=${agent.code_name} unstable-latch report failed (will retry next poll): ${err.message} (ENG-6392)`
|
|
5572
|
+
);
|
|
5573
|
+
}).finally(() => {
|
|
5574
|
+
unstableLatchReportInFlight.delete(standDownKey);
|
|
5575
|
+
});
|
|
5576
|
+
}
|
|
5559
5577
|
async function maybeResumeReconcile(agent) {
|
|
5560
5578
|
const codeName = agent.code_name;
|
|
5561
5579
|
if (autoResumeInFlight.has(codeName)) return;
|
|
5562
5580
|
const trip = restartBreaker.getTrip(codeName);
|
|
5563
5581
|
if (!trip) return;
|
|
5564
5582
|
const standDownKey = `${codeName}:${trip.trippedAt}`;
|
|
5565
|
-
if (autoResumeStandDowns.has(standDownKey))
|
|
5583
|
+
if (autoResumeStandDowns.has(standDownKey)) {
|
|
5584
|
+
if (unstableLatchUnreported.has(standDownKey)) {
|
|
5585
|
+
reportUnstableLatch(agent, trip.trippedAt, standDownKey);
|
|
5586
|
+
}
|
|
5587
|
+
return;
|
|
5588
|
+
}
|
|
5566
5589
|
autoResumeInFlight.add(codeName);
|
|
5567
5590
|
try {
|
|
5568
5591
|
const config2 = { ...readResumeReconcilerConfig(), enabled: hostFlagStore().getBoolean("resume-reconciler") };
|
|
@@ -5605,6 +5628,8 @@ async function maybeResumeReconcile(agent) {
|
|
|
5605
5628
|
`[resume-reconciler] agent=${codeName} decision=latch-unstable \u2014 auto-resumed once then re-tripped within the backoff window; latching to mandatory-manual (NOT resuming; restart counter untouched; agent stays paused with its circuit-breaker alert open) (ENG-6383)`
|
|
5606
5629
|
);
|
|
5607
5630
|
}
|
|
5631
|
+
unstableLatchUnreported.add(standDownKey);
|
|
5632
|
+
reportUnstableLatch(agent, trippedAt, standDownKey);
|
|
5608
5633
|
return;
|
|
5609
5634
|
}
|
|
5610
5635
|
log(
|
|
@@ -6146,7 +6171,7 @@ var cachedMaintenanceWindow = null;
|
|
|
6146
6171
|
var lastVersionCheckAt = 0;
|
|
6147
6172
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6148
6173
|
var lastResponsivenessProbeAt = 0;
|
|
6149
|
-
var agtCliVersion = true ? "0.28.
|
|
6174
|
+
var agtCliVersion = true ? "0.28.32" : "dev";
|
|
6150
6175
|
function resolveBrewPath(execFileSync4) {
|
|
6151
6176
|
try {
|
|
6152
6177
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|