@integrity-labs/agt-cli 0.28.816 → 0.28.818
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-SZ47B4KO.js → chunk-NVUWRJWX.js} +2 -2
- package/dist/chunk-NVUWRJWX.js.map +1 -0
- package/dist/{chunk-PNHF5TJN.js → chunk-Y3CAZCIA.js} +4 -4
- package/dist/{chunk-5RZBTMBD.js → chunk-ZDV575SW.js} +162 -59
- package/dist/chunk-ZDV575SW.js.map +1 -0
- package/dist/{claude-pair-runtime-ZG6I4NMN.js → claude-pair-runtime-HVO7IOCM.js} +2 -2
- package/dist/lib/manager-worker.js +70 -18
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/origami.js +1 -1
- package/dist/mcp/slack-channel.js +1 -1
- package/dist/mcp/telegram-channel.js +1 -1
- package/dist/{persistent-session-YX4JTHMC.js → persistent-session-AGMIVLTP.js} +3 -3
- package/dist/{responsiveness-probe-63R3PUAU.js → responsiveness-probe-URK6CHNZ.js} +3 -3
- package/dist/{session-auth-dead-2NFR7OFR.js → session-auth-dead-5FPVU375.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-5RZBTMBD.js.map +0 -1
- package/dist/chunk-SZ47B4KO.js.map +0 -1
- /package/dist/{chunk-PNHF5TJN.js.map → chunk-Y3CAZCIA.js.map} +0 -0
- /package/dist/{claude-pair-runtime-ZG6I4NMN.js.map → claude-pair-runtime-HVO7IOCM.js.map} +0 -0
- /package/dist/{persistent-session-YX4JTHMC.js.map → persistent-session-AGMIVLTP.js.map} +0 -0
- /package/dist/{responsiveness-probe-63R3PUAU.js.map → responsiveness-probe-URK6CHNZ.js.map} +0 -0
- /package/dist/{session-auth-dead-2NFR7OFR.js.map → session-auth-dead-5FPVU375.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-AGMIVLTP.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-HVO7IOCM.js.map
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
safeWriteJsonAtomic,
|
|
59
59
|
setConfigHash,
|
|
60
60
|
tripClass
|
|
61
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-Y3CAZCIA.js";
|
|
62
62
|
import {
|
|
63
63
|
getProjectDir as getProjectDir2,
|
|
64
64
|
getReadyTasks,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
takeZombieDetection,
|
|
124
124
|
toOpencodeModel,
|
|
125
125
|
writeEgressAllowlist
|
|
126
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-ZDV575SW.js";
|
|
127
127
|
import {
|
|
128
128
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
129
129
|
AnchorSessionClient,
|
|
@@ -215,7 +215,7 @@ import {
|
|
|
215
215
|
subagentActivityAgeSeconds,
|
|
216
216
|
sumTranscriptUsageInWindow,
|
|
217
217
|
transcriptActivityAgeSeconds
|
|
218
|
-
} from "../chunk-
|
|
218
|
+
} from "../chunk-NVUWRJWX.js";
|
|
219
219
|
import {
|
|
220
220
|
reapOrphanChannelMcps
|
|
221
221
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -12918,7 +12918,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
12918
12918
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
12919
12919
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
12920
12920
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
12921
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
12921
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-URK6CHNZ.js");
|
|
12922
12922
|
const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
|
|
12923
12923
|
if (newest === null) return null;
|
|
12924
12924
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -13276,6 +13276,7 @@ async function runAgentConnectivityProbes(agent, integrations, projectDir) {
|
|
|
13276
13276
|
agent_id: agent.agent_id,
|
|
13277
13277
|
results: result.reports
|
|
13278
13278
|
});
|
|
13279
|
+
forceIntegrationsFetch(agent.agent_id);
|
|
13279
13280
|
const labelById = new Map(integrations.map((i) => [i.id, i.definition_id]));
|
|
13280
13281
|
dependencyRecoveryLedger.record(
|
|
13281
13282
|
agent.code_name,
|
|
@@ -13317,6 +13318,7 @@ async function runAgentSessionToolBindProbes(agent, integrations, projectDir, op
|
|
|
13317
13318
|
agent_id: agent.agent_id,
|
|
13318
13319
|
results: result.reports
|
|
13319
13320
|
});
|
|
13321
|
+
forceIntegrationsFetch(agent.agent_id);
|
|
13320
13322
|
}
|
|
13321
13323
|
const naCount = result.reports.filter((r) => r.status === "not_applicable").length;
|
|
13322
13324
|
const skipSummary = result.skippedDetail.length > 0 ? ` skipped=[${result.skippedDetail.map((s) => `${s.definition_id}:${s.reason}`).join(" ")}]` : "";
|
|
@@ -13544,6 +13546,10 @@ function clearAgentCaches(agentId, codeName) {
|
|
|
13544
13546
|
memoriesFetchGate.forget(agentId);
|
|
13545
13547
|
secretsFetchGate.forget(agentId);
|
|
13546
13548
|
defaultSchedulesFetchGate.forget(agentId);
|
|
13549
|
+
integrationsFetchGate.forget(agentId);
|
|
13550
|
+
quarantinedFetchGate.forget(agentId);
|
|
13551
|
+
lastIntegrationsPayload.delete(agentId);
|
|
13552
|
+
lastQuarantinedPayload.delete(agentId);
|
|
13547
13553
|
forgetRealtimeRebindState(agentId);
|
|
13548
13554
|
forgetChannelSyncState(agentId);
|
|
13549
13555
|
sharedBusyBuckets.reset(codeName);
|
|
@@ -13580,7 +13586,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13580
13586
|
var lastVersionCheckAt = 0;
|
|
13581
13587
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13582
13588
|
var lastResponsivenessProbeAt = 0;
|
|
13583
|
-
var agtCliVersion = true ? "0.28.
|
|
13589
|
+
var agtCliVersion = true ? "0.28.818" : "dev";
|
|
13584
13590
|
function resolveBrewPath(execFileSync2) {
|
|
13585
13591
|
try {
|
|
13586
13592
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -15104,8 +15110,20 @@ var lastRefreshPayload = /* @__PURE__ */ new Map();
|
|
|
15104
15110
|
var memoriesFetchGate = createFetchGate(DESIRED_STATE_FETCH_TTL_MS);
|
|
15105
15111
|
var secretsFetchGate = createFetchGate(DESIRED_STATE_FETCH_TTL_MS);
|
|
15106
15112
|
var defaultSchedulesFetchGate = createFetchGate(DESIRED_STATE_FETCH_TTL_MS);
|
|
15113
|
+
var integrationsFetchGate = createFetchGate(DESIRED_STATE_FETCH_TTL_MS);
|
|
15114
|
+
var lastIntegrationsPayload = /* @__PURE__ */ new Map();
|
|
15115
|
+
var quarantinedFetchGate = createFetchGate(DESIRED_STATE_FETCH_TTL_MS);
|
|
15116
|
+
var lastQuarantinedPayload = /* @__PURE__ */ new Map();
|
|
15117
|
+
function forceIntegrationsFetch(agentId) {
|
|
15118
|
+
integrationsFetchGate.forceNext(agentId);
|
|
15119
|
+
quarantinedFetchGate.forceNext(agentId);
|
|
15120
|
+
}
|
|
15107
15121
|
var pollCycleFetches = 0;
|
|
15108
15122
|
var pollCycleFetchSkips = 0;
|
|
15123
|
+
var pollCycleIntegrationsFetches = 0;
|
|
15124
|
+
var pollCycleIntegrationsSkips = 0;
|
|
15125
|
+
var pollCycleQuarantinedFetches = 0;
|
|
15126
|
+
var pollCycleQuarantinedSkips = 0;
|
|
15109
15127
|
var pollCycleMemoriesUnchanged = 0;
|
|
15110
15128
|
var pollCycleMemoriesFull = 0;
|
|
15111
15129
|
function forceRefreshFetch() {
|
|
@@ -15113,6 +15131,8 @@ function forceRefreshFetch() {
|
|
|
15113
15131
|
memoriesFetchGate.forceAll();
|
|
15114
15132
|
secretsFetchGate.forceAll();
|
|
15115
15133
|
defaultSchedulesFetchGate.forceAll();
|
|
15134
|
+
integrationsFetchGate.forceAll();
|
|
15135
|
+
quarantinedFetchGate.forceAll();
|
|
15116
15136
|
}
|
|
15117
15137
|
var consecutivePollFailures = 0;
|
|
15118
15138
|
function reorderRestartedFirst(agents, restartedIds) {
|
|
@@ -15131,7 +15151,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
15131
15151
|
if (codeNames.length === 0) return;
|
|
15132
15152
|
void (async () => {
|
|
15133
15153
|
try {
|
|
15134
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15154
|
+
const { collectDiagnostics } = await import("../persistent-session-AGMIVLTP.js");
|
|
15135
15155
|
await api.post("/host/heartbeat", {
|
|
15136
15156
|
host_id: hostId,
|
|
15137
15157
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -15272,7 +15292,7 @@ async function pollCycleInner() {
|
|
|
15272
15292
|
}
|
|
15273
15293
|
try {
|
|
15274
15294
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
15275
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15295
|
+
const { collectDiagnostics } = await import("../persistent-session-AGMIVLTP.js");
|
|
15276
15296
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
15277
15297
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
|
|
15278
15298
|
let tailscaleHostname;
|
|
@@ -15441,7 +15461,7 @@ async function pollCycleInner() {
|
|
|
15441
15461
|
collectPanelessActivityProbes,
|
|
15442
15462
|
getResponsivenessIntervalMs,
|
|
15443
15463
|
occupancyQualificationClassifications
|
|
15444
|
-
} = await import("../responsiveness-probe-
|
|
15464
|
+
} = await import("../responsiveness-probe-URK6CHNZ.js");
|
|
15445
15465
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
15446
15466
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
15447
15467
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -15558,7 +15578,7 @@ async function pollCycleInner() {
|
|
|
15558
15578
|
collectResponsivenessProbes,
|
|
15559
15579
|
livePendingInboundOldestAgeSeconds,
|
|
15560
15580
|
parkPendingInbound
|
|
15561
|
-
} = await import("../responsiveness-probe-
|
|
15581
|
+
} = await import("../responsiveness-probe-URK6CHNZ.js");
|
|
15562
15582
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
15563
15583
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
15564
15584
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -15714,7 +15734,7 @@ async function pollCycleInner() {
|
|
|
15714
15734
|
}
|
|
15715
15735
|
try {
|
|
15716
15736
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
15717
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
15737
|
+
const { probeSessionAuth } = await import("../session-auth-dead-5FPVU375.js");
|
|
15718
15738
|
const observations = [];
|
|
15719
15739
|
const pendingCacheCommits = [];
|
|
15720
15740
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -15877,6 +15897,10 @@ async function pollCycleInner() {
|
|
|
15877
15897
|
const cycleStartedAt = Date.now();
|
|
15878
15898
|
pollCycleFetches = 0;
|
|
15879
15899
|
pollCycleFetchSkips = 0;
|
|
15900
|
+
pollCycleIntegrationsFetches = 0;
|
|
15901
|
+
pollCycleIntegrationsSkips = 0;
|
|
15902
|
+
pollCycleQuarantinedFetches = 0;
|
|
15903
|
+
pollCycleQuarantinedSkips = 0;
|
|
15880
15904
|
pollCycleMemoriesUnchanged = 0;
|
|
15881
15905
|
pollCycleMemoriesFull = 0;
|
|
15882
15906
|
boardTokenCache.resetStats();
|
|
@@ -15920,7 +15944,7 @@ async function pollCycleInner() {
|
|
|
15920
15944
|
}
|
|
15921
15945
|
const boardStats = boardTokenCache.stats();
|
|
15922
15946
|
log(
|
|
15923
|
-
`[poll-cycle] agents=${processOrder.length} refresh_fetched=${pollCycleFetches} refresh_skipped=${pollCycleFetchSkips} memories_unchanged=${pollCycleMemoriesUnchanged} memories_full=${pollCycleMemoriesFull} board_unchanged=${boardStats.unchanged} board_full=${boardStats.full} board_refetch=${boardStats.refetch} duration_ms=${Date.now() - cycleStartedAt}`
|
|
15947
|
+
`[poll-cycle] agents=${processOrder.length} refresh_fetched=${pollCycleFetches} refresh_skipped=${pollCycleFetchSkips} memories_unchanged=${pollCycleMemoriesUnchanged} memories_full=${pollCycleMemoriesFull} board_unchanged=${boardStats.unchanged} board_full=${boardStats.full} board_refetch=${boardStats.refetch} integrations_fetched=${pollCycleIntegrationsFetches} integrations_skipped=${pollCycleIntegrationsSkips} quarantined_fetched=${pollCycleQuarantinedFetches} quarantined_skipped=${pollCycleQuarantinedSkips} duration_ms=${Date.now() - cycleStartedAt}`
|
|
15924
15948
|
);
|
|
15925
15949
|
void maybeReportActivityCache({ api, log });
|
|
15926
15950
|
const crossAgentPrune = managedPruneLedger.summarize();
|
|
@@ -17556,8 +17580,22 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
17556
17580
|
}
|
|
17557
17581
|
}
|
|
17558
17582
|
try {
|
|
17559
|
-
const
|
|
17560
|
-
|
|
17583
|
+
const fetchIntegrations = async () => {
|
|
17584
|
+
const integrationsData = await api.post("/host/agent-integrations", { agent_id: agent.agent_id });
|
|
17585
|
+
return (integrationsData.integrations ?? []).map(withResolvedRemoteMcp);
|
|
17586
|
+
};
|
|
17587
|
+
const integrationsToken = integrationsFetchGate.beginFetch(agent.agent_id);
|
|
17588
|
+
const cachedIntegrations = lastIntegrationsPayload.get(agent.agent_id);
|
|
17589
|
+
let integrations;
|
|
17590
|
+
if (cachedIntegrations !== void 0 && !integrationsFetchGate.shouldFetch(agent.agent_id)) {
|
|
17591
|
+
integrations = cachedIntegrations;
|
|
17592
|
+
pollCycleIntegrationsSkips += 1;
|
|
17593
|
+
} else {
|
|
17594
|
+
integrations = await fetchIntegrations();
|
|
17595
|
+
lastIntegrationsPayload.set(agent.agent_id, integrations);
|
|
17596
|
+
integrationsFetchGate.markFetched(agent.agent_id, integrationsToken);
|
|
17597
|
+
pollCycleIntegrationsFetches += 1;
|
|
17598
|
+
}
|
|
17561
17599
|
recordEffectiveIntegrationIds(
|
|
17562
17600
|
effectiveIntegrationObservations,
|
|
17563
17601
|
agent.agent_id,
|
|
@@ -17620,9 +17658,23 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
17620
17658
|
try {
|
|
17621
17659
|
const probeProjectDir = join41(homedir17(), ".augmented", agent.code_name, "project");
|
|
17622
17660
|
let probeSet = integrations;
|
|
17623
|
-
|
|
17661
|
+
const fetchQuarantined = async () => {
|
|
17624
17662
|
const quarantined = await api.post("/host/agent-integrations/quarantined", { agent_id: agent.agent_id });
|
|
17625
|
-
|
|
17663
|
+
return quarantined.integrations ?? [];
|
|
17664
|
+
};
|
|
17665
|
+
try {
|
|
17666
|
+
const quarantinedToken = quarantinedFetchGate.beginFetch(agent.agent_id);
|
|
17667
|
+
const cachedQuarantined = lastQuarantinedPayload.get(agent.agent_id);
|
|
17668
|
+
let qRows;
|
|
17669
|
+
if (cachedQuarantined !== void 0 && !quarantinedFetchGate.shouldFetch(agent.agent_id)) {
|
|
17670
|
+
qRows = cachedQuarantined;
|
|
17671
|
+
pollCycleQuarantinedSkips += 1;
|
|
17672
|
+
} else {
|
|
17673
|
+
qRows = await fetchQuarantined();
|
|
17674
|
+
lastQuarantinedPayload.set(agent.agent_id, qRows);
|
|
17675
|
+
quarantinedFetchGate.markFetched(agent.agent_id, quarantinedToken);
|
|
17676
|
+
pollCycleQuarantinedFetches += 1;
|
|
17677
|
+
}
|
|
17626
17678
|
if (qRows.length > 0) {
|
|
17627
17679
|
for (const q of qRows) {
|
|
17628
17680
|
if (q.inline_server_entry) continue;
|
|
@@ -19882,7 +19934,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
19882
19934
|
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}`));
|
|
19883
19935
|
void (async () => {
|
|
19884
19936
|
try {
|
|
19885
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19937
|
+
const { collectDiagnostics } = await import("../persistent-session-AGMIVLTP.js");
|
|
19886
19938
|
await api.post("/host/heartbeat", {
|
|
19887
19939
|
host_id: hostId,
|
|
19888
19940
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -19928,7 +19980,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
19928
19980
|
}
|
|
19929
19981
|
try {
|
|
19930
19982
|
const hostId = await getHostId();
|
|
19931
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19983
|
+
const { collectDiagnostics } = await import("../persistent-session-AGMIVLTP.js");
|
|
19932
19984
|
await api.post("/host/heartbeat", {
|
|
19933
19985
|
host_id: hostId,
|
|
19934
19986
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -20564,7 +20616,7 @@ async function processClaudePairSessions(agents) {
|
|
|
20564
20616
|
killPairSession,
|
|
20565
20617
|
pairTmuxSession,
|
|
20566
20618
|
finalizeClaudePairOnboarding
|
|
20567
|
-
} = await import("../claude-pair-runtime-
|
|
20619
|
+
} = await import("../claude-pair-runtime-HVO7IOCM.js");
|
|
20568
20620
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
20569
20621
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
20570
20622
|
const killed = await killPairSession(pairTmuxSession(pairId));
|