@integrity-labs/agt-cli 0.28.922 → 0.28.924
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-NGJFE75J.js → chunk-BLEV5PAO.js} +2 -2
- package/dist/{chunk-JTWIYGY2.js → chunk-FAG5UIWZ.js} +4 -4
- package/dist/{chunk-ZOPP3ZC7.js → chunk-VHO7KAB7.js} +29 -4
- package/dist/{chunk-ZOPP3ZC7.js.map → chunk-VHO7KAB7.js.map} +1 -1
- package/dist/{claude-pair-runtime-NNHCDXLG.js → claude-pair-runtime-SY5VCTCE.js} +2 -2
- package/dist/lib/manager-worker.js +64 -15
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +28 -3
- package/dist/mcp/index.js +24 -2
- package/dist/mcp/origami.js +24 -2
- package/dist/mcp/slack-channel.js +28 -3
- package/dist/mcp/telegram-channel.js +28 -3
- package/dist/{persistent-session-OQRYZ3YP.js → persistent-session-UEAJJ72P.js} +3 -3
- package/dist/{responsiveness-probe-RBWP6HJE.js → responsiveness-probe-VXJKA6RF.js} +3 -3
- package/dist/{session-auth-dead-4KUPTD7M.js → session-auth-dead-XOP4XYBD.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-NGJFE75J.js.map → chunk-BLEV5PAO.js.map} +0 -0
- /package/dist/{chunk-JTWIYGY2.js.map → chunk-FAG5UIWZ.js.map} +0 -0
- /package/dist/{claude-pair-runtime-NNHCDXLG.js.map → claude-pair-runtime-SY5VCTCE.js.map} +0 -0
- /package/dist/{persistent-session-OQRYZ3YP.js.map → persistent-session-UEAJJ72P.js.map} +0 -0
- /package/dist/{responsiveness-probe-RBWP6HJE.js.map → responsiveness-probe-VXJKA6RF.js.map} +0 -0
- /package/dist/{session-auth-dead-4KUPTD7M.js.map → session-auth-dead-XOP4XYBD.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-UEAJJ72P.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-SY5VCTCE.js.map
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
safeWriteJsonAtomic,
|
|
64
64
|
setConfigHash,
|
|
65
65
|
tripClass
|
|
66
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-FAG5UIWZ.js";
|
|
67
67
|
import {
|
|
68
68
|
getProjectDir as getProjectDir2,
|
|
69
69
|
getReadyTasks,
|
|
@@ -136,7 +136,7 @@ import {
|
|
|
136
136
|
takeZombieDetection,
|
|
137
137
|
toOpencodeModel,
|
|
138
138
|
writeEgressAllowlist
|
|
139
|
-
} from "../chunk-
|
|
139
|
+
} from "../chunk-BLEV5PAO.js";
|
|
140
140
|
import {
|
|
141
141
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
142
142
|
AnchorSessionClient,
|
|
@@ -231,7 +231,7 @@ import {
|
|
|
231
231
|
subagentActivityAgeSeconds,
|
|
232
232
|
sumTranscriptUsageInWindow,
|
|
233
233
|
transcriptActivityAgeSeconds
|
|
234
|
-
} from "../chunk-
|
|
234
|
+
} from "../chunk-VHO7KAB7.js";
|
|
235
235
|
import {
|
|
236
236
|
reapOrphanChannelMcps
|
|
237
237
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -3536,6 +3536,51 @@ async function maybeReconcileWorkflowRunTokens(args) {
|
|
|
3536
3536
|
// src/lib/conversation-evaluator.ts
|
|
3537
3537
|
import { readdirSync as readdirSync3, readFileSync as readFileSync12, statSync as statSync3 } from "fs";
|
|
3538
3538
|
import { join as join17 } from "path";
|
|
3539
|
+
|
|
3540
|
+
// src/lib/detect-meta-egress.ts
|
|
3541
|
+
var REPOST_PREAMBLE_WINDOW = 200;
|
|
3542
|
+
var REPOST_ANNOUNCE = /\b(?:re-?(?:post|send)(?:ing)?\s+(?:it|this|that)\b|(?:posting|sending)\s+(?:it|this|that)\s+(?:now|again)\b|re-?posting\s+now\b)/i;
|
|
3543
|
+
var REPOST_FAILURE = /\b(?:it|this|that)\s+(?:did(?:n['’]t| not)|could(?:n['’]t| not)|wasn['’]t|failed to)\s+(?:parse|send|post|go through|land|deliver|come through)\b|\b(?:did(?:n['’]t| not)|could(?:n['’]t| not)|failed to)\s+(?:send|post|deliver)\s+(?:it|this|that)\b/i;
|
|
3544
|
+
var REPOST_PRIOR = /\b(?:drafted|dialled|dialed|typed|composed|wrote)\s+(?:this|that|it)\s+(?:a moment ago|moments ago|just now|earlier)\b/i;
|
|
3545
|
+
function hasRepostPreamble(message) {
|
|
3546
|
+
const head = message.slice(0, REPOST_PREAMBLE_WINDOW);
|
|
3547
|
+
return REPOST_ANNOUNCE.test(head) && (REPOST_FAILURE.test(head) || REPOST_PRIOR.test(head));
|
|
3548
|
+
}
|
|
3549
|
+
var STATUS_NARRATION = [
|
|
3550
|
+
// "Assessment delivered to Samuel:" - a ledger line: the noun OPENS a sentence
|
|
3551
|
+
// (or parenthetical) and the recipient is a capitalised name. Case-sensitive
|
|
3552
|
+
// on purpose, so "Summary delivered to the board" and "Your answer delivered
|
|
3553
|
+
// to the customer" are not matched. \p{Lu} (not [A-Z]) so a non-ASCII
|
|
3554
|
+
// recipient ("Élodie") is still a capitalised name.
|
|
3555
|
+
new RegExp("(?:^|[.!?]\\s+|\\(\\s*)(?:[Aa]ssessment|[Ss]ummary|[Rr]eport|[Aa]nalysis|[Rr]esponse|[Rr]eply|[Uu]pdate|[Aa]nswer)\\s+delivered\\s+to\\s+\\p{Lu}", "u"),
|
|
3556
|
+
// third-person "on his/her/their go" (waiting on the user's go-ahead, narrated)
|
|
3557
|
+
/\bon (?:his|her|their) go\b(?![-\w])/i
|
|
3558
|
+
];
|
|
3559
|
+
var LOOP_TICK = [
|
|
3560
|
+
// "Standing down - no change." / "Standing down, no action needed"
|
|
3561
|
+
/\bstanding down\s*[—–,:;.-]?\s*no (?:change|changes|action needed|new work)\b/i,
|
|
3562
|
+
// A message that is ONLY "Standing down."
|
|
3563
|
+
/^standing down[.!]?$/i,
|
|
3564
|
+
// "All clear, no pending work."
|
|
3565
|
+
/\ball clear\s*[,—–:;-]?\s*no pending work\b/i
|
|
3566
|
+
];
|
|
3567
|
+
function detectMetaEgress(agentMessages) {
|
|
3568
|
+
const kinds = /* @__PURE__ */ new Set();
|
|
3569
|
+
for (const raw of agentMessages) {
|
|
3570
|
+
if (!raw) continue;
|
|
3571
|
+
const m = raw.trim();
|
|
3572
|
+
if (!m) continue;
|
|
3573
|
+
if (hasRepostPreamble(m)) kinds.add("repost_preamble");
|
|
3574
|
+
if (STATUS_NARRATION.some((re) => re.test(m))) kinds.add("status_narration");
|
|
3575
|
+
if (LOOP_TICK.some((re) => re.test(m))) kinds.add("loop_tick");
|
|
3576
|
+
}
|
|
3577
|
+
return {
|
|
3578
|
+
meta_leak: kinds.size > 0,
|
|
3579
|
+
meta_leak_kinds: [...kinds].sort()
|
|
3580
|
+
};
|
|
3581
|
+
}
|
|
3582
|
+
|
|
3583
|
+
// src/lib/conversation-evaluator.ts
|
|
3539
3584
|
var MIN_CHECK_INTERVAL_MS4 = 5 * 6e4;
|
|
3540
3585
|
var TRANSCRIPT_MTIME_WINDOW_MS3 = 7 * 24 * 60 * 60 * 1e3;
|
|
3541
3586
|
var WINDOW_PAD_MS = 5 * 6e4;
|
|
@@ -3908,6 +3953,9 @@ async function maybeEvaluateConversations(args) {
|
|
|
3908
3953
|
continue;
|
|
3909
3954
|
}
|
|
3910
3955
|
backendSucceeded = true;
|
|
3956
|
+
const flags = detectMetaEgress(
|
|
3957
|
+
turns.filter((t) => t.role === "assistant").map((t) => t.text)
|
|
3958
|
+
);
|
|
3911
3959
|
try {
|
|
3912
3960
|
await api2.post("/host/conversations/evaluation", {
|
|
3913
3961
|
agent_id: agentId,
|
|
@@ -3916,7 +3964,8 @@ async function maybeEvaluateConversations(args) {
|
|
|
3916
3964
|
verdict: verdict.verdict,
|
|
3917
3965
|
summary: verdict.summary,
|
|
3918
3966
|
failure_category: verdict.failureCategory,
|
|
3919
|
-
model: backend.model
|
|
3967
|
+
model: backend.model,
|
|
3968
|
+
eval_flags: flags
|
|
3920
3969
|
});
|
|
3921
3970
|
log2(
|
|
3922
3971
|
`[conversation-eval] ${codeName}: ${conv.conversation_id.slice(0, 8)} \u2192 ${verdict.verdict} (${verdict.score})`
|
|
@@ -13138,7 +13187,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
13138
13187
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
13139
13188
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
13140
13189
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
13141
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
13190
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-VXJKA6RF.js");
|
|
13142
13191
|
const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
|
|
13143
13192
|
if (newest === null) return null;
|
|
13144
13193
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -13823,7 +13872,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13823
13872
|
var lastVersionCheckAt = 0;
|
|
13824
13873
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13825
13874
|
var lastResponsivenessProbeAt = 0;
|
|
13826
|
-
var agtCliVersion = true ? "0.28.
|
|
13875
|
+
var agtCliVersion = true ? "0.28.924" : "dev";
|
|
13827
13876
|
function resolveBrewPath(execFileSync2) {
|
|
13828
13877
|
try {
|
|
13829
13878
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -15413,7 +15462,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
15413
15462
|
if (codeNames.length === 0) return;
|
|
15414
15463
|
void (async () => {
|
|
15415
15464
|
try {
|
|
15416
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15465
|
+
const { collectDiagnostics } = await import("../persistent-session-UEAJJ72P.js");
|
|
15417
15466
|
await api.post("/host/heartbeat", {
|
|
15418
15467
|
host_id: hostId,
|
|
15419
15468
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -15555,7 +15604,7 @@ async function pollCycleInner() {
|
|
|
15555
15604
|
}
|
|
15556
15605
|
try {
|
|
15557
15606
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
15558
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15607
|
+
const { collectDiagnostics } = await import("../persistent-session-UEAJJ72P.js");
|
|
15559
15608
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
15560
15609
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
|
|
15561
15610
|
let tailscaleHostname;
|
|
@@ -15730,7 +15779,7 @@ async function pollCycleInner() {
|
|
|
15730
15779
|
collectPanelessActivityProbes,
|
|
15731
15780
|
getResponsivenessIntervalMs,
|
|
15732
15781
|
occupancyQualificationClassifications
|
|
15733
|
-
} = await import("../responsiveness-probe-
|
|
15782
|
+
} = await import("../responsiveness-probe-VXJKA6RF.js");
|
|
15734
15783
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
15735
15784
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
15736
15785
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -15847,7 +15896,7 @@ async function pollCycleInner() {
|
|
|
15847
15896
|
collectResponsivenessProbes,
|
|
15848
15897
|
livePendingInboundOldestAgeSeconds,
|
|
15849
15898
|
parkPendingInbound
|
|
15850
|
-
} = await import("../responsiveness-probe-
|
|
15899
|
+
} = await import("../responsiveness-probe-VXJKA6RF.js");
|
|
15851
15900
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
15852
15901
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
15853
15902
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -16003,7 +16052,7 @@ async function pollCycleInner() {
|
|
|
16003
16052
|
}
|
|
16004
16053
|
try {
|
|
16005
16054
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
16006
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
16055
|
+
const { probeSessionAuth } = await import("../session-auth-dead-XOP4XYBD.js");
|
|
16007
16056
|
const observations = [];
|
|
16008
16057
|
const pendingCacheCommits = [];
|
|
16009
16058
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -20267,7 +20316,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
20267
20316
|
try {
|
|
20268
20317
|
const freshId = rotateSessionForWedge(codeName);
|
|
20269
20318
|
consecutiveWedgeCycles.delete(codeName);
|
|
20270
|
-
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-
|
|
20319
|
+
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-VXJKA6RF.js");
|
|
20271
20320
|
const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
|
|
20272
20321
|
const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
|
|
20273
20322
|
const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
|
|
@@ -20310,7 +20359,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
20310
20359
|
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}`));
|
|
20311
20360
|
void (async () => {
|
|
20312
20361
|
try {
|
|
20313
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
20362
|
+
const { collectDiagnostics } = await import("../persistent-session-UEAJJ72P.js");
|
|
20314
20363
|
await api.post("/host/heartbeat", {
|
|
20315
20364
|
host_id: hostId,
|
|
20316
20365
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -20361,7 +20410,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
20361
20410
|
}
|
|
20362
20411
|
try {
|
|
20363
20412
|
const hostId = await getHostId();
|
|
20364
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
20413
|
+
const { collectDiagnostics } = await import("../persistent-session-UEAJJ72P.js");
|
|
20365
20414
|
await api.post("/host/heartbeat", {
|
|
20366
20415
|
host_id: hostId,
|
|
20367
20416
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -21003,7 +21052,7 @@ async function processClaudePairSessions(agents) {
|
|
|
21003
21052
|
killPairSession,
|
|
21004
21053
|
pairTmuxSession,
|
|
21005
21054
|
finalizeClaudePairOnboarding
|
|
21006
|
-
} = await import("../claude-pair-runtime-
|
|
21055
|
+
} = await import("../claude-pair-runtime-SY5VCTCE.js");
|
|
21007
21056
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
21008
21057
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
21009
21058
|
const killed = await killPairSession(pairTmuxSession(pairId));
|