@integrity-labs/agt-cli 0.15.15 → 0.15.16
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 +13 -13
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-XWZ6DB5U.js → chunk-EGXC323P.js} +2 -2
- package/dist/{chunk-XWZ6DB5U.js.map → chunk-EGXC323P.js.map} +1 -1
- package/dist/lib/manager-worker.js +14 -3
- package/dist/lib/manager-worker.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveChannels,
|
|
23
23
|
resolveDmTarget,
|
|
24
24
|
wrapScheduledTaskPrompt
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-EGXC323P.js";
|
|
26
26
|
import {
|
|
27
27
|
findTaskByTemplate,
|
|
28
28
|
getProjectDir,
|
|
@@ -5244,12 +5244,15 @@ async function reportDeliveryStatus(agentId, taskId, payload) {
|
|
|
5244
5244
|
log(`[delivery] Failed to report delivery status for ${agentId}/${taskId}: ${err.message}`);
|
|
5245
5245
|
}
|
|
5246
5246
|
}
|
|
5247
|
+
var spawnedPairIds = /* @__PURE__ */ new Set();
|
|
5247
5248
|
async function processClaudePairSessions(agents) {
|
|
5248
5249
|
if (agents.length === 0) return;
|
|
5249
5250
|
const agentIds = agents.map((a) => a.agentId);
|
|
5250
5251
|
const codeNameByAgentId = new Map(agents.map((a) => [a.agentId, a.codeName]));
|
|
5251
|
-
const pendingResp = await api.post("/host/claude-pair/pending", {
|
|
5252
|
-
|
|
5252
|
+
const pendingResp = await api.post("/host/claude-pair/pending", {
|
|
5253
|
+
agent_ids: agentIds,
|
|
5254
|
+
spawned_pair_ids: Array.from(spawnedPairIds)
|
|
5255
|
+
});
|
|
5253
5256
|
const {
|
|
5254
5257
|
startClaudePair,
|
|
5255
5258
|
submitClaudePairCode,
|
|
@@ -5257,6 +5260,12 @@ async function processClaudePairSessions(agents) {
|
|
|
5257
5260
|
killPairSession,
|
|
5258
5261
|
pairTmuxSession
|
|
5259
5262
|
} = await import("../claude-pair-runtime-VXNC2VEX.js");
|
|
5263
|
+
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
5264
|
+
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
5265
|
+
await killPairSession(pairTmuxSession(pairId));
|
|
5266
|
+
spawnedPairIds.delete(pairId);
|
|
5267
|
+
}
|
|
5268
|
+
if (!pendingResp.pending || pendingResp.pending.length === 0) return;
|
|
5260
5269
|
const TERMINAL = /* @__PURE__ */ new Set([
|
|
5261
5270
|
"success",
|
|
5262
5271
|
"failure",
|
|
@@ -5267,6 +5276,7 @@ async function processClaudePairSessions(agents) {
|
|
|
5267
5276
|
await api.post("/host/claude-pair/result", { pair_id: pairId, ...body });
|
|
5268
5277
|
if (typeof body.status === "string" && TERMINAL.has(body.status)) {
|
|
5269
5278
|
await killPairSession(pairTmuxSession(pairId));
|
|
5279
|
+
spawnedPairIds.delete(pairId);
|
|
5270
5280
|
}
|
|
5271
5281
|
}
|
|
5272
5282
|
for (const session of pendingResp.pending) {
|
|
@@ -5284,6 +5294,7 @@ async function processClaudePairSessions(agents) {
|
|
|
5284
5294
|
});
|
|
5285
5295
|
continue;
|
|
5286
5296
|
}
|
|
5297
|
+
spawnedPairIds.add(session.pair_id);
|
|
5287
5298
|
log(`[claude-pair] dispatching /login (pair ${session.pair_id.slice(0, 8)})`);
|
|
5288
5299
|
const result = await startClaudePair({ session: pairSession });
|
|
5289
5300
|
if (result.kind === "url") {
|