wildcrane-runner 0.6.119 → 0.6.121

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.101","akbContract":34,"type":"module","private":true}
1
+ {"name":"wildcrane","version":"0.11.103","akbContract":36,"type":"module","private":true}
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.119 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.121 — 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.119 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.121 — 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;
@@ -27512,7 +27512,7 @@ function rootAbove(board) {
27512
27512
  var NESTED_STATE = /(^|[/\\])\.akb[/\\](?:(?:boards|hidden-boards)[/\\])?\.akb(?=[/\\]|$)/;
27513
27513
  var InvalidBoardStatePath = class extends BoardError {
27514
27514
  constructor(file, state, id) {
27515
- const use = state ? `Use ${state}${id ? ` or an .assets/${id}/\u2026 reference` : ""}.` : "Use the board\u2019s project-local .akb/hidden-boards/ or .akb/boards/ directory.";
27515
+ const use = state ? `Use ${state}${id ? ` or an .assets/${id}/\u2026 reference` : ""}.` : "Use the board\u2019s project-local state directory.";
27516
27516
  super(`Invalid nested board state path: ${file}. ${use}`, { kind: "board-state-path" });
27517
27517
  }
27518
27518
  };
@@ -27532,11 +27532,14 @@ function stateLayout(board, root) {
27532
27532
  }
27533
27533
  const hiddenPrefix = `.akb${path.sep}`;
27534
27534
  const hidden = relative.startsWith(hiddenPrefix);
27535
- const state = path.join(project, ".akb", hidden ? "hidden-boards" : "boards", (hidden ? relative.slice(hiddenPrefix.length) : relative) || "_root");
27535
+ const runnerBoard = relative === `${hiddenPrefix}kanban`;
27536
+ const akb = path.join(project, ".akb");
27537
+ const state = runnerBoard ? path.join(akb, "state") : hidden ? path.join(akb, "hidden-boards", relative.slice(hiddenPrefix.length)) : path.join(akb, "boards", relative || "_root");
27536
27538
  assertBoardStatePath(state, state);
27537
27539
  assertBoardStatePath(realPathOf(state), state);
27538
- const legacy = hidden ? path.join(project, ".akb", "boards", relative) : null;
27539
- return { state, legacy };
27540
+ const legacy = hidden ? [path.join(akb, "boards", relative)] : [];
27541
+ if (runnerBoard) legacy.push(path.join(akb, "hidden-boards", "kanban"));
27542
+ return { project, state, legacy, runnerBoard };
27540
27543
  }
27541
27544
  function projectStateDir(board, root = stateRootOf(board)) {
27542
27545
  return stateLayout(board, root).state;
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.119 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.121 — 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;
@@ -26772,7 +26772,7 @@ function rootAbove(board) {
26772
26772
  var NESTED_STATE = /(^|[/\\])\.akb[/\\](?:(?:boards|hidden-boards)[/\\])?\.akb(?=[/\\]|$)/;
26773
26773
  var InvalidBoardStatePath = class extends BoardError {
26774
26774
  constructor(file, state, id) {
26775
- const use = state ? `Use ${state}${id ? ` or an .assets/${id}/\u2026 reference` : ""}.` : "Use the board\u2019s project-local .akb/hidden-boards/ or .akb/boards/ directory.";
26775
+ const use = state ? `Use ${state}${id ? ` or an .assets/${id}/\u2026 reference` : ""}.` : "Use the board\u2019s project-local state directory.";
26776
26776
  super(`Invalid nested board state path: ${file}. ${use}`, { kind: "board-state-path" });
26777
26777
  }
26778
26778
  };
@@ -26792,11 +26792,14 @@ function stateLayout(board, root) {
26792
26792
  }
26793
26793
  const hiddenPrefix = `.akb${path.sep}`;
26794
26794
  const hidden = relative.startsWith(hiddenPrefix);
26795
- const state = path.join(project, ".akb", hidden ? "hidden-boards" : "boards", (hidden ? relative.slice(hiddenPrefix.length) : relative) || "_root");
26795
+ const runnerBoard = relative === `${hiddenPrefix}kanban`;
26796
+ const akb = path.join(project, ".akb");
26797
+ const state = runnerBoard ? path.join(akb, "state") : hidden ? path.join(akb, "hidden-boards", relative.slice(hiddenPrefix.length)) : path.join(akb, "boards", relative || "_root");
26796
26798
  assertBoardStatePath(state, state);
26797
26799
  assertBoardStatePath(realPathOf(state), state);
26798
- const legacy = hidden ? path.join(project, ".akb", "boards", relative) : null;
26799
- return { state, legacy };
26800
+ const legacy = hidden ? [path.join(akb, "boards", relative)] : [];
26801
+ if (runnerBoard) legacy.push(path.join(akb, "hidden-boards", "kanban"));
26802
+ return { project, state, legacy, runnerBoard };
26800
26803
  }
26801
26804
  function projectStateDir(board, root = stateRootOf(board)) {
26802
26805
  return stateLayout(board, root).state;
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.119 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.121 — 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;
@@ -152064,8 +152064,9 @@ import fs4 from "node:fs";
152064
152064
  import path5 from "node:path";
152065
152065
 
152066
152066
  // ../cli/src/lib/machine/project.ts
152067
- import { randomUUID } from "node:crypto";
152067
+ import { createHash as createHash2, randomUUID } from "node:crypto";
152068
152068
  import fs3 from "node:fs";
152069
+ import os4 from "node:os";
152069
152070
  import path4 from "node:path";
152070
152071
  var RECORD = "board.json";
152071
152072
  var SESSIONS_FILE = "sessions.json";
@@ -152113,7 +152114,7 @@ function rootAbove(board) {
152113
152114
  var NESTED_STATE = /(^|[/\\])\.akb[/\\](?:(?:boards|hidden-boards)[/\\])?\.akb(?=[/\\]|$)/;
152114
152115
  var InvalidBoardStatePath = class extends BoardError {
152115
152116
  constructor(file2, state, id2) {
152116
- const use = state ? `Use ${state}${id2 ? ` or an .assets/${id2}/\u2026 reference` : ""}.` : "Use the board\u2019s project-local .akb/hidden-boards/ or .akb/boards/ directory.";
152117
+ const use = state ? `Use ${state}${id2 ? ` or an .assets/${id2}/\u2026 reference` : ""}.` : "Use the board\u2019s project-local state directory.";
152117
152118
  super(`Invalid nested board state path: ${file2}. ${use}`, { kind: "board-state-path" });
152118
152119
  }
152119
152120
  };
@@ -152133,36 +152134,91 @@ function stateLayout(board, root2) {
152133
152134
  }
152134
152135
  const hiddenPrefix = `.akb${path4.sep}`;
152135
152136
  const hidden = relative.startsWith(hiddenPrefix);
152136
- const state = path4.join(project, ".akb", hidden ? "hidden-boards" : "boards", (hidden ? relative.slice(hiddenPrefix.length) : relative) || "_root");
152137
+ const runnerBoard = relative === `${hiddenPrefix}kanban`;
152138
+ const akb = path4.join(project, ".akb");
152139
+ const state = runnerBoard ? path4.join(akb, "state") : hidden ? path4.join(akb, "hidden-boards", relative.slice(hiddenPrefix.length)) : path4.join(akb, "boards", relative || "_root");
152137
152140
  assertBoardStatePath(state, state);
152138
152141
  assertBoardStatePath(realPathOf(state), state);
152139
- const legacy2 = hidden ? path4.join(project, ".akb", "boards", relative) : null;
152140
- return { state, legacy: legacy2 };
152142
+ const legacy2 = hidden ? [path4.join(akb, "boards", relative)] : [];
152143
+ if (runnerBoard) legacy2.push(path4.join(akb, "hidden-boards", "kanban"));
152144
+ return { project, state, legacy: legacy2, runnerBoard };
152141
152145
  }
152142
152146
  function projectStateDir(board, root2 = stateRootOf(board)) {
152143
152147
  return stateLayout(board, root2).state;
152144
152148
  }
152145
152149
  function hasLegacyProjectState(board, root2 = stateRootOf(board)) {
152146
152150
  const { legacy: legacy2 } = stateLayout(board, root2);
152147
- return !!legacy2 && !!fs3.lstatSync(legacy2, { throwIfNoEntry: false });
152151
+ return legacy2.some((dir) => fs3.lstatSync(dir, { throwIfNoEntry: false }));
152152
+ }
152153
+ function hasRunningSession(dir) {
152154
+ try {
152155
+ const store = JSON.parse(fs3.readFileSync(path4.join(dir, SESSIONS_FILE), "utf8"));
152156
+ const runs = Array.isArray(store?.runs) ? store.runs : store?.live;
152157
+ return Array.isArray(runs) && runs.some((run3) => run3?.status === "running" && [run3.pid, run3.agentPid].some(isLivePid));
152158
+ } catch (error62) {
152159
+ if (missing(error62) || error62 instanceof SyntaxError) return false;
152160
+ throw error62;
152161
+ }
152162
+ }
152163
+ function isLivePid(pid) {
152164
+ if (!Number.isSafeInteger(pid) || pid < 1) return false;
152165
+ try {
152166
+ process.kill(pid, 0);
152167
+ return true;
152168
+ } catch (error62) {
152169
+ return error62.code === "EPERM";
152170
+ }
152171
+ }
152172
+ function hasRunnerJob(project) {
152173
+ const home4 = process.env.WILDCRANE_HOME || path4.join(os4.homedir(), ".wildcrane");
152174
+ const prefix = `${createHash2("sha256").update(project).digest("hex")}.`;
152175
+ try {
152176
+ return fs3.readdirSync(path4.join(home4, "holds")).some((name) => name.startsWith(prefix) && isLivePid(Number(name.slice(prefix.length))));
152177
+ } catch (error62) {
152178
+ if (missing(error62)) return false;
152179
+ throw error62;
152180
+ }
152148
152181
  }
152149
152182
  function migrateProjectState(board, root2 = stateRootOf(board)) {
152150
- const { state, legacy: legacy2 } = stateLayout(board, root2);
152151
- if (!legacy2 || !fs3.lstatSync(legacy2, { throwIfNoEntry: false })) return state;
152152
- const conflict = () => new BoardError(`Board state exists at both ${legacy2} and ${state}. Stop the CLI and Runner, compare both directories, and move the legacy directory aside after reconciling its contents.`, { kind: "board-state-conflict" });
152183
+ const { project, state, legacy: legacy2, runnerBoard } = stateLayout(board, root2);
152184
+ const present = legacy2.filter((dir) => {
152185
+ const entry = fs3.lstatSync(dir, { throwIfNoEntry: false });
152186
+ if (!entry) return false;
152187
+ if (!entry.isDirectory() || realPathOf(dir) !== dir) {
152188
+ throw new BoardError(`Legacy board state must be a regular directory: ${dir}. Move the saved state to ${state} before restarting.`, { kind: "board-state-path" });
152189
+ }
152190
+ return true;
152191
+ });
152192
+ if (!present.length) return state;
152193
+ if (runnerBoard && hasRunnerJob(project) || [...present, state].some(hasRunningSession)) {
152194
+ throw new BoardError(`Board state migration is waiting for the running tasks in ${project} to exit.`, { kind: "board-state-busy" });
152195
+ }
152196
+ const sources3 = present.filter((dir) => {
152197
+ try {
152198
+ fs3.rmdirSync(dir);
152199
+ return false;
152200
+ } catch (error62) {
152201
+ if (missing(error62)) return false;
152202
+ if (["ENOTEMPTY", "EEXIST"].includes(error62.code ?? "")) return true;
152203
+ throw error62;
152204
+ }
152205
+ });
152206
+ const conflict = (dirs2) => new BoardError(`Board state exists at ${dirs2.join(" and ")}. Compare the saved state before moving it to ${state}.`, { kind: "board-state-conflict" });
152207
+ if (sources3.length > 1) throw conflict(sources3);
152208
+ const source2 = sources3[0];
152209
+ if (!source2) return state;
152153
152210
  if (fs3.lstatSync(state, { throwIfNoEntry: false })) {
152154
- if (fs3.lstatSync(legacy2, { throwIfNoEntry: false })) throw conflict();
152211
+ if (fs3.lstatSync(source2, { throwIfNoEntry: false })) throw conflict([source2, state]);
152155
152212
  return state;
152156
152213
  }
152157
- if (realPathOf(legacy2) !== legacy2) {
152158
- throw new BoardError(`Legacy board state points through a symbolic link: ${legacy2}. Move the saved state to ${state} and remove the old link before restarting.`, { kind: "board-state-path" });
152159
- }
152160
152214
  fs3.mkdirSync(path4.dirname(state), { recursive: true });
152161
152215
  try {
152162
- fs3.renameSync(legacy2, state);
152216
+ fs3.renameSync(source2, state);
152163
152217
  } catch (error62) {
152164
- if (missing(error62) && !fs3.lstatSync(legacy2, { throwIfNoEntry: false }) && fs3.existsSync(state)) return state;
152165
- if (fs3.lstatSync(legacy2, { throwIfNoEntry: false }) && fs3.lstatSync(state, { throwIfNoEntry: false })) throw conflict();
152218
+ if (fs3.lstatSync(state, { throwIfNoEntry: false })) {
152219
+ if (fs3.lstatSync(source2, { throwIfNoEntry: false })) throw conflict([source2, state]);
152220
+ if (missing(error62)) return state;
152221
+ }
152166
152222
  throw error62;
152167
152223
  }
152168
152224
  return state;
@@ -153354,9 +153410,9 @@ function goalRoute(discussion, goal) {
153354
153410
  }
153355
153411
 
153356
153412
  // src/protocol.ts
153357
- var VERSION = true ? "0.6.119" : "0.0.0";
153358
- var AKB_VERSION = true ? "0.11.101" : "0.0.0";
153359
- var AKB_CONTRACT = true ? 34 : 0;
153413
+ var VERSION = true ? "0.6.121" : "0.0.0";
153414
+ var AKB_VERSION = true ? "0.11.103" : "0.0.0";
153415
+ var AKB_CONTRACT = true ? 36 : 0;
153360
153416
 
153361
153417
  // src/secrets.ts
153362
153418
  import fs20 from "node:fs";
@@ -153368,13 +153424,13 @@ import fs19 from "node:fs";
153368
153424
  // ../cli/src/lib/agent/harnesses/antigravity.ts
153369
153425
  import fs15 from "node:fs";
153370
153426
  import path15 from "node:path";
153371
- import { createHash as createHash4 } from "node:crypto";
153427
+ import { createHash as createHash5 } from "node:crypto";
153372
153428
  import { spawnSync as spawnSync4 } from "node:child_process";
153373
153429
 
153374
153430
  // ../cli/src/lib/agent/locate.ts
153375
153431
  import { spawn, spawnSync as spawnSync3 } from "node:child_process";
153376
153432
  import fs9 from "node:fs";
153377
- import os4 from "node:os";
153433
+ import os5 from "node:os";
153378
153434
  import path9 from "node:path";
153379
153435
 
153380
153436
  // ../cli/src/lib/agent/installed.ts
@@ -153577,7 +153633,7 @@ function latestIn(parent, tail = "") {
153577
153633
  }
153578
153634
  var env = (name) => process.env[name]?.trim() ?? "";
153579
153635
  function commonDirs() {
153580
- const home4 = os4.homedir();
153636
+ const home4 = os5.homedir();
153581
153637
  const under = (...parts) => path9.join(home4, ...parts);
153582
153638
  const nodes = (root2, tail = []) => root2 ? folders(root2).map((version2) => path9.join(root2, version2, ...tail)) : [];
153583
153639
  if (WINDOWS3) {
@@ -153684,7 +153740,7 @@ function copyEnv(file2, given = process.env) {
153684
153740
  if (!path9.isAbsolute(file2)) return given;
153685
153741
  return { ...given, PATH: [path9.dirname(file2), given.PATH].filter(Boolean).join(path9.delimiter) };
153686
153742
  }
153687
- var probeOptions = (file2) => ({ cwd: os4.tmpdir(), env: copyEnv(file2), windowsHide: true, shell: false });
153743
+ var probeOptions = (file2) => ({ cwd: os5.tmpdir(), env: copyEnv(file2), windowsHide: true, shell: false });
153688
153744
  function probe(file2) {
153689
153745
  const key = keyOf(file2);
153690
153746
  const start = spawnable(file2, ["--version"], { ...probeOptions(file2), stdio: ["ignore", "pipe", "pipe"], timeout: PROBE_MS });
@@ -153784,7 +153840,7 @@ function modelsIn(file2, pick3, salt = "") {
153784
153840
  }
153785
153841
 
153786
153842
  // ../cli/src/lib/agent/harnesses/types.ts
153787
- import { createHash as createHash2 } from "node:crypto";
153843
+ import { createHash as createHash3 } from "node:crypto";
153788
153844
  import fs10 from "node:fs";
153789
153845
  import path10 from "node:path";
153790
153846
  function namesFlag(argv, flags2) {
@@ -153807,7 +153863,7 @@ var MCP_CONFIG = {
153807
153863
  help: "A JSON file of `mcpServers`, as Claude Code's --mcp-config takes. Empty opens no servers."
153808
153864
  };
153809
153865
  function machineFile(name, text4) {
153810
- const suffix = createHash2("sha256").update(text4).digest("hex").slice(0, 16);
153866
+ const suffix = createHash3("sha256").update(text4).digest("hex").slice(0, 16);
153811
153867
  const file2 = path10.join(machineHome(), "prompts", `${path10.parse(name).name}-${suffix}${path10.extname(name)}`);
153812
153868
  try {
153813
153869
  if (fs10.readFileSync(file2, "utf8") === text4) return file2;
@@ -154197,9 +154253,9 @@ function codexFailure(raw, fallback) {
154197
154253
  // ../cli/src/lib/agent/wire/acp-cost.ts
154198
154254
  import fs13 from "node:fs";
154199
154255
  import path13 from "node:path";
154200
- import { createHash as createHash3 } from "node:crypto";
154256
+ import { createHash as createHash4 } from "node:crypto";
154201
154257
  function acpCostFile(tool, cwd, session) {
154202
- const key = createHash3("sha256").update(JSON.stringify([tool, cwd, session])).digest("hex");
154258
+ const key = createHash4("sha256").update(JSON.stringify([tool, cwd, session])).digest("hex");
154203
154259
  return path13.join(machineHome(), "usage", "acp", `${key}.json`);
154204
154260
  }
154205
154261
  function readAcpCost(file2) {
@@ -154568,8 +154624,8 @@ function createTail(log) {
154568
154624
  // ../cli/package.json
154569
154625
  var package_default = {
154570
154626
  name: "wildcrane",
154571
- version: "0.11.101",
154572
- akbContract: 34,
154627
+ version: "0.11.103",
154628
+ akbContract: 36,
154573
154629
  canonicalCommands: true,
154574
154630
  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.",
154575
154631
  keywords: [
@@ -155472,7 +155528,7 @@ function systemPrompt(text4, _argv, env2) {
155472
155528
  const rule = `${text4}
155473
155529
 
155474
155530
  The task working directory is ${env2.PWD ?? process.cwd()}. Use it as the base for project files and commands. This additional workspace contains only language rules; do not write task output here.`;
155475
- const hash2 = createHash4("sha256").update(rule).digest("hex").slice(0, 16);
155531
+ const hash2 = createHash5("sha256").update(rule).digest("hex").slice(0, 16);
155476
155532
  const root2 = path15.join(machineHome(), "prompts", `antigravity-${hash2}`);
155477
155533
  const file2 = path15.join(root2, ".agents", "rules", "language.md");
155478
155534
  fs15.mkdirSync(path15.dirname(file2), { recursive: true });
@@ -159359,7 +159415,7 @@ import fs25 from "node:fs";
159359
159415
  import path26 from "node:path";
159360
159416
 
159361
159417
  // ../cli/src/lib/agent/cloud-studios.ts
159362
- import { createHash as createHash5, randomUUID as randomUUID5 } from "node:crypto";
159418
+ import { createHash as createHash6, randomUUID as randomUUID5 } from "node:crypto";
159363
159419
  import { setTimeout as delay2 } from "node:timers/promises";
159364
159420
  import fs24 from "node:fs";
159365
159421
  import path25 from "node:path";
@@ -159786,7 +159842,7 @@ var versionFile = (id2, version2) => path25.join(root(), "versions", `${safe(id2
159786
159842
  var listFile = (project) => path25.join(root(), "lists", `${safe(project)}.json`);
159787
159843
  var pinFile = (task) => path25.join(root(), "tasks", `${safe(task)}.json`);
159788
159844
  var sessionDir = (task) => path25.join(root(), "sessions", safe(task));
159789
- var sessionFileOf = (task, session) => path25.join(sessionDir(task), createHash5("sha256").update(session).digest("hex") + ".json");
159845
+ var sessionFileOf = (task, session) => path25.join(sessionDir(task), createHash6("sha256").update(session).digest("hex") + ".json");
159790
159846
  var skillDir = (id2, version2) => path25.join(root(), "bundles", safe(id2) + "@" + version2);
159791
159847
  function readJson(file2) {
159792
159848
  try {
@@ -159805,7 +159861,7 @@ function writeJson(file2, value) {
159805
159861
  fs24.rmSync(tmp, { force: true });
159806
159862
  }
159807
159863
  }
159808
- var filesHash = (files) => createHash5("sha256").update(hashInput(files)).digest("hex");
159864
+ var filesHash = (files) => createHash6("sha256").update(hashInput(files)).digest("hex");
159809
159865
  var readVersion2 = (id2, version2) => {
159810
159866
  const held5 = readJson(versionFile(id2, version2));
159811
159867
  return held5?.id === id2 && held5.version === version2 && isStudioFiles(held5.files) && (!held5.filesSha256 || filesHash(held5.files) === held5.filesSha256) ? held5 : null;
@@ -159837,7 +159893,7 @@ function saveStudioSession(task, session, pin) {
159837
159893
  if (!fs24.existsSync(file2)) writeJson(file2, pin);
159838
159894
  }
159839
159895
  function runtimeContextFile(task, runtime, session) {
159840
- const key = createHash5("sha256").update(JSON.stringify([runtime, session])).digest("hex");
159896
+ const key = createHash6("sha256").update(JSON.stringify([runtime, session])).digest("hex");
159841
159897
  return path25.join(sessionDir(task), "context", key + ".json");
159842
159898
  }
159843
159899
  function readRuntimeContext(task, runtime, session) {
@@ -159924,7 +159980,7 @@ async function cachedPackage(held5, pack, download2) {
159924
159980
  const read5 = await download2(pack.downloadUrl, pack.zipBytes);
159925
159981
  if (!read5.ok) return read5;
159926
159982
  const zip = read5.value;
159927
- if (zip.length !== pack.zipBytes || createHash5("sha256").update(zip).digest("hex") !== pack.zipSha256) return invalid("the Studio ZIP digest");
159983
+ if (zip.length !== pack.zipBytes || createHash6("sha256").update(zip).digest("hex") !== pack.zipSha256) return invalid("the Studio ZIP digest");
159928
159984
  let files;
159929
159985
  try {
159930
159986
  files = decodeStudioZip(zip);
@@ -160648,7 +160704,7 @@ async function stopConnection(root2, timeout) {
160648
160704
 
160649
160705
  // src/flow.ts
160650
160706
  import fs64 from "node:fs";
160651
- import os7 from "node:os";
160707
+ import os8 from "node:os";
160652
160708
  import path66 from "node:path";
160653
160709
  import { isDeepStrictEqual as isDeepStrictEqual2 } from "node:util";
160654
160710
 
@@ -164683,7 +164739,7 @@ import fs50 from "node:fs";
164683
164739
  import path50 from "node:path";
164684
164740
 
164685
164741
  // ../cli/src/lib/agent/runtime-context.ts
164686
- import { createHash as createHash6 } from "node:crypto";
164742
+ import { createHash as createHash7 } from "node:crypto";
164687
164743
 
164688
164744
  // ../cli/node_modules/zod/v4/classic/external.js
164689
164745
  var external_exports = {};
@@ -184521,7 +184577,7 @@ function reviewBoundary(review, assigned, studio2 = []) {
184521
184577
  }
184522
184578
 
184523
184579
  // ../cli/src/lib/agent/runtime-context.ts
184524
- var contextFingerprint = (text4) => createHash6("sha256").update(text4).digest("hex");
184580
+ var contextFingerprint = (text4) => createHash7("sha256").update(text4).digest("hex");
184525
184581
  function contextUpdate(previous, blocks) {
184526
184582
  const sent = { ...previous };
184527
184583
  const parts = [];
@@ -184726,7 +184782,7 @@ function cmdMemoryFile(askedName) {
184726
184782
 
184727
184783
  // ../cli/src/commands/inspect.ts
184728
184784
  import fs52 from "node:fs";
184729
- import os5 from "node:os";
184785
+ import os6 from "node:os";
184730
184786
  import path52 from "node:path";
184731
184787
  function cmdInspect(id2) {
184732
184788
  const findings = [];
@@ -184781,12 +184837,13 @@ function cmdInspect(id2) {
184781
184837
  records.push(...fact("delivery", () => (store.deliveries ?? []).filter((held6) => held6.cardId === id2), []));
184782
184838
  const held5 = [...new Map(records.map((held6) => [held6.deliveryId, held6])).values()].sort((a2, b2) => b2.startedAt - a2.startedAt)[0];
184783
184839
  const job = executionOf()?.job;
184784
- const checkpoint = job ? read5("recovery", path52.join(process.env.WILDCRANE_HOME || os5.homedir() + "/.wildcrane", "checkpoints", `${encodeURIComponent(job)}.json`), null) : null;
184840
+ const checkpoint = job ? read5("recovery", path52.join(process.env.WILDCRANE_HOME || os6.homedir() + "/.wildcrane", "checkpoints", `${encodeURIComponent(job)}.json`), null) : null;
184785
184841
  const delivery = fact("delivery", () => held5 ? { id: held5.deliveryId, status: held5.status, directory: held5.worktree ?? REPO_ROOT, completedSteps: (held5.completions ?? []).map((c2) => c2.step) } : null, null);
184786
184842
  const recovery = fact("recovery", () => checkpoint ? { pendingOperations: checkpoint.pending ?? [], submitted: checkpoint.submitted ?? null } : null, null);
184787
184843
  const result = {
184788
184844
  id: id2,
184789
184845
  card,
184846
+ asset_folder: path52.join(ASSETS, String(id2)),
184790
184847
  previews: fact("previews", () => Object.entries(progress).map(([agent, p2]) => ({
184791
184848
  agent,
184792
184849
  currentStageId: p2.currentStageId,
@@ -185270,7 +185327,7 @@ function answerOf2(ran) {
185270
185327
  import { spawn as spawn3 } from "node:child_process";
185271
185328
  import { randomUUID as randomUUID6 } from "node:crypto";
185272
185329
  import fs55 from "node:fs";
185273
- import os6 from "node:os";
185330
+ import os7 from "node:os";
185274
185331
  import path56 from "node:path";
185275
185332
 
185276
185333
  // src/model-list.ts
@@ -185456,8 +185513,8 @@ var sources2 = Object.fromEntries(
185456
185513
  ])
185457
185514
  );
185458
185515
  Object.assign(sources2, {
185459
- "claude-code": () => claudeModels(path56.join(process.env.CLAUDE_CONFIG_DIR || path56.join(os6.homedir(), ".claude"), "cache", "model-catalog")),
185460
- codex: () => codexModels(path56.join(process.env.CODEX_HOME || path56.join(os6.homedir(), ".codex"), "models_cache.json")),
185516
+ "claude-code": () => claudeModels(path56.join(process.env.CLAUDE_CONFIG_DIR || path56.join(os7.homedir(), ".claude"), "cache", "model-catalog")),
185517
+ codex: () => codexModels(path56.join(process.env.CODEX_HOME || path56.join(os7.homedir(), ".codex"), "models_cache.json")),
185461
185518
  opencode: async (signal2) => opencodeModels(await output2(installedCommand(HARNESSES2.opencode).argv[0], ["models"], signal2)),
185462
185519
  cursor: (signal2) => cursorModels(signal2),
185463
185520
  antigravity: async (signal2) => antigravityModels(await output2(installedCommand(HARNESSES2.antigravity).argv[0], ["models"], signal2))
@@ -185470,7 +185527,7 @@ function cursorModels(signal2, argv = installedCommand(HARNESSES2.cursor).argv)
185470
185527
  return new Promise((resolve2) => {
185471
185528
  let child;
185472
185529
  try {
185473
- const start = spawnable(argv[0], argv.slice(1), { cwd: os6.tmpdir(), stdio: ["pipe", "pipe", "ignore"], env: copyEnv(argv[0], withSystemProxy({ ...process.env, ...HARNESSES2.cursor.env() })) });
185530
+ const start = spawnable(argv[0], argv.slice(1), { cwd: os7.tmpdir(), stdio: ["pipe", "pipe", "ignore"], env: copyEnv(argv[0], withSystemProxy({ ...process.env, ...HARNESSES2.cursor.env() })) });
185474
185531
  child = spawn3(start.command, start.args, start.options);
185475
185532
  } catch {
185476
185533
  return resolve2([]);
@@ -185489,7 +185546,7 @@ function cursorModels(signal2, argv = installedCommand(HARNESSES2.cursor).argv)
185489
185546
  child.on("error", () => done([]));
185490
185547
  child.on("close", () => done([]));
185491
185548
  const rpc = connect(child.stdout, child.stdin, (msg) => msg.id !== void 0 && rpc.refuse(msg.id, "no"), { jsonrpc: true });
185492
- rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd: os6.tmpdir(), mcpServers: [] })).then((opened) => done(acpModels(opened))).catch(() => done([]));
185549
+ rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd: os7.tmpdir(), mcpServers: [] })).then((opened) => done(acpModels(opened))).catch(() => done([]));
185493
185550
  });
185494
185551
  }
185495
185552
  function acpModels(opened) {
@@ -188121,9 +188178,9 @@ import fs62 from "node:fs";
188121
188178
  import path64 from "node:path";
188122
188179
 
188123
188180
  // ../cli/src/lib/signals/identity.ts
188124
- import { createHash as createHash7 } from "node:crypto";
188181
+ import { createHash as createHash8 } from "node:crypto";
188125
188182
  var DERIVED = "derived-";
188126
- var derivedSourceId = (seed) => `${DERIVED}${createHash7("sha256").update(seed).digest("hex").slice(0, 16)}`;
188183
+ var derivedSourceId = (seed) => `${DERIVED}${createHash8("sha256").update(seed).digest("hex").slice(0, 16)}`;
188127
188184
 
188128
188185
  // src/triage.ts
188129
188186
  var triageDir = (board) => path64.join(board, "triage");
@@ -188661,7 +188718,7 @@ async function runFlow(job, ws, deps, io) {
188661
188718
  const task = currentTask;
188662
188719
  const startsDelivery = ["delivery resume", "run resume", "task implement"].includes(args2.slice(0, 2).join(" "));
188663
188720
  if (review && action === "implement" && startsDelivery) {
188664
- previewDirectory ??= fs64.mkdtempSync(path66.join(os7.tmpdir(), "wildcrane-previews-"));
188721
+ previewDirectory ??= fs64.mkdtempSync(path66.join(os8.tmpdir(), "wildcrane-previews-"));
188665
188722
  const inputs = task?.preview_inputs;
188666
188723
  const staged = await attemptSync(io, "previews", () => stageSavedPreviews(previewDirectory, ws, review, inputs, () => stopping(io)));
188667
188724
  if (!staged.ok) return refuse(refusedSync(job, staged));
@@ -189334,7 +189391,7 @@ function replySpent(checkpoint, runtime) {
189334
189391
  }
189335
189392
 
189336
189393
  // src/jobs.ts
189337
- import { createHash as createHash9 } from "node:crypto";
189394
+ import { createHash as createHash10 } from "node:crypto";
189338
189395
 
189339
189396
  // src/conversation-progress.ts
189340
189397
  function conversationProgress(attempt, send3, valid, unconfirmed) {
@@ -189455,9 +189512,9 @@ function executorRecord() {
189455
189512
  // src/reply-images.ts
189456
189513
  import fs67 from "node:fs";
189457
189514
  import path69 from "node:path";
189458
- import os8 from "node:os";
189515
+ import os9 from "node:os";
189459
189516
  import { fileURLToPath as fileURLToPath5 } from "node:url";
189460
- import { createHash as createHash8 } from "node:crypto";
189517
+ import { createHash as createHash9 } from "node:crypto";
189461
189518
  init_file_limits();
189462
189519
  var inside2 = (root2, file2) => {
189463
189520
  const p2 = path69.relative(root2, file2);
@@ -189467,7 +189524,7 @@ function collectReplyImages(parts, cwd) {
189467
189524
  const files = /* @__PURE__ */ new Map();
189468
189525
  const tools = [];
189469
189526
  const output3 = [];
189470
- const roots = [cwd, path69.join(process.env.CODEX_HOME?.trim() || path69.join(os8.homedir(), ".codex"), "generated_images")].flatMap((p2) => {
189527
+ const roots = [cwd, path69.join(process.env.CODEX_HOME?.trim() || path69.join(os9.homedir(), ".codex"), "generated_images")].flatMap((p2) => {
189471
189528
  try {
189472
189529
  return [fs67.realpathSync(p2)];
189473
189530
  } catch {
@@ -189521,7 +189578,7 @@ function collectReplyImages(parts, cwd) {
189521
189578
  const bytes = read5();
189522
189579
  const mime = imageMime(bytes);
189523
189580
  if (!mime || p2.mime && p2.mime !== mime || bytes.length > ASSET_FILE_LIMIT) throw Error();
189524
- const id2 = `rim_${createHash8("sha256").update(bytes).digest("hex")}`;
189581
+ const id2 = `rim_${createHash9("sha256").update(bytes).digest("hex")}`;
189525
189582
  if (!files.has(id2)) files.set(id2, { read: read5, mime });
189526
189583
  return { type: "image", id: id2, mime, status: "saved" };
189527
189584
  } catch {
@@ -189576,7 +189633,7 @@ async function saveReplyImages(parts, cwd, upload2) {
189576
189633
  let bytes;
189577
189634
  try {
189578
189635
  bytes = f2.read();
189579
- if (`rim_${createHash8("sha256").update(bytes).digest("hex")}` !== key || imageMime(bytes) !== f2.mime) continue;
189636
+ if (`rim_${createHash9("sha256").update(bytes).digest("hex")}` !== key || imageMime(bytes) !== f2.mime) continue;
189580
189637
  } catch {
189581
189638
  continue;
189582
189639
  }
@@ -191099,7 +191156,7 @@ async function runClaimedStep(job, deps, track, keep2, lease, scope, replyStream
191099
191156
  const stream2 = watching();
191100
191157
  return sendBack(publishingJob, deps, ws, completed, sync, stream2, finishClaimed, landed, async (pushed) => {
191101
191158
  const records = pushed.conflict ? pendingConflicts(ws.board) : [];
191102
- const facts = createHash9("sha256").update(JSON.stringify(pushed.conflict ? records.map((r2) => ({ id: r2.id, state: r2.state, files: r2.files })) : pushed.failure)).digest("hex");
191159
+ const facts = createHash10("sha256").update(JSON.stringify(pushed.conflict ? records.map((r2) => ({ id: r2.id, state: r2.state, files: r2.files })) : pushed.failure)).digest("hex");
191103
191160
  const failRepair = async (reason) => {
191104
191161
  if (!stream2.asked()) stream2.event({ kind: "error", data: { text: reason } });
191105
191162
  await stream2.end();