@integrity-labs/agt-cli 0.28.271 → 0.28.273

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-HOILVE3Q.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-UQNLB3UF.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-KOEEK5LD.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-WVZRDAFK.js.map
@@ -38,7 +38,7 @@ import {
38
38
  requireHost,
39
39
  safeWriteJsonAtomic,
40
40
  setConfigHash
41
- } from "../chunk-3SBG4IR5.js";
41
+ } from "../chunk-NKNOIJMC.js";
42
42
  import {
43
43
  getProjectDir as getProjectDir2,
44
44
  getReadyTasks,
@@ -52,6 +52,7 @@ import {
52
52
  FLAGS_SCHEMA_VERSION,
53
53
  FLAG_REGISTRY,
54
54
  KANBAN_CHECK_COMMAND,
55
+ KANBAN_NUDGE_ACTIONABLE_STATUSES,
55
56
  MAX_AVATAR_ENV_URL_BYTES,
56
57
  SUPPRESS_SENTINEL,
57
58
  StreamEncoder,
@@ -124,7 +125,7 @@ import {
124
125
  takeZombieDetection,
125
126
  transcriptActivityAgeSeconds,
126
127
  writeEgressAllowlist
127
- } from "../chunk-5TL5THQE.js";
128
+ } from "../chunk-PNETKYLF.js";
128
129
  import {
129
130
  reapOrphanChannelMcps
130
131
  } from "../chunk-XWVM4KPK.js";
@@ -3745,7 +3746,7 @@ function isKanbanHybridDryRun() {
3745
3746
  const v = process.env["AGT_KANBAN_HYBRID_DRY_RUN"];
3746
3747
  return v === "1" || v?.toLowerCase() === "true";
3747
3748
  }
3748
- var HYBRID_ACTIONABLE_STATUSES = /* @__PURE__ */ new Set(["todo", "in_progress"]);
3749
+ var HYBRID_ACTIONABLE_STATUSES = new Set(KANBAN_NUDGE_ACTIONABLE_STATUSES);
3749
3750
  function isHybridActionable(item) {
3750
3751
  return HYBRID_ACTIONABLE_STATUSES.has(item.status) && item.source_type !== "scheduled_task";
3751
3752
  }
@@ -4016,6 +4017,21 @@ async function enqueueKanbanNotice(opts) {
4016
4017
  return false;
4017
4018
  }
4018
4019
  }
4020
+ async function cancelKanbanNotice(agentId) {
4021
+ try {
4022
+ const res = await api.post(
4023
+ "/host/kanban/notify/cancel",
4024
+ { agent_id: agentId }
4025
+ );
4026
+ if (res.ok !== true) return null;
4027
+ return typeof res.cancelled === "number" ? res.cancelled : 0;
4028
+ } catch (err) {
4029
+ const errText = err instanceof Error ? err.message : String(err);
4030
+ const errId = createHash7("sha256").update(errText).digest("hex").slice(0, 12);
4031
+ log(`[kanban] notice cancel failed for agent_id=${agentId} error_id=${errId}`);
4032
+ return null;
4033
+ }
4034
+ }
4019
4035
 
4020
4036
  // src/lib/manager/channels/state.ts
4021
4037
  var agentChannelTokens = /* @__PURE__ */ new Map();
@@ -6701,7 +6717,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
6701
6717
  var lastVersionCheckAt = 0;
6702
6718
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6703
6719
  var lastResponsivenessProbeAt = 0;
6704
- var agtCliVersion = true ? "0.28.271" : "dev";
6720
+ var agtCliVersion = true ? "0.28.273" : "dev";
6705
6721
  function resolveBrewPath(execFileSync2) {
6706
6722
  try {
6707
6723
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -7551,7 +7567,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
7551
7567
  if (codeNames.length === 0) return;
7552
7568
  void (async () => {
7553
7569
  try {
7554
- const { collectDiagnostics } = await import("../persistent-session-HOILVE3Q.js");
7570
+ const { collectDiagnostics } = await import("../persistent-session-UQNLB3UF.js");
7555
7571
  await api.post("/host/heartbeat", {
7556
7572
  host_id: hostId,
7557
7573
  agent_diagnostics: collectDiagnostics(codeNames)
@@ -7649,7 +7665,7 @@ async function pollCycle() {
7649
7665
  }
7650
7666
  try {
7651
7667
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
7652
- const { collectDiagnostics } = await import("../persistent-session-HOILVE3Q.js");
7668
+ const { collectDiagnostics } = await import("../persistent-session-UQNLB3UF.js");
7653
7669
  const diagCodeNames = [...agentState.persistentSessionAgents];
7654
7670
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
7655
7671
  let tailscaleHostname;
@@ -7797,7 +7813,7 @@ async function pollCycle() {
7797
7813
  const {
7798
7814
  collectResponsivenessProbes,
7799
7815
  getResponsivenessIntervalMs
7800
- } = await import("../responsiveness-probe-DCUO6JJQ.js");
7816
+ } = await import("../responsiveness-probe-GVLCH2IM.js");
7801
7817
  const probeIntervalMs = getResponsivenessIntervalMs();
7802
7818
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
7803
7819
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -7829,7 +7845,7 @@ async function pollCycle() {
7829
7845
  collectResponsivenessProbes,
7830
7846
  livePendingInboundOldestAgeSeconds,
7831
7847
  parkPendingInbound
7832
- } = await import("../responsiveness-probe-DCUO6JJQ.js");
7848
+ } = await import("../responsiveness-probe-GVLCH2IM.js");
7833
7849
  const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
7834
7850
  const wedgeNow = /* @__PURE__ */ new Date();
7835
7851
  const liveAgents = agentState.persistentSessionAgents;
@@ -9744,6 +9760,7 @@ async function processAgent(agent, agentStates) {
9744
9760
  const wantsHybridInject = isKanbanHybridEnabled();
9745
9761
  if (agentFw === "claude-code" && sessionMode === "persistent") {
9746
9762
  let hybridBoard = hasBoardTemplates ? boardItems : void 0;
9763
+ let hybridBoardStale = false;
9747
9764
  if (!hybridBoard) {
9748
9765
  try {
9749
9766
  const boardData = await api.post(
@@ -9754,6 +9771,7 @@ async function processAgent(agent, agentStates) {
9754
9771
  kanbanBoardCache.set(agent.code_name, hybridBoard);
9755
9772
  } catch {
9756
9773
  hybridBoard = kanbanBoardCache.get(agent.code_name) ?? [];
9774
+ hybridBoardStale = true;
9757
9775
  }
9758
9776
  }
9759
9777
  void reconcileScheduledRuns(agent.code_name, agent.agent_id, hybridBoard);
@@ -9769,11 +9787,24 @@ async function processAgent(agent, agentStates) {
9769
9787
  const cardStates = wedgeRestartsByCard.get(agent.code_name);
9770
9788
  const actionable = hybridBoard.filter(isHybridActionable);
9771
9789
  const { allowed, suppressed } = cardStates ? partitionActionableByPoison(actionable, cardStates, poisonCfg) : { allowed: actionable, suppressed: [] };
9772
- if (allowed.length > 0) {
9790
+ if (hybridBoardStale) {
9791
+ if (allowed.length > 0) {
9792
+ log(
9793
+ `[manager-worker] kanban inject skipped for '${agent.code_name}' - board fetch failed this tick (stale cache)`
9794
+ );
9795
+ }
9796
+ } else if (allowed.length > 0) {
9773
9797
  void maybeInjectKanbanCheck(agent.code_name, agent.agent_id, allowed.length);
9774
- } else {
9775
- const reason = suppressed.length > 0 ? "kanban inject suppressed \u2014 suspected poison card(s) (ENG-6171)" : "kanban board drained";
9776
- closeInjectedRunIfOpen(agent.code_name, "completed", reason);
9798
+ } else if (suppressed.length > 0) {
9799
+ closeInjectedRunIfOpen(
9800
+ agent.code_name,
9801
+ "completed",
9802
+ "kanban inject suppressed \u2014 suspected poison card(s) (ENG-6171)"
9803
+ );
9804
+ } else if (openInjectedRunByCode.has(agent.code_name)) {
9805
+ const openRunId = openInjectedRunByCode.get(agent.code_name);
9806
+ openInjectedRunByCode.delete(agent.code_name);
9807
+ void cancelKanbanNoticeOnDrain(agent.code_name, agent.agent_id, openRunId);
9777
9808
  }
9778
9809
  }
9779
9810
  }
@@ -10700,7 +10731,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
10700
10731
  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}`));
10701
10732
  void (async () => {
10702
10733
  try {
10703
- const { collectDiagnostics } = await import("../persistent-session-HOILVE3Q.js");
10734
+ const { collectDiagnostics } = await import("../persistent-session-UQNLB3UF.js");
10704
10735
  await api.post("/host/heartbeat", {
10705
10736
  host_id: hostId,
10706
10737
  agent_diagnostics: collectDiagnostics([codeName])
@@ -10750,7 +10781,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
10750
10781
  }
10751
10782
  try {
10752
10783
  const hostId = await getHostId();
10753
- const { collectDiagnostics } = await import("../persistent-session-HOILVE3Q.js");
10784
+ const { collectDiagnostics } = await import("../persistent-session-UQNLB3UF.js");
10754
10785
  await api.post("/host/heartbeat", {
10755
10786
  host_id: hostId,
10756
10787
  agent_diagnostics: collectDiagnostics([codeName])
@@ -11031,6 +11062,19 @@ function closeInjectedRunIfOpen(codeName, outcome, outcomeMessage) {
11031
11062
  openInjectedRunByCode.delete(codeName);
11032
11063
  void finishRun(runId, outcome, { outcomeMessage });
11033
11064
  }
11065
+ async function cancelKanbanNoticeOnDrain(codeName, agentId, openRunId) {
11066
+ const cancelled = await cancelKanbanNotice(agentId);
11067
+ if (cancelled != null && cancelled > 0) {
11068
+ log(
11069
+ `[manager-worker] cancelled ${cancelled} pending kanban nudge(s) for '${codeName}' - board drained before delivery`
11070
+ );
11071
+ void finishRun(openRunId, "cancelled", {
11072
+ outcomeMessage: "kanban nudge cancelled - board drained before delivery"
11073
+ });
11074
+ } else {
11075
+ void finishRun(openRunId, "completed", { outcomeMessage: "kanban board drained" });
11076
+ }
11077
+ }
11034
11078
  var KANBAN_HYBRID_DEBOUNCE_MS = (() => {
11035
11079
  const raw = process.env["AGT_KANBAN_HYBRID_DEBOUNCE_SECONDS"];
11036
11080
  const parsed = raw ? parseInt(raw, 10) : NaN;
@@ -11141,7 +11185,7 @@ async function processClaudePairSessions(agents) {
11141
11185
  killPairSession,
11142
11186
  pairTmuxSession,
11143
11187
  finalizeClaudePairOnboarding
11144
- } = await import("../claude-pair-runtime-KOEEK5LD.js");
11188
+ } = await import("../claude-pair-runtime-WVZRDAFK.js");
11145
11189
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
11146
11190
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
11147
11191
  const killed = await killPairSession(pairTmuxSession(pairId));
@@ -12027,6 +12071,7 @@ export {
12027
12071
  BACK_ONLINE_GREETING_GUIDANCE,
12028
12072
  DAY_ROLLOVER_FORCE_GRACE_MIN,
12029
12073
  applyRestartAcks,
12074
+ cancelKanbanNoticeOnDrain,
12030
12075
  claudeCodeUpgradeMarkerPath,
12031
12076
  claudeCodeUpgradeThrottled,
12032
12077
  claudeManagedSettingsPath,