@integrity-labs/agt-cli 0.28.406 → 0.28.408
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-UTFTZ4WD.js → chunk-DRWBCTED.js} +5 -3
- package/dist/{chunk-UTFTZ4WD.js.map → chunk-DRWBCTED.js.map} +1 -1
- package/dist/{chunk-RD7MIR3G.js → chunk-G7M7OFCG.js} +1 -1
- package/dist/{claude-pair-runtime-W5Z4K7XK.js → claude-pair-runtime-WWTKA7QC.js} +2 -2
- package/dist/lib/manager-worker.js +64 -35
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-2AC3P5DJ.js → persistent-session-WYGZTU4O.js} +2 -2
- package/dist/{responsiveness-probe-LGJNUSPU.js → responsiveness-probe-Z6XRHNMB.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-RD7MIR3G.js.map → chunk-G7M7OFCG.js.map} +0 -0
- /package/dist/{claude-pair-runtime-W5Z4K7XK.js.map → claude-pair-runtime-WWTKA7QC.js.map} +0 -0
- /package/dist/{persistent-session-2AC3P5DJ.js.map → persistent-session-WYGZTU4O.js.map} +0 -0
- /package/dist/{responsiveness-probe-LGJNUSPU.js.map → responsiveness-probe-Z6XRHNMB.js.map} +0 -0
|
@@ -12473,4 +12473,4 @@ export {
|
|
|
12473
12473
|
stopAllSessionsAndWait,
|
|
12474
12474
|
getProjectDir
|
|
12475
12475
|
};
|
|
12476
|
-
//# sourceMappingURL=chunk-
|
|
12476
|
+
//# sourceMappingURL=chunk-G7M7OFCG.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-WYGZTU4O.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-WWTKA7QC.js.map
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
resolveEffectivePinRaw,
|
|
46
46
|
safeWriteJsonAtomic,
|
|
47
47
|
setConfigHash
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-DRWBCTED.js";
|
|
49
49
|
import {
|
|
50
50
|
getProjectDir as getProjectDir2,
|
|
51
51
|
getReadyTasks,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
toOpencodeModel,
|
|
148
148
|
transcriptActivityAgeSeconds,
|
|
149
149
|
writeEgressAllowlist
|
|
150
|
-
} from "../chunk-
|
|
150
|
+
} from "../chunk-G7M7OFCG.js";
|
|
151
151
|
import {
|
|
152
152
|
reapOrphanChannelMcps
|
|
153
153
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -1342,6 +1342,11 @@ function decideOpencodeModelRestart(input) {
|
|
|
1342
1342
|
return { restart, recordModel: true };
|
|
1343
1343
|
}
|
|
1344
1344
|
|
|
1345
|
+
// src/lib/restart-stop-strategy.ts
|
|
1346
|
+
function restartTargetsOpencodeServe(framework) {
|
|
1347
|
+
return framework === "opencode";
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1345
1350
|
// src/lib/connectivity-probe-runner.ts
|
|
1346
1351
|
var DEFAULT_INTERVAL_MS = 60 * 60 * 1e3;
|
|
1347
1352
|
var DEFAULT_MAX_PER_RUN = 25;
|
|
@@ -9302,7 +9307,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
9302
9307
|
var lastVersionCheckAt = 0;
|
|
9303
9308
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
9304
9309
|
var lastResponsivenessProbeAt = 0;
|
|
9305
|
-
var agtCliVersion = true ? "0.28.
|
|
9310
|
+
var agtCliVersion = true ? "0.28.408" : "dev";
|
|
9306
9311
|
function resolveBrewPath(execFileSync2) {
|
|
9307
9312
|
try {
|
|
9308
9313
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -10434,7 +10439,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
10434
10439
|
if (codeNames.length === 0) return;
|
|
10435
10440
|
void (async () => {
|
|
10436
10441
|
try {
|
|
10437
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10442
|
+
const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
|
|
10438
10443
|
await api.post("/host/heartbeat", {
|
|
10439
10444
|
host_id: hostId,
|
|
10440
10445
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor)
|
|
@@ -10533,7 +10538,7 @@ async function pollCycle() {
|
|
|
10533
10538
|
}
|
|
10534
10539
|
try {
|
|
10535
10540
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
10536
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10541
|
+
const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
|
|
10537
10542
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
10538
10543
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor) : void 0;
|
|
10539
10544
|
let tailscaleHostname;
|
|
@@ -10688,7 +10693,7 @@ async function pollCycle() {
|
|
|
10688
10693
|
const {
|
|
10689
10694
|
collectResponsivenessProbes,
|
|
10690
10695
|
getResponsivenessIntervalMs
|
|
10691
|
-
} = await import("../responsiveness-probe-
|
|
10696
|
+
} = await import("../responsiveness-probe-Z6XRHNMB.js");
|
|
10692
10697
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
10693
10698
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
10694
10699
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -10720,7 +10725,7 @@ async function pollCycle() {
|
|
|
10720
10725
|
collectResponsivenessProbes,
|
|
10721
10726
|
livePendingInboundOldestAgeSeconds,
|
|
10722
10727
|
parkPendingInbound
|
|
10723
|
-
} = await import("../responsiveness-probe-
|
|
10728
|
+
} = await import("../responsiveness-probe-Z6XRHNMB.js");
|
|
10724
10729
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-HYOOQV4A.js");
|
|
10725
10730
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
10726
10731
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -10943,26 +10948,31 @@ async function pollCycle() {
|
|
|
10943
10948
|
log(
|
|
10944
10949
|
`[restart] Dashboard requested restart for '${agent.code_name}' at ${requested} (reason=${restartReason ?? "manual"})`
|
|
10945
10950
|
);
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
}
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10951
|
+
const framework = agent.framework ?? agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
10952
|
+
if (restartTargetsOpencodeServe(framework)) {
|
|
10953
|
+
stopOpencodeSession(agent.code_name, log);
|
|
10954
|
+
} else {
|
|
10955
|
+
try {
|
|
10956
|
+
const { execSync: es } = await import("child_process");
|
|
10957
|
+
es(`tmux kill-session -t agt-${agent.code_name} 2>/dev/null`, { stdio: "ignore" });
|
|
10958
|
+
} catch {
|
|
10959
|
+
}
|
|
10960
|
+
const breakerReason = dashboardRestartBreakerReason(restartReason);
|
|
10961
|
+
stopPersistentSessionAndForgetMcpBaseline(agent.code_name, breakerReason);
|
|
10962
|
+
if (breakerReason && restartReasonBindsNewMcp(breakerReason)) {
|
|
10963
|
+
noteRestartRequested(agent.code_name, requested);
|
|
10964
|
+
beginRestartTiming(
|
|
10965
|
+
agent.code_name,
|
|
10966
|
+
{ reason: "integration-change (dashboard restart)", delivered: null, injectDelayMs: null },
|
|
10967
|
+
log
|
|
10968
|
+
);
|
|
10969
|
+
markRestartStopped(agent.code_name, log);
|
|
10970
|
+
const prior = pendingRestartVerifications.get(agent.code_name);
|
|
10971
|
+
pendingRestartVerifications.set(agent.code_name, {
|
|
10972
|
+
firedAt: Date.now(),
|
|
10973
|
+
attempts: prior?.attempts ?? 0
|
|
10974
|
+
});
|
|
10975
|
+
}
|
|
10966
10976
|
}
|
|
10967
10977
|
restartAcks.set(agent.agent_id, requested);
|
|
10968
10978
|
}
|
|
@@ -12403,6 +12413,20 @@ async function processAgent(agent, agentStates) {
|
|
|
12403
12413
|
}
|
|
12404
12414
|
let reapNote = "";
|
|
12405
12415
|
let rotationHandled = true;
|
|
12416
|
+
const EMPTY_INTEGRATIONS_HASH = "\0empty\0";
|
|
12417
|
+
if (integrations.length === 0 && frameworkAdapter.writeIntegrations) {
|
|
12418
|
+
const prevIntHash = agentState.knownIntegrationHashes.get(agent.agent_id);
|
|
12419
|
+
if (prevIntHash !== EMPTY_INTEGRATIONS_HASH) {
|
|
12420
|
+
try {
|
|
12421
|
+
frameworkAdapter.writeIntegrations(agent.code_name, [], agent.agent_id);
|
|
12422
|
+
agentState.knownIntegrationHashes.set(agent.agent_id, EMPTY_INTEGRATIONS_HASH);
|
|
12423
|
+
log(`[ENG-8035] Pruned integration-derived MCP entries for '${agent.code_name}' (integrations.length=0)`);
|
|
12424
|
+
} catch (err) {
|
|
12425
|
+
rotationHandled = false;
|
|
12426
|
+
log(`[ENG-8035] Empty integration prune failed for '${agent.code_name}': ${err.message}`);
|
|
12427
|
+
}
|
|
12428
|
+
}
|
|
12429
|
+
}
|
|
12406
12430
|
if (integrations.length > 0) {
|
|
12407
12431
|
const intHash = computeIntegrationsHash(integrations);
|
|
12408
12432
|
const prevIntHash = agentState.knownIntegrationHashes.get(agent.agent_id);
|
|
@@ -13989,12 +14013,17 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
13989
14013
|
return;
|
|
13990
14014
|
}
|
|
13991
14015
|
const displayName = refreshData.agent?.display_name ?? codeName;
|
|
13992
|
-
|
|
13993
|
-
|
|
13994
|
-
|
|
13995
|
-
}
|
|
14016
|
+
const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
|
|
14017
|
+
if (restartTargetsOpencodeServe(framework)) {
|
|
14018
|
+
stopOpencodeSession(codeName, log);
|
|
14019
|
+
} else {
|
|
14020
|
+
try {
|
|
14021
|
+
const { execSync: es } = await import("child_process");
|
|
14022
|
+
es(`tmux kill-session -t agt-${codeName} 2>/dev/null`, { stdio: "ignore" });
|
|
14023
|
+
} catch {
|
|
14024
|
+
}
|
|
14025
|
+
stopPersistentSessionAndForgetMcpBaseline(codeName);
|
|
13996
14026
|
}
|
|
13997
|
-
stopPersistentSessionAndForgetMcpBaseline(codeName);
|
|
13998
14027
|
const result = await ensurePersistentSession(
|
|
13999
14028
|
{ agent_id: agentId, code_name: codeName, display_name: displayName },
|
|
14000
14029
|
[],
|
|
@@ -14008,7 +14037,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
14008
14037
|
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}`));
|
|
14009
14038
|
void (async () => {
|
|
14010
14039
|
try {
|
|
14011
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14040
|
+
const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
|
|
14012
14041
|
await api.post("/host/heartbeat", {
|
|
14013
14042
|
host_id: hostId,
|
|
14014
14043
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor)
|
|
@@ -14058,7 +14087,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
14058
14087
|
}
|
|
14059
14088
|
try {
|
|
14060
14089
|
const hostId = await getHostId();
|
|
14061
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14090
|
+
const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
|
|
14062
14091
|
await api.post("/host/heartbeat", {
|
|
14063
14092
|
host_id: hostId,
|
|
14064
14093
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor)
|
|
@@ -14511,7 +14540,7 @@ async function processClaudePairSessions(agents) {
|
|
|
14511
14540
|
killPairSession,
|
|
14512
14541
|
pairTmuxSession,
|
|
14513
14542
|
finalizeClaudePairOnboarding
|
|
14514
|
-
} = await import("../claude-pair-runtime-
|
|
14543
|
+
} = await import("../claude-pair-runtime-WWTKA7QC.js");
|
|
14515
14544
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
14516
14545
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
14517
14546
|
const killed = await killPairSession(pairTmuxSession(pairId));
|