wildcrane-runner 0.6.13 → 0.6.15

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 +1 @@
1
- {"name":"wildcrane","version":"0.11.10","akbContract":5,"type":"module","private":true}
1
+ {"name":"wildcrane","version":"0.11.12","akbContract":5,"type":"module","private":true}
package/dist/launcher.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.13 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.15 — 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
 
@@ -107,7 +107,7 @@ function status(line) {
107
107
  }
108
108
 
109
109
  // src/protocol.ts
110
- var VERSION = true ? "0.6.13" : "0.0.0";
110
+ var VERSION = true ? "0.6.15" : "0.0.0";
111
111
  var EXIT_REFUSED = 10;
112
112
  var EXIT_OUTDATED = 11;
113
113
  var EXIT_UPDATE = 12;
package/dist/runner.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.13 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.15 — 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;
@@ -84435,8 +84435,8 @@ function status(line) {
84435
84435
  }
84436
84436
 
84437
84437
  // src/protocol.ts
84438
- var VERSION = true ? "0.6.13" : "0.0.0";
84439
- var AKB_VERSION = true ? "0.11.10" : "0.0.0";
84438
+ var VERSION = true ? "0.6.15" : "0.0.0";
84439
+ var AKB_VERSION = true ? "0.11.12" : "0.0.0";
84440
84440
  var AKB_CONTRACT = true ? 5 : 0;
84441
84441
  var EXIT_REFUSED = 10;
84442
84442
  var EXIT_OUTDATED = 11;
@@ -85923,7 +85923,7 @@ function createTail(log) {
85923
85923
  // ../cli/package.json
85924
85924
  var package_default = {
85925
85925
  name: "wildcrane",
85926
- version: "0.11.10",
85926
+ version: "0.11.12",
85927
85927
  akbContract: 5,
85928
85928
  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.",
85929
85929
  keywords: [
@@ -87018,12 +87018,27 @@ setBoardRoot(process.cwd());
87018
87018
  // ../cli/src/lib/agent/worktree.ts
87019
87019
  import { spawnSync as spawnSync2 } from "node:child_process";
87020
87020
  var MAX_OUTPUT = 64 * 1024 * 1024;
87021
+ var gitLimits = { timeoutMs: 3e4 };
87022
+ var GitTimeoutError = class extends Error {
87023
+ };
87024
+ function spawnGit(args, options) {
87025
+ const out = spawnSync2("git", args, {
87026
+ ...options,
87027
+ encoding: "utf8",
87028
+ stdio: ["ignore", "pipe", "pipe"],
87029
+ timeout: gitLimits.timeoutMs,
87030
+ killSignal: "SIGKILL"
87031
+ });
87032
+ if (out.error?.code === "ETIMEDOUT") throw new GitTimeoutError(`Git ${args[0]} timed out after ${gitLimits.timeoutMs / 1e3}s; the command was killed.`);
87033
+ return out;
87034
+ }
87021
87035
  function git(args, cwd = REPO_ROOT) {
87022
87036
  try {
87023
- const out = spawnSync2("git", args, { cwd, encoding: "utf8", maxBuffer: MAX_OUTPUT, windowsHide: true });
87037
+ const out = spawnGit(args, { cwd, encoding: "utf8", maxBuffer: MAX_OUTPUT, windowsHide: true });
87024
87038
  if (out.error || out.status !== 0) return null;
87025
87039
  return out.stdout;
87026
- } catch {
87040
+ } catch (error) {
87041
+ if (error instanceof GitTimeoutError) throw error;
87027
87042
  return null;
87028
87043
  }
87029
87044
  }
@@ -92090,16 +92105,25 @@ function prepareKanbanSkill(root) {
92090
92105
  import { spawnSync as spawnSync6 } from "node:child_process";
92091
92106
  import fs27 from "node:fs";
92092
92107
  import path29 from "node:path";
92108
+
92109
+ // ../cli/src/lib/agent/landing-lock.ts
92110
+ var landingLimits = { staleMs: 5 * 6e4 };
92111
+
92112
+ // ../cli/src/lib/skill/hook.ts
92093
92113
  var MARKER = "# ai4kanban commit guard";
92094
92114
  var MARKER_LINE = new RegExp(`^${MARKER}\\b`, "m");
92095
92115
  var CHECK = [
92096
92116
  "try{",
92097
92117
  'const[top,branch]=require("child_process")',
92098
- '.execFileSync("git",["rev-parse","--show-toplevel","--abbrev-ref","HEAD"],{encoding:"utf8"}).trim().split("\\n");',
92118
+ '.execFileSync("git",["rev-parse","--show-toplevel","--abbrev-ref","HEAD"],{encoding:"utf8",timeout:3000,killSignal:"SIGKILL"}).trim().split("\\n");',
92099
92119
  'if(/\\/\\.akb\\/worktrees\\//.test(top+"/"))process.exit(0);',
92100
92120
  'const d=(JSON.parse(require("fs").readFileSync(process.argv[1],"utf8")).deliveries||[])',
92101
- '.find((x)=>x&&x.status==="active"&&x.commitMode==="auto"&&x.targetBranch===branch&&(!x.landing||x.landing.status!=="landed"));',
92121
+ '.find((x)=>x&&x.status==="active"&&x.commitMode==="auto"&&x.targetBranch===branch&&x.landing&&x.landing.status==="landing");',
92102
92122
  "if(!d)process.exit(0);",
92123
+ 'const fs=require("fs"),lock=process.argv[2],entries=fs.readdirSync(lock);',
92124
+ `if(Date.now()-fs.statSync(lock).mtimeMs>${landingLimits.staleMs})process.exit(0);`,
92125
+ "if(entries.length!==1||!/^\\d+-[a-f0-9-]{36}$/.test(entries[0]))process.exit(0);",
92126
+ 'try{process.kill(Number(entries[0].split("-")[0]),0)}catch(e){if(e.code!=="EPERM")process.exit(0)}',
92103
92127
  "process.stderr.write(",
92104
92128
  '"ai4kanban: delivery "+d.deliveryId+" is landing #"+d.cardId+" on "+branch+", so a commit here moves the target under it\\n"',
92105
92129
  '+" \u2014 commit on another branch, or `git commit --no-verify` to commit anyway.\\n");',
@@ -92107,7 +92131,7 @@ var CHECK = [
92107
92131
  "}catch(e){process.exit(0)}"
92108
92132
  ].join("");
92109
92133
  var quoted = (p2) => `"${p2.replace(/(["$`\\])/g, "\\$1")}"`;
92110
- var guardLine = (sessions) => `if command -v node >/dev/null 2>&1; then node -e '${CHECK}' ${quoted(sessions)} || exit 1; fi`;
92134
+ var guardLine = (sessions) => `if command -v node >/dev/null 2>&1; then node -e '${CHECK}' ${quoted(sessions)} ${quoted(path29.join(path29.dirname(sessions), SESSIONS_FOLDER, ".landing.lock"))} || exit 1; fi`;
92111
92135
  function hookScript(sessions) {
92112
92136
  return [
92113
92137
  "#!/bin/sh",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wildcrane-runner",
3
- "version": "0.6.13",
3
+ "version": "0.6.15",
4
4
  "description": "WildCrane's Local Runner — connects this computer to WildCrane and runs its jobs on your local Claude Code, Codex, OpenCode or Cursor.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "homepage": "https://wildcrane.ai/",