@integrity-labs/agt-cli 0.28.1016 → 0.28.1018

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.
@@ -266,7 +266,7 @@ async function spawnPairSession(session) {
266
266
  return { ok: true };
267
267
  } catch {
268
268
  }
269
- const { resolveClaudeBinary } = await import("./persistent-session-AQGEDGJR.js");
269
+ const { resolveClaudeBinary } = await import("./persistent-session-UZBB7EOS.js");
270
270
  const claudeBin = resolveClaudeBinary();
271
271
  const pairEnv = {
272
272
  ...process.env,
@@ -734,4 +734,4 @@ export {
734
734
  startClaudePair,
735
735
  submitClaudePairCode
736
736
  };
737
- //# sourceMappingURL=claude-pair-runtime-VE6KUMQY.js.map
737
+ //# sourceMappingURL=claude-pair-runtime-JQRJXNSL.js.map
@@ -18,6 +18,7 @@ import {
18
18
  decidePin,
19
19
  defaultFlagsCachePath,
20
20
  deriveMcpServerKey,
21
+ describeBlockedPromptHold,
21
22
  describeChannelWriteFailure,
22
23
  describeStartupCompletion,
23
24
  diffEnvIntegrations,
@@ -65,7 +66,7 @@ import {
65
66
  safeWriteJsonAtomic,
66
67
  setConfigHash,
67
68
  tripClass
68
- } from "../chunk-DFKQZGM7.js";
69
+ } from "../chunk-GAGUPGV5.js";
69
70
  import {
70
71
  getProjectDir as getProjectDir2,
71
72
  getReadyTasks,
@@ -146,7 +147,7 @@ import {
146
147
  takeZombieDetection,
147
148
  toOpencodeModel,
148
149
  writeEgressAllowlist
149
- } from "../chunk-YPS4AUHN.js";
150
+ } from "../chunk-CVQDMHOP.js";
150
151
  import {
151
152
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
152
153
  AnchorSessionClient,
@@ -251,7 +252,7 @@ import {
251
252
  subagentActivityAgeSeconds,
252
253
  sumTranscriptUsageInWindow,
253
254
  transcriptActivityAgeSeconds
254
- } from "../chunk-B7XGAC54.js";
255
+ } from "../chunk-X7SX25N6.js";
255
256
  import "../chunk-DHWNVVX4.js";
256
257
  import {
257
258
  reapOrphanChannelMcps
@@ -13789,7 +13790,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
13789
13790
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
13790
13791
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
13791
13792
  async function channelInboundActivityAgeSecondsFor(codeName) {
13792
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-BDARO76E.js");
13793
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-KLOUFBM5.js");
13793
13794
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
13794
13795
  if (newest === null) return null;
13795
13796
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -14308,7 +14309,7 @@ function stopPersistentSessionAndForgetMcpBaseline(codeName, breakerReason, gate
14308
14309
  const gate = restartGateFor(codeName, gateReason);
14309
14310
  if (gate !== "bypass" && gate !== "proceed") {
14310
14311
  log(`[maintenance-window] Deferring '${gateReason}' restart for '${codeName}' (${gate})`);
14311
- return;
14312
+ return false;
14312
14313
  }
14313
14314
  cancelPendingSessionRestart(codeName);
14314
14315
  stopPersistentSession(codeName, log);
@@ -14326,6 +14327,7 @@ function stopPersistentSessionAndForgetMcpBaseline(codeName, breakerReason, gate
14326
14327
  recordRestartForBreaker(codeName, breakerReason);
14327
14328
  }
14328
14329
  reportRestartEvent(codeName, breakerReason, auditDetail);
14330
+ return true;
14329
14331
  }
14330
14332
  var agentRuntimeTeardownDeps = {
14331
14333
  stopOpencodeServe: (codeName, teardownLog) => stopOpencodeSession(codeName, teardownLog),
@@ -14532,7 +14534,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
14532
14534
  var lastVersionCheckAt = 0;
14533
14535
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
14534
14536
  var lastResponsivenessProbeAt = 0;
14535
- var agtCliVersion = true ? "0.28.1016" : "dev";
14537
+ var agtCliVersion = true ? "0.28.1018" : "dev";
14536
14538
  function resolveBrewPath(execFileSync3) {
14537
14539
  try {
14538
14540
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -16167,7 +16169,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
16167
16169
  if (codeNames.length === 0) return;
16168
16170
  void (async () => {
16169
16171
  try {
16170
- const { collectDiagnostics } = await import("../persistent-session-AQGEDGJR.js");
16172
+ const { collectDiagnostics } = await import("../persistent-session-UZBB7EOS.js");
16171
16173
  await api.post("/host/heartbeat", {
16172
16174
  host_id: hostId,
16173
16175
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
@@ -16309,7 +16311,7 @@ async function pollCycleInner() {
16309
16311
  }
16310
16312
  try {
16311
16313
  const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
16312
- const { collectDiagnostics } = await import("../persistent-session-AQGEDGJR.js");
16314
+ const { collectDiagnostics } = await import("../persistent-session-UZBB7EOS.js");
16313
16315
  const diagCodeNames = [...agentState.persistentSessionAgents];
16314
16316
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor) : void 0;
16315
16317
  let tailscaleHostname;
@@ -16485,7 +16487,7 @@ async function pollCycleInner() {
16485
16487
  collectPanelessActivityProbes,
16486
16488
  getResponsivenessIntervalMs,
16487
16489
  occupancyQualificationClassifications
16488
- } = await import("../responsiveness-probe-BDARO76E.js");
16490
+ } = await import("../responsiveness-probe-KLOUFBM5.js");
16489
16491
  const probeIntervalMs = getResponsivenessIntervalMs();
16490
16492
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
16491
16493
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -16602,7 +16604,7 @@ async function pollCycleInner() {
16602
16604
  collectResponsivenessProbes,
16603
16605
  livePendingInboundOldestAgeSeconds,
16604
16606
  parkPendingInbound
16605
- } = await import("../responsiveness-probe-BDARO76E.js");
16607
+ } = await import("../responsiveness-probe-KLOUFBM5.js");
16606
16608
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
16607
16609
  const wedgeNow = /* @__PURE__ */ new Date();
16608
16610
  const liveAgents = agentState.persistentSessionAgents;
@@ -16758,7 +16760,7 @@ async function pollCycleInner() {
16758
16760
  }
16759
16761
  try {
16760
16762
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
16761
- const { probeSessionAuth } = await import("../session-auth-dead-2CCORXIW.js");
16763
+ const { probeSessionAuth } = await import("../session-auth-dead-JJUKS75B.js");
16762
16764
  const observations = [];
16763
16765
  const pendingCacheCommits = [];
16764
16766
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -19615,6 +19617,26 @@ async function processAgent(agent, agentStates, managedToolkits) {
19615
19617
  );
19616
19618
  reapMissingMcpSessions({
19617
19619
  log,
19620
+ /**
19621
+ * ENG-10878: let the reaper see the budget it would be spending.
19622
+ *
19623
+ * `mcp-presence-reaper` is on the TIGHT crash bar with
19624
+ * `auth-tuple-change` and `model-change` - 2 in 600s, the 3rd trips.
19625
+ * NOT with `day-rollover` or `channel-set-change`, which this comment
19626
+ * used to name (obi-wan `486aa45fa3bd`): those are `'scheduled'` and
19627
+ * `'provisioning'` class and are not counted by `remainingCrashBudget`
19628
+ * at all. The single restart ENG-10878 spends on a blocked
19629
+ * pane cannot trip the breaker alone, but it can be the event that lets
19630
+ * a later one do it, and the agent is then paused on another reason's
19631
+ * account. With this wired, the reaper declines the restart when there
19632
+ * is nothing left and says so, rather than spending the last unit.
19633
+ *
19634
+ * The arithmetic lives in the breaker (`remainingCrashBudget`) rather
19635
+ * than here: `max` and the window are its business and are env-tunable,
19636
+ * so computing it at the call site would quietly stop being correct the
19637
+ * moment either moves.
19638
+ */
19639
+ restartBudgetRemaining: (codeName) => restartBreaker.remainingCrashBudget(codeName),
19618
19640
  codeName: agent.code_name,
19619
19641
  mcpJson: computerUseReaperView(mcpJsonParsed, computerUseVerdict),
19620
19642
  sessionStartedAt: sess?.startedAt ?? null,
@@ -19700,7 +19722,7 @@ async function processAgent(agent, agentStates, managedToolkits) {
19700
19722
  agent.agent_id,
19701
19723
  "mcp-presence-reaper",
19702
19724
  "blocked",
19703
- `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
19725
+ `${describeBlockedPromptHold(ctx)}: tmux attach -t agt-${codeName}` + // Fingerprint, never pane text. This string is persisted on the
19704
19726
  // alert row, so it leaves the host; the pane can hold the
19705
19727
  // customer message the agent was mid-turn on. Same policy the
19706
19728
  // channel-input-watchdog follows for this very block.
@@ -21142,7 +21164,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
21142
21164
  try {
21143
21165
  const freshId = rotateSessionForWedge(codeName);
21144
21166
  consecutiveWedgeCycles.delete(codeName);
21145
- const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-BDARO76E.js");
21167
+ const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-KLOUFBM5.js");
21146
21168
  const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
21147
21169
  const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
21148
21170
  const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
@@ -21185,7 +21207,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
21185
21207
  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}`));
21186
21208
  void (async () => {
21187
21209
  try {
21188
- const { collectDiagnostics } = await import("../persistent-session-AQGEDGJR.js");
21210
+ const { collectDiagnostics } = await import("../persistent-session-UZBB7EOS.js");
21189
21211
  await api.post("/host/heartbeat", {
21190
21212
  host_id: hostId,
21191
21213
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
@@ -21236,7 +21258,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
21236
21258
  }
21237
21259
  try {
21238
21260
  const hostId = await getHostId();
21239
- const { collectDiagnostics } = await import("../persistent-session-AQGEDGJR.js");
21261
+ const { collectDiagnostics } = await import("../persistent-session-UZBB7EOS.js");
21240
21262
  await api.post("/host/heartbeat", {
21241
21263
  host_id: hostId,
21242
21264
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
@@ -21907,7 +21929,7 @@ async function processClaudePairSessions(agents) {
21907
21929
  // cannot take it for itself — by the time it runs, the write it is looking
21908
21930
  // for may already have happened.
21909
21931
  snapshotPairConfig
21910
- } = await import("../claude-pair-runtime-VE6KUMQY.js");
21932
+ } = await import("../claude-pair-runtime-JQRJXNSL.js");
21911
21933
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
21912
21934
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
21913
21935
  const killed = await killPairSession(pairTmuxSession(pairId));