wildcrane-runner 0.6.124 → 0.6.125

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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // ai4kanban 0.11.106 — built by runner/scripts/build.mjs. Do not edit.
2
+ // ai4kanban 0.11.107 — built by runner/scripts/build.mjs. Do not edit.
3
3
  import { createRequire as __ai4kanbanRequire } from 'node:module'
4
4
  const require = __ai4kanbanRequire(import.meta.url)
5
5
  var __create = Object.create;
@@ -1269,7 +1269,8 @@ function readLandArchiveOwner(file2) {
1269
1269
  const saved = fs4.readFileSync(file2, "utf8");
1270
1270
  if (/^[\w-]{1,100}$/.test(saved)) return { job: saved };
1271
1271
  const owner = JSON.parse(saved);
1272
- return typeof owner?.job === "string" && owner.job.trim() && Number.isSafeInteger(owner.number) && owner.number > 0 ? { job: owner.job, number: owner.number } : null;
1272
+ const validJob = owner?.job === null || typeof owner?.job === "string" && !!owner.job.trim();
1273
+ return validJob && Number.isSafeInteger(owner?.number) && owner.number > 0 ? { job: owner.job, number: owner.number } : null;
1273
1274
  } catch {
1274
1275
  return null;
1275
1276
  }
@@ -41730,7 +41731,7 @@ var init_package = __esm({
41730
41731
  "../cli/package.json"() {
41731
41732
  package_default = {
41732
41733
  name: "wildcrane",
41733
- version: "0.11.106",
41734
+ version: "0.11.107",
41734
41735
  akbContract: 41,
41735
41736
  canonicalCommands: true,
41736
41737
  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.",
@@ -129505,7 +129506,15 @@ function studioEntry(id2, name, version2, action, command = "akb studio file") {
129505
129506
  return ["studio", "Studio: " + name + ". Read `" + command + " " + studioName(id2) + " STUDIO.md`" + read5 + ".", void 0, JSON.stringify([id2, name, version2, command])];
129506
129507
  }
129507
129508
  function compactReview(review, assigned) {
129508
- if (isFlatReviewPlan(review.plan)) return taskReviewBoundary(review, assigned);
129509
+ if (isFlatReviewPlan(review.plan)) {
129510
+ const pending = (review.approvals ?? []).filter((approval) => "preview" in approval);
129511
+ return [
129512
+ "Review r" + review.revision + " \xB7 flat plan",
129513
+ "Selected Previews: " + (review.plan.previews.join(", ") || "none"),
129514
+ "Review rule: " + (review.plan.rule || "No extra approval."),
129515
+ ...pending.length ? ["Pending approvals:", ...pending.map(({ preview, stage, revision, question }) => `- ${preview} \xB7 ${stage} \xB7 r${revision}: ${question}`)] : []
129516
+ ].map((line) => line.replace(/[\r\n]+/g, " ")).join("\n");
129517
+ }
129509
129518
  const authorization = reviewAuthorization(review, assigned);
129510
129519
  if (authorization.kind === "changed") return "Review r" + review.revision + " \xB7 authorization changed. Read the task again.";
129511
129520
  const custom2 = review.preview_definitions?.length ? "\nCustom Previews: " + review.preview_definitions.map((d2) => d2.id).join(", ") : "";
@@ -149595,7 +149604,7 @@ var init_board2 = __esm({
149595
149604
  var card_chat_default;
149596
149605
  var init_card_chat = __esm({
149597
149606
  "../cli/src/guide/card-chat.md"() {
149598
- card_chat_default = "# Answer a card's conversation\n\nWork only on unlocked stages. An empty plan needs no extra approval; an undecided plan allows planning only.\n\n- **Task and review**: read the current card or use `akb task show <id>` when needed. Use `akb task review <id>` for the full review state and snapshots, and before reporting a stage with its revision. Finish the reply to let the Runner sync and submit Preview changes.\n- **Studio and Previews**: when working on a draft, read `akb studio file <studio> STUDIO.md`, any `shared/RULES.md`, and current preferences with `akb studio rule <studio>`. Use the relevant `akb studio previews --studio <studio> --json` entries and component docs as needed. Read only applicable board memory.\n- **Button labels**: Quote current labels from the conversation verbatim. Otherwise, consult the task-page guide for the user's language (`akb guide task-ui-en` or `akb guide task-ui-zh`) and describe the action if its label is uncertain.\n\n- **Change requirements or drafts**: when the user changes the scope, expected behavior, or draft, use `akb task revise <id> \"<change>\" --print`.\n- **Record an answer**: when the user answers an open question on the card, use `akb task resolve <id> --print`.\n- **Manage open questions**: when a decision needs the user's input, follow `akb guide update-questions` and use `akb task update-questions <task>` to edit the question list.\n- **Change card fields**: when the user changes metadata such as priority, modules, or dependencies, use `akb task update <id>`.\n- **Previews**: if the current plan does not cover a needed reviewable output, expand the plan first before writing its Preview block. Follow `akb guide writing` and the task-bound Studio\u2019s Preview instructions. Before changing approved output, invalidate its stage with `akb task review <id> --revise-from <stage> --revision <n>`. Preserve unrelated work.\n Save files in the `Asset folder` shown by `akb task show <id>` and reference them as `asset:<file>`.\n- **Create a separate task**: when the user asks to capture work unrelated to this card, follow `akb guide add-task`.\n- **Split this card**: when the user asks to break this card's outcome into subtasks, follow the group procedure in `akb guide add-task`.\n- **Change a studio**: use `akb guide update-studio` for shared Studio instructions; a correction to this card's draft alone stays on this card.\n- **Check card edits**: after writing a card, run `akb task validate <id>` and fix what it reports.\n- **Anything else**: for a request this guide does not cover, read `akb help` once, then the matching command's `--help`.\n\nReply in plain, natural language. Do not write memory, including through any flow this conversation starts.\n\n- **Approve**: only on an explicit request, use `akb task approve <id> --stage <stage> --revision <reviewed revision>`. In a reply this commits after successful synchronization. Finish the reply without further edits or waiting. Never substitute the latest revision for the one reviewed.\n- **Change the plan**: add Previews safely with `akb task review <id> --add-previews <ids> --revision <n>` (and `--preview-definitions-file <path>` for custom Previews); this preserves existing stages and approvals. Use `--previews <ids> --review <rule>` or `--file <path>` only to replace the plan. Submit an updated Preview with `--request-approval <question> --preview <id> --revision <n>`.\n";
149607
+ card_chat_default = "# Answer a card's conversation\n\nAn empty plan needs no extra approval; an undecided plan allows planning only.\n\n- **Task and review**: read the current card or use `akb task show <id>` when needed. Use `akb task review <id>` for the full review state and snapshots, and before reporting a stage with its revision. Finish the reply to let the Runner sync and submit Preview changes.\n- **Studio and Previews**: when working on a draft, read `akb studio file <studio> STUDIO.md`, any `shared/RULES.md`, and current preferences with `akb studio rule <studio>`. Use the relevant `akb studio previews --studio <studio> --json` entries and component docs as needed. Read only applicable board memory.\n- **Button labels**: Quote current labels from the conversation verbatim. Otherwise, consult the task-page guide for the user's language (`akb guide task-ui-en` or `akb guide task-ui-zh`) and describe the action if its label is uncertain.\n\n- **Change requirements or drafts**: when the user changes the scope, expected behavior, or draft, use `akb task revise <id> \"<change>\" --print`.\n- **Record an answer**: when the user answers an open question on the card, use `akb task resolve <id> --print`.\n- **Manage open questions**: when a decision needs the user's input, follow `akb guide update-questions` and use `akb task update-questions <task>` to edit the question list.\n- **Change card fields**: when the user changes metadata such as priority, modules, or dependencies, use `akb task update <id>`.\n- **Previews**: if the current plan does not cover a needed reviewable output, expand the plan first before writing its Preview block. Follow `akb guide writing` and the task-bound Studio\u2019s Preview instructions. Edit approved Previews directly, and run `akb task review <id> --request-approval <question> --preview <id> --revision <n>` only when the review rule calls for it. Preserve unrelated work.\n Save files in the `Asset folder` shown by `akb task show <id>` and reference them as `asset:<file>`.\n- **Create a separate task**: when the user asks to capture work unrelated to this card, follow `akb guide add-task`.\n- **Split this card**: when the user asks to break this card's outcome into subtasks, follow the group procedure in `akb guide add-task`.\n- **Change a studio**: use `akb guide update-studio` for shared Studio instructions; a correction to this card's draft alone stays on this card.\n- **Check card edits**: after writing a card, run `akb task validate <id>` and fix what it reports.\n- **Anything else**: for a request this guide does not cover, read `akb help` once, then the matching command's `--help`.\n\nReply in plain, natural language. Do not write memory, including through any flow this conversation starts.\n\n- **Approve**: only on an explicit request, use `akb task approve <id> --stage <stage> --revision <reviewed revision>`. In a reply this commits after successful synchronization. Finish the reply without further edits or waiting. Never substitute the latest revision for the one reviewed.\n- **Change the plan**: add Previews safely with `akb task review <id> --add-previews <ids> --revision <n>` (and `--preview-definitions-file <path>` for custom Previews); this preserves existing stages and approvals. Use `--previews <ids> --review <rule>` or `--file <path>` only to replace the plan.\n";
149599
149608
  }
149600
149609
  });
149601
149610
 
@@ -1 +1 @@
1
- {"name":"wildcrane","version":"0.11.106","akbContract":41,"type":"module","private":true}
1
+ {"name":"wildcrane","version":"0.11.107","akbContract":41,"type":"module","private":true}
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.124 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.125 — built by runner/scripts/build.mjs. Do not edit.
2
2
  import { createRequire as __ai4kanbanRequire } from 'node:module'
3
3
  const require = __ai4kanbanRequire(import.meta.url)
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.124 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.125 — built by runner/scripts/build.mjs. Do not edit.
2
2
  import { createRequire as __ai4kanbanRequire } from 'node:module'
3
3
  const require = __ai4kanbanRequire(import.meta.url)
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.124 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.125 — built by runner/scripts/build.mjs. Do not edit.
2
2
  import { createRequire as __ai4kanbanRequire } from 'node:module'
3
3
  const require = __ai4kanbanRequire(import.meta.url)
4
4
  var __create = Object.create;