@integrity-labs/agt-cli 0.28.566 → 0.28.568
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 +4 -4
- package/dist/{chunk-2DEE3OVI.js → chunk-FSWAPB5J.js} +11 -2
- package/dist/chunk-FSWAPB5J.js.map +1 -0
- package/dist/{chunk-IEYDYCXL.js → chunk-VGMO43EI.js} +3 -3
- package/dist/{claude-pair-runtime-6AOWAYHH.js → claude-pair-runtime-4C5NQQHR.js} +2 -2
- package/dist/lib/manager-worker.js +40 -23
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-CI37H442.js → persistent-session-DVTSZAPE.js} +2 -2
- package/dist/{responsiveness-probe-O33QL25H.js → responsiveness-probe-KEFPJXQ6.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-2DEE3OVI.js.map +0 -1
- /package/dist/{chunk-IEYDYCXL.js.map → chunk-VGMO43EI.js.map} +0 -0
- /package/dist/{claude-pair-runtime-6AOWAYHH.js.map → claude-pair-runtime-4C5NQQHR.js.map} +0 -0
- /package/dist/{persistent-session-CI37H442.js.map → persistent-session-DVTSZAPE.js.map} +0 -0
- /package/dist/{responsiveness-probe-O33QL25H.js.map → responsiveness-probe-KEFPJXQ6.js.map} +0 -0
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
resolveConnectivityProbe,
|
|
47
47
|
worseConnectivityOutcome,
|
|
48
48
|
wrapScheduledTaskPrompt
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-FSWAPB5J.js";
|
|
50
50
|
import {
|
|
51
51
|
parsePsRows
|
|
52
52
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -5646,7 +5646,7 @@ function exchangeFailureKind(err) {
|
|
|
5646
5646
|
}
|
|
5647
5647
|
|
|
5648
5648
|
// src/lib/api-client.ts
|
|
5649
|
-
var agtCliVersion = true ? "0.28.
|
|
5649
|
+
var agtCliVersion = true ? "0.28.568" : "dev";
|
|
5650
5650
|
var lastConfigHash = null;
|
|
5651
5651
|
function setConfigHash(hash) {
|
|
5652
5652
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -9011,4 +9011,4 @@ export {
|
|
|
9011
9011
|
managerInstallSystemUnitCommand,
|
|
9012
9012
|
managerUninstallSystemUnitCommand
|
|
9013
9013
|
};
|
|
9014
|
-
//# sourceMappingURL=chunk-
|
|
9014
|
+
//# sourceMappingURL=chunk-VGMO43EI.js.map
|
|
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
|
|
|
100
100
|
return { ok: true };
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
103
|
+
const { resolveClaudeBinary } = await import("./persistent-session-DVTSZAPE.js");
|
|
104
104
|
const claudeBin = resolveClaudeBinary();
|
|
105
105
|
const pairEnv = {
|
|
106
106
|
...process.env,
|
|
@@ -373,4 +373,4 @@ export {
|
|
|
373
373
|
startClaudePair,
|
|
374
374
|
submitClaudePairCode
|
|
375
375
|
};
|
|
376
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
376
|
+
//# sourceMappingURL=claude-pair-runtime-4C5NQQHR.js.map
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
safeWriteJsonAtomic,
|
|
54
54
|
setConfigHash,
|
|
55
55
|
tripClass
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-VGMO43EI.js";
|
|
57
57
|
import {
|
|
58
58
|
getProjectDir as getProjectDir2,
|
|
59
59
|
getReadyTasks,
|
|
@@ -182,7 +182,7 @@ import {
|
|
|
182
182
|
toOpencodeModel,
|
|
183
183
|
transcriptActivityAgeSeconds,
|
|
184
184
|
writeEgressAllowlist
|
|
185
|
-
} from "../chunk-
|
|
185
|
+
} from "../chunk-FSWAPB5J.js";
|
|
186
186
|
import {
|
|
187
187
|
reapOrphanChannelMcps
|
|
188
188
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -10678,6 +10678,23 @@ function cancelPendingSessionRestart(codeName) {
|
|
|
10678
10678
|
log(`[hot-reload] Cancelled pending restart timer for '${codeName}' (another teardown path is handling it)`);
|
|
10679
10679
|
}
|
|
10680
10680
|
var lastSpawnOutcomeByAgent = /* @__PURE__ */ new Map();
|
|
10681
|
+
var lastSpawnDecisionByAgent = /* @__PURE__ */ new Map();
|
|
10682
|
+
function recordSpawnOutcome(codeName, result) {
|
|
10683
|
+
lastSpawnOutcomeByAgent.set(codeName, {
|
|
10684
|
+
spawnAttempted: result.spawnAttempted,
|
|
10685
|
+
sessionHealthyAfter: result.sessionHealthyAfter
|
|
10686
|
+
});
|
|
10687
|
+
if (result.decision) lastSpawnDecisionByAgent.set(codeName, result.decision);
|
|
10688
|
+
}
|
|
10689
|
+
function spawnOutcomeForDiagnostics(codeName) {
|
|
10690
|
+
const last = lastSpawnOutcomeByAgent.get(codeName);
|
|
10691
|
+
if (!last) return void 0;
|
|
10692
|
+
return {
|
|
10693
|
+
spawnAttempted: last.spawnAttempted,
|
|
10694
|
+
sessionHealthyAfter: last.sessionHealthyAfter,
|
|
10695
|
+
lastDecision: lastSpawnDecisionByAgent.get(codeName) ?? null
|
|
10696
|
+
};
|
|
10697
|
+
}
|
|
10681
10698
|
function spawnWasRefusedWithNoSession(codeName) {
|
|
10682
10699
|
const last = lastSpawnOutcomeByAgent.get(codeName);
|
|
10683
10700
|
if (!last) return false;
|
|
@@ -11373,7 +11390,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
11373
11390
|
var lastVersionCheckAt = 0;
|
|
11374
11391
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
11375
11392
|
var lastResponsivenessProbeAt = 0;
|
|
11376
|
-
var agtCliVersion = true ? "0.28.
|
|
11393
|
+
var agtCliVersion = true ? "0.28.568" : "dev";
|
|
11377
11394
|
function resolveBrewPath(execFileSync2) {
|
|
11378
11395
|
try {
|
|
11379
11396
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -12680,10 +12697,10 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
12680
12697
|
if (codeNames.length === 0) return;
|
|
12681
12698
|
void (async () => {
|
|
12682
12699
|
try {
|
|
12683
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
12700
|
+
const { collectDiagnostics } = await import("../persistent-session-DVTSZAPE.js");
|
|
12684
12701
|
await api.post("/host/heartbeat", {
|
|
12685
12702
|
host_id: hostId,
|
|
12686
|
-
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
|
|
12703
|
+
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics)
|
|
12687
12704
|
});
|
|
12688
12705
|
} catch (err) {
|
|
12689
12706
|
log(`[restart] post-respawn diagnostics flush failed: ${err.message}`);
|
|
@@ -12788,9 +12805,9 @@ async function pollCycle() {
|
|
|
12788
12805
|
}
|
|
12789
12806
|
try {
|
|
12790
12807
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
12791
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
12808
|
+
const { collectDiagnostics } = await import("../persistent-session-DVTSZAPE.js");
|
|
12792
12809
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
12793
|
-
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
|
|
12810
|
+
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics) : void 0;
|
|
12794
12811
|
let tailscaleHostname;
|
|
12795
12812
|
try {
|
|
12796
12813
|
const { execSync: es } = await import("child_process");
|
|
@@ -12911,7 +12928,7 @@ async function pollCycle() {
|
|
|
12911
12928
|
collectPanelessActivityProbes,
|
|
12912
12929
|
getResponsivenessIntervalMs,
|
|
12913
12930
|
occupancyQualificationClassifications
|
|
12914
|
-
} = await import("../responsiveness-probe-
|
|
12931
|
+
} = await import("../responsiveness-probe-KEFPJXQ6.js");
|
|
12915
12932
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
12916
12933
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
12917
12934
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -13002,7 +13019,7 @@ async function pollCycle() {
|
|
|
13002
13019
|
collectResponsivenessProbes,
|
|
13003
13020
|
livePendingInboundOldestAgeSeconds,
|
|
13004
13021
|
parkPendingInbound
|
|
13005
|
-
} = await import("../responsiveness-probe-
|
|
13022
|
+
} = await import("../responsiveness-probe-KEFPJXQ6.js");
|
|
13006
13023
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
13007
13024
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
13008
13025
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -15305,10 +15322,7 @@ async function processAgent(agent, agentStates) {
|
|
|
15305
15322
|
log(
|
|
15306
15323
|
`[persistent-session-decision] agent=${agent.code_name} decision=${psResult.decision} spawn_attempted=${psResult.spawnAttempted} session_healthy_after=${psResult.sessionHealthyAfter}${detailSuffix}`
|
|
15307
15324
|
);
|
|
15308
|
-
|
|
15309
|
-
spawnAttempted: psResult.spawnAttempted,
|
|
15310
|
-
sessionHealthyAfter: psResult.sessionHealthyAfter
|
|
15311
|
-
});
|
|
15325
|
+
recordSpawnOutcome(agent.code_name, psResult);
|
|
15312
15326
|
const stuck = persistentSessionStuckTracker.record({
|
|
15313
15327
|
codeName: agent.code_name,
|
|
15314
15328
|
sessionHealthy: psResult.sessionHealthyAfter,
|
|
@@ -15635,7 +15649,7 @@ async function processAgent(agent, agentStates) {
|
|
|
15635
15649
|
if (newlyDone.length > 0) {
|
|
15636
15650
|
const displayName = agentState.agentDisplayNames.get(agent.code_name) ?? agent.code_name;
|
|
15637
15651
|
for (const item of newlyDone) {
|
|
15638
|
-
log(`Newly done:
|
|
15652
|
+
log(`Newly done: item_id=${item.id} notify_channel=${item.notify_channel ?? "none"} notify_to=${item.notify_to ?? "none"}`);
|
|
15639
15653
|
if (item.notify_channel && item.notify_to) {
|
|
15640
15654
|
const message = await buildDoneCardNotification(agentId, agent.code_name, displayName, item);
|
|
15641
15655
|
sendTaskNotification(agent.code_name, item.notify_channel, item.notify_to, message).catch((err) => {
|
|
@@ -15701,11 +15715,11 @@ async function processAgent(agent, agentStates) {
|
|
|
15701
15715
|
const stuckKey = `${agent.code_name}:${item.id}`;
|
|
15702
15716
|
if (!stuckKanbanLogged.has(stuckKey)) {
|
|
15703
15717
|
log(
|
|
15704
|
-
`[persistent-session-stuck-kanban] agent=${agent.code_name} item_id=${item.id}
|
|
15718
|
+
`[persistent-session-stuck-kanban] agent=${agent.code_name} item_id=${item.id} status=in_progress age_minutes=${age} threshold_minutes=${Math.round(STALE_TASK_THRESHOLD_MS / 6e4)}`
|
|
15705
15719
|
);
|
|
15706
15720
|
stuckKanbanLogged.add(stuckKey);
|
|
15707
15721
|
}
|
|
15708
|
-
log(`Stale task:
|
|
15722
|
+
log(`Stale task: item_id=${item.id} in_progress for ${age}m \u2014 reaping for '${agent.code_name}'`);
|
|
15709
15723
|
alertedStaleItems.add(`${agent.code_name}:${item.id}`);
|
|
15710
15724
|
let reapAction = null;
|
|
15711
15725
|
try {
|
|
@@ -15716,13 +15730,14 @@ async function processAgent(agent, agentStates) {
|
|
|
15716
15730
|
});
|
|
15717
15731
|
reapAction = reapResult.action ?? null;
|
|
15718
15732
|
log(
|
|
15719
|
-
`Reap result for
|
|
15733
|
+
`Reap result for item_id=${item.id}: updated=${reapResult.updated} action=${reapResult.action ?? reapResult.reason ?? "none"}`
|
|
15720
15734
|
);
|
|
15721
15735
|
if (reapAction === "dead_letter" && ((reapResult.updated ?? 0) > 0 || reapResult.ok === true)) {
|
|
15722
15736
|
freshDoneIds.add(item.id);
|
|
15723
15737
|
}
|
|
15724
15738
|
} catch (err) {
|
|
15725
|
-
|
|
15739
|
+
const errId = createHash17("sha256").update(err instanceof Error ? err.message : String(err)).digest("hex").slice(0, 12);
|
|
15740
|
+
log(`Reap API error for item_id=${item.id} error_id=${errId}`);
|
|
15726
15741
|
}
|
|
15727
15742
|
if (reapAction === "dead_letter") {
|
|
15728
15743
|
const message = `\u26A0\uFE0F Task Stalled \u2014 ${displayName}
|
|
@@ -16555,6 +16570,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
16555
16570
|
[],
|
|
16556
16571
|
refreshData
|
|
16557
16572
|
);
|
|
16573
|
+
recordSpawnOutcome(codeName, result);
|
|
16558
16574
|
if (result.decision !== "spawn" || !result.sessionHealthyAfter) {
|
|
16559
16575
|
log(`[restart-lane] respawn not confirmed for '${codeName}' (decision=${result.decision}) - leaving for slow poll`);
|
|
16560
16576
|
return;
|
|
@@ -16562,10 +16578,10 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
16562
16578
|
void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
|
|
16563
16579
|
void (async () => {
|
|
16564
16580
|
try {
|
|
16565
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16581
|
+
const { collectDiagnostics } = await import("../persistent-session-DVTSZAPE.js");
|
|
16566
16582
|
await api.post("/host/heartbeat", {
|
|
16567
16583
|
host_id: hostId,
|
|
16568
|
-
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
16584
|
+
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics)
|
|
16569
16585
|
});
|
|
16570
16586
|
} catch (err) {
|
|
16571
16587
|
log(`[restart-lane] post-respawn diagnostics flush failed for '${codeName}': ${err.message}`);
|
|
@@ -16604,6 +16620,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
16604
16620
|
[],
|
|
16605
16621
|
refreshData
|
|
16606
16622
|
);
|
|
16623
|
+
recordSpawnOutcome(codeName, result);
|
|
16607
16624
|
if (result.decision !== "spawn" || !result.sessionHealthyAfter) {
|
|
16608
16625
|
log(
|
|
16609
16626
|
`[fast-mcp-respawn] respawn not confirmed for '${codeName}' (decision=${result.decision}) - leaving for slow poll`
|
|
@@ -16612,10 +16629,10 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
16612
16629
|
}
|
|
16613
16630
|
try {
|
|
16614
16631
|
const hostId = await getHostId();
|
|
16615
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16632
|
+
const { collectDiagnostics } = await import("../persistent-session-DVTSZAPE.js");
|
|
16616
16633
|
await api.post("/host/heartbeat", {
|
|
16617
16634
|
host_id: hostId,
|
|
16618
|
-
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
16635
|
+
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics)
|
|
16619
16636
|
});
|
|
16620
16637
|
} catch (err) {
|
|
16621
16638
|
log(`[fast-mcp-respawn] post-respawn diagnostics flush failed for '${codeName}': ${err.message}`);
|
|
@@ -17190,7 +17207,7 @@ async function processClaudePairSessions(agents) {
|
|
|
17190
17207
|
killPairSession,
|
|
17191
17208
|
pairTmuxSession,
|
|
17192
17209
|
finalizeClaudePairOnboarding
|
|
17193
|
-
} = await import("../claude-pair-runtime-
|
|
17210
|
+
} = await import("../claude-pair-runtime-4C5NQQHR.js");
|
|
17194
17211
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
17195
17212
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
17196
17213
|
const killed = await killPairSession(pairTmuxSession(pairId));
|