@integrity-labs/agt-cli 0.28.637 → 0.28.639
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 +5 -5
- package/dist/{chunk-JT2JQUK3.js → chunk-MAZUBHNT.js} +1 -1
- package/dist/chunk-MAZUBHNT.js.map +1 -0
- package/dist/{chunk-W4GVD3KK.js → chunk-MRQ2GRTN.js} +2 -2
- package/dist/{chunk-3JBA6RYG.js → chunk-T23GT44E.js} +109 -35
- package/dist/chunk-T23GT44E.js.map +1 -0
- package/dist/{claude-pair-runtime-CE72HQE7.js → claude-pair-runtime-EZUIIJYB.js} +2 -2
- package/dist/lib/manager-worker.js +44 -48
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-SZLOBXBQ.js → persistent-session-NMGMDXTO.js} +3 -3
- package/dist/{responsiveness-probe-MDPLVVKC.js → responsiveness-probe-ZUFKGLDN.js} +3 -3
- package/dist/{session-auth-dead-ZLENJLLO.js → session-auth-dead-TDWEX7R5.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-3JBA6RYG.js.map +0 -1
- package/dist/chunk-JT2JQUK3.js.map +0 -1
- /package/dist/{chunk-W4GVD3KK.js.map → chunk-MRQ2GRTN.js.map} +0 -0
- /package/dist/{claude-pair-runtime-CE72HQE7.js.map → claude-pair-runtime-EZUIIJYB.js.map} +0 -0
- /package/dist/{persistent-session-SZLOBXBQ.js.map → persistent-session-NMGMDXTO.js.map} +0 -0
- /package/dist/{responsiveness-probe-MDPLVVKC.js.map → responsiveness-probe-ZUFKGLDN.js.map} +0 -0
- /package/dist/{session-auth-dead-ZLENJLLO.js.map → session-auth-dead-TDWEX7R5.js.map} +0 -0
|
@@ -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-NMGMDXTO.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-EZUIIJYB.js.map
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
decidePin,
|
|
16
16
|
defaultFlagsCachePath,
|
|
17
17
|
deriveMcpServerKey,
|
|
18
|
+
describeStartupCompletion,
|
|
18
19
|
diffEnvIntegrations,
|
|
19
20
|
envOnlyRespawnVars,
|
|
20
21
|
exchangeApiKey,
|
|
@@ -54,7 +55,7 @@ import {
|
|
|
54
55
|
safeWriteJsonAtomic,
|
|
55
56
|
setConfigHash,
|
|
56
57
|
tripClass
|
|
57
|
-
} from "../chunk-
|
|
58
|
+
} from "../chunk-T23GT44E.js";
|
|
58
59
|
import {
|
|
59
60
|
getProjectDir as getProjectDir2,
|
|
60
61
|
getReadyTasks,
|
|
@@ -110,7 +111,7 @@ import {
|
|
|
110
111
|
takeZombieDetection,
|
|
111
112
|
toOpencodeModel,
|
|
112
113
|
writeEgressAllowlist
|
|
113
|
-
} from "../chunk-
|
|
114
|
+
} from "../chunk-MRQ2GRTN.js";
|
|
114
115
|
import {
|
|
115
116
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
116
117
|
AnchorSessionClient,
|
|
@@ -187,7 +188,7 @@ import {
|
|
|
187
188
|
subagentActivityAgeSeconds,
|
|
188
189
|
sumTranscriptUsageInWindow,
|
|
189
190
|
transcriptActivityAgeSeconds
|
|
190
|
-
} from "../chunk-
|
|
191
|
+
} from "../chunk-MAZUBHNT.js";
|
|
191
192
|
import {
|
|
192
193
|
reapOrphanChannelMcps
|
|
193
194
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -1618,32 +1619,6 @@ function formatMissingMcpBundles(missing) {
|
|
|
1618
1619
|
return `MCP bundle(s) not yet on disk in the host-shared _mcp mount: ${detail}`;
|
|
1619
1620
|
}
|
|
1620
1621
|
|
|
1621
|
-
// src/lib/startup-telemetry.ts
|
|
1622
|
-
var SLOW_STARTUP_WARN_MS = 6e4;
|
|
1623
|
-
function shouldWarnSlowStartup(elapsedMs, opts = {}) {
|
|
1624
|
-
if (!Number.isFinite(elapsedMs) || elapsedMs < 0) return false;
|
|
1625
|
-
const threshold = opts.thresholdMs ?? SLOW_STARTUP_WARN_MS;
|
|
1626
|
-
if (!Number.isFinite(threshold) || threshold < 0) return false;
|
|
1627
|
-
return elapsedMs >= threshold;
|
|
1628
|
-
}
|
|
1629
|
-
function formatStartupElapsed(elapsedMs) {
|
|
1630
|
-
if (!Number.isFinite(elapsedMs) || elapsedMs < 0) return "unknown";
|
|
1631
|
-
const seconds = elapsedMs / 1e3;
|
|
1632
|
-
if (seconds < 60) return `${seconds.toFixed(1)}s`;
|
|
1633
|
-
return `${seconds.toFixed(1)}s (${(seconds / 60).toFixed(1)} min)`;
|
|
1634
|
-
}
|
|
1635
|
-
function describeStartupCompletion(elapsedMs, opts = {}) {
|
|
1636
|
-
const elapsed = formatStartupElapsed(elapsedMs);
|
|
1637
|
-
if (!shouldWarnSlowStartup(elapsedMs, opts)) {
|
|
1638
|
-
return { warn: false, message: `[startup] ready in ${elapsed}` };
|
|
1639
|
-
}
|
|
1640
|
-
const threshold = opts.thresholdMs ?? SLOW_STARTUP_WARN_MS;
|
|
1641
|
-
return {
|
|
1642
|
-
warn: true,
|
|
1643
|
-
message: `[startup] SLOW BOOT \u2014 ready in ${elapsed}, over the ${formatStartupElapsed(threshold)} threshold. MCP bundles are deployed during startup, so agents spawning in this window can come up with no MCP tools (ENG-9129). Check for a build/install running on the host.`
|
|
1644
|
-
};
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
1622
|
// src/lib/self-update-coalesce.ts
|
|
1648
1623
|
import { readFileSync as readFileSync5, writeFileSync as writeFileSync3, mkdirSync as mkdirSync3 } from "fs";
|
|
1649
1624
|
import { dirname as dirname3 } from "path";
|
|
@@ -5620,6 +5595,20 @@ function writeManagedSkillManifest(path, ids) {
|
|
|
5620
5595
|
}
|
|
5621
5596
|
}
|
|
5622
5597
|
|
|
5598
|
+
// src/lib/poll-loop-guard.ts
|
|
5599
|
+
async function pollCycleAndReschedule(pollCycle2, opts) {
|
|
5600
|
+
try {
|
|
5601
|
+
await pollCycle2();
|
|
5602
|
+
} catch (err) {
|
|
5603
|
+
try {
|
|
5604
|
+
await opts.onError(err);
|
|
5605
|
+
} catch {
|
|
5606
|
+
}
|
|
5607
|
+
} finally {
|
|
5608
|
+
await opts.reschedule();
|
|
5609
|
+
}
|
|
5610
|
+
}
|
|
5611
|
+
|
|
5623
5612
|
// src/lib/manager/restart-timing.ts
|
|
5624
5613
|
var pendingRequested = /* @__PURE__ */ new Map();
|
|
5625
5614
|
var tracks = /* @__PURE__ */ new Map();
|
|
@@ -11522,7 +11511,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
11522
11511
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
11523
11512
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
11524
11513
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
11525
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
11514
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-ZUFKGLDN.js");
|
|
11526
11515
|
const newest = newestPendingInboundActivityMtimeMs(dirname9(paneLogPath(codeName)));
|
|
11527
11516
|
if (newest === null) return null;
|
|
11528
11517
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -12165,7 +12154,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
12165
12154
|
var lastVersionCheckAt = 0;
|
|
12166
12155
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
12167
12156
|
var lastResponsivenessProbeAt = 0;
|
|
12168
|
-
var agtCliVersion = true ? "0.28.
|
|
12157
|
+
var agtCliVersion = true ? "0.28.639" : "dev";
|
|
12169
12158
|
function resolveBrewPath(execFileSync3) {
|
|
12170
12159
|
try {
|
|
12171
12160
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -13472,7 +13461,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
13472
13461
|
if (codeNames.length === 0) return;
|
|
13473
13462
|
void (async () => {
|
|
13474
13463
|
try {
|
|
13475
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
13464
|
+
const { collectDiagnostics } = await import("../persistent-session-NMGMDXTO.js");
|
|
13476
13465
|
await api.post("/host/heartbeat", {
|
|
13477
13466
|
host_id: hostId,
|
|
13478
13467
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
|
|
@@ -13588,7 +13577,7 @@ async function pollCycleInner() {
|
|
|
13588
13577
|
}
|
|
13589
13578
|
try {
|
|
13590
13579
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
13591
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
13580
|
+
const { collectDiagnostics } = await import("../persistent-session-NMGMDXTO.js");
|
|
13592
13581
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
13593
13582
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor) : void 0;
|
|
13594
13583
|
let tailscaleHostname;
|
|
@@ -13711,7 +13700,7 @@ async function pollCycleInner() {
|
|
|
13711
13700
|
collectPanelessActivityProbes,
|
|
13712
13701
|
getResponsivenessIntervalMs,
|
|
13713
13702
|
occupancyQualificationClassifications
|
|
13714
|
-
} = await import("../responsiveness-probe-
|
|
13703
|
+
} = await import("../responsiveness-probe-ZUFKGLDN.js");
|
|
13715
13704
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
13716
13705
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
13717
13706
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -13817,7 +13806,7 @@ async function pollCycleInner() {
|
|
|
13817
13806
|
collectResponsivenessProbes,
|
|
13818
13807
|
livePendingInboundOldestAgeSeconds,
|
|
13819
13808
|
parkPendingInbound
|
|
13820
|
-
} = await import("../responsiveness-probe-
|
|
13809
|
+
} = await import("../responsiveness-probe-ZUFKGLDN.js");
|
|
13821
13810
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
13822
13811
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
13823
13812
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -13973,7 +13962,7 @@ async function pollCycleInner() {
|
|
|
13973
13962
|
}
|
|
13974
13963
|
try {
|
|
13975
13964
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
13976
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
13965
|
+
const { probeSessionAuth } = await import("../session-auth-dead-TDWEX7R5.js");
|
|
13977
13966
|
const observations = [];
|
|
13978
13967
|
const pendingCacheCommits = [];
|
|
13979
13968
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -17540,7 +17529,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
17540
17529
|
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}`));
|
|
17541
17530
|
void (async () => {
|
|
17542
17531
|
try {
|
|
17543
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
17532
|
+
const { collectDiagnostics } = await import("../persistent-session-NMGMDXTO.js");
|
|
17544
17533
|
await api.post("/host/heartbeat", {
|
|
17545
17534
|
host_id: hostId,
|
|
17546
17535
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
|
|
@@ -17591,7 +17580,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
17591
17580
|
}
|
|
17592
17581
|
try {
|
|
17593
17582
|
const hostId = await getHostId();
|
|
17594
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
17583
|
+
const { collectDiagnostics } = await import("../persistent-session-NMGMDXTO.js");
|
|
17595
17584
|
await api.post("/host/heartbeat", {
|
|
17596
17585
|
host_id: hostId,
|
|
17597
17586
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
|
|
@@ -17813,8 +17802,9 @@ function triggerEarlyPoll(reason) {
|
|
|
17813
17802
|
}
|
|
17814
17803
|
log(`[realtime] Triggering early poll: ${reason}`);
|
|
17815
17804
|
pollTimer = setTimeout(() => {
|
|
17816
|
-
void pollCycle
|
|
17817
|
-
|
|
17805
|
+
void pollCycleAndReschedule(pollCycle, {
|
|
17806
|
+
onError: (err) => log(`[poll-loop] early-poll cycle rejected: ${err?.message ?? String(err)}`),
|
|
17807
|
+
reschedule: () => scheduleNext()
|
|
17818
17808
|
});
|
|
17819
17809
|
}, 0);
|
|
17820
17810
|
}
|
|
@@ -18187,7 +18177,7 @@ async function processClaudePairSessions(agents) {
|
|
|
18187
18177
|
killPairSession,
|
|
18188
18178
|
pairTmuxSession,
|
|
18189
18179
|
finalizeClaudePairOnboarding
|
|
18190
|
-
} = await import("../claude-pair-runtime-
|
|
18180
|
+
} = await import("../claude-pair-runtime-EZUIIJYB.js");
|
|
18191
18181
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
18192
18182
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
18193
18183
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -18677,10 +18667,13 @@ function startPolling() {
|
|
|
18677
18667
|
}
|
|
18678
18668
|
void killAllAgtTmuxSessions().catch(() => {
|
|
18679
18669
|
}).then(() => {
|
|
18680
|
-
return pollCycle
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18670
|
+
return pollCycleAndReschedule(pollCycle, {
|
|
18671
|
+
onError: (err) => log(`[poll-loop] startup cycle rejected: ${err?.message ?? String(err)}`),
|
|
18672
|
+
reschedule: () => {
|
|
18673
|
+
void driveArtifactStreaming();
|
|
18674
|
+
scheduleNext();
|
|
18675
|
+
}
|
|
18676
|
+
});
|
|
18684
18677
|
});
|
|
18685
18678
|
}
|
|
18686
18679
|
async function reportSelfUpdateRestarts() {
|
|
@@ -18722,9 +18715,12 @@ function scheduleNext() {
|
|
|
18722
18715
|
restartNow();
|
|
18723
18716
|
return;
|
|
18724
18717
|
}
|
|
18725
|
-
void pollCycle
|
|
18726
|
-
|
|
18727
|
-
|
|
18718
|
+
void pollCycleAndReschedule(pollCycle, {
|
|
18719
|
+
onError: (err) => log(`[poll-loop] scheduled cycle rejected: ${err?.message ?? String(err)}`),
|
|
18720
|
+
reschedule: () => {
|
|
18721
|
+
void driveArtifactStreaming();
|
|
18722
|
+
scheduleNext();
|
|
18723
|
+
}
|
|
18728
18724
|
});
|
|
18729
18725
|
}, delayMs);
|
|
18730
18726
|
}
|