@integrity-labs/agt-cli 0.28.594 → 0.28.595

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-YRCF7AAC.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-BGMQQYW2.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-CGVDKWFC.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-5WB2FMIX.js.map
@@ -53,7 +53,7 @@ import {
53
53
  safeWriteJsonAtomic,
54
54
  setConfigHash,
55
55
  tripClass
56
- } from "../chunk-U7DHWGAZ.js";
56
+ } from "../chunk-RC6V6QN2.js";
57
57
  import {
58
58
  getProjectDir as getProjectDir2,
59
59
  getReadyTasks,
@@ -61,12 +61,60 @@ import {
61
61
  markTaskFired,
62
62
  syncTasksToScheduler
63
63
  } from "../chunk-3HLECXMI.js";
64
+ import {
65
+ ChildProcessError,
66
+ agentRuntimeKey,
67
+ buildEgressAllowlist,
68
+ checkChannelInputs,
69
+ creditWatchdogGiveUpCount,
70
+ egressMode,
71
+ execFilePromiseLong,
72
+ getLastFailureContext,
73
+ getOpencodeActivityAgeSeconds,
74
+ getOpencodeSessionState,
75
+ getOpencodeTurnHealth,
76
+ getProjectDir,
77
+ getSessionState,
78
+ hashFile,
79
+ injectMessage,
80
+ injectMessageWithStatus,
81
+ injectOpencodeMessage,
82
+ isOpencodeSessionHealthy,
83
+ isSessionHealthy,
84
+ isolationMode,
85
+ log,
86
+ mergeOpencodeConfigArtifact,
87
+ paneLogPath,
88
+ parseEnvIntegrations,
89
+ prepareForRespawn,
90
+ readChannelServerEnv,
91
+ readDirectChatSessionState,
92
+ readOpencodePaneLogTail,
93
+ readPaneLogTail,
94
+ readProvisionedOpencodeModel,
95
+ reloadEgressSidecar,
96
+ resetRestartCount,
97
+ resolveClaudeBinary,
98
+ restartEgressSidecar,
99
+ rotatePaneLogForDayRollover,
100
+ rotateSessionForWedge,
101
+ sha256,
102
+ sharedBusyBuckets,
103
+ startOpencodeSession,
104
+ startPersistentSession,
105
+ stopAllSessionsAndWait,
106
+ stopOpencodeSession,
107
+ stopPersistentSession,
108
+ takeWatchdogGiveUpCount,
109
+ takeZombieDetection,
110
+ toOpencodeModel,
111
+ writeEgressAllowlist
112
+ } from "../chunk-6NVRWZ5W.js";
64
113
  import {
65
114
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
66
115
  AnchorSessionClient,
67
116
  CLAUDE_MD_MAX_CHARS,
68
117
  CONVERSATION_FAILURE_CATEGORIES,
69
- ChildProcessError,
70
118
  DEFAULT_FRAMEWORK,
71
119
  DEFAULT_NEIGHBOURHOOD_MS,
72
120
  FLAGS_SCHEMA_VERSION,
@@ -82,24 +130,18 @@ import {
82
130
  SUPPRESS_SENTINEL,
83
131
  StreamEncoder,
84
132
  UNKNOWN_RATE_LIMIT,
85
- agentRuntimeKey,
86
133
  appendDmFooter,
87
134
  attributeTranscriptUsageByRun,
88
- buildEgressAllowlist,
89
135
  buildFailureCategoryPromptLines,
90
136
  buildScheduledTaskContextBlocks,
91
- checkChannelInputs,
92
137
  classifyActor,
93
138
  classifyCursorAdvance,
94
139
  classifyOutput,
95
140
  classifyTranscriptRateLimit,
96
141
  coerceOnboardingState,
97
- creditWatchdogGiveUpCount,
98
142
  cursorAdvanceCounterKey,
99
143
  describeOnboardingChannel,
100
- egressMode,
101
144
  estimateActiveTasksTokens,
102
- execFilePromiseLong,
103
145
  extractFrontmatter,
104
146
  extractQualifyingTurns,
105
147
  findRunMarker,
@@ -109,16 +151,6 @@ import {
109
151
  formatRunMarker,
110
152
  getFramework,
111
153
  getIntegration,
112
- getLastFailureContext,
113
- getOpencodeActivityAgeSeconds,
114
- getOpencodeSessionState,
115
- getOpencodeTurnHealth,
116
- getProjectDir,
117
- getSessionState,
118
- hashFile,
119
- injectMessage,
120
- injectMessageWithStatus,
121
- injectOpencodeMessage,
122
154
  isAgentIdle,
123
155
  isAgentTimezoneOverrideExpired,
124
156
  isBareAck,
@@ -129,62 +161,32 @@ import {
129
161
  isEmptyTotals,
130
162
  isForcedUpdatePastDeadline,
131
163
  isOnboardingArea,
132
- isOpencodeSessionHealthy,
133
164
  isParseError,
134
165
  isResolveError,
135
166
  isSelfCompletion,
136
- isSessionHealthy,
137
167
  isStaleForToday,
138
168
  isSystemInjectedContent,
139
169
  isUnsetTimezone,
140
170
  isVacuousDeliverReason,
141
- isolationMode,
142
171
  laneTagFragment,
143
- log,
144
- mergeOpencodeConfigArtifact,
145
172
  minutesSinceLocalMidnight,
146
- paneLogPath,
147
173
  parseDeliverAssertion,
148
174
  parseDeliveryTarget,
149
- parseEnvIntegrations,
150
175
  parseTranscriptUsage,
151
176
  parseUsageBanner,
152
177
  peekCurrentSession,
153
178
  pickNewerClassification,
154
- prepareForRespawn,
155
- readChannelServerEnv,
156
- readDirectChatSessionState,
157
- readOpencodePaneLogTail,
158
- readPaneLogTail,
159
- readProvisionedOpencodeModel,
160
- reloadEgressSidecar,
161
179
  remoteMcpServerKey,
162
- resetRestartCount,
163
180
  resolveAgentTimezone,
164
181
  resolveAvatarEnvUrl,
165
182
  resolveChannels,
166
- resolveClaudeBinary,
167
183
  resolveDmTarget,
168
- restartEgressSidecar,
169
- rotatePaneLogForDayRollover,
170
- rotateSessionForWedge,
171
184
  serializeAccountEnforcementMarker,
172
185
  sessionTranscriptDir,
173
- sha256,
174
- sharedBusyBuckets,
175
- startOpencodeSession,
176
- startPersistentSession,
177
- stopAllSessionsAndWait,
178
- stopOpencodeSession,
179
- stopPersistentSession,
180
186
  subagentActivityAgeSeconds,
181
187
  sumTranscriptUsageInWindow,
182
- takeWatchdogGiveUpCount,
183
- takeZombieDetection,
184
- toOpencodeModel,
185
- transcriptActivityAgeSeconds,
186
- writeEgressAllowlist
187
- } from "../chunk-74UJCPIS.js";
188
+ transcriptActivityAgeSeconds
189
+ } from "../chunk-3PNRUCHD.js";
188
190
  import {
189
191
  reapOrphanChannelMcps
190
192
  } from "../chunk-XWVM4KPK.js";
@@ -11825,7 +11827,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
11825
11827
  var lastVersionCheckAt = 0;
11826
11828
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
11827
11829
  var lastResponsivenessProbeAt = 0;
11828
- var agtCliVersion = true ? "0.28.594" : "dev";
11830
+ var agtCliVersion = true ? "0.28.595" : "dev";
11829
11831
  function resolveBrewPath(execFileSync3) {
11830
11832
  try {
11831
11833
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -13132,7 +13134,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
13132
13134
  if (codeNames.length === 0) return;
13133
13135
  void (async () => {
13134
13136
  try {
13135
- const { collectDiagnostics } = await import("../persistent-session-YRCF7AAC.js");
13137
+ const { collectDiagnostics } = await import("../persistent-session-BGMQQYW2.js");
13136
13138
  await api.post("/host/heartbeat", {
13137
13139
  host_id: hostId,
13138
13140
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
@@ -13240,7 +13242,7 @@ async function pollCycle() {
13240
13242
  }
13241
13243
  try {
13242
13244
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
13243
- const { collectDiagnostics } = await import("../persistent-session-YRCF7AAC.js");
13245
+ const { collectDiagnostics } = await import("../persistent-session-BGMQQYW2.js");
13244
13246
  const diagCodeNames = [...agentState.persistentSessionAgents];
13245
13247
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor) : void 0;
13246
13248
  let tailscaleHostname;
@@ -13363,7 +13365,7 @@ async function pollCycle() {
13363
13365
  collectPanelessActivityProbes,
13364
13366
  getResponsivenessIntervalMs,
13365
13367
  occupancyQualificationClassifications
13366
- } = await import("../responsiveness-probe-MFWXIRTJ.js");
13368
+ } = await import("../responsiveness-probe-VAGPO5FZ.js");
13367
13369
  const probeIntervalMs = getResponsivenessIntervalMs();
13368
13370
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
13369
13371
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -13454,7 +13456,7 @@ async function pollCycle() {
13454
13456
  collectResponsivenessProbes,
13455
13457
  livePendingInboundOldestAgeSeconds,
13456
13458
  parkPendingInbound
13457
- } = await import("../responsiveness-probe-MFWXIRTJ.js");
13459
+ } = await import("../responsiveness-probe-VAGPO5FZ.js");
13458
13460
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
13459
13461
  const wedgeNow = /* @__PURE__ */ new Date();
13460
13462
  const liveAgents = agentState.persistentSessionAgents;
@@ -13610,12 +13612,24 @@ async function pollCycle() {
13610
13612
  }
13611
13613
  try {
13612
13614
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
13615
+ const { probeSessionAuth } = await import("../session-auth-dead-CWFGB472.js");
13613
13616
  const observations = [];
13614
13617
  const pendingCacheCommits = [];
13615
13618
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
13616
13619
  for (const codeName of agentState.persistentSessionAgents) {
13617
13620
  const agentId = agentState.codeNameToAgentId.get(codeName);
13618
13621
  if (!agentId) continue;
13622
+ try {
13623
+ const authVerdict = probeSessionAuth({ projectDir: getProjectDir(codeName) });
13624
+ if (authVerdict.state !== "ok" && lastSessionAuthDetail.get(codeName) !== authVerdict.detail) {
13625
+ log(
13626
+ `[session-auth] agent=${codeName} ${authVerdict.detail}${authVerdict.worst?.toolName ? ` tool=${authVerdict.worst.toolName}` : ""} \u2014 ${authVerdict.worst?.remedy ?? ""}`
13627
+ );
13628
+ }
13629
+ lastSessionAuthDetail.set(codeName, authVerdict.detail);
13630
+ } catch (err) {
13631
+ log(`[session-auth] probe failed for ${codeName}: ${err.message}`);
13632
+ }
13619
13633
  const tail = readPaneLogTail(codeName, 40);
13620
13634
  if (!tail) continue;
13621
13635
  if (modelApiErrorReportingOn) {
@@ -16299,6 +16313,7 @@ Retried to the limit after repeated stalls \u2014 needs a look.`).catch(() => {
16299
16313
  }
16300
16314
  var lastMcpFailedBannerCount = /* @__PURE__ */ new Map();
16301
16315
  var lastModelApiErrorSig = /* @__PURE__ */ new Map();
16316
+ var lastSessionAuthDetail = /* @__PURE__ */ new Map();
16302
16317
  var DAY_ROLLOVER_FORCE_GRACE_MIN = 30;
16303
16318
  var persistentSessionStuckTracker = new PersistentSessionStuckTracker();
16304
16319
  var claudeAuthTupleBySession = /* @__PURE__ */ new Map();
@@ -17025,7 +17040,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
17025
17040
  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}`));
17026
17041
  void (async () => {
17027
17042
  try {
17028
- const { collectDiagnostics } = await import("../persistent-session-YRCF7AAC.js");
17043
+ const { collectDiagnostics } = await import("../persistent-session-BGMQQYW2.js");
17029
17044
  await api.post("/host/heartbeat", {
17030
17045
  host_id: hostId,
17031
17046
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
@@ -17076,7 +17091,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
17076
17091
  }
17077
17092
  try {
17078
17093
  const hostId = await getHostId();
17079
- const { collectDiagnostics } = await import("../persistent-session-YRCF7AAC.js");
17094
+ const { collectDiagnostics } = await import("../persistent-session-BGMQQYW2.js");
17080
17095
  await api.post("/host/heartbeat", {
17081
17096
  host_id: hostId,
17082
17097
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
@@ -17654,7 +17669,7 @@ async function processClaudePairSessions(agents) {
17654
17669
  killPairSession,
17655
17670
  pairTmuxSession,
17656
17671
  finalizeClaudePairOnboarding
17657
- } = await import("../claude-pair-runtime-CGVDKWFC.js");
17672
+ } = await import("../claude-pair-runtime-5WB2FMIX.js");
17658
17673
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
17659
17674
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
17660
17675
  const killed = await killPairSession(pairTmuxSession(pairId));