@integrity-labs/agt-cli 0.28.1291 → 0.28.1293

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 (34) hide show
  1. package/dist/{api-client-6L3L4HKS.js → api-client-X6EKO72C.js} +3 -3
  2. package/dist/bin/agt.js +7 -7
  3. package/dist/{chunk-RPZSSKF7.js → chunk-2N3GYWTF.js} +5 -5
  4. package/dist/{chunk-3NCSZIK4.js → chunk-624FWL4A.js} +2 -2
  5. package/dist/{chunk-QSIKMH7L.js → chunk-J34KVUAW.js} +3 -3
  6. package/dist/{chunk-LAJEUIP7.js → chunk-M3OBVJQP.js} +1 -27
  7. package/dist/chunk-M3OBVJQP.js.map +1 -0
  8. package/dist/{chunk-IPWGWDON.js → chunk-SR46T5UD.js} +2 -2
  9. package/dist/{chunk-G4T3PGWR.js → chunk-YZHOUQRL.js} +3 -3
  10. package/dist/{claude-code-updater-NBWLPWZU.js → claude-code-updater-6AJKWY22.js} +3 -3
  11. package/dist/{claude-pair-runtime-3RJNQ3XJ.js → claude-pair-runtime-ATC6ZI6J.js} +3 -3
  12. package/dist/lib/manager-worker.js +50 -23
  13. package/dist/lib/manager-worker.js.map +1 -1
  14. package/dist/mcp/direct-chat-channel.js +160 -125
  15. package/dist/mcp/index.js +0 -26
  16. package/dist/mcp/origami.js +0 -26
  17. package/dist/mcp/slack-channel.js +0 -26
  18. package/dist/mcp/telegram-channel.js +0 -26
  19. package/dist/{persistent-session-Q5FJJAFR.js → persistent-session-WLSZATFE.js} +4 -4
  20. package/dist/{responsiveness-probe-EYIQ2RPD.js → responsiveness-probe-F6TL3DZB.js} +4 -4
  21. package/dist/{session-auth-dead-TYDPUWCV.js → session-auth-dead-HJLK5AFT.js} +3 -3
  22. package/package.json +1 -1
  23. package/dist/chunk-LAJEUIP7.js.map +0 -1
  24. /package/dist/{api-client-6L3L4HKS.js.map → api-client-X6EKO72C.js.map} +0 -0
  25. /package/dist/{chunk-RPZSSKF7.js.map → chunk-2N3GYWTF.js.map} +0 -0
  26. /package/dist/{chunk-3NCSZIK4.js.map → chunk-624FWL4A.js.map} +0 -0
  27. /package/dist/{chunk-QSIKMH7L.js.map → chunk-J34KVUAW.js.map} +0 -0
  28. /package/dist/{chunk-IPWGWDON.js.map → chunk-SR46T5UD.js.map} +0 -0
  29. /package/dist/{chunk-G4T3PGWR.js.map → chunk-YZHOUQRL.js.map} +0 -0
  30. /package/dist/{claude-code-updater-NBWLPWZU.js.map → claude-code-updater-6AJKWY22.js.map} +0 -0
  31. /package/dist/{claude-pair-runtime-3RJNQ3XJ.js.map → claude-pair-runtime-ATC6ZI6J.js.map} +0 -0
  32. /package/dist/{persistent-session-Q5FJJAFR.js.map → persistent-session-WLSZATFE.js.map} +0 -0
  33. /package/dist/{responsiveness-probe-EYIQ2RPD.js.map → responsiveness-probe-F6TL3DZB.js.map} +0 -0
  34. /package/dist/{session-auth-dead-TYDPUWCV.js.map → session-auth-dead-HJLK5AFT.js.map} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-XWVM4KPK.js";
5
5
  import {
6
6
  FORCED_UPDATE_HARD_DEADLINE_MS
7
- } from "./chunk-LAJEUIP7.js";
7
+ } from "./chunk-M3OBVJQP.js";
8
8
  import {
9
9
  effectiveClaudeJsonPath
10
10
  } from "./chunk-AIUIMEUS.js";
@@ -722,4 +722,4 @@ export {
722
722
  probeClaudeInstalls,
723
723
  maybeUpdateClaudeCode
724
724
  };
725
- //# sourceMappingURL=chunk-IPWGWDON.js.map
725
+ //# sourceMappingURL=chunk-SR46T5UD.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HOST_ROTATE_KEY_CONFLICT
3
- } from "./chunk-LAJEUIP7.js";
3
+ } from "./chunk-M3OBVJQP.js";
4
4
 
5
5
  // src/lib/config.ts
6
6
  import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
@@ -103,7 +103,7 @@ function exchangeFailureKind(err) {
103
103
  }
104
104
 
105
105
  // src/lib/api-client.ts
106
- var agtCliVersion = true ? "0.28.1291" : "dev";
106
+ var agtCliVersion = true ? "0.28.1293" : "dev";
107
107
  var lastConfigHash = null;
108
108
  function setConfigHash(hash) {
109
109
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -468,4 +468,4 @@ export {
468
468
  api,
469
469
  getHostId
470
470
  };
471
- //# sourceMappingURL=chunk-G4T3PGWR.js.map
471
+ //# sourceMappingURL=chunk-YZHOUQRL.js.map
@@ -13,9 +13,9 @@ import {
13
13
  probeClaudeInstalls,
14
14
  readsAsNativeInstall,
15
15
  shouldRunClaudeCodeUpdater
16
- } from "./chunk-IPWGWDON.js";
16
+ } from "./chunk-SR46T5UD.js";
17
17
  import "./chunk-XWVM4KPK.js";
18
- import "./chunk-LAJEUIP7.js";
18
+ import "./chunk-M3OBVJQP.js";
19
19
  import "./chunk-AIUIMEUS.js";
20
20
  import "./chunk-DGUM43GV.js";
21
21
  export {
@@ -34,4 +34,4 @@ export {
34
34
  readsAsNativeInstall,
35
35
  shouldRunClaudeCodeUpdater
36
36
  };
37
- //# sourceMappingURL=claude-code-updater-NBWLPWZU.js.map
37
+ //# sourceMappingURL=claude-code-updater-6AJKWY22.js.map
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  redactPaneFrame,
12
12
  sanitizeTerminalFrame
13
- } from "./chunk-LAJEUIP7.js";
13
+ } from "./chunk-M3OBVJQP.js";
14
14
  import {
15
15
  CLAUDE_CONFIG_DIR_ENV,
16
16
  claudeConfigDirFor,
@@ -323,7 +323,7 @@ async function spawnPairSession(session) {
323
323
  return { ok: true };
324
324
  } catch {
325
325
  }
326
- const { resolveClaudeBinary } = await import("./persistent-session-Q5FJJAFR.js");
326
+ const { resolveClaudeBinary } = await import("./persistent-session-WLSZATFE.js");
327
327
  const claudeBin = resolveClaudeBinary();
328
328
  const pairEnv = {
329
329
  ...process.env,
@@ -838,4 +838,4 @@ export {
838
838
  startClaudePair,
839
839
  submitClaudePairCode
840
840
  };
841
- //# sourceMappingURL=claude-pair-runtime-3RJNQ3XJ.js.map
841
+ //# sourceMappingURL=claude-pair-runtime-ATC6ZI6J.js.map
@@ -70,7 +70,7 @@ import {
70
70
  tripClass,
71
71
  writeEtcEnvironment,
72
72
  writeProfileDScript
73
- } from "../chunk-RPZSSKF7.js";
73
+ } from "../chunk-2N3GYWTF.js";
74
74
  import {
75
75
  ApiError,
76
76
  adoptHostKeyInProcess,
@@ -88,7 +88,7 @@ import {
88
88
  probeHostKey,
89
89
  requireHost,
90
90
  setConfigHash
91
- } from "../chunk-G4T3PGWR.js";
91
+ } from "../chunk-YZHOUQRL.js";
92
92
  import {
93
93
  BLOCKED_ON_PROMPT_DECISION,
94
94
  CHANNEL_SECRET_ENV_KEYS,
@@ -180,7 +180,7 @@ import {
180
180
  webFetchBaselineValue,
181
181
  webFetchRestartNeeded,
182
182
  writeEgressAllowlist
183
- } from "../chunk-QSIKMH7L.js";
183
+ } from "../chunk-J34KVUAW.js";
184
184
  import {
185
185
  isAgentIdle,
186
186
  isStaleForToday,
@@ -191,7 +191,7 @@ import {
191
191
  subagentActivityAgeSeconds,
192
192
  subagentTranscriptDir,
193
193
  transcriptActivityAgeSeconds
194
- } from "../chunk-3NCSZIK4.js";
194
+ } from "../chunk-624FWL4A.js";
195
195
  import {
196
196
  classifyUnanswerablePane,
197
197
  focusedConfirmDialogBlock,
@@ -217,7 +217,7 @@ import {
217
217
  runSafeCleanup,
218
218
  tightestDiskStat,
219
219
  withPackageCacheLock
220
- } from "../chunk-IPWGWDON.js";
220
+ } from "../chunk-SR46T5UD.js";
221
221
  import {
222
222
  parsePsRows,
223
223
  reapOrphanChannelMcps
@@ -346,7 +346,7 @@ import {
346
346
  stabiliseResetInstant,
347
347
  sumTranscriptUsageInWindow,
348
348
  summarizeTranscriptActivity
349
- } from "../chunk-LAJEUIP7.js";
349
+ } from "../chunk-M3OBVJQP.js";
350
350
  import {
351
351
  CLAUDE_CONFIG_DIR_ENV,
352
352
  claudeConfigDirFor,
@@ -15566,7 +15566,7 @@ function createFileMigrationReportIO(codeName, log2) {
15566
15566
  };
15567
15567
  }
15568
15568
  var managerHostPost = async (path, body) => {
15569
- const { api: api2, ApiError: ApiError3 } = await import("../api-client-6L3L4HKS.js");
15569
+ const { api: api2, ApiError: ApiError3 } = await import("../api-client-X6EKO72C.js");
15570
15570
  try {
15571
15571
  const json = await api2.post(path, body);
15572
15572
  return { status: 200, json };
@@ -16204,6 +16204,29 @@ var PersistentSessionStuckTracker = class {
16204
16204
  }
16205
16205
  };
16206
16206
 
16207
+ // src/lib/heartbeat-diagnostics-code-names.ts
16208
+ function heartbeatDiagnosticsCodeNames(persistentSessionAgents, spawnOutcomeCodeNames) {
16209
+ const out = /* @__PURE__ */ new Set();
16210
+ for (const codeName of persistentSessionAgents) if (codeName) out.add(codeName);
16211
+ for (const codeName of spawnOutcomeCodeNames) if (codeName) out.add(codeName);
16212
+ return [...out];
16213
+ }
16214
+ var SpawnOutcomeRoster = class {
16215
+ recorded = /* @__PURE__ */ new Set();
16216
+ record(codeName) {
16217
+ if (codeName) this.recorded.add(codeName);
16218
+ }
16219
+ /** Every name recorded since the previous drain, then empty. */
16220
+ drain() {
16221
+ const out = [...this.recorded];
16222
+ this.recorded.clear();
16223
+ return out;
16224
+ }
16225
+ };
16226
+ function spawnOutcomeIfRecorded(outcomeFor, recordedSinceHeartbeat) {
16227
+ return (codeName) => recordedSinceHeartbeat.has(codeName) ? outcomeFor(codeName) : void 0;
16228
+ }
16229
+
16207
16230
  // src/lib/transient-api-error-log.ts
16208
16231
  var CODE_KIND = {
16209
16232
  "429": "rate_limit",
@@ -17514,12 +17537,14 @@ function cancelPendingSessionRestart(codeName) {
17514
17537
  log(`[hot-reload] Cancelled pending restart timer for '${codeName}' (another teardown path is handling it)`);
17515
17538
  }
17516
17539
  var lastSpawnOutcomeByAgent = /* @__PURE__ */ new Map();
17540
+ var spawnOutcomesSinceHeartbeat = new SpawnOutcomeRoster();
17517
17541
  var lastSpawnDecisionByAgent = /* @__PURE__ */ new Map();
17518
17542
  function recordSpawnOutcome(codeName, result) {
17519
17543
  lastSpawnOutcomeByAgent.set(codeName, {
17520
17544
  spawnAttempted: result.spawnAttempted,
17521
17545
  sessionHealthyAfter: result.sessionHealthyAfter
17522
17546
  });
17547
+ spawnOutcomesSinceHeartbeat.record(codeName);
17523
17548
  if (result.decision) lastSpawnDecisionByAgent.set(codeName, result.decision);
17524
17549
  }
17525
17550
  function spawnOutcomeForDiagnostics(codeName) {
@@ -17630,7 +17655,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
17630
17655
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
17631
17656
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
17632
17657
  async function channelInboundActivityAgeSecondsFor(codeName) {
17633
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-EYIQ2RPD.js");
17658
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-F6TL3DZB.js");
17634
17659
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
17635
17660
  if (newest === null) return null;
17636
17661
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -18513,7 +18538,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
18513
18538
  var lastVersionCheckAt = 0;
18514
18539
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
18515
18540
  var lastResponsivenessProbeAt = 0;
18516
- var agtCliVersion = true ? "0.28.1291" : "dev";
18541
+ var agtCliVersion = true ? "0.28.1293" : "dev";
18517
18542
  function resolveBrewPath(execFileSync5) {
18518
18543
  try {
18519
18544
  const out = execFileSync5("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -20624,7 +20649,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
20624
20649
  if (codeNames.length === 0) return;
20625
20650
  void (async () => {
20626
20651
  try {
20627
- const { collectDiagnostics } = await import("../persistent-session-Q5FJJAFR.js");
20652
+ const { collectDiagnostics } = await import("../persistent-session-WLSZATFE.js");
20628
20653
  await api.post("/host/heartbeat", {
20629
20654
  host_id: hostId,
20630
20655
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -20767,9 +20792,11 @@ async function pollCycleInner() {
20767
20792
  }
20768
20793
  try {
20769
20794
  const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
20770
- const { collectDiagnostics } = await import("../persistent-session-Q5FJJAFR.js");
20771
- const diagCodeNames = [...agentState.persistentSessionAgents];
20772
- const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor) : void 0;
20795
+ const { collectDiagnostics } = await import("../persistent-session-WLSZATFE.js");
20796
+ const recordedSinceHeartbeat = new Set(spawnOutcomesSinceHeartbeat.drain());
20797
+ const diagCodeNames = heartbeatDiagnosticsCodeNames(agentState.persistentSessionAgents, recordedSinceHeartbeat);
20798
+ const heartbeatSpawnOutcomeFor = spawnOutcomeIfRecorded(spawnOutcomeForDiagnostics, recordedSinceHeartbeat);
20799
+ const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, heartbeatSpawnOutcomeFor, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor) : void 0;
20773
20800
  let tailscaleHostname;
20774
20801
  try {
20775
20802
  const { execSync: es } = await import("child_process");
@@ -21066,7 +21093,7 @@ async function pollCycleInner() {
21066
21093
  }
21067
21094
  try {
21068
21095
  const desiredClaudeCodeVersion = hbResp?.desired_claude_code_version?.trim();
21069
- const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-NBWLPWZU.js");
21096
+ const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-6AJKWY22.js");
21070
21097
  const securityFloor = currentSecurityFloor();
21071
21098
  claudeUpdaterInFlight = true;
21072
21099
  if (desiredClaudeCodeVersion && (claudePairLoop.busy || claudePairingInProgress())) {
@@ -21101,7 +21128,7 @@ async function pollCycleInner() {
21101
21128
  collectPanelessActivityProbes,
21102
21129
  getResponsivenessIntervalMs,
21103
21130
  occupancyQualificationClassifications
21104
- } = await import("../responsiveness-probe-EYIQ2RPD.js");
21131
+ } = await import("../responsiveness-probe-F6TL3DZB.js");
21105
21132
  const probeIntervalMs = getResponsivenessIntervalMs();
21106
21133
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
21107
21134
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -21218,7 +21245,7 @@ async function pollCycleInner() {
21218
21245
  collectResponsivenessProbes,
21219
21246
  livePendingInboundOldestAgeSeconds,
21220
21247
  parkPendingInbound
21221
- } = await import("../responsiveness-probe-EYIQ2RPD.js");
21248
+ } = await import("../responsiveness-probe-F6TL3DZB.js");
21222
21249
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-5PCBGRNY.js");
21223
21250
  const wedgeNow = /* @__PURE__ */ new Date();
21224
21251
  const liveAgents = agentState.persistentSessionAgents;
@@ -21504,7 +21531,7 @@ async function pollCycleInner() {
21504
21531
  }
21505
21532
  }
21506
21533
  );
21507
- const { parkPendingInbound } = await import("../responsiveness-probe-EYIQ2RPD.js");
21534
+ const { parkPendingInbound } = await import("../responsiveness-probe-F6TL3DZB.js");
21508
21535
  const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
21509
21536
  paneFatalStreak.delete(codeName);
21510
21537
  paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
@@ -21535,7 +21562,7 @@ async function pollCycleInner() {
21535
21562
  TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
21536
21563
  bindSourceEscalations
21537
21564
  } = await import("../transcript-mount-health-OHE6IVJV.js");
21538
- const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-Q5FJJAFR.js");
21565
+ const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-WLSZATFE.js");
21539
21566
  const mountConfig = resolveTranscriptMountConfig();
21540
21567
  const liveAgents = agentState.persistentSessionAgents;
21541
21568
  for (const tracked of [
@@ -21700,7 +21727,7 @@ async function pollCycleInner() {
21700
21727
  }
21701
21728
  try {
21702
21729
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
21703
- const { probeSessionAuth } = await import("../session-auth-dead-TYDPUWCV.js");
21730
+ const { probeSessionAuth } = await import("../session-auth-dead-HJLK5AFT.js");
21704
21731
  const observations = [];
21705
21732
  const pendingCacheCommits = [];
21706
21733
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -26811,7 +26838,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
26811
26838
  if (!refreshData) return;
26812
26839
  const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
26813
26840
  const hostId = await getHostId();
26814
- const parkForRestart = await import("../responsiveness-probe-EYIQ2RPD.js").then(
26841
+ const parkForRestart = await import("../responsiveness-probe-F6TL3DZB.js").then(
26815
26842
  (m) => m.parkPendingInbound,
26816
26843
  (err) => err
26817
26844
  );
@@ -26888,7 +26915,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
26888
26915
  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}`));
26889
26916
  void (async () => {
26890
26917
  try {
26891
- const { collectDiagnostics } = await import("../persistent-session-Q5FJJAFR.js");
26918
+ const { collectDiagnostics } = await import("../persistent-session-WLSZATFE.js");
26892
26919
  await api.post("/host/heartbeat", {
26893
26920
  host_id: hostId,
26894
26921
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -26941,7 +26968,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
26941
26968
  }
26942
26969
  try {
26943
26970
  const hostId = await getHostId();
26944
- const { collectDiagnostics } = await import("../persistent-session-Q5FJJAFR.js");
26971
+ const { collectDiagnostics } = await import("../persistent-session-WLSZATFE.js");
26945
26972
  await api.post("/host/heartbeat", {
26946
26973
  host_id: hostId,
26947
26974
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -27820,7 +27847,7 @@ async function processClaudePairSessions(agents) {
27820
27847
  snapshotPairConfig,
27821
27848
  // ENG-11659: result -> report body + the manager.log line that records it.
27822
27849
  planPairStartReport
27823
- } = await import("../claude-pair-runtime-3RJNQ3XJ.js");
27850
+ } = await import("../claude-pair-runtime-ATC6ZI6J.js");
27824
27851
  const { resetClaudeSignin, describeSigninResetForLog, describeSigninResetFailure } = await import("../claude-signin-reset-6IJMMVYG.js");
27825
27852
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
27826
27853
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);