@integrity-labs/agt-cli 0.28.311 → 0.28.312
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
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
success,
|
|
39
39
|
table,
|
|
40
40
|
warn
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-HC6V57PX.js";
|
|
42
42
|
import {
|
|
43
43
|
CHANNEL_REGISTRY,
|
|
44
44
|
DEFAULT_FRAMEWORK,
|
|
@@ -4826,7 +4826,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4826
4826
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4827
4827
|
import chalk18 from "chalk";
|
|
4828
4828
|
import ora16 from "ora";
|
|
4829
|
-
var cliVersion = true ? "0.28.
|
|
4829
|
+
var cliVersion = true ? "0.28.312" : "dev";
|
|
4830
4830
|
async function fetchLatestVersion() {
|
|
4831
4831
|
const host2 = getHost();
|
|
4832
4832
|
if (!host2) return null;
|
|
@@ -5843,7 +5843,7 @@ function handleError(err) {
|
|
|
5843
5843
|
}
|
|
5844
5844
|
|
|
5845
5845
|
// src/bin/agt.ts
|
|
5846
|
-
var cliVersion2 = true ? "0.28.
|
|
5846
|
+
var cliVersion2 = true ? "0.28.312" : "dev";
|
|
5847
5847
|
var program = new Command();
|
|
5848
5848
|
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");
|
|
5849
5849
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -5900,7 +5900,7 @@ function requireHost() {
|
|
|
5900
5900
|
}
|
|
5901
5901
|
|
|
5902
5902
|
// src/lib/api-client.ts
|
|
5903
|
-
var agtCliVersion = true ? "0.28.
|
|
5903
|
+
var agtCliVersion = true ? "0.28.312" : "dev";
|
|
5904
5904
|
var lastConfigHash = null;
|
|
5905
5905
|
function setConfigHash(hash) {
|
|
5906
5906
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8199,4 +8199,4 @@ export {
|
|
|
8199
8199
|
managerInstallSystemUnitCommand,
|
|
8200
8200
|
managerUninstallSystemUnitCommand
|
|
8201
8201
|
};
|
|
8202
|
-
//# sourceMappingURL=chunk-
|
|
8202
|
+
//# sourceMappingURL=chunk-HC6V57PX.js.map
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
requireHost,
|
|
40
40
|
safeWriteJsonAtomic,
|
|
41
41
|
setConfigHash
|
|
42
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-HC6V57PX.js";
|
|
43
43
|
import {
|
|
44
44
|
getProjectDir as getProjectDir2,
|
|
45
45
|
getReadyTasks,
|
|
@@ -6997,7 +6997,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
6997
6997
|
var lastVersionCheckAt = 0;
|
|
6998
6998
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6999
6999
|
var lastResponsivenessProbeAt = 0;
|
|
7000
|
-
var agtCliVersion = true ? "0.28.
|
|
7000
|
+
var agtCliVersion = true ? "0.28.312" : "dev";
|
|
7001
7001
|
function resolveBrewPath(execFileSync2) {
|
|
7002
7002
|
try {
|
|
7003
7003
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -10442,31 +10442,38 @@ async function processAgent(agent, agentStates) {
|
|
|
10442
10442
|
);
|
|
10443
10443
|
stuckKanbanLogged.add(stuckKey);
|
|
10444
10444
|
}
|
|
10445
|
-
log(`Stale task: '${item.title}' (id=${item.id}) in_progress for ${age}m \u2014
|
|
10445
|
+
log(`Stale task: '${item.title}' (id=${item.id}) in_progress for ${age}m \u2014 reaping for '${agent.code_name}'`);
|
|
10446
10446
|
alertedStaleItems.add(`${agent.code_name}:${item.id}`);
|
|
10447
|
+
let reapAction = null;
|
|
10447
10448
|
try {
|
|
10448
|
-
const
|
|
10449
|
+
const reapResult = await api.post("/host/kanban/reap-stale", {
|
|
10449
10450
|
agent_id: agentId,
|
|
10450
|
-
|
|
10451
|
+
item_id: item.id,
|
|
10452
|
+
reason: `Timed out \u2014 in progress for ${age} minutes with no update`
|
|
10451
10453
|
});
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
+
reapAction = reapResult.action ?? null;
|
|
10455
|
+
log(
|
|
10456
|
+
`Reap result for '${item.title}': updated=${reapResult.updated} action=${reapResult.action ?? reapResult.reason ?? "none"}`
|
|
10457
|
+
);
|
|
10458
|
+
if (reapAction === "dead_letter" && ((reapResult.updated ?? 0) > 0 || reapResult.ok === true)) {
|
|
10454
10459
|
freshDoneIds.add(item.id);
|
|
10455
10460
|
}
|
|
10456
10461
|
} catch (err) {
|
|
10457
|
-
log(`
|
|
10462
|
+
log(`Reap API error for '${item.title}': ${err.message}`);
|
|
10458
10463
|
}
|
|
10459
|
-
|
|
10464
|
+
if (reapAction === "dead_letter") {
|
|
10465
|
+
const message = `\u26A0\uFE0F Task Stalled \u2014 ${displayName}
|
|
10460
10466
|
${item.title}
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10467
|
+
Stalled repeatedly (last: ${age} minutes with no update) and has been retried as far as it goes \u2014 it now needs a look.`;
|
|
10468
|
+
if (item.notify_channel && item.notify_to) {
|
|
10469
|
+
sendTaskNotification(agent.code_name, item.notify_channel, item.notify_to, message).catch(() => {
|
|
10470
|
+
});
|
|
10471
|
+
}
|
|
10472
|
+
sendSlackWebhookMessage(`\u26A0\uFE0F *Task Stalled* \u2014 *${displayName}*
|
|
10473
|
+
*${item.title}*
|
|
10474
|
+
Retried to the limit after repeated stalls \u2014 needs a look.`).catch(() => {
|
|
10464
10475
|
});
|
|
10465
10476
|
}
|
|
10466
|
-
sendSlackWebhookMessage(`\u23F3 *Task Timed Out* \u2014 *${displayName}*
|
|
10467
|
-
*${item.title}*
|
|
10468
|
-
In progress for ${age} minutes \u2014 auto-failed`).catch(() => {
|
|
10469
|
-
});
|
|
10470
10477
|
}
|
|
10471
10478
|
}
|
|
10472
10479
|
const prefix = `${agent.code_name}:`;
|