wildcrane 0.11.54 → 0.11.55
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/kanban.mjs +28 -7
- package/package.json +1 -1
package/dist/kanban.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// ai4kanban 0.11.
|
|
2
|
+
// ai4kanban 0.11.55 — built from the CLI's TypeScript sources by cli/scripts/build.mjs.
|
|
3
3
|
// Do not edit: every change belongs in cli/src/, and a build overwrites this file.
|
|
4
4
|
import { createRequire as __ai4kanbanRequire } from 'node:module'
|
|
5
5
|
const require = __ai4kanbanRequire(import.meta.url)
|
|
@@ -4206,7 +4206,7 @@ var init_package = __esm({
|
|
|
4206
4206
|
"package.json"() {
|
|
4207
4207
|
package_default = {
|
|
4208
4208
|
name: "wildcrane",
|
|
4209
|
-
version: "0.11.
|
|
4209
|
+
version: "0.11.55",
|
|
4210
4210
|
akbContract: 15,
|
|
4211
4211
|
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.",
|
|
4212
4212
|
keywords: [
|
|
@@ -5366,7 +5366,7 @@ async function run(io, options, tasks) {
|
|
|
5366
5366
|
if (failure) io.event?.({ kind: "error", data: { text: failure } });
|
|
5367
5367
|
resolve2({ ok: !failure, error: failure, result: renderer.result(), replyParts: renderer.replyParts?.(), usage: combinedUsage, context, costUsd, costIncomplete: child.costIncomplete || cost === void 0 && child.costUsd !== void 0 || void 0 });
|
|
5368
5368
|
};
|
|
5369
|
-
const closed2 = () => end2("Codex closed
|
|
5369
|
+
const closed2 = () => end2("Codex connection closed before all work and results finished.");
|
|
5370
5370
|
io.stdout.once("close", closed2);
|
|
5371
5371
|
const update2 = (id, state, title = "") => {
|
|
5372
5372
|
if (ended) return;
|
|
@@ -26327,8 +26327,13 @@ async function watchRun(sessionId, resume = startResume) {
|
|
|
26327
26327
|
const eventsFile = fs84.createWriteStream(eventsPathOf(sessionId), { flags: "a" });
|
|
26328
26328
|
eventsFile.on("error", () => {
|
|
26329
26329
|
});
|
|
26330
|
-
const
|
|
26330
|
+
const pendingOperations = /* @__PURE__ */ new Set();
|
|
26331
|
+
const event2 = (e) => {
|
|
26332
|
+
if (e.kind === "tool_call" && !["read", "search", "fetch"].includes(e.data.kind) && !["completed", "failed"].includes(e.data.status)) pendingOperations.add(e.data.toolCallId);
|
|
26333
|
+
if ((e.kind === "tool_call" || e.kind === "tool_call_update") && ["completed", "failed"].includes(e.data.status ?? "")) pendingOperations.delete(e.data.toolCallId);
|
|
26334
|
+
eventsFile.write(`${JSON.stringify(e)}
|
|
26331
26335
|
`);
|
|
26336
|
+
};
|
|
26332
26337
|
const log = {
|
|
26333
26338
|
write(text4) {
|
|
26334
26339
|
logFile.write(text4);
|
|
@@ -26497,6 +26502,7 @@ async function watchRun(sessionId, resume = startResume) {
|
|
|
26497
26502
|
return await new Promise((resolve2) => {
|
|
26498
26503
|
let done = false;
|
|
26499
26504
|
let spoken;
|
|
26505
|
+
let crashed = false;
|
|
26500
26506
|
let silent = false;
|
|
26501
26507
|
let waited = false;
|
|
26502
26508
|
let idle;
|
|
@@ -26542,6 +26548,9 @@ async function watchRun(sessionId, resume = startResume) {
|
|
|
26542
26548
|
const endedAt = Date.now();
|
|
26543
26549
|
const blocker = peekRun(sessionId)?.blocker;
|
|
26544
26550
|
let failure = renderer?.failure?.() ?? (!taskCompleted && renderer?.background?.() ? "The agent exited with unfinished background tasks." : void 0);
|
|
26551
|
+
if (!asked && pendingOperations.size > 0 && (code !== 0 || spoken?.ok === false)) {
|
|
26552
|
+
failure = `${failure ?? spoken?.error ?? "Agent exited."} Operation results are unconfirmed; automatic recovery was skipped.`;
|
|
26553
|
+
}
|
|
26545
26554
|
const unfinished = blocker || failure;
|
|
26546
26555
|
const result = spoken ? spoken.result : renderer?.result();
|
|
26547
26556
|
const held4 = peekRun(sessionId) ?? record;
|
|
@@ -26549,8 +26558,19 @@ async function watchRun(sessionId, resume = startResume) {
|
|
|
26549
26558
|
const said2 = failure ?? spoken?.error;
|
|
26550
26559
|
const offStream = renderer?.offStream?.();
|
|
26551
26560
|
const quiet = silent && !asked && !blocker && !sub && !!resumeSessionId(held4);
|
|
26552
|
-
|
|
26553
|
-
|
|
26561
|
+
let blip = quiet ? { reason: waited ? backgroundWaitMessage(BACKGROUND_WAIT.minutes) : silenceSaid(silenceFor) } : ours || sub || pendingOperations.size > 0 || code === 0 && !said2 || !resumeSessionId(held4) ? void 0 : active2.transient?.({ failure: said2, result, offStream }) ?? (crashed && !said2 ? { reason: `Agent process exited unexpectedly (${child.signalCode}).` } : void 0);
|
|
26562
|
+
if (blip) {
|
|
26563
|
+
const mark = runMark(sessionId, agentStartedAt);
|
|
26564
|
+
const root2 = child.pid ? { pid: child.pid, since: agentStartedAt } : void 0;
|
|
26565
|
+
const until = Date.now() + STOP_GRACE_MS + STOP_CLOSE_MS;
|
|
26566
|
+
while (!processesStopped(mark, root2) && Date.now() < until) await sleep4(100);
|
|
26567
|
+
if (!processesStopped(mark, root2)) {
|
|
26568
|
+
blip = void 0;
|
|
26569
|
+
failure = "Previous execution could not be confirmed stopped; existing results were preserved.";
|
|
26570
|
+
}
|
|
26571
|
+
}
|
|
26572
|
+
const serviceClosed = said2 === "Codex connection closed before all work and results finished.";
|
|
26573
|
+
const again = blip ? planRetry2(held4.retry, blip, serviceClosed || crashed ? Date.now() : held4.startedAt, Date.now(), Math.random, !quiet) : null;
|
|
26554
26574
|
if (again) {
|
|
26555
26575
|
log.write(`
|
|
26556
26576
|
[board] ${retryLine(again)}
|
|
@@ -26835,7 +26855,8 @@ Cannot resume board repair: ${next.error}`;
|
|
|
26835
26855
|
});
|
|
26836
26856
|
}
|
|
26837
26857
|
}
|
|
26838
|
-
child.once("exit", () => {
|
|
26858
|
+
child.once("exit", (_code, signal2) => {
|
|
26859
|
+
crashed = !ending && !!signal2 && ["SIGKILL", "SIGTERM", "SIGSEGV", "SIGABRT", "SIGBUS", "SIGILL"].includes(signal2);
|
|
26839
26860
|
if (!ending) killMarked(runMark(sessionId), child.pid ? { pid: child.pid, since: agentStartedAt } : void 0);
|
|
26840
26861
|
});
|
|
26841
26862
|
child.on("close", (code) => void finish(code, peekRun(sessionId)?.stopping === true || stopped2));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wildcrane",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.55",
|
|
4
4
|
"akbContract": 15,
|
|
5
5
|
"description": "WildCrane's `akb` command — scaffold the Markdown board under docs/kanban/, put an agent on a card, and carry the flows the agent works by.",
|
|
6
6
|
"keywords": [
|