@integrity-labs/agt-cli 0.27.138 → 0.27.140
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 +4 -4
- package/dist/chunk-354FAVQR.js +173 -0
- package/dist/chunk-354FAVQR.js.map +1 -0
- package/dist/{chunk-SCZVYC5P.js → chunk-5UTHUT4E.js} +2 -2
- package/dist/{chunk-RT37WJXI.js → chunk-IDDSO7Q5.js} +52 -199
- package/dist/chunk-IDDSO7Q5.js.map +1 -0
- package/dist/{chunk-PDDU4Z5V.js → chunk-WCXA7EEP.js} +1 -1
- package/dist/chunk-WCXA7EEP.js.map +1 -0
- package/dist/{claude-pair-runtime-CNTCM57R.js → claude-pair-runtime-ZLYTTNUY.js} +2 -2
- package/dist/daily-session-PNQX5URX.js +27 -0
- package/dist/lib/manager-worker.js +74 -25
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-WWEAEEL4.js → persistent-session-SOCMTNFC.js} +4 -3
- package/dist/persistent-session-SOCMTNFC.js.map +1 -0
- package/dist/{responsiveness-probe-MCKI22FY.js → responsiveness-probe-USWGCI4C.js} +4 -3
- package/dist/{responsiveness-probe-MCKI22FY.js.map → responsiveness-probe-USWGCI4C.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-PDDU4Z5V.js.map +0 -1
- package/dist/chunk-RT37WJXI.js.map +0 -1
- /package/dist/{chunk-SCZVYC5P.js.map → chunk-5UTHUT4E.js.map} +0 -0
- /package/dist/{claude-pair-runtime-CNTCM57R.js.map → claude-pair-runtime-ZLYTTNUY.js.map} +0 -0
- /package/dist/{persistent-session-WWEAEEL4.js.map → daily-session-PNQX5URX.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-SOCMTNFC.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-ZLYTTNUY.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
_internals,
|
|
3
|
+
getOrCreateDailySession,
|
|
4
|
+
isAgentIdle,
|
|
5
|
+
isStaleForToday,
|
|
6
|
+
markDailySessionSpawn,
|
|
7
|
+
peekCurrentSession,
|
|
8
|
+
rotateDailySession,
|
|
9
|
+
sessionFileExists,
|
|
10
|
+
sessionFilePath,
|
|
11
|
+
sessionTranscriptDir,
|
|
12
|
+
transcriptActivityAgeSeconds
|
|
13
|
+
} from "./chunk-354FAVQR.js";
|
|
14
|
+
export {
|
|
15
|
+
_internals,
|
|
16
|
+
getOrCreateDailySession,
|
|
17
|
+
isAgentIdle,
|
|
18
|
+
isStaleForToday,
|
|
19
|
+
markDailySessionSpawn,
|
|
20
|
+
peekCurrentSession,
|
|
21
|
+
rotateDailySession,
|
|
22
|
+
sessionFileExists,
|
|
23
|
+
sessionFilePath,
|
|
24
|
+
sessionTranscriptDir,
|
|
25
|
+
transcriptActivityAgeSeconds
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=daily-session-PNQX5URX.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
provisionStopHook,
|
|
18
18
|
requireHost,
|
|
19
19
|
safeWriteJsonAtomic
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-5UTHUT4E.js";
|
|
21
21
|
import {
|
|
22
22
|
getProjectDir as getProjectDir2,
|
|
23
23
|
getReadyTasks,
|
|
@@ -36,13 +36,10 @@ import {
|
|
|
36
36
|
getSessionState,
|
|
37
37
|
injectMessage,
|
|
38
38
|
injectMessageWithStatus,
|
|
39
|
-
isAgentIdle,
|
|
40
39
|
isAgentPromptReady,
|
|
41
40
|
isSessionHealthy,
|
|
42
|
-
isStaleForToday,
|
|
43
41
|
paneLogPath,
|
|
44
42
|
parseEnvIntegrations,
|
|
45
|
-
peekCurrentSession,
|
|
46
43
|
prepareForRespawn,
|
|
47
44
|
probeMcpEnvSubstitution,
|
|
48
45
|
readPaneLogTail,
|
|
@@ -51,13 +48,12 @@ import {
|
|
|
51
48
|
rotateSessionForWedge,
|
|
52
49
|
sanitizeMcpJson,
|
|
53
50
|
sendToAgent,
|
|
54
|
-
sessionTranscriptDir,
|
|
55
51
|
startPersistentSession,
|
|
56
52
|
stopAllSessionsAndWait,
|
|
57
53
|
stopPersistentSession,
|
|
58
54
|
takeWatchdogGiveUpCount,
|
|
59
55
|
takeZombieDetection
|
|
60
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-IDDSO7Q5.js";
|
|
61
57
|
import {
|
|
62
58
|
KANBAN_CHECK_COMMAND,
|
|
63
59
|
SUPPRESS_SENTINEL,
|
|
@@ -84,7 +80,13 @@ import {
|
|
|
84
80
|
resolveDmTarget,
|
|
85
81
|
worseConnectivityOutcome,
|
|
86
82
|
wrapScheduledTaskPrompt
|
|
87
|
-
} from "../chunk-
|
|
83
|
+
} from "../chunk-WCXA7EEP.js";
|
|
84
|
+
import {
|
|
85
|
+
isAgentIdle,
|
|
86
|
+
isStaleForToday,
|
|
87
|
+
peekCurrentSession,
|
|
88
|
+
sessionTranscriptDir
|
|
89
|
+
} from "../chunk-354FAVQR.js";
|
|
88
90
|
import {
|
|
89
91
|
parsePsRows,
|
|
90
92
|
reapOrphanChannelMcps
|
|
@@ -1136,7 +1138,12 @@ async function executeConnectivityProbe(target, deps = {}) {
|
|
|
1136
1138
|
const descriptor = resolveConnectivityProbe({
|
|
1137
1139
|
definitionId: target.definitionId,
|
|
1138
1140
|
sourceType: target.sourceType,
|
|
1139
|
-
authType: target.authType
|
|
1141
|
+
authType: target.authType,
|
|
1142
|
+
// ENG-6242: carry the toolkit's connectivity_test override so a managed
|
|
1143
|
+
// descriptor surfaces `probeTool`/`probeArgs` (the prescribed read-only tool)
|
|
1144
|
+
// — without this the hourly probe auto-picked a different tool than the Test
|
|
1145
|
+
// path, the false-RED that flagged every managed Linear install "unreachable".
|
|
1146
|
+
connectivityTest: target.connectivityTest ?? null
|
|
1140
1147
|
});
|
|
1141
1148
|
if (!descriptor.readOnly) {
|
|
1142
1149
|
throw new Error(`Refusing non-read-only probe for ${target.definitionId}`);
|
|
@@ -1163,7 +1170,13 @@ async function executeConnectivityProbe(target, deps = {}) {
|
|
|
1163
1170
|
if (deps.composioToolCallProbe) {
|
|
1164
1171
|
const toolCall = await deps.composioToolCallProbe({
|
|
1165
1172
|
serverKey: target.mcpServerKey ?? target.definitionId,
|
|
1166
|
-
definitionId: target.definitionId
|
|
1173
|
+
definitionId: target.definitionId,
|
|
1174
|
+
// ENG-6242: thread the prescribed tool through to the live tool-call
|
|
1175
|
+
// leg. resolveConnectivityProbe only sets these for managed toolkits
|
|
1176
|
+
// with a stored override; the probe re-validates read-only and falls
|
|
1177
|
+
// back to auto-pick on drift, so a missing/invalid override is safe.
|
|
1178
|
+
toolName: descriptor.probeTool ?? null,
|
|
1179
|
+
toolArgs: descriptor.probeArgs ?? null
|
|
1167
1180
|
});
|
|
1168
1181
|
if (toolCall) outcomes.push(toolCall);
|
|
1169
1182
|
}
|
|
@@ -1217,7 +1230,8 @@ async function runConnectivityProbes(integrations, options = {}) {
|
|
|
1217
1230
|
authType: integ.auth_type ?? null,
|
|
1218
1231
|
credentials: integ.credentials ?? {},
|
|
1219
1232
|
cliBinary: integ.cli_binary,
|
|
1220
|
-
mcpServerKey: integ.mcp_server_key
|
|
1233
|
+
mcpServerKey: integ.mcp_server_key,
|
|
1234
|
+
connectivityTest: integ.connectivity_test ?? null
|
|
1221
1235
|
};
|
|
1222
1236
|
let outcome;
|
|
1223
1237
|
try {
|
|
@@ -3360,8 +3374,15 @@ function clearAgentState(agentId, codeName) {
|
|
|
3360
3374
|
// src/lib/wedge-detection.ts
|
|
3361
3375
|
var DEFAULTS = {
|
|
3362
3376
|
inboundWaitSeconds: 120,
|
|
3363
|
-
|
|
3377
|
+
// ENG-6238: the hard cap is now an ABSOLUTE BACKSTOP, not the primary
|
|
3378
|
+
// discriminator — a still-producing session (e.g. a runaway loop) is only
|
|
3379
|
+
// reaped here. Raised 300→1200 because the soft path now reliably catches
|
|
3380
|
+
// the frozen-turn wedge via the transcript signal, so the hard cap no longer
|
|
3381
|
+
// needs to fire early (which is exactly what false-killed kylie's long
|
|
3382
|
+
// legitimate turns, ENG-6238).
|
|
3383
|
+
inboundHardWaitSeconds: 1200,
|
|
3364
3384
|
paneStaleSeconds: 120,
|
|
3385
|
+
transcriptStaleSeconds: 60,
|
|
3365
3386
|
minCycles: 3
|
|
3366
3387
|
};
|
|
3367
3388
|
function parseMode(raw) {
|
|
@@ -3387,17 +3408,28 @@ function resolveWedgeConfig(env = process.env) {
|
|
|
3387
3408
|
inboundWaitSeconds,
|
|
3388
3409
|
inboundHardWaitSeconds,
|
|
3389
3410
|
paneStaleSeconds: parsePositiveInt(env.AGT_WEDGE_PANE_STALE_SECONDS, DEFAULTS.paneStaleSeconds, 30),
|
|
3411
|
+
transcriptStaleSeconds: parsePositiveInt(
|
|
3412
|
+
env.AGT_WEDGE_TRANSCRIPT_STALE_SECONDS,
|
|
3413
|
+
DEFAULTS.transcriptStaleSeconds,
|
|
3414
|
+
15
|
|
3415
|
+
),
|
|
3390
3416
|
minCycles: parsePositiveInt(env.AGT_WEDGE_MIN_CYCLES, DEFAULTS.minCycles, 2)
|
|
3391
3417
|
};
|
|
3392
3418
|
}
|
|
3419
|
+
function isSessionProducing(signals, config2) {
|
|
3420
|
+
const transcriptAge = signals.transcriptActivityAgeSeconds;
|
|
3421
|
+
if (transcriptAge !== null) return transcriptAge < config2.transcriptStaleSeconds;
|
|
3422
|
+
const paneAge = signals.paneActivityAgeSeconds;
|
|
3423
|
+
return paneAge !== null && paneAge < config2.paneStaleSeconds;
|
|
3424
|
+
}
|
|
3393
3425
|
function isWedgeCandidateCycle(signals, config2) {
|
|
3394
3426
|
const inboundAge = signals.pendingInboundOldestAgeSeconds;
|
|
3395
3427
|
if (inboundAge === null) return false;
|
|
3396
3428
|
if (inboundAge < config2.inboundWaitSeconds) return false;
|
|
3397
|
-
if (
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
return
|
|
3429
|
+
if (isSessionProducing(signals, config2)) {
|
|
3430
|
+
return inboundAge >= config2.inboundHardWaitSeconds;
|
|
3431
|
+
}
|
|
3432
|
+
return true;
|
|
3401
3433
|
}
|
|
3402
3434
|
function decideWedgeRestart(input, config2) {
|
|
3403
3435
|
if (!isWedgeCandidateCycle(input, config2)) return "none";
|
|
@@ -4505,7 +4537,12 @@ async function runAgentConnectivityProbes(agent, integrations, projectDir) {
|
|
|
4505
4537
|
const cfg = readMcpHttpServerConfig(projectDir, target.serverKey, probeEnv);
|
|
4506
4538
|
if (!cfg) return null;
|
|
4507
4539
|
if (cfg.unresolved.length > 0) return null;
|
|
4508
|
-
return probeComposioMcpToolCall({
|
|
4540
|
+
return probeComposioMcpToolCall({
|
|
4541
|
+
url: cfg.url,
|
|
4542
|
+
headers: cfg.headers,
|
|
4543
|
+
toolName: target.toolName,
|
|
4544
|
+
toolArgs: target.toolArgs
|
|
4545
|
+
});
|
|
4509
4546
|
}
|
|
4510
4547
|
};
|
|
4511
4548
|
const intervalSec = Number(process.env.AGT_CONNECTIVITY_PROBE_INTERVAL_SECONDS) || 3600;
|
|
@@ -4524,7 +4561,9 @@ async function runAgentConnectivityProbes(agent, integrations, projectDir) {
|
|
|
4524
4561
|
// (definition_id === toolkit_id, sanitised: non-alnum → '_', lowercased —
|
|
4525
4562
|
// e.g. 'composio_outlook'). The executor looks this up in .mcp.json; an
|
|
4526
4563
|
// unresolvable key degrades to transient_error, never a false 'down'.
|
|
4527
|
-
mcp_server_key: i.source_type === "managed" || i.source_type === "mcp_server" ? i.definition_id.replace(/[^a-z0-9]/gi, "_").toLowerCase() : void 0
|
|
4564
|
+
mcp_server_key: i.source_type === "managed" || i.source_type === "mcp_server" ? i.definition_id.replace(/[^a-z0-9]/gi, "_").toLowerCase() : void 0,
|
|
4565
|
+
// ENG-6242: forward the prescribed connectivity-test tool to the executor.
|
|
4566
|
+
connectivity_test: i.connectivity_test ?? null
|
|
4528
4567
|
})),
|
|
4529
4568
|
{ probeDeps, intervalMs: intervalSec * 1e3 }
|
|
4530
4569
|
);
|
|
@@ -4718,7 +4757,7 @@ var cachedMaintenanceWindow = null;
|
|
|
4718
4757
|
var lastVersionCheckAt = 0;
|
|
4719
4758
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
4720
4759
|
var lastResponsivenessProbeAt = 0;
|
|
4721
|
-
var agtCliVersion = true ? "0.27.
|
|
4760
|
+
var agtCliVersion = true ? "0.27.140" : "dev";
|
|
4722
4761
|
function resolveBrewPath(execFileSync4) {
|
|
4723
4762
|
try {
|
|
4724
4763
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -5916,7 +5955,7 @@ async function pollCycle() {
|
|
|
5916
5955
|
}
|
|
5917
5956
|
try {
|
|
5918
5957
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
5919
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
5958
|
+
const { collectDiagnostics } = await import("../persistent-session-SOCMTNFC.js");
|
|
5920
5959
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
5921
5960
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
5922
5961
|
let tailscaleHostname;
|
|
@@ -6003,12 +6042,12 @@ async function pollCycle() {
|
|
|
6003
6042
|
const {
|
|
6004
6043
|
collectResponsivenessProbes,
|
|
6005
6044
|
getResponsivenessIntervalMs
|
|
6006
|
-
} = await import("../responsiveness-probe-
|
|
6045
|
+
} = await import("../responsiveness-probe-USWGCI4C.js");
|
|
6007
6046
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
6008
6047
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
6009
6048
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
6010
6049
|
if (probeCodeNames.length > 0) {
|
|
6011
|
-
const { takeAcpxExecFailureCount, creditAcpxExecFailureCount } = await import("../persistent-session-
|
|
6050
|
+
const { takeAcpxExecFailureCount, creditAcpxExecFailureCount } = await import("../persistent-session-SOCMTNFC.js");
|
|
6012
6051
|
const drainedGiveUps = /* @__PURE__ */ new Map();
|
|
6013
6052
|
const drainedAcpxFailures = /* @__PURE__ */ new Map();
|
|
6014
6053
|
const probes = collectResponsivenessProbes(probeCodeNames).map((p) => {
|
|
@@ -6042,7 +6081,9 @@ async function pollCycle() {
|
|
|
6042
6081
|
collectResponsivenessProbes,
|
|
6043
6082
|
livePendingInboundOldestAgeSeconds,
|
|
6044
6083
|
deadLetterPendingInbound
|
|
6045
|
-
} = await import("../responsiveness-probe-
|
|
6084
|
+
} = await import("../responsiveness-probe-USWGCI4C.js");
|
|
6085
|
+
const { transcriptActivityAgeSeconds } = await import("../daily-session-PNQX5URX.js");
|
|
6086
|
+
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
6046
6087
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
6047
6088
|
const liveAgents = agentState.persistentSessionAgents;
|
|
6048
6089
|
for (const tracked of consecutiveWedgeCycles.keys()) {
|
|
@@ -6058,9 +6099,16 @@ async function pollCycle() {
|
|
|
6058
6099
|
consecutiveWedgeCycles.delete(codeName);
|
|
6059
6100
|
continue;
|
|
6060
6101
|
}
|
|
6061
|
-
const
|
|
6102
|
+
const wedgeSession = getSessionState(codeName);
|
|
6103
|
+
const sessionStartMs = wedgeSession?.startedAt ?? null;
|
|
6104
|
+
const transcriptAge = transcriptActivityAgeSeconds(
|
|
6105
|
+
wedgeProjectDir(codeName),
|
|
6106
|
+
wedgeSession?.currentSessionId ?? null,
|
|
6107
|
+
wedgeNow
|
|
6108
|
+
);
|
|
6062
6109
|
const signals = {
|
|
6063
6110
|
paneActivityAgeSeconds: probe.pane_activity_age_seconds,
|
|
6111
|
+
transcriptActivityAgeSeconds: transcriptAge,
|
|
6064
6112
|
pendingInboundOldestAgeSeconds: livePendingInboundOldestAgeSeconds(
|
|
6065
6113
|
codeName,
|
|
6066
6114
|
sessionStartMs,
|
|
@@ -6076,7 +6124,8 @@ async function pollCycle() {
|
|
|
6076
6124
|
if (decideWedgeRestart({ ...signals, consecutiveWedgeCycles: streak }, wedgeConfig) !== "wedged") {
|
|
6077
6125
|
continue;
|
|
6078
6126
|
}
|
|
6079
|
-
const
|
|
6127
|
+
const transcriptAgeLabel = transcriptAge === null ? "n/a" : `${transcriptAge}s`;
|
|
6128
|
+
const detail = `agent=${codeName} paneAge=${signals.paneActivityAgeSeconds}s transcriptAge=${transcriptAgeLabel} inboundAge=${signals.pendingInboundOldestAgeSeconds}s cycles=${streak}`;
|
|
6080
6129
|
if (wedgeConfig.mode === "shadow") {
|
|
6081
6130
|
if (streak === wedgeConfig.minCycles) {
|
|
6082
6131
|
log(`[wedge] SHADOW would force-fresh respawn ${detail}`);
|
|
@@ -10548,7 +10597,7 @@ async function processClaudePairSessions(agents) {
|
|
|
10548
10597
|
killPairSession,
|
|
10549
10598
|
pairTmuxSession,
|
|
10550
10599
|
finalizeClaudePairOnboarding
|
|
10551
|
-
} = await import("../claude-pair-runtime-
|
|
10600
|
+
} = await import("../claude-pair-runtime-ZLYTTNUY.js");
|
|
10552
10601
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
10553
10602
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
10554
10603
|
const killed = await killPairSession(pairTmuxSession(pairId));
|