@integrity-labs/agt-cli 0.27.124 → 0.27.125
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
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
success,
|
|
29
29
|
table,
|
|
30
30
|
warn
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-QHKJELRV.js";
|
|
32
32
|
import {
|
|
33
33
|
CHANNEL_REGISTRY,
|
|
34
34
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -4934,7 +4934,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4934
4934
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4935
4935
|
import chalk18 from "chalk";
|
|
4936
4936
|
import ora16 from "ora";
|
|
4937
|
-
var cliVersion = true ? "0.27.
|
|
4937
|
+
var cliVersion = true ? "0.27.125" : "dev";
|
|
4938
4938
|
async function fetchLatestVersion() {
|
|
4939
4939
|
const host2 = getHost();
|
|
4940
4940
|
if (!host2) return null;
|
|
@@ -5857,7 +5857,7 @@ function handleError(err) {
|
|
|
5857
5857
|
}
|
|
5858
5858
|
|
|
5859
5859
|
// src/bin/agt.ts
|
|
5860
|
-
var cliVersion2 = true ? "0.27.
|
|
5860
|
+
var cliVersion2 = true ? "0.27.125" : "dev";
|
|
5861
5861
|
var program = new Command();
|
|
5862
5862
|
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");
|
|
5863
5863
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
provisionStopHook,
|
|
18
18
|
requireHost,
|
|
19
19
|
safeWriteJsonAtomic
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-QHKJELRV.js";
|
|
21
21
|
import {
|
|
22
22
|
getProjectDir as getProjectDir2,
|
|
23
23
|
getReadyTasks,
|
|
@@ -3974,6 +3974,20 @@ function recordConfigChurnEvent(agentId, codeName, channel, signature) {
|
|
|
3974
3974
|
);
|
|
3975
3975
|
});
|
|
3976
3976
|
}
|
|
3977
|
+
async function reportReaperEvent(agentId, reaper, action, reason) {
|
|
3978
|
+
try {
|
|
3979
|
+
await api.post("/host/reaper-event", {
|
|
3980
|
+
agent_id: agentId,
|
|
3981
|
+
reaper,
|
|
3982
|
+
action,
|
|
3983
|
+
reason
|
|
3984
|
+
});
|
|
3985
|
+
} catch (err) {
|
|
3986
|
+
log(
|
|
3987
|
+
`[${reaper}] failed to report reaper-event (ENG-6184): ${err.message} \u2014 local reap still proceeded; the alert may be missed`
|
|
3988
|
+
);
|
|
3989
|
+
}
|
|
3990
|
+
}
|
|
3977
3991
|
function recordRestartForBreaker(codeName, reason) {
|
|
3978
3992
|
const result = restartBreaker.record(codeName, reason);
|
|
3979
3993
|
if (!result.tripped || !result.trip) return;
|
|
@@ -4424,7 +4438,7 @@ var cachedMaintenanceWindow = null;
|
|
|
4424
4438
|
var lastVersionCheckAt = 0;
|
|
4425
4439
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
4426
4440
|
var lastResponsivenessProbeAt = 0;
|
|
4427
|
-
var agtCliVersion = true ? "0.27.
|
|
4441
|
+
var agtCliVersion = true ? "0.27.125" : "dev";
|
|
4428
4442
|
function resolveBrewPath(execFileSync4) {
|
|
4429
4443
|
try {
|
|
4430
4444
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -7550,6 +7564,12 @@ async function processAgent(agent, agentStates) {
|
|
|
7550
7564
|
`[mcp-presence-reaper] failed to record restart event for '${codeName}' (ENG-5286): ${err.message} \u2014 local restart still proceeded; CloudWatch metric will under-count this event`
|
|
7551
7565
|
);
|
|
7552
7566
|
});
|
|
7567
|
+
void reportReaperEvent(
|
|
7568
|
+
agent.agent_id,
|
|
7569
|
+
"mcp-presence-reaper",
|
|
7570
|
+
"restart",
|
|
7571
|
+
givenUpKeys.length > 0 ? `restarted session; MCP server(s) still down after restart budget: ${givenUpKeys.join(", ")}` : `restarted session to recover MCP server(s): ${activeKeys.join(", ")}`
|
|
7572
|
+
);
|
|
7553
7573
|
},
|
|
7554
7574
|
// ENG-5932: classify each declared key for the quarantine path. Reads a
|
|
7555
7575
|
// server-declared criticality field off the .mcp.json entry when
|
|
@@ -7580,6 +7600,12 @@ async function processAgent(agent, agentStates) {
|
|
|
7580
7600
|
log(
|
|
7581
7601
|
`[channel-quarantine] persisted quarantine marker for '${codeName}:${serverKey}' \u2014 will be dropped from .mcp.json on next provisioning poll (ENG-5932)`
|
|
7582
7602
|
);
|
|
7603
|
+
void reportReaperEvent(
|
|
7604
|
+
agent.agent_id,
|
|
7605
|
+
"mcp-presence-reaper",
|
|
7606
|
+
"quarantine",
|
|
7607
|
+
`optional channel '${serverKey}' dead past restart budget + dwell \u2014 quarantined`
|
|
7608
|
+
);
|
|
7583
7609
|
}
|
|
7584
7610
|
}
|
|
7585
7611
|
});
|