wildcrane-runner 0.6.73 → 0.6.74

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.
package/dist/launcher.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.73 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.74 — 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.73" : "0.0.0";
26907
- var AKB_VERSION = true ? "0.11.60" : "0.0.0";
26906
+ var VERSION = true ? "0.6.74" : "0.0.0";
26907
+ var AKB_VERSION = true ? "0.11.61" : "0.0.0";
26908
26908
  var EXIT_REFUSED = 10;
26909
26909
  var EXIT_OUTDATED = 11;
26910
26910
  var EXIT_UPDATE = 12;
@@ -27680,6 +27680,7 @@ import path8 from "node:path";
27680
27680
 
27681
27681
  // ../cli/src/lib/cloud/session.ts
27682
27682
  import fs6 from "node:fs";
27683
+ import { createHash } from "node:crypto";
27683
27684
  import path7 from "node:path";
27684
27685
 
27685
27686
  // ../cli/src/lib/machine/home.ts
@@ -27694,9 +27695,34 @@ var REFRESH_MARGIN_MS = 6e4;
27694
27695
  var LOCK_STALE_MS = 3e4;
27695
27696
  var LOCK_WAIT_MS = 2e4;
27696
27697
  var LOCK_RETRY_MS = 50;
27698
+ var REFRESH_TIMEOUT_MS = 15e3;
27699
+ var REFRESH_BACKOFF_MS = 6e4;
27697
27700
  var sessionFile = () => path7.join(machineHome(), "session.json");
27698
27701
  var lockDir = () => path7.join(machineHome(), "session.lock");
27699
27702
  var lockOwner = () => path7.join(lockDir(), "owner");
27703
+ var retryFile = () => path7.join(machineHome(), "session-refresh.json");
27704
+ var refreshKey = (session) => createHash("sha256").update(JSON.stringify([cloudEndpoints().api, session.subject, session.refreshToken])).digest("hex");
27705
+ function readRetry(session) {
27706
+ try {
27707
+ const retry2 = JSON.parse(fs6.readFileSync(retryFile(), "utf8"));
27708
+ if (retry2.key === refreshKey(session) && Number.isFinite(retry2.until) && Number.isInteger(retry2.attempt) && retry2.attempt > 0 && typeof retry2.error === "string") return retry2;
27709
+ } catch {
27710
+ }
27711
+ }
27712
+ function deferRefresh(session, error, after) {
27713
+ const current2 = readSession();
27714
+ if (current2?.subject === session.subject && current2.refreshToken === session.refreshToken) {
27715
+ const attempt = Math.min((readRetry(session)?.attempt ?? 0) + 1, 4);
27716
+ const seconds = after?.trim() ? Number(after) : NaN;
27717
+ const serverDelay = Number.isFinite(seconds) ? seconds * 1e3 : Date.parse(after ?? "") - Date.now();
27718
+ const delay = Math.max(Math.min(REFRESH_BACKOFF_MS * 2 ** (attempt - 1), 3e5), Number.isFinite(serverDelay) ? serverDelay : 0);
27719
+ const retry2 = { key: refreshKey(session), until: Date.now() + delay, attempt, error };
27720
+ const temporary = `${retryFile()}.${process.pid}.tmp`;
27721
+ fs6.writeFileSync(temporary, JSON.stringify(retry2), { mode: 384 });
27722
+ fs6.renameSync(temporary, retryFile());
27723
+ }
27724
+ return { ok: false, reason: "unreachable", error };
27725
+ }
27700
27726
  function readSession() {
27701
27727
  let raw;
27702
27728
  try {
@@ -27719,10 +27745,12 @@ function writeSession(session) {
27719
27745
  fs6.writeFileSync(tmp, `${JSON.stringify(session, null, 2)}
27720
27746
  `, { mode: 384 });
27721
27747
  fs6.renameSync(tmp, sessionFile());
27748
+ if (!expiringSoon(session) || !readRetry(session)) fs6.rmSync(retryFile(), { force: true });
27722
27749
  }
27723
27750
  function clearSession() {
27724
27751
  try {
27725
27752
  fs6.rmSync(sessionFile());
27753
+ fs6.rmSync(retryFile(), { force: true });
27726
27754
  } catch {
27727
27755
  }
27728
27756
  }
@@ -27735,30 +27763,33 @@ async function accessToken() {
27735
27763
  var expiringSoon = (session) => session.expiresAt - REFRESH_MARGIN_MS <= Date.now();
27736
27764
  async function refresh() {
27737
27765
  const lock = await takeLock();
27766
+ if (!lock) return { ok: false, reason: "unreachable", error: "Cloud sign-in refresh is busy. Try again shortly." };
27738
27767
  try {
27739
27768
  const now = readSession();
27740
27769
  if (!now) return { ok: false, reason: "signed-out" };
27741
27770
  if (!expiringSoon(now)) return { ok: true, token: now.accessToken, session: now };
27771
+ const retry2 = readRetry(now);
27772
+ if (retry2 && retry2.until > Date.now()) return { ok: false, reason: "unreachable", error: retry2.error };
27742
27773
  const { api, anonKey } = cloudEndpoints();
27743
27774
  let response;
27744
27775
  try {
27745
27776
  response = await fetch(`${api}/auth/v1/token?grant_type=refresh_token`, {
27746
27777
  method: "POST",
27747
27778
  headers: { apikey: anonKey, "content-type": "application/json" },
27748
- body: JSON.stringify({ refresh_token: now.refreshToken })
27779
+ body: JSON.stringify({ refresh_token: now.refreshToken }),
27780
+ signal: AbortSignal.timeout(REFRESH_TIMEOUT_MS)
27749
27781
  });
27750
27782
  } catch (e) {
27751
- return { ok: false, reason: "unreachable", error: e instanceof Error ? e.message : String(e) };
27783
+ return deferRefresh(now, e instanceof Error ? e.message : String(e));
27752
27784
  }
27753
27785
  if (!response.ok) {
27754
- const body = await response.json().catch(() => ({}));
27755
- if (response.status >= 500) {
27756
- return { ok: false, reason: "unreachable", error: body.error_description ?? `Cloud answered ${response.status}` };
27757
- }
27758
- return { ok: false, reason: "expired", error: body.error_description };
27786
+ const body = await response.json().catch(() => null);
27787
+ const error = body?.error_description ?? body?.msg ?? body?.message;
27788
+ if (![400, 401, 403].includes(response.status)) return deferRefresh(now, error ?? `Cloud answered ${response.status}`, response.headers.get("retry-after"));
27789
+ return { ok: false, reason: "expired", error };
27759
27790
  }
27760
- const fresh = sessionFrom(await response.json(), now);
27761
- if (!fresh) return { ok: false, reason: "expired" };
27791
+ const fresh = sessionFrom(await response.json().catch(() => null), now);
27792
+ if (!fresh) return deferRefresh(now, "Cloud returned an invalid sign-in refresh response.");
27762
27793
  const current2 = readSession();
27763
27794
  if (!current2 || current2.subject !== now.subject) return { ok: false, reason: "expired" };
27764
27795
  if (current2.refreshToken !== now.refreshToken) return { ok: true, token: current2.accessToken, session: current2 };
@@ -27769,6 +27800,7 @@ async function refresh() {
27769
27800
  }
27770
27801
  }
27771
27802
  function sessionFrom(body, previous) {
27803
+ if (!body || typeof body !== "object") return null;
27772
27804
  const token = body;
27773
27805
  const subject = token.user?.id ?? previous?.subject;
27774
27806
  if (!token.access_token || !token.refresh_token || !subject) return null;
@@ -27810,8 +27842,7 @@ async function takeLock() {
27810
27842
  fs6.rmSync(lockDir(), { recursive: true, force: true });
27811
27843
  continue;
27812
27844
  }
27813
- if (Date.now() > until) return () => {
27814
- };
27845
+ if (Date.now() > until) return null;
27815
27846
  await sleep(LOCK_RETRY_MS);
27816
27847
  }
27817
27848
  }
@@ -27824,7 +27855,7 @@ function stale() {
27824
27855
  } catch {
27825
27856
  held2 = void 0;
27826
27857
  }
27827
- if (held2 !== void 0 && !alive(held2)) return true;
27858
+ if (held2 !== void 0) return !alive(held2);
27828
27859
  try {
27829
27860
  return Date.now() - fs6.statSync(lockDir()).mtimeMs > LOCK_STALE_MS;
27830
27861
  } catch {
@@ -28505,13 +28536,15 @@ function runOnce(candidate, options) {
28505
28536
  let timedOut = false;
28506
28537
  let stopping2 = false;
28507
28538
  let forceKill;
28508
- if (candidate.fresh) {
28539
+ const watchConnection = () => {
28540
+ if (timer) clearTimeout(timer);
28509
28541
  timer = setTimeout(() => {
28510
28542
  timedOut = true;
28511
28543
  child.kill("SIGTERM");
28512
28544
  forceKill = setTimeout(() => child.kill("SIGKILL"), 5e3);
28513
28545
  }, Number(process.env.WILDCRANE_CONNECT_MS) || CONNECT_MS);
28514
- }
28546
+ };
28547
+ if (candidate.fresh) watchConnection();
28515
28548
  const forward = (signal) => () => {
28516
28549
  stopping2 = true;
28517
28550
  child.kill(signal);
@@ -28525,6 +28558,7 @@ function runOnce(candidate, options) {
28525
28558
  child.on("message", (message) => {
28526
28559
  options.onMessage?.(message);
28527
28560
  if (message.type === "update-deferred") update3 = null;
28561
+ if (message.type === "reconnecting" && candidate.fresh && !connected && !timedOut) watchConnection();
28528
28562
  if (message.type === "waiting" && timer) {
28529
28563
  clearTimeout(timer);
28530
28564
  timer = null;
@@ -28946,7 +28980,7 @@ import path29 from "node:path";
28946
28980
  // ../cli/src/lib/agent/harnesses/antigravity.ts
28947
28981
  import fs21 from "node:fs";
28948
28982
  import path23 from "node:path";
28949
- import { createHash as createHash2 } from "node:crypto";
28983
+ import { createHash as createHash3 } from "node:crypto";
28950
28984
  import { spawnSync as spawnSync3 } from "node:child_process";
28951
28985
 
28952
28986
  // ../cli/src/lib/agent/locate.ts
@@ -29322,7 +29356,7 @@ function modelsIn(file2, pick2, salt = "") {
29322
29356
  }
29323
29357
 
29324
29358
  // ../cli/src/lib/agent/harnesses/types.ts
29325
- import { createHash } from "node:crypto";
29359
+ import { createHash as createHash2 } from "node:crypto";
29326
29360
  import fs19 from "node:fs";
29327
29361
  import path21 from "node:path";
29328
29362
  var SKILL_SENTENCE = "Use the kanban skill";
@@ -29346,7 +29380,7 @@ var MCP_CONFIG = {
29346
29380
  help: "A JSON file of `mcpServers`, as Claude Code's --mcp-config takes. Empty opens no servers."
29347
29381
  };
29348
29382
  function machineFile(name, text3) {
29349
- const suffix = createHash("sha256").update(text3).digest("hex").slice(0, 16);
29383
+ const suffix = createHash2("sha256").update(text3).digest("hex").slice(0, 16);
29350
29384
  const file2 = path21.join(machineHome(), "prompts", `${path21.parse(name).name}-${suffix}${path21.extname(name)}`);
29351
29385
  try {
29352
29386
  if (fs19.readFileSync(file2, "utf8") === text3) return file2;
@@ -29810,7 +29844,7 @@ var ANTIGRAVITY = {
29810
29844
  const rule = `${text3}
29811
29845
 
29812
29846
  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.`;
29813
- const hash = createHash2("sha256").update(rule).digest("hex").slice(0, 16);
29847
+ const hash = createHash3("sha256").update(rule).digest("hex").slice(0, 16);
29814
29848
  const root2 = path23.join(machineHome(), "prompts", `antigravity-${hash}`);
29815
29849
  const file2 = path23.join(root2, ".agents", "rules", "language.md");
29816
29850
  fs21.mkdirSync(path23.dirname(file2), { recursive: true });
@@ -30869,9 +30903,9 @@ function createKimiStreamRenderer(cwd, resumeId) {
30869
30903
  // ../cli/src/lib/agent/wire/acp-cost.ts
30870
30904
  import fs22 from "node:fs";
30871
30905
  import path24 from "node:path";
30872
- import { createHash as createHash3 } from "node:crypto";
30906
+ import { createHash as createHash4 } from "node:crypto";
30873
30907
  function acpCostFile(tool, cwd, session) {
30874
- const key = createHash3("sha256").update(JSON.stringify([tool, cwd, session])).digest("hex");
30908
+ const key = createHash4("sha256").update(JSON.stringify([tool, cwd, session])).digest("hex");
30875
30909
  return path24.join(machineHome(), "usage", "acp", `${key}.json`);
30876
30910
  }
30877
30911
  function readAcpCost(file2) {
@@ -31043,7 +31077,7 @@ function createTail(log) {
31043
31077
  // ../cli/package.json
31044
31078
  var package_default = {
31045
31079
  name: "wildcrane",
31046
- version: "0.11.60",
31080
+ version: "0.11.61",
31047
31081
  akbContract: 17,
31048
31082
  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.",
31049
31083
  keywords: [
package/dist/plugin.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.73 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.74 — 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;
@@ -73475,6 +73475,7 @@ var import_zod2 = __toESM(require_zod(), 1);
73475
73475
 
73476
73476
  // ../cli/src/lib/cloud/session.ts
73477
73477
  import fs from "node:fs";
73478
+ import { createHash } from "node:crypto";
73478
73479
  import path2 from "node:path";
73479
73480
 
73480
73481
  // ../cli/src/lib/machine/home.ts
@@ -73502,9 +73503,34 @@ var REFRESH_MARGIN_MS = 6e4;
73502
73503
  var LOCK_STALE_MS = 3e4;
73503
73504
  var LOCK_WAIT_MS = 2e4;
73504
73505
  var LOCK_RETRY_MS = 50;
73506
+ var REFRESH_TIMEOUT_MS = 15e3;
73507
+ var REFRESH_BACKOFF_MS = 6e4;
73505
73508
  var sessionFile = () => path2.join(machineHome(), "session.json");
73506
73509
  var lockDir = () => path2.join(machineHome(), "session.lock");
73507
73510
  var lockOwner = () => path2.join(lockDir(), "owner");
73511
+ var retryFile = () => path2.join(machineHome(), "session-refresh.json");
73512
+ var refreshKey = (session) => createHash("sha256").update(JSON.stringify([cloudEndpoints().api, session.subject, session.refreshToken])).digest("hex");
73513
+ function readRetry(session) {
73514
+ try {
73515
+ const retry2 = JSON.parse(fs.readFileSync(retryFile(), "utf8"));
73516
+ if (retry2.key === refreshKey(session) && Number.isFinite(retry2.until) && Number.isInteger(retry2.attempt) && retry2.attempt > 0 && typeof retry2.error === "string") return retry2;
73517
+ } catch {
73518
+ }
73519
+ }
73520
+ function deferRefresh(session, error2, after) {
73521
+ const current2 = readSession();
73522
+ if (current2?.subject === session.subject && current2.refreshToken === session.refreshToken) {
73523
+ const attempt = Math.min((readRetry(session)?.attempt ?? 0) + 1, 4);
73524
+ const seconds = after?.trim() ? Number(after) : NaN;
73525
+ const serverDelay = Number.isFinite(seconds) ? seconds * 1e3 : Date.parse(after ?? "") - Date.now();
73526
+ const delay = Math.max(Math.min(REFRESH_BACKOFF_MS * 2 ** (attempt - 1), 3e5), Number.isFinite(serverDelay) ? serverDelay : 0);
73527
+ const retry2 = { key: refreshKey(session), until: Date.now() + delay, attempt, error: error2 };
73528
+ const temporary = `${retryFile()}.${process.pid}.tmp`;
73529
+ fs.writeFileSync(temporary, JSON.stringify(retry2), { mode: 384 });
73530
+ fs.renameSync(temporary, retryFile());
73531
+ }
73532
+ return { ok: false, reason: "unreachable", error: error2 };
73533
+ }
73508
73534
  function readSession() {
73509
73535
  let raw;
73510
73536
  try {
@@ -73527,10 +73553,12 @@ function writeSession(session) {
73527
73553
  fs.writeFileSync(tmp, `${JSON.stringify(session, null, 2)}
73528
73554
  `, { mode: 384 });
73529
73555
  fs.renameSync(tmp, sessionFile());
73556
+ if (!expiringSoon(session) || !readRetry(session)) fs.rmSync(retryFile(), { force: true });
73530
73557
  }
73531
73558
  function clearSession() {
73532
73559
  try {
73533
73560
  fs.rmSync(sessionFile());
73561
+ fs.rmSync(retryFile(), { force: true });
73534
73562
  } catch {
73535
73563
  }
73536
73564
  }
@@ -73543,30 +73571,33 @@ async function accessToken() {
73543
73571
  var expiringSoon = (session) => session.expiresAt - REFRESH_MARGIN_MS <= Date.now();
73544
73572
  async function refresh() {
73545
73573
  const lock = await takeLock();
73574
+ if (!lock) return { ok: false, reason: "unreachable", error: "Cloud sign-in refresh is busy. Try again shortly." };
73546
73575
  try {
73547
73576
  const now = readSession();
73548
73577
  if (!now) return { ok: false, reason: "signed-out" };
73549
73578
  if (!expiringSoon(now)) return { ok: true, token: now.accessToken, session: now };
73579
+ const retry2 = readRetry(now);
73580
+ if (retry2 && retry2.until > Date.now()) return { ok: false, reason: "unreachable", error: retry2.error };
73550
73581
  const { api, anonKey } = cloudEndpoints();
73551
73582
  let response;
73552
73583
  try {
73553
73584
  response = await fetch(`${api}/auth/v1/token?grant_type=refresh_token`, {
73554
73585
  method: "POST",
73555
73586
  headers: { apikey: anonKey, "content-type": "application/json" },
73556
- body: JSON.stringify({ refresh_token: now.refreshToken })
73587
+ body: JSON.stringify({ refresh_token: now.refreshToken }),
73588
+ signal: AbortSignal.timeout(REFRESH_TIMEOUT_MS)
73557
73589
  });
73558
73590
  } catch (e) {
73559
- return { ok: false, reason: "unreachable", error: e instanceof Error ? e.message : String(e) };
73591
+ return deferRefresh(now, e instanceof Error ? e.message : String(e));
73560
73592
  }
73561
73593
  if (!response.ok) {
73562
- const body = await response.json().catch(() => ({}));
73563
- if (response.status >= 500) {
73564
- return { ok: false, reason: "unreachable", error: body.error_description ?? `Cloud answered ${response.status}` };
73565
- }
73566
- return { ok: false, reason: "expired", error: body.error_description };
73594
+ const body = await response.json().catch(() => null);
73595
+ const error2 = body?.error_description ?? body?.msg ?? body?.message;
73596
+ if (![400, 401, 403].includes(response.status)) return deferRefresh(now, error2 ?? `Cloud answered ${response.status}`, response.headers.get("retry-after"));
73597
+ return { ok: false, reason: "expired", error: error2 };
73567
73598
  }
73568
- const fresh = sessionFrom(await response.json(), now);
73569
- if (!fresh) return { ok: false, reason: "expired" };
73599
+ const fresh = sessionFrom(await response.json().catch(() => null), now);
73600
+ if (!fresh) return deferRefresh(now, "Cloud returned an invalid sign-in refresh response.");
73570
73601
  const current2 = readSession();
73571
73602
  if (!current2 || current2.subject !== now.subject) return { ok: false, reason: "expired" };
73572
73603
  if (current2.refreshToken !== now.refreshToken) return { ok: true, token: current2.accessToken, session: current2 };
@@ -73577,6 +73608,7 @@ async function refresh() {
73577
73608
  }
73578
73609
  }
73579
73610
  function sessionFrom(body, previous) {
73611
+ if (!body || typeof body !== "object") return null;
73580
73612
  const token = body;
73581
73613
  const subject = token.user?.id ?? previous?.subject;
73582
73614
  if (!token.access_token || !token.refresh_token || !subject) return null;
@@ -73618,8 +73650,7 @@ async function takeLock() {
73618
73650
  fs.rmSync(lockDir(), { recursive: true, force: true });
73619
73651
  continue;
73620
73652
  }
73621
- if (Date.now() > until) return () => {
73622
- };
73653
+ if (Date.now() > until) return null;
73623
73654
  await sleep(LOCK_RETRY_MS);
73624
73655
  }
73625
73656
  }
@@ -73632,7 +73663,7 @@ function stale() {
73632
73663
  } catch {
73633
73664
  held2 = void 0;
73634
73665
  }
73635
- if (held2 !== void 0 && !alive(held2)) return true;
73666
+ if (held2 !== void 0) return !alive(held2);
73636
73667
  try {
73637
73668
  return Date.now() - fs.statSync(lockDir()).mtimeMs > LOCK_STALE_MS;
73638
73669
  } catch {
@@ -73818,8 +73849,8 @@ function machineId() {
73818
73849
  var machineName = () => os3.hostname().replace(/\.local$/, "");
73819
73850
 
73820
73851
  // src/protocol.ts
73821
- var VERSION = true ? "0.6.73" : "0.0.0";
73822
- var AKB_VERSION = true ? "0.11.60" : "0.0.0";
73852
+ var VERSION = true ? "0.6.74" : "0.0.0";
73853
+ var AKB_VERSION = true ? "0.11.61" : "0.0.0";
73823
73854
  var EXIT_REFUSED = 10;
73824
73855
  var EXIT_OUTDATED = 11;
73825
73856
  var EXIT_UPDATE = 12;
@@ -75421,13 +75452,15 @@ function runOnce(candidate, options) {
75421
75452
  let timedOut = false;
75422
75453
  let stopping2 = false;
75423
75454
  let forceKill;
75424
- if (candidate.fresh) {
75455
+ const watchConnection = () => {
75456
+ if (timer) clearTimeout(timer);
75425
75457
  timer = setTimeout(() => {
75426
75458
  timedOut = true;
75427
75459
  child.kill("SIGTERM");
75428
75460
  forceKill = setTimeout(() => child.kill("SIGKILL"), 5e3);
75429
75461
  }, Number(process.env.WILDCRANE_CONNECT_MS) || CONNECT_MS);
75430
- }
75462
+ };
75463
+ if (candidate.fresh) watchConnection();
75431
75464
  const forward = (signal) => () => {
75432
75465
  stopping2 = true;
75433
75466
  child.kill(signal);
@@ -75441,6 +75474,7 @@ function runOnce(candidate, options) {
75441
75474
  child.on("message", (message) => {
75442
75475
  options.onMessage?.(message);
75443
75476
  if (message.type === "update-deferred") update3 = null;
75477
+ if (message.type === "reconnecting" && candidate.fresh && !connected && !timedOut) watchConnection();
75444
75478
  if (message.type === "waiting" && timer) {
75445
75479
  clearTimeout(timer);
75446
75480
  timer = null;
@@ -75571,7 +75605,7 @@ import path29 from "node:path";
75571
75605
  // ../cli/src/lib/agent/harnesses/antigravity.ts
75572
75606
  import fs21 from "node:fs";
75573
75607
  import path23 from "node:path";
75574
- import { createHash as createHash2 } from "node:crypto";
75608
+ import { createHash as createHash3 } from "node:crypto";
75575
75609
  import { spawnSync as spawnSync2 } from "node:child_process";
75576
75610
 
75577
75611
  // ../cli/src/lib/agent/locate.ts
@@ -75947,7 +75981,7 @@ function modelsIn(file2, pick3, salt = "") {
75947
75981
  }
75948
75982
 
75949
75983
  // ../cli/src/lib/agent/harnesses/types.ts
75950
- import { createHash } from "node:crypto";
75984
+ import { createHash as createHash2 } from "node:crypto";
75951
75985
  import fs20 from "node:fs";
75952
75986
  import path22 from "node:path";
75953
75987
  var SKILL_SENTENCE = "Use the kanban skill";
@@ -75971,7 +76005,7 @@ var MCP_CONFIG = {
75971
76005
  help: "A JSON file of `mcpServers`, as Claude Code's --mcp-config takes. Empty opens no servers."
75972
76006
  };
75973
76007
  function machineFile(name, text4) {
75974
- const suffix = createHash("sha256").update(text4).digest("hex").slice(0, 16);
76008
+ const suffix = createHash2("sha256").update(text4).digest("hex").slice(0, 16);
75975
76009
  const file2 = path22.join(machineHome(), "prompts", `${path22.parse(name).name}-${suffix}${path22.extname(name)}`);
75976
76010
  try {
75977
76011
  if (fs20.readFileSync(file2, "utf8") === text4) return file2;
@@ -76391,7 +76425,7 @@ var ANTIGRAVITY = {
76391
76425
  const rule = `${text4}
76392
76426
 
76393
76427
  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.`;
76394
- const hash = createHash2("sha256").update(rule).digest("hex").slice(0, 16);
76428
+ const hash = createHash3("sha256").update(rule).digest("hex").slice(0, 16);
76395
76429
  const root2 = path23.join(machineHome(), "prompts", `antigravity-${hash}`);
76396
76430
  const file2 = path23.join(root2, ".agents", "rules", "language.md");
76397
76431
  fs21.mkdirSync(path23.dirname(file2), { recursive: true });
@@ -77450,9 +77484,9 @@ function createKimiStreamRenderer(cwd, resumeId) {
77450
77484
  // ../cli/src/lib/agent/wire/acp-cost.ts
77451
77485
  import fs22 from "node:fs";
77452
77486
  import path24 from "node:path";
77453
- import { createHash as createHash3 } from "node:crypto";
77487
+ import { createHash as createHash4 } from "node:crypto";
77454
77488
  function acpCostFile(tool, cwd, session) {
77455
- const key = createHash3("sha256").update(JSON.stringify([tool, cwd, session])).digest("hex");
77489
+ const key = createHash4("sha256").update(JSON.stringify([tool, cwd, session])).digest("hex");
77456
77490
  return path24.join(machineHome(), "usage", "acp", `${key}.json`);
77457
77491
  }
77458
77492
  function readAcpCost(file2) {
@@ -77624,7 +77658,7 @@ function createTail(log) {
77624
77658
  // ../cli/package.json
77625
77659
  var package_default = {
77626
77660
  name: "wildcrane",
77627
- version: "0.11.60",
77661
+ version: "0.11.61",
77628
77662
  akbContract: 17,
77629
77663
  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.",
77630
77664
  keywords: [