@integrity-labs/agt-cli 0.28.800 → 0.28.801

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.
@@ -14,7 +14,7 @@ import {
14
14
  parseEnvFileEntries,
15
15
  parseEnvIntegrations,
16
16
  shellQuote
17
- } from "./chunk-6DSTKWCZ.js";
17
+ } from "./chunk-H37X4QPC.js";
18
18
  import {
19
19
  BIND_FAILURE_QUARANTINE_THRESHOLD,
20
20
  INTEGRATIONS_SECTION_END,
@@ -6521,7 +6521,7 @@ function exchangeFailureKind(err) {
6521
6521
  }
6522
6522
 
6523
6523
  // src/lib/api-client.ts
6524
- var agtCliVersion = true ? "0.28.800" : "dev";
6524
+ var agtCliVersion = true ? "0.28.801" : "dev";
6525
6525
  var lastConfigHash = null;
6526
6526
  function setConfigHash(hash) {
6527
6527
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10765,4 +10765,4 @@ export {
10765
10765
  managerInstallSystemUnitCommand,
10766
10766
  managerUninstallSystemUnitCommand
10767
10767
  };
10768
- //# sourceMappingURL=chunk-BHF5IROA.js.map
10768
+ //# sourceMappingURL=chunk-ZI2MCNK2.js.map
@@ -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-CEFEFEWI.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-7YEKAGRY.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-XWKPE4WP.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-FP32JLYF.js.map
@@ -58,7 +58,7 @@ import {
58
58
  safeWriteJsonAtomic,
59
59
  setConfigHash,
60
60
  tripClass
61
- } from "../chunk-BHF5IROA.js";
61
+ } from "../chunk-ZI2MCNK2.js";
62
62
  import {
63
63
  getProjectDir as getProjectDir2,
64
64
  getReadyTasks,
@@ -77,6 +77,7 @@ import {
77
77
  creditWatchdogUnclaimedDialogCount,
78
78
  egressMode,
79
79
  execFilePromiseLong,
80
+ failoverRestartNotice,
80
81
  getLastFailureContext,
81
82
  getOpencodeActivityAgeSeconds,
82
83
  getOpencodeSessionState,
@@ -122,7 +123,7 @@ import {
122
123
  takeZombieDetection,
123
124
  toOpencodeModel,
124
125
  writeEgressAllowlist
125
- } from "../chunk-6DSTKWCZ.js";
126
+ } from "../chunk-H37X4QPC.js";
126
127
  import {
127
128
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
128
129
  AnchorSessionClient,
@@ -12917,7 +12918,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
12917
12918
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
12918
12919
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
12919
12920
  async function channelInboundActivityAgeSecondsFor(codeName) {
12920
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-MGNJUBCE.js");
12921
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-VL6EANMM.js");
12921
12922
  const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
12922
12923
  if (newest === null) return null;
12923
12924
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -13577,7 +13578,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13577
13578
  var lastVersionCheckAt = 0;
13578
13579
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13579
13580
  var lastResponsivenessProbeAt = 0;
13580
- var agtCliVersion = true ? "0.28.800" : "dev";
13581
+ var agtCliVersion = true ? "0.28.801" : "dev";
13581
13582
  function resolveBrewPath(execFileSync2) {
13582
13583
  try {
13583
13584
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -15124,7 +15125,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
15124
15125
  if (codeNames.length === 0) return;
15125
15126
  void (async () => {
15126
15127
  try {
15127
- const { collectDiagnostics } = await import("../persistent-session-CEFEFEWI.js");
15128
+ const { collectDiagnostics } = await import("../persistent-session-7YEKAGRY.js");
15128
15129
  await api.post("/host/heartbeat", {
15129
15130
  host_id: hostId,
15130
15131
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -15265,7 +15266,7 @@ async function pollCycleInner() {
15265
15266
  }
15266
15267
  try {
15267
15268
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
15268
- const { collectDiagnostics } = await import("../persistent-session-CEFEFEWI.js");
15269
+ const { collectDiagnostics } = await import("../persistent-session-7YEKAGRY.js");
15269
15270
  const diagCodeNames = [...agentState.persistentSessionAgents];
15270
15271
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
15271
15272
  let tailscaleHostname;
@@ -15434,7 +15435,7 @@ async function pollCycleInner() {
15434
15435
  collectPanelessActivityProbes,
15435
15436
  getResponsivenessIntervalMs,
15436
15437
  occupancyQualificationClassifications
15437
- } = await import("../responsiveness-probe-MGNJUBCE.js");
15438
+ } = await import("../responsiveness-probe-VL6EANMM.js");
15438
15439
  const probeIntervalMs = getResponsivenessIntervalMs();
15439
15440
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
15440
15441
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -15551,7 +15552,7 @@ async function pollCycleInner() {
15551
15552
  collectResponsivenessProbes,
15552
15553
  livePendingInboundOldestAgeSeconds,
15553
15554
  parkPendingInbound
15554
- } = await import("../responsiveness-probe-MGNJUBCE.js");
15555
+ } = await import("../responsiveness-probe-VL6EANMM.js");
15555
15556
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
15556
15557
  const wedgeNow = /* @__PURE__ */ new Date();
15557
15558
  const liveAgents = agentState.persistentSessionAgents;
@@ -19178,6 +19179,24 @@ async function ensurePersistentSession(agent, tasks, boardItems, refreshData) {
19178
19179
  log(
19179
19180
  `[persistent-session] Auth config changed for '${codeName}' (${recordedAuthTuple} \u2192 ${currentAuthTuple}) \u2014 ${authTupleDiff.summary} \u2014 restarting session`
19180
19181
  );
19182
+ const failoverNotice = failoverRestartNotice({
19183
+ components: authTupleDiff.components,
19184
+ policy: modelPolicy
19185
+ });
19186
+ if (failoverNotice && isSessionHealthy(codeName)) {
19187
+ const status = await injectMessageWithStatus(
19188
+ codeName,
19189
+ "system",
19190
+ failoverNotice + BACK_ONLINE_GREETING_GUIDANCE,
19191
+ { task_name: "model-policy-failover" },
19192
+ log
19193
+ ).catch(() => ({ delivered: false, fallbackUsed: false }));
19194
+ if (status.fallbackUsed) {
19195
+ await new Promise((r) => setTimeout(r, 3e3));
19196
+ } else {
19197
+ log(`[model-policy] Failover notice not delivered to '${codeName}' \u2014 restarting anyway`);
19198
+ }
19199
+ }
19181
19200
  stopPersistentSessionAndForgetMcpBaseline(codeName, "auth-tuple-change", void 0, void 0, {
19182
19201
  reason: authTupleDiff.summary,
19183
19202
  detail: {
@@ -19808,7 +19827,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
19808
19827
  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}`));
19809
19828
  void (async () => {
19810
19829
  try {
19811
- const { collectDiagnostics } = await import("../persistent-session-CEFEFEWI.js");
19830
+ const { collectDiagnostics } = await import("../persistent-session-7YEKAGRY.js");
19812
19831
  await api.post("/host/heartbeat", {
19813
19832
  host_id: hostId,
19814
19833
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -19854,7 +19873,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
19854
19873
  }
19855
19874
  try {
19856
19875
  const hostId = await getHostId();
19857
- const { collectDiagnostics } = await import("../persistent-session-CEFEFEWI.js");
19876
+ const { collectDiagnostics } = await import("../persistent-session-7YEKAGRY.js");
19858
19877
  await api.post("/host/heartbeat", {
19859
19878
  host_id: hostId,
19860
19879
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -20490,7 +20509,7 @@ async function processClaudePairSessions(agents) {
20490
20509
  killPairSession,
20491
20510
  pairTmuxSession,
20492
20511
  finalizeClaudePairOnboarding
20493
- } = await import("../claude-pair-runtime-XWKPE4WP.js");
20512
+ } = await import("../claude-pair-runtime-FP32JLYF.js");
20494
20513
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
20495
20514
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
20496
20515
  const killed = await killPairSession(pairTmuxSession(pairId));