@integrity-labs/agt-cli 0.21.6 → 0.21.8

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.
@@ -22,7 +22,7 @@ import {
22
22
  resolveChannels,
23
23
  resolveDmTarget,
24
24
  wrapScheduledTaskPrompt
25
- } from "../chunk-3H3ADCO6.js";
25
+ } from "../chunk-OLVOTGNB.js";
26
26
  import {
27
27
  findTaskByTemplate,
28
28
  getProjectDir,
@@ -49,8 +49,9 @@ import {
49
49
  sanitizeMcpJson,
50
50
  startPersistentSession,
51
51
  stopAllSessionsAndWait,
52
- stopPersistentSession
53
- } from "../chunk-E4XLJCJT.js";
52
+ stopPersistentSession,
53
+ takeZombieDetection
54
+ } from "../chunk-4XNYSTH5.js";
54
55
 
55
56
  // src/lib/manager-worker.ts
56
57
  import { createHash as createHash2 } from "crypto";
@@ -2398,7 +2399,7 @@ function clearAgentCaches(agentId, codeName) {
2398
2399
  var cachedFrameworkVersion = null;
2399
2400
  var lastVersionCheckAt = 0;
2400
2401
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
2401
- var agtCliVersion = true ? "0.21.6" : "dev";
2402
+ var agtCliVersion = true ? "0.21.8" : "dev";
2402
2403
  function resolveBrewPath(execFileSync4) {
2403
2404
  try {
2404
2405
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -3355,7 +3356,7 @@ async function pollCycle() {
3355
3356
  }
3356
3357
  try {
3357
3358
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
3358
- const { collectDiagnostics } = await import("../persistent-session-53VP7AB7.js");
3359
+ const { collectDiagnostics } = await import("../persistent-session-F44544YP.js");
3359
3360
  const diagCodeNames = [...persistentSessionAgents];
3360
3361
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
3361
3362
  let tailscaleHostname;
@@ -5519,6 +5520,32 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash2("sha256").
5519
5520
  `[persistent-session] Session for '${codeName}' is unhealthy (restart #${ctx.restartCount}${sigSummary}${recoverySummary}), will restart${tailSummary}`
5520
5521
  );
5521
5522
  }
5523
+ const zombie = takeZombieDetection(codeName);
5524
+ if (zombie) {
5525
+ log(
5526
+ `[persistent-session] ZOMBIE DETECTED for '${codeName}' \u2014 tmux session ${zombie.tmuxSession} alive but no claude process inside; killed shell, will respawn`
5527
+ );
5528
+ getHostId().then((hostId) => {
5529
+ if (!hostId) return;
5530
+ const paneTailHash = zombie.paneTail ? `sha256:${createHash2("sha256").update(zombie.paneTail).digest("hex").slice(0, 12)}` : null;
5531
+ return api.post("/host/events", {
5532
+ host_id: hostId,
5533
+ agent_code_name: codeName,
5534
+ event_type: "manager.agent_zombie_detected",
5535
+ payload: {
5536
+ agent_code_name: codeName,
5537
+ agent_id: agent.agent_id,
5538
+ tmux_session: zombie.tmuxSession,
5539
+ detected_at: new Date(zombie.detectedAt).toISOString(),
5540
+ pane_tail_hash: paneTailHash,
5541
+ pane_tail_redacted: zombie.paneTail !== null
5542
+ },
5543
+ timestamp: new Date(zombie.detectedAt).toISOString()
5544
+ });
5545
+ }).catch((err) => {
5546
+ log(`[persistent-session] Failed to forward zombie audit event for '${codeName}': ${err.message}`);
5547
+ });
5548
+ }
5522
5549
  try {
5523
5550
  provisionStopHook(codeName);
5524
5551
  } catch (err) {
@@ -6895,7 +6922,7 @@ async function processClaudePairSessions(agents) {
6895
6922
  killPairSession,
6896
6923
  pairTmuxSession,
6897
6924
  finalizeClaudePairOnboarding
6898
- } = await import("../claude-pair-runtime-LXGQZBLL.js");
6925
+ } = await import("../claude-pair-runtime-ZMTHMKMT.js");
6899
6926
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
6900
6927
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
6901
6928
  const killed = await killPairSession(pairTmuxSession(pairId));