wildcrane-runner 0.6.67 → 0.6.68

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/settings.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // wildcrane-runner 0.6.67 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.68 — 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;
@@ -26979,9 +26979,40 @@ function alive(pid) {
26979
26979
  }
26980
26980
  var sleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
26981
26981
 
26982
+ // src/settings-control.ts
26983
+ import fs3 from "node:fs";
26984
+ import path4 from "node:path";
26985
+ var directory = () => path4.join(runnerHome(), "executors");
26986
+ var epochFile = () => path4.join(runnerHome(), "account-generation");
26987
+ function accountGeneration() {
26988
+ try {
26989
+ return fs3.readFileSync(epochFile(), "utf8");
26990
+ } catch {
26991
+ return "";
26992
+ }
26993
+ }
26994
+ async function stopExecutors() {
26995
+ fs3.mkdirSync(runnerHome(), { recursive: true, mode: 448 });
26996
+ fs3.writeFileSync(epochFile(), `${Date.now()}-${process.pid}`, { mode: 384 });
26997
+ for (let n = 0; n < 160; n++) {
26998
+ const active = fs3.existsSync(directory()) ? fs3.readdirSync(directory()).filter((name) => {
26999
+ try {
27000
+ process.kill(Number(name.split(".")[0]), 0);
27001
+ return true;
27002
+ } catch {
27003
+ fs3.rmSync(path4.join(directory(), name), { force: true });
27004
+ return false;
27005
+ }
27006
+ }) : [];
27007
+ if (!active.length) return true;
27008
+ await new Promise((resolve2) => setTimeout(resolve2, 100));
27009
+ }
27010
+ return false;
27011
+ }
27012
+
26982
27013
  // src/protocol.ts
26983
- var VERSION = true ? "0.6.67" : "0.0.0";
26984
- var AKB_VERSION = true ? "0.11.53" : "0.0.0";
27014
+ var VERSION = true ? "0.6.68" : "0.0.0";
27015
+ var AKB_VERSION = true ? "0.11.54" : "0.0.0";
26985
27016
 
26986
27017
  // src/api.ts
26987
27018
  var RUNTIMES = ["claude-code", "codex", "cursor", "opencode", "kimi", "dsh", "zcode", "grok", "antigravity"];
@@ -27036,12 +27067,12 @@ var removeFolder = (machineId2, project) => request("POST", `/v1/runner/folders/
27036
27067
 
27037
27068
  // src/cache.ts
27038
27069
  import crypto3 from "node:crypto";
27039
- import fs10 from "node:fs";
27040
- import path12 from "node:path";
27070
+ import fs11 from "node:fs";
27071
+ import path13 from "node:path";
27041
27072
 
27042
27073
  // ../cli/src/lib/agent/cloud-studios.ts
27043
- import fs8 from "node:fs";
27044
- import path10 from "node:path";
27074
+ import fs9 from "node:fs";
27075
+ import path11 from "node:path";
27045
27076
 
27046
27077
  // ../cli/src/lib/shared/file-limits.ts
27047
27078
  var BOARD_FILE_LIMIT = 10 * 1024 * 1024;
@@ -27053,8 +27084,8 @@ var studioName = (id) => id.startsWith("wf_builtin_") ? id.slice("wf_builtin_".l
27053
27084
 
27054
27085
  // ../official/pack.ts
27055
27086
  import crypto2 from "node:crypto";
27056
- import fs4 from "node:fs";
27057
- import path5 from "node:path";
27087
+ import fs5 from "node:fs";
27088
+ import path6 from "node:path";
27058
27089
  import { fileURLToPath } from "node:url";
27059
27090
 
27060
27091
  // ../cli/src/lib/agents/icon.ts
@@ -27487,8 +27518,8 @@ function parseStudioFile(id, source, from) {
27487
27518
  }
27488
27519
 
27489
27520
  // ../cli/src/lib/agent/studio-folder.ts
27490
- import fs3 from "node:fs";
27491
- import path4 from "node:path";
27521
+ import fs4 from "node:fs";
27522
+ import path5 from "node:path";
27492
27523
 
27493
27524
  // ../cli/src/lib/shared/studio-files.ts
27494
27525
  var STUDIO_FILE = "STUDIO.md";
@@ -27623,34 +27654,34 @@ function inspect(value, official) {
27623
27654
  // ../cli/src/lib/agent/studio-folder.ts
27624
27655
  var MIME = { ".png": "image/png", ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".webp": "image/webp" };
27625
27656
  function filesOf(dir, base = dir) {
27626
- return fs3.readdirSync(dir, { withFileTypes: true }).filter((e) => !e.name.startsWith(".")).flatMap((e) => {
27627
- const full = path4.join(dir, e.name);
27628
- return e.isDirectory() ? filesOf(full, base) : [path4.relative(base, full).split(path4.sep).join("/")];
27657
+ return fs4.readdirSync(dir, { withFileTypes: true }).filter((e) => !e.name.startsWith(".")).flatMap((e) => {
27658
+ const full = path5.join(dir, e.name);
27659
+ return e.isDirectory() ? filesOf(full, base) : [path5.relative(base, full).split(path5.sep).join("/")];
27629
27660
  });
27630
27661
  }
27631
27662
  function readStudioFile(dir, file2) {
27632
- const full = path4.join(dir, file2);
27633
- return isAboutFile(file2) && !file2.endsWith(".md") ? `data:${MIME[path4.extname(file2)]};base64,${fs3.readFileSync(full).toString("base64")}` : fs3.readFileSync(full, "utf8");
27663
+ const full = path5.join(dir, file2);
27664
+ return isAboutFile(file2) && !file2.endsWith(".md") ? `data:${MIME[path5.extname(file2)]};base64,${fs4.readFileSync(full).toString("base64")}` : fs4.readFileSync(full, "utf8");
27634
27665
  }
27635
27666
  var readStudioFolder = (dir) => Object.fromEntries(filesOf(dir).sort().map((f) => [f, readStudioFile(dir, f)]));
27636
27667
 
27637
27668
  // ../official/pack.ts
27638
- var OFFICIAL = path5.dirname(fileURLToPath(import.meta.url));
27639
- var dirs = (dir) => fs4.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
27669
+ var OFFICIAL = path6.dirname(fileURLToPath(import.meta.url));
27670
+ var dirs = (dir) => fs5.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
27640
27671
  var hashOf = (files) => crypto2.createHash("sha256").update(hashInput(files)).digest("hex");
27641
27672
  function packOfficial(root2 = OFFICIAL, loose = false) {
27642
- const agentsDir = path5.join(root2, "agents");
27673
+ const agentsDir = path6.join(root2, "agents");
27643
27674
  const agentFiles = Object.fromEntries(dirs(agentsDir).map((name) => {
27644
- const dir = path5.join(agentsDir, name);
27675
+ const dir = path6.join(agentsDir, name);
27645
27676
  return [name, readStudioFolder(dir)];
27646
27677
  }));
27647
27678
  for (const [name, own2] of Object.entries(loose ? {} : agentFiles)) {
27648
27679
  const read2 = parseSpecAgent(own2["AGENT.md"] ?? "", `official/agents/${name}/AGENT.md`, (p) => own2[p] ?? null, true);
27649
27680
  if ("problem" in read2) throw new Error(read2.problem);
27650
27681
  }
27651
- const studiosDir = path5.join(root2, "studios");
27682
+ const studiosDir = path6.join(root2, "studios");
27652
27683
  return dirs(studiosDir).map((folder) => {
27653
- const dir = path5.join(studiosDir, folder);
27684
+ const dir = path6.join(studiosDir, folder);
27654
27685
  const files = {};
27655
27686
  for (const f of filesOf(dir).sort()) {
27656
27687
  if (f === STUDIO_FILE || f === CARD_TEMPLATE_FILE || f === MCP_FILE || f.startsWith("skills/") || f.startsWith(SHARED_DIR) || isAboutFile(f)) files[f] = readStudioFile(dir, f);
@@ -27682,23 +27713,23 @@ function packOfficial(root2 = OFFICIAL, loose = false) {
27682
27713
  }
27683
27714
 
27684
27715
  // ../cli/src/lib/cloud/tasks.ts
27685
- import fs5 from "node:fs";
27686
- import path6 from "node:path";
27716
+ import fs6 from "node:fs";
27717
+ import path7 from "node:path";
27687
27718
  var TASK_ENV = "AI4KANBAN_TASK";
27688
27719
  function workspaceTask() {
27689
27720
  const id = process.env[TASK_ENV];
27690
27721
  return id && id.trim() ? id.trim() : null;
27691
27722
  }
27692
27723
  function runnerProject(board) {
27693
- if (path6.basename(board) !== "kanban" || path6.basename(path6.dirname(board)) !== ".akb") return null;
27694
- const linked = linkedProject(board, path6.dirname(path6.dirname(board)));
27724
+ if (path7.basename(board) !== "kanban" || path7.basename(path7.dirname(board)) !== ".akb") return null;
27725
+ const linked = linkedProject(board, path7.dirname(path7.dirname(board)));
27695
27726
  return linked.ok ? linked.value : null;
27696
27727
  }
27697
27728
  function linkedProject(board, root2) {
27698
- const file2 = path6.join(root2, ".akb", "base.json");
27699
- if (!fs5.existsSync(file2)) return { ok: true, value: null };
27729
+ const file2 = path7.join(root2, ".akb", "base.json");
27730
+ if (!fs6.existsSync(file2)) return { ok: true, value: null };
27700
27731
  try {
27701
- const base = JSON.parse(fs5.readFileSync(file2, "utf8"));
27732
+ const base = JSON.parse(fs6.readFileSync(file2, "utf8"));
27702
27733
  if (!base || typeof base !== "object" || base.project !== void 0 && (typeof base.project !== "string" || !base.project.trim()) || base.files !== void 0 && (!base.files || typeof base.files !== "object" || Array.isArray(base.files))) throw new Error();
27703
27734
  const projects = new Set(Object.keys(base.files ?? {}).flatMap((p) => /^projects\/([^/]+)\//.exec(p)?.[1] ?? []));
27704
27735
  if (typeof base.project === "string") projects.add(base.project);
@@ -27710,14 +27741,14 @@ function linkedProject(board, root2) {
27710
27741
  }
27711
27742
 
27712
27743
  // ../cli/src/lib/file-memo.ts
27713
- import fs6 from "node:fs";
27714
- import path7 from "node:path";
27744
+ import fs7 from "node:fs";
27745
+ import path8 from "node:path";
27715
27746
  function stamp(paths) {
27716
27747
  const parts = [];
27717
27748
  const visit = (p) => {
27718
27749
  let st;
27719
27750
  try {
27720
- st = fs6.statSync(p, { bigint: true });
27751
+ st = fs7.statSync(p, { bigint: true });
27721
27752
  } catch {
27722
27753
  parts.push(`${p}:-`);
27723
27754
  return;
@@ -27729,11 +27760,11 @@ function stamp(paths) {
27729
27760
  parts.push(`${p}/`);
27730
27761
  let names2;
27731
27762
  try {
27732
- names2 = fs6.readdirSync(p).sort();
27763
+ names2 = fs7.readdirSync(p).sort();
27733
27764
  } catch {
27734
27765
  return;
27735
27766
  }
27736
- for (const name of names2) if (name !== "node_modules" && name !== ".git") visit(path7.join(p, name));
27767
+ for (const name of names2) if (name !== "node_modules" && name !== ".git") visit(path8.join(p, name));
27737
27768
  };
27738
27769
  for (const p of paths) visit(p);
27739
27770
  return parts.join("\n");
@@ -27775,11 +27806,11 @@ function memoByFiles(paths, read2) {
27775
27806
  }
27776
27807
 
27777
27808
  // ../cli/src/lib/paths.ts
27778
- import path9 from "node:path";
27809
+ import path10 from "node:path";
27779
27810
 
27780
27811
  // ../cli/src/lib/machine/project.ts
27781
- import fs7 from "node:fs";
27782
- import path8 from "node:path";
27812
+ import fs8 from "node:fs";
27813
+ import path9 from "node:path";
27783
27814
  var SESSIONS_FILE = "sessions.json";
27784
27815
  var SESSIONS_FOLDER = "sessions";
27785
27816
  var ASSETS_FOLDER = "assets";
@@ -27788,16 +27819,16 @@ var SESSIONS_LOCK = "sessions.lock";
27788
27819
  var INDEX_LOCK = "index.lock";
27789
27820
  var UI_CONFIG_FILE = "ui.config.json";
27790
27821
  function realPathOf(dir) {
27791
- const here2 = path8.resolve(dir);
27822
+ const here2 = path9.resolve(dir);
27792
27823
  const rest = [];
27793
27824
  let at = here2;
27794
27825
  for (; ; ) {
27795
27826
  try {
27796
- return path8.join(fs7.realpathSync(at), ...rest);
27827
+ return path9.join(fs8.realpathSync(at), ...rest);
27797
27828
  } catch {
27798
- const up = path8.dirname(at);
27829
+ const up = path9.dirname(at);
27799
27830
  if (up === at) return here2;
27800
- rest.unshift(path8.basename(at));
27831
+ rest.unshift(path9.basename(at));
27801
27832
  at = up;
27802
27833
  }
27803
27834
  }
@@ -27805,23 +27836,23 @@ function realPathOf(dir) {
27805
27836
  function stateRootOf(board) {
27806
27837
  let dir = realPathOf(board);
27807
27838
  for (; ; ) {
27808
- if (fs7.existsSync(path8.join(dir, ".git"))) return dir;
27809
- const up = path8.dirname(dir);
27839
+ if (fs8.existsSync(path9.join(dir, ".git"))) return dir;
27840
+ const up = path9.dirname(dir);
27810
27841
  if (up === dir) break;
27811
27842
  dir = up;
27812
27843
  }
27813
27844
  return rootAbove(realPathOf(board));
27814
27845
  }
27815
27846
  function rootAbove(board) {
27816
- const parent = path8.dirname(board);
27817
- return ["docs", ".akb"].includes(path8.basename(parent)) ? path8.dirname(parent) : parent;
27847
+ const parent = path9.dirname(board);
27848
+ return ["docs", ".akb"].includes(path9.basename(parent)) ? path9.dirname(parent) : parent;
27818
27849
  }
27819
27850
  function projectStateDir(board, root2 = stateRootOf(board)) {
27820
- const relative = path8.relative(realPathOf(root2), realPathOf(board));
27821
- if (relative === ".." || relative.startsWith(`..${path8.sep}`) || path8.isAbsolute(relative)) {
27851
+ const relative = path9.relative(realPathOf(root2), realPathOf(board));
27852
+ if (relative === ".." || relative.startsWith(`..${path9.sep}`) || path9.isAbsolute(relative)) {
27822
27853
  throw new Error("The board must be inside its project root.");
27823
27854
  }
27824
- return path8.join(realPathOf(root2), ".akb", "boards", relative || "_root");
27855
+ return path9.join(realPathOf(root2), ".akb", "boards", relative || "_root");
27825
27856
  }
27826
27857
 
27827
27858
  // ../cli/src/lib/paths.ts
@@ -27867,73 +27898,73 @@ var SIGNALS_OLD_HANDLED = "";
27867
27898
  var AKB_DIR = "";
27868
27899
  var ROOT_GITIGNORE = "";
27869
27900
  function boardLockName(kanban, root2) {
27870
- const from = path9.relative(root2, kanban);
27871
- const name = from && !from.startsWith("..") ? from : path9.basename(kanban);
27872
- return `${name.split(path9.sep).join("-")}.lock`;
27901
+ const from = path10.relative(root2, kanban);
27902
+ const name = from && !from.startsWith("..") ? from : path10.basename(kanban);
27903
+ return `${name.split(path10.sep).join("-")}.lock`;
27873
27904
  }
27874
27905
  var BOARD_FLAG = "";
27875
27906
  function setBoard(kanban, root2, flag) {
27876
- REPO_ROOT = path9.resolve(root2);
27877
- KANBAN = path9.resolve(kanban);
27907
+ REPO_ROOT = path10.resolve(root2);
27908
+ KANBAN = path10.resolve(kanban);
27878
27909
  BOARD_FLAG = flag;
27879
- TODO = path9.join(KANBAN, "todo");
27880
- ARCHIVE = path9.join(KANBAN, ".archive");
27881
- ARCHIVE_MD = path9.join(KANBAN, "archive.md");
27882
- README = path9.join(TODO, "README.md");
27883
- MODULES_MD = path9.join(KANBAN, "modules.md");
27884
- CONFIG = path9.join(KANBAN, "config.md");
27885
- KANBAN_GITIGNORE = path9.join(KANBAN, ".gitignore");
27886
- RELEASES = path9.join(KANBAN, "releases.md");
27887
- RELEASE_SUMMARIES = path9.join(KANBAN, ".release-summaries");
27888
- AGENTS = path9.join(KANBAN, "agents");
27889
- STUDIOS = path9.join(KANBAN, "studios");
27890
- LEGACY_AGENTS = path9.join(KANBAN, "skills");
27891
- MEMORY = path9.join(KANBAN, "memory");
27892
- AGENT_MEMORY = path9.join(MEMORY, "agents");
27893
- PROJECT_MD = path9.join(MEMORY, "project.md");
27894
- LEGACY_UI_CONFIG = path9.join(KANBAN, UI_CONFIG_FILE);
27895
- LOCAL_CONFIG = path9.join(KANBAN, ".local.json");
27896
- ENV_FILE = path9.join(KANBAN, ".env");
27910
+ TODO = path10.join(KANBAN, "todo");
27911
+ ARCHIVE = path10.join(KANBAN, ".archive");
27912
+ ARCHIVE_MD = path10.join(KANBAN, "archive.md");
27913
+ README = path10.join(TODO, "README.md");
27914
+ MODULES_MD = path10.join(KANBAN, "modules.md");
27915
+ CONFIG = path10.join(KANBAN, "config.md");
27916
+ KANBAN_GITIGNORE = path10.join(KANBAN, ".gitignore");
27917
+ RELEASES = path10.join(KANBAN, "releases.md");
27918
+ RELEASE_SUMMARIES = path10.join(KANBAN, ".release-summaries");
27919
+ AGENTS = path10.join(KANBAN, "agents");
27920
+ STUDIOS = path10.join(KANBAN, "studios");
27921
+ LEGACY_AGENTS = path10.join(KANBAN, "skills");
27922
+ MEMORY = path10.join(KANBAN, "memory");
27923
+ AGENT_MEMORY = path10.join(MEMORY, "agents");
27924
+ PROJECT_MD = path10.join(MEMORY, "project.md");
27925
+ LEGACY_UI_CONFIG = path10.join(KANBAN, UI_CONFIG_FILE);
27926
+ LOCAL_CONFIG = path10.join(KANBAN, ".local.json");
27927
+ ENV_FILE = path10.join(KANBAN, ".env");
27897
27928
  const machine = projectStateDir(KANBAN, REPO_ROOT);
27898
27929
  BOARD_STATE = machine;
27899
- UI_CONFIG = path9.join(machine, UI_CONFIG_FILE);
27900
- ASSETS = path9.join(machine, ASSETS_FOLDER);
27901
- MOCKUPS = path9.join(machine, MOCKUPS_FOLDER);
27902
- SESSIONS = path9.join(machine, SESSIONS_FILE);
27903
- SESSIONS_DIR = path9.join(machine, SESSIONS_FOLDER);
27904
- SESSIONS_LOCK2 = path9.join(machine, SESSIONS_LOCK);
27905
- INDEX_LOCK2 = path9.join(machine, INDEX_LOCK);
27906
- DELIVERIES = path9.join(KANBAN, "deliveries");
27907
- RULES = path9.join(KANBAN, "rules");
27908
- PLANS = path9.join(machine, "plans");
27909
- PLANS_ARCHIVE = path9.join(PLANS, "archive");
27910
- TRIAGE = path9.join(KANBAN, "triage");
27911
- SIGNALS_ARCHIVED = path9.join(TRIAGE, "archived");
27912
- SIGNALS_DISMISSED = path9.join(TRIAGE, "dismissed");
27913
- SIGNALS_FILES = path9.join(TRIAGE, "files");
27914
- SIGNALS_OLD_INBOX = path9.join(TRIAGE, "inbox");
27915
- SIGNALS_OLD_HANDLED = path9.join(TRIAGE, "handled.md");
27916
- AKB_DIR = path9.join(REPO_ROOT, ".akb");
27917
- ROOT_GITIGNORE = path9.join(REPO_ROOT, ".gitignore");
27918
- LOCK = path9.join(AKB_DIR, boardLockName(KANBAN, REPO_ROOT));
27930
+ UI_CONFIG = path10.join(machine, UI_CONFIG_FILE);
27931
+ ASSETS = path10.join(machine, ASSETS_FOLDER);
27932
+ MOCKUPS = path10.join(machine, MOCKUPS_FOLDER);
27933
+ SESSIONS = path10.join(machine, SESSIONS_FILE);
27934
+ SESSIONS_DIR = path10.join(machine, SESSIONS_FOLDER);
27935
+ SESSIONS_LOCK2 = path10.join(machine, SESSIONS_LOCK);
27936
+ INDEX_LOCK2 = path10.join(machine, INDEX_LOCK);
27937
+ DELIVERIES = path10.join(KANBAN, "deliveries");
27938
+ RULES = path10.join(KANBAN, "rules");
27939
+ PLANS = path10.join(machine, "plans");
27940
+ PLANS_ARCHIVE = path10.join(PLANS, "archive");
27941
+ TRIAGE = path10.join(KANBAN, "triage");
27942
+ SIGNALS_ARCHIVED = path10.join(TRIAGE, "archived");
27943
+ SIGNALS_DISMISSED = path10.join(TRIAGE, "dismissed");
27944
+ SIGNALS_FILES = path10.join(TRIAGE, "files");
27945
+ SIGNALS_OLD_INBOX = path10.join(TRIAGE, "inbox");
27946
+ SIGNALS_OLD_HANDLED = path10.join(TRIAGE, "handled.md");
27947
+ AKB_DIR = path10.join(REPO_ROOT, ".akb");
27948
+ ROOT_GITIGNORE = path10.join(REPO_ROOT, ".gitignore");
27949
+ LOCK = path10.join(AKB_DIR, boardLockName(KANBAN, REPO_ROOT));
27919
27950
  return REPO_ROOT;
27920
27951
  }
27921
27952
  function setBoardRoot(root2, named = false) {
27922
- const project = path9.resolve(root2);
27923
- return setBoard(path9.join(project, "docs", "kanban"), project, named ? ` --dir ${project}` : "");
27953
+ const project = path10.resolve(root2);
27954
+ return setBoard(path10.join(project, "docs", "kanban"), project, named ? ` --dir ${project}` : "");
27924
27955
  }
27925
27956
  setBoardRoot(process.cwd());
27926
27957
 
27927
27958
  // ../cli/src/lib/agent/cloud-studios.ts
27928
27959
  var DEV = "AI4KANBAN_STUDIOS";
27929
- var root = () => path10.join(machineHome(), "studios");
27960
+ var root = () => path11.join(machineHome(), "studios");
27930
27961
  var safe = (name) => name.replace(/[^\w.@-]/g, "_");
27931
- var versionFile = (id, version) => path10.join(root(), "versions", `${safe(id)}@${version}.json`);
27932
- var listFile = (project) => path10.join(root(), "lists", `${safe(project)}.json`);
27933
- var pinFile = (task) => path10.join(root(), "tasks", `${safe(task)}.json`);
27962
+ var versionFile = (id, version) => path11.join(root(), "versions", `${safe(id)}@${version}.json`);
27963
+ var listFile = (project) => path11.join(root(), "lists", `${safe(project)}.json`);
27964
+ var pinFile = (task) => path11.join(root(), "tasks", `${safe(task)}.json`);
27934
27965
  function readJson(file2) {
27935
27966
  try {
27936
- return JSON.parse(fs8.readFileSync(file2, "utf8"));
27967
+ return JSON.parse(fs9.readFileSync(file2, "utf8"));
27937
27968
  } catch {
27938
27969
  return null;
27939
27970
  }
@@ -27976,20 +28007,20 @@ var sources = () => {
27976
28007
  var flows = memoByFiles(sources, readFlows);
27977
28008
 
27978
28009
  // src/folders.ts
27979
- import fs9 from "node:fs";
28010
+ import fs10 from "node:fs";
27980
28011
  import os4 from "node:os";
27981
- import path11 from "node:path";
27982
- var projectsFile = () => path11.join(runnerHome(), "projects.json");
28012
+ import path12 from "node:path";
28013
+ var projectsFile = () => path12.join(runnerHome(), "projects.json");
27983
28014
  function realpath(p) {
27984
28015
  try {
27985
- return fs9.realpathSync(p);
28016
+ return fs10.realpathSync(p);
27986
28017
  } catch {
27987
28018
  return null;
27988
28019
  }
27989
28020
  }
27990
28021
  function readGrants() {
27991
28022
  try {
27992
- const held2 = JSON.parse(fs9.readFileSync(projectsFile(), "utf8"));
28023
+ const held2 = JSON.parse(fs10.readFileSync(projectsFile(), "utf8"));
27993
28024
  if (!Array.isArray(held2.projects)) throw new Error("invalid_projects");
27994
28025
  return held2;
27995
28026
  } catch (error) {
@@ -28003,23 +28034,23 @@ function listOf(held2) {
28003
28034
  return subject ? held2.accounts[subject] ?? [] : [];
28004
28035
  }
28005
28036
  function update(change) {
28006
- fs9.mkdirSync(runnerHome(), { recursive: true, mode: 448 });
28037
+ fs10.mkdirSync(runnerHome(), { recursive: true, mode: 448 });
28007
28038
  const lock = `${projectsFile()}.lock`;
28008
28039
  let fd;
28009
28040
  const until = Date.now() + 2e3;
28010
28041
  for (; ; ) {
28011
28042
  try {
28012
- fd = fs9.openSync(lock, "wx", 384);
28013
- fs9.writeFileSync(fd, String(process.pid));
28043
+ fd = fs10.openSync(lock, "wx", 384);
28044
+ fs10.writeFileSync(fd, String(process.pid));
28014
28045
  break;
28015
28046
  } catch {
28016
28047
  try {
28017
- const pid = Number(fs9.readFileSync(lock, "utf8"));
28048
+ const pid = Number(fs10.readFileSync(lock, "utf8"));
28018
28049
  if (pid > 0) {
28019
28050
  try {
28020
28051
  process.kill(pid, 0);
28021
28052
  } catch {
28022
- fs9.rmSync(lock, { force: true });
28053
+ fs10.rmSync(lock, { force: true });
28023
28054
  }
28024
28055
  }
28025
28056
  } catch {
@@ -28042,13 +28073,13 @@ function update(change) {
28042
28073
  held2.projects = after;
28043
28074
  } else held2.projects = after;
28044
28075
  const tmp = `${projectsFile()}.${process.pid}.tmp`;
28045
- fs9.writeFileSync(tmp, `${JSON.stringify(held2, null, 2)}
28076
+ fs10.writeFileSync(tmp, `${JSON.stringify(held2, null, 2)}
28046
28077
  `, { mode: 384 });
28047
- fs9.renameSync(tmp, projectsFile());
28078
+ fs10.renameSync(tmp, projectsFile());
28048
28079
  return before.filter((p) => !after.includes(p));
28049
28080
  } finally {
28050
- fs9.closeSync(fd);
28051
- fs9.rmSync(lock, { force: true });
28081
+ fs10.closeSync(fd);
28082
+ fs10.rmSync(lock, { force: true });
28052
28083
  }
28053
28084
  }
28054
28085
  function adoptLegacy() {
@@ -28063,9 +28094,9 @@ var SYSTEM_WIN = ["Windows", "Program Files", "Program Files (x86)", "ProgramDat
28063
28094
  var here = () => ({ platform: process.platform, home: os4.homedir(), resolve: realpath });
28064
28095
  function refusal(picked, where = here()) {
28065
28096
  const win = where.platform === "win32";
28066
- const p = win ? path11.win32 : path11.posix;
28097
+ const p = win ? path12.win32 : path12.posix;
28067
28098
  const real = where.resolve(picked);
28068
- if (!real || !p.isAbsolute(real) || where.resolve === realpath && !fs9.statSync(real).isDirectory()) return "missing";
28099
+ if (!real || !p.isAbsolute(real) || where.resolve === realpath && !fs10.statSync(real).isDirectory()) return "missing";
28069
28100
  const norm = (d) => {
28070
28101
  const n = p.normalize(d).replace(/[\\/]+$/, "") || p.sep;
28071
28102
  return win ? n.toLowerCase() : n;
@@ -28088,16 +28119,16 @@ function refusal(picked, where = here()) {
28088
28119
  // src/cache.ts
28089
28120
  var IDLE_MS = 7 * 24 * 60 * 6e4;
28090
28121
  var SWEEP_MS = 24 * 60 * 6e4;
28091
- var akbDir = (dir) => path12.join(dir, ".akb");
28092
- var unsentFile = (dir) => path12.join(akbDir(dir), "unsent");
28093
- var unsent = (dir) => fs10.existsSync(unsentFile(dir));
28122
+ var akbDir = (dir) => path13.join(dir, ".akb");
28123
+ var unsentFile = (dir) => path13.join(akbDir(dir), "unsent");
28124
+ var unsent = (dir) => fs11.existsSync(unsentFile(dir));
28094
28125
  var holds = /* @__PURE__ */ new Map();
28095
- var holdsDir = () => path12.join(runnerHome(), "holds");
28096
- var holdFile = (dir) => path12.join(holdsDir(), `${crypto3.createHash("sha256").update(dir).digest("hex")}.${process.pid}`);
28126
+ var holdsDir = () => path13.join(runnerHome(), "holds");
28127
+ var holdFile = (dir) => path13.join(holdsDir(), `${crypto3.createHash("sha256").update(dir).digest("hex")}.${process.pid}`);
28097
28128
  function paused(dir) {
28098
28129
  try {
28099
- const file2 = path12.join(projectStateDir(path12.join(akbDir(dir), "kanban")), SESSIONS_FILE);
28100
- const held2 = JSON.parse(fs10.readFileSync(file2, "utf8"));
28130
+ const file2 = path13.join(projectStateDir(path13.join(akbDir(dir), "kanban")), SESSIONS_FILE);
28131
+ const held2 = JSON.parse(fs11.readFileSync(file2, "utf8"));
28101
28132
  return (held2.deliveries ?? []).some((d) => d.status === "active");
28102
28133
  } catch {
28103
28134
  return false;
@@ -28105,14 +28136,14 @@ function paused(dir) {
28105
28136
  }
28106
28137
  function busy(dir) {
28107
28138
  if (holds.has(dir)) return true;
28108
- const prefix = path12.basename(holdFile(dir)).split(".")[0] + ".";
28139
+ const prefix = path13.basename(holdFile(dir)).split(".")[0] + ".";
28109
28140
  try {
28110
- return fs10.readdirSync(holdsDir()).filter((file2) => file2.startsWith(prefix)).some((file2) => {
28141
+ return fs11.readdirSync(holdsDir()).filter((file2) => file2.startsWith(prefix)).some((file2) => {
28111
28142
  try {
28112
28143
  process.kill(Number(file2.split(".")[1]), 0);
28113
28144
  return true;
28114
28145
  } catch {
28115
- fs10.rmSync(path12.join(holdsDir(), file2), { force: true });
28146
+ fs11.rmSync(path13.join(holdsDir(), file2), { force: true });
28116
28147
  return false;
28117
28148
  }
28118
28149
  });
@@ -28123,19 +28154,19 @@ function busy(dir) {
28123
28154
  var kept = (dir) => busy(dir) || unsent(dir) || paused(dir);
28124
28155
  function clearAkb(dir) {
28125
28156
  dir = realpath2(dir);
28126
- if (kept(dir) || fs10.existsSync(path12.join(akbDir(dir), "worktrees")) || fs10.existsSync(path12.join(akbDir(dir), "handoffs"))) return false;
28157
+ if (kept(dir) || fs11.existsSync(path13.join(akbDir(dir), "worktrees")) || fs11.existsSync(path13.join(akbDir(dir), "handoffs"))) return false;
28127
28158
  let entries;
28128
28159
  try {
28129
- entries = fs10.readdirSync(akbDir(dir));
28160
+ entries = fs11.readdirSync(akbDir(dir));
28130
28161
  } catch {
28131
28162
  return true;
28132
28163
  }
28133
- for (const name of entries) fs10.rmSync(path12.join(akbDir(dir), name), { recursive: true, force: true });
28164
+ for (const name of entries) fs11.rmSync(path13.join(akbDir(dir), name), { recursive: true, force: true });
28134
28165
  return true;
28135
28166
  }
28136
28167
  function realpath2(p) {
28137
28168
  try {
28138
- return fs10.realpathSync(p);
28169
+ return fs11.realpathSync(p);
28139
28170
  } catch {
28140
28171
  return p;
28141
28172
  }
@@ -28143,8 +28174,8 @@ function realpath2(p) {
28143
28174
 
28144
28175
  // src/kanban-skill.ts
28145
28176
  import { spawnSync } from "node:child_process";
28146
- import fs11 from "node:fs";
28147
- import path13 from "node:path";
28177
+ import fs12 from "node:fs";
28178
+ import path14 from "node:path";
28148
28179
 
28149
28180
  // ../skill/SKILL.md
28150
28181
  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';
@@ -28158,24 +28189,24 @@ var CONTENT = `${SKILL_default.trimEnd()}
28158
28189
  var MANAGED = /^<!-- ai4kanban \S+ -->$/m;
28159
28190
  function prepareKanbanSkill(root2) {
28160
28191
  for (const folder of SKILL_FOLDERS) {
28161
- const dir = path13.join(root2, folder);
28162
- const file2 = path13.join(dir, "SKILL.md");
28192
+ const dir = path14.join(root2, folder);
28193
+ const file2 = path14.join(dir, "SKILL.md");
28163
28194
  try {
28164
28195
  let linked = false;
28165
28196
  let at = root2;
28166
28197
  for (const name of `${folder}/SKILL.md`.split("/")) {
28167
- at = path13.join(at, name);
28168
- if (fs11.lstatSync(at, { throwIfNoEntry: false })?.isSymbolicLink()) linked = true;
28198
+ at = path14.join(at, name);
28199
+ if (fs12.lstatSync(at, { throwIfNoEntry: false })?.isSymbolicLink()) linked = true;
28169
28200
  }
28170
- const held2 = fs11.existsSync(file2) ? fs11.readFileSync(file2, "utf8") : null;
28171
- const exists = fs11.lstatSync(dir, { throwIfNoEntry: false }) !== void 0;
28201
+ const held2 = fs12.existsSync(file2) ? fs12.readFileSync(file2, "utf8") : null;
28202
+ const exists = fs12.lstatSync(dir, { throwIfNoEntry: false }) !== void 0;
28172
28203
  if (linked || exists && !MANAGED.test(held2 ?? "")) {
28173
28204
  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");
28174
28205
  continue;
28175
28206
  }
28176
28207
  if (held2 !== CONTENT) {
28177
- fs11.mkdirSync(dir, { recursive: true });
28178
- fs11.writeFileSync(file2, CONTENT);
28208
+ fs12.mkdirSync(dir, { recursive: true });
28209
+ fs12.writeFileSync(file2, CONTENT);
28179
28210
  }
28180
28211
  } catch (e) {
28181
28212
  throw new Error(`\u65E0\u6CD5\u51C6\u5907 ${folder}\uFF1A${e instanceof Error ? e.message : String(e)}`);
@@ -28188,10 +28219,10 @@ function keepOutOfGit(dir, folders2 = SKILL_FOLDERS) {
28188
28219
  if (inside.status !== 0) return;
28189
28220
  const missing = [".akb/", ...folders2.map((f) => `${f}/`)].filter((p) => git2("check-ignore", "-q", p).status !== 0);
28190
28221
  if (!missing.length) return;
28191
- const exclude = path13.resolve(dir, inside.stdout.trim());
28192
- fs11.mkdirSync(path13.dirname(exclude), { recursive: true });
28193
- const held2 = fs11.existsSync(exclude) ? fs11.readFileSync(exclude, "utf8") : "";
28194
- fs11.writeFileSync(exclude, `${held2}${held2 && !held2.endsWith("\n") ? "\n" : ""}${missing.join("\n")}
28222
+ const exclude = path14.resolve(dir, inside.stdout.trim());
28223
+ fs12.mkdirSync(path14.dirname(exclude), { recursive: true });
28224
+ const held2 = fs12.existsSync(exclude) ? fs12.readFileSync(exclude, "utf8") : "";
28225
+ fs12.writeFileSync(exclude, `${held2}${held2 && !held2.endsWith("\n") ? "\n" : ""}${missing.join("\n")}
28195
28226
  `);
28196
28227
  }
28197
28228
  function installKanbanSkill(dir) {
@@ -28206,21 +28237,21 @@ function installKanbanSkill(dir) {
28206
28237
 
28207
28238
  // src/runtimes.ts
28208
28239
  import { spawn as spawn2 } from "node:child_process";
28209
- import fs21 from "node:fs";
28240
+ import fs22 from "node:fs";
28210
28241
  import os6 from "node:os";
28211
- import path24 from "node:path";
28242
+ import path25 from "node:path";
28212
28243
 
28213
28244
  // ../cli/src/lib/agent/harnesses/antigravity.ts
28214
- import fs16 from "node:fs";
28215
- import path18 from "node:path";
28245
+ import fs17 from "node:fs";
28246
+ import path19 from "node:path";
28216
28247
  import { createHash as createHash2 } from "node:crypto";
28217
28248
  import { spawnSync as spawnSync3 } from "node:child_process";
28218
28249
 
28219
28250
  // ../cli/src/lib/agent/locate.ts
28220
28251
  import { spawn, spawnSync as spawnSync2 } from "node:child_process";
28221
- import fs13 from "node:fs";
28252
+ import fs14 from "node:fs";
28222
28253
  import os5 from "node:os";
28223
- import path15 from "node:path";
28254
+ import path16 from "node:path";
28224
28255
 
28225
28256
  // ../cli/src/lib/agent/argv.ts
28226
28257
  function splitCommand(command) {
@@ -28259,8 +28290,8 @@ function commandBinary(command) {
28259
28290
  }
28260
28291
 
28261
28292
  // ../cli/src/lib/agent/spawnable.ts
28262
- import fs12 from "node:fs";
28263
- import path14 from "node:path";
28293
+ import fs13 from "node:fs";
28294
+ import path15 from "node:path";
28264
28295
  var META = /([()\][%!^"`<>&|;, *?])/g;
28265
28296
  function cmdArg(arg) {
28266
28297
  const quoted = `"${arg.replace(/\r?\n|\r/g, " ").replace(/(\\*)"/g, '$1$1\\"').replace(/(\\*)$/, "$1$1")}"`;
@@ -28270,21 +28301,21 @@ function cmdLine(file2, args2) {
28270
28301
  return `"${[file2.replace(META, "^$1"), ...args2.map(cmdArg)].join(" ")}"`;
28271
28302
  }
28272
28303
  function shimTarget(text3, file2) {
28273
- const dir = path14.win32.dirname(file2);
28304
+ const dir = path15.win32.dirname(file2);
28274
28305
  const found = /"%(?:~dp0|dp0%)\\?([^"%]+)"\s+%\*/i.exec(text3);
28275
28306
  if (!found || !/\\node\.exe"/i.test(text3)) return null;
28276
- const script = path14.win32.resolve(dir, found[1].replace(/\//g, "\\"));
28277
- const local = path14.win32.join(dir, "node.exe");
28307
+ const script = path15.win32.resolve(dir, found[1].replace(/\//g, "\\"));
28308
+ const local = path15.win32.join(dir, "node.exe");
28278
28309
  const nodePath = /SET "NODE_PATH=([^"]*)"/i.exec(text3)?.[1];
28279
- return { script, node: fs12.existsSync(local) ? local : "node", env: nodePath ? { NODE_PATH: nodePath } : {} };
28310
+ return { script, node: fs13.existsSync(local) ? local : "node", env: nodePath ? { NODE_PATH: nodePath } : {} };
28280
28311
  }
28281
28312
  function onWindowsPath(name, env2) {
28282
28313
  const exts = (env2.PATHEXT || ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean);
28283
28314
  const key = Object.keys(env2).find((k) => k.toUpperCase() === "PATH") ?? "PATH";
28284
28315
  for (const dir of (env2[key] ?? "").split(";").filter(Boolean)) {
28285
28316
  for (const ext of exts) {
28286
- const file2 = path14.win32.join(dir, `${name}${ext.toLowerCase()}`);
28287
- if (fs12.existsSync(file2)) return file2;
28317
+ const file2 = path15.win32.join(dir, `${name}${ext.toLowerCase()}`);
28318
+ if (fs13.existsSync(file2)) return file2;
28288
28319
  }
28289
28320
  }
28290
28321
  return void 0;
@@ -28292,13 +28323,13 @@ function onWindowsPath(name, env2) {
28292
28323
  function spawnable(command, args2, options = {}, platform = process.platform) {
28293
28324
  if (platform !== "win32") return { command, args: args2, options };
28294
28325
  const env2 = options.env ?? process.env;
28295
- const file2 = path14.extname(command) || /[\\/]/.test(command) ? command : onWindowsPath(command, env2) ?? command;
28296
- const ext = path14.extname(file2).toLowerCase();
28326
+ const file2 = path15.extname(command) || /[\\/]/.test(command) ? command : onWindowsPath(command, env2) ?? command;
28327
+ const ext = path15.extname(file2).toLowerCase();
28297
28328
  const hidden = { ...options, windowsHide: true, shell: false };
28298
28329
  if (ext !== ".cmd" && ext !== ".bat") return { command: file2, args: args2, options: hidden };
28299
28330
  let text3 = "";
28300
28331
  try {
28301
- text3 = fs12.readFileSync(file2, "utf8");
28332
+ text3 = fs13.readFileSync(file2, "utf8");
28302
28333
  } catch {
28303
28334
  }
28304
28335
  const shim = shimTarget(text3, file2);
@@ -28362,7 +28393,7 @@ function pick(copies) {
28362
28393
  }
28363
28394
  function folders(parent) {
28364
28395
  try {
28365
- return fs13.readdirSync(parent, { withFileTypes: true }).filter((one) => one.isDirectory()).map((one) => one.name);
28396
+ return fs14.readdirSync(parent, { withFileTypes: true }).filter((one) => one.isDirectory()).map((one) => one.name);
28366
28397
  } catch {
28367
28398
  return [];
28368
28399
  }
@@ -28381,29 +28412,29 @@ function byVersion(names2) {
28381
28412
  function latestIn(parent, tail = "") {
28382
28413
  let names2;
28383
28414
  try {
28384
- names2 = fs13.readdirSync(parent);
28415
+ names2 = fs14.readdirSync(parent);
28385
28416
  } catch {
28386
28417
  return [];
28387
28418
  }
28388
- return byVersion(names2.filter((name) => !name.startsWith("."))).slice(0, 2).map((name) => path15.join(parent, name, tail));
28419
+ return byVersion(names2.filter((name) => !name.startsWith("."))).slice(0, 2).map((name) => path16.join(parent, name, tail));
28389
28420
  }
28390
28421
  var env = (name) => process.env[name]?.trim() ?? "";
28391
28422
  function commonDirs() {
28392
28423
  const home3 = os5.homedir();
28393
- const under = (...parts) => path15.join(home3, ...parts);
28394
- const nodes = (root2, tail = []) => root2 ? folders(root2).map((version) => path15.join(root2, version, ...tail)) : [];
28424
+ const under = (...parts) => path16.join(home3, ...parts);
28425
+ const nodes = (root2, tail = []) => root2 ? folders(root2).map((version) => path16.join(root2, version, ...tail)) : [];
28395
28426
  if (WINDOWS2) {
28396
28427
  const [app, local, data, programs] = [env("APPDATA"), env("LOCALAPPDATA"), env("ProgramData"), env("ProgramFiles")];
28397
28428
  return [
28398
28429
  under(".local", "bin"),
28399
28430
  under(".bun", "bin"),
28400
28431
  under("scoop", "shims"),
28401
- ...app ? [path15.join(app, "npm")] : [],
28402
- ...local ? [path15.join(local, "pnpm"), path15.join(local, "Volta", "bin"), path15.join(local, "Microsoft", "WinGet", "Links")] : [],
28403
- ...data ? [path15.join(data, "chocolatey", "bin")] : [],
28404
- ...programs ? [path15.join(programs, "nodejs")] : [],
28432
+ ...app ? [path16.join(app, "npm")] : [],
28433
+ ...local ? [path16.join(local, "pnpm"), path16.join(local, "Volta", "bin"), path16.join(local, "Microsoft", "WinGet", "Links")] : [],
28434
+ ...data ? [path16.join(data, "chocolatey", "bin")] : [],
28435
+ ...programs ? [path16.join(programs, "nodejs")] : [],
28405
28436
  ...nodes(env("NVM_HOME")),
28406
- ...app ? nodes(path15.join(app, "fnm", "node-versions"), ["installation"]) : []
28437
+ ...app ? nodes(path16.join(app, "fnm", "node-versions"), ["installation"]) : []
28407
28438
  ];
28408
28439
  }
28409
28440
  const support = process.platform === "darwin" ? under("Library", "Application Support") : under(".local", "share");
@@ -28420,10 +28451,10 @@ function commonDirs() {
28420
28451
  ...env("PNPM_HOME") ? [env("PNPM_HOME")] : [],
28421
28452
  under("Library", "pnpm"),
28422
28453
  under(".local", "share", "pnpm"),
28423
- path15.join(env("VOLTA_HOME") || under(".volta"), "bin"),
28424
- ...nodes(path15.join(env("NVM_DIR") || under(".nvm"), "versions", "node"), ["bin"]),
28425
- ...nodes(path15.join(env("FNM_DIR") || path15.join(support, "fnm"), "node-versions"), ["installation", "bin"]),
28426
- ...nodes(path15.join(env("ASDF_DATA_DIR") || under(".asdf"), "installs", "nodejs"), ["bin"]),
28454
+ path16.join(env("VOLTA_HOME") || under(".volta"), "bin"),
28455
+ ...nodes(path16.join(env("NVM_DIR") || under(".nvm"), "versions", "node"), ["bin"]),
28456
+ ...nodes(path16.join(env("FNM_DIR") || path16.join(support, "fnm"), "node-versions"), ["installation", "bin"]),
28457
+ ...nodes(path16.join(env("ASDF_DATA_DIR") || under(".asdf"), "installs", "nodejs"), ["bin"]),
28427
28458
  ...nodes(under(".local", "share", "mise", "installs", "node"), ["bin"]),
28428
28459
  ...nodes(under(".nodenv", "versions"), ["bin"]),
28429
28460
  ...nodes("/usr/local/n/versions/node", ["bin"])
@@ -28431,11 +28462,11 @@ function commonDirs() {
28431
28462
  }
28432
28463
  function onPath(binary) {
28433
28464
  const names2 = WINDOWS2 ? (process.env.PATHEXT || ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean).map((ext) => `${binary}${ext.toLowerCase()}`) : [binary];
28434
- return (process.env.PATH ?? "").split(path15.delimiter).filter(Boolean).flatMap((dir) => names2.map((name) => path15.join(dir, name)));
28465
+ return (process.env.PATH ?? "").split(path16.delimiter).filter(Boolean).flatMap((dir) => names2.map((name) => path16.join(dir, name)));
28435
28466
  }
28436
28467
  var isFile = (file2) => {
28437
28468
  try {
28438
- return fs13.statSync(file2).isFile();
28469
+ return fs14.statSync(file2).isFile();
28439
28470
  } catch {
28440
28471
  return false;
28441
28472
  }
@@ -28444,24 +28475,24 @@ function copyFiles(harness) {
28444
28475
  const pinned = harness.pinned?.();
28445
28476
  if (pinned && isFile(pinned)) return [{ file: pinned, entry: false }];
28446
28477
  const binary = commandBinary(harness.command);
28447
- const exe = (file2) => WINDOWS2 && !path15.extname(file2) ? [`${file2}.exe`, `${file2}.cmd`] : [file2];
28478
+ const exe = (file2) => WINDOWS2 && !path16.extname(file2) ? [`${file2}.exe`, `${file2}.cmd`] : [file2];
28448
28479
  const path_ = onPath(binary).filter(isFile);
28449
- const elsewhere = process.env.AI4KANBAN_PATH_ONLY ? [] : [...harness.installs?.() ?? [], ...commonDirs().map((dir) => path15.join(dir, binary))];
28480
+ const elsewhere = process.env.AI4KANBAN_PATH_ONLY ? [] : [...harness.installs?.() ?? [], ...commonDirs().map((dir) => path16.join(dir, binary))];
28450
28481
  const others = elsewhere.flatMap(exe).filter(isFile);
28451
28482
  const seen = /* @__PURE__ */ new Set();
28452
28483
  return [...path_, ...others].flatMap((file2, i) => {
28453
- const real = fs13.realpathSync.native(file2);
28484
+ const real = fs14.realpathSync.native(file2);
28454
28485
  if (seen.has(real)) return [];
28455
28486
  seen.add(real);
28456
28487
  return [{ file: file2, entry: i === 0 && path_.length > 0 }];
28457
28488
  });
28458
28489
  }
28459
28490
  var answers;
28460
- var answersFile = () => path15.join(machineHome(), "agent-copies.json");
28491
+ var answersFile = () => path16.join(machineHome(), "agent-copies.json");
28461
28492
  function kept2() {
28462
28493
  if (answers) return answers;
28463
28494
  try {
28464
- answers = JSON.parse(fs13.readFileSync(answersFile(), "utf8"));
28495
+ answers = JSON.parse(fs14.readFileSync(answersFile(), "utf8"));
28465
28496
  } catch {
28466
28497
  answers = {};
28467
28498
  }
@@ -28470,16 +28501,16 @@ function kept2() {
28470
28501
  function keep(file2, answer) {
28471
28502
  kept2()[file2] = answer;
28472
28503
  try {
28473
- fs13.mkdirSync(machineHome(), { recursive: true });
28504
+ fs14.mkdirSync(machineHome(), { recursive: true });
28474
28505
  const staged = `${answersFile()}.${process.pid}`;
28475
- fs13.writeFileSync(staged, JSON.stringify(answers));
28476
- fs13.renameSync(staged, answersFile());
28506
+ fs14.writeFileSync(staged, JSON.stringify(answers));
28507
+ fs14.renameSync(staged, answersFile());
28477
28508
  } catch {
28478
28509
  }
28479
28510
  }
28480
28511
  function keyOf(file2) {
28481
- const real = fs13.realpathSync.native(file2);
28482
- const stat = fs13.statSync(real);
28512
+ const real = fs14.realpathSync.native(file2);
28513
+ const stat = fs14.statSync(real);
28483
28514
  return `${real}|${stat.size}|${stat.mtimeMs}`;
28484
28515
  }
28485
28516
  function known(file2, maxAge) {
@@ -28492,8 +28523,8 @@ function judge(code, status2, stdout, stderr) {
28492
28523
  return { starts: true, version: status2 === 0 ? versionIn(stdout) ?? versionIn(stderr) : null };
28493
28524
  }
28494
28525
  function copyEnv(file2, given = process.env) {
28495
- if (!path15.isAbsolute(file2)) return given;
28496
- return { ...given, PATH: [path15.dirname(file2), given.PATH].filter(Boolean).join(path15.delimiter) };
28526
+ if (!path16.isAbsolute(file2)) return given;
28527
+ return { ...given, PATH: [path16.dirname(file2), given.PATH].filter(Boolean).join(path16.delimiter) };
28497
28528
  }
28498
28529
  var probeOptions = (file2) => ({ cwd: os5.tmpdir(), env: copyEnv(file2), windowsHide: true, shell: false });
28499
28530
  function probe(file2) {
@@ -28590,8 +28621,8 @@ function modelsIn(file2, pick2, salt = "") {
28590
28621
 
28591
28622
  // ../cli/src/lib/agent/harnesses/types.ts
28592
28623
  import { createHash } from "node:crypto";
28593
- import fs14 from "node:fs";
28594
- import path16 from "node:path";
28624
+ import fs15 from "node:fs";
28625
+ import path17 from "node:path";
28595
28626
  var SKILL_SENTENCE = "Use the kanban skill";
28596
28627
  function namesFlag(argv, flags) {
28597
28628
  return argv.some((tok) => flags.some((flag) => tok === flag || tok.startsWith(`${flag}=`)));
@@ -28614,19 +28645,19 @@ var MCP_CONFIG = {
28614
28645
  };
28615
28646
  function machineFile(name, text3) {
28616
28647
  const suffix = createHash("sha256").update(text3).digest("hex").slice(0, 16);
28617
- const file2 = path16.join(machineHome(), "prompts", `${path16.parse(name).name}-${suffix}${path16.extname(name)}`);
28648
+ const file2 = path17.join(machineHome(), "prompts", `${path17.parse(name).name}-${suffix}${path17.extname(name)}`);
28618
28649
  try {
28619
- if (fs14.readFileSync(file2, "utf8") === text3) return file2;
28650
+ if (fs15.readFileSync(file2, "utf8") === text3) return file2;
28620
28651
  } catch {
28621
28652
  }
28622
- fs14.mkdirSync(path16.dirname(file2), { recursive: true });
28623
- fs14.writeFileSync(file2, text3);
28653
+ fs15.mkdirSync(path17.dirname(file2), { recursive: true });
28654
+ fs15.writeFileSync(file2, text3);
28624
28655
  return file2;
28625
28656
  }
28626
28657
 
28627
28658
  // ../cli/src/lib/machine/settings.ts
28628
- import fs15 from "node:fs";
28629
- import path17 from "node:path";
28659
+ import fs16 from "node:fs";
28660
+ import path18 from "node:path";
28630
28661
 
28631
28662
  // ../cli/src/lib/machine/types.ts
28632
28663
  var LANGUAGES = ["en", "zh"];
@@ -28636,11 +28667,11 @@ function isLanguage(value) {
28636
28667
  }
28637
28668
 
28638
28669
  // ../cli/src/lib/machine/settings.ts
28639
- var settingsFile = () => path17.join(machineHome(), "settings.json");
28670
+ var settingsFile = () => path18.join(machineHome(), "settings.json");
28640
28671
  function heldSettings() {
28641
28672
  let text3;
28642
28673
  try {
28643
- text3 = fs15.readFileSync(settingsFile(), "utf8");
28674
+ text3 = fs16.readFileSync(settingsFile(), "utf8");
28644
28675
  } catch (err) {
28645
28676
  if (err.code === "ENOENT") return { unreadable: false, values: {} };
28646
28677
  return { unreadable: true, values: {} };
@@ -29044,7 +29075,7 @@ function antigravityModels(output2) {
29044
29075
  }
29045
29076
  function args(argv, resume) {
29046
29077
  if (namesFlag(argv, ["--continue", "-c", "--conversation", "--remote-agent"])) throw new Error(translating() ? "\u8BF7\u901A\u8FC7 WildCrane \u9009\u62E9 Antigravity \u4F1A\u8BDD\uFF0C\u4E0D\u8981\u5728\u989D\u5916\u53C2\u6570\u4E2D\u6307\u5B9A\u4F1A\u8BDD\u6216\u8FDC\u7A0B\u6267\u884C\u3002" : "Antigravity: select a session through WildCrane, not extra arguments.");
29047
- if (resume && (!/^[a-f0-9-]{36}$/i.test(resume) || !fs16.existsSync(home(".gemini", "antigravity-cli", "conversations", `${resume}.db`)))) throw new Error(translating() ? "Antigravity \u4F1A\u8BDD\u4E0D\u5B58\u5728\u3002\u8BF7\u5728\u672C\u673A\u6062\u590D\u539F\u4F1A\u8BDD\u540E\u7EED\u63A5\u3002" : "Antigravity session not found. Restore the original conversation on this computer before resuming.");
29078
+ if (resume && (!/^[a-f0-9-]{36}$/i.test(resume) || !fs17.existsSync(home(".gemini", "antigravity-cli", "conversations", `${resume}.db`)))) throw new Error(translating() ? "Antigravity \u4F1A\u8BDD\u4E0D\u5B58\u5728\u3002\u8BF7\u5728\u672C\u673A\u6062\u590D\u539F\u4F1A\u8BDD\u540E\u7EED\u63A5\u3002" : "Antigravity session not found. Restore the original conversation on this computer before resuming.");
29048
29079
  const extra = resume ? ["--conversation", resume] : [];
29049
29080
  if (!namesFlag(argv, ["--output-format"])) extra.push("--output-format", "stream-json");
29050
29081
  if (!namesFlag(argv, ["--dangerously-skip-permissions"])) extra.push("--dangerously-skip-permissions");
@@ -29085,10 +29116,10 @@ var ANTIGRAVITY = {
29085
29116
 
29086
29117
  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.`;
29087
29118
  const hash = createHash2("sha256").update(rule).digest("hex").slice(0, 16);
29088
- const root2 = path18.join(machineHome(), "prompts", `antigravity-${hash}`);
29089
- const file2 = path18.join(root2, ".agents", "rules", "language.md");
29090
- fs16.mkdirSync(path18.dirname(file2), { recursive: true });
29091
- fs16.writeFileSync(file2, `---
29119
+ const root2 = path19.join(machineHome(), "prompts", `antigravity-${hash}`);
29120
+ const file2 = path19.join(root2, ".agents", "rules", "language.md");
29121
+ fs17.mkdirSync(path19.dirname(file2), { recursive: true });
29122
+ fs17.writeFileSync(file2, `---
29092
29123
  trigger: always_on
29093
29124
  ---
29094
29125
 
@@ -29191,7 +29222,7 @@ function checkHarnesses(harnesses) {
29191
29222
  }
29192
29223
 
29193
29224
  // ../cli/src/lib/agent/harnesses/claude-code.ts
29194
- import path21 from "node:path";
29225
+ import path22 from "node:path";
29195
29226
 
29196
29227
  // ../cli/src/lib/agent/wire/claude-stream.ts
29197
29228
  var ARG_KEYS = ["command", "file_path", "path", "pattern", "description", "prompt", "query", "url"];
@@ -30141,16 +30172,16 @@ function createKimiStreamRenderer(cwd, resumeId) {
30141
30172
  }
30142
30173
 
30143
30174
  // ../cli/src/lib/agent/wire/acp-cost.ts
30144
- import fs17 from "node:fs";
30145
- import path19 from "node:path";
30175
+ import fs18 from "node:fs";
30176
+ import path20 from "node:path";
30146
30177
  import { createHash as createHash3 } from "node:crypto";
30147
30178
  function acpCostFile(tool, cwd, session) {
30148
30179
  const key = createHash3("sha256").update(JSON.stringify([tool, cwd, session])).digest("hex");
30149
- return path19.join(machineHome(), "usage", "acp", `${key}.json`);
30180
+ return path20.join(machineHome(), "usage", "acp", `${key}.json`);
30150
30181
  }
30151
30182
  function readAcpCost(file2) {
30152
30183
  try {
30153
- const n = JSON.parse(fs17.readFileSync(file2, "utf8"));
30184
+ const n = JSON.parse(fs18.readFileSync(file2, "utf8"));
30154
30185
  return typeof n === "number" && Number.isFinite(n) && n >= 0 ? n : void 0;
30155
30186
  } catch {
30156
30187
  return void 0;
@@ -30159,10 +30190,10 @@ function readAcpCost(file2) {
30159
30190
  function saveAcpCost(file2, cost) {
30160
30191
  if (cost === void 0) return;
30161
30192
  try {
30162
- fs17.mkdirSync(path19.dirname(file2), { recursive: true, mode: 448 });
30193
+ fs18.mkdirSync(path20.dirname(file2), { recursive: true, mode: 448 });
30163
30194
  const tmp = `${file2}.${process.pid}.tmp`;
30164
- fs17.writeFileSync(tmp, JSON.stringify(cost), { mode: 384 });
30165
- fs17.renameSync(tmp, file2);
30195
+ fs18.writeFileSync(tmp, JSON.stringify(cost), { mode: 384 });
30196
+ fs18.renameSync(tmp, file2);
30166
30197
  } catch {
30167
30198
  }
30168
30199
  }
@@ -30183,7 +30214,7 @@ function bounded(work, ms, reason) {
30183
30214
  }
30184
30215
 
30185
30216
  // ../cli/src/lib/agent/wire/acp.ts
30186
- import fs18 from "node:fs";
30217
+ import fs19 from "node:fs";
30187
30218
 
30188
30219
  // ../cli/src/lib/agent/wire/rpc.ts
30189
30220
  var RpcError = class extends Error {
@@ -30317,7 +30348,7 @@ function createTail(log) {
30317
30348
  // ../cli/package.json
30318
30349
  var package_default = {
30319
30350
  name: "wildcrane",
30320
- version: "0.11.53",
30351
+ version: "0.11.54",
30321
30352
  akbContract: 15,
30322
30353
  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.",
30323
30354
  keywords: [
@@ -30460,7 +30491,7 @@ var STOPPED = {
30460
30491
  cancelled: "the turn was cancelled"
30461
30492
  };
30462
30493
  function mcpServersIn(file2) {
30463
- const servers = obj2(obj2(JSON.parse(fs18.readFileSync(file2, "utf8"))).mcpServers);
30494
+ const servers = obj2(obj2(JSON.parse(fs19.readFileSync(file2, "utf8"))).mcpServers);
30464
30495
  return Object.entries(servers).map(([name, raw]) => {
30465
30496
  const s = obj2(raw);
30466
30497
  return {
@@ -30663,7 +30694,7 @@ function decide(params, tail, events) {
30663
30694
  }
30664
30695
 
30665
30696
  // ../cli/src/lib/agent/wire/zcode.ts
30666
- import path20 from "node:path";
30697
+ import path21 from "node:path";
30667
30698
  function whereHint2(input, title) {
30668
30699
  const named = obj2(input);
30669
30700
  for (const key of ["command", "file_path", "path", "url", "pattern"]) {
@@ -30829,7 +30860,7 @@ async function oneTurn2(io, options) {
30829
30860
  { stringIds: true }
30830
30861
  );
30831
30862
  try {
30832
- const workspacePath = path20.resolve(io.cwd);
30863
+ const workspacePath = path21.resolve(io.cwd);
30833
30864
  const workspace = { workspacePath, workspaceKey: workspacePath };
30834
30865
  let opened;
30835
30866
  if (io.resumeId) {
@@ -31060,7 +31091,7 @@ async function run(io, options, tasks) {
31060
31091
  if (failure2) io.event?.({ kind: "error", data: { text: failure2 } });
31061
31092
  resolve2({ ok: !failure2, error: failure2, result: renderer.result(), replyParts: renderer.replyParts?.(), usage: combinedUsage, context, costUsd, costIncomplete: child.costIncomplete || cost === void 0 && child.costUsd !== void 0 || void 0 });
31062
31093
  };
31063
- const closed = () => end("Codex closed the connection before all work and results finished.");
31094
+ const closed = () => end("Codex connection closed before all work and results finished.");
31064
31095
  io.stdout.once("close", closed);
31065
31096
  const update3 = (id, state, title = "") => {
31066
31097
  if (ended) return;
@@ -31361,15 +31392,15 @@ var userMessage = (prompt) => `${JSON.stringify({ type: "user", message: { role:
31361
31392
  `;
31362
31393
  function claudeOnWindows() {
31363
31394
  const [local, roaming] = [process.env.LOCALAPPDATA?.trim(), process.env.APPDATA?.trim()];
31364
- const packages = local ? path21.join(local, "Packages") : "";
31395
+ const packages = local ? path22.join(local, "Packages") : "";
31365
31396
  const data = [
31366
- ...folders(packages).filter((name) => /^(\w+\.)?Claude_/i.test(name)).sort().map((name) => path21.join(packages, name, "LocalCache", "Roaming", "Claude")),
31367
- ...roaming ? [path21.join(roaming, "Claude")] : []
31397
+ ...folders(packages).filter((name) => /^(\w+\.)?Claude_/i.test(name)).sort().map((name) => path22.join(packages, name, "LocalCache", "Roaming", "Claude")),
31398
+ ...roaming ? [path22.join(roaming, "Claude")] : []
31368
31399
  ];
31369
31400
  return data.flatMap(
31370
- (dir) => latestIn(path21.join(dir, "claude-code")).flatMap((version) => [
31371
- path21.join(version, "claude.exe"),
31372
- ...folders(version).map((build) => path21.join(version, build, "claude.exe"))
31401
+ (dir) => latestIn(path22.join(dir, "claude-code")).flatMap((version) => [
31402
+ path22.join(version, "claude.exe"),
31403
+ ...folders(version).map((build) => path22.join(version, build, "claude.exe"))
31373
31404
  ])
31374
31405
  );
31375
31406
  }
@@ -31627,15 +31658,15 @@ var CLAUDE_CODE = {
31627
31658
  ...latestIn(home(".local", "share", "claude", "versions")),
31628
31659
  // The copy Claude Desktop carries.
31629
31660
  ...process.platform === "win32" ? claudeOnWindows() : latestIn(home("Library", "Application Support", "Claude", "claude-code")).flatMap(
31630
- (version) => folders(version).map((build) => path21.join(version, build, "claude.app", "Contents", "MacOS", "claude"))
31661
+ (version) => folders(version).map((build) => path22.join(version, build, "claude.app", "Contents", "MacOS", "claude"))
31631
31662
  )
31632
31663
  ],
31633
31664
  install: "npm install -g @anthropic-ai/claude-code"
31634
31665
  };
31635
31666
 
31636
31667
  // ../cli/src/lib/agent/harnesses/codex.ts
31637
- import fs19 from "node:fs";
31638
- import path22 from "node:path";
31668
+ import fs20 from "node:fs";
31669
+ import path23 from "node:path";
31639
31670
 
31640
31671
  // ../cli/src/lib/agent/worktree.ts
31641
31672
  import { spawnSync as spawnSync4 } from "node:child_process";
@@ -31682,10 +31713,10 @@ function codexExtraArgs(argv, cwd = REPO_ROOT) {
31682
31713
  }
31683
31714
  const flags = [...argv, ...extra];
31684
31715
  const workspaceWrite = flags.some((arg, i) => arg === "--full-auto" || arg === "--sandbox=workspace-write" || (arg === "--sandbox" || arg === "-s") && flags[i + 1] === "workspace-write");
31685
- if (workspaceWrite && path22.resolve(cwd) !== path22.resolve(REPO_ROOT)) {
31716
+ if (workspaceWrite && path23.resolve(cwd) !== path23.resolve(REPO_ROOT)) {
31686
31717
  for (const dir of [KANBAN, AKB_DIR]) {
31687
- const relative = path22.relative(cwd, dir);
31688
- if (relative === ".." || relative.startsWith(`..${path22.sep}`) || path22.isAbsolute(relative)) {
31718
+ const relative = path23.relative(cwd, dir);
31719
+ if (relative === ".." || relative.startsWith(`..${path23.sep}`) || path23.isAbsolute(relative)) {
31689
31720
  extra.push("--add-dir", dir);
31690
31721
  }
31691
31722
  }
@@ -31708,7 +31739,7 @@ function envRoot(name) {
31708
31739
  }
31709
31740
  function modified(file2) {
31710
31741
  try {
31711
- return fs19.statSync(file2).mtimeMs;
31742
+ return fs20.statSync(file2).mtimeMs;
31712
31743
  } catch {
31713
31744
  return 0;
31714
31745
  }
@@ -31734,28 +31765,28 @@ function codexOnWindows() {
31734
31765
  const local = envRoot("LOCALAPPDATA");
31735
31766
  const profile = envRoot("USERPROFILE");
31736
31767
  const programs = envRoot("ProgramFiles");
31737
- const cache = local ? path22.join(local, "OpenAI", "Codex", "bin") : "";
31738
- const releases = profile ? path22.join(profile, ".codex", "packages", "standalone", "releases") : "";
31739
- const packages = programs ? path22.join(programs, "WindowsApps") : "";
31768
+ const cache = local ? path23.join(local, "OpenAI", "Codex", "bin") : "";
31769
+ const releases = profile ? path23.join(profile, ".codex", "packages", "standalone", "releases") : "";
31770
+ const packages = programs ? path23.join(programs, "WindowsApps") : "";
31740
31771
  return [
31741
31772
  // Desktop's relocated CLI cache: a folder per build hash, newest file first.
31742
- ...byNewest(folders(cache).map((name) => path22.join(cache, name, "codex.exe"))),
31773
+ ...byNewest(folders(cache).map((name) => path23.join(cache, name, "codex.exe"))),
31743
31774
  // The separate standalone launcher, at a path with nothing variable in it.
31744
- ...local ? [path22.join(local, "Programs", "OpenAI", "Codex", "bin", "codex.exe")] : [],
31775
+ ...local ? [path23.join(local, "Programs", "OpenAI", "Codex", "bin", "codex.exe")] : [],
31745
31776
  // That launcher's release payload: a folder per version and target.
31746
31777
  ...byVersion(folders(releases).filter(ourArch)).map(
31747
- (name) => path22.join(releases, name, "bin", "codex.exe")
31778
+ (name) => path23.join(releases, name, "bin", "codex.exe")
31748
31779
  ),
31749
31780
  // Desktop's own MSIX package.
31750
31781
  ...byVersion(folders(packages).filter((name) => name.startsWith("OpenAI.Codex_")).filter(ourArch)).map(
31751
- (name) => path22.join(packages, name, "app", "resources", "codex.exe")
31782
+ (name) => path23.join(packages, name, "app", "resources", "codex.exe")
31752
31783
  )
31753
31784
  ];
31754
31785
  }
31755
31786
  function codexInstalls() {
31756
31787
  const chosen = process.env.CODEX_INSTALL_DIR?.trim();
31757
31788
  return [
31758
- ...chosen ? [path22.join(chosen, "codex")] : [],
31789
+ ...chosen ? [path23.join(chosen, "codex")] : [],
31759
31790
  ...process.platform === "win32" ? codexOnWindows() : [
31760
31791
  // macOS, where Codex now lives in the merged app — `codex-cli/bin/` since 26.928…
31761
31792
  "/Applications/ChatGPT.app/Contents/Resources/codex-cli/bin/codex",
@@ -31801,7 +31832,7 @@ var CODEX = {
31801
31832
  systemPrompt(text3, argv) {
31802
31833
  if (namesFlag(argv, ["developer_instructions", "model_instructions_file"])) return {};
31803
31834
  try {
31804
- const config = fs19.readFileSync(path22.join(process.env.CODEX_HOME || home(".codex"), "config.toml"), "utf8");
31835
+ const config = fs20.readFileSync(path23.join(process.env.CODEX_HOME || home(".codex"), "config.toml"), "utf8");
31805
31836
  if (/^\s*(?:developer_instructions|model_instructions_file)\s*=/m.test(config)) return {};
31806
31837
  } catch {
31807
31838
  }
@@ -32047,24 +32078,24 @@ var CURSOR = {
32047
32078
  };
32048
32079
 
32049
32080
  // ../cli/src/lib/agent/harnesses/dsh.ts
32050
- import fs20 from "node:fs";
32051
- import path23 from "node:path";
32081
+ import fs21 from "node:fs";
32082
+ import path24 from "node:path";
32052
32083
  function dshHome(argv) {
32053
32084
  const binary = argv[0];
32054
32085
  if (!binary) return void 0;
32055
- const names2 = process.platform === "win32" && !path23.extname(binary) ? [".exe", ".cmd"].map((ext) => binary + ext) : [binary];
32056
- const candidates = binary.includes("/") || binary.includes("\\") ? names2 : (process.env.PATH ?? "").split(path23.delimiter).filter(Boolean).flatMap((dir2) => names2.map((name) => path23.join(dir2, name)));
32086
+ const names2 = process.platform === "win32" && !path24.extname(binary) ? [".exe", ".cmd"].map((ext) => binary + ext) : [binary];
32087
+ const candidates = binary.includes("/") || binary.includes("\\") ? names2 : (process.env.PATH ?? "").split(path24.delimiter).filter(Boolean).flatMap((dir2) => names2.map((name) => path24.join(dir2, name)));
32057
32088
  let dir;
32058
32089
  try {
32059
- const found = candidates.find((candidate) => fs20.existsSync(candidate));
32090
+ const found = candidates.find((candidate) => fs21.existsSync(candidate));
32060
32091
  if (!found) return void 0;
32061
- const script = /\.cmd$/i.test(found) ? shimTarget(fs20.readFileSync(found, "utf8"), found)?.script : void 0;
32062
- dir = path23.dirname(fs20.realpathSync(script ?? found));
32092
+ const script = /\.cmd$/i.test(found) ? shimTarget(fs21.readFileSync(found, "utf8"), found)?.script : void 0;
32093
+ dir = path24.dirname(fs21.realpathSync(script ?? found));
32063
32094
  } catch {
32064
32095
  return void 0;
32065
32096
  }
32066
- for (let up = path23.dirname(dir); dir !== up; up = path23.dirname(dir)) {
32067
- if (fs20.existsSync(path23.join(dir, "package.json"))) return dir;
32097
+ for (let up = path24.dirname(dir); dir !== up; up = path24.dirname(dir)) {
32098
+ if (fs21.existsSync(path24.join(dir, "package.json"))) return dir;
32068
32099
  dir = up;
32069
32100
  }
32070
32101
  return void 0;
@@ -32713,14 +32744,14 @@ var listed = (harness) => async () => (harness.models?.() ?? []).map((id) => ({
32713
32744
  var readModels = (name) => (MODELS[name] ?? listed(HARNESSES2[name]))().catch(() => []);
32714
32745
  var MODELS = {
32715
32746
  "claude-code": async () => {
32716
- const cached2 = claudeModels(path24.join(process.env.CLAUDE_CONFIG_DIR || path24.join(os6.homedir(), ".claude"), "cache", "model-catalog"));
32747
+ const cached2 = claudeModels(path25.join(process.env.CLAUDE_CONFIG_DIR || path25.join(os6.homedir(), ".claude"), "cache", "model-catalog"));
32717
32748
  return cached2.length ? cached2 : [
32718
32749
  { id: "opus", name: "Opus" },
32719
32750
  { id: "sonnet", name: "Sonnet" },
32720
32751
  { id: "haiku", name: "Haiku" }
32721
32752
  ];
32722
32753
  },
32723
- codex: async () => codexModels(path24.join(process.env.CODEX_HOME || path24.join(os6.homedir(), ".codex"), "models_cache.json")),
32754
+ codex: async () => codexModels(path25.join(process.env.CODEX_HOME || path25.join(os6.homedir(), ".codex"), "models_cache.json")),
32724
32755
  opencode: async () => opencodeModels(await output(commandOf(HARNESSES2.opencode)[0], ["models"])),
32725
32756
  cursor: () => cursorModels(),
32726
32757
  antigravity: async () => antigravityModels(await output(commandOf(HARNESSES2.antigravity)[0], ["models"]))
@@ -32780,7 +32811,7 @@ function output(command, args2) {
32780
32811
  }
32781
32812
  function codexModels(file2) {
32782
32813
  try {
32783
- const cache = JSON.parse(fs21.readFileSync(file2, "utf8"));
32814
+ const cache = JSON.parse(fs22.readFileSync(file2, "utf8"));
32784
32815
  if (!Array.isArray(cache.models)) return [];
32785
32816
  return cache.models.flatMap(
32786
32817
  (m) => m.visibility === "list" && typeof m.slug === "string" && m.slug ? [{ id: m.slug, name: typeof m.display_name === "string" && m.display_name ? m.display_name : m.slug }] : []
@@ -32792,13 +32823,13 @@ function codexModels(file2) {
32792
32823
  function claudeModels(dir) {
32793
32824
  let files;
32794
32825
  try {
32795
- files = fs21.readdirSync(dir).filter((f) => f.endsWith(".json"));
32826
+ files = fs22.readdirSync(dir).filter((f) => f.endsWith(".json"));
32796
32827
  } catch {
32797
32828
  return [];
32798
32829
  }
32799
32830
  const catalogs = files.flatMap((f) => {
32800
32831
  try {
32801
- const data = obj2(JSON.parse(fs21.readFileSync(path24.join(dir, f), "utf8")));
32832
+ const data = obj2(JSON.parse(fs22.readFileSync(path25.join(dir, f), "utf8")));
32802
32833
  const catalog = obj2(data.catalog);
32803
32834
  const surface = str3(catalog.surface);
32804
32835
  return surface === "cc" || surface === "ccd" ? [{ surface, at: Number(data.fetchedAt) || 0, config: obj2(catalog.config) }] : [];
@@ -32844,43 +32875,43 @@ function probeLogin(binary, harness) {
32844
32875
  }
32845
32876
 
32846
32877
  // src/akb.ts
32847
- import fs22 from "node:fs";
32848
- import path25 from "node:path";
32878
+ import fs23 from "node:fs";
32879
+ import path26 from "node:path";
32849
32880
  import { fileURLToPath as fileURLToPath2, pathToFileURL } from "node:url";
32850
- var akbHome = () => path25.join(runnerHome(), "bin", "akb");
32881
+ var akbHome = () => path26.join(runnerHome(), "bin", "akb");
32851
32882
  var BUNDLED_SHIM = `bundled-${AKB_VERSION}`;
32852
- var HERE = path25.dirname(fileURLToPath2(import.meta.url));
32883
+ var HERE = path26.dirname(fileURLToPath2(import.meta.url));
32853
32884
  function akbArgs(entry, dist = HERE) {
32854
- const preload = path25.join(dist, "akb-proxy.mjs");
32855
- return fs22.existsSync(preload) ? ["--import", pathToFileURL(preload).href, entry] : [entry];
32885
+ const preload = path26.join(dist, "akb-proxy.mjs");
32886
+ return fs23.existsSync(preload) ? ["--import", pathToFileURL(preload).href, entry] : [entry];
32856
32887
  }
32857
32888
  var bundledAkb = (dist = HERE) => ({
32858
32889
  command: process.execPath,
32859
- args: akbArgs(path25.join(dist, "akb", "bin", "ai4kanban.mjs"), dist),
32890
+ args: akbArgs(path26.join(dist, "akb", "bin", "ai4kanban.mjs"), dist),
32860
32891
  version: AKB_VERSION,
32861
- shim: path25.join(akbHome(), BUNDLED_SHIM)
32892
+ shim: path26.join(akbHome(), BUNDLED_SHIM)
32862
32893
  });
32863
32894
  var quote = (s) => /^[\w./:@=-]+$/.test(s) ? s : `"${s}"`;
32864
32895
  function shimDir(akb) {
32865
32896
  const dir = akb.shim;
32866
32897
  const line = [akb.command, ...akb.args].map(quote).join(" ");
32867
- const [file2, text3] = process.platform === "win32" ? [path25.join(dir, "akb.cmd"), `@${line} %*\r
32868
- `] : [path25.join(dir, "akb"), `#!/bin/sh
32898
+ const [file2, text3] = process.platform === "win32" ? [path26.join(dir, "akb.cmd"), `@${line} %*\r
32899
+ `] : [path26.join(dir, "akb"), `#!/bin/sh
32869
32900
  exec ${line} "$@"
32870
32901
  `];
32871
32902
  if (process.platform === "win32") {
32872
- fs22.mkdirSync(dir, { recursive: true });
32903
+ fs23.mkdirSync(dir, { recursive: true });
32873
32904
  const shellLine = [akb.command, ...akb.args].map((s) => `'${s.replaceAll("\\", "/").replaceAll("'", "'\\''")}'`).join(" ");
32874
- fs22.writeFileSync(path25.join(dir, "akb"), `#!/bin/sh
32905
+ fs23.writeFileSync(path26.join(dir, "akb"), `#!/bin/sh
32875
32906
  exec ${shellLine} "$@"
32876
32907
  `, { mode: 493 });
32877
32908
  }
32878
32909
  try {
32879
- if (fs22.readFileSync(file2, "utf8") === text3) return dir;
32910
+ if (fs23.readFileSync(file2, "utf8") === text3) return dir;
32880
32911
  } catch {
32881
32912
  }
32882
- fs22.mkdirSync(dir, { recursive: true });
32883
- fs22.writeFileSync(file2, text3, { mode: 493 });
32913
+ fs23.mkdirSync(dir, { recursive: true });
32914
+ fs23.writeFileSync(file2, text3, { mode: 493 });
32884
32915
  return dir;
32885
32916
  }
32886
32917
  var KEEP = 256 * 1024;
@@ -32888,11 +32919,11 @@ var KEEP = 256 * 1024;
32888
32919
  // src/lock.ts
32889
32920
  import crypto4 from "node:crypto";
32890
32921
  import net from "node:net";
32891
- import path26 from "node:path";
32922
+ import path27 from "node:path";
32892
32923
  function lockPath() {
32893
32924
  const home3 = runnerHome();
32894
32925
  if (process.platform === "win32") return `\\\\.\\pipe\\wildcrane-${crypto4.createHash("sha256").update(home3).digest("hex").slice(0, 16)}`;
32895
- return path26.join(home3, "runner.sock");
32926
+ return path27.join(home3, "runner.sock");
32896
32927
  }
32897
32928
  function runnerSettingsSupport() {
32898
32929
  return new Promise((resolve2) => {
@@ -32925,37 +32956,6 @@ import { spawn as spawn3 } from "node:child_process";
32925
32956
  import crypto5 from "node:crypto";
32926
32957
  import http from "node:http";
32927
32958
 
32928
- // src/settings-control.ts
32929
- import fs23 from "node:fs";
32930
- import path27 from "node:path";
32931
- var directory = () => path27.join(runnerHome(), "executors");
32932
- var epochFile = () => path27.join(runnerHome(), "account-generation");
32933
- function accountGeneration() {
32934
- try {
32935
- return fs23.readFileSync(epochFile(), "utf8");
32936
- } catch {
32937
- return "";
32938
- }
32939
- }
32940
- async function stopExecutors() {
32941
- fs23.mkdirSync(runnerHome(), { recursive: true, mode: 448 });
32942
- fs23.writeFileSync(epochFile(), `${Date.now()}-${process.pid}`, { mode: 384 });
32943
- for (let n = 0; n < 160; n++) {
32944
- const active = fs23.existsSync(directory()) ? fs23.readdirSync(directory()).filter((name) => {
32945
- try {
32946
- process.kill(Number(name.split(".")[0]), 0);
32947
- return true;
32948
- } catch {
32949
- fs23.rmSync(path27.join(directory(), name), { force: true });
32950
- return false;
32951
- }
32952
- }) : [];
32953
- if (!active.length) return true;
32954
- await new Promise((resolve2) => setTimeout(resolve2, 100));
32955
- }
32956
- return false;
32957
- }
32958
-
32959
32959
  // src/i18n.ts
32960
32960
  var ZH_HOLDER = { "claude-code": "Claude Code", codex: "Codex", cursor: "Cursor", dsh: "dsh", zcode: "ZCode", kimi: "Kimi Code", terminal: "\u672C\u673A\u7EC8\u7AEF" };
32961
32961
  var EN_HOLDER = { "claude-code": "Claude Code", codex: "Codex", cursor: "Cursor", dsh: "dsh", zcode: "ZCode", kimi: "Kimi Code", terminal: "the terminal" };