@integrity-labs/agt-cli 0.28.130 → 0.28.131
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 +3 -3
- package/dist/{chunk-RTSX4A54.js → chunk-N5N3CA6W.js} +2 -2
- package/dist/{chunk-XBF7ACI5.js → chunk-U3CDNNEK.js} +15 -1
- package/dist/chunk-U3CDNNEK.js.map +1 -0
- package/dist/{claude-pair-runtime-F5KZNGVO.js → claude-pair-runtime-NJDB2EPV.js} +2 -2
- package/dist/lib/manager-worker.js +44 -15
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-YU3FIAUK.js → persistent-session-6MR7EVEN.js} +2 -2
- package/dist/{responsiveness-probe-TN5JW2NM.js → responsiveness-probe-GWJ6TKO2.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-XBF7ACI5.js.map +0 -1
- /package/dist/{chunk-RTSX4A54.js.map → chunk-N5N3CA6W.js.map} +0 -0
- /package/dist/{claude-pair-runtime-F5KZNGVO.js.map → claude-pair-runtime-NJDB2EPV.js.map} +0 -0
- /package/dist/{persistent-session-YU3FIAUK.js.map → persistent-session-6MR7EVEN.js.map} +0 -0
- /package/dist/{responsiveness-probe-TN5JW2NM.js.map → responsiveness-probe-GWJ6TKO2.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-6MR7EVEN.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-NJDB2EPV.js.map
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
requireHost,
|
|
29
29
|
safeWriteJsonAtomic,
|
|
30
30
|
setConfigHash
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-N5N3CA6W.js";
|
|
32
32
|
import {
|
|
33
33
|
getProjectDir as getProjectDir2,
|
|
34
34
|
getReadyTasks,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
takeZombieDetection,
|
|
73
73
|
transcriptActivityAgeSeconds,
|
|
74
74
|
writeEgressAllowlist
|
|
75
|
-
} from "../chunk-
|
|
75
|
+
} from "../chunk-U3CDNNEK.js";
|
|
76
76
|
import {
|
|
77
77
|
FLAGS_SCHEMA_VERSION,
|
|
78
78
|
FLAG_REGISTRY,
|
|
@@ -374,16 +374,38 @@ function findMcpChildrenForAgent(args) {
|
|
|
374
374
|
return matched;
|
|
375
375
|
}
|
|
376
376
|
function reapStaleMcpChildren(args) {
|
|
377
|
-
const { log: log2, codeName, serverKeys, mcpJson, graceMs = 5e3 } = args;
|
|
377
|
+
const { log: log2, codeName, serverKeys, mcpJson, graceMs = 5e3, isolated = false } = args;
|
|
378
378
|
if (serverKeys.length === 0) return [];
|
|
379
|
-
const runPs = args.runPs ?? (() => execFileSync("
|
|
380
|
-
|
|
379
|
+
const runPs = args.runPs ?? (isolated ? () => execFileSync("docker", ["exec", `agt-${codeName}`, "ps", "-eo", "pid,ppid,args"], {
|
|
380
|
+
encoding: "utf-8",
|
|
381
|
+
timeout: 8e3
|
|
382
|
+
}) : () => execFileSync("ps", ["-eo", "pid,ppid,args"], { encoding: "utf-8", timeout: 5e3 }));
|
|
383
|
+
const killProcess = args.killProcess ?? (isolated ? (pid, signal) => {
|
|
384
|
+
try {
|
|
385
|
+
execFileSync(
|
|
386
|
+
"docker",
|
|
387
|
+
["exec", `agt-${codeName}`, "kill", signal === "SIGKILL" ? "-KILL" : "-TERM", String(pid)],
|
|
388
|
+
{ timeout: 8e3, stdio: "ignore" }
|
|
389
|
+
);
|
|
390
|
+
} catch {
|
|
391
|
+
}
|
|
392
|
+
} : (pid, signal) => {
|
|
381
393
|
try {
|
|
382
394
|
process.kill(pid, signal);
|
|
383
395
|
} catch {
|
|
384
396
|
}
|
|
385
397
|
});
|
|
386
|
-
const isAlive = args.isAlive ?? ((pid) => {
|
|
398
|
+
const isAlive = args.isAlive ?? (isolated ? (pid) => {
|
|
399
|
+
try {
|
|
400
|
+
execFileSync("docker", ["exec", `agt-${codeName}`, "kill", "-0", String(pid)], {
|
|
401
|
+
timeout: 8e3,
|
|
402
|
+
stdio: "ignore"
|
|
403
|
+
});
|
|
404
|
+
return true;
|
|
405
|
+
} catch {
|
|
406
|
+
return false;
|
|
407
|
+
}
|
|
408
|
+
} : (pid) => {
|
|
387
409
|
try {
|
|
388
410
|
process.kill(pid, 0);
|
|
389
411
|
return true;
|
|
@@ -399,7 +421,7 @@ function reapStaleMcpChildren(args) {
|
|
|
399
421
|
return [];
|
|
400
422
|
}
|
|
401
423
|
const rows = parsePsRows(psOutput);
|
|
402
|
-
const targets = findMcpChildrenForAgent({ rows, codeName, serverKeys, mcpJson });
|
|
424
|
+
const targets = findMcpChildrenForAgent({ rows, codeName, serverKeys, mcpJson, inContainer: isolated });
|
|
403
425
|
if (targets.length === 0) return [];
|
|
404
426
|
const byPid = new Map(rows.map((r) => [r.pid, r]));
|
|
405
427
|
const describe = (pid) => {
|
|
@@ -437,7 +459,8 @@ function reapStaleMcpChildren(args) {
|
|
|
437
459
|
rows: parsePsRows(freshPsOutput),
|
|
438
460
|
codeName,
|
|
439
461
|
serverKeys,
|
|
440
|
-
mcpJson
|
|
462
|
+
mcpJson,
|
|
463
|
+
inContainer: isolated
|
|
441
464
|
})
|
|
442
465
|
);
|
|
443
466
|
const stragglers = targets.filter((pid) => isAlive(pid) && stillOwned.has(pid));
|
|
@@ -7017,7 +7040,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
7017
7040
|
var lastVersionCheckAt = 0;
|
|
7018
7041
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
7019
7042
|
var lastResponsivenessProbeAt = 0;
|
|
7020
|
-
var agtCliVersion = true ? "0.28.
|
|
7043
|
+
var agtCliVersion = true ? "0.28.131" : "dev";
|
|
7021
7044
|
function resolveBrewPath(execFileSync4) {
|
|
7022
7045
|
try {
|
|
7023
7046
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -8144,7 +8167,7 @@ async function pollCycle() {
|
|
|
8144
8167
|
}
|
|
8145
8168
|
try {
|
|
8146
8169
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
8147
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
8170
|
+
const { collectDiagnostics } = await import("../persistent-session-6MR7EVEN.js");
|
|
8148
8171
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
8149
8172
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
8150
8173
|
let tailscaleHostname;
|
|
@@ -8245,7 +8268,7 @@ async function pollCycle() {
|
|
|
8245
8268
|
const {
|
|
8246
8269
|
collectResponsivenessProbes,
|
|
8247
8270
|
getResponsivenessIntervalMs
|
|
8248
|
-
} = await import("../responsiveness-probe-
|
|
8271
|
+
} = await import("../responsiveness-probe-GWJ6TKO2.js");
|
|
8249
8272
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
8250
8273
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
8251
8274
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -8277,7 +8300,7 @@ async function pollCycle() {
|
|
|
8277
8300
|
collectResponsivenessProbes,
|
|
8278
8301
|
livePendingInboundOldestAgeSeconds,
|
|
8279
8302
|
parkPendingInbound
|
|
8280
|
-
} = await import("../responsiveness-probe-
|
|
8303
|
+
} = await import("../responsiveness-probe-GWJ6TKO2.js");
|
|
8281
8304
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
8282
8305
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
8283
8306
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -8550,7 +8573,9 @@ async function pollCycle() {
|
|
|
8550
8573
|
await healthCheckGateways(agentStates);
|
|
8551
8574
|
if (Date.now() - lastChannelSweepAt >= CHANNEL_SWEEP_INTERVAL_MS) {
|
|
8552
8575
|
lastChannelSweepAt = Date.now();
|
|
8553
|
-
const agentCodeNames = new Set(
|
|
8576
|
+
const agentCodeNames = new Set(
|
|
8577
|
+
agentStates.map((a) => a.codeName).filter((c) => isolationMode(c) !== "docker")
|
|
8578
|
+
);
|
|
8554
8579
|
sweepChannelProcesses({
|
|
8555
8580
|
agentCodeNames,
|
|
8556
8581
|
dryRun: CHANNEL_SWEEP_DRY_RUN,
|
|
@@ -9695,7 +9720,11 @@ async function processAgent(agent, agentStates) {
|
|
|
9695
9720
|
log,
|
|
9696
9721
|
codeName: agent.code_name,
|
|
9697
9722
|
serverKeys: affectedServerKeys,
|
|
9698
|
-
mcpJson: mcpJsonForReap
|
|
9723
|
+
mcpJson: mcpJsonForReap,
|
|
9724
|
+
// ENG-6670: enumerate + signal in the container PID namespace
|
|
9725
|
+
// for Docker-isolated agents (host ps can't see in-container
|
|
9726
|
+
// children; a host kill on a container pid would be wrong).
|
|
9727
|
+
isolated: isolationMode(agent.code_name) === "docker"
|
|
9699
9728
|
});
|
|
9700
9729
|
}
|
|
9701
9730
|
const names = integrations.map((i) => i.display_name || i.definition_id).join(", ");
|
|
@@ -11820,7 +11849,7 @@ async function processClaudePairSessions(agents) {
|
|
|
11820
11849
|
killPairSession,
|
|
11821
11850
|
pairTmuxSession,
|
|
11822
11851
|
finalizeClaudePairOnboarding
|
|
11823
|
-
} = await import("../claude-pair-runtime-
|
|
11852
|
+
} = await import("../claude-pair-runtime-NJDB2EPV.js");
|
|
11824
11853
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
11825
11854
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
11826
11855
|
const killed = await killPairSession(pairTmuxSession(pairId));
|