@integrity-labs/agt-cli 0.28.371 → 0.28.372

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.
package/dist/bin/agt.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-D6BJJ334.js";
43
+ } from "../chunk-FAMCYDMC.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -4829,7 +4829,7 @@ import { execFileSync, execSync } from "child_process";
4829
4829
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4830
4830
  import chalk18 from "chalk";
4831
4831
  import ora16 from "ora";
4832
- var cliVersion = true ? "0.28.371" : "dev";
4832
+ var cliVersion = true ? "0.28.372" : "dev";
4833
4833
  async function fetchLatestVersion() {
4834
4834
  const host2 = getHost();
4835
4835
  if (!host2) return null;
@@ -6001,7 +6001,7 @@ function handleError(err) {
6001
6001
  }
6002
6002
 
6003
6003
  // src/bin/agt.ts
6004
- var cliVersion2 = true ? "0.28.371" : "dev";
6004
+ var cliVersion2 = true ? "0.28.372" : "dev";
6005
6005
  var program = new Command();
6006
6006
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
6007
6007
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6166,7 +6166,7 @@ function requireHost() {
6166
6166
  }
6167
6167
 
6168
6168
  // src/lib/api-client.ts
6169
- var agtCliVersion = true ? "0.28.371" : "dev";
6169
+ var agtCliVersion = true ? "0.28.372" : "dev";
6170
6170
  var lastConfigHash = null;
6171
6171
  function setConfigHash(hash) {
6172
6172
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8612,4 +8612,4 @@ export {
8612
8612
  managerInstallSystemUnitCommand,
8613
8613
  managerUninstallSystemUnitCommand
8614
8614
  };
8615
- //# sourceMappingURL=chunk-D6BJJ334.js.map
8615
+ //# sourceMappingURL=chunk-FAMCYDMC.js.map
@@ -43,7 +43,7 @@ import {
43
43
  resolveEffectivePinRaw,
44
44
  safeWriteJsonAtomic,
45
45
  setConfigHash
46
- } from "../chunk-D6BJJ334.js";
46
+ } from "../chunk-FAMCYDMC.js";
47
47
  import {
48
48
  getProjectDir as getProjectDir2,
49
49
  getReadyTasks,
@@ -4128,7 +4128,13 @@ function isKanbanHybridDryRun() {
4128
4128
  }
4129
4129
  var HYBRID_ACTIONABLE_STATUSES = new Set(KANBAN_NUDGE_ACTIONABLE_STATUSES);
4130
4130
  function isHybridActionable(item) {
4131
- return HYBRID_ACTIONABLE_STATUSES.has(item.status) && item.source_type !== "scheduled_task";
4131
+ return HYBRID_ACTIONABLE_STATUSES.has(item.status) && item.source_type !== "scheduled_task" && item.assignee_type !== "human";
4132
+ }
4133
+ function resolveHybridNudgeAction(stale, allowedCount, suppressedCount) {
4134
+ if (stale) return "skip-stale";
4135
+ if (allowedCount > 0) return "nudge";
4136
+ if (suppressedCount > 0) return "close-suppressed";
4137
+ return "drain";
4132
4138
  }
4133
4139
  function kanbanActionableSignature(allowed) {
4134
4140
  return allowed.map((i) => `${i.id}:${i.status}`).sort().join("|");
@@ -9099,7 +9105,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
9099
9105
  var lastVersionCheckAt = 0;
9100
9106
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
9101
9107
  var lastResponsivenessProbeAt = 0;
9102
- var agtCliVersion = true ? "0.28.371" : "dev";
9108
+ var agtCliVersion = true ? "0.28.372" : "dev";
9103
9109
  function resolveBrewPath(execFileSync2) {
9104
9110
  try {
9105
9111
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -12458,6 +12464,7 @@ async function processAgent(agent, agentStates) {
12458
12464
  }
12459
12465
  }
12460
12466
  let boardItems = [];
12467
+ let boardItemsStale = false;
12461
12468
  const hasBoardTemplates = tasks.some((t) => BOARD_INJECT_TEMPLATES.has(t.template_id));
12462
12469
  if (hasBoardTemplates) {
12463
12470
  try {
@@ -12466,6 +12473,7 @@ async function processAgent(agent, agentStates) {
12466
12473
  kanbanBoardCache.set(agent.code_name, boardItems);
12467
12474
  } catch {
12468
12475
  boardItems = kanbanBoardCache.get(agent.code_name) ?? [];
12476
+ boardItemsStale = true;
12469
12477
  }
12470
12478
  }
12471
12479
  const agentFw = agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
@@ -12473,7 +12481,7 @@ async function processAgent(agent, agentStates) {
12473
12481
  const wantsHybridInject = isKanbanHybridEnabled();
12474
12482
  if (agentFw === "claude-code" && sessionMode === "persistent") {
12475
12483
  let hybridBoard = hasBoardTemplates ? boardItems : void 0;
12476
- let hybridBoardStale = false;
12484
+ let hybridBoardStale = boardItemsStale;
12477
12485
  if (!hybridBoard) {
12478
12486
  try {
12479
12487
  const boardData = await api.post(
@@ -12500,20 +12508,25 @@ async function processAgent(agent, agentStates) {
12500
12508
  const cardStates = wedgeRestartsByCard.get(agent.code_name);
12501
12509
  const actionable = hybridBoard.filter(isHybridActionable);
12502
12510
  const { allowed, suppressed } = cardStates ? partitionActionableByPoison(actionable, cardStates, poisonCfg) : { allowed: actionable, suppressed: [] };
12503
- if (hybridBoardStale) {
12511
+ const nudgeAction = resolveHybridNudgeAction(
12512
+ hybridBoardStale,
12513
+ allowed.length,
12514
+ suppressed.length
12515
+ );
12516
+ if (nudgeAction === "skip-stale") {
12504
12517
  if (allowed.length > 0) {
12505
12518
  log(
12506
12519
  `[manager-worker] kanban inject skipped for '${agent.code_name}' - board fetch failed this tick (stale cache)`
12507
12520
  );
12508
12521
  }
12509
- } else if (allowed.length > 0) {
12522
+ } else if (nudgeAction === "nudge") {
12510
12523
  void maybeInjectKanbanCheck(
12511
12524
  agent.code_name,
12512
12525
  agent.agent_id,
12513
12526
  allowed.length,
12514
12527
  kanbanActionableSignature(allowed)
12515
12528
  );
12516
- } else if (suppressed.length > 0) {
12529
+ } else if (nudgeAction === "close-suppressed") {
12517
12530
  closeInjectedRunIfOpen(
12518
12531
  agent.code_name,
12519
12532
  "completed",