wildcrane-runner 0.6.46 → 0.6.48
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/akb/dist/kanban.mjs +17 -7
- package/dist/akb/package.json +1 -1
- package/dist/akb-proxy.mjs +1 -1
- package/dist/launcher.mjs +33 -20
- package/dist/plugin.mjs +39 -26
- package/dist/runner.mjs +153 -33
- package/dist/settings.mjs +32 -20
- package/package.json +1 -1
package/dist/akb/dist/kanban.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// ai4kanban 0.11.
|
|
2
|
+
// ai4kanban 0.11.42 — built by runner/scripts/build.mjs. Do not edit.
|
|
3
3
|
import { createRequire as __ai4kanbanRequire } from 'node:module'
|
|
4
4
|
const require = __ai4kanbanRequire(import.meta.url)
|
|
5
5
|
var __create = Object.create;
|
|
@@ -4207,7 +4207,7 @@ var init_package = __esm({
|
|
|
4207
4207
|
"../cli/package.json"() {
|
|
4208
4208
|
package_default = {
|
|
4209
4209
|
name: "wildcrane",
|
|
4210
|
-
version: "0.11.
|
|
4210
|
+
version: "0.11.42",
|
|
4211
4211
|
akbContract: 11,
|
|
4212
4212
|
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.",
|
|
4213
4213
|
keywords: [
|
|
@@ -9193,6 +9193,16 @@ var init_roles = __esm({
|
|
|
9193
9193
|
}
|
|
9194
9194
|
});
|
|
9195
9195
|
|
|
9196
|
+
// ../cli/src/lib/shared/file-limits.ts
|
|
9197
|
+
var BOARD_FILE_LIMIT, ASSET_FILE_LIMIT;
|
|
9198
|
+
var init_file_limits = __esm({
|
|
9199
|
+
"../cli/src/lib/shared/file-limits.ts"() {
|
|
9200
|
+
"use strict";
|
|
9201
|
+
BOARD_FILE_LIMIT = 10 * 1024 * 1024;
|
|
9202
|
+
ASSET_FILE_LIMIT = 100 * 1024 * 1024;
|
|
9203
|
+
}
|
|
9204
|
+
});
|
|
9205
|
+
|
|
9196
9206
|
// ../cli/src/lib/shared/board-files.ts
|
|
9197
9207
|
function studioRenamed(path86, content) {
|
|
9198
9208
|
const to = path86.replace(/^(rules\/)?workflows\//, "$1studios/").replace(/^(studios\/[^/]+)\/WORKFLOW\.md$/, "$1/STUDIO.md");
|
|
@@ -9204,11 +9214,11 @@ function studioRenamed(path86, content) {
|
|
|
9204
9214
|
const renamed = front.replace(/^workflow:[ \t]*(.*)$/m, (_, id) => `studio: ${id === "workflow-builder" ? "studio-builder" : id}`);
|
|
9205
9215
|
return { path: to, content: renamed + body };
|
|
9206
9216
|
}
|
|
9207
|
-
var
|
|
9217
|
+
var cardSlug, studioFolder, studioName, draftFolder;
|
|
9208
9218
|
var init_board_files = __esm({
|
|
9209
9219
|
"../cli/src/lib/shared/board-files.ts"() {
|
|
9210
9220
|
"use strict";
|
|
9211
|
-
|
|
9221
|
+
init_file_limits();
|
|
9212
9222
|
cardSlug = (task) => task.toLowerCase().replace(/_/g, "-");
|
|
9213
9223
|
studioFolder = (id) => id.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
9214
9224
|
studioName = (id) => id.startsWith("wf_builtin_") ? id.slice("wf_builtin_".length).replace(/_/g, "-") : studioFolder(id);
|
|
@@ -23085,7 +23095,7 @@ var init_add_task = __esm({
|
|
|
23085
23095
|
var archive_default;
|
|
23086
23096
|
var init_archive2 = __esm({
|
|
23087
23097
|
"../cli/src/guide/archive.md"() {
|
|
23088
|
-
archive_default = "# Finish a task\n\n## Write the shipped line\n\nRecord each user-facing outcome on one line in `docs/kanban/memory/readme.md`, under the\n`## <module>` heading the card's `modules:` names. Do not record internal-only changes. Use\nformats like these:\n\n- \u2705 Exporting a report to PDF: [Export reports](https://docs.example.com/export). Link to\n a published doc when available; do not restate it.\n- \u2705 Customers can pay an invoice by bank transfer from the billing page. When no doc\n exists, state plainly what the user can now do.\n- \u274C The orders table moved to a new database cluster. This describes infrastructure, not\n user-facing behavior.\n\n## Archive the card\n\nUse `akb raw delivery complete <id>` to finish your current studio step. The last step archives\nthe card and prints its handoff. Earlier steps leave it for the remaining studio agents.\nOutside an active delivery, use `akb raw archive <id>` or `akb raw reject <id>`.\n\n**Never finish a task by hand.** Deleting the card file yourself leaves other cards'\n`blocked_by:` and `related:` pointing at a card that no longer exists \u2014 the command is what\nfinds those, and nothing else will. A run that does this is reported as having broken the\nboard.\n\
|
|
23098
|
+
archive_default = "# Finish a task\n\n## Write the shipped line\n\nRecord each user-facing outcome on one line in `docs/kanban/memory/readme.md`, under the\n`## <module>` heading the card's `modules:` names. Do not record internal-only changes. Use\nformats like these:\n\n- \u2705 Exporting a report to PDF: [Export reports](https://docs.example.com/export). Link to\n a published doc when available; do not restate it.\n- \u2705 Customers can pay an invoice by bank transfer from the billing page. When no doc\n exists, state plainly what the user can now do.\n- \u274C The orders table moved to a new database cluster. This describes infrastructure, not\n user-facing behavior.\n\n## Archive the card\n\nUse `akb raw delivery complete <id>` to finish your current studio step. The last step archives\nthe card and prints its handoff. Earlier steps leave it for the remaining studio agents.\nOutside an active delivery, use `akb raw archive <id>` or `akb raw reject <id>`.\n\n**Never finish a task by hand.** Deleting the card file yourself leaves other cards'\n`blocked_by:` and `related:` pointing at a card that no longer exists \u2014 the command is what\nfinds those, and nothing else will. A run that does this is reported as having broken the\nboard.\n\nBefore completing a step, verify its approved requirements and required outputs; before the\nlast step, verify every delivery condition, including any required publication and live checks.\nRecord the verification results on the card, leave unmet work unchecked, and handle user-action\nblockers through `akb guide implement`. Preparation, a merged commit or a handoff in the final\nreply does not establish delivery.\n\nOnce those checks pass, run `akb raw delivery complete <id>` and follow its handoff. Software\nsteps in a git project supply `--commit <full-sha> --branch <target>`.\nIf completion was interrupted, inspect the recorded result and retry the same completion.\n";
|
|
23089
23099
|
}
|
|
23090
23100
|
});
|
|
23091
23101
|
|
|
@@ -23125,7 +23135,7 @@ var init_describe_project = __esm({
|
|
|
23125
23135
|
var discuss_goal_default;
|
|
23126
23136
|
var init_discuss_goal = __esm({
|
|
23127
23137
|
"../cli/src/guide/discuss-goal.md"() {
|
|
23128
|
-
discuss_goal_default = '# Discuss a goal\n\nThis flow only helps the user settle goals; refining, previewing, and running them come later.\n\n- **Remote user**: the user works remotely and sees only tasks and their previews, never local files.\n- **
|
|
23138
|
+
discuss_goal_default = '# Discuss a goal\n\nThis flow only helps the user settle goals; refining, previewing, and running them come later.\n\n- **Remote user**: the user works remotely and sees only tasks and their previews, never local files.\n- **Investigate here**: complete checks, diagnosis, audits, and similar investigations in this session, using `akb guide troubleshoot` for software failures; never create investigation or \u201Cinvestigate then fix\u201D goals.\n- **Concrete goals**: when a change needs investigation, save a goal only after the findings establish the concrete change; if verification is blocked, report what remains unverified instead of deferring it to a goal.\n\n## Goals\n\n- **Missing information**: ask the user for information needed to form a goal.\n- **Save**: once a goal is clear, save or update it with `akb goal` (see `akb goal --help`), then stop; an existing build continues in its current session.\n- **Goal format**: each goal has a title, an outcome of at most 150 words, and a `## Done when` list of verifiable acceptance criteria, without technical design.\n- **Independent deliverables**: save separate deliverables as separate goals; remove a replaced goal with `akb goal drop --id <goal>`.\n- **Studio**: pick the studio from `akb studio list` that fits the actual work; prefer the user\u2019s choice.\n- **Review points**: save through `--previews` the agents from `akb raw previews --triggers --studio <id>` whose conditions the goal meets, always including those marked `Always`, or an empty list.\n- **Use judgment**: settle outcome decisions you can and explain them; ask only for decisions the user must make that change the result, with a recommendation.\n- **Plain words**: answer directly using everyday words.\n- **Hide machinery**: omit plans, files, paths, commands, tools, and connectors from replies; refer to actions by their button labels.\n- **Starting a goal**: "Start now" (\u7ACB\u5373\u5F00\u59CB) begins the work directly; "Refine goal" (\u7EC6\u5316\u76EE\u6807) appears only when the goal has review points, and shows their previews for approval first.\n- **Anything else**: for a request this guide does not cover, read `akb help` once, then the matching command\'s `--help`.\n';
|
|
23129
23139
|
}
|
|
23130
23140
|
});
|
|
23131
23141
|
|
|
@@ -23141,7 +23151,7 @@ var init_follow_up = __esm({
|
|
|
23141
23151
|
var implement_default;
|
|
23142
23152
|
var init_implement = __esm({
|
|
23143
23153
|
"../cli/src/guide/implement.md"() {
|
|
23144
|
-
implement_default = "# Implement the approved requirements\n\nBuild the approved card or plan directly. Preserve settled decisions and unrelated questions;\ndo not replace or contradict the approved requirements. With no card, build only the given\nrequirement and create no card.\n\n- **Check applicability**: use the working directory, project instructions, configuration\n sources and change history as evidence; missing configuration alone does not make a check\n inapplicable. Explain any inapplicable check and its alternative verification; never report\n an unrun or failing check as passed. Do not bypass checks with empty configuration, disabled\n checks or lower standards.\n- **User-action blockers**: ask only when
|
|
23154
|
+
implement_default = "# Implement the approved requirements\n\nBuild the approved card or plan directly. Preserve settled decisions and unrelated questions;\ndo not replace or contradict the approved requirements. With no card, build only the given\nrequirement and create no card.\n\n- **Check applicability**: use the working directory, project instructions, configuration\n sources and change history as evidence; missing configuration alone does not make a check\n inapplicable. Explain any inapplicable check and its alternative verification; never report\n an unrun or failing check as passed. Do not bypass checks with empty configuration, disabled\n checks or lower standards.\n- **Authorization**: approval covers the necessary operations within the agreed scope and\n constraints; carry it across commands, tools and stages without repeated confirmation.\n- **User-action blockers**: resolve routine choices and problems yourself; ask only when\n reasonable investigation leaves a blocker requiring user action or a decision beyond the\n approved scope. On a card, use `akb guide update-questions`, stating what you tried, what\n is blocked and your recommendation; continue independent work.\n- **Defer what can wait**: follow `akb guide follow-up` for work this build does not require;\n never ask about it or let it block this build.\n- **Decisions made while building**: record an answered material decision the user could\n reasonably reverse under `## Worth noting after implementation` on the card.\n- **Resume**: inspect the existing result and the unchecked todos, carry completed steps\n forward, and finish the remaining todos before recording completion.\n";
|
|
23145
23155
|
}
|
|
23146
23156
|
});
|
|
23147
23157
|
|
package/dist/akb/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"wildcrane","version":"0.11.
|
|
1
|
+
{"name":"wildcrane","version":"0.11.42","akbContract":11,"type":"module","private":true}
|
package/dist/akb-proxy.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.48 — 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;
|
package/dist/launcher.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.48 — 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;
|
|
@@ -26670,6 +26670,15 @@ ${captureLines}` : capture.stack;
|
|
|
26670
26670
|
}
|
|
26671
26671
|
});
|
|
26672
26672
|
|
|
26673
|
+
// src/startup.ts
|
|
26674
|
+
import os from "node:os";
|
|
26675
|
+
try {
|
|
26676
|
+
process.cwd();
|
|
26677
|
+
} catch (error) {
|
|
26678
|
+
if (error.code !== "ENOENT") throw error;
|
|
26679
|
+
process.chdir(os.homedir());
|
|
26680
|
+
}
|
|
26681
|
+
|
|
26673
26682
|
// src/launcher-main.ts
|
|
26674
26683
|
import path30 from "node:path";
|
|
26675
26684
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
@@ -26677,7 +26686,7 @@ import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
|
26677
26686
|
// src/home.ts
|
|
26678
26687
|
import crypto from "node:crypto";
|
|
26679
26688
|
import fs from "node:fs";
|
|
26680
|
-
import
|
|
26689
|
+
import os2 from "node:os";
|
|
26681
26690
|
import path from "node:path";
|
|
26682
26691
|
import { parseEnv } from "node:util";
|
|
26683
26692
|
|
|
@@ -26753,7 +26762,7 @@ function followProxy(read2) {
|
|
|
26753
26762
|
|
|
26754
26763
|
// src/home.ts
|
|
26755
26764
|
function runnerHome() {
|
|
26756
|
-
return process.env.WILDCRANE_HOME || path.join(
|
|
26765
|
+
return process.env.WILDCRANE_HOME || path.join(os2.homedir(), ".wildcrane");
|
|
26757
26766
|
}
|
|
26758
26767
|
function useRunnerHome() {
|
|
26759
26768
|
process.env.AI4KANBAN_HOME = runnerHome();
|
|
@@ -26786,7 +26795,7 @@ function machineId() {
|
|
|
26786
26795
|
`);
|
|
26787
26796
|
return id;
|
|
26788
26797
|
}
|
|
26789
|
-
var machineName = () =>
|
|
26798
|
+
var machineName = () => os2.hostname().replace(/\.local$/, "");
|
|
26790
26799
|
|
|
26791
26800
|
// src/launcher.ts
|
|
26792
26801
|
import { spawn } from "node:child_process";
|
|
@@ -26889,8 +26898,8 @@ function saveAlphaUpdates(value) {
|
|
|
26889
26898
|
}
|
|
26890
26899
|
|
|
26891
26900
|
// src/protocol.ts
|
|
26892
|
-
var VERSION = true ? "0.6.
|
|
26893
|
-
var AKB_VERSION = true ? "0.11.
|
|
26901
|
+
var VERSION = true ? "0.6.48" : "0.0.0";
|
|
26902
|
+
var AKB_VERSION = true ? "0.11.42" : "0.0.0";
|
|
26894
26903
|
var EXIT_REFUSED = 10;
|
|
26895
26904
|
var EXIT_OUTDATED = 11;
|
|
26896
26905
|
var EXIT_UPDATE = 12;
|
|
@@ -27121,6 +27130,7 @@ async function candidates(own2) {
|
|
|
27121
27130
|
function runOnce(candidate, options) {
|
|
27122
27131
|
return new Promise((resolve2) => {
|
|
27123
27132
|
const child = spawn(process.execPath, [candidate.entry], {
|
|
27133
|
+
cwd: path4.dirname(candidate.entry),
|
|
27124
27134
|
stdio: ["ignore", options.quiet ? 2 : "inherit", "inherit", "ipc"],
|
|
27125
27135
|
env: { ...process.env, WILDCRANE_RUNNER_VERSION: candidate.version, WILDCRANE_RUNNER_KIND: options.kind ?? "terminal" }
|
|
27126
27136
|
});
|
|
@@ -27239,10 +27249,10 @@ import fs5 from "node:fs";
|
|
|
27239
27249
|
import path6 from "node:path";
|
|
27240
27250
|
|
|
27241
27251
|
// ../cli/src/lib/machine/home.ts
|
|
27242
|
-
import
|
|
27252
|
+
import os3 from "node:os";
|
|
27243
27253
|
import path5 from "node:path";
|
|
27244
27254
|
function machineHome() {
|
|
27245
|
-
return process.env.AI4KANBAN_HOME || path5.join(
|
|
27255
|
+
return process.env.AI4KANBAN_HOME || path5.join(os3.homedir(), ".ai4kanban");
|
|
27246
27256
|
}
|
|
27247
27257
|
|
|
27248
27258
|
// ../cli/src/lib/cloud/session.ts
|
|
@@ -27747,8 +27757,11 @@ import path16 from "node:path";
|
|
|
27747
27757
|
import fs12 from "node:fs";
|
|
27748
27758
|
import path14 from "node:path";
|
|
27749
27759
|
|
|
27760
|
+
// ../cli/src/lib/shared/file-limits.ts
|
|
27761
|
+
var BOARD_FILE_LIMIT = 10 * 1024 * 1024;
|
|
27762
|
+
var ASSET_FILE_LIMIT = 100 * 1024 * 1024;
|
|
27763
|
+
|
|
27750
27764
|
// ../cli/src/lib/shared/board-files.ts
|
|
27751
|
-
var BOARD_FILE_LIMIT = 256 * 1024;
|
|
27752
27765
|
var studioFolder = (id) => id.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
27753
27766
|
var studioName = (id) => id.startsWith("wf_builtin_") ? id.slice("wf_builtin_".length).replace(/_/g, "-") : studioFolder(id);
|
|
27754
27767
|
|
|
@@ -28648,7 +28661,7 @@ var flows = memoByFiles(sources, readFlows);
|
|
|
28648
28661
|
|
|
28649
28662
|
// src/folders.ts
|
|
28650
28663
|
import fs13 from "node:fs";
|
|
28651
|
-
import
|
|
28664
|
+
import os4 from "node:os";
|
|
28652
28665
|
import path15 from "node:path";
|
|
28653
28666
|
var projectsFile = () => path15.join(runnerHome(), "projects.json");
|
|
28654
28667
|
function realpath(p) {
|
|
@@ -28731,7 +28744,7 @@ var allow = (dir) => {
|
|
|
28731
28744
|
var disallow = (dir) => update((list) => list.filter((p) => p !== dir));
|
|
28732
28745
|
var SYSTEM_MAC = ["/System", "/Library", "/Applications", "/usr", "/bin", "/sbin", "/etc", "/var", "/private", "/opt", "/cores", "/dev"];
|
|
28733
28746
|
var SYSTEM_WIN = ["Windows", "Program Files", "Program Files (x86)", "ProgramData"];
|
|
28734
|
-
var here = () => ({ platform: process.platform, home:
|
|
28747
|
+
var here = () => ({ platform: process.platform, home: os4.homedir(), resolve: realpath });
|
|
28735
28748
|
function refusal(picked, where = here()) {
|
|
28736
28749
|
const win = where.platform === "win32";
|
|
28737
28750
|
const p = win ? path15.win32 : path15.posix;
|
|
@@ -28878,7 +28891,7 @@ function installKanbanSkill(dir) {
|
|
|
28878
28891
|
// src/runtimes.ts
|
|
28879
28892
|
import { spawn as spawn5 } from "node:child_process";
|
|
28880
28893
|
import fs22 from "node:fs";
|
|
28881
|
-
import
|
|
28894
|
+
import os6 from "node:os";
|
|
28882
28895
|
import path25 from "node:path";
|
|
28883
28896
|
|
|
28884
28897
|
// ../cli/src/lib/agent/argv.ts
|
|
@@ -29030,7 +29043,7 @@ import path22 from "node:path";
|
|
|
29030
29043
|
// ../cli/src/lib/agent/locate.ts
|
|
29031
29044
|
import { spawn as spawn4, spawnSync as spawnSync2 } from "node:child_process";
|
|
29032
29045
|
import fs18 from "node:fs";
|
|
29033
|
-
import
|
|
29046
|
+
import os5 from "node:os";
|
|
29034
29047
|
import path20 from "node:path";
|
|
29035
29048
|
|
|
29036
29049
|
// ../cli/src/lib/agent/installed.ts
|
|
@@ -29170,7 +29183,7 @@ function latestIn(parent, tail = "") {
|
|
|
29170
29183
|
}
|
|
29171
29184
|
var env = (name) => process.env[name]?.trim() ?? "";
|
|
29172
29185
|
function commonDirs() {
|
|
29173
|
-
const home3 =
|
|
29186
|
+
const home3 = os5.homedir();
|
|
29174
29187
|
const under = (...parts) => path20.join(home3, ...parts);
|
|
29175
29188
|
const nodes = (root2, tail = []) => root2 ? folders(root2).map((version) => path20.join(root2, version, ...tail)) : [];
|
|
29176
29189
|
if (WINDOWS2) {
|
|
@@ -29276,7 +29289,7 @@ function copyEnv(file2, given = process.env) {
|
|
|
29276
29289
|
if (!path20.isAbsolute(file2)) return given;
|
|
29277
29290
|
return { ...given, PATH: [path20.dirname(file2), given.PATH].filter(Boolean).join(path20.delimiter) };
|
|
29278
29291
|
}
|
|
29279
|
-
var probeOptions = (file2) => ({ cwd:
|
|
29292
|
+
var probeOptions = (file2) => ({ cwd: os5.tmpdir(), env: copyEnv(file2), windowsHide: true, shell: false });
|
|
29280
29293
|
function probe(file2) {
|
|
29281
29294
|
const key = keyOf(file2);
|
|
29282
29295
|
const start = spawnable(file2, ["--version"], { ...probeOptions(file2), stdio: ["ignore", "pipe", "pipe"], timeout: PROBE_MS });
|
|
@@ -30471,7 +30484,7 @@ function createTail(log) {
|
|
|
30471
30484
|
// ../cli/package.json
|
|
30472
30485
|
var package_default = {
|
|
30473
30486
|
name: "wildcrane",
|
|
30474
|
-
version: "0.11.
|
|
30487
|
+
version: "0.11.42",
|
|
30475
30488
|
akbContract: 11,
|
|
30476
30489
|
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.",
|
|
30477
30490
|
keywords: [
|
|
@@ -32511,14 +32524,14 @@ var listed = (harness) => async () => (harness.models?.() ?? []).map((id) => ({
|
|
|
32511
32524
|
var readModels = (name) => (MODELS[name] ?? listed(HARNESSES2[name]))().catch(() => []);
|
|
32512
32525
|
var MODELS = {
|
|
32513
32526
|
"claude-code": async () => {
|
|
32514
|
-
const cached2 = claudeModels(path25.join(process.env.CLAUDE_CONFIG_DIR || path25.join(
|
|
32527
|
+
const cached2 = claudeModels(path25.join(process.env.CLAUDE_CONFIG_DIR || path25.join(os6.homedir(), ".claude"), "cache", "model-catalog"));
|
|
32515
32528
|
return cached2.length ? cached2 : [
|
|
32516
32529
|
{ id: "opus", name: "Opus" },
|
|
32517
32530
|
{ id: "sonnet", name: "Sonnet" },
|
|
32518
32531
|
{ id: "haiku", name: "Haiku" }
|
|
32519
32532
|
];
|
|
32520
32533
|
},
|
|
32521
|
-
codex: async () => codexModels(path25.join(process.env.CODEX_HOME || path25.join(
|
|
32534
|
+
codex: async () => codexModels(path25.join(process.env.CODEX_HOME || path25.join(os6.homedir(), ".codex"), "models_cache.json")),
|
|
32522
32535
|
opencode: async () => opencodeModels(await output(commandOf(HARNESSES2.opencode)[0], ["models"])),
|
|
32523
32536
|
cursor: () => cursorModels()
|
|
32524
32537
|
};
|
|
@@ -32530,7 +32543,7 @@ function cursorModels() {
|
|
|
32530
32543
|
return new Promise((resolve2) => {
|
|
32531
32544
|
let child;
|
|
32532
32545
|
try {
|
|
32533
|
-
const start = spawnable(argv[0], argv.slice(1), { cwd:
|
|
32546
|
+
const start = spawnable(argv[0], argv.slice(1), { cwd: os6.tmpdir(), stdio: ["pipe", "pipe", "ignore"], env: copyEnv(argv[0], withSystemProxy({ ...process.env, ...HARNESSES2.cursor.env() })) });
|
|
32534
32547
|
child = spawn5(start.command, start.args, start.options);
|
|
32535
32548
|
} catch {
|
|
32536
32549
|
return resolve2([]);
|
|
@@ -32543,7 +32556,7 @@ function cursorModels() {
|
|
|
32543
32556
|
const timer = setTimeout(() => done([]), MODELS_MS);
|
|
32544
32557
|
child.on("error", () => done([]));
|
|
32545
32558
|
const rpc = connect(child.stdout, child.stdin, (msg) => msg.id !== void 0 && rpc.refuse(msg.id, "no"), { jsonrpc: true });
|
|
32546
|
-
rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd:
|
|
32559
|
+
rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd: os6.tmpdir(), mcpServers: [] })).then((opened) => done(acpModels(opened))).catch(() => done([]));
|
|
32547
32560
|
});
|
|
32548
32561
|
}
|
|
32549
32562
|
function acpModels(opened) {
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.48 — 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;
|
|
@@ -57156,10 +57156,19 @@ ${captureLines}` : capture.stack;
|
|
|
57156
57156
|
}
|
|
57157
57157
|
});
|
|
57158
57158
|
|
|
57159
|
+
// src/startup.ts
|
|
57160
|
+
import os from "node:os";
|
|
57161
|
+
try {
|
|
57162
|
+
process.cwd();
|
|
57163
|
+
} catch (error2) {
|
|
57164
|
+
if (error2.code !== "ENOENT") throw error2;
|
|
57165
|
+
process.chdir(os.homedir());
|
|
57166
|
+
}
|
|
57167
|
+
|
|
57159
57168
|
// src/plugin.ts
|
|
57160
57169
|
import crypto10 from "node:crypto";
|
|
57161
57170
|
import fs27 from "node:fs";
|
|
57162
|
-
import
|
|
57171
|
+
import os8 from "node:os";
|
|
57163
57172
|
import path31 from "node:path";
|
|
57164
57173
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
57165
57174
|
import { Writable } from "node:stream";
|
|
@@ -73469,10 +73478,10 @@ import fs from "node:fs";
|
|
|
73469
73478
|
import path2 from "node:path";
|
|
73470
73479
|
|
|
73471
73480
|
// ../cli/src/lib/machine/home.ts
|
|
73472
|
-
import
|
|
73481
|
+
import os2 from "node:os";
|
|
73473
73482
|
import path from "node:path";
|
|
73474
73483
|
function machineHome() {
|
|
73475
|
-
return process.env.AI4KANBAN_HOME || path.join(
|
|
73484
|
+
return process.env.AI4KANBAN_HOME || path.join(os2.homedir(), ".ai4kanban");
|
|
73476
73485
|
}
|
|
73477
73486
|
|
|
73478
73487
|
// ../cli/src/lib/cloud/config.ts
|
|
@@ -73648,7 +73657,7 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
73648
73657
|
// src/home.ts
|
|
73649
73658
|
import crypto from "node:crypto";
|
|
73650
73659
|
import fs2 from "node:fs";
|
|
73651
|
-
import
|
|
73660
|
+
import os3 from "node:os";
|
|
73652
73661
|
import path3 from "node:path";
|
|
73653
73662
|
import { parseEnv } from "node:util";
|
|
73654
73663
|
|
|
@@ -73724,7 +73733,7 @@ function followProxy(read2) {
|
|
|
73724
73733
|
|
|
73725
73734
|
// src/home.ts
|
|
73726
73735
|
function runnerHome() {
|
|
73727
|
-
return process.env.WILDCRANE_HOME || path3.join(
|
|
73736
|
+
return process.env.WILDCRANE_HOME || path3.join(os3.homedir(), ".wildcrane");
|
|
73728
73737
|
}
|
|
73729
73738
|
function useRunnerHome() {
|
|
73730
73739
|
process.env.AI4KANBAN_HOME = runnerHome();
|
|
@@ -73757,11 +73766,11 @@ function machineId() {
|
|
|
73757
73766
|
`);
|
|
73758
73767
|
return id;
|
|
73759
73768
|
}
|
|
73760
|
-
var machineName = () =>
|
|
73769
|
+
var machineName = () => os3.hostname().replace(/\.local$/, "");
|
|
73761
73770
|
|
|
73762
73771
|
// src/protocol.ts
|
|
73763
|
-
var VERSION = true ? "0.6.
|
|
73764
|
-
var AKB_VERSION = true ? "0.11.
|
|
73772
|
+
var VERSION = true ? "0.6.48" : "0.0.0";
|
|
73773
|
+
var AKB_VERSION = true ? "0.11.42" : "0.0.0";
|
|
73765
73774
|
var EXIT_REFUSED = 10;
|
|
73766
73775
|
var EXIT_OUTDATED = 11;
|
|
73767
73776
|
var EXIT_UPDATE = 12;
|
|
@@ -73905,8 +73914,11 @@ import path13 from "node:path";
|
|
|
73905
73914
|
import fs9 from "node:fs";
|
|
73906
73915
|
import path11 from "node:path";
|
|
73907
73916
|
|
|
73917
|
+
// ../cli/src/lib/shared/file-limits.ts
|
|
73918
|
+
var BOARD_FILE_LIMIT = 10 * 1024 * 1024;
|
|
73919
|
+
var ASSET_FILE_LIMIT = 100 * 1024 * 1024;
|
|
73920
|
+
|
|
73908
73921
|
// ../cli/src/lib/shared/board-files.ts
|
|
73909
|
-
var BOARD_FILE_LIMIT = 256 * 1024;
|
|
73910
73922
|
var studioFolder = (id) => id.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
73911
73923
|
var studioName = (id) => id.startsWith("wf_builtin_") ? id.slice("wf_builtin_".length).replace(/_/g, "-") : studioFolder(id);
|
|
73912
73924
|
|
|
@@ -74806,7 +74818,7 @@ var flows = memoByFiles(sources, readFlows);
|
|
|
74806
74818
|
|
|
74807
74819
|
// src/folders.ts
|
|
74808
74820
|
import fs10 from "node:fs";
|
|
74809
|
-
import
|
|
74821
|
+
import os4 from "node:os";
|
|
74810
74822
|
import path12 from "node:path";
|
|
74811
74823
|
var projectsFile = () => path12.join(runnerHome(), "projects.json");
|
|
74812
74824
|
function realpath(p) {
|
|
@@ -74889,7 +74901,7 @@ var allow = (dir) => {
|
|
|
74889
74901
|
var disallow = (dir) => update((list) => list.filter((p) => p !== dir));
|
|
74890
74902
|
var SYSTEM_MAC = ["/System", "/Library", "/Applications", "/usr", "/bin", "/sbin", "/etc", "/var", "/private", "/opt", "/cores", "/dev"];
|
|
74891
74903
|
var SYSTEM_WIN = ["Windows", "Program Files", "Program Files (x86)", "ProgramData"];
|
|
74892
|
-
var here = () => ({ platform: process.platform, home:
|
|
74904
|
+
var here = () => ({ platform: process.platform, home: os4.homedir(), resolve: realpath });
|
|
74893
74905
|
function refusal(picked, where = here()) {
|
|
74894
74906
|
const win = where.platform === "win32";
|
|
74895
74907
|
const p = win ? path12.win32 : path12.posix;
|
|
@@ -75283,6 +75295,7 @@ async function candidates(own3) {
|
|
|
75283
75295
|
function runOnce(candidate, options) {
|
|
75284
75296
|
return new Promise((resolve2) => {
|
|
75285
75297
|
const child = spawn(process.execPath, [candidate.entry], {
|
|
75298
|
+
cwd: path16.dirname(candidate.entry),
|
|
75286
75299
|
stdio: ["ignore", options.quiet ? 2 : "inherit", "inherit", "ipc"],
|
|
75287
75300
|
env: { ...process.env, WILDCRANE_RUNNER_VERSION: candidate.version, WILDCRANE_RUNNER_KIND: options.kind ?? "terminal" }
|
|
75288
75301
|
});
|
|
@@ -75402,7 +75415,7 @@ var taskUrl = (task) => `${WEB_URL()}/tasks/${encodeURIComponent(task)}`;
|
|
|
75402
75415
|
|
|
75403
75416
|
// src/plugin-version.ts
|
|
75404
75417
|
import fs15 from "node:fs";
|
|
75405
|
-
import
|
|
75418
|
+
import os5 from "node:os";
|
|
75406
75419
|
import path17 from "node:path";
|
|
75407
75420
|
var RELEASED = "https://raw.githubusercontent.com/wildcrane-ai/wildcrane/main/plugins/claude-code/.claude-plugin/plugin.json";
|
|
75408
75421
|
var TIMEOUT_MS3 = 5e3;
|
|
@@ -75437,7 +75450,7 @@ function checkReleased(url = RELEASED, now = Date.now()) {
|
|
|
75437
75450
|
fetching = get(url).then(releasedOf, () => null).then((value) => void (released = { at: Date.now(), value })).finally(() => fetching = null);
|
|
75438
75451
|
return fetching;
|
|
75439
75452
|
}
|
|
75440
|
-
function codexSource(home4 = process.env.CODEX_HOME || path17.join(
|
|
75453
|
+
function codexSource(home4 = process.env.CODEX_HOME || path17.join(os5.homedir(), ".codex")) {
|
|
75441
75454
|
try {
|
|
75442
75455
|
const config2 = fs15.readFileSync(path17.join(home4, "config.toml"), "utf8");
|
|
75443
75456
|
const section = /^\[marketplaces\.wildcrane\][^\n]*\n((?:(?!\[)[^\n]*\n?)*)/m.exec(config2)?.[1] ?? "";
|
|
@@ -75461,7 +75474,7 @@ async function get(url) {
|
|
|
75461
75474
|
// src/runtimes.ts
|
|
75462
75475
|
import { spawn as spawn3 } from "node:child_process";
|
|
75463
75476
|
import fs22 from "node:fs";
|
|
75464
|
-
import
|
|
75477
|
+
import os7 from "node:os";
|
|
75465
75478
|
import path25 from "node:path";
|
|
75466
75479
|
|
|
75467
75480
|
// ../cli/src/lib/agent/argv.ts
|
|
@@ -75613,7 +75626,7 @@ import path22 from "node:path";
|
|
|
75613
75626
|
// ../cli/src/lib/agent/locate.ts
|
|
75614
75627
|
import { spawn as spawn2, spawnSync } from "node:child_process";
|
|
75615
75628
|
import fs18 from "node:fs";
|
|
75616
|
-
import
|
|
75629
|
+
import os6 from "node:os";
|
|
75617
75630
|
import path20 from "node:path";
|
|
75618
75631
|
|
|
75619
75632
|
// ../cli/src/lib/agent/installed.ts
|
|
@@ -75753,7 +75766,7 @@ function latestIn(parent, tail = "") {
|
|
|
75753
75766
|
}
|
|
75754
75767
|
var env = (name) => process.env[name]?.trim() ?? "";
|
|
75755
75768
|
function commonDirs() {
|
|
75756
|
-
const home4 =
|
|
75769
|
+
const home4 = os6.homedir();
|
|
75757
75770
|
const under = (...parts) => path20.join(home4, ...parts);
|
|
75758
75771
|
const nodes = (root2, tail = []) => root2 ? folders(root2).map((version2) => path20.join(root2, version2, ...tail)) : [];
|
|
75759
75772
|
if (WINDOWS2) {
|
|
@@ -75859,7 +75872,7 @@ function copyEnv(file2, given = process.env) {
|
|
|
75859
75872
|
if (!path20.isAbsolute(file2)) return given;
|
|
75860
75873
|
return { ...given, PATH: [path20.dirname(file2), given.PATH].filter(Boolean).join(path20.delimiter) };
|
|
75861
75874
|
}
|
|
75862
|
-
var probeOptions = (file2) => ({ cwd:
|
|
75875
|
+
var probeOptions = (file2) => ({ cwd: os6.tmpdir(), env: copyEnv(file2), windowsHide: true, shell: false });
|
|
75863
75876
|
function probe(file2) {
|
|
75864
75877
|
const key = keyOf(file2);
|
|
75865
75878
|
const start = spawnable(file2, ["--version"], { ...probeOptions(file2), stdio: ["ignore", "pipe", "pipe"], timeout: PROBE_MS });
|
|
@@ -77054,7 +77067,7 @@ function createTail(log) {
|
|
|
77054
77067
|
// ../cli/package.json
|
|
77055
77068
|
var package_default = {
|
|
77056
77069
|
name: "wildcrane",
|
|
77057
|
-
version: "0.11.
|
|
77070
|
+
version: "0.11.42",
|
|
77058
77071
|
akbContract: 11,
|
|
77059
77072
|
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.",
|
|
77060
77073
|
keywords: [
|
|
@@ -79094,14 +79107,14 @@ var listed = (harness) => async () => (harness.models?.() ?? []).map((id) => ({
|
|
|
79094
79107
|
var readModels = (name) => (MODELS[name] ?? listed(HARNESSES2[name]))().catch(() => []);
|
|
79095
79108
|
var MODELS = {
|
|
79096
79109
|
"claude-code": async () => {
|
|
79097
|
-
const cached3 = claudeModels(path25.join(process.env.CLAUDE_CONFIG_DIR || path25.join(
|
|
79110
|
+
const cached3 = claudeModels(path25.join(process.env.CLAUDE_CONFIG_DIR || path25.join(os7.homedir(), ".claude"), "cache", "model-catalog"));
|
|
79098
79111
|
return cached3.length ? cached3 : [
|
|
79099
79112
|
{ id: "opus", name: "Opus" },
|
|
79100
79113
|
{ id: "sonnet", name: "Sonnet" },
|
|
79101
79114
|
{ id: "haiku", name: "Haiku" }
|
|
79102
79115
|
];
|
|
79103
79116
|
},
|
|
79104
|
-
codex: async () => codexModels(path25.join(process.env.CODEX_HOME || path25.join(
|
|
79117
|
+
codex: async () => codexModels(path25.join(process.env.CODEX_HOME || path25.join(os7.homedir(), ".codex"), "models_cache.json")),
|
|
79105
79118
|
opencode: async () => opencodeModels(await output(commandOf(HARNESSES2.opencode)[0], ["models"])),
|
|
79106
79119
|
cursor: () => cursorModels()
|
|
79107
79120
|
};
|
|
@@ -79113,7 +79126,7 @@ function cursorModels() {
|
|
|
79113
79126
|
return new Promise((resolve2) => {
|
|
79114
79127
|
let child;
|
|
79115
79128
|
try {
|
|
79116
|
-
const start = spawnable(argv[0], argv.slice(1), { cwd:
|
|
79129
|
+
const start = spawnable(argv[0], argv.slice(1), { cwd: os7.tmpdir(), stdio: ["pipe", "pipe", "ignore"], env: copyEnv(argv[0], withSystemProxy({ ...process.env, ...HARNESSES2.cursor.env() })) });
|
|
79117
79130
|
child = spawn3(start.command, start.args, start.options);
|
|
79118
79131
|
} catch {
|
|
79119
79132
|
return resolve2([]);
|
|
@@ -79126,7 +79139,7 @@ function cursorModels() {
|
|
|
79126
79139
|
const timer = setTimeout(() => done([]), MODELS_MS);
|
|
79127
79140
|
child.on("error", () => done([]));
|
|
79128
79141
|
const rpc = connect(child.stdout, child.stdin, (msg) => msg.id !== void 0 && rpc.refuse(msg.id, "no"), { jsonrpc: true });
|
|
79129
|
-
rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd:
|
|
79142
|
+
rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd: os7.tmpdir(), mcpServers: [] })).then((opened) => done(acpModels(opened))).catch(() => done([]));
|
|
79130
79143
|
});
|
|
79131
79144
|
}
|
|
79132
79145
|
function acpModels(opened) {
|
|
@@ -80113,7 +80126,7 @@ function keepChat(chat) {
|
|
|
80113
80126
|
fs27.writeFileSync(chatsFile(), `${JSON.stringify({ chats: chats2 }, null, 2)}
|
|
80114
80127
|
`);
|
|
80115
80128
|
}
|
|
80116
|
-
var home3 = (dir) => dir ===
|
|
80129
|
+
var home3 = (dir) => dir === os8.homedir() || dir.startsWith(os8.homedir() + path31.sep) ? `~${dir.slice(os8.homedir().length)}` : dir;
|
|
80117
80130
|
function realpath3(dir) {
|
|
80118
80131
|
try {
|
|
80119
80132
|
return fs27.realpathSync(dir);
|
|
@@ -80254,7 +80267,7 @@ async function elsewhere() {
|
|
|
80254
80267
|
if (!list.ok) return [];
|
|
80255
80268
|
return list.value.projects.map(({ project, name, workspace_name, personal }) => ({ project, name, workspace_name, personal, board: boardUrl(project) }));
|
|
80256
80269
|
}
|
|
80257
|
-
var typed = (given, cwd) => path31.resolve(cwd, given.trim().replace(/^~(?=$|[\\/])/,
|
|
80270
|
+
var typed = (given, cwd) => path31.resolve(cwd, given.trim().replace(/^~(?=$|[\\/])/, os8.homedir()));
|
|
80258
80271
|
async function addFolder3(dir, bind, strict = false) {
|
|
80259
80272
|
const result = await addFolder2(dir, bind, strict);
|
|
80260
80273
|
return "error" in result ? result : { ...result, board: boardUrl(result.project) };
|
|
@@ -80443,7 +80456,7 @@ function server() {
|
|
|
80443
80456
|
inputSchema: { path: import_zod2.z.string().optional().describe("The current working directory.") }
|
|
80444
80457
|
}, async ({ path: given }, extra) => {
|
|
80445
80458
|
const dir = pathOf(given, extra._meta);
|
|
80446
|
-
const now = await state(dir ||
|
|
80459
|
+
const now = await state(dir || os8.homedir());
|
|
80447
80460
|
const found = (await connections2()).connections;
|
|
80448
80461
|
const akb = akbFile2 ? { akb: akbFile2 } : {};
|
|
80449
80462
|
if (!now.signedIn) return text3({ signedIn: false, ...akb, signing: signingState(), connections: found });
|
package/dist/runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.48 — 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;
|
|
@@ -111051,15 +111051,24 @@ var init_mockup = __esm({
|
|
|
111051
111051
|
}
|
|
111052
111052
|
});
|
|
111053
111053
|
|
|
111054
|
+
// src/startup.ts
|
|
111055
|
+
import os from "node:os";
|
|
111056
|
+
try {
|
|
111057
|
+
process.cwd();
|
|
111058
|
+
} catch (error) {
|
|
111059
|
+
if (error.code !== "ENOENT") throw error;
|
|
111060
|
+
process.chdir(os.homedir());
|
|
111061
|
+
}
|
|
111062
|
+
|
|
111054
111063
|
// ../cli/src/lib/cloud/session.ts
|
|
111055
111064
|
import fs from "node:fs";
|
|
111056
111065
|
import path2 from "node:path";
|
|
111057
111066
|
|
|
111058
111067
|
// ../cli/src/lib/machine/home.ts
|
|
111059
|
-
import
|
|
111068
|
+
import os2 from "node:os";
|
|
111060
111069
|
import path from "node:path";
|
|
111061
111070
|
function machineHome() {
|
|
111062
|
-
return process.env.AI4KANBAN_HOME || path.join(
|
|
111071
|
+
return process.env.AI4KANBAN_HOME || path.join(os2.homedir(), ".ai4kanban");
|
|
111063
111072
|
}
|
|
111064
111073
|
|
|
111065
111074
|
// ../cli/src/lib/cloud/config.ts
|
|
@@ -111234,7 +111243,7 @@ var sleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
|
111234
111243
|
// src/home.ts
|
|
111235
111244
|
import crypto from "node:crypto";
|
|
111236
111245
|
import fs2 from "node:fs";
|
|
111237
|
-
import
|
|
111246
|
+
import os3 from "node:os";
|
|
111238
111247
|
import path3 from "node:path";
|
|
111239
111248
|
import { parseEnv } from "node:util";
|
|
111240
111249
|
|
|
@@ -111313,7 +111322,7 @@ function proxyEnv() {
|
|
|
111313
111322
|
|
|
111314
111323
|
// src/home.ts
|
|
111315
111324
|
function runnerHome() {
|
|
111316
|
-
return process.env.WILDCRANE_HOME || path3.join(
|
|
111325
|
+
return process.env.WILDCRANE_HOME || path3.join(os3.homedir(), ".wildcrane");
|
|
111317
111326
|
}
|
|
111318
111327
|
function useRunnerHome() {
|
|
111319
111328
|
process.env.AI4KANBAN_HOME = runnerHome();
|
|
@@ -111346,7 +111355,7 @@ function machineId() {
|
|
|
111346
111355
|
`);
|
|
111347
111356
|
return id;
|
|
111348
111357
|
}
|
|
111349
|
-
var machineName = () =>
|
|
111358
|
+
var machineName = () => os3.hostname().replace(/\.local$/, "");
|
|
111350
111359
|
|
|
111351
111360
|
// src/i18n.ts
|
|
111352
111361
|
var ZH_HOLDER = { "claude-code": "Claude Code", codex: "Codex", cursor: "Cursor", dsh: "dsh", zcode: "ZCode", kimi: "Kimi Code", terminal: "\u672C\u673A\u7EC8\u7AEF" };
|
|
@@ -111406,8 +111415,8 @@ function status(line) {
|
|
|
111406
111415
|
}
|
|
111407
111416
|
|
|
111408
111417
|
// src/protocol.ts
|
|
111409
|
-
var VERSION = true ? "0.6.
|
|
111410
|
-
var AKB_VERSION = true ? "0.11.
|
|
111418
|
+
var VERSION = true ? "0.6.48" : "0.0.0";
|
|
111419
|
+
var AKB_VERSION = true ? "0.11.42" : "0.0.0";
|
|
111411
111420
|
var AKB_CONTRACT = true ? 11 : 0;
|
|
111412
111421
|
var EXIT_REFUSED = 10;
|
|
111413
111422
|
var EXIT_OUTDATED = 11;
|
|
@@ -111417,7 +111426,7 @@ var EXIT_UPDATE = 12;
|
|
|
111417
111426
|
import { spawn as spawn2 } from "node:child_process";
|
|
111418
111427
|
import { randomUUID } from "node:crypto";
|
|
111419
111428
|
import fs12 from "node:fs";
|
|
111420
|
-
import
|
|
111429
|
+
import os5 from "node:os";
|
|
111421
111430
|
import path16 from "node:path";
|
|
111422
111431
|
|
|
111423
111432
|
// ../cli/src/lib/agent/language.ts
|
|
@@ -111605,7 +111614,7 @@ import path8 from "node:path";
|
|
|
111605
111614
|
// ../cli/src/lib/agent/locate.ts
|
|
111606
111615
|
import { spawn, spawnSync } from "node:child_process";
|
|
111607
111616
|
import fs5 from "node:fs";
|
|
111608
|
-
import
|
|
111617
|
+
import os4 from "node:os";
|
|
111609
111618
|
import path6 from "node:path";
|
|
111610
111619
|
|
|
111611
111620
|
// ../cli/src/lib/agent/installed.ts
|
|
@@ -111745,7 +111754,7 @@ function latestIn(parent, tail = "") {
|
|
|
111745
111754
|
}
|
|
111746
111755
|
var env = (name) => process.env[name]?.trim() ?? "";
|
|
111747
111756
|
function commonDirs() {
|
|
111748
|
-
const home4 =
|
|
111757
|
+
const home4 = os4.homedir();
|
|
111749
111758
|
const under = (...parts) => path6.join(home4, ...parts);
|
|
111750
111759
|
const nodes = (root2, tail = []) => root2 ? folders(root2).map((version) => path6.join(root2, version, ...tail)) : [];
|
|
111751
111760
|
if (WINDOWS2) {
|
|
@@ -111851,7 +111860,7 @@ function copyEnv(file3, given = process.env) {
|
|
|
111851
111860
|
if (!path6.isAbsolute(file3)) return given;
|
|
111852
111861
|
return { ...given, PATH: [path6.dirname(file3), given.PATH].filter(Boolean).join(path6.delimiter) };
|
|
111853
111862
|
}
|
|
111854
|
-
var probeOptions = (file3) => ({ cwd:
|
|
111863
|
+
var probeOptions = (file3) => ({ cwd: os4.tmpdir(), env: copyEnv(file3), windowsHide: true, shell: false });
|
|
111855
111864
|
function probe(file3) {
|
|
111856
111865
|
const key = keyOf(file3);
|
|
111857
111866
|
const start = spawnable(file3, ["--version"], { ...probeOptions(file3), stdio: ["ignore", "pipe", "pipe"], timeout: PROBE_MS });
|
|
@@ -113053,7 +113062,7 @@ function createTail(log) {
|
|
|
113053
113062
|
// ../cli/package.json
|
|
113054
113063
|
var package_default = {
|
|
113055
113064
|
name: "wildcrane",
|
|
113056
|
-
version: "0.11.
|
|
113065
|
+
version: "0.11.42",
|
|
113057
113066
|
akbContract: 11,
|
|
113058
113067
|
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.",
|
|
113059
113068
|
keywords: [
|
|
@@ -115346,6 +115355,7 @@ __export(api_exports, {
|
|
|
115346
115355
|
answerDiff: () => answerDiff,
|
|
115347
115356
|
claimJob: () => claimJob,
|
|
115348
115357
|
commitBoard: () => commitBoard,
|
|
115358
|
+
completeUpload: () => completeUpload,
|
|
115349
115359
|
createArtifact: () => createArtifact,
|
|
115350
115360
|
createProject: () => createProject,
|
|
115351
115361
|
createUpload: () => createUpload,
|
|
@@ -115578,6 +115588,7 @@ var readArtifact = (artifact) => request("GET", `/v1/artifacts/${q(artifact)}`);
|
|
|
115578
115588
|
var readVersion = (artifact, version) => request("GET", `/v1/artifacts/${q(artifact)}/versions/${version}`);
|
|
115579
115589
|
var createArtifact = (task, name, type) => request("POST", `/v1/tasks/${q(task)}/artifacts`, { type, name });
|
|
115580
115590
|
var createUpload = (artifact, contentType, size) => request("POST", `/v1/artifacts/${q(artifact)}/uploads`, { content_type: contentType, size });
|
|
115591
|
+
var completeUpload = (url) => request("POST", url);
|
|
115581
115592
|
var createVersion = (artifact, upload2) => request("POST", `/v1/artifacts/${q(artifact)}/versions`, { upload: upload2 });
|
|
115582
115593
|
var readRejections = (workspace) => request("GET", `/v1/rejections?workspace=${q(workspace)}`);
|
|
115583
115594
|
var markReviewed = (tasks, triage) => request("POST", "/v1/rejections/reviewed", { tasks, triage });
|
|
@@ -115729,14 +115740,14 @@ var listed = (harness) => async () => (harness.models?.() ?? []).map((id) => ({
|
|
|
115729
115740
|
var readModels = (name) => (MODELS[name] ?? listed(HARNESSES2[name]))().catch(() => []);
|
|
115730
115741
|
var MODELS = {
|
|
115731
115742
|
"claude-code": async () => {
|
|
115732
|
-
const cached2 = claudeModels(path16.join(process.env.CLAUDE_CONFIG_DIR || path16.join(
|
|
115743
|
+
const cached2 = claudeModels(path16.join(process.env.CLAUDE_CONFIG_DIR || path16.join(os5.homedir(), ".claude"), "cache", "model-catalog"));
|
|
115733
115744
|
return cached2.length ? cached2 : [
|
|
115734
115745
|
{ id: "opus", name: "Opus" },
|
|
115735
115746
|
{ id: "sonnet", name: "Sonnet" },
|
|
115736
115747
|
{ id: "haiku", name: "Haiku" }
|
|
115737
115748
|
];
|
|
115738
115749
|
},
|
|
115739
|
-
codex: async () => codexModels(path16.join(process.env.CODEX_HOME || path16.join(
|
|
115750
|
+
codex: async () => codexModels(path16.join(process.env.CODEX_HOME || path16.join(os5.homedir(), ".codex"), "models_cache.json")),
|
|
115740
115751
|
opencode: async () => opencodeModels(await output(commandOf(HARNESSES2.opencode)[0], ["models"])),
|
|
115741
115752
|
cursor: () => cursorModels()
|
|
115742
115753
|
};
|
|
@@ -115748,7 +115759,7 @@ function cursorModels() {
|
|
|
115748
115759
|
return new Promise((resolve2) => {
|
|
115749
115760
|
let child;
|
|
115750
115761
|
try {
|
|
115751
|
-
const start = spawnable(argv[0], argv.slice(1), { cwd:
|
|
115762
|
+
const start = spawnable(argv[0], argv.slice(1), { cwd: os5.tmpdir(), stdio: ["pipe", "pipe", "ignore"], env: copyEnv(argv[0], withSystemProxy({ ...process.env, ...HARNESSES2.cursor.env() })) });
|
|
115752
115763
|
child = spawn2(start.command, start.args, start.options);
|
|
115753
115764
|
} catch {
|
|
115754
115765
|
return resolve2([]);
|
|
@@ -115761,7 +115772,7 @@ function cursorModels() {
|
|
|
115761
115772
|
const timer = setTimeout(() => done([]), MODELS_MS);
|
|
115762
115773
|
child.on("error", () => done([]));
|
|
115763
115774
|
const rpc = connect(child.stdout, child.stdin, (msg) => msg.id !== void 0 && rpc.refuse(msg.id, "no"), { jsonrpc: true });
|
|
115764
|
-
rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd:
|
|
115775
|
+
rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd: os5.tmpdir(), mcpServers: [] })).then((opened) => done(acpModels(opened))).catch(() => done([]));
|
|
115765
115776
|
});
|
|
115766
115777
|
}
|
|
115767
115778
|
function acpModels(opened) {
|
|
@@ -116005,7 +116016,7 @@ function connectCloudLive(handlers) {
|
|
|
116005
116016
|
|
|
116006
116017
|
// src/folders.ts
|
|
116007
116018
|
import fs13 from "node:fs";
|
|
116008
|
-
import
|
|
116019
|
+
import os6 from "node:os";
|
|
116009
116020
|
import path17 from "node:path";
|
|
116010
116021
|
var projectsFile = () => path17.join(runnerHome(), "projects.json");
|
|
116011
116022
|
function realpath(p2) {
|
|
@@ -116094,7 +116105,7 @@ var allow = (dir) => {
|
|
|
116094
116105
|
var disallow = (dir) => update2((list) => list.filter((p2) => p2 !== dir));
|
|
116095
116106
|
var SYSTEM_MAC = ["/System", "/Library", "/Applications", "/usr", "/bin", "/sbin", "/etc", "/var", "/private", "/opt", "/cores", "/dev"];
|
|
116096
116107
|
var SYSTEM_WIN = ["Windows", "Program Files", "Program Files (x86)", "ProgramData"];
|
|
116097
|
-
var here = () => ({ platform: process.platform, home:
|
|
116108
|
+
var here = () => ({ platform: process.platform, home: os6.homedir(), resolve: realpath });
|
|
116098
116109
|
function refusal(picked, where = here()) {
|
|
116099
116110
|
const win = where.platform === "win32";
|
|
116100
116111
|
const p2 = win ? path17.win32 : path17.posix;
|
|
@@ -116382,11 +116393,14 @@ import path25 from "node:path";
|
|
|
116382
116393
|
import fs20 from "node:fs";
|
|
116383
116394
|
import path24 from "node:path";
|
|
116384
116395
|
|
|
116396
|
+
// ../cli/src/lib/shared/file-limits.ts
|
|
116397
|
+
var BOARD_FILE_LIMIT = 10 * 1024 * 1024;
|
|
116398
|
+
var ASSET_FILE_LIMIT = 100 * 1024 * 1024;
|
|
116399
|
+
|
|
116385
116400
|
// ../cli/src/lib/shared/board-files.ts
|
|
116386
116401
|
var ROOTS = ["todo/", ".archive/", "memory/", "studios/", "triage/", "assets/", "rules/"];
|
|
116387
116402
|
var SETTINGS = ["modules.md", "config.md"];
|
|
116388
116403
|
var isSettingsPath = (path51) => SETTINGS.includes(path51) || /^rules\/(?:studios\/)?[^/]+\.md$/.test(path51);
|
|
116389
|
-
var BOARD_FILE_LIMIT = 256 * 1024;
|
|
116390
116404
|
function isBoardPath(path51) {
|
|
116391
116405
|
if (!path51 || path51.length > 500 || path51.startsWith("/") || path51.includes("\\") || path51.includes("\0")) return false;
|
|
116392
116406
|
if (path51.split("/").some((part) => !part || part === "." || part === "..")) return false;
|
|
@@ -116394,7 +116408,7 @@ function isBoardPath(path51) {
|
|
|
116394
116408
|
if (path51.startsWith("studios/")) return true;
|
|
116395
116409
|
if (SETTINGS.includes(path51)) return true;
|
|
116396
116410
|
if (path51.startsWith("rules/")) return isSettingsPath(path51);
|
|
116397
|
-
if (path51.startsWith("assets/")) return path51
|
|
116411
|
+
if (path51.startsWith("assets/")) return taskOfAssets(path51) !== null;
|
|
116398
116412
|
return ROOTS.some((root2) => path51.startsWith(root2)) && path51.endsWith(".md");
|
|
116399
116413
|
}
|
|
116400
116414
|
var CARD = /^(?:todo|\.archive)\/(?:[^/]+\/)*(\d+)-[^/]*\.md$/;
|
|
@@ -116405,6 +116419,7 @@ function numberOfCard(path51) {
|
|
|
116405
116419
|
}
|
|
116406
116420
|
var cardSlug = (task) => task.toLowerCase().replace(/_/g, "-");
|
|
116407
116421
|
var assetsFile = (task) => `assets/${task}.json`;
|
|
116422
|
+
var taskOfAssets = (path51) => /^assets\/(task_[0-9a-f]+)\.json$/.exec(path51)?.[1] ?? null;
|
|
116408
116423
|
var studioFolder = (id) => id.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
116409
116424
|
var studioName = (id) => id.startsWith("wf_builtin_") ? id.slice("wf_builtin_".length).replace(/_/g, "-") : studioFolder(id);
|
|
116410
116425
|
var BUILDER = "wf_builtin_studio_builder";
|
|
@@ -118793,14 +118808,23 @@ function assetsOf(text3) {
|
|
|
118793
118808
|
return {};
|
|
118794
118809
|
}
|
|
118795
118810
|
}
|
|
118811
|
+
function taskAssetFiles(ws) {
|
|
118812
|
+
if (!ws.number) return [];
|
|
118813
|
+
const state = stateDir(ws);
|
|
118814
|
+
const roots = [
|
|
118815
|
+
path34.join(ws.board, "assets", String(ws.number)),
|
|
118816
|
+
...state ? ["assets", "mockups"].map((folder) => path34.join(state, folder, String(ws.number))) : []
|
|
118817
|
+
];
|
|
118818
|
+
return roots.filter((root2) => fs30.lstatSync(root2, { throwIfNoEntry: false })?.isDirectory()).flatMap((root2) => filesUnder(root2).filter((p2) => !p2.split("/").some((part) => part.startsWith(".") || part === "node_modules")).map((p2) => path34.join(root2, p2)));
|
|
118819
|
+
}
|
|
118796
118820
|
var assetsText = (assets) => `${JSON.stringify(assets, null, 2)}
|
|
118797
118821
|
`;
|
|
118798
118822
|
function pull(ws, machineId2) {
|
|
118799
118823
|
return inFolder(ws.cwd, async () => {
|
|
118800
118824
|
const sent = await sendBoard(boardFolder(ws), machineId2);
|
|
118801
118825
|
if (!sent.ok) {
|
|
118802
|
-
const refused2 = sent.tasks ? sent.tasks[ws.cloudTask ?? ""] : sent;
|
|
118803
|
-
if (refused2) return { ok: false, error: `This computer's board changes could not be sent: ${refused2.error}`, ...refused2.offline ? {} : { code: "version_conflict" } };
|
|
118826
|
+
const refused2 = sent.tasks ? sent.tasks[ws.cloudTask ?? ""] : { ...sent, blocking: true };
|
|
118827
|
+
if (refused2 && refused2.blocking !== false) return { ok: false, error: `This computer's board changes could not be sent: ${refused2.error}`, ...refused2.offline ? {} : { code: "version_conflict" } };
|
|
118804
118828
|
}
|
|
118805
118829
|
return readCloud(ws);
|
|
118806
118830
|
});
|
|
@@ -118911,9 +118935,13 @@ async function pullAssets(ws, record, assets) {
|
|
|
118911
118935
|
record.number = ws.number;
|
|
118912
118936
|
}
|
|
118913
118937
|
const file3 = cardFile(ws);
|
|
118914
|
-
const out =
|
|
118938
|
+
const out = Object.fromEntries((record.pendingAssets ?? []).flatMap((key) => record.assets[key] ? [[key, record.assets[key]]] : []));
|
|
118915
118939
|
for (const [name, ref] of Object.entries(assets)) {
|
|
118916
118940
|
const held4 = record.assets[name];
|
|
118941
|
+
if (record.pendingAssets?.includes(name) && held4) {
|
|
118942
|
+
out[name] = held4;
|
|
118943
|
+
continue;
|
|
118944
|
+
}
|
|
118917
118945
|
if (ref.error && !ref.version) {
|
|
118918
118946
|
if (held4?.artifact === ref.artifact) out[name] = held4;
|
|
118919
118947
|
continue;
|
|
@@ -119034,12 +119062,23 @@ function undrawn(ws, reason) {
|
|
|
119034
119062
|
async function uploadAsset(artifact, { bytes: bytes2, type }) {
|
|
119035
119063
|
const upload2 = await createUpload(artifact, type, Math.max(bytes2.length, 1));
|
|
119036
119064
|
if (!upload2.ok) return upload2;
|
|
119037
|
-
const
|
|
119038
|
-
if (
|
|
119065
|
+
const { id, url, parts } = upload2.value;
|
|
119066
|
+
if (parts) {
|
|
119067
|
+
for (let part = 1; part <= parts.count; part++) {
|
|
119068
|
+
const put = await upload(parts.url.replace("{part}", String(part)), bytes2.subarray((part - 1) * parts.size, part * parts.size), type);
|
|
119069
|
+
if (!put.ok) return put;
|
|
119070
|
+
}
|
|
119071
|
+
const done = await completeUpload(url ?? `/v1/uploads/${encodeURIComponent(id)}/complete`);
|
|
119072
|
+
if (!done.ok) return done;
|
|
119073
|
+
} else {
|
|
119074
|
+
const put = await upload(url ?? `/v1/uploads/${encodeURIComponent(id)}`, bytes2, type);
|
|
119075
|
+
if (!put.ok) return put;
|
|
119076
|
+
}
|
|
119039
119077
|
const version = await createVersion(artifact, upload2.value.id);
|
|
119040
119078
|
return version.ok ? { ok: true, value: version.value.version } : version;
|
|
119041
119079
|
}
|
|
119042
119080
|
async function pushAssets(ws, record, before) {
|
|
119081
|
+
const errors = [];
|
|
119043
119082
|
if (ws.cloudTask && ws.number) {
|
|
119044
119083
|
record.task = ws.cloudTask;
|
|
119045
119084
|
record.number = ws.number;
|
|
@@ -119047,7 +119086,7 @@ async function pushAssets(ws, record, before) {
|
|
|
119047
119086
|
}
|
|
119048
119087
|
const file3 = cardFile(ws);
|
|
119049
119088
|
const body = readText(file3);
|
|
119050
|
-
if (body === null) return { ok: true, value:
|
|
119089
|
+
if (body === null) return { ok: true, value: { errors } };
|
|
119051
119090
|
const refs = {};
|
|
119052
119091
|
const canonical = (target) => {
|
|
119053
119092
|
const real = (file4) => fs30.existsSync(file4) ? fs30.realpathSync(file4) : path34.dirname(file4) === file4 ? file4 : path34.join(real(path34.dirname(file4)), path34.basename(file4));
|
|
@@ -119087,6 +119126,7 @@ async function pushAssets(ws, record, before) {
|
|
|
119087
119126
|
let why2 = node.error ?? [...node.dependencies.values()].map((key) => refs[key]?.error).find(Boolean);
|
|
119088
119127
|
if (!why2 && node.file) {
|
|
119089
119128
|
try {
|
|
119129
|
+
if (fs30.statSync(node.file).size > ASSET_FILE_LIMIT) throw new Error("This asset is over 100 MiB.");
|
|
119090
119130
|
out = await sentOf(node.file, kind);
|
|
119091
119131
|
} catch (error) {
|
|
119092
119132
|
why2 = renderError(error);
|
|
@@ -119157,10 +119197,86 @@ async function pushAssets(ws, record, before) {
|
|
|
119157
119197
|
entry = { ...entry, localHash: localHash ?? void 0, dependencies: [...node.dependencies.values()] };
|
|
119158
119198
|
for (const alias of node.aliases) {
|
|
119159
119199
|
record.assets[alias] = entry;
|
|
119200
|
+
record.pendingAssets = record.pendingAssets?.filter((key) => key !== alias);
|
|
119160
119201
|
refs[alias] = { artifact: entry.artifact, version: entry.version };
|
|
119161
119202
|
}
|
|
119162
119203
|
writeRecord(ws, record);
|
|
119163
119204
|
}
|
|
119205
|
+
for (const file4 of taskAssetFiles(ws)) {
|
|
119206
|
+
const key = canonical(file4);
|
|
119207
|
+
if (refs[key]) continue;
|
|
119208
|
+
assetPath(ws, key, cardFile(ws));
|
|
119209
|
+
const sendFile = async () => {
|
|
119210
|
+
const previous = record.assets[key];
|
|
119211
|
+
const size = fs30.statSync(file4).size;
|
|
119212
|
+
if (size > ASSET_FILE_LIMIT) return { ok: false, code: "too_large", error: `${key}: This asset is over 100 MiB.` };
|
|
119213
|
+
const digest2 = crypto5.createHash("sha256");
|
|
119214
|
+
for await (const chunk of fs30.createReadStream(file4)) digest2.update(chunk);
|
|
119215
|
+
const hash = digest2.digest("hex");
|
|
119216
|
+
let entry = previous;
|
|
119217
|
+
if (!entry?.version || entry.kind !== "asset" || entry.hash !== hash) {
|
|
119218
|
+
if (!ws.cloudTask) return { ok: true, value: void 0 };
|
|
119219
|
+
let artifact = entry?.kind === "asset" ? entry.artifact : void 0;
|
|
119220
|
+
if (!artifact) {
|
|
119221
|
+
const made = await createArtifact(ws.cloudTask, key.slice(0, 200), "asset");
|
|
119222
|
+
if (!made.ok) return { ...made, error: `${key}: ${made.error}` };
|
|
119223
|
+
artifact = made.value.id;
|
|
119224
|
+
record.assets[key] = { artifact, kind: "asset", version: 0, hash: "" };
|
|
119225
|
+
writeRecord(ws, record);
|
|
119226
|
+
}
|
|
119227
|
+
const type = TYPES[path34.extname(file4).toLowerCase()] ?? "application/octet-stream";
|
|
119228
|
+
const upload2 = await createUpload(artifact, type, Math.max(size, 1));
|
|
119229
|
+
if (!upload2.ok) return { ...upload2, error: `${key}: ${upload2.error}` };
|
|
119230
|
+
const route = `/v1/uploads/${encodeURIComponent(upload2.value.id)}`;
|
|
119231
|
+
if (upload2.value.parts) {
|
|
119232
|
+
const { count: count2, size: partSize, url: partUrl } = upload2.value.parts;
|
|
119233
|
+
const source = await fs30.promises.open(file4, "r");
|
|
119234
|
+
try {
|
|
119235
|
+
for (let part = 1; part <= count2; part++) {
|
|
119236
|
+
const bytes2 = Buffer.alloc(Math.min(partSize, size - (part - 1) * partSize));
|
|
119237
|
+
let offset = 0;
|
|
119238
|
+
while (offset < bytes2.length) {
|
|
119239
|
+
const read4 = await source.read(bytes2, offset, bytes2.length - offset, (part - 1) * partSize + offset);
|
|
119240
|
+
if (!read4.bytesRead) throw new Error(`${key}: file changed during upload`);
|
|
119241
|
+
offset += read4.bytesRead;
|
|
119242
|
+
}
|
|
119243
|
+
const put = await upload(partUrl.replace("{part}", String(part)), bytes2, type);
|
|
119244
|
+
if (!put.ok) return { ...put, error: `${key}: ${put.error}` };
|
|
119245
|
+
}
|
|
119246
|
+
} finally {
|
|
119247
|
+
await source.close();
|
|
119248
|
+
}
|
|
119249
|
+
const completed = await completeUpload(upload2.value.url ?? `${route}/complete`);
|
|
119250
|
+
if (!completed.ok) return { ...completed, error: `${key}: ${completed.error}` };
|
|
119251
|
+
} else {
|
|
119252
|
+
const put = await upload(upload2.value.url ?? route, fs30.readFileSync(file4), type);
|
|
119253
|
+
if (!put.ok) return { ...put, error: `${key}: ${put.error}` };
|
|
119254
|
+
}
|
|
119255
|
+
const sent2 = await createVersion(artifact, upload2.value.id);
|
|
119256
|
+
if (!sent2.ok) return { ...sent2, error: `${key}: ${sent2.error}` };
|
|
119257
|
+
entry = { artifact, version: sent2.value.version, hash, localHash: hash, kind: "asset" };
|
|
119258
|
+
}
|
|
119259
|
+
record.assets[key] = entry;
|
|
119260
|
+
refs[key] = { artifact: entry.artifact, version: entry.version };
|
|
119261
|
+
record.pendingAssets = record.pendingAssets?.filter((p2) => p2 !== key);
|
|
119262
|
+
writeRecord(ws, record);
|
|
119263
|
+
return { ok: true, value: void 0 };
|
|
119264
|
+
};
|
|
119265
|
+
let sent;
|
|
119266
|
+
try {
|
|
119267
|
+
sent = await sendFile();
|
|
119268
|
+
} catch (error) {
|
|
119269
|
+
sent = { ok: false, error: `${key}: ${renderError(error)}` };
|
|
119270
|
+
}
|
|
119271
|
+
if (!sent.ok) {
|
|
119272
|
+
if (sent.code && !["too_large", "payload_too_large", "storage_limit", "storage_limit_reached"].includes(sent.code)) return sent;
|
|
119273
|
+
record.pendingAssets = [.../* @__PURE__ */ new Set([...record.pendingAssets ?? [], key])];
|
|
119274
|
+
writeRecord(ws, record);
|
|
119275
|
+
errors.push({ error: sent.error, ...sent.code ? {} : { offline: true } });
|
|
119276
|
+
console.error(`runner: asset upload pending: ${sent.error}`);
|
|
119277
|
+
if (before[key]) refs[key] = before[key];
|
|
119278
|
+
}
|
|
119279
|
+
}
|
|
119164
119280
|
} catch (error) {
|
|
119165
119281
|
return { ok: false, code: "bad_request", error: error instanceof Error ? error.message : String(error) };
|
|
119166
119282
|
}
|
|
@@ -119168,7 +119284,7 @@ async function pushAssets(ws, record, before) {
|
|
|
119168
119284
|
if (Object.keys(refs).length || fs30.existsSync(list)) {
|
|
119169
119285
|
if (JSON.stringify(assetsOf(readText(list))) !== JSON.stringify(refs)) write(list, assetsText(refs));
|
|
119170
119286
|
}
|
|
119171
|
-
return { ok: true, value:
|
|
119287
|
+
return { ok: true, value: { errors } };
|
|
119172
119288
|
}
|
|
119173
119289
|
function resetSorted(ws) {
|
|
119174
119290
|
for (const sub of ["dismissed", "archived"]) fs30.rmSync(path34.join(ws.board, "triage", sub), { recursive: true, force: true });
|
|
@@ -119234,12 +119350,16 @@ async function send2(ws, job) {
|
|
|
119234
119350
|
const deferredCards = /* @__PURE__ */ new Set();
|
|
119235
119351
|
const deferredLists = /* @__PURE__ */ new Set();
|
|
119236
119352
|
const assetErrors = {};
|
|
119353
|
+
const processed = /* @__PURE__ */ new Set();
|
|
119237
119354
|
for (const item of tasks) {
|
|
119355
|
+
processed.add(item.folder.task);
|
|
119238
119356
|
const card = path34.relative(ws.board, cardFile(item.folder)).split(path34.sep).join("/");
|
|
119239
119357
|
const archived = boardSync && card.startsWith(".archive/") && base.files[rootOf(ws) + card];
|
|
119240
119358
|
if (!archived) {
|
|
119241
119359
|
const assets = await pushAssets(item.folder, item.record, assetsOf(assetsListOf(item.folder, base)));
|
|
119242
119360
|
if (assets.ok) {
|
|
119361
|
+
const error = assets.value.errors[0];
|
|
119362
|
+
if (error) assetErrors[item.folder.task] = { ...error, blocking: false };
|
|
119243
119363
|
writeRecord(item.folder, item.record);
|
|
119244
119364
|
continue;
|
|
119245
119365
|
}
|
|
@@ -119253,7 +119373,7 @@ async function send2(ws, job) {
|
|
|
119253
119373
|
}
|
|
119254
119374
|
proposeItems(ws, base);
|
|
119255
119375
|
const shared = sharedMemory(ws.board);
|
|
119256
|
-
const deferred = new Set(
|
|
119376
|
+
const deferred = new Set((base.deferred ?? []).filter((p2) => !boardSync && !tasks.some((item) => processed.has(item.folder.task) && !deferredCards.has(item.folder.number) && (p2 === assetsFile(item.folder.task) || numberOfCard(p2) === item.folder.number))));
|
|
119257
119377
|
const defer = (p2) => {
|
|
119258
119378
|
if (!boardSync) return deferred.has(p2);
|
|
119259
119379
|
if (!deferredLists.has(p2) && !deferredCards.has(numberOfCard(p2) ?? 0)) return false;
|
|
@@ -119261,14 +119381,14 @@ async function send2(ws, job) {
|
|
|
119261
119381
|
return true;
|
|
119262
119382
|
};
|
|
119263
119383
|
const success = (changed) => {
|
|
119264
|
-
const refreshDeferred =
|
|
119265
|
-
const pendingAssets = Object.keys(assetErrors);
|
|
119266
|
-
const refreshPending =
|
|
119384
|
+
const refreshDeferred = deferred.size !== (base.deferred?.length ?? 0) || base.deferred?.some((p2) => !deferred.has(p2));
|
|
119385
|
+
const pendingAssets = [.../* @__PURE__ */ new Set([...(base.pendingAssets ?? []).filter((task) => !processed.has(task)), ...Object.keys(assetErrors)])];
|
|
119386
|
+
const refreshPending = JSON.stringify(pendingAssets) !== JSON.stringify(base.pendingAssets ?? []);
|
|
119267
119387
|
if (refreshDeferred) base.deferred = [...deferred];
|
|
119268
119388
|
if (refreshPending) base.pendingAssets = pendingAssets;
|
|
119269
119389
|
if (changed || refreshDeferred || refreshPending) writeBase(ws, base);
|
|
119270
119390
|
const firstError = Object.values(assetErrors)[0];
|
|
119271
|
-
if (firstError) return { ok: false, conflict: false, ...firstError, tasks: assetErrors };
|
|
119391
|
+
if (firstError && boardSync) return { ok: false, conflict: false, ...firstError, tasks: assetErrors };
|
|
119272
119392
|
return { ok: true, changed };
|
|
119273
119393
|
};
|
|
119274
119394
|
const local = localFiles(ws, base);
|
package/dist/settings.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.48 — 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;
|
|
@@ -26670,10 +26670,19 @@ ${captureLines}` : capture.stack;
|
|
|
26670
26670
|
}
|
|
26671
26671
|
});
|
|
26672
26672
|
|
|
26673
|
+
// src/startup.ts
|
|
26674
|
+
import os from "node:os";
|
|
26675
|
+
try {
|
|
26676
|
+
process.cwd();
|
|
26677
|
+
} catch (error) {
|
|
26678
|
+
if (error.code !== "ENOENT") throw error;
|
|
26679
|
+
process.chdir(os.homedir());
|
|
26680
|
+
}
|
|
26681
|
+
|
|
26673
26682
|
// src/home.ts
|
|
26674
26683
|
import crypto from "node:crypto";
|
|
26675
26684
|
import fs from "node:fs";
|
|
26676
|
-
import
|
|
26685
|
+
import os2 from "node:os";
|
|
26677
26686
|
import path from "node:path";
|
|
26678
26687
|
import { parseEnv } from "node:util";
|
|
26679
26688
|
|
|
@@ -26749,7 +26758,7 @@ function followProxy(read2) {
|
|
|
26749
26758
|
|
|
26750
26759
|
// src/home.ts
|
|
26751
26760
|
function runnerHome() {
|
|
26752
|
-
return process.env.WILDCRANE_HOME || path.join(
|
|
26761
|
+
return process.env.WILDCRANE_HOME || path.join(os2.homedir(), ".wildcrane");
|
|
26753
26762
|
}
|
|
26754
26763
|
function useRunnerHome() {
|
|
26755
26764
|
process.env.AI4KANBAN_HOME = runnerHome();
|
|
@@ -26782,7 +26791,7 @@ function machineId() {
|
|
|
26782
26791
|
`);
|
|
26783
26792
|
return id;
|
|
26784
26793
|
}
|
|
26785
|
-
var machineName = () =>
|
|
26794
|
+
var machineName = () => os2.hostname().replace(/\.local$/, "");
|
|
26786
26795
|
|
|
26787
26796
|
// src/settings.ts
|
|
26788
26797
|
import crypto7 from "node:crypto";
|
|
@@ -26794,10 +26803,10 @@ import fs2 from "node:fs";
|
|
|
26794
26803
|
import path3 from "node:path";
|
|
26795
26804
|
|
|
26796
26805
|
// ../cli/src/lib/machine/home.ts
|
|
26797
|
-
import
|
|
26806
|
+
import os3 from "node:os";
|
|
26798
26807
|
import path2 from "node:path";
|
|
26799
26808
|
function machineHome() {
|
|
26800
|
-
return process.env.AI4KANBAN_HOME || path2.join(
|
|
26809
|
+
return process.env.AI4KANBAN_HOME || path2.join(os3.homedir(), ".ai4kanban");
|
|
26801
26810
|
}
|
|
26802
26811
|
|
|
26803
26812
|
// ../cli/src/lib/cloud/config.ts
|
|
@@ -26966,8 +26975,8 @@ function alive(pid) {
|
|
|
26966
26975
|
var sleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
26967
26976
|
|
|
26968
26977
|
// src/protocol.ts
|
|
26969
|
-
var VERSION = true ? "0.6.
|
|
26970
|
-
var AKB_VERSION = true ? "0.11.
|
|
26978
|
+
var VERSION = true ? "0.6.48" : "0.0.0";
|
|
26979
|
+
var AKB_VERSION = true ? "0.11.42" : "0.0.0";
|
|
26971
26980
|
|
|
26972
26981
|
// src/api.ts
|
|
26973
26982
|
var RUNTIMES = ["claude-code", "codex", "cursor", "opencode", "kimi", "dsh", "zcode", "grok"];
|
|
@@ -27029,8 +27038,11 @@ import path12 from "node:path";
|
|
|
27029
27038
|
import fs8 from "node:fs";
|
|
27030
27039
|
import path10 from "node:path";
|
|
27031
27040
|
|
|
27041
|
+
// ../cli/src/lib/shared/file-limits.ts
|
|
27042
|
+
var BOARD_FILE_LIMIT = 10 * 1024 * 1024;
|
|
27043
|
+
var ASSET_FILE_LIMIT = 100 * 1024 * 1024;
|
|
27044
|
+
|
|
27032
27045
|
// ../cli/src/lib/shared/board-files.ts
|
|
27033
|
-
var BOARD_FILE_LIMIT = 256 * 1024;
|
|
27034
27046
|
var studioFolder = (id) => id.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
27035
27047
|
var studioName = (id) => id.startsWith("wf_builtin_") ? id.slice("wf_builtin_".length).replace(/_/g, "-") : studioFolder(id);
|
|
27036
27048
|
|
|
@@ -27930,7 +27942,7 @@ var flows = memoByFiles(sources, readFlows);
|
|
|
27930
27942
|
|
|
27931
27943
|
// src/folders.ts
|
|
27932
27944
|
import fs9 from "node:fs";
|
|
27933
|
-
import
|
|
27945
|
+
import os4 from "node:os";
|
|
27934
27946
|
import path11 from "node:path";
|
|
27935
27947
|
var projectsFile = () => path11.join(runnerHome(), "projects.json");
|
|
27936
27948
|
function realpath(p) {
|
|
@@ -28013,7 +28025,7 @@ var allow = (dir) => {
|
|
|
28013
28025
|
var disallow = (dir) => update((list) => list.filter((p) => p !== dir));
|
|
28014
28026
|
var SYSTEM_MAC = ["/System", "/Library", "/Applications", "/usr", "/bin", "/sbin", "/etc", "/var", "/private", "/opt", "/cores", "/dev"];
|
|
28015
28027
|
var SYSTEM_WIN = ["Windows", "Program Files", "Program Files (x86)", "ProgramData"];
|
|
28016
|
-
var here = () => ({ platform: process.platform, home:
|
|
28028
|
+
var here = () => ({ platform: process.platform, home: os4.homedir(), resolve: realpath });
|
|
28017
28029
|
function refusal(picked, where = here()) {
|
|
28018
28030
|
const win = where.platform === "win32";
|
|
28019
28031
|
const p = win ? path11.win32 : path11.posix;
|
|
@@ -28160,7 +28172,7 @@ function installKanbanSkill(dir) {
|
|
|
28160
28172
|
// src/runtimes.ts
|
|
28161
28173
|
import { spawn as spawn2 } from "node:child_process";
|
|
28162
28174
|
import fs18 from "node:fs";
|
|
28163
|
-
import
|
|
28175
|
+
import os6 from "node:os";
|
|
28164
28176
|
import path21 from "node:path";
|
|
28165
28177
|
|
|
28166
28178
|
// ../cli/src/lib/agent/argv.ts
|
|
@@ -28312,7 +28324,7 @@ import path18 from "node:path";
|
|
|
28312
28324
|
// ../cli/src/lib/agent/locate.ts
|
|
28313
28325
|
import { spawn, spawnSync as spawnSync2 } from "node:child_process";
|
|
28314
28326
|
import fs14 from "node:fs";
|
|
28315
|
-
import
|
|
28327
|
+
import os5 from "node:os";
|
|
28316
28328
|
import path16 from "node:path";
|
|
28317
28329
|
|
|
28318
28330
|
// ../cli/src/lib/agent/installed.ts
|
|
@@ -28452,7 +28464,7 @@ function latestIn(parent, tail = "") {
|
|
|
28452
28464
|
}
|
|
28453
28465
|
var env = (name) => process.env[name]?.trim() ?? "";
|
|
28454
28466
|
function commonDirs() {
|
|
28455
|
-
const home3 =
|
|
28467
|
+
const home3 = os5.homedir();
|
|
28456
28468
|
const under = (...parts) => path16.join(home3, ...parts);
|
|
28457
28469
|
const nodes = (root2, tail = []) => root2 ? folders(root2).map((version) => path16.join(root2, version, ...tail)) : [];
|
|
28458
28470
|
if (WINDOWS2) {
|
|
@@ -28558,7 +28570,7 @@ function copyEnv(file2, given = process.env) {
|
|
|
28558
28570
|
if (!path16.isAbsolute(file2)) return given;
|
|
28559
28571
|
return { ...given, PATH: [path16.dirname(file2), given.PATH].filter(Boolean).join(path16.delimiter) };
|
|
28560
28572
|
}
|
|
28561
|
-
var probeOptions = (file2) => ({ cwd:
|
|
28573
|
+
var probeOptions = (file2) => ({ cwd: os5.tmpdir(), env: copyEnv(file2), windowsHide: true, shell: false });
|
|
28562
28574
|
function probe(file2) {
|
|
28563
28575
|
const key = keyOf(file2);
|
|
28564
28576
|
const start = spawnable(file2, ["--version"], { ...probeOptions(file2), stdio: ["ignore", "pipe", "pipe"], timeout: PROBE_MS });
|
|
@@ -29753,7 +29765,7 @@ function createTail(log) {
|
|
|
29753
29765
|
// ../cli/package.json
|
|
29754
29766
|
var package_default = {
|
|
29755
29767
|
name: "wildcrane",
|
|
29756
|
-
version: "0.11.
|
|
29768
|
+
version: "0.11.42",
|
|
29757
29769
|
akbContract: 11,
|
|
29758
29770
|
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.",
|
|
29759
29771
|
keywords: [
|
|
@@ -31793,14 +31805,14 @@ var listed = (harness) => async () => (harness.models?.() ?? []).map((id) => ({
|
|
|
31793
31805
|
var readModels = (name) => (MODELS[name] ?? listed(HARNESSES2[name]))().catch(() => []);
|
|
31794
31806
|
var MODELS = {
|
|
31795
31807
|
"claude-code": async () => {
|
|
31796
|
-
const cached2 = claudeModels(path21.join(process.env.CLAUDE_CONFIG_DIR || path21.join(
|
|
31808
|
+
const cached2 = claudeModels(path21.join(process.env.CLAUDE_CONFIG_DIR || path21.join(os6.homedir(), ".claude"), "cache", "model-catalog"));
|
|
31797
31809
|
return cached2.length ? cached2 : [
|
|
31798
31810
|
{ id: "opus", name: "Opus" },
|
|
31799
31811
|
{ id: "sonnet", name: "Sonnet" },
|
|
31800
31812
|
{ id: "haiku", name: "Haiku" }
|
|
31801
31813
|
];
|
|
31802
31814
|
},
|
|
31803
|
-
codex: async () => codexModels(path21.join(process.env.CODEX_HOME || path21.join(
|
|
31815
|
+
codex: async () => codexModels(path21.join(process.env.CODEX_HOME || path21.join(os6.homedir(), ".codex"), "models_cache.json")),
|
|
31804
31816
|
opencode: async () => opencodeModels(await output(commandOf(HARNESSES2.opencode)[0], ["models"])),
|
|
31805
31817
|
cursor: () => cursorModels()
|
|
31806
31818
|
};
|
|
@@ -31812,7 +31824,7 @@ function cursorModels() {
|
|
|
31812
31824
|
return new Promise((resolve2) => {
|
|
31813
31825
|
let child;
|
|
31814
31826
|
try {
|
|
31815
|
-
const start = spawnable(argv[0], argv.slice(1), { cwd:
|
|
31827
|
+
const start = spawnable(argv[0], argv.slice(1), { cwd: os6.tmpdir(), stdio: ["pipe", "pipe", "ignore"], env: copyEnv(argv[0], withSystemProxy({ ...process.env, ...HARNESSES2.cursor.env() })) });
|
|
31816
31828
|
child = spawn2(start.command, start.args, start.options);
|
|
31817
31829
|
} catch {
|
|
31818
31830
|
return resolve2([]);
|
|
@@ -31825,7 +31837,7 @@ function cursorModels() {
|
|
|
31825
31837
|
const timer = setTimeout(() => done([]), MODELS_MS);
|
|
31826
31838
|
child.on("error", () => done([]));
|
|
31827
31839
|
const rpc = connect(child.stdout, child.stdin, (msg) => msg.id !== void 0 && rpc.refuse(msg.id, "no"), { jsonrpc: true });
|
|
31828
|
-
rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd:
|
|
31840
|
+
rpc.call("initialize", { protocolVersion: 1, clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false } }).then(() => rpc.call("session/new", { cwd: os6.tmpdir(), mcpServers: [] })).then((opened) => done(acpModels(opened))).catch(() => done([]));
|
|
31829
31841
|
});
|
|
31830
31842
|
}
|
|
31831
31843
|
function acpModels(opened) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wildcrane-runner",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.48",
|
|
4
4
|
"description": "WildCrane's Local Runner — connects this computer to WildCrane and runs its jobs on your local Claude Code, Codex, OpenCode or Cursor.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://wildcrane.ai/",
|