@integrity-labs/agt-cli 0.27.37 → 0.27.39

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.
@@ -7031,4 +7031,4 @@ export {
7031
7031
  managerInstallSystemUnitCommand,
7032
7032
  managerUninstallSystemUnitCommand
7033
7033
  };
7034
- //# sourceMappingURL=chunk-J77QXLYC.js.map
7034
+ //# sourceMappingURL=chunk-EZMAP5WM.js.map
@@ -15,7 +15,7 @@ import {
15
15
  provisionOrientHook,
16
16
  provisionStopHook,
17
17
  requireHost
18
- } from "../chunk-J77QXLYC.js";
18
+ } from "../chunk-EZMAP5WM.js";
19
19
  import {
20
20
  getProjectDir as getProjectDir2,
21
21
  getReadyTasks,
@@ -3344,7 +3344,7 @@ var cachedFrameworkVersion = null;
3344
3344
  var lastVersionCheckAt = 0;
3345
3345
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
3346
3346
  var lastResponsivenessProbeAt = 0;
3347
- var agtCliVersion = true ? "0.27.37" : "dev";
3347
+ var agtCliVersion = true ? "0.27.39" : "dev";
3348
3348
  function resolveBrewPath(execFileSync4) {
3349
3349
  try {
3350
3350
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -6400,6 +6400,12 @@ async function syncAndCheckClaudeScheduler(agent, tasks, boardItems, refreshData
6400
6400
  }
6401
6401
  inFlightClaudeTasks.add(task.taskId);
6402
6402
  claudeTaskConcurrency.set(codeName, (claudeTaskConcurrency.get(codeName) ?? 0) + 1);
6403
+ if (isScheduledViaKanbanEnabled() && isPlainScheduledTemplate(task.templateId)) {
6404
+ await fireScheduledTaskViaKanban(codeName, agent.agent_id, task, prompt);
6405
+ inFlightClaudeTasks.delete(task.taskId);
6406
+ claudeTaskConcurrency.set(codeName, Math.max(0, (claudeTaskConcurrency.get(codeName) ?? 1) - 1));
6407
+ continue;
6408
+ }
6403
6409
  log(`[claude-scheduler] Firing '${task.name}' for '${codeName}'`);
6404
6410
  executeAndProcessClaudeTask(codeName, agent.agent_id, task, prompt).finally(() => {
6405
6411
  inFlightClaudeTasks.delete(task.taskId);
@@ -6606,6 +6612,29 @@ async function routeScheduledTaskViaKanban(codeName, agentId, task, prompt) {
6606
6612
  log(`[scheduled-kanban] Routed task '${task.name}' for '${codeName}' via todo card ${kanban_item_id} run_id=${run_id}`);
6607
6613
  return true;
6608
6614
  }
6615
+ async function fireScheduledTaskViaKanban(codeName, agentId, task, prompt) {
6616
+ let routed = false;
6617
+ try {
6618
+ routed = await routeScheduledTaskViaKanban(codeName, agentId, task, prompt);
6619
+ } catch (err) {
6620
+ log(`[scheduled-kanban] route threw for '${task.name}' on '${codeName}': ${err.message}`);
6621
+ routed = false;
6622
+ }
6623
+ try {
6624
+ const updated = markTaskFired(codeName, task.taskId, routed ? "ok" : "error");
6625
+ claudeSchedulerStates.set(codeName, updated);
6626
+ } catch (err) {
6627
+ log(`[scheduled-kanban] markTaskFired failed for '${task.name}' on '${codeName}': ${err.message}`);
6628
+ }
6629
+ if (task.scheduleKind === "at") {
6630
+ try {
6631
+ await api.post("/host/schedules/disable", { agent_id: agentId, task_id: task.taskId });
6632
+ } catch (err) {
6633
+ log(`[scheduled-kanban] Failed to disable one-off task '${task.name}': ${err.message}`);
6634
+ }
6635
+ }
6636
+ return routed;
6637
+ }
6609
6638
  async function executeAndProcessClaudeTask(codeName, agentId, task, prompt) {
6610
6639
  const projectDir = getProjectDir2(codeName);
6611
6640
  const mcpConfigPath = join6(projectDir, ".mcp.json");
@@ -7082,29 +7111,10 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash3("sha256").
7082
7111
  inFlightClaudeTasks.add(task.taskId);
7083
7112
  claudeTaskConcurrency.set(codeName, (claudeTaskConcurrency.get(codeName) ?? 0) + 1);
7084
7113
  if (isScheduledViaKanbanEnabled() && isPlainScheduledTemplate(task.templateId)) {
7085
- let routed = false;
7086
- try {
7087
- routed = await routeScheduledTaskViaKanban(codeName, agent.agent_id, task, prompt);
7088
- } catch (err) {
7089
- log(`[scheduled-kanban] route threw for '${task.name}' on '${codeName}': ${err.message}`);
7090
- routed = false;
7091
- }
7092
- if (routed) {
7093
- try {
7094
- const updated = markTaskFired(codeName, task.taskId, "ok");
7095
- claudeSchedulerStates.set(codeName, updated);
7096
- } catch (err) {
7097
- log(`[scheduled-kanban] markTaskFired failed for '${task.name}' on '${codeName}': ${err.message}`);
7098
- }
7099
- if (task.scheduleKind === "at") {
7100
- api.post("/host/schedules/disable", { agent_id: agent.agent_id, task_id: task.taskId }).catch(
7101
- (err) => log(`[scheduled-kanban] Failed to disable one-off task '${task.name}': ${err.message}`)
7102
- );
7103
- }
7104
- inFlightClaudeTasks.delete(task.taskId);
7105
- claudeTaskConcurrency.set(codeName, Math.max(0, (claudeTaskConcurrency.get(codeName) ?? 1) - 1));
7106
- break;
7107
- }
7114
+ await fireScheduledTaskViaKanban(codeName, agent.agent_id, task, prompt);
7115
+ inFlightClaudeTasks.delete(task.taskId);
7116
+ claudeTaskConcurrency.set(codeName, Math.max(0, (claudeTaskConcurrency.get(codeName) ?? 1) - 1));
7117
+ break;
7108
7118
  }
7109
7119
  log(`[persistent-session] Firing task '${task.name}' for '${codeName}' via claude -p`);
7110
7120
  executeAndProcessClaudeTask(codeName, agent.agent_id, task, prompt).catch(() => {
@@ -9385,6 +9395,7 @@ export {
9385
9395
  ensureClaudeManagedSettings,
9386
9396
  extractCharterSlackPeers,
9387
9397
  extractCharterTelegramPeers,
9398
+ fireScheduledTaskViaKanban,
9388
9399
  formatBoardForPrompt,
9389
9400
  hasActionableItems,
9390
9401
  hasHybridActionableItems,