wildcrane-runner 0.6.99 → 0.6.101
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 +409 -102
- 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 +1247 -781
- package/dist/launcher.mjs +111 -22
- package/dist/plugin.mjs +111 -22
- package/dist/runner.mjs +1316 -842
- package/dist/settings.mjs +111 -22
- package/package.json +1 -1
package/dist/settings.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.101 — 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;
|
|
@@ -61003,8 +61003,8 @@ var reviewPlanSchema = external_exports.array(reviewNodeSchema).max(50).superRef
|
|
|
61003
61003
|
}).nullable();
|
|
61004
61004
|
|
|
61005
61005
|
// src/protocol.ts
|
|
61006
|
-
var VERSION = true ? "0.6.
|
|
61007
|
-
var AKB_VERSION = true ? "0.11.
|
|
61006
|
+
var VERSION = true ? "0.6.101" : "0.0.0";
|
|
61007
|
+
var AKB_VERSION = true ? "0.11.81" : "0.0.0";
|
|
61008
61008
|
|
|
61009
61009
|
// src/api.ts
|
|
61010
61010
|
var RUNTIMES = ["claude-code", "codex", "cursor", "opencode", "kimi", "dsh", "zcode", "grok", "antigravity"];
|
|
@@ -62618,6 +62618,7 @@ function antigravityPrices(at) {
|
|
|
62618
62618
|
return {
|
|
62619
62619
|
"gemini-4-carbon": { input: pro, cachedInput: pro / 20, output: pro * 5 },
|
|
62620
62620
|
"gemini-4-argon": { input: pro, cachedInput: pro / 20, output: pro * 5 },
|
|
62621
|
+
"gemini-4-neon": { input: 3, cachedInput: 0.15, output: 15 },
|
|
62621
62622
|
"gemini-4-hydrogen": { input: 1.5, cachedInput: 0.075, output: 7.5 },
|
|
62622
62623
|
"gemini-3.8-flash": { input: flash, cachedInput: flash / 10, output: flash * 5 }
|
|
62623
62624
|
};
|
|
@@ -62890,9 +62891,37 @@ function bytesField(data, field) {
|
|
|
62890
62891
|
if (number4 === field && value instanceof Uint8Array) return value;
|
|
62891
62892
|
}
|
|
62892
62893
|
}
|
|
62894
|
+
function varintField(data, field) {
|
|
62895
|
+
if (!(data instanceof Uint8Array)) return;
|
|
62896
|
+
for (const [number4, value] of fields(data)) {
|
|
62897
|
+
if (number4 === field && typeof value === "number") return value;
|
|
62898
|
+
}
|
|
62899
|
+
}
|
|
62900
|
+
function stepIndices(data) {
|
|
62901
|
+
const out = [];
|
|
62902
|
+
for (const [field, value] of fields(data)) {
|
|
62903
|
+
if (field !== 2) continue;
|
|
62904
|
+
if (typeof value === "number") out.push(value);
|
|
62905
|
+
else {
|
|
62906
|
+
const offset = { value: 0 };
|
|
62907
|
+
while (offset.value < value.length) out.push(varint(value, offset));
|
|
62908
|
+
}
|
|
62909
|
+
}
|
|
62910
|
+
return out;
|
|
62911
|
+
}
|
|
62912
|
+
function recordedContextLimit(data) {
|
|
62913
|
+
const limit = varintField(bytesField(bytesField(bytesField(data, 1), 9), 10), 4);
|
|
62914
|
+
return limit !== void 0 && Number.isSafeInteger(limit) && limit > 0 ? limit : void 0;
|
|
62915
|
+
}
|
|
62893
62916
|
var utf8 = (bytes2) => bytes2 && Buffer.from(bytes2).toString("utf8");
|
|
62917
|
+
function stepUuid(stepRow, index) {
|
|
62918
|
+
if (!Number.isSafeInteger(index) || index < 0) return;
|
|
62919
|
+
const id2 = bytesField(stepRow.get(index)?.metadata, 12);
|
|
62920
|
+
return id2?.length === 36 ? id2 : void 0;
|
|
62921
|
+
}
|
|
62894
62922
|
function antigravityRecordedModels(session, steps) {
|
|
62895
62923
|
const found = /* @__PURE__ */ new Map();
|
|
62924
|
+
if (!steps.size) return found;
|
|
62896
62925
|
const file3 = antigravityConversationFile(session);
|
|
62897
62926
|
if (!file3 || !existsSync(file3)) return found;
|
|
62898
62927
|
try {
|
|
@@ -62900,26 +62929,31 @@ function antigravityRecordedModels(session, steps) {
|
|
|
62900
62929
|
if (!sqlite) return found;
|
|
62901
62930
|
const db = new sqlite.DatabaseSync(file3, { readOnly: true });
|
|
62902
62931
|
try {
|
|
62903
|
-
const
|
|
62932
|
+
const stepRow = db.prepare("SELECT metadata FROM steps WHERE idx = ?");
|
|
62933
|
+
const promptIds = /* @__PURE__ */ new Map();
|
|
62934
|
+
const promptUuid = (prompt) => {
|
|
62935
|
+
if (!promptIds.has(prompt)) promptIds.set(prompt, stepUuid(stepRow, prompt));
|
|
62936
|
+
return promptIds.get(prompt);
|
|
62937
|
+
};
|
|
62938
|
+
const groups = /* @__PURE__ */ new Map();
|
|
62939
|
+
for (const [index, { prompt }] of steps) {
|
|
62940
|
+
if (!Number.isSafeInteger(index) || index < 0) continue;
|
|
62941
|
+
const id2 = stepUuid(stepRow, index) ?? promptUuid(prompt);
|
|
62942
|
+
if (!id2) continue;
|
|
62943
|
+
const uuid3 = utf8(id2);
|
|
62944
|
+
let group = groups.get(uuid3);
|
|
62945
|
+
if (!group) groups.set(uuid3, group = { id: id2, steps: /* @__PURE__ */ new Set() });
|
|
62946
|
+
group.steps.add(index);
|
|
62947
|
+
}
|
|
62904
62948
|
const generations = db.prepare("SELECT data FROM gen_metadata WHERE instr(data, ?) > 0");
|
|
62905
|
-
for (const
|
|
62906
|
-
const id2 = bytesField(prompt.get(index)?.metadata, 12);
|
|
62907
|
-
if (id2?.length !== 36) continue;
|
|
62949
|
+
for (const [uuid3, { id: id2, steps: groupSteps }] of groups) {
|
|
62908
62950
|
const key = Buffer.concat([Buffer.from([34, 36]), id2]);
|
|
62909
62951
|
for (const { data } of generations.iterate(key)) {
|
|
62910
|
-
if (!(data instanceof Uint8Array) || utf8(bytesField(data, 4)) !==
|
|
62952
|
+
if (!(data instanceof Uint8Array) || utf8(bytesField(data, 4)) !== uuid3) continue;
|
|
62911
62953
|
const model = utf8(bytesField(bytesField(data, 1), 19)) || void 0;
|
|
62912
|
-
const
|
|
62913
|
-
if (
|
|
62954
|
+
for (const step of stepIndices(data)) {
|
|
62955
|
+
if (!groupSteps.has(step)) continue;
|
|
62914
62956
|
found.set(step, found.has(step) && found.get(step) !== model ? void 0 : model);
|
|
62915
|
-
};
|
|
62916
|
-
for (const [field, value] of fields(data)) {
|
|
62917
|
-
if (field !== 2) continue;
|
|
62918
|
-
if (typeof value === "number") record2(value);
|
|
62919
|
-
else {
|
|
62920
|
-
const offset = { value: 0 };
|
|
62921
|
-
while (offset.value < value.length) record2(varint(value, offset));
|
|
62922
|
-
}
|
|
62923
62957
|
}
|
|
62924
62958
|
}
|
|
62925
62959
|
}
|
|
@@ -62931,8 +62965,41 @@ function antigravityRecordedModels(session, steps) {
|
|
|
62931
62965
|
return /* @__PURE__ */ new Map();
|
|
62932
62966
|
}
|
|
62933
62967
|
}
|
|
62968
|
+
function antigravityRecordedContextLimit(session, step, prompt) {
|
|
62969
|
+
if (!Number.isSafeInteger(step) || step < 0) return;
|
|
62970
|
+
const file3 = antigravityConversationFile(session);
|
|
62971
|
+
if (!file3 || !existsSync(file3)) return;
|
|
62972
|
+
try {
|
|
62973
|
+
const sqlite = process.getBuiltinModule?.("node:sqlite");
|
|
62974
|
+
if (!sqlite) return;
|
|
62975
|
+
const db = new sqlite.DatabaseSync(file3, { readOnly: true });
|
|
62976
|
+
try {
|
|
62977
|
+
const stepRow = db.prepare("SELECT metadata FROM steps WHERE idx = ?");
|
|
62978
|
+
const id2 = stepUuid(stepRow, step) ?? stepUuid(stepRow, prompt);
|
|
62979
|
+
if (!id2) return;
|
|
62980
|
+
const key = Buffer.concat([Buffer.from([34, 36]), id2]);
|
|
62981
|
+
const generations = db.prepare("SELECT data FROM gen_metadata WHERE instr(data, ?) > 0");
|
|
62982
|
+
let found;
|
|
62983
|
+
let matched = false;
|
|
62984
|
+
for (const { data } of generations.iterate(key)) {
|
|
62985
|
+
if (!(data instanceof Uint8Array) || utf8(bytesField(data, 4)) !== utf8(id2)) continue;
|
|
62986
|
+
if (!stepIndices(data).includes(step)) continue;
|
|
62987
|
+
const limit = recordedContextLimit(data);
|
|
62988
|
+
if (matched && found !== limit) return;
|
|
62989
|
+
found = limit;
|
|
62990
|
+
matched = true;
|
|
62991
|
+
}
|
|
62992
|
+
return found;
|
|
62993
|
+
} finally {
|
|
62994
|
+
db.close();
|
|
62995
|
+
}
|
|
62996
|
+
} catch {
|
|
62997
|
+
return;
|
|
62998
|
+
}
|
|
62999
|
+
}
|
|
62934
63000
|
|
|
62935
63001
|
// ../cli/src/lib/agent/wire/antigravity.ts
|
|
63002
|
+
var CONTEXT_LOOK_EVERY_MS = 250;
|
|
62936
63003
|
var KINDS = {
|
|
62937
63004
|
run_command: "execute",
|
|
62938
63005
|
command_status: "execute",
|
|
@@ -62979,6 +63046,20 @@ function createAntigravityRenderer(expectedSession, cwd = process.cwd()) {
|
|
|
62979
63046
|
let stderr = "";
|
|
62980
63047
|
let context;
|
|
62981
63048
|
let contextStep = -1;
|
|
63049
|
+
let contextPrompt = -1;
|
|
63050
|
+
let contextLimitStep = -1;
|
|
63051
|
+
let contextLimitLookedAt = 0;
|
|
63052
|
+
const resolveContextLimit = (now) => {
|
|
63053
|
+
if (!context || !session || contextStep < 0 || contextLimitStep === contextStep) return;
|
|
63054
|
+
const at = Date.now();
|
|
63055
|
+
if (!now && at - contextLimitLookedAt < CONTEXT_LOOK_EVERY_MS) return;
|
|
63056
|
+
contextLimitLookedAt = at;
|
|
63057
|
+
const limit = antigravityRecordedContextLimit(session, contextStep, contextPrompt);
|
|
63058
|
+
if (limit !== void 0) {
|
|
63059
|
+
context = { used: context.used, limit };
|
|
63060
|
+
contextLimitStep = contextStep;
|
|
63061
|
+
}
|
|
63062
|
+
};
|
|
62982
63063
|
const started = Date.now();
|
|
62983
63064
|
let cost;
|
|
62984
63065
|
let incomplete = false;
|
|
@@ -63044,10 +63125,13 @@ function createAntigravityRenderer(expectedSession, cwd = process.cwd()) {
|
|
|
63044
63125
|
const index = num2(step.step_index);
|
|
63045
63126
|
if (step.state === "DONE" && Number.isSafeInteger(index) && step.step_index === index && index > contextStep) {
|
|
63046
63127
|
contextStep = index;
|
|
63128
|
+
contextPrompt = prompt;
|
|
63129
|
+
contextLimitStep = -1;
|
|
63130
|
+
contextLimitLookedAt = 0;
|
|
63047
63131
|
const u = obj2(step.usage);
|
|
63048
63132
|
const counts = [u.input_tokens, u.cache_read_tokens];
|
|
63049
|
-
const
|
|
63050
|
-
context =
|
|
63133
|
+
const promptTokens = counts.every((n) => typeof n === "number" && Number.isFinite(n) && n >= 0) ? num2(u.input_tokens) + num2(u.cache_read_tokens) : 0;
|
|
63134
|
+
context = promptTokens > 0 && Number.isFinite(promptTokens) ? { used: promptTokens } : void 0;
|
|
63051
63135
|
}
|
|
63052
63136
|
if (step.state === "DONE" && step.usage && !counted.has(index)) {
|
|
63053
63137
|
counted.add(index);
|
|
@@ -63100,6 +63184,7 @@ ${imageError(target, reason || str2(step.state))}
|
|
|
63100
63184
|
return "";
|
|
63101
63185
|
}
|
|
63102
63186
|
session ||= str2(result.conversation_id) || void 0;
|
|
63187
|
+
resolveContextLimit(true);
|
|
63103
63188
|
terminal = true;
|
|
63104
63189
|
final = typeof result.response === "string" ? result.response : void 0;
|
|
63105
63190
|
const total = usageOf(result.usage);
|
|
@@ -63131,6 +63216,7 @@ ${imageError(target, reason || str2(step.state))}
|
|
|
63131
63216
|
},
|
|
63132
63217
|
flush() {
|
|
63133
63218
|
const text2 = reader.flush();
|
|
63219
|
+
resolveContextLimit(true);
|
|
63134
63220
|
if (pendingCosts.size) {
|
|
63135
63221
|
const models = session ? antigravityRecordedModels(session, pendingCosts) : void 0;
|
|
63136
63222
|
for (const [index, { usage }] of pendingCosts) estimate(models?.get(index), usage);
|
|
@@ -63153,7 +63239,10 @@ ${imageError(target, reason || str2(step.state))}
|
|
|
63153
63239
|
usage: () => used,
|
|
63154
63240
|
costUsd: () => cost,
|
|
63155
63241
|
costIncomplete: () => incomplete || void 0,
|
|
63156
|
-
context: () =>
|
|
63242
|
+
context: () => {
|
|
63243
|
+
resolveContextLimit(false);
|
|
63244
|
+
return context;
|
|
63245
|
+
},
|
|
63157
63246
|
failure: () => failure3 || imageFailure,
|
|
63158
63247
|
terminalFailure: () => terminal && !!classified,
|
|
63159
63248
|
executionFailure: () => classified ?? (imageFailure ? { code: "image_read_failed", level: 3, reason: imageFailure } : void 0),
|
|
@@ -64501,7 +64590,7 @@ function createTail(log) {
|
|
|
64501
64590
|
// ../cli/package.json
|
|
64502
64591
|
var package_default = {
|
|
64503
64592
|
name: "wildcrane",
|
|
64504
|
-
version: "0.11.
|
|
64593
|
+
version: "0.11.81",
|
|
64505
64594
|
akbContract: 27,
|
|
64506
64595
|
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.",
|
|
64507
64596
|
keywords: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wildcrane-runner",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.101",
|
|
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/",
|