wildcrane-runner 0.6.70 → 0.6.71
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 +822 -883
- package/dist/akb/package.json +1 -1
- package/dist/akb-proxy.mjs +1 -1
- package/dist/codex-proxy.mjs +1 -1
- package/dist/codex-service-main.mjs +2 -2
- package/dist/flow-worker-main.mjs +15 -27
- package/dist/launcher.mjs +6 -6
- package/dist/plugin.mjs +6 -6
- package/dist/runner.mjs +16 -27
- package/dist/settings.mjs +6 -6
- package/package.json +1 -1
package/dist/akb/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"wildcrane","version":"0.11.
|
|
1
|
+
{"name":"wildcrane","version":"0.11.58","akbContract":16,"type":"module","private":true}
|
package/dist/akb-proxy.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.71 — 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/codex-proxy.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.71 — 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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.71 — 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;
|
|
@@ -27909,7 +27909,7 @@ function parseSpecAgent(text2, from, file, builtIn = false, list = () => []) {
|
|
|
27909
27909
|
const after = names(akb.after);
|
|
27910
27910
|
const declaredSession = str(akb.session);
|
|
27911
27911
|
if (declaredSession && declaredSession !== "new") {
|
|
27912
|
-
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014
|
|
27912
|
+
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014 use \`new\` to recommend a separate session, or omit the preference`);
|
|
27913
27913
|
}
|
|
27914
27914
|
let stages;
|
|
27915
27915
|
if (akb.stages !== void 0) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.71 — 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;
|
|
@@ -111893,8 +111893,8 @@ async function studioSnapshot(workspace, catalog, list2) {
|
|
|
111893
111893
|
}
|
|
111894
111894
|
|
|
111895
111895
|
// src/protocol.ts
|
|
111896
|
-
var AKB_VERSION = true ? "0.11.
|
|
111897
|
-
var AKB_CONTRACT = true ?
|
|
111896
|
+
var AKB_VERSION = true ? "0.11.58" : "0.0.0";
|
|
111897
|
+
var AKB_CONTRACT = true ? 16 : 0;
|
|
111898
111898
|
|
|
111899
111899
|
// src/secrets.ts
|
|
111900
111900
|
import fs8 from "node:fs";
|
|
@@ -112401,7 +112401,7 @@ function parseSpecAgent(text4, from, file2, builtIn = false, list2 = () => []) {
|
|
|
112401
112401
|
const after = names(akb.after);
|
|
112402
112402
|
const declaredSession = str(akb.session);
|
|
112403
112403
|
if (declaredSession && declaredSession !== "new") {
|
|
112404
|
-
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014
|
|
112404
|
+
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014 use \`new\` to recommend a separate session, or omit the preference`);
|
|
112405
112405
|
}
|
|
112406
112406
|
let stages;
|
|
112407
112407
|
if (akb.stages !== void 0) {
|
|
@@ -113056,7 +113056,7 @@ var kept = (dir) => busy(dir) || unsent(dir) || paused(dir);
|
|
|
113056
113056
|
// src/preview-bridge.ts
|
|
113057
113057
|
import http from "node:http";
|
|
113058
113058
|
import crypto3 from "node:crypto";
|
|
113059
|
-
async function previewBridge(work) {
|
|
113059
|
+
async function previewBridge(work, card) {
|
|
113060
113060
|
const token = crypto3.randomBytes(32).toString("hex");
|
|
113061
113061
|
let serial = Promise.resolve();
|
|
113062
113062
|
const server = http.createServer((req, res) => {
|
|
@@ -113074,6 +113074,7 @@ async function previewBridge(work) {
|
|
|
113074
113074
|
serial = serial.then(async () => {
|
|
113075
113075
|
try {
|
|
113076
113076
|
const fields = JSON.parse(raw);
|
|
113077
|
+
if (card !== void 0 && fields.cardId !== void 0 && fields.cardId !== card) throw Error("Only the current task can manage previews from this session.");
|
|
113077
113078
|
if (typeof fields.agent !== "string" || !/^[a-z0-9]+(-[a-z0-9]+)*$/.test(fields.agent)) throw Error("Invalid preview agent.");
|
|
113078
113079
|
answer(200, await work(fields.agent, fields));
|
|
113079
113080
|
} catch (error) {
|
|
@@ -115017,9 +115018,6 @@ ${input.languageLine}`;
|
|
|
115017
115018
|
import fs34 from "node:fs";
|
|
115018
115019
|
import path37 from "node:path";
|
|
115019
115020
|
|
|
115020
|
-
// ../cli/src/lib/agent/types.ts
|
|
115021
|
-
var NOT_COMPLETED = "The delivery has not recorded completion.";
|
|
115022
|
-
|
|
115023
115021
|
// ../cli/src/lib/question-block.ts
|
|
115024
115022
|
var MODES = ["single", "multi"];
|
|
115025
115023
|
var withoutTag = (text4) => text4.replace(/^\[user\]\s+/, "");
|
|
@@ -116504,8 +116502,8 @@ function createTail(log) {
|
|
|
116504
116502
|
// ../cli/package.json
|
|
116505
116503
|
var package_default = {
|
|
116506
116504
|
name: "wildcrane",
|
|
116507
|
-
version: "0.11.
|
|
116508
|
-
akbContract:
|
|
116505
|
+
version: "0.11.58",
|
|
116506
|
+
akbContract: 16,
|
|
116509
116507
|
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.",
|
|
116510
116508
|
keywords: [
|
|
116511
116509
|
"kanban",
|
|
@@ -120273,7 +120271,7 @@ function deliveryEnding(ws, id, asked = false) {
|
|
|
120273
120271
|
if (held5.status === "cancelled") {
|
|
120274
120272
|
return held5.steps?.some((s) => s.step === "discarded") ? { ok: false, reason: "The build was discarded." } : { ok: false, reason: "", stopped: true };
|
|
120275
120273
|
}
|
|
120276
|
-
if (held5.status === "active" &&
|
|
120274
|
+
if (held5.status === "active" && stopped2?.why) return { ok: false, reason: reasonOf(stopped2.why) ?? stopped2.why };
|
|
120277
120275
|
return null;
|
|
120278
120276
|
}
|
|
120279
120277
|
function checkoutsOf(ws, id) {
|
|
@@ -120355,7 +120353,7 @@ function boardAkb(job, ws, deps, io, task) {
|
|
|
120355
120353
|
if (!replyAssetsSynced(ws)) return { ok: false, error: "Preview uploads are still pending." };
|
|
120356
120354
|
}
|
|
120357
120355
|
return previewOperation(deps.machineId, job.id, agent, fields);
|
|
120358
|
-
}) : null;
|
|
120356
|
+
}, ws.number ?? void 0) : null;
|
|
120359
120357
|
try {
|
|
120360
120358
|
const ran = await runAkb(deps.akb, full, { cwd: ws.cwd, board: ws.board, task, language: cloudLanguage(job), env: { ...env2, ...bridge ? { AI4KANBAN_PREVIEW_BRIDGE: bridge.env } : {}, AI4KANBAN_EXECUTION: JSON.stringify({ job: job.id, machine: deps.machineId }) }, show: log?.push, track: io.track });
|
|
120361
120359
|
log?.end();
|
|
@@ -120640,7 +120638,7 @@ ${pictures(job, ws, ws.number)}`);
|
|
|
120640
120638
|
} else if (deliveryId) {
|
|
120641
120639
|
const previous = answerOf2(await akb(["raw", "run", "list", "--card", String(id2), "--all", "--json"]))?.runs?.filter((r2) => ["implement", "conflict", "hook"].includes(r2.action ?? "") && r2.deliveryId === deliveryId).sort((a2, b2) => (b2.startedAt ?? 0) - (a2.startedAt ?? 0))[0];
|
|
120642
120640
|
if (previous) {
|
|
120643
|
-
continuation =
|
|
120641
|
+
continuation = ["raw", "run", "resume", previous.sessionId, "--require-session"];
|
|
120644
120642
|
}
|
|
120645
120643
|
}
|
|
120646
120644
|
} else if (verb === "implement" && text4) {
|
|
@@ -120679,9 +120677,10 @@ ${pictures(job, ws, ws.number)}`);
|
|
|
120679
120677
|
const said = ((last ? runs.find((r2) => r2.sessionId === last)?.result : void 0) ?? answer?.result ?? answer?.error?.result)?.trim();
|
|
120680
120678
|
const spent = spentBy([...learned, ...runs.filter((r2) => (r2.startedAt ?? 0) >= since)], job);
|
|
120681
120679
|
const commit = !rejected && ran.code === 0 ? answer?.delivery?.commit : void 0;
|
|
120680
|
+
const pending = verb === "implement" && answer?.delivery?.status === "active" ? { review: {} } : {};
|
|
120682
120681
|
const landing = commit ? { landing: { commit, branch: answer?.delivery?.branch ?? "" } } : {};
|
|
120683
120682
|
const session = answer?.agentSession ?? answer?.error?.agentSession;
|
|
120684
|
-
return { ok: true, report: { ...said ? { reply: said } : {}, ...session ? { session } : {}, ...spent, card: id2, ...review ? { review } : {}, ...landing } };
|
|
120683
|
+
return { ok: true, report: { ...said ? { reply: said } : {}, ...session ? { session } : {}, ...spent, card: id2, ...pending, ...review ? { review } : {}, ...landing } };
|
|
120685
120684
|
}
|
|
120686
120685
|
async function discardBuilds() {
|
|
120687
120686
|
const pulled = await pull(ws, deps.machineId);
|
|
@@ -120729,7 +120728,6 @@ function backoffMs(attempt, random = Math.random) {
|
|
|
120729
120728
|
}
|
|
120730
120729
|
|
|
120731
120730
|
// src/recovery.ts
|
|
120732
|
-
var UNCERTAIN = "\u66F4\u65B0\u4E2D\u65AD\u65F6\u6709\u64CD\u4F5C\u7ED3\u679C\u5C1A\u672A\u786E\u8BA4\uFF0C\u8BF7\u68C0\u67E5\u5DF2\u6709\u7ED3\u679C\u540E\u518D\u7EED\u8DD1\u3002";
|
|
120733
120731
|
var fileOf = (id) => path38.join(runnerHome(), "checkpoints", `${encodeURIComponent(id)}.json`);
|
|
120734
120732
|
function readCheckpoint(id) {
|
|
120735
120733
|
try {
|
|
@@ -120764,7 +120762,7 @@ function checkpointEvent(checkpoint, event2) {
|
|
|
120764
120762
|
}
|
|
120765
120763
|
async function stopReply(id, timeout) {
|
|
120766
120764
|
const checkpoint = readCheckpoint(id);
|
|
120767
|
-
if (!checkpoint?.mark) return
|
|
120765
|
+
if (!checkpoint?.mark) return true;
|
|
120768
120766
|
killMarked(checkpoint.mark, checkpoint.process);
|
|
120769
120767
|
const until = Date.now() + timeout;
|
|
120770
120768
|
while (!processesStopped(checkpoint.mark, checkpoint.process)) {
|
|
@@ -121906,12 +121904,6 @@ async function runClaimedStep(job, deps, track, keep2, lease, scope, replyStream
|
|
|
121906
121904
|
return finish(deps, id, lease, outcome, reason, report2);
|
|
121907
121905
|
};
|
|
121908
121906
|
const replay = job.manualRecovery === true && !!previous && replayable(previous) || job.retryReplay === true && (!local || replayable(local)) || !!previous?.retry?.at && replayable(previous);
|
|
121909
|
-
if (reply && job.recoveryOf && !previous && !replay) {
|
|
121910
|
-
return finishClaimed("failed", "recovery_unsafe");
|
|
121911
|
-
}
|
|
121912
|
-
if (job.manualRecovery && (!previous && !replay || previous && !replayable(previous) && (previous.effects === void 0 || previous.pending.length || previous.opaque || !previous.session))) {
|
|
121913
|
-
return finishClaimed("failed", "recovery_unsafe");
|
|
121914
|
-
}
|
|
121915
121907
|
if (job.manualRecovery && !local) checkpoint.retry = void 0;
|
|
121916
121908
|
if (reply) checkpoint.retry ??= { since: Date.now(), attempt: 1 };
|
|
121917
121909
|
const recovering = checkpoint.updating === true || !!job.recoveryOf;
|
|
@@ -121925,10 +121917,6 @@ async function runClaimedStep(job, deps, track, keep2, lease, scope, replyStream
|
|
|
121925
121917
|
delete checkpoint.attempts;
|
|
121926
121918
|
}
|
|
121927
121919
|
checkpoint.session ??= job.resume ?? void 0;
|
|
121928
|
-
if (recovering && !checkpoint.completed && (checkpoint.pending.length || checkpoint.opaque || !job.flow && checkpoint.started && !checkpoint.session && !replay)) {
|
|
121929
|
-
saveCheckpoint(id, checkpoint);
|
|
121930
|
-
return finishClaimed("failed", job.recoveryOf ? "recovery_failed" : UNCERTAIN);
|
|
121931
|
-
}
|
|
121932
121920
|
if (reply && previous?.started && checkpoint.completed?.outcome !== "done" && !await stopReply(readCheckpoint(id) ? id : job.recoveryOf ?? id, deps.stopMs)) {
|
|
121933
121921
|
return finishClaimed("failed", "recovery_unsafe");
|
|
121934
121922
|
}
|
|
@@ -122002,7 +121990,7 @@ async function runClaimedStep(job, deps, track, keep2, lease, scope, replyStream
|
|
|
122002
121990
|
if (!sent.ok) return sent;
|
|
122003
121991
|
if (!replyAssetsSynced(folder2)) return { ok: false, error: "Preview uploads are still pending." };
|
|
122004
121992
|
return previewOperation(deps.machineId, id, agent, fields);
|
|
122005
|
-
}));
|
|
121993
|
+
}), folder2.number ?? void 0);
|
|
122006
121994
|
scope.bridge = await replyApprovalBridge(job.task, job.number, (comment, asked) => withBoard(folder2, async (send3) => {
|
|
122007
121995
|
if (checkpoint.approvalCancelled) return { ok: false, error: "This reply failed before. Ask again in a new reply." };
|
|
122008
121996
|
const pushed = await send3({ id, machineId: deps.machineId });
|
package/dist/launcher.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.71 — built by runner/scripts/build.mjs. Do not edit.
|
|
2
2
|
import { createRequire as __ai4kanbanRequire } from 'node:module'
|
|
3
3
|
const require = __ai4kanbanRequire(import.meta.url)
|
|
4
4
|
var __create = Object.create;
|
|
@@ -26903,8 +26903,8 @@ function saveAlphaUpdates(value) {
|
|
|
26903
26903
|
}
|
|
26904
26904
|
|
|
26905
26905
|
// src/protocol.ts
|
|
26906
|
-
var VERSION = true ? "0.6.
|
|
26907
|
-
var AKB_VERSION = true ? "0.11.
|
|
26906
|
+
var VERSION = true ? "0.6.71" : "0.0.0";
|
|
26907
|
+
var AKB_VERSION = true ? "0.11.58" : "0.0.0";
|
|
26908
26908
|
var EXIT_REFUSED = 10;
|
|
26909
26909
|
var EXIT_OUTDATED = 11;
|
|
26910
26910
|
var EXIT_UPDATE = 12;
|
|
@@ -27314,7 +27314,7 @@ function parseSpecAgent(text3, from, file2, builtIn = false, list2 = () => []) {
|
|
|
27314
27314
|
const after = names(akb.after);
|
|
27315
27315
|
const declaredSession = str(akb.session);
|
|
27316
27316
|
if (declaredSession && declaredSession !== "new") {
|
|
27317
|
-
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014
|
|
27317
|
+
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014 use \`new\` to recommend a separate session, or omit the preference`);
|
|
27318
27318
|
}
|
|
27319
27319
|
let stages;
|
|
27320
27320
|
if (akb.stages !== void 0) {
|
|
@@ -31077,8 +31077,8 @@ function createTail(log) {
|
|
|
31077
31077
|
// ../cli/package.json
|
|
31078
31078
|
var package_default = {
|
|
31079
31079
|
name: "wildcrane",
|
|
31080
|
-
version: "0.11.
|
|
31081
|
-
akbContract:
|
|
31080
|
+
version: "0.11.58",
|
|
31081
|
+
akbContract: 16,
|
|
31082
31082
|
description: "WildCrane's `akb` command \u2014 scaffold the Markdown board under docs/kanban/, put an agent on a card, and carry the flows the agent works by.",
|
|
31083
31083
|
keywords: [
|
|
31084
31084
|
"kanban",
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.71 — 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;
|
|
@@ -73825,8 +73825,8 @@ function machineId() {
|
|
|
73825
73825
|
var machineName = () => os3.hostname().replace(/\.local$/, "");
|
|
73826
73826
|
|
|
73827
73827
|
// src/protocol.ts
|
|
73828
|
-
var VERSION = true ? "0.6.
|
|
73829
|
-
var AKB_VERSION = true ? "0.11.
|
|
73828
|
+
var VERSION = true ? "0.6.71" : "0.0.0";
|
|
73829
|
+
var AKB_VERSION = true ? "0.11.58" : "0.0.0";
|
|
73830
73830
|
var EXIT_REFUSED = 10;
|
|
73831
73831
|
var EXIT_OUTDATED = 11;
|
|
73832
73832
|
var EXIT_UPDATE = 12;
|
|
@@ -74261,7 +74261,7 @@ function parseSpecAgent(text4, from, file2, builtIn = false, list2 = () => []) {
|
|
|
74261
74261
|
const after = names(akb.after);
|
|
74262
74262
|
const declaredSession = str(akb.session);
|
|
74263
74263
|
if (declaredSession && declaredSession !== "new") {
|
|
74264
|
-
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014
|
|
74264
|
+
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014 use \`new\` to recommend a separate session, or omit the preference`);
|
|
74265
74265
|
}
|
|
74266
74266
|
let stages;
|
|
74267
74267
|
if (akb.stages !== void 0) {
|
|
@@ -77658,8 +77658,8 @@ function createTail(log) {
|
|
|
77658
77658
|
// ../cli/package.json
|
|
77659
77659
|
var package_default = {
|
|
77660
77660
|
name: "wildcrane",
|
|
77661
|
-
version: "0.11.
|
|
77662
|
-
akbContract:
|
|
77661
|
+
version: "0.11.58",
|
|
77662
|
+
akbContract: 16,
|
|
77663
77663
|
description: "WildCrane's `akb` command \u2014 scaffold the Markdown board under docs/kanban/, put an agent on a card, and carry the flows the agent works by.",
|
|
77664
77664
|
keywords: [
|
|
77665
77665
|
"kanban",
|
package/dist/runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.71 — 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;
|
|
@@ -112162,9 +112162,9 @@ function status(line) {
|
|
|
112162
112162
|
}
|
|
112163
112163
|
|
|
112164
112164
|
// src/protocol.ts
|
|
112165
|
-
var VERSION = true ? "0.6.
|
|
112166
|
-
var AKB_VERSION = true ? "0.11.
|
|
112167
|
-
var AKB_CONTRACT = true ?
|
|
112165
|
+
var VERSION = true ? "0.6.71" : "0.0.0";
|
|
112166
|
+
var AKB_VERSION = true ? "0.11.58" : "0.0.0";
|
|
112167
|
+
var AKB_CONTRACT = true ? 16 : 0;
|
|
112168
112168
|
var EXIT_REFUSED = 10;
|
|
112169
112169
|
var EXIT_OUTDATED = 11;
|
|
112170
112170
|
var EXIT_UPDATE = 12;
|
|
@@ -114322,8 +114322,8 @@ function createTail(log) {
|
|
|
114322
114322
|
// ../cli/package.json
|
|
114323
114323
|
var package_default = {
|
|
114324
114324
|
name: "wildcrane",
|
|
114325
|
-
version: "0.11.
|
|
114326
|
-
akbContract:
|
|
114325
|
+
version: "0.11.58",
|
|
114326
|
+
akbContract: 16,
|
|
114327
114327
|
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.",
|
|
114328
114328
|
keywords: [
|
|
114329
114329
|
"kanban",
|
|
@@ -115223,9 +115223,6 @@ var canonicalSpecAgent = (name) => {
|
|
|
115223
115223
|
return LEGACY_SPEC_AGENT_NAMES[asked] ?? asked;
|
|
115224
115224
|
};
|
|
115225
115225
|
|
|
115226
|
-
// ../cli/src/lib/agent/types.ts
|
|
115227
|
-
var NOT_COMPLETED = "The delivery has not recorded completion.";
|
|
115228
|
-
|
|
115229
115226
|
// ../cli/src/lib/agent/settings.ts
|
|
115230
115227
|
var BACKGROUND_WAIT = { minutes: 120 };
|
|
115231
115228
|
|
|
@@ -118470,7 +118467,7 @@ function parseSpecAgent(text4, from, file3, builtIn = false, list2 = () => []) {
|
|
|
118470
118467
|
const after = names(akb.after);
|
|
118471
118468
|
const declaredSession = str3(akb.session);
|
|
118472
118469
|
if (declaredSession && declaredSession !== "new") {
|
|
118473
|
-
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014
|
|
118470
|
+
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014 use \`new\` to recommend a separate session, or omit the preference`);
|
|
118474
118471
|
}
|
|
118475
118472
|
let stages;
|
|
118476
118473
|
if (akb.stages !== void 0) {
|
|
@@ -121618,7 +121615,7 @@ async function answerHint(machineId2, hint2) {
|
|
|
121618
121615
|
// src/preview-bridge.ts
|
|
121619
121616
|
import http from "node:http";
|
|
121620
121617
|
import crypto6 from "node:crypto";
|
|
121621
|
-
async function previewBridge(work) {
|
|
121618
|
+
async function previewBridge(work, card) {
|
|
121622
121619
|
const token = crypto6.randomBytes(32).toString("hex");
|
|
121623
121620
|
let serial = Promise.resolve();
|
|
121624
121621
|
const server = http.createServer((req, res) => {
|
|
@@ -121636,6 +121633,7 @@ async function previewBridge(work) {
|
|
|
121636
121633
|
serial = serial.then(async () => {
|
|
121637
121634
|
try {
|
|
121638
121635
|
const fields = JSON.parse(raw);
|
|
121636
|
+
if (card !== void 0 && fields.cardId !== void 0 && fields.cardId !== card) throw Error("Only the current task can manage previews from this session.");
|
|
121639
121637
|
if (typeof fields.agent !== "string" || !/^[a-z0-9]+(-[a-z0-9]+)*$/.test(fields.agent)) throw Error("Invalid preview agent.");
|
|
121640
121638
|
answer(200, await work(fields.agent, fields));
|
|
121641
121639
|
} catch (error) {
|
|
@@ -122167,7 +122165,7 @@ function deliveryEnding(ws, id, asked = false) {
|
|
|
122167
122165
|
if (held5.status === "cancelled") {
|
|
122168
122166
|
return held5.steps?.some((s) => s.step === "discarded") ? { ok: false, reason: "The build was discarded." } : { ok: false, reason: "", stopped: true };
|
|
122169
122167
|
}
|
|
122170
|
-
if (held5.status === "active" &&
|
|
122168
|
+
if (held5.status === "active" && stopped2?.why) return { ok: false, reason: reasonOf(stopped2.why) ?? stopped2.why };
|
|
122171
122169
|
return null;
|
|
122172
122170
|
}
|
|
122173
122171
|
function checkoutsOf(ws, id) {
|
|
@@ -122249,7 +122247,7 @@ function boardAkb(job, ws, deps, io, task) {
|
|
|
122249
122247
|
if (!replyAssetsSynced(ws)) return { ok: false, error: "Preview uploads are still pending." };
|
|
122250
122248
|
}
|
|
122251
122249
|
return previewOperation(deps.machineId, job.id, agent, fields);
|
|
122252
|
-
}) : null;
|
|
122250
|
+
}, ws.number ?? void 0) : null;
|
|
122253
122251
|
try {
|
|
122254
122252
|
const ran = await runAkb(deps.akb, full, { cwd: ws.cwd, board: ws.board, task, language: cloudLanguage(job), env: { ...env2, ...bridge ? { AI4KANBAN_PREVIEW_BRIDGE: bridge.env } : {}, AI4KANBAN_EXECUTION: JSON.stringify({ job: job.id, machine: deps.machineId }) }, show: log?.push, track: io.track });
|
|
122255
122253
|
log?.end();
|
|
@@ -122534,7 +122532,7 @@ ${pictures(job, ws, ws.number)}`);
|
|
|
122534
122532
|
} else if (deliveryId) {
|
|
122535
122533
|
const previous = answerOf2(await akb(["raw", "run", "list", "--card", String(id2), "--all", "--json"]))?.runs?.filter((r2) => ["implement", "conflict", "hook"].includes(r2.action ?? "") && r2.deliveryId === deliveryId).sort((a2, b2) => (b2.startedAt ?? 0) - (a2.startedAt ?? 0))[0];
|
|
122536
122534
|
if (previous) {
|
|
122537
|
-
continuation =
|
|
122535
|
+
continuation = ["raw", "run", "resume", previous.sessionId, "--require-session"];
|
|
122538
122536
|
}
|
|
122539
122537
|
}
|
|
122540
122538
|
} else if (verb === "implement" && text4) {
|
|
@@ -122573,9 +122571,10 @@ ${pictures(job, ws, ws.number)}`);
|
|
|
122573
122571
|
const said = ((last2 ? runs.find((r2) => r2.sessionId === last2)?.result : void 0) ?? answer?.result ?? answer?.error?.result)?.trim();
|
|
122574
122572
|
const spent = spentBy([...learned, ...runs.filter((r2) => (r2.startedAt ?? 0) >= since)], job);
|
|
122575
122573
|
const commit = !rejected && ran.code === 0 ? answer?.delivery?.commit : void 0;
|
|
122574
|
+
const pending = verb === "implement" && answer?.delivery?.status === "active" ? { review: {} } : {};
|
|
122576
122575
|
const landing = commit ? { landing: { commit, branch: answer?.delivery?.branch ?? "" } } : {};
|
|
122577
122576
|
const session = answer?.agentSession ?? answer?.error?.agentSession;
|
|
122578
|
-
return { ok: true, report: { ...said ? { reply: said } : {}, ...session ? { session } : {}, ...spent, card: id2, ...review ? { review } : {}, ...landing } };
|
|
122577
|
+
return { ok: true, report: { ...said ? { reply: said } : {}, ...session ? { session } : {}, ...spent, card: id2, ...pending, ...review ? { review } : {}, ...landing } };
|
|
122579
122578
|
}
|
|
122580
122579
|
async function discardBuilds() {
|
|
122581
122580
|
const pulled = await pull(ws, deps.machineId);
|
|
@@ -122660,7 +122659,7 @@ function checkpointEvent(checkpoint, event2) {
|
|
|
122660
122659
|
}
|
|
122661
122660
|
async function stopReply(id, timeout) {
|
|
122662
122661
|
const checkpoint = readCheckpoint(id);
|
|
122663
|
-
if (!checkpoint?.mark) return
|
|
122662
|
+
if (!checkpoint?.mark) return true;
|
|
122664
122663
|
killMarked(checkpoint.mark, checkpoint.process);
|
|
122665
122664
|
const until = Date.now() + timeout;
|
|
122666
122665
|
while (!processesStopped(checkpoint.mark, checkpoint.process)) {
|
|
@@ -123793,12 +123792,6 @@ async function runClaimedStep(job, deps, track, keep2, lease, scope, replyStream
|
|
|
123793
123792
|
return finish(deps, id, lease, outcome, reason, report2);
|
|
123794
123793
|
};
|
|
123795
123794
|
const replay = job.manualRecovery === true && !!previous && replayable(previous) || job.retryReplay === true && (!local || replayable(local)) || !!previous?.retry?.at && replayable(previous);
|
|
123796
|
-
if (reply && job.recoveryOf && !previous && !replay) {
|
|
123797
|
-
return finishClaimed("failed", "recovery_unsafe");
|
|
123798
|
-
}
|
|
123799
|
-
if (job.manualRecovery && (!previous && !replay || previous && !replayable(previous) && (previous.effects === void 0 || previous.pending.length || previous.opaque || !previous.session))) {
|
|
123800
|
-
return finishClaimed("failed", "recovery_unsafe");
|
|
123801
|
-
}
|
|
123802
123795
|
if (job.manualRecovery && !local) checkpoint.retry = void 0;
|
|
123803
123796
|
if (reply) checkpoint.retry ??= { since: Date.now(), attempt: 1 };
|
|
123804
123797
|
const recovering = checkpoint.updating === true || !!job.recoveryOf;
|
|
@@ -123812,10 +123805,6 @@ async function runClaimedStep(job, deps, track, keep2, lease, scope, replyStream
|
|
|
123812
123805
|
delete checkpoint.attempts;
|
|
123813
123806
|
}
|
|
123814
123807
|
checkpoint.session ??= job.resume ?? void 0;
|
|
123815
|
-
if (recovering && !checkpoint.completed && (checkpoint.pending.length || checkpoint.opaque || !job.flow && checkpoint.started && !checkpoint.session && !replay)) {
|
|
123816
|
-
saveCheckpoint(id, checkpoint);
|
|
123817
|
-
return finishClaimed("failed", job.recoveryOf ? "recovery_failed" : UNCERTAIN);
|
|
123818
|
-
}
|
|
123819
123808
|
if (reply && previous?.started && checkpoint.completed?.outcome !== "done" && !await stopReply(readCheckpoint(id) ? id : job.recoveryOf ?? id, deps.stopMs)) {
|
|
123820
123809
|
return finishClaimed("failed", "recovery_unsafe");
|
|
123821
123810
|
}
|
|
@@ -123889,7 +123878,7 @@ async function runClaimedStep(job, deps, track, keep2, lease, scope, replyStream
|
|
|
123889
123878
|
if (!sent.ok) return sent;
|
|
123890
123879
|
if (!replyAssetsSynced(folder2)) return { ok: false, error: "Preview uploads are still pending." };
|
|
123891
123880
|
return previewOperation(deps.machineId, id, agent, fields);
|
|
123892
|
-
}));
|
|
123881
|
+
}), folder2.number ?? void 0);
|
|
123893
123882
|
scope.bridge = await replyApprovalBridge(job.task, job.number, (comment, asked) => withBoard(folder2, async (send3) => {
|
|
123894
123883
|
if (checkpoint.approvalCancelled) return { ok: false, error: "This reply failed before. Ask again in a new reply." };
|
|
123895
123884
|
const pushed = await send3({ id, machineId: deps.machineId });
|
package/dist/settings.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.71 — 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;
|
|
@@ -27011,8 +27011,8 @@ async function stopExecutors() {
|
|
|
27011
27011
|
}
|
|
27012
27012
|
|
|
27013
27013
|
// src/protocol.ts
|
|
27014
|
-
var VERSION = true ? "0.6.
|
|
27015
|
-
var AKB_VERSION = true ? "0.11.
|
|
27014
|
+
var VERSION = true ? "0.6.71" : "0.0.0";
|
|
27015
|
+
var AKB_VERSION = true ? "0.11.58" : "0.0.0";
|
|
27016
27016
|
|
|
27017
27017
|
// src/api.ts
|
|
27018
27018
|
var RUNTIMES = ["claude-code", "codex", "cursor", "opencode", "kimi", "dsh", "zcode", "grok", "antigravity"];
|
|
@@ -27334,7 +27334,7 @@ function parseSpecAgent(text3, from, file2, builtIn = false, list2 = () => []) {
|
|
|
27334
27334
|
const after = names(akb.after);
|
|
27335
27335
|
const declaredSession = str(akb.session);
|
|
27336
27336
|
if (declaredSession && declaredSession !== "new") {
|
|
27337
|
-
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014
|
|
27337
|
+
return bad(`\`${name}\` declares \`akb.session: ${declaredSession}\` \u2014 use \`new\` to recommend a separate session, or omit the preference`);
|
|
27338
27338
|
}
|
|
27339
27339
|
let stages;
|
|
27340
27340
|
if (akb.stages !== void 0) {
|
|
@@ -30348,8 +30348,8 @@ function createTail(log) {
|
|
|
30348
30348
|
// ../cli/package.json
|
|
30349
30349
|
var package_default = {
|
|
30350
30350
|
name: "wildcrane",
|
|
30351
|
-
version: "0.11.
|
|
30352
|
-
akbContract:
|
|
30351
|
+
version: "0.11.58",
|
|
30352
|
+
akbContract: 16,
|
|
30353
30353
|
description: "WildCrane's `akb` command \u2014 scaffold the Markdown board under docs/kanban/, put an agent on a card, and carry the flows the agent works by.",
|
|
30354
30354
|
keywords: [
|
|
30355
30355
|
"kanban",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wildcrane-runner",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.71",
|
|
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/",
|