@integrity-labs/agt-cli 0.28.805 → 0.28.806

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.
Files changed (24) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-YNSVQMSD.js → chunk-7TIQODEK.js} +59 -6
  3. package/dist/{chunk-YNSVQMSD.js.map → chunk-7TIQODEK.js.map} +1 -1
  4. package/dist/{chunk-2FL6V4E5.js → chunk-RMBASAMS.js} +33 -1
  5. package/dist/chunk-RMBASAMS.js.map +1 -0
  6. package/dist/{chunk-DHOVIXR5.js → chunk-TWZFTSGP.js} +17 -2
  7. package/dist/{chunk-DHOVIXR5.js.map → chunk-TWZFTSGP.js.map} +1 -1
  8. package/dist/{claude-pair-runtime-WS3IVDDE.js → claude-pair-runtime-YEW7Y5N2.js} +2 -2
  9. package/dist/lib/manager-worker.js +54 -13
  10. package/dist/lib/manager-worker.js.map +1 -1
  11. package/dist/mcp/direct-chat-channel.js +32 -0
  12. package/dist/mcp/index.js +32 -0
  13. package/dist/mcp/origami.js +32 -0
  14. package/dist/mcp/slack-channel.js +32 -0
  15. package/dist/mcp/telegram-channel.js +32 -0
  16. package/dist/{persistent-session-PV4GPHG3.js → persistent-session-GPVAPK4S.js} +3 -3
  17. package/dist/{responsiveness-probe-X3AW5TGA.js → responsiveness-probe-7FEKDJZW.js} +3 -3
  18. package/dist/{session-auth-dead-W6K5VEU7.js → session-auth-dead-ZBMVGQYW.js} +2 -2
  19. package/package.json +1 -1
  20. package/dist/chunk-2FL6V4E5.js.map +0 -1
  21. /package/dist/{claude-pair-runtime-WS3IVDDE.js.map → claude-pair-runtime-YEW7Y5N2.js.map} +0 -0
  22. /package/dist/{persistent-session-PV4GPHG3.js.map → persistent-session-GPVAPK4S.js.map} +0 -0
  23. /package/dist/{responsiveness-probe-X3AW5TGA.js.map → responsiveness-probe-7FEKDJZW.js.map} +0 -0
  24. /package/dist/{session-auth-dead-W6K5VEU7.js.map → session-auth-dead-ZBMVGQYW.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-PV4GPHG3.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-GPVAPK4S.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-WS3IVDDE.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-YEW7Y5N2.js.map
@@ -58,7 +58,7 @@ import {
58
58
  safeWriteJsonAtomic,
59
59
  setConfigHash,
60
60
  tripClass
61
- } from "../chunk-YNSVQMSD.js";
61
+ } from "../chunk-7TIQODEK.js";
62
62
  import {
63
63
  getProjectDir as getProjectDir2,
64
64
  getReadyTasks,
@@ -123,7 +123,7 @@ import {
123
123
  takeZombieDetection,
124
124
  toOpencodeModel,
125
125
  writeEgressAllowlist
126
- } from "../chunk-DHOVIXR5.js";
126
+ } from "../chunk-TWZFTSGP.js";
127
127
  import {
128
128
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
129
129
  AnchorSessionClient,
@@ -215,7 +215,7 @@ import {
215
215
  subagentActivityAgeSeconds,
216
216
  sumTranscriptUsageInWindow,
217
217
  transcriptActivityAgeSeconds
218
- } from "../chunk-2FL6V4E5.js";
218
+ } from "../chunk-RMBASAMS.js";
219
219
  import {
220
220
  reapOrphanChannelMcps
221
221
  } from "../chunk-XWVM4KPK.js";
@@ -12918,7 +12918,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
12918
12918
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
12919
12919
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
12920
12920
  async function channelInboundActivityAgeSecondsFor(codeName) {
12921
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-X3AW5TGA.js");
12921
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-7FEKDJZW.js");
12922
12922
  const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
12923
12923
  if (newest === null) return null;
12924
12924
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -13578,7 +13578,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13578
13578
  var lastVersionCheckAt = 0;
13579
13579
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13580
13580
  var lastResponsivenessProbeAt = 0;
13581
- var agtCliVersion = true ? "0.28.805" : "dev";
13581
+ var agtCliVersion = true ? "0.28.806" : "dev";
13582
13582
  function resolveBrewPath(execFileSync2) {
13583
13583
  try {
13584
13584
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -15125,7 +15125,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
15125
15125
  if (codeNames.length === 0) return;
15126
15126
  void (async () => {
15127
15127
  try {
15128
- const { collectDiagnostics } = await import("../persistent-session-PV4GPHG3.js");
15128
+ const { collectDiagnostics } = await import("../persistent-session-GPVAPK4S.js");
15129
15129
  await api.post("/host/heartbeat", {
15130
15130
  host_id: hostId,
15131
15131
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -15266,7 +15266,7 @@ async function pollCycleInner() {
15266
15266
  }
15267
15267
  try {
15268
15268
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
15269
- const { collectDiagnostics } = await import("../persistent-session-PV4GPHG3.js");
15269
+ const { collectDiagnostics } = await import("../persistent-session-GPVAPK4S.js");
15270
15270
  const diagCodeNames = [...agentState.persistentSessionAgents];
15271
15271
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
15272
15272
  let tailscaleHostname;
@@ -15435,7 +15435,7 @@ async function pollCycleInner() {
15435
15435
  collectPanelessActivityProbes,
15436
15436
  getResponsivenessIntervalMs,
15437
15437
  occupancyQualificationClassifications
15438
- } = await import("../responsiveness-probe-X3AW5TGA.js");
15438
+ } = await import("../responsiveness-probe-7FEKDJZW.js");
15439
15439
  const probeIntervalMs = getResponsivenessIntervalMs();
15440
15440
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
15441
15441
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -15552,7 +15552,7 @@ async function pollCycleInner() {
15552
15552
  collectResponsivenessProbes,
15553
15553
  livePendingInboundOldestAgeSeconds,
15554
15554
  parkPendingInbound
15555
- } = await import("../responsiveness-probe-X3AW5TGA.js");
15555
+ } = await import("../responsiveness-probe-7FEKDJZW.js");
15556
15556
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
15557
15557
  const wedgeNow = /* @__PURE__ */ new Date();
15558
15558
  const liveAgents = agentState.persistentSessionAgents;
@@ -15708,7 +15708,7 @@ async function pollCycleInner() {
15708
15708
  }
15709
15709
  try {
15710
15710
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
15711
- const { probeSessionAuth } = await import("../session-auth-dead-W6K5VEU7.js");
15711
+ const { probeSessionAuth } = await import("../session-auth-dead-ZBMVGQYW.js");
15712
15712
  const observations = [];
15713
15713
  const pendingCacheCommits = [];
15714
15714
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -18453,6 +18453,47 @@ async function processAgent(agent, agentStates, managedToolkits) {
18453
18453
  // gated restart. A routine tool-MCP-only reaper restart (xero,
18454
18454
  // composio_*, unrecognised keys) keeps the original 'mcp-presence-
18455
18455
  // reaper' gate reason and still waits for the window as before.
18456
+ // ENG-9932: let the reaper see the pane before it spends a restart.
18457
+ //
18458
+ // Read lazily — the reaper calls this ONLY once it has already decided
18459
+ // to restart, so a healthy agent never pays for a capture. Same
18460
+ // invocation shape as the channel-input-watchdog's capturePane above,
18461
+ // including the 2s bound and the catch: an unreadable pane returns null
18462
+ // and the reaper falls straight through to the restart it would have
18463
+ // done anyway. Failing open matters more here than anywhere else in
18464
+ // this call — a capture that failed CLOSED would silently suspend MCP
18465
+ // recovery for every agent on the host.
18466
+ readPane: (codeName) => {
18467
+ try {
18468
+ return syncExecFile("tmux", ["capture-pane", "-t", `agt-${codeName}`, "-p"], {
18469
+ stdio: ["ignore", "pipe", "ignore"],
18470
+ timeout: 2e3
18471
+ }).toString();
18472
+ } catch {
18473
+ return null;
18474
+ }
18475
+ },
18476
+ // ENG-9932: the held restart has to REACH someone. Routed through the
18477
+ // same `/host/reaper-event` path onGiveUp/onQuarantine already use, so
18478
+ // this adds no new alerting channel — it opens a critical
18479
+ // `reaper_action` alert, deduped per (agent, reaper), which the
18480
+ // reaper-alert-sweeper closes once the agent stops reporting blocked.
18481
+ //
18482
+ // This is the signal whose absence cost two hours on 2026-09-03: the
18483
+ // reaper is the only component that knows a restart is futile, so it is
18484
+ // the only one that can say so.
18485
+ onPaneBlocked: (codeName, ctx) => {
18486
+ void reportReaperEvent(
18487
+ agent.agent_id,
18488
+ "mcp-presence-reaper",
18489
+ "blocked",
18490
+ `session blocked on an interactive prompt (${ctx.kind}); declared MCP(s) [${ctx.activeKeys.join(", ")}] were never spawned, not killed \u2014 a restart re-presents the same prompt. Needs a human: tmux attach -t agt-${codeName}` + // Fingerprint, never pane text. This string is persisted on the
18491
+ // alert row, so it leaves the host; the pane can hold the
18492
+ // customer message the agent was mid-turn on. Same policy the
18493
+ // channel-input-watchdog follows for this very block.
18494
+ (ctx.paneHash ? ` (modal fp=${ctx.paneHash} len=${ctx.paneLength})` : "")
18495
+ );
18496
+ },
18456
18497
  stopSession: (codeName, ctx) => stopPersistentSessionAndForgetMcpBaseline(
18457
18498
  codeName,
18458
18499
  reaperRestartBreakerReason(ctx.activeKeys),
@@ -19827,7 +19868,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
19827
19868
  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}`));
19828
19869
  void (async () => {
19829
19870
  try {
19830
- const { collectDiagnostics } = await import("../persistent-session-PV4GPHG3.js");
19871
+ const { collectDiagnostics } = await import("../persistent-session-GPVAPK4S.js");
19831
19872
  await api.post("/host/heartbeat", {
19832
19873
  host_id: hostId,
19833
19874
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -19873,7 +19914,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
19873
19914
  }
19874
19915
  try {
19875
19916
  const hostId = await getHostId();
19876
- const { collectDiagnostics } = await import("../persistent-session-PV4GPHG3.js");
19917
+ const { collectDiagnostics } = await import("../persistent-session-GPVAPK4S.js");
19877
19918
  await api.post("/host/heartbeat", {
19878
19919
  host_id: hostId,
19879
19920
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -20509,7 +20550,7 @@ async function processClaudePairSessions(agents) {
20509
20550
  killPairSession,
20510
20551
  pairTmuxSession,
20511
20552
  finalizeClaudePairOnboarding
20512
- } = await import("../claude-pair-runtime-WS3IVDDE.js");
20553
+ } = await import("../claude-pair-runtime-YEW7Y5N2.js");
20513
20554
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
20514
20555
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
20515
20556
  const killed = await killPairSession(pairTmuxSession(pairId));