@integrity-labs/agt-cli 0.28.644 → 0.28.645
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-REWZFCUX.js → chunk-2MDR3ZHP.js} +2 -2
- package/dist/{chunk-REWZFCUX.js.map → chunk-2MDR3ZHP.js.map} +1 -1
- package/dist/{chunk-V2NZ2PAA.js → chunk-T47HZECK.js} +4 -4
- package/dist/{chunk-HYLJPTKL.js → chunk-Z2SA7JLD.js} +2 -2
- package/dist/{claude-pair-runtime-F2O36YHH.js → claude-pair-runtime-YA5QHYHF.js} +2 -2
- package/dist/lib/manager-worker.js +13 -13
- package/dist/mcp/direct-chat-channel.js +71 -3
- package/dist/{persistent-session-JJ7L23KO.js → persistent-session-ZXOO6LYN.js} +3 -3
- package/dist/{responsiveness-probe-JAME5YLS.js → responsiveness-probe-RQCDK5LF.js} +3 -3
- package/dist/{session-auth-dead-WX47XEZJ.js → session-auth-dead-DPY5S3RZ.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-V2NZ2PAA.js.map → chunk-T47HZECK.js.map} +0 -0
- /package/dist/{chunk-HYLJPTKL.js.map → chunk-Z2SA7JLD.js.map} +0 -0
- /package/dist/{claude-pair-runtime-F2O36YHH.js.map → claude-pair-runtime-YA5QHYHF.js.map} +0 -0
- /package/dist/{persistent-session-JJ7L23KO.js.map → persistent-session-ZXOO6LYN.js.map} +0 -0
- /package/dist/{responsiveness-probe-JAME5YLS.js.map → responsiveness-probe-RQCDK5LF.js.map} +0 -0
- /package/dist/{session-auth-dead-WX47XEZJ.js.map → session-auth-dead-DPY5S3RZ.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
isolationMode,
|
|
9
9
|
log,
|
|
10
10
|
parseEnvIntegrations
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Z2SA7JLD.js";
|
|
12
12
|
import {
|
|
13
13
|
BIND_FAILURE_QUARANTINE_THRESHOLD,
|
|
14
14
|
INTEGRATIONS_SECTION_END,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
resolveConnectivityProbe,
|
|
56
56
|
worseConnectivityOutcome,
|
|
57
57
|
wrapScheduledTaskPrompt
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-2MDR3ZHP.js";
|
|
59
59
|
import {
|
|
60
60
|
parsePsRows
|
|
61
61
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -6073,7 +6073,7 @@ function exchangeFailureKind(err) {
|
|
|
6073
6073
|
}
|
|
6074
6074
|
|
|
6075
6075
|
// src/lib/api-client.ts
|
|
6076
|
-
var agtCliVersion = true ? "0.28.
|
|
6076
|
+
var agtCliVersion = true ? "0.28.645" : "dev";
|
|
6077
6077
|
var lastConfigHash = null;
|
|
6078
6078
|
function setConfigHash(hash) {
|
|
6079
6079
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -9814,4 +9814,4 @@ export {
|
|
|
9814
9814
|
managerInstallSystemUnitCommand,
|
|
9815
9815
|
managerUninstallSystemUnitCommand
|
|
9816
9816
|
};
|
|
9817
|
-
//# sourceMappingURL=chunk-
|
|
9817
|
+
//# sourceMappingURL=chunk-T47HZECK.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
rotateDailySession,
|
|
17
17
|
sessionFileExists,
|
|
18
18
|
todayLocalIso
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2MDR3ZHP.js";
|
|
20
20
|
import {
|
|
21
21
|
reapOrphanChannelMcps
|
|
22
22
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -4313,4 +4313,4 @@ export {
|
|
|
4313
4313
|
stopAllSessionsAndWait,
|
|
4314
4314
|
getProjectDir
|
|
4315
4315
|
};
|
|
4316
|
-
//# sourceMappingURL=chunk-
|
|
4316
|
+
//# sourceMappingURL=chunk-Z2SA7JLD.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-ZXOO6LYN.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-YA5QHYHF.js.map
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
safeWriteJsonAtomic,
|
|
56
56
|
setConfigHash,
|
|
57
57
|
tripClass
|
|
58
|
-
} from "../chunk-
|
|
58
|
+
} from "../chunk-T47HZECK.js";
|
|
59
59
|
import {
|
|
60
60
|
getProjectDir as getProjectDir2,
|
|
61
61
|
getReadyTasks,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
takeZombieDetection,
|
|
112
112
|
toOpencodeModel,
|
|
113
113
|
writeEgressAllowlist
|
|
114
|
-
} from "../chunk-
|
|
114
|
+
} from "../chunk-Z2SA7JLD.js";
|
|
115
115
|
import {
|
|
116
116
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
117
117
|
AnchorSessionClient,
|
|
@@ -188,7 +188,7 @@ import {
|
|
|
188
188
|
subagentActivityAgeSeconds,
|
|
189
189
|
sumTranscriptUsageInWindow,
|
|
190
190
|
transcriptActivityAgeSeconds
|
|
191
|
-
} from "../chunk-
|
|
191
|
+
} from "../chunk-2MDR3ZHP.js";
|
|
192
192
|
import {
|
|
193
193
|
reapOrphanChannelMcps
|
|
194
194
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -11535,7 +11535,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
11535
11535
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
11536
11536
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
11537
11537
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
11538
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
11538
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-RQCDK5LF.js");
|
|
11539
11539
|
const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
|
|
11540
11540
|
if (newest === null) return null;
|
|
11541
11541
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -12178,7 +12178,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
12178
12178
|
var lastVersionCheckAt = 0;
|
|
12179
12179
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
12180
12180
|
var lastResponsivenessProbeAt = 0;
|
|
12181
|
-
var agtCliVersion = true ? "0.28.
|
|
12181
|
+
var agtCliVersion = true ? "0.28.645" : "dev";
|
|
12182
12182
|
function resolveBrewPath(execFileSync3) {
|
|
12183
12183
|
try {
|
|
12184
12184
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -13485,7 +13485,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
13485
13485
|
if (codeNames.length === 0) return;
|
|
13486
13486
|
void (async () => {
|
|
13487
13487
|
try {
|
|
13488
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
13488
|
+
const { collectDiagnostics } = await import("../persistent-session-ZXOO6LYN.js");
|
|
13489
13489
|
await api.post("/host/heartbeat", {
|
|
13490
13490
|
host_id: hostId,
|
|
13491
13491
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
|
|
@@ -13601,7 +13601,7 @@ async function pollCycleInner() {
|
|
|
13601
13601
|
}
|
|
13602
13602
|
try {
|
|
13603
13603
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
13604
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
13604
|
+
const { collectDiagnostics } = await import("../persistent-session-ZXOO6LYN.js");
|
|
13605
13605
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
13606
13606
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor) : void 0;
|
|
13607
13607
|
let tailscaleHostname;
|
|
@@ -13724,7 +13724,7 @@ async function pollCycleInner() {
|
|
|
13724
13724
|
collectPanelessActivityProbes,
|
|
13725
13725
|
getResponsivenessIntervalMs,
|
|
13726
13726
|
occupancyQualificationClassifications
|
|
13727
|
-
} = await import("../responsiveness-probe-
|
|
13727
|
+
} = await import("../responsiveness-probe-RQCDK5LF.js");
|
|
13728
13728
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
13729
13729
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
13730
13730
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -13830,7 +13830,7 @@ async function pollCycleInner() {
|
|
|
13830
13830
|
collectResponsivenessProbes,
|
|
13831
13831
|
livePendingInboundOldestAgeSeconds,
|
|
13832
13832
|
parkPendingInbound
|
|
13833
|
-
} = await import("../responsiveness-probe-
|
|
13833
|
+
} = await import("../responsiveness-probe-RQCDK5LF.js");
|
|
13834
13834
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
13835
13835
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
13836
13836
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -13986,7 +13986,7 @@ async function pollCycleInner() {
|
|
|
13986
13986
|
}
|
|
13987
13987
|
try {
|
|
13988
13988
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
13989
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
13989
|
+
const { probeSessionAuth } = await import("../session-auth-dead-DPY5S3RZ.js");
|
|
13990
13990
|
const observations = [];
|
|
13991
13991
|
const pendingCacheCommits = [];
|
|
13992
13992
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -17619,7 +17619,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
17619
17619
|
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}`));
|
|
17620
17620
|
void (async () => {
|
|
17621
17621
|
try {
|
|
17622
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
17622
|
+
const { collectDiagnostics } = await import("../persistent-session-ZXOO6LYN.js");
|
|
17623
17623
|
await api.post("/host/heartbeat", {
|
|
17624
17624
|
host_id: hostId,
|
|
17625
17625
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
|
|
@@ -17670,7 +17670,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
17670
17670
|
}
|
|
17671
17671
|
try {
|
|
17672
17672
|
const hostId = await getHostId();
|
|
17673
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
17673
|
+
const { collectDiagnostics } = await import("../persistent-session-ZXOO6LYN.js");
|
|
17674
17674
|
await api.post("/host/heartbeat", {
|
|
17675
17675
|
host_id: hostId,
|
|
17676
17676
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
|
|
@@ -18267,7 +18267,7 @@ async function processClaudePairSessions(agents) {
|
|
|
18267
18267
|
killPairSession,
|
|
18268
18268
|
pairTmuxSession,
|
|
18269
18269
|
finalizeClaudePairOnboarding
|
|
18270
|
-
} = await import("../claude-pair-runtime-
|
|
18270
|
+
} = await import("../claude-pair-runtime-YA5QHYHF.js");
|
|
18271
18271
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
18272
18272
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
18273
18273
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -29641,6 +29641,75 @@ function emitToolCallMarkupRedactionTelemetry(channel) {
|
|
|
29641
29641
|
}
|
|
29642
29642
|
}
|
|
29643
29643
|
|
|
29644
|
+
// src/http-failure-summary.ts
|
|
29645
|
+
var MAX_EXCERPT = 300;
|
|
29646
|
+
var MAX_BODY_BYTES = 16 * 1024;
|
|
29647
|
+
var CONTROL_CHARS = /[\x00-\x1F\x7F-\x9F]/g;
|
|
29648
|
+
function utf8Bytes(s) {
|
|
29649
|
+
return Buffer.byteLength(s, "utf8");
|
|
29650
|
+
}
|
|
29651
|
+
function summariseFailureBody(raw, size) {
|
|
29652
|
+
const totalBytes = size?.totalBytes ?? utf8Bytes(raw);
|
|
29653
|
+
const atLeast = size?.atLeast ?? false;
|
|
29654
|
+
const flattened = raw.replace(/\s+/g, " ").replace(CONTROL_CHARS, "").trim();
|
|
29655
|
+
if (flattened.length === 0) {
|
|
29656
|
+
return "<empty body>";
|
|
29657
|
+
}
|
|
29658
|
+
const excerpt = flattened.length > MAX_EXCERPT ? `${flattened.slice(0, MAX_EXCERPT)}\u2026 (${atLeast ? "\u2265" : ""}${totalBytes} bytes total)` : flattened;
|
|
29659
|
+
if (isHtml(flattened)) {
|
|
29660
|
+
return `non-JSON HTML body (NOT from our API \u2014 every API error is JSON): ${excerpt}`;
|
|
29661
|
+
}
|
|
29662
|
+
return excerpt;
|
|
29663
|
+
}
|
|
29664
|
+
function isHtml(flattened) {
|
|
29665
|
+
const head = flattened.slice(0, 200).toLowerCase();
|
|
29666
|
+
return head.startsWith("<!doctype html") || head.startsWith("<html") || head.startsWith("<?xml");
|
|
29667
|
+
}
|
|
29668
|
+
async function readBoundedBody(res) {
|
|
29669
|
+
const body = res.body;
|
|
29670
|
+
if (!body || typeof body.getReader !== "function") {
|
|
29671
|
+
if (typeof res.text !== "function") {
|
|
29672
|
+
return { text: "", size: { totalBytes: 0, atLeast: false } };
|
|
29673
|
+
}
|
|
29674
|
+
const whole = await res.text();
|
|
29675
|
+
return { text: whole, size: { totalBytes: utf8Bytes(whole), atLeast: false } };
|
|
29676
|
+
}
|
|
29677
|
+
const reader = body.getReader();
|
|
29678
|
+
const decoder = new TextDecoder();
|
|
29679
|
+
const parts = [];
|
|
29680
|
+
let bytes = 0;
|
|
29681
|
+
let capped = false;
|
|
29682
|
+
try {
|
|
29683
|
+
for (; ; ) {
|
|
29684
|
+
const { done, value } = await reader.read();
|
|
29685
|
+
if (done) break;
|
|
29686
|
+
bytes += value.byteLength;
|
|
29687
|
+
if (bytes > MAX_BODY_BYTES) {
|
|
29688
|
+
const keep = value.byteLength - (bytes - MAX_BODY_BYTES);
|
|
29689
|
+
if (keep > 0) parts.push(decoder.decode(value.subarray(0, keep), { stream: true }));
|
|
29690
|
+
capped = true;
|
|
29691
|
+
break;
|
|
29692
|
+
}
|
|
29693
|
+
parts.push(decoder.decode(value, { stream: true }));
|
|
29694
|
+
}
|
|
29695
|
+
} finally {
|
|
29696
|
+
if (capped) {
|
|
29697
|
+
await reader.cancel().catch(() => {
|
|
29698
|
+
});
|
|
29699
|
+
}
|
|
29700
|
+
}
|
|
29701
|
+
parts.push(decoder.decode());
|
|
29702
|
+
return { text: parts.join(""), size: { totalBytes: bytes, atLeast: capped } };
|
|
29703
|
+
}
|
|
29704
|
+
async function describeFailedResponse(res) {
|
|
29705
|
+
try {
|
|
29706
|
+
const { text, size } = await readBoundedBody(res);
|
|
29707
|
+
return summariseFailureBody(text, size);
|
|
29708
|
+
} catch (err) {
|
|
29709
|
+
return `<body unreadable: ${err instanceof Error ? err.message : String(err)}>`;
|
|
29710
|
+
}
|
|
29711
|
+
}
|
|
29712
|
+
|
|
29644
29713
|
// src/transient-api-error.ts
|
|
29645
29714
|
var CODE_KIND = {
|
|
29646
29715
|
"429": "rate_limit",
|
|
@@ -37686,8 +37755,7 @@ async function getAuthToken() {
|
|
|
37686
37755
|
body: JSON.stringify({ host_key: AGT_API_KEY, agent_id: AGT_AGENT_ID })
|
|
37687
37756
|
}, HTTP_TIMEOUT_MS);
|
|
37688
37757
|
if (!res.ok) {
|
|
37689
|
-
|
|
37690
|
-
throw new Error(`Auth exchange failed (${res.status}): ${body.slice(0, 200)}`);
|
|
37758
|
+
throw new Error(`Auth exchange failed (${res.status}): ${await describeFailedResponse(res)}`);
|
|
37691
37759
|
}
|
|
37692
37760
|
const data = await res.json();
|
|
37693
37761
|
authToken = data.token;
|
|
@@ -38317,7 +38385,7 @@ async function pollForMessages(sinceMs) {
|
|
|
38317
38385
|
});
|
|
38318
38386
|
if (!res.ok) {
|
|
38319
38387
|
process.stderr.write(
|
|
38320
|
-
`direct-chat-channel: poll returned HTTP ${res.status} \u2014 pull skipped this tick
|
|
38388
|
+
`direct-chat-channel: poll returned HTTP ${res.status} \u2014 pull skipped this tick \u2014 ${await describeFailedResponse(res)}
|
|
38321
38389
|
`
|
|
38322
38390
|
);
|
|
38323
38391
|
return;
|
|
@@ -43,8 +43,8 @@ import {
|
|
|
43
43
|
writeDirectChatSessionState,
|
|
44
44
|
writeEgressAllowlist,
|
|
45
45
|
writePersistentClaudeWrapper
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-Z2SA7JLD.js";
|
|
47
|
+
import "./chunk-2MDR3ZHP.js";
|
|
48
48
|
import "./chunk-XWVM4KPK.js";
|
|
49
49
|
export {
|
|
50
50
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -92,4 +92,4 @@ export {
|
|
|
92
92
|
writeEgressAllowlist,
|
|
93
93
|
writePersistentClaudeWrapper
|
|
94
94
|
};
|
|
95
|
-
//# sourceMappingURL=persistent-session-
|
|
95
|
+
//# sourceMappingURL=persistent-session-ZXOO6LYN.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Z2SA7JLD.js";
|
|
4
|
+
import "./chunk-2MDR3ZHP.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -712,4 +712,4 @@ export {
|
|
|
712
712
|
readAndResetSlackReplyBindingClassifications,
|
|
713
713
|
readAndResetSlackReplyTargetClassifications
|
|
714
714
|
};
|
|
715
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
715
|
+
//# sourceMappingURL=responsiveness-probe-RQCDK5LF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2MDR3ZHP.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/session-auth-dead.ts
|
|
6
6
|
import { closeSync, openSync, readSync, readdirSync, statSync } from "fs";
|
|
@@ -203,4 +203,4 @@ export {
|
|
|
203
203
|
decideSessionAuthState,
|
|
204
204
|
probeSessionAuth
|
|
205
205
|
};
|
|
206
|
-
//# sourceMappingURL=session-auth-dead-
|
|
206
|
+
//# sourceMappingURL=session-auth-dead-DPY5S3RZ.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|