@integrity-labs/agt-cli 0.28.853 → 0.28.855
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-XCAI3GSF.js → chunk-7YVKIYVW.js} +2 -2
- package/dist/{chunk-WUXQVP7A.js → chunk-IHBWFKOW.js} +172 -3
- package/dist/chunk-IHBWFKOW.js.map +1 -0
- package/dist/{chunk-6BA2US4B.js → chunk-RKCG63PT.js} +4 -4
- package/dist/{claude-pair-runtime-CJXQTVSC.js → claude-pair-runtime-FFUPKRVC.js} +2 -2
- package/dist/lib/manager-worker.js +37 -21
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +133 -0
- package/dist/mcp/index.js +133 -0
- package/dist/mcp/origami.js +133 -0
- package/dist/mcp/slack-channel.js +133 -0
- package/dist/mcp/telegram-channel.js +133 -0
- package/dist/{persistent-session-YGK7YHPR.js → persistent-session-CNVU25IF.js} +3 -3
- package/dist/{responsiveness-probe-NGWO3JK3.js → responsiveness-probe-TZOKOH6C.js} +3 -3
- package/dist/{session-auth-dead-4UZR5655.js → session-auth-dead-GRYXFDYD.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-WUXQVP7A.js.map +0 -1
- /package/dist/{chunk-XCAI3GSF.js.map → chunk-7YVKIYVW.js.map} +0 -0
- /package/dist/{chunk-6BA2US4B.js.map → chunk-RKCG63PT.js.map} +0 -0
- /package/dist/{claude-pair-runtime-CJXQTVSC.js.map → claude-pair-runtime-FFUPKRVC.js.map} +0 -0
- /package/dist/{persistent-session-YGK7YHPR.js.map → persistent-session-CNVU25IF.js.map} +0 -0
- /package/dist/{responsiveness-probe-NGWO3JK3.js.map → responsiveness-probe-TZOKOH6C.js.map} +0 -0
- /package/dist/{session-auth-dead-4UZR5655.js.map → session-auth-dead-GRYXFDYD.js.map} +0 -0
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
parseEnvIntegrations,
|
|
17
17
|
shellQuote,
|
|
18
18
|
summarizeUnanswerablePane
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7YVKIYVW.js";
|
|
20
20
|
import {
|
|
21
21
|
BIND_FAILURE_QUARANTINE_THRESHOLD,
|
|
22
22
|
INTEGRATIONS_SECTION_END,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
sessionTranscriptDir,
|
|
77
77
|
worseConnectivityOutcome,
|
|
78
78
|
wrapScheduledTaskPrompt
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-IHBWFKOW.js";
|
|
80
80
|
import {
|
|
81
81
|
parsePsRows
|
|
82
82
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -6566,7 +6566,7 @@ function exchangeFailureKind(err) {
|
|
|
6566
6566
|
}
|
|
6567
6567
|
|
|
6568
6568
|
// src/lib/api-client.ts
|
|
6569
|
-
var agtCliVersion = true ? "0.28.
|
|
6569
|
+
var agtCliVersion = true ? "0.28.855" : "dev";
|
|
6570
6570
|
var lastConfigHash = null;
|
|
6571
6571
|
function setConfigHash(hash) {
|
|
6572
6572
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10924,4 +10924,4 @@ export {
|
|
|
10924
10924
|
managerInstallSystemUnitCommand,
|
|
10925
10925
|
managerUninstallSystemUnitCommand
|
|
10926
10926
|
};
|
|
10927
|
-
//# sourceMappingURL=chunk-
|
|
10927
|
+
//# sourceMappingURL=chunk-RKCG63PT.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-CNVU25IF.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-FFUPKRVC.js.map
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
safeWriteJsonAtomic,
|
|
61
61
|
setConfigHash,
|
|
62
62
|
tripClass
|
|
63
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-RKCG63PT.js";
|
|
64
64
|
import {
|
|
65
65
|
getProjectDir as getProjectDir2,
|
|
66
66
|
getReadyTasks,
|
|
@@ -126,7 +126,7 @@ import {
|
|
|
126
126
|
takeZombieDetection,
|
|
127
127
|
toOpencodeModel,
|
|
128
128
|
writeEgressAllowlist
|
|
129
|
-
} from "../chunk-
|
|
129
|
+
} from "../chunk-7YVKIYVW.js";
|
|
130
130
|
import {
|
|
131
131
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
132
132
|
AnchorSessionClient,
|
|
@@ -221,7 +221,7 @@ import {
|
|
|
221
221
|
subagentActivityAgeSeconds,
|
|
222
222
|
sumTranscriptUsageInWindow,
|
|
223
223
|
transcriptActivityAgeSeconds
|
|
224
|
-
} from "../chunk-
|
|
224
|
+
} from "../chunk-IHBWFKOW.js";
|
|
225
225
|
import {
|
|
226
226
|
reapOrphanChannelMcps
|
|
227
227
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -2194,7 +2194,8 @@ async function reportModelApiError(opts) {
|
|
|
2194
2194
|
model_id: opts.modelId ?? null,
|
|
2195
2195
|
// Content-free by contract, but bound it defensively.
|
|
2196
2196
|
detail: opts.detail ? opts.detail.slice(0, 500) : null,
|
|
2197
|
-
occurred_at: opts.occurredAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
2197
|
+
occurred_at: opts.occurredAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
2198
|
+
policy_id: opts.policyId ?? null
|
|
2198
2199
|
});
|
|
2199
2200
|
} catch (err) {
|
|
2200
2201
|
opts.log?.(
|
|
@@ -13000,7 +13001,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
13000
13001
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
13001
13002
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
13002
13003
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
13003
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
13004
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-TZOKOH6C.js");
|
|
13004
13005
|
const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
|
|
13005
13006
|
if (newest === null) return null;
|
|
13006
13007
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -13668,7 +13669,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13668
13669
|
var lastVersionCheckAt = 0;
|
|
13669
13670
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13670
13671
|
var lastResponsivenessProbeAt = 0;
|
|
13671
|
-
var agtCliVersion = true ? "0.28.
|
|
13672
|
+
var agtCliVersion = true ? "0.28.855" : "dev";
|
|
13672
13673
|
function resolveBrewPath(execFileSync2) {
|
|
13673
13674
|
try {
|
|
13674
13675
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -15258,7 +15259,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
15258
15259
|
if (codeNames.length === 0) return;
|
|
15259
15260
|
void (async () => {
|
|
15260
15261
|
try {
|
|
15261
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15262
|
+
const { collectDiagnostics } = await import("../persistent-session-CNVU25IF.js");
|
|
15262
15263
|
await api.post("/host/heartbeat", {
|
|
15263
15264
|
host_id: hostId,
|
|
15264
15265
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -15313,7 +15314,7 @@ async function pollCycleInner() {
|
|
|
15313
15314
|
stopPersistentSessionAndForgetMcpBaseline(codeName, breakerReason);
|
|
15314
15315
|
agentState.persistentSessionAgents.delete(codeName);
|
|
15315
15316
|
claudeAuthTupleBySession.delete(codeName);
|
|
15316
|
-
|
|
15317
|
+
clearSessionPolicyBaseline(codeName);
|
|
15317
15318
|
},
|
|
15318
15319
|
getTelegramTokens: (codeName) => {
|
|
15319
15320
|
const t = agentChannelTokens.get(codeName);
|
|
@@ -15400,7 +15401,7 @@ async function pollCycleInner() {
|
|
|
15400
15401
|
}
|
|
15401
15402
|
try {
|
|
15402
15403
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
15403
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15404
|
+
const { collectDiagnostics } = await import("../persistent-session-CNVU25IF.js");
|
|
15404
15405
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
15405
15406
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
|
|
15406
15407
|
let tailscaleHostname;
|
|
@@ -15569,7 +15570,7 @@ async function pollCycleInner() {
|
|
|
15569
15570
|
collectPanelessActivityProbes,
|
|
15570
15571
|
getResponsivenessIntervalMs,
|
|
15571
15572
|
occupancyQualificationClassifications
|
|
15572
|
-
} = await import("../responsiveness-probe-
|
|
15573
|
+
} = await import("../responsiveness-probe-TZOKOH6C.js");
|
|
15573
15574
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
15574
15575
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
15575
15576
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -15686,7 +15687,7 @@ async function pollCycleInner() {
|
|
|
15686
15687
|
collectResponsivenessProbes,
|
|
15687
15688
|
livePendingInboundOldestAgeSeconds,
|
|
15688
15689
|
parkPendingInbound
|
|
15689
|
-
} = await import("../responsiveness-probe-
|
|
15690
|
+
} = await import("../responsiveness-probe-TZOKOH6C.js");
|
|
15690
15691
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
15691
15692
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
15692
15693
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -15842,7 +15843,7 @@ async function pollCycleInner() {
|
|
|
15842
15843
|
}
|
|
15843
15844
|
try {
|
|
15844
15845
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
15845
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
15846
|
+
const { probeSessionAuth } = await import("../session-auth-dead-GRYXFDYD.js");
|
|
15846
15847
|
const observations = [];
|
|
15847
15848
|
const pendingCacheCommits = [];
|
|
15848
15849
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -15871,6 +15872,11 @@ async function pollCycleInner() {
|
|
|
15871
15872
|
errorClass: observedErr.errorClass,
|
|
15872
15873
|
httpStatus: observedErr.httpStatus,
|
|
15873
15874
|
agentCodeName: codeName,
|
|
15875
|
+
// ENG-10156: the policy this session was LAUNCHED under, read from
|
|
15876
|
+
// the baseline rather than resolved now — see
|
|
15877
|
+
// `modelPolicyIdBySession`. Absent for an unpoliced agent, and for
|
|
15878
|
+
// one whose policy did not shape the session.
|
|
15879
|
+
policyId: modelPolicyIdBySession.get(codeName) ?? null,
|
|
15874
15880
|
detail: `agent pane: ${observedErr.errorClass}`,
|
|
15875
15881
|
log
|
|
15876
15882
|
});
|
|
@@ -19124,6 +19130,17 @@ var DAY_ROLLOVER_INBOUND_DEFER_MAX_MIN = 10;
|
|
|
19124
19130
|
var persistentSessionStuckTracker = new PersistentSessionStuckTracker();
|
|
19125
19131
|
var claudeAuthTupleBySession = /* @__PURE__ */ new Map();
|
|
19126
19132
|
var modelPolicyModelBySession = /* @__PURE__ */ new Map();
|
|
19133
|
+
var modelPolicyIdBySession = /* @__PURE__ */ new Map();
|
|
19134
|
+
function recordSessionPolicyBaseline(codeName, policyModel, policyId) {
|
|
19135
|
+
if (policyModel) modelPolicyModelBySession.set(codeName, policyModel);
|
|
19136
|
+
else modelPolicyModelBySession.delete(codeName);
|
|
19137
|
+
if (policyId) modelPolicyIdBySession.set(codeName, policyId);
|
|
19138
|
+
else modelPolicyIdBySession.delete(codeName);
|
|
19139
|
+
}
|
|
19140
|
+
function clearSessionPolicyBaseline(codeName) {
|
|
19141
|
+
modelPolicyModelBySession.delete(codeName);
|
|
19142
|
+
modelPolicyIdBySession.delete(codeName);
|
|
19143
|
+
}
|
|
19127
19144
|
var opencodeCredentialFingerprintBySession = /* @__PURE__ */ new Map();
|
|
19128
19145
|
var egressAllowlistBySession = /* @__PURE__ */ new Map();
|
|
19129
19146
|
function deriveEgressAllowlist(toolsRaw, policy) {
|
|
@@ -19334,7 +19351,7 @@ async function ensurePersistentSession(agent, tasks, boardItems, refreshData) {
|
|
|
19334
19351
|
});
|
|
19335
19352
|
agentState.persistentSessionAgents.delete(codeName);
|
|
19336
19353
|
claudeAuthTupleBySession.delete(codeName);
|
|
19337
|
-
|
|
19354
|
+
clearSessionPolicyBaseline(codeName);
|
|
19338
19355
|
}
|
|
19339
19356
|
return {
|
|
19340
19357
|
decision: "skipped-auth-resolve-failed",
|
|
@@ -19398,6 +19415,7 @@ async function ensurePersistentSession(agent, tasks, boardItems, refreshData) {
|
|
|
19398
19415
|
gatewayToken: null,
|
|
19399
19416
|
codeName
|
|
19400
19417
|
});
|
|
19418
|
+
const currentPolicyId = currentPolicyModel ? modelPolicy?.policyId ?? null : null;
|
|
19401
19419
|
const recordedAuthTuple = claudeAuthTupleBySession.get(codeName);
|
|
19402
19420
|
const recordedPolicyModel = modelPolicyModelBySession.get(codeName);
|
|
19403
19421
|
if (recordedAuthTuple && recordedAuthTuple !== currentAuthTuple && isSessionHealthy(codeName)) {
|
|
@@ -19709,8 +19727,7 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash20("sha256")
|
|
|
19709
19727
|
});
|
|
19710
19728
|
agentState.persistentSessionAgents.add(codeName);
|
|
19711
19729
|
claudeAuthTupleBySession.set(codeName, currentAuthTuple);
|
|
19712
|
-
|
|
19713
|
-
else modelPolicyModelBySession.delete(codeName);
|
|
19730
|
+
recordSessionPolicyBaseline(codeName, currentPolicyModel, currentPolicyId);
|
|
19714
19731
|
seedSessionLaunchBaselines(codeName, projectDir);
|
|
19715
19732
|
return {
|
|
19716
19733
|
decision: "spawn",
|
|
@@ -19750,8 +19767,7 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash20("sha256")
|
|
|
19750
19767
|
}
|
|
19751
19768
|
if (!claudeAuthTupleBySession.has(codeName)) {
|
|
19752
19769
|
claudeAuthTupleBySession.set(codeName, currentAuthTuple);
|
|
19753
|
-
|
|
19754
|
-
else modelPolicyModelBySession.delete(codeName);
|
|
19770
|
+
recordSessionPolicyBaseline(codeName, currentPolicyModel, currentPolicyId);
|
|
19755
19771
|
}
|
|
19756
19772
|
const stableTasksHash = createHash20("sha256").update(JSON.stringify(tasks)).digest("hex").slice(0, 16);
|
|
19757
19773
|
const prevHash = agentState.knownTasksHashes.get(agent.agent_id);
|
|
@@ -20055,7 +20071,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
20055
20071
|
try {
|
|
20056
20072
|
const freshId = rotateSessionForWedge(codeName);
|
|
20057
20073
|
consecutiveWedgeCycles.delete(codeName);
|
|
20058
|
-
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-
|
|
20074
|
+
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-TZOKOH6C.js");
|
|
20059
20075
|
const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
|
|
20060
20076
|
const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
|
|
20061
20077
|
const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
|
|
@@ -20093,7 +20109,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
20093
20109
|
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}`));
|
|
20094
20110
|
void (async () => {
|
|
20095
20111
|
try {
|
|
20096
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
20112
|
+
const { collectDiagnostics } = await import("../persistent-session-CNVU25IF.js");
|
|
20097
20113
|
await api.post("/host/heartbeat", {
|
|
20098
20114
|
host_id: hostId,
|
|
20099
20115
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -20139,7 +20155,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
20139
20155
|
}
|
|
20140
20156
|
try {
|
|
20141
20157
|
const hostId = await getHostId();
|
|
20142
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
20158
|
+
const { collectDiagnostics } = await import("../persistent-session-CNVU25IF.js");
|
|
20143
20159
|
await api.post("/host/heartbeat", {
|
|
20144
20160
|
host_id: hostId,
|
|
20145
20161
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -20775,7 +20791,7 @@ async function processClaudePairSessions(agents) {
|
|
|
20775
20791
|
killPairSession,
|
|
20776
20792
|
pairTmuxSession,
|
|
20777
20793
|
finalizeClaudePairOnboarding
|
|
20778
|
-
} = await import("../claude-pair-runtime-
|
|
20794
|
+
} = await import("../claude-pair-runtime-FFUPKRVC.js");
|
|
20779
20795
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
20780
20796
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
20781
20797
|
const killed = await killPairSession(pairTmuxSession(pairId));
|