wildcrane-runner 0.6.84 → 0.6.86

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.68 — built by runner/scripts/build.mjs. Do not edit.
2
+ // ai4kanban 0.11.69 — 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;
@@ -4004,7 +4004,7 @@ var init_package = __esm({
4004
4004
  "../cli/package.json"() {
4005
4005
  package_default = {
4006
4006
  name: "wildcrane",
4007
- version: "0.11.68",
4007
+ version: "0.11.69",
4008
4008
  akbContract: 17,
4009
4009
  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.",
4010
4010
  keywords: [
@@ -16211,7 +16211,7 @@ function actionPrompt(req, command, notes) {
16211
16211
  ].filter(Boolean).join(" ");
16212
16212
  case "clarify": {
16213
16213
  return [
16214
- `Plan task ${req.id} ${named2} following \`akb guide refine\`. Work the board only through \`akb\`; a command with \`--print\` prints its flow for you to follow here, and without it starts a separate session.`,
16214
+ `Plan task ${req.id} ${named2} following \`akb guide refine\`. A command with \`--print\` prints its flow for you to follow here, and without it starts a separate session.`,
16215
16215
  carriedNote(req),
16216
16216
  // A refine has no note box of its own, but one SCHEDULED on a blocked card
16217
16217
  // carries whatever was typed when it was scheduled — often the very reason the user
@@ -28058,7 +28058,7 @@ var init_troubleshoot = __esm({
28058
28058
  var write_agent_default;
28059
28059
  var init_write_agent = __esm({
28060
28060
  "../cli/src/guide/write-agent.md"() {
28061
- write_agent_default = "# Write an agent\n\nCreate `docs/kanban/agents/<name>/AGENT.md`; use an unused lowercase, hyphenated name matching\nthe folder. Its studio lists it under `previews`, `land` or `scheduled` in `STUDIO.md`.\n\n## Example: a preview agent\n\n```yaml\n---\nname: page-designer\ndescription: Makes complete page designs with their copy.\nakb:\n when: A card needs a page designed or changed.\n icon: screen\n components: [Asset, Set]\n i18n:\n en:\n title: Page design\n zh:\n title: \u9875\u9762\u8BBE\u8BA1\n stages:\n - id: copy\n title: {en: Copy, zh: \u6587\u6848}\n when: The page needs new or revised copy; existing text is insufficient.\n instructions: references/copy.md\n - id: layout\n title: {en: Page layout, zh: \u9875\u9762\u7A3F}\n instructions: references/layout.md\n---\n\nChoose the stages this task needs on first entry; reuse the saved selection on continuation.\nFollow the current stage's instructions, preserving confirmed copy in the page design.\n```\n\nWith existing copy, this agent selects only `layout`; otherwise it selects `copy,layout`.\nEach selected step except the last waits for user confirmation. The last is ready for the\ncard's approval. The agent chooses its steps, not the planner; the program saves and advances\nthem. Omit `stages` for a single preview. Stage IDs are unique; instruction paths stay inside\nthe agent folder. A task freezes its definition, files and selection.\n\n## Other fields\n\nOnly `name`, `description` and nonempty body instructions are required. Omit unused fields.\n\n| Field | Use |\n| --- | --- |\n| `akb.when` | When to request a preview; omitted means every task on its studio. |\n| `akb.after` | Previews whose approval this agent waits for, when selected on the same card. |\n| `akb.session: new` | Separate session recommended; the calling agent chooses whether to use it. |\n| `akb.components` | Asset, Set, Compare or Storyboard; default `[Asset]`, `[]` loads no component docs. |\n| `akb.icon` | Glyph name, or 1\u201312 `{d, f?, o?: true, s?, w?}` parts using supported colours. |\n| `akb.i18n` | Display-only title, description and when by language; missing text falls back to English. Keep titles short and name the output. |\n| `akb.reads` | Scheduled input: `archived-cards`, `chats` or `dismissals`; omitted uses cadence alone. Set fixed cadence on the studio's scheduled entry. |\n| `akb.merges: true` | A land agent merges code; completion requires its merged commit and branch. |\n| `akb.memory` | Names of shared global memories. |\n| `akb.memoryFiles.workspace` | Paths such as `[style.md]` shared across projects within this agent's memory. |\n\n## Instructions and files\n\n- **Keep the body small**: say what the agent owns and delivers. Use `akb guide write-prompt`;\n do not repeat `preview-agent` rules. Stage-specific work belongs in its instruction file.\n- **Load on demand**: files beside AGENT.md are listed to the run. Put shared studio material\n in `shared/`; keep scripts and business validation with their owning agent, documenting\n runtime and invocation. Retrieve bundled files with `akb raw file <studio> <path>`.\n- **Memory**: keep only preferences or corrections that change future work. Name each file's\n purpose and when to read it; omit transcripts and duplicated rules. Agent memory is under\n `docs/kanban/memory/agents/<name>/`; studio memory follows its `shared/RULES.md`. Agree on\n any scheduled agent's persistent state rather than inventing its format.\n- **User decisions**: follow `akb guide update-questions`; do not ask again about settled\n choices. Show each changed file as a unified diff with one sentence explaining why.\n\n## Imported skills\n\nKeep each skill whole under `skills/<skill>/`, including instructions, scripts, resources and\nlicense; exclude caches and installed packages. Record its source and version in AGENT.md:\n`- **<skill>**: <when to use>. Source: <URL or pasted> @ <commit, tag or date>`.\nAdapt routing outside the skill, preserving its relative paths. Report missing files, tools\nor credentials; never copy keys or claim an unusable skill works. Update or remove only when\nasked, replacing the whole owned copy and showing the diff and version.\n\n## Check\n\nRun `akb raw previews` and `akb raw previews --triggers`; fix every reported problem.\nThen inspect `akb raw previews <name> <id> --print` on a real task and trim unnecessary context.\nUse `akb raw components --agent <name> --docs` for output formats. New agents start enabled\nin their studio; disabled previews cannot run. Keep registration and instructions consistent.\n";
28061
+ write_agent_default = "# Write an agent\n\nCreate `docs/kanban/agents/<name>/AGENT.md`; use an unused lowercase, hyphenated name matching\nthe folder. Its studio lists it under `previews`, `land` or `scheduled` in `STUDIO.md`.\n\n## Example: a preview agent\n\n```yaml\n---\nname: page-designer\ndescription: Makes complete page designs with their copy.\nakb:\n when: A card needs a page designed or changed.\n icon: screen\n components: [Asset, Set]\n i18n:\n en:\n title: Page design\n zh:\n title: \u9875\u9762\u8BBE\u8BA1\n stages:\n - id: copy\n title: {en: Copy, zh: \u6587\u6848}\n when: The page needs new or revised copy; existing text is insufficient.\n instructions: references/copy.md\n - id: layout\n title: {en: Page layout, zh: \u9875\u9762\u7A3F}\n instructions: references/layout.md\n---\n\nChoose the stages this task needs on first entry; reuse the saved selection on continuation.\nFollow the current stage's instructions, preserving confirmed copy in the page design.\n```\n\nWith existing copy, this agent selects only `layout`; otherwise it selects `copy,layout`.\nEach selected step except the last waits for user confirmation. The last is ready for the\ncard's approval. The agent chooses its steps, not the planner; the program saves and advances\nthem. Omit `stages` for a single preview. Stage IDs are unique; instruction paths stay inside\nthe agent folder. A task freezes its definition, files and selection.\n\n## Other fields\n\nOnly `name`, `description` and nonempty body instructions are required. Omit unused fields.\n\n| Field | Use |\n| --- | --- |\n| `akb.when` | When to request a preview; omitted means every task on its studio. |\n| `akb.after` | Previews whose approval this agent waits for, when selected on the same card. |\n| `akb.session: new` | Separate session recommended; the calling agent chooses whether to use it. |\n| `akb.components` | Asset, Set, Compare or Storyboard; default `[Asset]`, `[]` loads no component docs. |\n| `akb.icon` | Glyph name, or 1\u201312 `{d, f?, o?: true, s?, w?}` parts using supported colours. |\n| `akb.i18n` | Display-only title and description by language; missing text falls back to English. Keep titles short and name the output. |\n| `akb.reads` | Scheduled input: `archived-cards`, `chats` or `dismissals`; omitted uses cadence alone. Set fixed cadence on the studio's scheduled entry. |\n| `akb.merges: true` | A land agent merges code; completion requires its merged commit and branch. |\n| `akb.memory` | Names of shared global memories. |\n| `akb.memoryFiles.workspace` | Paths such as `[style.md]` shared across projects within this agent's memory. |\n\n## Instructions and files\n\n- **Keep the body small**: say what the agent owns and delivers. Use `akb guide write-prompt`;\n do not repeat `preview-agent` rules. Stage-specific work belongs in its instruction file.\n- **Load on demand**: files beside AGENT.md are listed to the run. Put shared studio material\n in `shared/`; keep scripts and business validation with their owning agent, documenting\n runtime and invocation. Retrieve bundled files with `akb raw file <studio> <path>`.\n- **Memory**: keep only preferences or corrections that change future work. Name each file's\n purpose and when to read it; omit transcripts and duplicated rules. Agent memory is under\n `docs/kanban/memory/agents/<name>/`; studio memory follows its `shared/RULES.md`. Agree on\n any scheduled agent's persistent state rather than inventing its format.\n- **User decisions**: follow `akb guide update-questions`; do not ask again about settled\n choices. Show each changed file as a unified diff with one sentence explaining why.\n\n## Imported skills\n\nKeep each skill whole under `skills/<skill>/`, including instructions, scripts, resources and\nlicense; exclude caches and installed packages. Record its source and version in AGENT.md:\n`- **<skill>**: <when to use>. Source: <URL or pasted> @ <commit, tag or date>`.\nAdapt routing outside the skill, preserving its relative paths. Report missing files, tools\nor credentials; never copy keys or claim an unusable skill works. Update or remove only when\nasked, replacing the whole owned copy and showing the diff and version.\n\n## Check\n\nRun `akb raw previews` and `akb raw previews --triggers`; fix every reported problem.\nThen inspect `akb raw previews <name> <id> --print` on a real task and trim unnecessary context.\nUse `akb raw components --agent <name> --docs` for output formats. New agents start enabled\nin their studio; disabled previews cannot run. Keep registration and instructions consistent.\n";
28062
28062
  }
28063
28063
  });
28064
28064
 
@@ -1 +1 @@
1
- {"name":"wildcrane","version":"0.11.68","akbContract":17,"type":"module","private":true}
1
+ {"name":"wildcrane","version":"0.11.69","akbContract":17,"type":"module","private":true}
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.84 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.86 — 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.84 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.86 — 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.84 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.86 — 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.84 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.86 — 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;
@@ -112081,7 +112081,7 @@ async function studioSnapshot(workspace, catalog, list3) {
112081
112081
  }
112082
112082
 
112083
112083
  // src/protocol.ts
112084
- var AKB_VERSION = true ? "0.11.68" : "0.0.0";
112084
+ var AKB_VERSION = true ? "0.11.69" : "0.0.0";
112085
112085
  var AKB_CONTRACT = true ? 17 : 0;
112086
112086
 
112087
112087
  // src/secrets.ts
@@ -113924,40 +113924,30 @@ init_dress_page();
113924
113924
  import { spawnSync as spawnSync3 } from "node:child_process";
113925
113925
  import fs17 from "node:fs";
113926
113926
  import path18 from "node:path";
113927
-
113928
- // ../skill/SKILL.md
113929
- var SKILL_default = '---\nname: kanban\ndescription: Manage the file-based task board with akb. Use for creating and planning tasks, revising or implementing cards, and managing background runs; also for "what\'s running".\n---\n\n# Kanban board\n\nThe board is worked only through `akb`. Find the command for the job in `akb help` and run\nit; never do its work by hand or from memory.\n\n- **`--print` does it here**: `akb raw card revise 12 --print "drop the export"` prints the whole\n flow for that card on this board; follow it to its closing steps. Without `--print` the\n same command starts a separate agent.\n- **Keys**: never read or write API keys; the user sets them with `akb raw agent set apiKey`.\n';
113930
-
113931
- // src/kanban-skill.ts
113932
113927
  var SKILL_FOLDERS = [".claude/skills/kanban", ".agents/skills/kanban"];
113933
- var CONTENT = `${SKILL_default.trimEnd()}
113934
-
113935
- <!-- ai4kanban managed -->
113936
- `;
113937
113928
  var MANAGED = /^<!-- ai4kanban \S+ -->$/m;
113938
- function prepareKanbanSkill(root2) {
113929
+ function removeLegacyKanbanSkill(root2) {
113939
113930
  for (const folder of SKILL_FOLDERS) {
113940
- const dir = path18.join(root2, folder);
113941
- const file2 = path18.join(dir, "SKILL.md");
113942
113931
  try {
113943
- let linked = false;
113944
113932
  let at2 = root2;
113945
- for (const name of `${folder}/SKILL.md`.split("/")) {
113933
+ if (!fs17.lstatSync(at2, { throwIfNoEntry: false })?.isDirectory()) continue;
113934
+ let safe3 = true;
113935
+ const parts = `${folder}/SKILL.md`.split("/");
113936
+ for (const [i, name] of parts.entries()) {
113946
113937
  at2 = path18.join(at2, name);
113947
- if (fs17.lstatSync(at2, { throwIfNoEntry: false })?.isSymbolicLink()) linked = true;
113948
- }
113949
- const held5 = fs17.existsSync(file2) ? fs17.readFileSync(file2, "utf8") : null;
113950
- const exists = fs17.lstatSync(dir, { throwIfNoEntry: false }) !== void 0;
113951
- if (linked || exists && !MANAGED.test(held5 ?? "")) {
113952
- if (!held5?.trim()) throw new Error("\u7528\u6237\u81EA\u6709\u76EE\u5F55\u6216\u7B26\u53F7\u94FE\u63A5\u4E2D\u7F3A\u5C11\u53EF\u8BFB\u7684 SKILL.md");
113953
- continue;
113954
- }
113955
- if (held5 !== CONTENT) {
113956
- fs17.mkdirSync(dir, { recursive: true });
113957
- fs17.writeFileSync(file2, CONTENT);
113938
+ const stat = fs17.lstatSync(at2, { throwIfNoEntry: false });
113939
+ if (!stat || stat.isSymbolicLink() || (i < parts.length - 1 ? !stat.isDirectory() : !stat.isFile())) {
113940
+ safe3 = false;
113941
+ break;
113942
+ }
113958
113943
  }
113944
+ if (!safe3 || !MANAGED.test(fs17.readFileSync(at2, "utf8"))) continue;
113945
+ fs17.unlinkSync(at2);
113946
+ const dir = path18.dirname(at2);
113947
+ if (fs17.readdirSync(dir).length === 0) fs17.rmdirSync(dir);
113959
113948
  } catch (e2) {
113960
- throw new Error(`\u65E0\u6CD5\u51C6\u5907 ${folder}\uFF1A${e2 instanceof Error ? e2.message : String(e2)}`);
113949
+ process.stderr.write(`wildcrane: \u65E0\u6CD5\u6E05\u7406 ${folder}\uFF1A${e2 instanceof Error ? e2.message : String(e2)}
113950
+ `);
113961
113951
  }
113962
113952
  }
113963
113953
  }
@@ -116527,7 +116517,7 @@ function createTail(log) {
116527
116517
  // ../cli/package.json
116528
116518
  var package_default = {
116529
116519
  name: "wildcrane",
116530
- version: "0.11.68",
116520
+ version: "0.11.69",
116531
116521
  akbContract: 17,
116532
116522
  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.",
116533
116523
  keywords: [
@@ -120670,11 +120660,7 @@ async function setUp(job, ws, deps, io) {
120670
120660
  const init = await akb(["raw", "init"]);
120671
120661
  if (init.code !== 0) return refusal2(init);
120672
120662
  }
120673
- try {
120674
- prepareKanbanSkill(ws.cwd);
120675
- } catch (e2) {
120676
- return e2 instanceof Error ? e2.message : String(e2);
120677
- }
120663
+ removeLegacyKanbanSkill(ws.cwd);
120678
120664
  const hook = installCommitHook(ws.cwd, ws.board);
120679
120665
  if (hook.note) io.show(`${hook.note}
120680
120666
  `);
package/dist/launcher.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.84 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.86 — 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;
@@ -26903,8 +26903,8 @@ function saveAlphaUpdates(value) {
26903
26903
  }
26904
26904
 
26905
26905
  // src/protocol.ts
26906
- var VERSION = true ? "0.6.84" : "0.0.0";
26907
- var AKB_VERSION = true ? "0.11.68" : "0.0.0";
26906
+ var VERSION = true ? "0.6.86" : "0.0.0";
26907
+ var AKB_VERSION = true ? "0.11.69" : "0.0.0";
26908
26908
  var EXIT_REFUSED = 10;
26909
26909
  var EXIT_OUTDATED = 11;
26910
26910
  var EXIT_UPDATE = 12;
@@ -29099,40 +29099,30 @@ import path33 from "node:path";
29099
29099
  import { spawnSync as spawnSync2 } from "node:child_process";
29100
29100
  import fs17 from "node:fs";
29101
29101
  import path19 from "node:path";
29102
-
29103
- // ../skill/SKILL.md
29104
- var SKILL_default = '---\nname: kanban\ndescription: Manage the file-based task board with akb. Use for creating and planning tasks, revising or implementing cards, and managing background runs; also for "what\'s running".\n---\n\n# Kanban board\n\nThe board is worked only through `akb`. Find the command for the job in `akb help` and run\nit; never do its work by hand or from memory.\n\n- **`--print` does it here**: `akb raw card revise 12 --print "drop the export"` prints the whole\n flow for that card on this board; follow it to its closing steps. Without `--print` the\n same command starts a separate agent.\n- **Keys**: never read or write API keys; the user sets them with `akb raw agent set apiKey`.\n';
29105
-
29106
- // src/kanban-skill.ts
29107
29102
  var SKILL_FOLDERS = [".claude/skills/kanban", ".agents/skills/kanban"];
29108
- var CONTENT = `${SKILL_default.trimEnd()}
29109
-
29110
- <!-- ai4kanban managed -->
29111
- `;
29112
29103
  var MANAGED = /^<!-- ai4kanban \S+ -->$/m;
29113
- function prepareKanbanSkill(root2) {
29104
+ function removeLegacyKanbanSkill(root2) {
29114
29105
  for (const folder of SKILL_FOLDERS) {
29115
- const dir = path19.join(root2, folder);
29116
- const file2 = path19.join(dir, "SKILL.md");
29117
29106
  try {
29118
- let linked = false;
29119
29107
  let at = root2;
29120
- for (const name of `${folder}/SKILL.md`.split("/")) {
29108
+ if (!fs17.lstatSync(at, { throwIfNoEntry: false })?.isDirectory()) continue;
29109
+ let safe2 = true;
29110
+ const parts = `${folder}/SKILL.md`.split("/");
29111
+ for (const [i, name] of parts.entries()) {
29121
29112
  at = path19.join(at, name);
29122
- if (fs17.lstatSync(at, { throwIfNoEntry: false })?.isSymbolicLink()) linked = true;
29123
- }
29124
- const held2 = fs17.existsSync(file2) ? fs17.readFileSync(file2, "utf8") : null;
29125
- const exists = fs17.lstatSync(dir, { throwIfNoEntry: false }) !== void 0;
29126
- if (linked || exists && !MANAGED.test(held2 ?? "")) {
29127
- if (!held2?.trim()) throw new Error("\u7528\u6237\u81EA\u6709\u76EE\u5F55\u6216\u7B26\u53F7\u94FE\u63A5\u4E2D\u7F3A\u5C11\u53EF\u8BFB\u7684 SKILL.md");
29128
- continue;
29129
- }
29130
- if (held2 !== CONTENT) {
29131
- fs17.mkdirSync(dir, { recursive: true });
29132
- fs17.writeFileSync(file2, CONTENT);
29113
+ const stat = fs17.lstatSync(at, { throwIfNoEntry: false });
29114
+ if (!stat || stat.isSymbolicLink() || (i < parts.length - 1 ? !stat.isDirectory() : !stat.isFile())) {
29115
+ safe2 = false;
29116
+ break;
29117
+ }
29133
29118
  }
29119
+ if (!safe2 || !MANAGED.test(fs17.readFileSync(at, "utf8"))) continue;
29120
+ fs17.unlinkSync(at);
29121
+ const dir = path19.dirname(at);
29122
+ if (fs17.readdirSync(dir).length === 0) fs17.rmdirSync(dir);
29134
29123
  } catch (e) {
29135
- throw new Error(`\u65E0\u6CD5\u51C6\u5907 ${folder}\uFF1A${e instanceof Error ? e.message : String(e)}`);
29124
+ process.stderr.write(`wildcrane: \u65E0\u6CD5\u6E05\u7406 ${folder}\uFF1A${e instanceof Error ? e.message : String(e)}
29125
+ `);
29136
29126
  }
29137
29127
  }
29138
29128
  }
@@ -29148,10 +29138,10 @@ function keepOutOfGit(dir, folders2 = SKILL_FOLDERS) {
29148
29138
  fs17.writeFileSync(exclude, `${held2}${held2 && !held2.endsWith("\n") ? "\n" : ""}${missing.join("\n")}
29149
29139
  `);
29150
29140
  }
29151
- function installKanbanSkill(dir) {
29141
+ function retireKanbanSkill(dir) {
29152
29142
  try {
29153
29143
  keepOutOfGit(dir);
29154
- prepareKanbanSkill(dir);
29144
+ removeLegacyKanbanSkill(dir);
29155
29145
  } catch (e) {
29156
29146
  process.stderr.write(`wildcrane: ${e instanceof Error ? e.message : String(e)}
29157
29147
  `);
@@ -31141,7 +31131,7 @@ function createTail(log) {
31141
31131
  // ../cli/package.json
31142
31132
  var package_default = {
31143
31133
  name: "wildcrane",
31144
- version: "0.11.68",
31134
+ version: "0.11.69",
31145
31135
  akbContract: 17,
31146
31136
  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.",
31147
31137
  keywords: [
@@ -34307,7 +34297,7 @@ async function addFolder2(dir, bind, strict = false) {
34307
34297
  } catch {
34308
34298
  return { error: "authorization_write", project };
34309
34299
  }
34310
- installKanbanSkill(real);
34300
+ retireKanbanSkill(real);
34311
34301
  notify();
34312
34302
  return { added: true, project };
34313
34303
  }
package/dist/plugin.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.84 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.86 — 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;
@@ -73849,8 +73849,8 @@ function machineId() {
73849
73849
  var machineName = () => os3.hostname().replace(/\.local$/, "");
73850
73850
 
73851
73851
  // src/protocol.ts
73852
- var VERSION = true ? "0.6.84" : "0.0.0";
73853
- var AKB_VERSION = true ? "0.11.68" : "0.0.0";
73852
+ var VERSION = true ? "0.6.86" : "0.0.0";
73853
+ var AKB_VERSION = true ? "0.11.69" : "0.0.0";
73854
73854
  var EXIT_REFUSED = 10;
73855
73855
  var EXIT_OUTDATED = 11;
73856
73856
  var EXIT_UPDATE = 12;
@@ -77722,7 +77722,7 @@ function createTail(log) {
77722
77722
  // ../cli/package.json
77723
77723
  var package_default = {
77724
77724
  name: "wildcrane",
77725
- version: "0.11.68",
77725
+ version: "0.11.69",
77726
77726
  akbContract: 17,
77727
77727
  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.",
77728
77728
  keywords: [
@@ -80530,40 +80530,30 @@ import path33 from "node:path";
80530
80530
  import { spawnSync as spawnSync5 } from "node:child_process";
80531
80531
  import fs28 from "node:fs";
80532
80532
  import path31 from "node:path";
80533
-
80534
- // ../skill/SKILL.md
80535
- var SKILL_default = '---\nname: kanban\ndescription: Manage the file-based task board with akb. Use for creating and planning tasks, revising or implementing cards, and managing background runs; also for "what\'s running".\n---\n\n# Kanban board\n\nThe board is worked only through `akb`. Find the command for the job in `akb help` and run\nit; never do its work by hand or from memory.\n\n- **`--print` does it here**: `akb raw card revise 12 --print "drop the export"` prints the whole\n flow for that card on this board; follow it to its closing steps. Without `--print` the\n same command starts a separate agent.\n- **Keys**: never read or write API keys; the user sets them with `akb raw agent set apiKey`.\n';
80536
-
80537
- // src/kanban-skill.ts
80538
80533
  var SKILL_FOLDERS = [".claude/skills/kanban", ".agents/skills/kanban"];
80539
- var CONTENT = `${SKILL_default.trimEnd()}
80540
-
80541
- <!-- ai4kanban managed -->
80542
- `;
80543
80534
  var MANAGED = /^<!-- ai4kanban \S+ -->$/m;
80544
- function prepareKanbanSkill(root2) {
80535
+ function removeLegacyKanbanSkill(root2) {
80545
80536
  for (const folder of SKILL_FOLDERS) {
80546
- const dir = path31.join(root2, folder);
80547
- const file2 = path31.join(dir, "SKILL.md");
80548
80537
  try {
80549
- let linked2 = false;
80550
80538
  let at = root2;
80551
- for (const name of `${folder}/SKILL.md`.split("/")) {
80539
+ if (!fs28.lstatSync(at, { throwIfNoEntry: false })?.isDirectory()) continue;
80540
+ let safe2 = true;
80541
+ const parts = `${folder}/SKILL.md`.split("/");
80542
+ for (const [i, name] of parts.entries()) {
80552
80543
  at = path31.join(at, name);
80553
- if (fs28.lstatSync(at, { throwIfNoEntry: false })?.isSymbolicLink()) linked2 = true;
80554
- }
80555
- const held2 = fs28.existsSync(file2) ? fs28.readFileSync(file2, "utf8") : null;
80556
- const exists = fs28.lstatSync(dir, { throwIfNoEntry: false }) !== void 0;
80557
- if (linked2 || exists && !MANAGED.test(held2 ?? "")) {
80558
- if (!held2?.trim()) throw new Error("\u7528\u6237\u81EA\u6709\u76EE\u5F55\u6216\u7B26\u53F7\u94FE\u63A5\u4E2D\u7F3A\u5C11\u53EF\u8BFB\u7684 SKILL.md");
80559
- continue;
80560
- }
80561
- if (held2 !== CONTENT) {
80562
- fs28.mkdirSync(dir, { recursive: true });
80563
- fs28.writeFileSync(file2, CONTENT);
80544
+ const stat = fs28.lstatSync(at, { throwIfNoEntry: false });
80545
+ if (!stat || stat.isSymbolicLink() || (i < parts.length - 1 ? !stat.isDirectory() : !stat.isFile())) {
80546
+ safe2 = false;
80547
+ break;
80548
+ }
80564
80549
  }
80550
+ if (!safe2 || !MANAGED.test(fs28.readFileSync(at, "utf8"))) continue;
80551
+ fs28.unlinkSync(at);
80552
+ const dir = path31.dirname(at);
80553
+ if (fs28.readdirSync(dir).length === 0) fs28.rmdirSync(dir);
80565
80554
  } catch (e) {
80566
- throw new Error(`\u65E0\u6CD5\u51C6\u5907 ${folder}\uFF1A${e instanceof Error ? e.message : String(e)}`);
80555
+ process.stderr.write(`wildcrane: \u65E0\u6CD5\u6E05\u7406 ${folder}\uFF1A${e instanceof Error ? e.message : String(e)}
80556
+ `);
80567
80557
  }
80568
80558
  }
80569
80559
  }
@@ -80579,10 +80569,10 @@ function keepOutOfGit(dir, folders2 = SKILL_FOLDERS) {
80579
80569
  fs28.writeFileSync(exclude, `${held2}${held2 && !held2.endsWith("\n") ? "\n" : ""}${missing.join("\n")}
80580
80570
  `);
80581
80571
  }
80582
- function installKanbanSkill(dir) {
80572
+ function retireKanbanSkill(dir) {
80583
80573
  try {
80584
80574
  keepOutOfGit(dir);
80585
- prepareKanbanSkill(dir);
80575
+ removeLegacyKanbanSkill(dir);
80586
80576
  } catch (e) {
80587
80577
  process.stderr.write(`wildcrane: ${e instanceof Error ? e.message : String(e)}
80588
80578
  `);
@@ -80942,7 +80932,7 @@ async function addFolder2(dir, bind, strict = false) {
80942
80932
  } catch {
80943
80933
  return { error: "authorization_write", project };
80944
80934
  }
80945
- installKanbanSkill(real);
80935
+ retireKanbanSkill(real);
80946
80936
  notify();
80947
80937
  return { added: true, project };
80948
80938
  }
package/dist/runner.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.84 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.86 — 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;
@@ -112193,8 +112193,8 @@ function status(line) {
112193
112193
  }
112194
112194
 
112195
112195
  // src/protocol.ts
112196
- var VERSION = true ? "0.6.84" : "0.0.0";
112197
- var AKB_VERSION = true ? "0.11.68" : "0.0.0";
112196
+ var VERSION = true ? "0.6.86" : "0.0.0";
112197
+ var AKB_VERSION = true ? "0.11.69" : "0.0.0";
112198
112198
  var AKB_CONTRACT = true ? 17 : 0;
112199
112199
  var EXIT_REFUSED = 10;
112200
112200
  var EXIT_OUTDATED = 11;
@@ -114328,7 +114328,7 @@ function createTail(log) {
114328
114328
  // ../cli/package.json
114329
114329
  var package_default = {
114330
114330
  name: "wildcrane",
114331
- version: "0.11.68",
114331
+ version: "0.11.69",
114332
114332
  akbContract: 17,
114333
114333
  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.",
114334
114334
  keywords: [
@@ -120673,40 +120673,30 @@ init_dress_page();
120673
120673
  import { spawnSync as spawnSync5 } from "node:child_process";
120674
120674
  import fs32 from "node:fs";
120675
120675
  import path36 from "node:path";
120676
-
120677
- // ../skill/SKILL.md
120678
- var SKILL_default = '---\nname: kanban\ndescription: Manage the file-based task board with akb. Use for creating and planning tasks, revising or implementing cards, and managing background runs; also for "what\'s running".\n---\n\n# Kanban board\n\nThe board is worked only through `akb`. Find the command for the job in `akb help` and run\nit; never do its work by hand or from memory.\n\n- **`--print` does it here**: `akb raw card revise 12 --print "drop the export"` prints the whole\n flow for that card on this board; follow it to its closing steps. Without `--print` the\n same command starts a separate agent.\n- **Keys**: never read or write API keys; the user sets them with `akb raw agent set apiKey`.\n';
120679
-
120680
- // src/kanban-skill.ts
120681
120676
  var SKILL_FOLDERS = [".claude/skills/kanban", ".agents/skills/kanban"];
120682
- var CONTENT = `${SKILL_default.trimEnd()}
120683
-
120684
- <!-- ai4kanban managed -->
120685
- `;
120686
120677
  var MANAGED = /^<!-- ai4kanban \S+ -->$/m;
120687
- function prepareKanbanSkill(root2) {
120678
+ function removeLegacyKanbanSkill(root2) {
120688
120679
  for (const folder of SKILL_FOLDERS) {
120689
- const dir = path36.join(root2, folder);
120690
- const file3 = path36.join(dir, "SKILL.md");
120691
120680
  try {
120692
- let linked = false;
120693
120681
  let at2 = root2;
120694
- for (const name of `${folder}/SKILL.md`.split("/")) {
120682
+ if (!fs32.lstatSync(at2, { throwIfNoEntry: false })?.isDirectory()) continue;
120683
+ let safe3 = true;
120684
+ const parts = `${folder}/SKILL.md`.split("/");
120685
+ for (const [i, name] of parts.entries()) {
120695
120686
  at2 = path36.join(at2, name);
120696
- if (fs32.lstatSync(at2, { throwIfNoEntry: false })?.isSymbolicLink()) linked = true;
120697
- }
120698
- const held5 = fs32.existsSync(file3) ? fs32.readFileSync(file3, "utf8") : null;
120699
- const exists = fs32.lstatSync(dir, { throwIfNoEntry: false }) !== void 0;
120700
- if (linked || exists && !MANAGED.test(held5 ?? "")) {
120701
- if (!held5?.trim()) throw new Error("\u7528\u6237\u81EA\u6709\u76EE\u5F55\u6216\u7B26\u53F7\u94FE\u63A5\u4E2D\u7F3A\u5C11\u53EF\u8BFB\u7684 SKILL.md");
120702
- continue;
120703
- }
120704
- if (held5 !== CONTENT) {
120705
- fs32.mkdirSync(dir, { recursive: true });
120706
- fs32.writeFileSync(file3, CONTENT);
120687
+ const stat = fs32.lstatSync(at2, { throwIfNoEntry: false });
120688
+ if (!stat || stat.isSymbolicLink() || (i < parts.length - 1 ? !stat.isDirectory() : !stat.isFile())) {
120689
+ safe3 = false;
120690
+ break;
120691
+ }
120707
120692
  }
120693
+ if (!safe3 || !MANAGED.test(fs32.readFileSync(at2, "utf8"))) continue;
120694
+ fs32.unlinkSync(at2);
120695
+ const dir = path36.dirname(at2);
120696
+ if (fs32.readdirSync(dir).length === 0) fs32.rmdirSync(dir);
120708
120697
  } catch (e2) {
120709
- throw new Error(`\u65E0\u6CD5\u51C6\u5907 ${folder}\uFF1A${e2 instanceof Error ? e2.message : String(e2)}`);
120698
+ process.stderr.write(`wildcrane: \u65E0\u6CD5\u6E05\u7406 ${folder}\uFF1A${e2 instanceof Error ? e2.message : String(e2)}
120699
+ `);
120710
120700
  }
120711
120701
  }
120712
120702
  }
@@ -120722,10 +120712,10 @@ function keepOutOfGit(dir, folders2 = SKILL_FOLDERS) {
120722
120712
  fs32.writeFileSync(exclude, `${held5}${held5 && !held5.endsWith("\n") ? "\n" : ""}${missing.join("\n")}
120723
120713
  `);
120724
120714
  }
120725
- function installKanbanSkill(dir) {
120715
+ function retireKanbanSkill(dir) {
120726
120716
  try {
120727
120717
  keepOutOfGit(dir);
120728
- prepareKanbanSkill(dir);
120718
+ removeLegacyKanbanSkill(dir);
120729
120719
  } catch (e2) {
120730
120720
  process.stderr.write(`wildcrane: ${e2 instanceof Error ? e2.message : String(e2)}
120731
120721
  `);
@@ -122777,11 +122767,7 @@ async function setUp(job, ws, deps, io) {
122777
122767
  const init = await akb(["raw", "init"]);
122778
122768
  if (init.code !== 0) return refusal3(init);
122779
122769
  }
122780
- try {
122781
- prepareKanbanSkill(ws.cwd);
122782
- } catch (e2) {
122783
- return e2 instanceof Error ? e2.message : String(e2);
122784
- }
122770
+ removeLegacyKanbanSkill(ws.cwd);
122785
122771
  const hook = installCommitHook(ws.cwd, ws.board);
122786
122772
  if (hook.note) io.show(`${hook.note}
122787
122773
  `);
@@ -126433,7 +126419,7 @@ async function addFolder2(dir, bind, strict = false) {
126433
126419
  } catch {
126434
126420
  return { error: "authorization_write", project };
126435
126421
  }
126436
- installKanbanSkill(real);
126422
+ retireKanbanSkill(real);
126437
126423
  notify();
126438
126424
  return { added: true, project };
126439
126425
  }
package/dist/settings.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.84 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.86 — 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;
@@ -27370,8 +27370,8 @@ async function stopExecutors() {
27370
27370
  }
27371
27371
 
27372
27372
  // src/protocol.ts
27373
- var VERSION = true ? "0.6.84" : "0.0.0";
27374
- var AKB_VERSION = true ? "0.11.68" : "0.0.0";
27373
+ var VERSION = true ? "0.6.86" : "0.0.0";
27374
+ var AKB_VERSION = true ? "0.11.69" : "0.0.0";
27375
27375
 
27376
27376
  // src/api.ts
27377
27377
  var RUNTIMES = ["claude-code", "codex", "cursor", "opencode", "kimi", "dsh", "zcode", "grok", "antigravity"];
@@ -28367,40 +28367,30 @@ function realpath2(p) {
28367
28367
  import { spawnSync as spawnSync2 } from "node:child_process";
28368
28368
  import fs13 from "node:fs";
28369
28369
  import path15 from "node:path";
28370
-
28371
- // ../skill/SKILL.md
28372
- var SKILL_default = '---\nname: kanban\ndescription: Manage the file-based task board with akb. Use for creating and planning tasks, revising or implementing cards, and managing background runs; also for "what\'s running".\n---\n\n# Kanban board\n\nThe board is worked only through `akb`. Find the command for the job in `akb help` and run\nit; never do its work by hand or from memory.\n\n- **`--print` does it here**: `akb raw card revise 12 --print "drop the export"` prints the whole\n flow for that card on this board; follow it to its closing steps. Without `--print` the\n same command starts a separate agent.\n- **Keys**: never read or write API keys; the user sets them with `akb raw agent set apiKey`.\n';
28373
-
28374
- // src/kanban-skill.ts
28375
28370
  var SKILL_FOLDERS = [".claude/skills/kanban", ".agents/skills/kanban"];
28376
- var CONTENT = `${SKILL_default.trimEnd()}
28377
-
28378
- <!-- ai4kanban managed -->
28379
- `;
28380
28371
  var MANAGED = /^<!-- ai4kanban \S+ -->$/m;
28381
- function prepareKanbanSkill(root2) {
28372
+ function removeLegacyKanbanSkill(root2) {
28382
28373
  for (const folder of SKILL_FOLDERS) {
28383
- const dir = path15.join(root2, folder);
28384
- const file2 = path15.join(dir, "SKILL.md");
28385
28374
  try {
28386
- let linked = false;
28387
28375
  let at = root2;
28388
- for (const name of `${folder}/SKILL.md`.split("/")) {
28376
+ if (!fs13.lstatSync(at, { throwIfNoEntry: false })?.isDirectory()) continue;
28377
+ let safe2 = true;
28378
+ const parts = `${folder}/SKILL.md`.split("/");
28379
+ for (const [i, name] of parts.entries()) {
28389
28380
  at = path15.join(at, name);
28390
- if (fs13.lstatSync(at, { throwIfNoEntry: false })?.isSymbolicLink()) linked = true;
28391
- }
28392
- const held2 = fs13.existsSync(file2) ? fs13.readFileSync(file2, "utf8") : null;
28393
- const exists = fs13.lstatSync(dir, { throwIfNoEntry: false }) !== void 0;
28394
- if (linked || exists && !MANAGED.test(held2 ?? "")) {
28395
- if (!held2?.trim()) throw new Error("\u7528\u6237\u81EA\u6709\u76EE\u5F55\u6216\u7B26\u53F7\u94FE\u63A5\u4E2D\u7F3A\u5C11\u53EF\u8BFB\u7684 SKILL.md");
28396
- continue;
28397
- }
28398
- if (held2 !== CONTENT) {
28399
- fs13.mkdirSync(dir, { recursive: true });
28400
- fs13.writeFileSync(file2, CONTENT);
28381
+ const stat = fs13.lstatSync(at, { throwIfNoEntry: false });
28382
+ if (!stat || stat.isSymbolicLink() || (i < parts.length - 1 ? !stat.isDirectory() : !stat.isFile())) {
28383
+ safe2 = false;
28384
+ break;
28385
+ }
28401
28386
  }
28387
+ if (!safe2 || !MANAGED.test(fs13.readFileSync(at, "utf8"))) continue;
28388
+ fs13.unlinkSync(at);
28389
+ const dir = path15.dirname(at);
28390
+ if (fs13.readdirSync(dir).length === 0) fs13.rmdirSync(dir);
28402
28391
  } catch (e) {
28403
- throw new Error(`\u65E0\u6CD5\u51C6\u5907 ${folder}\uFF1A${e instanceof Error ? e.message : String(e)}`);
28392
+ process.stderr.write(`wildcrane: \u65E0\u6CD5\u6E05\u7406 ${folder}\uFF1A${e instanceof Error ? e.message : String(e)}
28393
+ `);
28404
28394
  }
28405
28395
  }
28406
28396
  }
@@ -28416,10 +28406,10 @@ function keepOutOfGit(dir, folders2 = SKILL_FOLDERS) {
28416
28406
  fs13.writeFileSync(exclude, `${held2}${held2 && !held2.endsWith("\n") ? "\n" : ""}${missing.join("\n")}
28417
28407
  `);
28418
28408
  }
28419
- function installKanbanSkill(dir) {
28409
+ function retireKanbanSkill(dir) {
28420
28410
  try {
28421
28411
  keepOutOfGit(dir);
28422
- prepareKanbanSkill(dir);
28412
+ removeLegacyKanbanSkill(dir);
28423
28413
  } catch (e) {
28424
28414
  process.stderr.write(`wildcrane: ${e instanceof Error ? e.message : String(e)}
28425
28415
  `);
@@ -30409,7 +30399,7 @@ function createTail(log) {
30409
30399
  // ../cli/package.json
30410
30400
  var package_default = {
30411
30401
  name: "wildcrane",
30412
- version: "0.11.68",
30402
+ version: "0.11.69",
30413
30403
  akbContract: 17,
30414
30404
  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.",
30415
30405
  keywords: [
@@ -33683,7 +33673,7 @@ async function addFolder2(dir, bind, strict = false) {
33683
33673
  } catch {
33684
33674
  return { error: "authorization_write", project };
33685
33675
  }
33686
- installKanbanSkill(real);
33676
+ retireKanbanSkill(real);
33687
33677
  notify();
33688
33678
  return { added: true, project };
33689
33679
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wildcrane-runner",
3
- "version": "0.6.84",
3
+ "version": "0.6.86",
4
4
  "description": "WildCrane's Local Runner \u2014 connects this computer to WildCrane and runs its jobs on your local Claude Code, Codex, OpenCode or Cursor.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://wildcrane.ai/",