@integrity-labs/agt-cli 0.28.502 → 0.28.503

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.
@@ -42,7 +42,7 @@ import {
42
42
  resolveConnectivityProbe,
43
43
  worseConnectivityOutcome,
44
44
  wrapScheduledTaskPrompt
45
- } from "./chunk-HMBECQIY.js";
45
+ } from "./chunk-GBSMIV4P.js";
46
46
  import {
47
47
  parsePsRows
48
48
  } from "./chunk-XWVM4KPK.js";
@@ -5061,7 +5061,7 @@ function exchangeFailureKind(err) {
5061
5061
  }
5062
5062
 
5063
5063
  // src/lib/api-client.ts
5064
- var agtCliVersion = true ? "0.28.502" : "dev";
5064
+ var agtCliVersion = true ? "0.28.503" : "dev";
5065
5065
  var lastConfigHash = null;
5066
5066
  function setConfigHash(hash) {
5067
5067
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8280,4 +8280,4 @@ export {
8280
8280
  managerInstallSystemUnitCommand,
8281
8281
  managerUninstallSystemUnitCommand
8282
8282
  };
8283
- //# sourceMappingURL=chunk-KS762LYV.js.map
8283
+ //# sourceMappingURL=chunk-GR375XXG.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-ZW5HH2SC.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-4PVEGHA5.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-5GY4G7MD.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-JEMJAZPB.js.map
@@ -52,7 +52,7 @@ import {
52
52
  safeWriteJsonAtomic,
53
53
  setConfigHash,
54
54
  tripClass
55
- } from "../chunk-KS762LYV.js";
55
+ } from "../chunk-GR375XXG.js";
56
56
  import {
57
57
  getProjectDir as getProjectDir2,
58
58
  getReadyTasks,
@@ -90,7 +90,7 @@ import {
90
90
  classifyTranscriptRateLimit,
91
91
  coerceOnboardingState,
92
92
  creditWatchdogGiveUpCount,
93
- cursorShortfallKey,
93
+ cursorAdvanceCounterKey,
94
94
  describeOnboardingChannel,
95
95
  egressMode,
96
96
  estimateActiveTasksTokens,
@@ -172,7 +172,7 @@ import {
172
172
  toOpencodeModel,
173
173
  transcriptActivityAgeSeconds,
174
174
  writeEgressAllowlist
175
- } from "../chunk-HMBECQIY.js";
175
+ } from "../chunk-GBSMIV4P.js";
176
176
  import {
177
177
  reapOrphanChannelMcps
178
178
  } from "../chunk-XWVM4KPK.js";
@@ -1908,9 +1908,12 @@ function collectEnvGates(env) {
1908
1908
  import { readFileSync as readFileSync7, writeFileSync as writeFileSync4 } from "fs";
1909
1909
  import { join as join6 } from "path";
1910
1910
  var CURSOR_SHORTFALL_COUNTER_SUFFIX = "-cursor-advance-classifications.json";
1911
- function recordCursorAdvanceShortfall(agentDir, source, classification) {
1911
+ function recordCursorAdvanceOutcome(agentDir, source, route, verdict) {
1912
1912
  if (!agentDir)
1913
1913
  return;
1914
+ const key = cursorAdvanceCounterKey(route, verdict);
1915
+ if (key === null)
1916
+ return;
1914
1917
  const path = join6(agentDir, `${source}${CURSOR_SHORTFALL_COUNTER_SUFFIX}`);
1915
1918
  const counts = {};
1916
1919
  try {
@@ -1923,7 +1926,6 @@ function recordCursorAdvanceShortfall(agentDir, source, classification) {
1923
1926
  }
1924
1927
  } catch {
1925
1928
  }
1926
- const key = cursorShortfallKey(classification.route, classification.reason, classification.partial);
1927
1929
  counts[key] = (counts[key] ?? 0) + 1;
1928
1930
  try {
1929
1931
  writeFileSync4(path, JSON.stringify(counts), { mode: 384 });
@@ -9954,7 +9956,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
9954
9956
  var lastVersionCheckAt = 0;
9955
9957
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
9956
9958
  var lastResponsivenessProbeAt = 0;
9957
- var agtCliVersion = true ? "0.28.502" : "dev";
9959
+ var agtCliVersion = true ? "0.28.503" : "dev";
9958
9960
  function resolveBrewPath(execFileSync2) {
9959
9961
  try {
9960
9962
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -11117,7 +11119,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
11117
11119
  if (codeNames.length === 0) return;
11118
11120
  void (async () => {
11119
11121
  try {
11120
- const { collectDiagnostics } = await import("../persistent-session-ZW5HH2SC.js");
11122
+ const { collectDiagnostics } = await import("../persistent-session-4PVEGHA5.js");
11121
11123
  await api.post("/host/heartbeat", {
11122
11124
  host_id: hostId,
11123
11125
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
@@ -11224,7 +11226,7 @@ async function pollCycle() {
11224
11226
  }
11225
11227
  try {
11226
11228
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
11227
- const { collectDiagnostics } = await import("../persistent-session-ZW5HH2SC.js");
11229
+ const { collectDiagnostics } = await import("../persistent-session-4PVEGHA5.js");
11228
11230
  const diagCodeNames = [...agentState.persistentSessionAgents];
11229
11231
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
11230
11232
  let tailscaleHostname;
@@ -11339,7 +11341,7 @@ async function pollCycle() {
11339
11341
  collectResponsivenessProbes,
11340
11342
  collectPanelessActivityProbes,
11341
11343
  getResponsivenessIntervalMs
11342
- } = await import("../responsiveness-probe-RAHKBJEE.js");
11344
+ } = await import("../responsiveness-probe-PNKFXRVF.js");
11343
11345
  const probeIntervalMs = getResponsivenessIntervalMs();
11344
11346
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
11345
11347
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -11403,7 +11405,7 @@ async function pollCycle() {
11403
11405
  collectResponsivenessProbes,
11404
11406
  livePendingInboundOldestAgeSeconds,
11405
11407
  parkPendingInbound
11406
- } = await import("../responsiveness-probe-RAHKBJEE.js");
11408
+ } = await import("../responsiveness-probe-PNKFXRVF.js");
11407
11409
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
11408
11410
  const wedgeNow = /* @__PURE__ */ new Date();
11409
11411
  const liveAgents = agentState.persistentSessionAgents;
@@ -14895,7 +14897,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
14895
14897
  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}`));
14896
14898
  void (async () => {
14897
14899
  try {
14898
- const { collectDiagnostics } = await import("../persistent-session-ZW5HH2SC.js");
14900
+ const { collectDiagnostics } = await import("../persistent-session-4PVEGHA5.js");
14899
14901
  await api.post("/host/heartbeat", {
14900
14902
  host_id: hostId,
14901
14903
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -14945,7 +14947,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
14945
14947
  }
14946
14948
  try {
14947
14949
  const hostId = await getHostId();
14948
- const { collectDiagnostics } = await import("../persistent-session-ZW5HH2SC.js");
14950
+ const { collectDiagnostics } = await import("../persistent-session-4PVEGHA5.js");
14949
14951
  await api.post("/host/heartbeat", {
14950
14952
  host_id: hostId,
14951
14953
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15187,6 +15189,7 @@ async function processDirectChatMessageOpencode(agent, msg) {
15187
15189
  return;
15188
15190
  }
15189
15191
  if (result.status === "replied" && result.reply) {
15192
+ let recorded = false;
15190
15193
  try {
15191
15194
  const body = await api.post("/host/direct-chat/reply", {
15192
15195
  agent_id: agent.agentId,
@@ -15199,6 +15202,13 @@ async function processDirectChatMessageOpencode(agent, msg) {
15199
15202
  httpOk: true,
15200
15203
  body
15201
15204
  });
15205
+ recordCursorAdvanceOutcome(
15206
+ dirname8(paneLogPath(agent.codeName)),
15207
+ "direct-chat-manager",
15208
+ "reply",
15209
+ verdict
15210
+ );
15211
+ recorded = true;
15202
15212
  if (verdict.outcome === "failed") {
15203
15213
  log(
15204
15214
  `[direct-chat] opencode reply REFUSED for '${agent.codeName}' (msg=${msg.id}): ${verdict.error} \u2014 leaving for redelivery`
@@ -15218,14 +15228,17 @@ async function processDirectChatMessageOpencode(agent, msg) {
15218
15228
  cleared: []
15219
15229
  })
15220
15230
  );
15221
- recordCursorAdvanceShortfall(dirname8(paneLogPath(agent.codeName)), "direct-chat-manager", {
15222
- route: "reply",
15223
- reason: verdict.reason,
15224
- partial: verdict.partial
15225
- });
15226
15231
  }
15227
15232
  log(`[direct-chat] opencode replied for '${agent.codeName}' (msg=${msg.id}, ${result.reply.length} chars)`);
15228
15233
  } catch (err) {
15234
+ if (!recorded) {
15235
+ recordCursorAdvanceOutcome(
15236
+ dirname8(paneLogPath(agent.codeName)),
15237
+ "direct-chat-manager",
15238
+ "reply",
15239
+ { outcome: "failed", error: err.message, expected: 1 }
15240
+ );
15241
+ }
15229
15242
  log(`[direct-chat] opencode reply POST failed for '${agent.codeName}' (msg=${msg.id}): ${err.message} \u2014 leaving for redelivery`);
15230
15243
  }
15231
15244
  return;
@@ -15452,7 +15465,7 @@ async function processClaudePairSessions(agents) {
15452
15465
  killPairSession,
15453
15466
  pairTmuxSession,
15454
15467
  finalizeClaudePairOnboarding
15455
- } = await import("../claude-pair-runtime-5GY4G7MD.js");
15468
+ } = await import("../claude-pair-runtime-JEMJAZPB.js");
15456
15469
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
15457
15470
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
15458
15471
  const killed = await killPairSession(pairTmuxSession(pairId));