wildcrane 0.11.12 → 0.11.13

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 (2) hide show
  1. package/dist/kanban.mjs +6 -6
  2. package/package.json +1 -1
package/dist/kanban.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // ai4kanban 0.11.12 — built from the CLI's TypeScript sources by cli/scripts/build.mjs.
2
+ // ai4kanban 0.11.13 — built from the CLI's TypeScript sources by cli/scripts/build.mjs.
3
3
  // Do not edit: every change belongs in cli/src/, and a build overwrites this file.
4
4
  import { createRequire as __ai4kanbanRequire } from 'node:module'
5
5
  const require = __ai4kanbanRequire(import.meta.url)
@@ -5515,7 +5515,7 @@ var init_package = __esm({
5515
5515
  "package.json"() {
5516
5516
  package_default = {
5517
5517
  name: "wildcrane",
5518
- version: "0.11.12",
5518
+ version: "0.11.13",
5519
5519
  akbContract: 5,
5520
5520
  description: "WildCrane's `akb` command \u2014 scaffold the Markdown board under docs/kanban/, put an agent on a card, and carry the flows the agent works by.",
5521
5521
  keywords: [
@@ -27927,7 +27927,7 @@ async function followRun(sessionId, already = "", program2 = "akb", events = fal
27927
27927
  last = await followOne(current, printed, events);
27928
27928
  seen.add(current.sessionId);
27929
27929
  printed = 0;
27930
- const deliveryId2 = last.deliveryId ?? first.deliveryId;
27930
+ const deliveryId2 = first.deliveryId ?? last.deliveryId;
27931
27931
  const next = nextInFlow(first, current.sessionId, seen) ?? (deliveryId2 ? await moveDelivery(deliveryId2, idle) : void 0);
27932
27932
  if (next === void 0) break;
27933
27933
  if (next === null) {
@@ -27948,7 +27948,7 @@ async function followRun(sessionId, already = "", program2 = "akb", events = fal
27948
27948
  }
27949
27949
  say("");
27950
27950
  say(runLine(last, program2));
27951
- const deliveryId = last.deliveryId ?? first.deliveryId;
27951
+ const deliveryId = first.deliveryId ?? last.deliveryId;
27952
27952
  const delivery = deliveryId ? deliveryOutcome(deliveryId) : void 0;
27953
27953
  if (delivery) say(`delivery ${delivery.id}: ${delivery.line}`);
27954
27954
  const failed = last.status !== "done" ? `run ${short(last.sessionId)} ended ${last.status}${last.error ? `: ${last.error}` : ""}` : delivery && delivery.status !== "finished" ? `delivery ${delivery.id} did not land${idle.timedOut ? ` \u2014 nothing moved it for ${ago(follow.idleMs)}` : ""}: ${delivery.line}` : void 0;
@@ -28014,7 +28014,7 @@ async function followOne(view, already, events) {
28014
28014
  }
28015
28015
  function nextInFlow(first, after2, seen) {
28016
28016
  const runs = readRuns();
28017
- const next = runs.filter((r) => !seen.has(r.sessionId) && r.action !== "sub" && r.startedAt >= first.startedAt).filter((r) => r.resumedFrom === after2 || !!first.flowId && r.flowId === first.flowId).sort((a, b) => a.startedAt - b.startedAt)[0];
28017
+ const next = runs.filter((r) => !seen.has(r.sessionId) && r.action !== "sub" && r.startedAt >= first.startedAt).filter((r) => !first.deliveryId || !r.deliveryId || r.deliveryId === first.deliveryId).filter((r) => r.resumedFrom === after2 || !!first.flowId && r.flowId === first.flowId).sort((a, b) => a.startedAt - b.startedAt)[0];
28018
28018
  return next ? { ...next } : void 0;
28019
28019
  }
28020
28020
  async function moveDelivery(deliveryId, idle) {
@@ -28034,7 +28034,7 @@ async function moveDelivery(deliveryId, idle) {
28034
28034
  const ask2 = await advanceLanding();
28035
28035
  if (!ask2) return null;
28036
28036
  const started = await startRun(ask2);
28037
- return "error" in started ? null : { ...started.run };
28037
+ return "error" in started || started.run.deliveryId !== deliveryId ? null : { ...started.run };
28038
28038
  }
28039
28039
  function deliveryOutcome(deliveryId) {
28040
28040
  const delivery = findDelivery(deliveryId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wildcrane",
3
- "version": "0.11.12",
3
+ "version": "0.11.13",
4
4
  "akbContract": 5,
5
5
  "description": "WildCrane's `akb` command — scaffold the Markdown board under docs/kanban/, put an agent on a card, and carry the flows the agent works by.",
6
6
  "keywords": [