@integrity-labs/agt-cli 0.28.265 → 0.28.267

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.
@@ -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-K5RJ4BVF.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-FGGXFAJH.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-YZ2PGUW3.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-CXIVEO6R.js.map
@@ -14,6 +14,7 @@ import {
14
14
  defaultFlagsCachePath,
15
15
  deriveMcpServerKey,
16
16
  diffEnvIntegrations,
17
+ envOnlyRespawnVars,
17
18
  estimateActiveTasksTokens,
18
19
  exchangeApiKey,
19
20
  executeConnectivityProbe,
@@ -37,7 +38,7 @@ import {
37
38
  requireHost,
38
39
  safeWriteJsonAtomic,
39
40
  setConfigHash
40
- } from "../chunk-PDE3XSVC.js";
41
+ } from "../chunk-OTXH3YLU.js";
41
42
  import {
42
43
  getProjectDir as getProjectDir2,
43
44
  getReadyTasks,
@@ -122,7 +123,7 @@ import {
122
123
  takeZombieDetection,
123
124
  transcriptActivityAgeSeconds,
124
125
  writeEgressAllowlist
125
- } from "../chunk-MWKR6B3T.js";
126
+ } from "../chunk-GBVZDTCB.js";
126
127
  import {
127
128
  reapOrphanChannelMcps
128
129
  } from "../chunk-XWVM4KPK.js";
@@ -6699,7 +6700,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
6699
6700
  var lastVersionCheckAt = 0;
6700
6701
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6701
6702
  var lastResponsivenessProbeAt = 0;
6702
- var agtCliVersion = true ? "0.28.265" : "dev";
6703
+ var agtCliVersion = true ? "0.28.267" : "dev";
6703
6704
  function resolveBrewPath(execFileSync2) {
6704
6705
  try {
6705
6706
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -7549,7 +7550,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
7549
7550
  if (codeNames.length === 0) return;
7550
7551
  void (async () => {
7551
7552
  try {
7552
- const { collectDiagnostics } = await import("../persistent-session-K5RJ4BVF.js");
7553
+ const { collectDiagnostics } = await import("../persistent-session-FGGXFAJH.js");
7553
7554
  await api.post("/host/heartbeat", {
7554
7555
  host_id: hostId,
7555
7556
  agent_diagnostics: collectDiagnostics(codeNames)
@@ -7647,7 +7648,7 @@ async function pollCycle() {
7647
7648
  }
7648
7649
  try {
7649
7650
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
7650
- const { collectDiagnostics } = await import("../persistent-session-K5RJ4BVF.js");
7651
+ const { collectDiagnostics } = await import("../persistent-session-FGGXFAJH.js");
7651
7652
  const diagCodeNames = [...agentState.persistentSessionAgents];
7652
7653
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
7653
7654
  let tailscaleHostname;
@@ -7795,7 +7796,7 @@ async function pollCycle() {
7795
7796
  const {
7796
7797
  collectResponsivenessProbes,
7797
7798
  getResponsivenessIntervalMs
7798
- } = await import("../responsiveness-probe-2PHY7QKJ.js");
7799
+ } = await import("../responsiveness-probe-2734PYS6.js");
7799
7800
  const probeIntervalMs = getResponsivenessIntervalMs();
7800
7801
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
7801
7802
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -7827,7 +7828,7 @@ async function pollCycle() {
7827
7828
  collectResponsivenessProbes,
7828
7829
  livePendingInboundOldestAgeSeconds,
7829
7830
  parkPendingInbound
7830
- } = await import("../responsiveness-probe-2PHY7QKJ.js");
7831
+ } = await import("../responsiveness-probe-2734PYS6.js");
7831
7832
  const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
7832
7833
  const wedgeNow = /* @__PURE__ */ new Date();
7833
7834
  const liveAgents = agentState.persistentSessionAgents;
@@ -9350,8 +9351,12 @@ async function processAgent(agent, agentStates) {
9350
9351
  isolated: isolationMode(agent.code_name) === "docker"
9351
9352
  });
9352
9353
  }
9354
+ const respawnVars = envOnlyRespawnVars(changedVars, mcpJsonForReap, CHANNEL_SECRET_ENV_KEYS);
9355
+ const needsRespawn = respawnVars.length > 0 && !intFlap.flapping;
9353
9356
  const names = integrations.map((i) => i.display_name || i.definition_id).join(", ");
9354
- const reapNote = affectedServerKeys.length > 0 ? ` The MCP servers that depend on rotating credentials (${affectedServerKeys.join(", ")}) have been signalled to reconnect.` : "";
9357
+ const reconnectNote = affectedServerKeys.length > 0 ? ` The MCP servers that depend on rotating credentials (${affectedServerKeys.join(", ")}) have been signalled to reconnect.` : "";
9358
+ const restartNote = needsRespawn ? " Your session will restart shortly to apply the change (ENG-7510)." : "";
9359
+ const reapNote = `${reconnectNote}${restartNote}`;
9355
9360
  if (intFlap.flapping) {
9356
9361
  log(`[mcp-flap-dampener] suppressed integration-update notice for '${agent.code_name}' (set flapping, ENG-6123): ${names}`);
9357
9362
  } else {
@@ -9361,6 +9366,16 @@ async function processAgent(agent, agentStates) {
9361
9366
  });
9362
9367
  log(`[hot-reload] Notified '${agent.code_name}' about integration update: ${names} (reaped ${affectedServerKeys.length} stale MCP server(s))`);
9363
9368
  }
9369
+ if (needsRespawn) {
9370
+ scheduleSessionRestart(
9371
+ agent.code_name,
9372
+ 0,
9373
+ `env-only integration change (${respawnVars.join(", ")})`
9374
+ );
9375
+ log(
9376
+ `[hot-reload] Scheduled respawn for '${agent.code_name}' to apply env-only integration change (no MCP child to reap): ${respawnVars.join(", ")} (ENG-7510)`
9377
+ );
9378
+ }
9364
9379
  } catch (err) {
9365
9380
  rotationHandled = false;
9366
9381
  log(`[hot-reload] Failed to compute / reap affected MCP servers for '${agent.code_name}': ${err.message} \u2014 will retry next tick`);
@@ -10671,7 +10686,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
10671
10686
  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}`));
10672
10687
  void (async () => {
10673
10688
  try {
10674
- const { collectDiagnostics } = await import("../persistent-session-K5RJ4BVF.js");
10689
+ const { collectDiagnostics } = await import("../persistent-session-FGGXFAJH.js");
10675
10690
  await api.post("/host/heartbeat", {
10676
10691
  host_id: hostId,
10677
10692
  agent_diagnostics: collectDiagnostics([codeName])
@@ -10721,7 +10736,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
10721
10736
  }
10722
10737
  try {
10723
10738
  const hostId = await getHostId();
10724
- const { collectDiagnostics } = await import("../persistent-session-K5RJ4BVF.js");
10739
+ const { collectDiagnostics } = await import("../persistent-session-FGGXFAJH.js");
10725
10740
  await api.post("/host/heartbeat", {
10726
10741
  host_id: hostId,
10727
10742
  agent_diagnostics: collectDiagnostics([codeName])
@@ -11112,7 +11127,7 @@ async function processClaudePairSessions(agents) {
11112
11127
  killPairSession,
11113
11128
  pairTmuxSession,
11114
11129
  finalizeClaudePairOnboarding
11115
- } = await import("../claude-pair-runtime-YZ2PGUW3.js");
11130
+ } = await import("../claude-pair-runtime-CXIVEO6R.js");
11116
11131
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
11117
11132
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
11118
11133
  const killed = await killPairSession(pairTmuxSession(pairId));