wildcrane-runner 0.6.123 → 0.6.125
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 +1531 -1366
- package/dist/akb/package.json +1 -1
- package/dist/akb-proxy.mjs +1 -1
- package/dist/codex-proxy.mjs +1 -1
- package/dist/codex-retained.mjs +1 -1
- package/dist/flow-worker-main.mjs +1599 -1236
- package/dist/launcher.mjs +55 -19
- package/dist/plugin.mjs +55 -19
- package/dist/runner.mjs +1618 -1276
- package/dist/settings.mjs +55 -19
- package/package.json +1 -1
package/dist/settings.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.125 — 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;
|
|
@@ -41755,8 +41755,8 @@ function cloudProblem(response, body) {
|
|
|
41755
41755
|
}
|
|
41756
41756
|
|
|
41757
41757
|
// src/protocol.ts
|
|
41758
|
-
var VERSION = true ? "0.6.
|
|
41759
|
-
var AKB_VERSION = true ? "0.11.
|
|
41758
|
+
var VERSION = true ? "0.6.125" : "0.0.0";
|
|
41759
|
+
var AKB_VERSION = true ? "0.11.107" : "0.0.0";
|
|
41760
41760
|
|
|
41761
41761
|
// ../cli/src/lib/agent/harnesses/antigravity.ts
|
|
41762
41762
|
import fs10 from "node:fs";
|
|
@@ -42947,8 +42947,8 @@ function createTail(log) {
|
|
|
42947
42947
|
// ../cli/package.json
|
|
42948
42948
|
var package_default = {
|
|
42949
42949
|
name: "wildcrane",
|
|
42950
|
-
version: "0.11.
|
|
42951
|
-
akbContract:
|
|
42950
|
+
version: "0.11.107",
|
|
42951
|
+
akbContract: 41,
|
|
42952
42952
|
canonicalCommands: true,
|
|
42953
42953
|
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.",
|
|
42954
42954
|
keywords: [
|
|
@@ -43064,14 +43064,14 @@ function usageOf(value, grossInput = false) {
|
|
|
43064
43064
|
const cacheCreation = num2(usage.cachedWriteTokens) + num2(usage.cacheCreationTokens);
|
|
43065
43065
|
const cacheRead = num2(usage.cachedReadTokens);
|
|
43066
43066
|
const input = num2(usage.inputTokens);
|
|
43067
|
-
const
|
|
43067
|
+
const counts2 = {
|
|
43068
43068
|
input: grossInput ? Math.max(input - cacheRead - cacheCreation, 0) : input,
|
|
43069
43069
|
cacheCreation,
|
|
43070
43070
|
cacheRead,
|
|
43071
43071
|
output: num2(usage.outputTokens)
|
|
43072
43072
|
};
|
|
43073
|
-
const sum =
|
|
43074
|
-
return sum > 0 ?
|
|
43073
|
+
const sum = counts2.input + counts2.cacheCreation + counts2.cacheRead + counts2.output;
|
|
43074
|
+
return sum > 0 ? counts2 : void 0;
|
|
43075
43075
|
}
|
|
43076
43076
|
var RESTARTED = "[board] that conversation is gone \u2014 the task was restarted in a new session\n";
|
|
43077
43077
|
async function newSession(rpc, cwd, mcpServers) {
|
|
@@ -43696,8 +43696,8 @@ function createAntigravityRenderer(expectedSession, cwd = process.cwd()) {
|
|
|
43696
43696
|
contextLimitStep = -1;
|
|
43697
43697
|
contextLimitLookedAt = 0;
|
|
43698
43698
|
const u = obj2(step.usage);
|
|
43699
|
-
const
|
|
43700
|
-
const promptTokens =
|
|
43699
|
+
const counts2 = [u.input_tokens, u.cache_read_tokens];
|
|
43700
|
+
const promptTokens = counts2.every((n) => typeof n === "number" && Number.isFinite(n) && n >= 0) ? num2(u.input_tokens) + num2(u.cache_read_tokens) : 0;
|
|
43701
43701
|
context = promptTokens > 0 && Number.isFinite(promptTokens) ? { used: promptTokens } : void 0;
|
|
43702
43702
|
}
|
|
43703
43703
|
if (step.state === "DONE" && step.usage && !counted.has(index)) {
|
|
@@ -44976,14 +44976,14 @@ function whereHint2(input, title) {
|
|
|
44976
44976
|
return "";
|
|
44977
44977
|
}
|
|
44978
44978
|
function usageOf4(value) {
|
|
44979
|
-
const
|
|
44979
|
+
const counts2 = {
|
|
44980
44980
|
input: num2(value.inputTokens),
|
|
44981
44981
|
cacheCreation: num2(value.cacheCreationTokens) || num2(value.cacheWriteTokens),
|
|
44982
44982
|
cacheRead: num2(value.cacheReadTokens),
|
|
44983
44983
|
output: num2(value.outputTokens)
|
|
44984
44984
|
};
|
|
44985
|
-
const sum =
|
|
44986
|
-
return sum > 0 ?
|
|
44985
|
+
const sum = counts2.input + counts2.cacheCreation + counts2.cacheRead + counts2.output;
|
|
44986
|
+
return sum > 0 ? counts2 : void 0;
|
|
44987
44987
|
}
|
|
44988
44988
|
var STOPPED2 = {
|
|
44989
44989
|
cancelled: "the turn was cancelled",
|
|
@@ -46013,11 +46013,11 @@ async function run(io, options, count2) {
|
|
|
46013
46013
|
if (msg.method === "thread/tokenUsage/updated") {
|
|
46014
46014
|
if (!submitted) return;
|
|
46015
46015
|
const token = obj2(p.tokenUsage);
|
|
46016
|
-
const
|
|
46017
|
-
const input = Number(
|
|
46018
|
-
const read3 = Number(
|
|
46019
|
-
const write = Number(
|
|
46020
|
-
total = { input: Math.max(0, input - read3 - write), cacheRead: read3, cacheCreation: write, output: Number(
|
|
46016
|
+
const counts2 = obj2(token.total);
|
|
46017
|
+
const input = Number(counts2.inputTokens) || 0;
|
|
46018
|
+
const read3 = Number(counts2.cachedInputTokens) || 0;
|
|
46019
|
+
const write = Number(counts2.cacheWriteInputTokens) || 0;
|
|
46020
|
+
total = { input: Math.max(0, input - read3 - write), cacheRead: read3, cacheCreation: write, output: Number(counts2.outputTokens) || 0 };
|
|
46021
46021
|
const last2 = obj2(token.last);
|
|
46022
46022
|
if (!baseline && Object.keys(last2).length) {
|
|
46023
46023
|
const cached2 = Number(last2.cachedInputTokens) || 0;
|
|
@@ -47493,13 +47493,44 @@ function memoByFiles(paths, read3) {
|
|
|
47493
47493
|
};
|
|
47494
47494
|
}
|
|
47495
47495
|
|
|
47496
|
+
// src/sync-debug.ts
|
|
47497
|
+
import { monitorEventLoopDelay } from "node:perf_hooks";
|
|
47498
|
+
var syncDebug = process.env.WILDCRANE_DEBUG_SYNC === "1";
|
|
47499
|
+
var counts = {};
|
|
47500
|
+
function logSync(event2, fields2 = {}) {
|
|
47501
|
+
if (syncDebug) console.error("[sync-debug]", JSON.stringify({ time: (/* @__PURE__ */ new Date()).toISOString(), pid: process.pid, event: event2, ...fields2 }));
|
|
47502
|
+
}
|
|
47503
|
+
if (syncDebug) {
|
|
47504
|
+
const delay2 = monitorEventLoopDelay({ resolution: 20 });
|
|
47505
|
+
delay2.enable();
|
|
47506
|
+
let cpu = process.cpuUsage();
|
|
47507
|
+
let at = performance.now();
|
|
47508
|
+
setInterval(() => {
|
|
47509
|
+
const now = performance.now();
|
|
47510
|
+
const used = process.cpuUsage(cpu);
|
|
47511
|
+
logSync("health", {
|
|
47512
|
+
cpuPercent: Math.round((used.user + used.system) / (now - at) / 10),
|
|
47513
|
+
delayMaxMs: Math.round(delay2.max / 1e6),
|
|
47514
|
+
delayP99Ms: Math.round(delay2.percentile(99) / 1e6),
|
|
47515
|
+
...counts
|
|
47516
|
+
});
|
|
47517
|
+
for (const name of Object.keys(counts)) delete counts[name];
|
|
47518
|
+
cpu = process.cpuUsage();
|
|
47519
|
+
at = now;
|
|
47520
|
+
delay2.reset();
|
|
47521
|
+
}, 5e3).unref();
|
|
47522
|
+
}
|
|
47523
|
+
|
|
47496
47524
|
// src/api.ts
|
|
47497
47525
|
var RUNTIMES = ["claude-code", "codex", "cursor", "opencode", "kimi", "dsh", "zcode", "grok", "antigravity"];
|
|
47498
47526
|
var TIMEOUT_MS = 2e4;
|
|
47499
47527
|
async function send(method, route, body, signedIn, ms, type, extra = {}) {
|
|
47528
|
+
const started = performance.now();
|
|
47529
|
+
const endpoint = route.split("?")[0];
|
|
47500
47530
|
const headers = { accept: "application/json", ...extra };
|
|
47501
47531
|
if (signedIn) {
|
|
47502
47532
|
const token = await accessToken();
|
|
47533
|
+
logSync("http.auth", { method, endpoint, ms: Math.round(performance.now() - started), ok: token.ok });
|
|
47503
47534
|
if (!token.ok) {
|
|
47504
47535
|
return token.reason === "unreachable" ? { ok: false, error: token.error } : { ok: false, error: "Sign in again.", code: "unauthenticated" };
|
|
47505
47536
|
}
|
|
@@ -47514,8 +47545,10 @@ async function send(method, route, body, signedIn, ms, type, extra = {}) {
|
|
|
47514
47545
|
body: body === void 0 ? void 0 : raw ? body : JSON.stringify(body),
|
|
47515
47546
|
signal: AbortSignal.timeout(ms)
|
|
47516
47547
|
});
|
|
47548
|
+
logSync("http.headers", { method, endpoint, ms: Math.round(performance.now() - started), status: response.status });
|
|
47517
47549
|
return { ok: true, value: response };
|
|
47518
47550
|
} catch (e) {
|
|
47551
|
+
logSync("http.failed", { method, endpoint, ms: Math.round(performance.now() - started) });
|
|
47519
47552
|
return { ok: false, error: e instanceof Error ? e.message : String(e) };
|
|
47520
47553
|
}
|
|
47521
47554
|
}
|
|
@@ -47533,8 +47566,11 @@ async function answerOf(response) {
|
|
|
47533
47566
|
};
|
|
47534
47567
|
}
|
|
47535
47568
|
async function request(method, route, body, signedIn = true) {
|
|
47569
|
+
const started = performance.now();
|
|
47536
47570
|
const sent = await send(method, route, body, signedIn, TIMEOUT_MS);
|
|
47537
|
-
|
|
47571
|
+
const result = sent.ok ? await answerOf(sent.value) : sent;
|
|
47572
|
+
logSync("http.done", { method, endpoint: route.split("?")[0], ms: Math.round(performance.now() - started), ok: result.ok });
|
|
47573
|
+
return result;
|
|
47538
47574
|
}
|
|
47539
47575
|
var FILE_TIMEOUT_MS = 10 * 6e4;
|
|
47540
47576
|
var readRunner = () => request("GET", "/v1/runner");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wildcrane-runner",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.125",
|
|
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/",
|