@integrity-labs/agt-cli 0.28.504 → 0.28.506

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-AB4SAH5B.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-RAXQFDPB.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-E3KMHKQQ.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-7CZWWZJ2.js.map
@@ -27,6 +27,7 @@ import {
27
27
  getCachedClaudeAuthMode,
28
28
  getHostId,
29
29
  givenUpMcpServerKeys,
30
+ isIntegrationBucketedReason,
30
31
  isProvisioningReloadReason,
31
32
  isTransientAuthFailure,
32
33
  liveProxyExtraHeaderVars,
@@ -52,7 +53,7 @@ import {
52
53
  safeWriteJsonAtomic,
53
54
  setConfigHash,
54
55
  tripClass
55
- } from "../chunk-GXEXHVNW.js";
56
+ } from "../chunk-43UIRCO7.js";
56
57
  import {
57
58
  getProjectDir as getProjectDir2,
58
59
  getReadyTasks,
@@ -172,7 +173,7 @@ import {
172
173
  toOpencodeModel,
173
174
  transcriptActivityAgeSeconds,
174
175
  writeEgressAllowlist
175
- } from "../chunk-HEUDF73X.js";
176
+ } from "../chunk-SMHHGXI5.js";
176
177
  import {
177
178
  reapOrphanChannelMcps
178
179
  } from "../chunk-XWVM4KPK.js";
@@ -8977,7 +8978,7 @@ function recordRestartForBreaker(codeName, reason) {
8977
8978
  return;
8978
8979
  }
8979
8980
  let integrationKey;
8980
- if (isProvisioningReloadReason(reason)) {
8981
+ if (isIntegrationBucketedReason(reason)) {
8981
8982
  const attribution = agentState.provisioningAttribution.get(codeName);
8982
8983
  if (attribution && Date.now() - attribution.at <= RESTART_BREAKER_PROVISIONING_WINDOW_MS) {
8983
8984
  integrationKey = attribution.key;
@@ -9259,7 +9260,12 @@ function restartReasonBindsNewMcp(breakerReason) {
9259
9260
  // above always described it, but the path passed no breakerReason so it never
9260
9261
  // hit this predicate. Including it arms the ENG-6174 respawn verification for
9261
9262
  // the ONE real respawn of an integration add.
9262
- breakerReason === "integration-change" || // ENG-7541: a 'credential-rotation' respawn IS the env-only re-mint path
9263
+ breakerReason === "integration-change" || // ENG-8388: the operator-attributed variant is the SAME reload with a
9264
+ // different breaker tally - it binds a changed MCP set identically. Omitting
9265
+ // it here would mean attributing a reload to a human silently disabled the
9266
+ // respawn verification for it, i.e. the fix would break the thing it was
9267
+ // meant to leave alone.
9268
+ breakerReason === "operator-integration-change" || // ENG-7541: a 'credential-rotation' respawn IS the env-only re-mint path
9263
9269
  // (ENG-7510), just tagged with a non-tripping breaker class. Once its stop
9264
9270
  // fires it must behave IDENTICALLY to 'hot-reload-mcp' — come back
9265
9271
  // immediately so the agent picks up the fresh credential, and arm the
@@ -9272,11 +9278,16 @@ function restartReasonBindsNewMcp(breakerReason) {
9272
9278
  // that the stop is ungated.
9273
9279
  breakerReason === "credential-rotation";
9274
9280
  }
9275
- function dashboardRestartBreakerReason(restartReason) {
9276
- return restartReason === "integration-change" ? "integration-change" : void 0;
9281
+ function dashboardRestartBreakerReason(restartReason, restartActor) {
9282
+ if (restartReason !== "integration-change") return void 0;
9283
+ return restartActor === "user" ? "operator-integration-change" : "integration-change";
9277
9284
  }
9278
9285
  function shouldReportRestartToAudit(breakerReason) {
9279
- return !!breakerReason && breakerReason !== "agent-requested" && breakerReason !== "channel-restart-flag" && breakerReason !== "integration-change";
9286
+ return !!breakerReason && breakerReason !== "agent-requested" && breakerReason !== "channel-restart-flag" && breakerReason !== "integration-change" && // ENG-8388: the operator-attributed variant is the SAME dashboard reload,
9287
+ // audited server-side at the same API route. Without this line, attributing
9288
+ // a reload to a human would start double-logging it - a fix whose only
9289
+ // visible effect is duplicated audit rows.
9290
+ breakerReason !== "operator-integration-change";
9280
9291
  }
9281
9292
  function reportRestartEvent(codeName, breakerReason, auditDetail) {
9282
9293
  if (!shouldReportRestartToAudit(breakerReason)) return;
@@ -10001,7 +10012,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
10001
10012
  var lastVersionCheckAt = 0;
10002
10013
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
10003
10014
  var lastResponsivenessProbeAt = 0;
10004
- var agtCliVersion = true ? "0.28.504" : "dev";
10015
+ var agtCliVersion = true ? "0.28.506" : "dev";
10005
10016
  function resolveBrewPath(execFileSync2) {
10006
10017
  try {
10007
10018
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -11208,7 +11219,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
11208
11219
  if (codeNames.length === 0) return;
11209
11220
  void (async () => {
11210
11221
  try {
11211
- const { collectDiagnostics } = await import("../persistent-session-AB4SAH5B.js");
11222
+ const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
11212
11223
  await api.post("/host/heartbeat", {
11213
11224
  host_id: hostId,
11214
11225
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
@@ -11315,7 +11326,7 @@ async function pollCycle() {
11315
11326
  }
11316
11327
  try {
11317
11328
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
11318
- const { collectDiagnostics } = await import("../persistent-session-AB4SAH5B.js");
11329
+ const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
11319
11330
  const diagCodeNames = [...agentState.persistentSessionAgents];
11320
11331
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
11321
11332
  let tailscaleHostname;
@@ -11430,7 +11441,7 @@ async function pollCycle() {
11430
11441
  collectResponsivenessProbes,
11431
11442
  collectPanelessActivityProbes,
11432
11443
  getResponsivenessIntervalMs
11433
- } = await import("../responsiveness-probe-O4SCSCKC.js");
11444
+ } = await import("../responsiveness-probe-PBWABVLJ.js");
11434
11445
  const probeIntervalMs = getResponsivenessIntervalMs();
11435
11446
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
11436
11447
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -11494,7 +11505,7 @@ async function pollCycle() {
11494
11505
  collectResponsivenessProbes,
11495
11506
  livePendingInboundOldestAgeSeconds,
11496
11507
  parkPendingInbound
11497
- } = await import("../responsiveness-probe-O4SCSCKC.js");
11508
+ } = await import("../responsiveness-probe-PBWABVLJ.js");
11498
11509
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
11499
11510
  const wedgeNow = /* @__PURE__ */ new Date();
11500
11511
  const liveAgents = agentState.persistentSessionAgents;
@@ -11726,7 +11737,7 @@ async function pollCycle() {
11726
11737
  es(`tmux kill-session -t agt-${agent.code_name} 2>/dev/null`, { stdio: "ignore" });
11727
11738
  } catch {
11728
11739
  }
11729
- const breakerReason = dashboardRestartBreakerReason(restartReason);
11740
+ const breakerReason = dashboardRestartBreakerReason(restartReason, agent.restart_actor);
11730
11741
  stopPersistentSessionAndForgetMcpBaseline(agent.code_name, breakerReason);
11731
11742
  if (breakerReason && restartReasonBindsNewMcp(breakerReason)) {
11732
11743
  noteRestartRequested(agent.code_name, requested);
@@ -14986,7 +14997,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
14986
14997
  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}`));
14987
14998
  void (async () => {
14988
14999
  try {
14989
- const { collectDiagnostics } = await import("../persistent-session-AB4SAH5B.js");
15000
+ const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
14990
15001
  await api.post("/host/heartbeat", {
14991
15002
  host_id: hostId,
14992
15003
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15036,7 +15047,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
15036
15047
  }
15037
15048
  try {
15038
15049
  const hostId = await getHostId();
15039
- const { collectDiagnostics } = await import("../persistent-session-AB4SAH5B.js");
15050
+ const { collectDiagnostics } = await import("../persistent-session-RAXQFDPB.js");
15040
15051
  await api.post("/host/heartbeat", {
15041
15052
  host_id: hostId,
15042
15053
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15554,7 +15565,7 @@ async function processClaudePairSessions(agents) {
15554
15565
  killPairSession,
15555
15566
  pairTmuxSession,
15556
15567
  finalizeClaudePairOnboarding
15557
- } = await import("../claude-pair-runtime-E3KMHKQQ.js");
15568
+ } = await import("../claude-pair-runtime-7CZWWZJ2.js");
15558
15569
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
15559
15570
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
15560
15571
  const killed = await killPairSession(pairTmuxSession(pairId));