@integrity-labs/agt-cli 0.28.1014 → 0.28.1015
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-7QXIJNLA.js → chunk-GHHDFHKE.js} +34 -48
- package/dist/chunk-GHHDFHKE.js.map +1 -0
- package/dist/{chunk-QBQLG2PY.js → chunk-MHDNKKEO.js} +2 -2
- package/dist/{chunk-MLCGPEN6.js → chunk-RJ3SI5JG.js} +55 -37
- package/dist/chunk-RJ3SI5JG.js.map +1 -0
- package/dist/{claude-pair-runtime-4F73QFXF.js → claude-pair-runtime-GSPFYCG4.js} +2 -2
- package/dist/lib/manager-worker.js +38 -20
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-IEGA6OSO.js → persistent-session-YP2UTQGA.js} +3 -3
- package/dist/{responsiveness-probe-KWFVG5EI.js → responsiveness-probe-YTFWHUTQ.js} +3 -3
- package/dist/{session-auth-dead-P6KOHDYJ.js → session-auth-dead-TX4YQUTJ.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-7QXIJNLA.js.map +0 -1
- package/dist/chunk-MLCGPEN6.js.map +0 -1
- /package/dist/{chunk-QBQLG2PY.js.map → chunk-MHDNKKEO.js.map} +0 -0
- /package/dist/{claude-pair-runtime-4F73QFXF.js.map → claude-pair-runtime-GSPFYCG4.js.map} +0 -0
- /package/dist/{persistent-session-IEGA6OSO.js.map → persistent-session-YP2UTQGA.js.map} +0 -0
- /package/dist/{responsiveness-probe-KWFVG5EI.js.map → responsiveness-probe-YTFWHUTQ.js.map} +0 -0
- /package/dist/{session-auth-dead-P6KOHDYJ.js.map → session-auth-dead-TX4YQUTJ.js.map} +0 -0
|
@@ -266,7 +266,7 @@ async function spawnPairSession(session) {
|
|
|
266
266
|
return { ok: true };
|
|
267
267
|
} catch {
|
|
268
268
|
}
|
|
269
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
269
|
+
const { resolveClaudeBinary } = await import("./persistent-session-YP2UTQGA.js");
|
|
270
270
|
const claudeBin = resolveClaudeBinary();
|
|
271
271
|
const pairEnv = {
|
|
272
272
|
...process.env,
|
|
@@ -734,4 +734,4 @@ export {
|
|
|
734
734
|
startClaudePair,
|
|
735
735
|
submitClaudePairCode
|
|
736
736
|
};
|
|
737
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
737
|
+
//# sourceMappingURL=claude-pair-runtime-GSPFYCG4.js.map
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
provisionStopHook,
|
|
56
56
|
readEnvNumber,
|
|
57
57
|
readHostArchiveAddress,
|
|
58
|
+
reapLegacyTokenFile,
|
|
58
59
|
reapMissingMcpSessions,
|
|
59
60
|
reapStaleMcpChildren,
|
|
60
61
|
reaperRestartBreakerReason,
|
|
@@ -64,7 +65,7 @@ import {
|
|
|
64
65
|
safeWriteJsonAtomic,
|
|
65
66
|
setConfigHash,
|
|
66
67
|
tripClass
|
|
67
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-GHHDFHKE.js";
|
|
68
69
|
import {
|
|
69
70
|
getProjectDir as getProjectDir2,
|
|
70
71
|
getReadyTasks,
|
|
@@ -145,7 +146,7 @@ import {
|
|
|
145
146
|
takeZombieDetection,
|
|
146
147
|
toOpencodeModel,
|
|
147
148
|
writeEgressAllowlist
|
|
148
|
-
} from "../chunk-
|
|
149
|
+
} from "../chunk-MHDNKKEO.js";
|
|
149
150
|
import {
|
|
150
151
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
151
152
|
AnchorSessionClient,
|
|
@@ -218,6 +219,7 @@ import {
|
|
|
218
219
|
isOnboardingArea,
|
|
219
220
|
isParseError,
|
|
220
221
|
isResolveError,
|
|
222
|
+
isRespawnExemptEnvVar,
|
|
221
223
|
isSelfCompletion,
|
|
222
224
|
isStaleForToday,
|
|
223
225
|
isSystemInjectedContent,
|
|
@@ -248,7 +250,7 @@ import {
|
|
|
248
250
|
subagentActivityAgeSeconds,
|
|
249
251
|
sumTranscriptUsageInWindow,
|
|
250
252
|
transcriptActivityAgeSeconds
|
|
251
|
-
} from "../chunk-
|
|
253
|
+
} from "../chunk-RJ3SI5JG.js";
|
|
252
254
|
import "../chunk-DHWNVVX4.js";
|
|
253
255
|
import {
|
|
254
256
|
reapOrphanChannelMcps
|
|
@@ -13174,6 +13176,16 @@ var dependencyRecoveryLedger = new DependencyRecoveryLedger();
|
|
|
13174
13176
|
var unstableLatchUnreported = /* @__PURE__ */ new Set();
|
|
13175
13177
|
var unstableLatchReportInFlight = /* @__PURE__ */ new Set();
|
|
13176
13178
|
var killPausedCodeNames = /* @__PURE__ */ new Set();
|
|
13179
|
+
var tokenReapWarnedCodeNames = /* @__PURE__ */ new Set();
|
|
13180
|
+
function reapLegacyTokenFileEdgeWarned(codeName, log2, seen = tokenReapWarnedCodeNames) {
|
|
13181
|
+
const removed = reapLegacyTokenFile(codeName, (message) => {
|
|
13182
|
+
if (seen.has(codeName)) return;
|
|
13183
|
+
seen.add(codeName);
|
|
13184
|
+
log2(message);
|
|
13185
|
+
});
|
|
13186
|
+
if (removed) seen.delete(codeName);
|
|
13187
|
+
return removed;
|
|
13188
|
+
}
|
|
13177
13189
|
var notRunningCodeNames = /* @__PURE__ */ new Set();
|
|
13178
13190
|
var BACK_ONLINE_GREETING_GUIDANCE = " When you reconnect, if you tell anyone you are back, start that message with a \u{1F44B} wave emoji and do not use a \u{1F7E2} green-light emoji.";
|
|
13179
13191
|
function maybeAutoResume(agent) {
|
|
@@ -13642,7 +13654,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
13642
13654
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
13643
13655
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
13644
13656
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
13645
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
13657
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-YTFWHUTQ.js");
|
|
13646
13658
|
const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
|
|
13647
13659
|
if (newest === null) return null;
|
|
13648
13660
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -14385,7 +14397,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
14385
14397
|
var lastVersionCheckAt = 0;
|
|
14386
14398
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
14387
14399
|
var lastResponsivenessProbeAt = 0;
|
|
14388
|
-
var agtCliVersion = true ? "0.28.
|
|
14400
|
+
var agtCliVersion = true ? "0.28.1015" : "dev";
|
|
14389
14401
|
function resolveBrewPath(execFileSync3) {
|
|
14390
14402
|
try {
|
|
14391
14403
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -16020,7 +16032,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
16020
16032
|
if (codeNames.length === 0) return;
|
|
16021
16033
|
void (async () => {
|
|
16022
16034
|
try {
|
|
16023
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16035
|
+
const { collectDiagnostics } = await import("../persistent-session-YP2UTQGA.js");
|
|
16024
16036
|
await api.post("/host/heartbeat", {
|
|
16025
16037
|
host_id: hostId,
|
|
16026
16038
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -16162,7 +16174,7 @@ async function pollCycleInner() {
|
|
|
16162
16174
|
}
|
|
16163
16175
|
try {
|
|
16164
16176
|
const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
|
|
16165
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16177
|
+
const { collectDiagnostics } = await import("../persistent-session-YP2UTQGA.js");
|
|
16166
16178
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
16167
16179
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor) : void 0;
|
|
16168
16180
|
let tailscaleHostname;
|
|
@@ -16338,7 +16350,7 @@ async function pollCycleInner() {
|
|
|
16338
16350
|
collectPanelessActivityProbes,
|
|
16339
16351
|
getResponsivenessIntervalMs,
|
|
16340
16352
|
occupancyQualificationClassifications
|
|
16341
|
-
} = await import("../responsiveness-probe-
|
|
16353
|
+
} = await import("../responsiveness-probe-YTFWHUTQ.js");
|
|
16342
16354
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
16343
16355
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
16344
16356
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -16455,7 +16467,7 @@ async function pollCycleInner() {
|
|
|
16455
16467
|
collectResponsivenessProbes,
|
|
16456
16468
|
livePendingInboundOldestAgeSeconds,
|
|
16457
16469
|
parkPendingInbound
|
|
16458
|
-
} = await import("../responsiveness-probe-
|
|
16470
|
+
} = await import("../responsiveness-probe-YTFWHUTQ.js");
|
|
16459
16471
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
|
|
16460
16472
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
16461
16473
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -16611,7 +16623,7 @@ async function pollCycleInner() {
|
|
|
16611
16623
|
}
|
|
16612
16624
|
try {
|
|
16613
16625
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
|
|
16614
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
16626
|
+
const { probeSessionAuth } = await import("../session-auth-dead-TX4YQUTJ.js");
|
|
16615
16627
|
const observations = [];
|
|
16616
16628
|
const pendingCacheCommits = [];
|
|
16617
16629
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -17371,6 +17383,7 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
17371
17383
|
let agentDir = join42(adapter.getAgentDir(agent.code_name), "provision");
|
|
17372
17384
|
if (agent.status === "draft" || agent.status === "paused") {
|
|
17373
17385
|
forgetChannelSyncState(agent.agent_id);
|
|
17386
|
+
reapLegacyTokenFileEdgeWarned(agent.code_name, log);
|
|
17374
17387
|
if (previousKnownStatus !== agent.status) {
|
|
17375
17388
|
log(`Agent '${agent.code_name}' is ${agent.status}, skipping provisioning`);
|
|
17376
17389
|
}
|
|
@@ -18618,9 +18631,6 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
18618
18631
|
if (rotated) {
|
|
18619
18632
|
log(`OAuth token refreshed for '${agent.code_name}/${integration.definition_id}'`);
|
|
18620
18633
|
}
|
|
18621
|
-
if (frameworkAdapter.writeTokenFile) {
|
|
18622
|
-
frameworkAdapter.writeTokenFile(agent.code_name, integrations);
|
|
18623
|
-
}
|
|
18624
18634
|
}
|
|
18625
18635
|
} catch (err) {
|
|
18626
18636
|
log(`OAuth token refresh failed for '${agent.code_name}/${integration.definition_id}': ${err.message}`);
|
|
@@ -18769,7 +18779,8 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
18769
18779
|
if (prevIntHash !== EMPTY_INTEGRATIONS_HASH) {
|
|
18770
18780
|
try {
|
|
18771
18781
|
frameworkAdapter.writeIntegrations(agent.code_name, [], agent.agent_id, {
|
|
18772
|
-
renderClaudeMdSection: renderIntegrationsSection
|
|
18782
|
+
renderClaudeMdSection: renderIntegrationsSection,
|
|
18783
|
+
log
|
|
18773
18784
|
});
|
|
18774
18785
|
agentState.knownIntegrationHashes.set(agent.agent_id, EMPTY_INTEGRATIONS_HASH);
|
|
18775
18786
|
log(`[ENG-8035] Pruned integration-derived MCP entries for '${agent.code_name}' (integrations.length=0)`);
|
|
@@ -18793,7 +18804,8 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
18793
18804
|
}
|
|
18794
18805
|
if (frameworkAdapter.writeIntegrations) {
|
|
18795
18806
|
frameworkAdapter.writeIntegrations(agent.code_name, integrations, agent.agent_id, {
|
|
18796
|
-
renderClaudeMdSection: renderIntegrationsSection
|
|
18807
|
+
renderClaudeMdSection: renderIntegrationsSection,
|
|
18808
|
+
log
|
|
18797
18809
|
});
|
|
18798
18810
|
}
|
|
18799
18811
|
log(`Integrations provisioned for '${agent.code_name}' (${integrations.length} integration(s))`);
|
|
@@ -18828,7 +18840,11 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
18828
18840
|
...liveProxyExtraHeaderVars(mcpJsonForReap),
|
|
18829
18841
|
...liveProxyTokenVars(mcpJsonForReap)
|
|
18830
18842
|
]);
|
|
18831
|
-
const respawnVars = envOnlyRespawnVars(changedVars, mcpJsonForReap, CHANNEL_SECRET_ENV_KEYS).filter(
|
|
18843
|
+
const respawnVars = envOnlyRespawnVars(changedVars, mcpJsonForReap, CHANNEL_SECRET_ENV_KEYS).filter(
|
|
18844
|
+
(v) => !liveProxyVars.has(v) && !isControlPlaneOnlyEnvVar(v) && // ENG-10939: consumerless identity vars whose one-time
|
|
18845
|
+
// appearance must not interrupt a live turn.
|
|
18846
|
+
!isRespawnExemptEnvVar(v)
|
|
18847
|
+
);
|
|
18832
18848
|
const envDiff = classifyEnvIntegrationsDiff(preWriteEnv, postWriteEnv);
|
|
18833
18849
|
const rotatedOnlyVars = new Set(envDiff.rotated);
|
|
18834
18850
|
const envRespawnReason = respawnVars.length > 0 && respawnVars.every((v) => rotatedOnlyVars.has(v)) ? "credential-rotation" : "hot-reload-mcp";
|
|
@@ -20991,7 +21007,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
20991
21007
|
try {
|
|
20992
21008
|
const freshId = rotateSessionForWedge(codeName);
|
|
20993
21009
|
consecutiveWedgeCycles.delete(codeName);
|
|
20994
|
-
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-
|
|
21010
|
+
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-YTFWHUTQ.js");
|
|
20995
21011
|
const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
|
|
20996
21012
|
const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
|
|
20997
21013
|
const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
|
|
@@ -21034,7 +21050,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
21034
21050
|
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}`));
|
|
21035
21051
|
void (async () => {
|
|
21036
21052
|
try {
|
|
21037
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
21053
|
+
const { collectDiagnostics } = await import("../persistent-session-YP2UTQGA.js");
|
|
21038
21054
|
await api.post("/host/heartbeat", {
|
|
21039
21055
|
host_id: hostId,
|
|
21040
21056
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -21085,7 +21101,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
21085
21101
|
}
|
|
21086
21102
|
try {
|
|
21087
21103
|
const hostId = await getHostId();
|
|
21088
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
21104
|
+
const { collectDiagnostics } = await import("../persistent-session-YP2UTQGA.js");
|
|
21089
21105
|
await api.post("/host/heartbeat", {
|
|
21090
21106
|
host_id: hostId,
|
|
21091
21107
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -21756,7 +21772,7 @@ async function processClaudePairSessions(agents) {
|
|
|
21756
21772
|
// cannot take it for itself — by the time it runs, the write it is looking
|
|
21757
21773
|
// for may already have happened.
|
|
21758
21774
|
snapshotPairConfig
|
|
21759
|
-
} = await import("../claude-pair-runtime-
|
|
21775
|
+
} = await import("../claude-pair-runtime-GSPFYCG4.js");
|
|
21760
21776
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
21761
21777
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
21762
21778
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -22442,6 +22458,7 @@ ${mem.content}
|
|
|
22442
22458
|
}
|
|
22443
22459
|
}
|
|
22444
22460
|
async function cleanupAgentFiles(codeName, agentDir) {
|
|
22461
|
+
reapLegacyTokenFile(codeName, log);
|
|
22445
22462
|
if (existsSync19(agentDir)) {
|
|
22446
22463
|
try {
|
|
22447
22464
|
rmSync8(agentDir, { recursive: true, force: true });
|
|
@@ -23189,6 +23206,7 @@ export {
|
|
|
23189
23206
|
pruneRealtimeRebindState,
|
|
23190
23207
|
realtimeRebindBackoffMs,
|
|
23191
23208
|
realtimeRebindDue,
|
|
23209
|
+
reapLegacyTokenFileEdgeWarned,
|
|
23192
23210
|
recordChannelSyncFailure,
|
|
23193
23211
|
recordRealtimeRebindFailure,
|
|
23194
23212
|
refreshSkillsIndexInClaudeMd,
|