@integrity-labs/agt-cli 0.28.1155 → 0.28.1156

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 (25) hide show
  1. package/dist/bin/agt.js +6 -5
  2. package/dist/bin/agt.js.map +1 -1
  3. package/dist/{chunk-VSC7DI3S.js → chunk-7NAL24SM.js} +4 -4
  4. package/dist/chunk-OAWK4OBN.js +117 -0
  5. package/dist/chunk-OAWK4OBN.js.map +1 -0
  6. package/dist/{chunk-N2ZAN2JP.js → chunk-QRFACFSH.js} +24 -10
  7. package/dist/chunk-QRFACFSH.js.map +1 -0
  8. package/dist/{chunk-TXJXC7TV.js → chunk-SYQ4VTME.js} +8 -8
  9. package/dist/{claude-code-updater-RBKT47SQ.js → claude-code-updater-G7CSYMS3.js} +3 -3
  10. package/dist/{claude-pair-runtime-2WJPTE2V.js → claude-pair-runtime-BCZPQPWP.js} +45 -11
  11. package/dist/claude-pair-runtime-BCZPQPWP.js.map +1 -0
  12. package/dist/claude-signin-reset-EF3UO5IK.js +23 -0
  13. package/dist/lib/manager-worker.js +43 -25
  14. package/dist/lib/manager-worker.js.map +1 -1
  15. package/dist/{persistent-session-JD2OMZ6L.js → persistent-session-XCV7VQWS.js} +4 -3
  16. package/dist/persistent-session-XCV7VQWS.js.map +1 -0
  17. package/dist/{responsiveness-probe-ZQ24WG5P.js → responsiveness-probe-WZVS3U5H.js} +4 -3
  18. package/dist/{responsiveness-probe-ZQ24WG5P.js.map → responsiveness-probe-WZVS3U5H.js.map} +1 -1
  19. package/package.json +1 -1
  20. package/dist/chunk-N2ZAN2JP.js.map +0 -1
  21. package/dist/claude-pair-runtime-2WJPTE2V.js.map +0 -1
  22. /package/dist/{chunk-VSC7DI3S.js.map → chunk-7NAL24SM.js.map} +0 -0
  23. /package/dist/{chunk-TXJXC7TV.js.map → chunk-SYQ4VTME.js.map} +0 -0
  24. /package/dist/{claude-code-updater-RBKT47SQ.js.map → claude-code-updater-G7CSYMS3.js.map} +0 -0
  25. /package/dist/{persistent-session-JD2OMZ6L.js.map → claude-signin-reset-EF3UO5IK.js.map} +0 -0
@@ -77,7 +77,7 @@ import {
77
77
  setConfigHash,
78
78
  shellGuard,
79
79
  tripClass
80
- } from "../chunk-TXJXC7TV.js";
80
+ } from "../chunk-SYQ4VTME.js";
81
81
  import {
82
82
  CLAUDE_CODE_SECURITY_FLOOR,
83
83
  SELF_UPDATE_TIMEOUTS,
@@ -90,7 +90,7 @@ import {
90
90
  runSafeCleanup,
91
91
  tightestDiskStat,
92
92
  withPackageCacheLock
93
- } from "../chunk-VSC7DI3S.js";
93
+ } from "../chunk-7NAL24SM.js";
94
94
  import {
95
95
  getProjectDir as getProjectDir2,
96
96
  getReadyTasks,
@@ -177,7 +177,7 @@ import {
177
177
  webFetchBaselineValue,
178
178
  webFetchRestartNeeded,
179
179
  writeEgressAllowlist
180
- } from "../chunk-N2ZAN2JP.js";
180
+ } from "../chunk-QRFACFSH.js";
181
181
  import {
182
182
  isAgentIdle,
183
183
  isStaleForToday,
@@ -195,17 +195,11 @@ import {
195
195
  sendDialogKeys,
196
196
  simpleTextHash
197
197
  } from "../chunk-B6UYVEMD.js";
198
+ import "../chunk-OAWK4OBN.js";
198
199
  import {
199
200
  parsePsRows,
200
201
  reapOrphanChannelMcps
201
202
  } from "../chunk-XWVM4KPK.js";
202
- import {
203
- CLAUDE_CONFIG_DIR_ENV,
204
- claudeConfigDirFor,
205
- claudeConfigDirIsReady,
206
- effectiveClaudeJsonPath,
207
- seedClaudeConfigFromLegacy
208
- } from "../chunk-EL5MWGGH.js";
209
203
  import {
210
204
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
211
205
  AnchorSessionClient,
@@ -311,6 +305,13 @@ import {
311
305
  stabiliseResetInstant,
312
306
  sumTranscriptUsageInWindow
313
307
  } from "../chunk-D55RMQTG.js";
308
+ import {
309
+ CLAUDE_CONFIG_DIR_ENV,
310
+ claudeConfigDirFor,
311
+ claudeConfigDirIsReady,
312
+ effectiveClaudeJsonPath,
313
+ seedClaudeConfigFromLegacy
314
+ } from "../chunk-EL5MWGGH.js";
314
315
  import "../chunk-DGUM43GV.js";
315
316
 
316
317
  // src/lib/manager-worker.ts
@@ -15014,7 +15015,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
15014
15015
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
15015
15016
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
15016
15017
  async function channelInboundActivityAgeSecondsFor(codeName) {
15017
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-ZQ24WG5P.js");
15018
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-WZVS3U5H.js");
15018
15019
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
15019
15020
  if (newest === null) return null;
15020
15021
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -15806,7 +15807,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
15806
15807
  var lastVersionCheckAt = 0;
15807
15808
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
15808
15809
  var lastResponsivenessProbeAt = 0;
15809
- var agtCliVersion = true ? "0.28.1155" : "dev";
15810
+ var agtCliVersion = true ? "0.28.1156" : "dev";
15810
15811
  function resolveBrewPath(execFileSync3) {
15811
15812
  try {
15812
15813
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -17603,7 +17604,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
17603
17604
  if (codeNames.length === 0) return;
17604
17605
  void (async () => {
17605
17606
  try {
17606
- const { collectDiagnostics } = await import("../persistent-session-JD2OMZ6L.js");
17607
+ const { collectDiagnostics } = await import("../persistent-session-XCV7VQWS.js");
17607
17608
  await api.post("/host/heartbeat", {
17608
17609
  host_id: hostId,
17609
17610
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
@@ -17746,7 +17747,7 @@ async function pollCycleInner() {
17746
17747
  }
17747
17748
  try {
17748
17749
  const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
17749
- const { collectDiagnostics } = await import("../persistent-session-JD2OMZ6L.js");
17750
+ const { collectDiagnostics } = await import("../persistent-session-XCV7VQWS.js");
17750
17751
  const diagCodeNames = [...agentState.persistentSessionAgents];
17751
17752
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor) : void 0;
17752
17753
  let tailscaleHostname;
@@ -17946,7 +17947,7 @@ async function pollCycleInner() {
17946
17947
  setConfigHash(hbResp?.config_hash ?? null);
17947
17948
  try {
17948
17949
  const desiredClaudeCodeVersion = hbResp?.desired_claude_code_version?.trim();
17949
- const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-RBKT47SQ.js");
17950
+ const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-G7CSYMS3.js");
17950
17951
  claudeUpdaterInFlight = true;
17951
17952
  if (desiredClaudeCodeVersion && (claudePairLoop.busy || claudePairingInProgress())) {
17952
17953
  log(
@@ -17978,7 +17979,7 @@ async function pollCycleInner() {
17978
17979
  collectPanelessActivityProbes,
17979
17980
  getResponsivenessIntervalMs,
17980
17981
  occupancyQualificationClassifications
17981
- } = await import("../responsiveness-probe-ZQ24WG5P.js");
17982
+ } = await import("../responsiveness-probe-WZVS3U5H.js");
17982
17983
  const probeIntervalMs = getResponsivenessIntervalMs();
17983
17984
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
17984
17985
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -18095,7 +18096,7 @@ async function pollCycleInner() {
18095
18096
  collectResponsivenessProbes,
18096
18097
  livePendingInboundOldestAgeSeconds,
18097
18098
  parkPendingInbound
18098
- } = await import("../responsiveness-probe-ZQ24WG5P.js");
18099
+ } = await import("../responsiveness-probe-WZVS3U5H.js");
18099
18100
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
18100
18101
  const wedgeNow = /* @__PURE__ */ new Date();
18101
18102
  const liveAgents = agentState.persistentSessionAgents;
@@ -18381,7 +18382,7 @@ async function pollCycleInner() {
18381
18382
  }
18382
18383
  }
18383
18384
  );
18384
- const { parkPendingInbound } = await import("../responsiveness-probe-ZQ24WG5P.js");
18385
+ const { parkPendingInbound } = await import("../responsiveness-probe-WZVS3U5H.js");
18385
18386
  const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
18386
18387
  paneFatalStreak.delete(codeName);
18387
18388
  paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
@@ -18412,7 +18413,7 @@ async function pollCycleInner() {
18412
18413
  TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
18413
18414
  bindSourceEscalations
18414
18415
  } = await import("../transcript-mount-health-OHE6IVJV.js");
18415
- const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-JD2OMZ6L.js");
18416
+ const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-XCV7VQWS.js");
18416
18417
  const mountConfig = resolveTranscriptMountConfig();
18417
18418
  const liveAgents = agentState.persistentSessionAgents;
18418
18419
  for (const tracked of [
@@ -23232,7 +23233,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
23232
23233
  try {
23233
23234
  const freshId = rotateSessionForWedge(codeName);
23234
23235
  consecutiveWedgeCycles.delete(codeName);
23235
- const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-ZQ24WG5P.js");
23236
+ const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-WZVS3U5H.js");
23236
23237
  const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
23237
23238
  const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
23238
23239
  const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
@@ -23275,7 +23276,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
23275
23276
  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}`));
23276
23277
  void (async () => {
23277
23278
  try {
23278
- const { collectDiagnostics } = await import("../persistent-session-JD2OMZ6L.js");
23279
+ const { collectDiagnostics } = await import("../persistent-session-XCV7VQWS.js");
23279
23280
  await api.post("/host/heartbeat", {
23280
23281
  host_id: hostId,
23281
23282
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
@@ -23326,7 +23327,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
23326
23327
  }
23327
23328
  try {
23328
23329
  const hostId = await getHostId();
23329
- const { collectDiagnostics } = await import("../persistent-session-JD2OMZ6L.js");
23330
+ const { collectDiagnostics } = await import("../persistent-session-XCV7VQWS.js");
23330
23331
  await api.post("/host/heartbeat", {
23331
23332
  host_id: hostId,
23332
23333
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
@@ -24019,7 +24020,8 @@ async function processClaudePairSessions(agents) {
24019
24020
  snapshotPairConfig,
24020
24021
  // ENG-11659: result -> report body + the manager.log line that records it.
24021
24022
  planPairStartReport
24022
- } = await import("../claude-pair-runtime-2WJPTE2V.js");
24023
+ } = await import("../claude-pair-runtime-BCZPQPWP.js");
24024
+ const { resetClaudeSignin, describeSigninResetForLog, describeSigninResetFailure } = await import("../claude-signin-reset-EF3UO5IK.js");
24023
24025
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
24024
24026
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
24025
24027
  const killed = await killPairSession(pairTmuxSession(pairId));
@@ -24061,6 +24063,21 @@ async function processClaudePairSessions(agents) {
24061
24063
  const pairSession = pairTmuxSession(session.pair_id);
24062
24064
  try {
24063
24065
  if (session.status === "initiating") {
24066
+ let signinReset;
24067
+ if (session.reset_signin === true) {
24068
+ const reset = resetClaudeSignin({ pairId: session.pair_id });
24069
+ log(describeSigninResetForLog(session.pair_id, reset));
24070
+ if (reset.outcome === "failed" || reset.outcome === "unsupported") {
24071
+ await reportAndCleanup(session.pair_id, {
24072
+ status: "failure",
24073
+ error_code: reset.outcome === "unsupported" ? "signin_reset_unsupported" : "signin_reset_failed",
24074
+ error_message: describeSigninResetFailure(reset),
24075
+ signin_reset: "failed"
24076
+ });
24077
+ continue;
24078
+ }
24079
+ signinReset = reset.outcome;
24080
+ }
24064
24081
  log(`[claude-pair] spawning pair session ${pairSession} for '${codeName}'`);
24065
24082
  const spawn = await spawnPairSession(pairSession);
24066
24083
  if (!spawn.ok) {
@@ -24069,14 +24086,15 @@ async function processClaudePairSessions(agents) {
24069
24086
  error_code: spawn.error.kind,
24070
24087
  // ENG-10617: forward any message (incl. `claude-exited`, which
24071
24088
  // carries claude's exit status + last output), not just unknown.
24072
- error_message: "message" in spawn.error ? spawn.error.message : void 0
24089
+ error_message: "message" in spawn.error ? spawn.error.message : void 0,
24090
+ ...signinReset ? { signin_reset: signinReset } : {}
24073
24091
  });
24074
24092
  continue;
24075
24093
  }
24076
24094
  spawnedPairIds.add(session.pair_id);
24077
24095
  log(`[claude-pair] dispatching /login (pair ${session.pair_id.slice(0, 8)})`);
24078
24096
  const result = await startClaudePair({ session: pairSession });
24079
- const report = planPairStartReport(session.pair_id, result);
24097
+ const report = planPairStartReport(session.pair_id, result, signinReset);
24080
24098
  log(report.logLine);
24081
24099
  const accepted = await reportAndCleanup(session.pair_id, report.body);
24082
24100
  if (!accepted) {