@integrity-labs/agt-cli 0.28.488 → 0.28.490

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-3LWKJAAP.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-Y3WIXJPW.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-FEVTBAHV.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-GJF64TMZ.js.map
@@ -44,7 +44,7 @@ import {
44
44
  resolveEffectivePinRaw,
45
45
  safeWriteJsonAtomic,
46
46
  setConfigHash
47
- } from "../chunk-PMDCZKFQ.js";
47
+ } from "../chunk-DNRXJESD.js";
48
48
  import {
49
49
  getProjectDir as getProjectDir2,
50
50
  getReadyTasks,
@@ -162,7 +162,7 @@ import {
162
162
  toOpencodeModel,
163
163
  transcriptActivityAgeSeconds,
164
164
  writeEgressAllowlist
165
- } from "../chunk-XZI5IHQP.js";
165
+ } from "../chunk-34E3FHOS.js";
166
166
  import {
167
167
  reapOrphanChannelMcps
168
168
  } from "../chunk-XWVM4KPK.js";
@@ -1825,7 +1825,29 @@ var GATEABLE_RESTART_REASONS = /* @__PURE__ */ new Set([
1825
1825
  "mcp-presence-reaper",
1826
1826
  // ENG-7949: same gate-but-window-exempt shape as 'mcp-presence-reaper' — see
1827
1827
  // WINDOW_EXEMPT_RESTART_REASONS below for why this one skips the window too.
1828
- "channel-mcp-down"
1828
+ "channel-mcp-down",
1829
+ // ENG-8343: a value-only credential RE-MINT (canonically the GitHub App
1830
+ // installation token, ~1h TTL) rewrites GITHUB_ACCESS_TOKEN/GITHUB_TOKEN, and
1831
+ // the ENG-7510 env-only path stops the session to deliver it. Absent from this
1832
+ // allowlist it hit the fail-open default above and bypassed BOTH axes, so the
1833
+ // stop landed ~3ms after the schedule — unconditionally, mid-turn, roughly once
1834
+ // an hour per affected agent (6 agents / ~144 kills a day at time of filing).
1835
+ //
1836
+ // This absence was an oversight, NOT a decision: ENG-7541 introduced the reason
1837
+ // for the breaker and nobody added it here. The call site in manager-worker.ts
1838
+ // documented the opposite ("defers until idle (never mid-turn) ... safe on a
1839
+ // busy agent"), which is why the gap survived ENG-7541, ENG-7737 and ENG-8264
1840
+ // without anyone catching it. Contrast 'integration-change' and 'hot-reload-mcp'
1841
+ // above, whose absence IS deliberate and is documented as such.
1842
+ //
1843
+ // Deliberately NOT given an idle-escalation ceiling like the window axis has
1844
+ // (ENG-8224). A repair that can never fire is worse than interrupting a turn
1845
+ // when the thing being repaired is a dead channel or a dead toolkit; a rotated
1846
+ // credential is not that. The worst case here is an agent that stays busy past
1847
+ // the outgoing token's expiry and sees 401s on `gh`/`git` until its next quiet
1848
+ // gap, which is strictly cheaper than destroying the turn. Do not "fix" this by
1849
+ // forcing the restart through on a deadline.
1850
+ "credential-rotation"
1829
1851
  ]);
1830
1852
  function isGateableRestartReason(reason) {
1831
1853
  return reason != null && GATEABLE_RESTART_REASONS.has(reason);
@@ -1833,7 +1855,8 @@ function isGateableRestartReason(reason) {
1833
1855
  var WINDOW_EXEMPT_RESTART_REASONS = /* @__PURE__ */ new Set([
1834
1856
  "channel-set-change",
1835
1857
  "sender-policy-change",
1836
- "channel-mcp-down"
1858
+ "channel-mcp-down",
1859
+ "credential-rotation"
1837
1860
  ]);
1838
1861
  var RESTART_WINDOW_DEFER_ESCALATE_AFTER = 20;
1839
1862
  function shouldRelaxRestartWindowGate(deferStreak) {
@@ -9344,12 +9367,16 @@ function restartReasonBindsNewMcp(breakerReason) {
9344
9367
  // hit this predicate. Including it arms the ENG-6174 respawn verification for
9345
9368
  // the ONE real respawn of an integration add.
9346
9369
  breakerReason === "integration-change" || // ENG-7541: a 'credential-rotation' respawn IS the env-only re-mint path
9347
- // (ENG-7510), just tagged with a non-tripping breaker class. It must behave
9348
- // IDENTICALLY to 'hot-reload-mcp' for respawn timing + verification — come
9349
- // back immediately so the agent picks up the fresh credential, and arm the
9370
+ // (ENG-7510), just tagged with a non-tripping breaker class. Once its stop
9371
+ // fires it must behave IDENTICALLY to 'hot-reload-mcp' — come back
9372
+ // immediately so the agent picks up the fresh credential, and arm the
9350
9373
  // ENG-6174 respawn verification (the unchanged MCP set re-binds normally, so
9351
- // verification passes). The ONLY thing that differs from 'hot-reload-mcp' is
9352
- // the breaker tally it lands on.
9374
+ // verification passes).
9375
+ // ENG-8343 scope note: "immediately" here is POST-STOP respawn timing only.
9376
+ // WHEN the stop itself fires is now gated (defer-until-idle, window-exempt) —
9377
+ // exactly the combination 'channel-set-change' above already has: gated at
9378
+ // the stop, immediate on the way back. Do not read this predicate as a claim
9379
+ // that the stop is ungated.
9353
9380
  breakerReason === "credential-rotation";
9354
9381
  }
9355
9382
  function dashboardRestartBreakerReason(restartReason) {
@@ -10079,7 +10106,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
10079
10106
  var lastVersionCheckAt = 0;
10080
10107
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
10081
10108
  var lastResponsivenessProbeAt = 0;
10082
- var agtCliVersion = true ? "0.28.488" : "dev";
10109
+ var agtCliVersion = true ? "0.28.490" : "dev";
10083
10110
  function resolveBrewPath(execFileSync2) {
10084
10111
  try {
10085
10112
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -11242,7 +11269,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
11242
11269
  if (codeNames.length === 0) return;
11243
11270
  void (async () => {
11244
11271
  try {
11245
- const { collectDiagnostics } = await import("../persistent-session-3LWKJAAP.js");
11272
+ const { collectDiagnostics } = await import("../persistent-session-Y3WIXJPW.js");
11246
11273
  await api.post("/host/heartbeat", {
11247
11274
  host_id: hostId,
11248
11275
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
@@ -11349,7 +11376,7 @@ async function pollCycle() {
11349
11376
  }
11350
11377
  try {
11351
11378
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
11352
- const { collectDiagnostics } = await import("../persistent-session-3LWKJAAP.js");
11379
+ const { collectDiagnostics } = await import("../persistent-session-Y3WIXJPW.js");
11353
11380
  const diagCodeNames = [...agentState.persistentSessionAgents];
11354
11381
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
11355
11382
  let tailscaleHostname;
@@ -11463,7 +11490,7 @@ async function pollCycle() {
11463
11490
  collectResponsivenessProbes,
11464
11491
  collectPanelessActivityProbes,
11465
11492
  getResponsivenessIntervalMs
11466
- } = await import("../responsiveness-probe-AAVWTFJN.js");
11493
+ } = await import("../responsiveness-probe-AEFEFKOQ.js");
11467
11494
  const probeIntervalMs = getResponsivenessIntervalMs();
11468
11495
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
11469
11496
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -11527,7 +11554,7 @@ async function pollCycle() {
11527
11554
  collectResponsivenessProbes,
11528
11555
  livePendingInboundOldestAgeSeconds,
11529
11556
  parkPendingInbound
11530
- } = await import("../responsiveness-probe-AAVWTFJN.js");
11557
+ } = await import("../responsiveness-probe-AEFEFKOQ.js");
11531
11558
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
11532
11559
  const wedgeNow = /* @__PURE__ */ new Date();
11533
11560
  const liveAgents = agentState.persistentSessionAgents;
@@ -15009,7 +15036,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
15009
15036
  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}`));
15010
15037
  void (async () => {
15011
15038
  try {
15012
- const { collectDiagnostics } = await import("../persistent-session-3LWKJAAP.js");
15039
+ const { collectDiagnostics } = await import("../persistent-session-Y3WIXJPW.js");
15013
15040
  await api.post("/host/heartbeat", {
15014
15041
  host_id: hostId,
15015
15042
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15059,7 +15086,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
15059
15086
  }
15060
15087
  try {
15061
15088
  const hostId = await getHostId();
15062
- const { collectDiagnostics } = await import("../persistent-session-3LWKJAAP.js");
15089
+ const { collectDiagnostics } = await import("../persistent-session-Y3WIXJPW.js");
15063
15090
  await api.post("/host/heartbeat", {
15064
15091
  host_id: hostId,
15065
15092
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15517,7 +15544,7 @@ async function processClaudePairSessions(agents) {
15517
15544
  killPairSession,
15518
15545
  pairTmuxSession,
15519
15546
  finalizeClaudePairOnboarding
15520
- } = await import("../claude-pair-runtime-FEVTBAHV.js");
15547
+ } = await import("../claude-pair-runtime-GJF64TMZ.js");
15521
15548
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
15522
15549
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
15523
15550
  const killed = await killPairSession(pairTmuxSession(pairId));