@integrity-labs/agt-cli 0.28.408 → 0.28.409

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-WYGZTU4O.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-W5QSIM7F.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-WWTKA7QC.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-XGPENQB7.js.map
@@ -45,7 +45,7 @@ import {
45
45
  resolveEffectivePinRaw,
46
46
  safeWriteJsonAtomic,
47
47
  setConfigHash
48
- } from "../chunk-DRWBCTED.js";
48
+ } from "../chunk-QEWIZCQC.js";
49
49
  import {
50
50
  getProjectDir as getProjectDir2,
51
51
  getReadyTasks,
@@ -147,7 +147,7 @@ import {
147
147
  toOpencodeModel,
148
148
  transcriptActivityAgeSeconds,
149
149
  writeEgressAllowlist
150
- } from "../chunk-G7M7OFCG.js";
150
+ } from "../chunk-YLLK4G3B.js";
151
151
  import {
152
152
  reapOrphanChannelMcps
153
153
  } from "../chunk-XWVM4KPK.js";
@@ -1207,7 +1207,7 @@ function isManagedMcpServerKey(key) {
1207
1207
  function isRemoteMcpEntry(value) {
1208
1208
  if (!value || typeof value !== "object") return false;
1209
1209
  const e = value;
1210
- return e.type === "http" || e.type === "sse" || typeof e.url === "string" && e.command === void 0;
1210
+ return e.type === "http" || e.type === "sse" || e.type === "remote" || typeof e.url === "string" && e.command === void 0;
1211
1211
  }
1212
1212
  function orphanedRemoteMcpKeys(mcpServers, expectedIntegrationKeys) {
1213
1213
  const orphans = [];
@@ -9307,7 +9307,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
9307
9307
  var lastVersionCheckAt = 0;
9308
9308
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
9309
9309
  var lastResponsivenessProbeAt = 0;
9310
- var agtCliVersion = true ? "0.28.408" : "dev";
9310
+ var agtCliVersion = true ? "0.28.409" : "dev";
9311
9311
  function resolveBrewPath(execFileSync2) {
9312
9312
  try {
9313
9313
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -10439,7 +10439,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
10439
10439
  if (codeNames.length === 0) return;
10440
10440
  void (async () => {
10441
10441
  try {
10442
- const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
10442
+ const { collectDiagnostics } = await import("../persistent-session-W5QSIM7F.js");
10443
10443
  await api.post("/host/heartbeat", {
10444
10444
  host_id: hostId,
10445
10445
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor)
@@ -10538,7 +10538,7 @@ async function pollCycle() {
10538
10538
  }
10539
10539
  try {
10540
10540
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
10541
- const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
10541
+ const { collectDiagnostics } = await import("../persistent-session-W5QSIM7F.js");
10542
10542
  const diagCodeNames = [...agentState.persistentSessionAgents];
10543
10543
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor) : void 0;
10544
10544
  let tailscaleHostname;
@@ -10693,7 +10693,7 @@ async function pollCycle() {
10693
10693
  const {
10694
10694
  collectResponsivenessProbes,
10695
10695
  getResponsivenessIntervalMs
10696
- } = await import("../responsiveness-probe-Z6XRHNMB.js");
10696
+ } = await import("../responsiveness-probe-B7XCQQN4.js");
10697
10697
  const probeIntervalMs = getResponsivenessIntervalMs();
10698
10698
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
10699
10699
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -10725,7 +10725,7 @@ async function pollCycle() {
10725
10725
  collectResponsivenessProbes,
10726
10726
  livePendingInboundOldestAgeSeconds,
10727
10727
  parkPendingInbound
10728
- } = await import("../responsiveness-probe-Z6XRHNMB.js");
10728
+ } = await import("../responsiveness-probe-B7XCQQN4.js");
10729
10729
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-HYOOQV4A.js");
10730
10730
  const wedgeNow = /* @__PURE__ */ new Date();
10731
10731
  const liveAgents = agentState.persistentSessionAgents;
@@ -12364,21 +12364,18 @@ async function processAgent(agent, agentStates) {
12364
12364
  else promptBindProbeAttempts.delete(agent.code_name);
12365
12365
  }
12366
12366
  }
12367
- if (frameworkAdapter.removeMcpServer && frameworkAdapter.getMcpPath) {
12368
- const mcpPath = frameworkAdapter.getMcpPath(agent.code_name);
12369
- if (mcpPath && existsSync11(mcpPath)) {
12370
- try {
12371
- const cfg = JSON.parse(readFileSync18(mcpPath, "utf-8"));
12372
- const expectedRemoteKeys = new Set(
12373
- integrations.map((i) => i.definition_id)
12374
- );
12375
- for (const key of orphanedRemoteMcpKeys(cfg.mcpServers ?? {}, expectedRemoteKeys)) {
12376
- frameworkAdapter.removeMcpServer(agent.code_name, key);
12377
- log(`[hot-reload] Removed orphaned remote MCP server '${key}' for '${agent.code_name}' (integration removed)`);
12378
- }
12379
- } catch (err) {
12380
- log(`[hot-reload] Failed to prune orphaned remote MCP servers for '${agent.code_name}': ${err.message}`);
12367
+ if (frameworkAdapter.removeMcpServer && frameworkAdapter.readMcpServers) {
12368
+ try {
12369
+ const declaredServers = frameworkAdapter.readMcpServers(agent.code_name);
12370
+ const expectedRemoteKeys = new Set(
12371
+ integrations.map((i) => i.definition_id)
12372
+ );
12373
+ for (const key of orphanedRemoteMcpKeys(declaredServers, expectedRemoteKeys)) {
12374
+ frameworkAdapter.removeMcpServer(agent.code_name, key);
12375
+ log(`[hot-reload] Removed orphaned remote MCP server '${key}' for '${agent.code_name}' (integration removed)`);
12381
12376
  }
12377
+ } catch (err) {
12378
+ log(`[hot-reload] Failed to prune orphaned remote MCP servers for '${agent.code_name}': ${err.message}`);
12382
12379
  }
12383
12380
  }
12384
12381
  const currentIntIds = integrations.map((i) => i.definition_id);
@@ -12560,22 +12557,15 @@ async function processAgent(agent, agentStates) {
12560
12557
  const urlHash = createHash14("sha256").update(e.url).digest("hex").slice(0, 12);
12561
12558
  log(`[managed-toolkit] ${agent.code_name}: wrote '${e.name}' (serverId=${e.serverId}, url_hash=${urlHash})`);
12562
12559
  }
12563
- if (frameworkAdapter.removeMcpServer && frameworkAdapter.getMcpPath) {
12564
- const mcpPath = frameworkAdapter.getMcpPath(agent.code_name);
12565
- if (mcpPath) {
12566
- try {
12567
- const { readFileSync: readFileSync19 } = await import("fs");
12568
- const mcpConfig = JSON.parse(readFileSync19(mcpPath, "utf-8"));
12569
- if (mcpConfig.mcpServers) {
12570
- for (const key of Object.keys(mcpConfig.mcpServers)) {
12571
- if (isManagedMcpServerKey(key) && !expectedServerIds.has(key)) {
12572
- frameworkAdapter.removeMcpServer(agent.code_name, key);
12573
- log(`[managed-toolkit] Removed stale MCP server '${key}' for '${agent.code_name}'`);
12574
- }
12575
- }
12560
+ if (frameworkAdapter.removeMcpServer && frameworkAdapter.readMcpServers) {
12561
+ try {
12562
+ for (const key of Object.keys(frameworkAdapter.readMcpServers(agent.code_name))) {
12563
+ if (isManagedMcpServerKey(key) && !expectedServerIds.has(key)) {
12564
+ frameworkAdapter.removeMcpServer(agent.code_name, key);
12565
+ log(`[managed-toolkit] Removed stale MCP server '${key}' for '${agent.code_name}'`);
12576
12566
  }
12577
- } catch {
12578
12567
  }
12568
+ } catch {
12579
12569
  }
12580
12570
  }
12581
12571
  agentState.knownManagedMcpHashes.set(agent.agent_id, mcpHash);
@@ -14037,7 +14027,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
14037
14027
  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}`));
14038
14028
  void (async () => {
14039
14029
  try {
14040
- const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
14030
+ const { collectDiagnostics } = await import("../persistent-session-W5QSIM7F.js");
14041
14031
  await api.post("/host/heartbeat", {
14042
14032
  host_id: hostId,
14043
14033
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor)
@@ -14087,7 +14077,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
14087
14077
  }
14088
14078
  try {
14089
14079
  const hostId = await getHostId();
14090
- const { collectDiagnostics } = await import("../persistent-session-WYGZTU4O.js");
14080
+ const { collectDiagnostics } = await import("../persistent-session-W5QSIM7F.js");
14091
14081
  await api.post("/host/heartbeat", {
14092
14082
  host_id: hostId,
14093
14083
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor)
@@ -14540,7 +14530,7 @@ async function processClaudePairSessions(agents) {
14540
14530
  killPairSession,
14541
14531
  pairTmuxSession,
14542
14532
  finalizeClaudePairOnboarding
14543
- } = await import("../claude-pair-runtime-WWTKA7QC.js");
14533
+ } = await import("../claude-pair-runtime-XGPENQB7.js");
14544
14534
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
14545
14535
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
14546
14536
  const killed = await killPairSession(pairTmuxSession(pairId));