@integrity-labs/agt-cli 0.28.852 → 0.28.853
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-6BA2US4B.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5467
5467
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5468
5468
|
import chalk18 from "chalk";
|
|
5469
5469
|
import ora16 from "ora";
|
|
5470
|
-
var cliVersion = true ? "0.28.
|
|
5470
|
+
var cliVersion = true ? "0.28.853" : "dev";
|
|
5471
5471
|
async function fetchLatestVersion() {
|
|
5472
5472
|
const host2 = getHost();
|
|
5473
5473
|
if (!host2) return null;
|
|
@@ -6658,7 +6658,7 @@ function handleError(err) {
|
|
|
6658
6658
|
}
|
|
6659
6659
|
|
|
6660
6660
|
// src/bin/agt.ts
|
|
6661
|
-
var cliVersion2 = true ? "0.28.
|
|
6661
|
+
var cliVersion2 = true ? "0.28.853" : "dev";
|
|
6662
6662
|
var program = new Command();
|
|
6663
6663
|
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");
|
|
6664
6664
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -6566,7 +6566,7 @@ function exchangeFailureKind(err) {
|
|
|
6566
6566
|
}
|
|
6567
6567
|
|
|
6568
6568
|
// src/lib/api-client.ts
|
|
6569
|
-
var agtCliVersion = true ? "0.28.
|
|
6569
|
+
var agtCliVersion = true ? "0.28.853" : "dev";
|
|
6570
6570
|
var lastConfigHash = null;
|
|
6571
6571
|
function setConfigHash(hash) {
|
|
6572
6572
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10924,4 +10924,4 @@ export {
|
|
|
10924
10924
|
managerInstallSystemUnitCommand,
|
|
10925
10925
|
managerUninstallSystemUnitCommand
|
|
10926
10926
|
};
|
|
10927
|
-
//# sourceMappingURL=chunk-
|
|
10927
|
+
//# sourceMappingURL=chunk-6BA2US4B.js.map
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
safeWriteJsonAtomic,
|
|
61
61
|
setConfigHash,
|
|
62
62
|
tripClass
|
|
63
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-6BA2US4B.js";
|
|
64
64
|
import {
|
|
65
65
|
getProjectDir as getProjectDir2,
|
|
66
66
|
getReadyTasks,
|
|
@@ -11222,6 +11222,10 @@ function decideWedgeRestart(input, config2) {
|
|
|
11222
11222
|
if (!isWedgeCandidateCycle(input, config2)) return "none";
|
|
11223
11223
|
return input.consecutiveWedgeCycles >= config2.minCycles ? "wedged" : "none";
|
|
11224
11224
|
}
|
|
11225
|
+
function shouldForceFreshOnManualRestart(consecutiveWedgeCycles2, config2) {
|
|
11226
|
+
if (config2.mode === "off") return false;
|
|
11227
|
+
return consecutiveWedgeCycles2 >= config2.minCycles;
|
|
11228
|
+
}
|
|
11225
11229
|
|
|
11226
11230
|
// src/lib/wedge-poison-card.ts
|
|
11227
11231
|
var DEFAULTS2 = {
|
|
@@ -13664,7 +13668,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13664
13668
|
var lastVersionCheckAt = 0;
|
|
13665
13669
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13666
13670
|
var lastResponsivenessProbeAt = 0;
|
|
13667
|
-
var agtCliVersion = true ? "0.28.
|
|
13671
|
+
var agtCliVersion = true ? "0.28.853" : "dev";
|
|
13668
13672
|
function resolveBrewPath(execFileSync2) {
|
|
13669
13673
|
try {
|
|
13670
13674
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -20046,6 +20050,24 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
20046
20050
|
const refreshData = await fetchSpawnRefreshData(agentId, codeName, "restart-lane");
|
|
20047
20051
|
if (!refreshData) return;
|
|
20048
20052
|
const displayName = refreshData.agent?.display_name ?? codeName;
|
|
20053
|
+
const wedgeStreakAtRestart = consecutiveWedgeCycles.get(codeName) ?? 0;
|
|
20054
|
+
if (shouldForceFreshOnManualRestart(wedgeStreakAtRestart, resolveWedgeConfig())) {
|
|
20055
|
+
try {
|
|
20056
|
+
const freshId = rotateSessionForWedge(codeName);
|
|
20057
|
+
consecutiveWedgeCycles.delete(codeName);
|
|
20058
|
+
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-NGWO3JK3.js");
|
|
20059
|
+
const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
|
|
20060
|
+
const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
|
|
20061
|
+
const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
|
|
20062
|
+
log(
|
|
20063
|
+
`[restart-lane] '${codeName}' reads wedged (cycles=${wedgeStreakAtRestart}) \u2014 forcing a FRESH session ${freshId} instead of resuming the wedged transcript (transcript preserved${parkNote}${deadNote}) (CS-1680)`
|
|
20064
|
+
);
|
|
20065
|
+
} catch (err) {
|
|
20066
|
+
log(
|
|
20067
|
+
`[restart-lane] force-fresh failed for '${codeName}': ${err.message} \u2014 continuing with a normal respawn (CS-1680)`
|
|
20068
|
+
);
|
|
20069
|
+
}
|
|
20070
|
+
}
|
|
20049
20071
|
const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
|
|
20050
20072
|
if (restartTargetsOpencodeServe(framework)) {
|
|
20051
20073
|
stopOpencodeSession(codeName, log);
|