wildcrane-runner 0.6.106 → 0.6.107
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 +13 -4
- package/dist/akb/package.json +1 -1
- package/dist/akb-proxy.mjs +1 -1
- package/dist/codex-proxy.mjs +136 -45
- package/dist/codex-retained.mjs +93 -38
- package/dist/flow-worker-main.mjs +14 -5
- package/dist/launcher.mjs +15 -6
- package/dist/plugin.mjs +35 -15
- package/dist/runner.mjs +122 -52
- package/dist/settings.mjs +15 -6
- package/package.json +1 -1
package/dist/codex-retained.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.107 — 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;
|
|
@@ -1899,33 +1899,33 @@ var require_stats = __commonJS({
|
|
|
1899
1899
|
var require_diagnostics = __commonJS({
|
|
1900
1900
|
"node_modules/undici/lib/core/diagnostics.js"(exports, module) {
|
|
1901
1901
|
"use strict";
|
|
1902
|
-
var
|
|
1902
|
+
var diagnosticsChannel2 = __require("node:diagnostics_channel");
|
|
1903
1903
|
var util = __require("node:util");
|
|
1904
1904
|
var undiciDebugLog = util.debuglog("undici");
|
|
1905
1905
|
var fetchDebuglog = util.debuglog("fetch");
|
|
1906
1906
|
var websocketDebuglog = util.debuglog("websocket");
|
|
1907
1907
|
var channels = {
|
|
1908
1908
|
// Client
|
|
1909
|
-
beforeConnect:
|
|
1910
|
-
connected:
|
|
1911
|
-
connectError:
|
|
1912
|
-
sendHeaders:
|
|
1909
|
+
beforeConnect: diagnosticsChannel2.channel("undici:client:beforeConnect"),
|
|
1910
|
+
connected: diagnosticsChannel2.channel("undici:client:connected"),
|
|
1911
|
+
connectError: diagnosticsChannel2.channel("undici:client:connectError"),
|
|
1912
|
+
sendHeaders: diagnosticsChannel2.channel("undici:client:sendHeaders"),
|
|
1913
1913
|
// Request
|
|
1914
|
-
create:
|
|
1915
|
-
bodySent:
|
|
1916
|
-
bodyChunkSent:
|
|
1917
|
-
bodyChunkReceived:
|
|
1918
|
-
headers:
|
|
1919
|
-
trailers:
|
|
1920
|
-
error:
|
|
1914
|
+
create: diagnosticsChannel2.channel("undici:request:create"),
|
|
1915
|
+
bodySent: diagnosticsChannel2.channel("undici:request:bodySent"),
|
|
1916
|
+
bodyChunkSent: diagnosticsChannel2.channel("undici:request:bodyChunkSent"),
|
|
1917
|
+
bodyChunkReceived: diagnosticsChannel2.channel("undici:request:bodyChunkReceived"),
|
|
1918
|
+
headers: diagnosticsChannel2.channel("undici:request:headers"),
|
|
1919
|
+
trailers: diagnosticsChannel2.channel("undici:request:trailers"),
|
|
1920
|
+
error: diagnosticsChannel2.channel("undici:request:error"),
|
|
1921
1921
|
// WebSocket
|
|
1922
|
-
open:
|
|
1923
|
-
close:
|
|
1924
|
-
socketError:
|
|
1925
|
-
ping:
|
|
1926
|
-
pong:
|
|
1922
|
+
open: diagnosticsChannel2.channel("undici:websocket:open"),
|
|
1923
|
+
close: diagnosticsChannel2.channel("undici:websocket:close"),
|
|
1924
|
+
socketError: diagnosticsChannel2.channel("undici:websocket:socket_error"),
|
|
1925
|
+
ping: diagnosticsChannel2.channel("undici:websocket:ping"),
|
|
1926
|
+
pong: diagnosticsChannel2.channel("undici:websocket:pong"),
|
|
1927
1927
|
// ProxyAgent
|
|
1928
|
-
proxyConnected:
|
|
1928
|
+
proxyConnected: diagnosticsChannel2.channel("undici:proxy:connected")
|
|
1929
1929
|
};
|
|
1930
1930
|
var isTrackingClientEvents = false;
|
|
1931
1931
|
function trackClientEvents(debugLog = undiciDebugLog) {
|
|
@@ -1937,7 +1937,7 @@ var require_diagnostics = __commonJS({
|
|
|
1937
1937
|
return;
|
|
1938
1938
|
}
|
|
1939
1939
|
isTrackingClientEvents = true;
|
|
1940
|
-
|
|
1940
|
+
diagnosticsChannel2.subscribe(
|
|
1941
1941
|
"undici:client:beforeConnect",
|
|
1942
1942
|
(evt) => {
|
|
1943
1943
|
const {
|
|
@@ -1952,7 +1952,7 @@ var require_diagnostics = __commonJS({
|
|
|
1952
1952
|
);
|
|
1953
1953
|
}
|
|
1954
1954
|
);
|
|
1955
|
-
|
|
1955
|
+
diagnosticsChannel2.subscribe(
|
|
1956
1956
|
"undici:client:connected",
|
|
1957
1957
|
(evt) => {
|
|
1958
1958
|
const {
|
|
@@ -1967,7 +1967,7 @@ var require_diagnostics = __commonJS({
|
|
|
1967
1967
|
);
|
|
1968
1968
|
}
|
|
1969
1969
|
);
|
|
1970
|
-
|
|
1970
|
+
diagnosticsChannel2.subscribe(
|
|
1971
1971
|
"undici:client:connectError",
|
|
1972
1972
|
(evt) => {
|
|
1973
1973
|
const {
|
|
@@ -1984,7 +1984,7 @@ var require_diagnostics = __commonJS({
|
|
|
1984
1984
|
);
|
|
1985
1985
|
}
|
|
1986
1986
|
);
|
|
1987
|
-
|
|
1987
|
+
diagnosticsChannel2.subscribe(
|
|
1988
1988
|
"undici:client:sendHeaders",
|
|
1989
1989
|
(evt) => {
|
|
1990
1990
|
const {
|
|
@@ -2004,7 +2004,7 @@ var require_diagnostics = __commonJS({
|
|
|
2004
2004
|
return;
|
|
2005
2005
|
}
|
|
2006
2006
|
isTrackingRequestEvents = true;
|
|
2007
|
-
|
|
2007
|
+
diagnosticsChannel2.subscribe(
|
|
2008
2008
|
"undici:request:headers",
|
|
2009
2009
|
(evt) => {
|
|
2010
2010
|
const {
|
|
@@ -2020,7 +2020,7 @@ var require_diagnostics = __commonJS({
|
|
|
2020
2020
|
);
|
|
2021
2021
|
}
|
|
2022
2022
|
);
|
|
2023
|
-
|
|
2023
|
+
diagnosticsChannel2.subscribe(
|
|
2024
2024
|
"undici:request:trailers",
|
|
2025
2025
|
(evt) => {
|
|
2026
2026
|
const {
|
|
@@ -2029,7 +2029,7 @@ var require_diagnostics = __commonJS({
|
|
|
2029
2029
|
debugLog("trailers received from %s %s%s", method, origin, path6);
|
|
2030
2030
|
}
|
|
2031
2031
|
);
|
|
2032
|
-
|
|
2032
|
+
diagnosticsChannel2.subscribe(
|
|
2033
2033
|
"undici:request:error",
|
|
2034
2034
|
(evt) => {
|
|
2035
2035
|
const {
|
|
@@ -2056,7 +2056,7 @@ var require_diagnostics = __commonJS({
|
|
|
2056
2056
|
return;
|
|
2057
2057
|
}
|
|
2058
2058
|
isTrackingWebSocketEvents = true;
|
|
2059
|
-
|
|
2059
|
+
diagnosticsChannel2.subscribe(
|
|
2060
2060
|
"undici:websocket:open",
|
|
2061
2061
|
(evt) => {
|
|
2062
2062
|
if (evt.address != null) {
|
|
@@ -2067,7 +2067,7 @@ var require_diagnostics = __commonJS({
|
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
2069
|
);
|
|
2070
|
-
|
|
2070
|
+
diagnosticsChannel2.subscribe(
|
|
2071
2071
|
"undici:websocket:close",
|
|
2072
2072
|
(evt) => {
|
|
2073
2073
|
const { websocket, code, reason } = evt;
|
|
@@ -2079,19 +2079,19 @@ var require_diagnostics = __commonJS({
|
|
|
2079
2079
|
);
|
|
2080
2080
|
}
|
|
2081
2081
|
);
|
|
2082
|
-
|
|
2082
|
+
diagnosticsChannel2.subscribe(
|
|
2083
2083
|
"undici:websocket:socket_error",
|
|
2084
2084
|
(err) => {
|
|
2085
2085
|
debugLog("connection errored - %s", err.message);
|
|
2086
2086
|
}
|
|
2087
2087
|
);
|
|
2088
|
-
|
|
2088
|
+
diagnosticsChannel2.subscribe(
|
|
2089
2089
|
"undici:websocket:ping",
|
|
2090
2090
|
(evt) => {
|
|
2091
2091
|
debugLog("ping received");
|
|
2092
2092
|
}
|
|
2093
2093
|
);
|
|
2094
|
-
|
|
2094
|
+
diagnosticsChannel2.subscribe(
|
|
2095
2095
|
"undici:websocket:pong",
|
|
2096
2096
|
(evt) => {
|
|
2097
2097
|
debugLog("pong received");
|
|
@@ -18990,11 +18990,11 @@ var require_deduplication_handler = __commonJS({
|
|
|
18990
18990
|
var require_deduplicate = __commonJS({
|
|
18991
18991
|
"node_modules/undici/lib/interceptor/deduplicate.js"(exports, module) {
|
|
18992
18992
|
"use strict";
|
|
18993
|
-
var
|
|
18993
|
+
var diagnosticsChannel2 = __require("node:diagnostics_channel");
|
|
18994
18994
|
var util = require_util();
|
|
18995
18995
|
var DeduplicationHandler = require_deduplication_handler();
|
|
18996
18996
|
var { normalizeHeaders, makeCacheKey, makeDeduplicationKey } = require_cache();
|
|
18997
|
-
var pendingRequestsChannel =
|
|
18997
|
+
var pendingRequestsChannel = diagnosticsChannel2.channel("undici:request:pending-requests");
|
|
18998
18998
|
module.exports = (opts = {}) => {
|
|
18999
18999
|
const {
|
|
19000
19000
|
methods = ["GET"],
|
|
@@ -26675,6 +26675,7 @@ import fs5 from "node:fs";
|
|
|
26675
26675
|
|
|
26676
26676
|
// src/codex-native.ts
|
|
26677
26677
|
import crypto from "node:crypto";
|
|
26678
|
+
import diagnosticsChannel from "node:diagnostics_channel";
|
|
26678
26679
|
import fs3 from "node:fs";
|
|
26679
26680
|
var import_undici2 = __toESM(require_undici(), 1);
|
|
26680
26681
|
import path4 from "node:path";
|
|
@@ -27024,9 +27025,41 @@ function readPrivate(file) {
|
|
|
27024
27025
|
function writeLease(backend, thread, value) {
|
|
27025
27026
|
writePrivate(leaseFile(backend, thread), { ...value, thread });
|
|
27026
27027
|
}
|
|
27028
|
+
function nativeErrorText(error) {
|
|
27029
|
+
if (!error) return "";
|
|
27030
|
+
if (error instanceof RpcError) return `RPC ${error.code ?? "unknown"}: ${error.message}`;
|
|
27031
|
+
if (error instanceof Error) {
|
|
27032
|
+
const code = error.code;
|
|
27033
|
+
const text = error.message.trim() || error.name;
|
|
27034
|
+
return code && !text.includes(code) ? `${code}: ${text}` : text;
|
|
27035
|
+
}
|
|
27036
|
+
return String(error);
|
|
27037
|
+
}
|
|
27038
|
+
function nativeEventDetail(event, fallback) {
|
|
27039
|
+
const value = event;
|
|
27040
|
+
const message = typeof value.message === "string" && value.message.trim() && value.message !== "undefined" ? value.message.trim() : "";
|
|
27041
|
+
const code = typeof value.code === "number" ? `code ${value.code}${value.reason ? `: ${value.reason}` : ""}` : "";
|
|
27042
|
+
const error = value.error instanceof Error && !value.error.message.trim() ? "" : nativeErrorText(value.error);
|
|
27043
|
+
return fallback || error || message || code || nativeErrorText(value.error);
|
|
27044
|
+
}
|
|
27027
27045
|
async function nativeConnection(backend, onMessage) {
|
|
27028
27046
|
const unix = backend.endpoint.startsWith("unix://");
|
|
27029
|
-
const
|
|
27047
|
+
const socketPath = unix ? backend.endpoint.slice(7) : void 0;
|
|
27048
|
+
const dispatcher = unix ? new import_undici2.Agent({ connect: { socketPath } }) : void 0;
|
|
27049
|
+
let lastError = "";
|
|
27050
|
+
const onSocketError = (err) => {
|
|
27051
|
+
lastError = nativeErrorText(err) || lastError;
|
|
27052
|
+
};
|
|
27053
|
+
const onConnectError = (data) => {
|
|
27054
|
+
const record = data;
|
|
27055
|
+
if (!socketPath || record.connectParams?.socketPath === socketPath) lastError = nativeErrorText(record.error) || lastError;
|
|
27056
|
+
};
|
|
27057
|
+
diagnosticsChannel.subscribe("undici:websocket:socket_error", onSocketError);
|
|
27058
|
+
diagnosticsChannel.subscribe("undici:client:connectError", onConnectError);
|
|
27059
|
+
const unsubscribeDiagnostics = () => {
|
|
27060
|
+
diagnosticsChannel.unsubscribe("undici:websocket:socket_error", onSocketError);
|
|
27061
|
+
diagnosticsChannel.unsubscribe("undici:client:connectError", onConnectError);
|
|
27062
|
+
};
|
|
27030
27063
|
const ws = new import_undici2.WebSocket(unix ? "ws://localhost" : backend.endpoint, {
|
|
27031
27064
|
...dispatcher ? { dispatcher } : {},
|
|
27032
27065
|
...backend.token ? { headers: { authorization: `Bearer ${backend.token}` } } : {}
|
|
@@ -27044,11 +27077,30 @@ async function nativeConnection(backend, onMessage) {
|
|
|
27044
27077
|
});
|
|
27045
27078
|
outgoing.on("error", () => {
|
|
27046
27079
|
});
|
|
27080
|
+
let closing = false;
|
|
27047
27081
|
ws.addEventListener("message", (event) => incoming.write(String(event.data) + "\n"));
|
|
27048
|
-
ws.addEventListener("close", () =>
|
|
27049
|
-
|
|
27082
|
+
ws.addEventListener("close", (event) => {
|
|
27083
|
+
unsubscribeDiagnostics();
|
|
27084
|
+
if (!closing && !incoming.destroyed && (!event.wasClean || event.code !== 1e3 && event.code !== 1005)) {
|
|
27085
|
+
const detail = nativeEventDetail(event, lastError);
|
|
27086
|
+
const message = detail ? `Codex native connection closed (${detail}).` : "Codex native connection closed.";
|
|
27087
|
+
console.error(message);
|
|
27088
|
+
incoming.destroy(Error(message));
|
|
27089
|
+
return;
|
|
27090
|
+
}
|
|
27091
|
+
incoming.destroy();
|
|
27092
|
+
});
|
|
27093
|
+
ws.addEventListener("error", (event) => {
|
|
27094
|
+
if (closing || incoming.destroyed) return;
|
|
27095
|
+
const detail = nativeEventDetail(event, lastError);
|
|
27096
|
+
const message = detail ? `Codex native connection failed: ${detail}` : "Codex native connection failed.";
|
|
27097
|
+
console.error(message);
|
|
27098
|
+
incoming.destroy(Error(message));
|
|
27099
|
+
});
|
|
27050
27100
|
const close = () => {
|
|
27051
|
-
|
|
27101
|
+
closing = true;
|
|
27102
|
+
unsubscribeDiagnostics();
|
|
27103
|
+
if (ws.readyState === import_undici2.WebSocket.OPEN || ws.readyState === import_undici2.WebSocket.CONNECTING) ws.close();
|
|
27052
27104
|
incoming.destroy();
|
|
27053
27105
|
outgoing.destroy();
|
|
27054
27106
|
void dispatcher?.destroy();
|
|
@@ -27056,7 +27108,10 @@ async function nativeConnection(backend, onMessage) {
|
|
|
27056
27108
|
try {
|
|
27057
27109
|
await bounded(new Promise((resolve, reject) => {
|
|
27058
27110
|
ws.addEventListener("open", () => resolve(), { once: true });
|
|
27059
|
-
ws.addEventListener("error", () =>
|
|
27111
|
+
ws.addEventListener("error", (event) => {
|
|
27112
|
+
const detail = nativeEventDetail(event, lastError);
|
|
27113
|
+
reject(Error(detail ? `Codex native listener did not answer (${detail}).` : "Codex native listener did not answer."));
|
|
27114
|
+
}, { once: true });
|
|
27060
27115
|
}), CODEX_TIMEOUT, "Codex native connection timed out.");
|
|
27061
27116
|
} catch (error) {
|
|
27062
27117
|
close();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.107 — 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;
|
|
@@ -172321,7 +172321,7 @@ function cloudProblem(response, body) {
|
|
|
172321
172321
|
}
|
|
172322
172322
|
|
|
172323
172323
|
// src/protocol.ts
|
|
172324
|
-
var AKB_VERSION = true ? "0.11.
|
|
172324
|
+
var AKB_VERSION = true ? "0.11.87" : "0.0.0";
|
|
172325
172325
|
var AKB_CONTRACT = true ? 29 : 0;
|
|
172326
172326
|
|
|
172327
172327
|
// src/secrets.ts
|
|
@@ -174990,7 +174990,7 @@ function createTail(log) {
|
|
|
174990
174990
|
// ../cli/package.json
|
|
174991
174991
|
var package_default = {
|
|
174992
174992
|
name: "wildcrane",
|
|
174993
|
-
version: "0.11.
|
|
174993
|
+
version: "0.11.87",
|
|
174994
174994
|
akbContract: 29,
|
|
174995
174995
|
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.",
|
|
174996
174996
|
keywords: [
|
|
@@ -176048,6 +176048,7 @@ async function run(io, options, count2) {
|
|
|
176048
176048
|
const execution = randomUUID3();
|
|
176049
176049
|
let host = {};
|
|
176050
176050
|
let cleanup = { status: "confirmed", execution, kept: [] };
|
|
176051
|
+
let hostCleanup;
|
|
176051
176052
|
let settlement;
|
|
176052
176053
|
let replySnapshots = /* @__PURE__ */ new Map();
|
|
176053
176054
|
const visible = /* @__PURE__ */ new Set();
|
|
@@ -176104,11 +176105,11 @@ async function run(io, options, count2) {
|
|
|
176104
176105
|
};
|
|
176105
176106
|
const closed = () => {
|
|
176106
176107
|
const reason = "Codex connection closed before all work and results finished.";
|
|
176107
|
-
if (work.work().some((w2) => ["running", "unknown"].includes(w2.status))) note("Connection lost; managed cleanup is unconfirmed.");
|
|
176108
|
+
if (hostCleanup !== "confirmed" && work.work().some((w2) => ["running", "unknown"].includes(w2.status))) note("Connection lost; managed cleanup is unconfirmed.");
|
|
176108
176109
|
end(reason, makeFailure("runtime", reason, { code: "connection_lost", detail: reason }));
|
|
176109
176110
|
};
|
|
176110
176111
|
const inputFailed = (e2) => {
|
|
176111
|
-
if (work.work().some((w2) => ["running", "unknown"].includes(w2.status))) note("Connection input failed; managed cleanup is unconfirmed.");
|
|
176112
|
+
if (hostCleanup !== "confirmed" && work.work().some((w2) => ["running", "unknown"].includes(w2.status))) note("Connection input failed; managed cleanup is unconfirmed.");
|
|
176112
176113
|
end(e2.message, executionFailure(e2));
|
|
176113
176114
|
};
|
|
176114
176115
|
io.stdout.once("close", closed);
|
|
@@ -176331,6 +176332,14 @@ async function run(io, options, count2) {
|
|
|
176331
176332
|
return;
|
|
176332
176333
|
}
|
|
176333
176334
|
const p2 = obj2(msg.params);
|
|
176335
|
+
if (msg.method === "wildcrane/cleanup") {
|
|
176336
|
+
if (p2.status === "confirmed") hostCleanup = "confirmed";
|
|
176337
|
+
else if (p2.status === "unconfirmed") {
|
|
176338
|
+
hostCleanup = "unconfirmed";
|
|
176339
|
+
note(str2(p2.diagnostic) || "Codex cleanup is unconfirmed.");
|
|
176340
|
+
}
|
|
176341
|
+
return;
|
|
176342
|
+
}
|
|
176334
176343
|
const source2 = str2(p2.threadId);
|
|
176335
176344
|
if (!work.own(source2)) return;
|
|
176336
176345
|
if (msg.method === "item/commandExecution/terminalInteraction") {
|
package/dist/launcher.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.107 — 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;
|
|
@@ -41128,8 +41128,8 @@ function saveAlphaUpdates(value) {
|
|
|
41128
41128
|
}
|
|
41129
41129
|
|
|
41130
41130
|
// src/protocol.ts
|
|
41131
|
-
var VERSION = true ? "0.6.
|
|
41132
|
-
var AKB_VERSION = true ? "0.11.
|
|
41131
|
+
var VERSION = true ? "0.6.107" : "0.0.0";
|
|
41132
|
+
var AKB_VERSION = true ? "0.11.87" : "0.0.0";
|
|
41133
41133
|
var EXIT_REFUSED = 10;
|
|
41134
41134
|
var EXIT_OUTDATED = 11;
|
|
41135
41135
|
var EXIT_UPDATE = 12;
|
|
@@ -64605,7 +64605,7 @@ function createTail(log) {
|
|
|
64605
64605
|
// ../cli/package.json
|
|
64606
64606
|
var package_default = {
|
|
64607
64607
|
name: "wildcrane",
|
|
64608
|
-
version: "0.11.
|
|
64608
|
+
version: "0.11.87",
|
|
64609
64609
|
akbContract: 29,
|
|
64610
64610
|
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.",
|
|
64611
64611
|
keywords: [
|
|
@@ -65579,6 +65579,7 @@ async function run(io, options, count2) {
|
|
|
65579
65579
|
const execution = randomUUID();
|
|
65580
65580
|
let host = {};
|
|
65581
65581
|
let cleanup = { status: "confirmed", execution, kept: [] };
|
|
65582
|
+
let hostCleanup;
|
|
65582
65583
|
let settlement;
|
|
65583
65584
|
let replySnapshots = /* @__PURE__ */ new Map();
|
|
65584
65585
|
const visible = /* @__PURE__ */ new Set();
|
|
@@ -65635,11 +65636,11 @@ async function run(io, options, count2) {
|
|
|
65635
65636
|
};
|
|
65636
65637
|
const closed = () => {
|
|
65637
65638
|
const reason = "Codex connection closed before all work and results finished.";
|
|
65638
|
-
if (work.work().some((w) => ["running", "unknown"].includes(w.status))) note("Connection lost; managed cleanup is unconfirmed.");
|
|
65639
|
+
if (hostCleanup !== "confirmed" && work.work().some((w) => ["running", "unknown"].includes(w.status))) note("Connection lost; managed cleanup is unconfirmed.");
|
|
65639
65640
|
end(reason, makeFailure("runtime", reason, { code: "connection_lost", detail: reason }));
|
|
65640
65641
|
};
|
|
65641
65642
|
const inputFailed = (e) => {
|
|
65642
|
-
if (work.work().some((w) => ["running", "unknown"].includes(w.status))) note("Connection input failed; managed cleanup is unconfirmed.");
|
|
65643
|
+
if (hostCleanup !== "confirmed" && work.work().some((w) => ["running", "unknown"].includes(w.status))) note("Connection input failed; managed cleanup is unconfirmed.");
|
|
65643
65644
|
end(e.message, executionFailure(e));
|
|
65644
65645
|
};
|
|
65645
65646
|
io.stdout.once("close", closed);
|
|
@@ -65862,6 +65863,14 @@ async function run(io, options, count2) {
|
|
|
65862
65863
|
return;
|
|
65863
65864
|
}
|
|
65864
65865
|
const p = obj2(msg.params);
|
|
65866
|
+
if (msg.method === "wildcrane/cleanup") {
|
|
65867
|
+
if (p.status === "confirmed") hostCleanup = "confirmed";
|
|
65868
|
+
else if (p.status === "unconfirmed") {
|
|
65869
|
+
hostCleanup = "unconfirmed";
|
|
65870
|
+
note(str2(p.diagnostic) || "Codex cleanup is unconfirmed.");
|
|
65871
|
+
}
|
|
65872
|
+
return;
|
|
65873
|
+
}
|
|
65865
65874
|
const source = str2(p.threadId);
|
|
65866
65875
|
if (!work.own(source)) return;
|
|
65867
65876
|
if (msg.method === "item/commandExecution/terminalInteraction") {
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.107 — 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;
|
|
@@ -110291,7 +110291,7 @@ function createTail(log) {
|
|
|
110291
110291
|
// ../cli/package.json
|
|
110292
110292
|
var package_default = {
|
|
110293
110293
|
name: "wildcrane",
|
|
110294
|
-
version: "0.11.
|
|
110294
|
+
version: "0.11.87",
|
|
110295
110295
|
akbContract: 29,
|
|
110296
110296
|
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.",
|
|
110297
110297
|
keywords: [
|
|
@@ -111265,6 +111265,7 @@ async function run(io, options, count2) {
|
|
|
111265
111265
|
const execution = randomUUID();
|
|
111266
111266
|
let host2 = {};
|
|
111267
111267
|
let cleanup = { status: "confirmed", execution, kept: [] };
|
|
111268
|
+
let hostCleanup;
|
|
111268
111269
|
let settlement;
|
|
111269
111270
|
let replySnapshots = /* @__PURE__ */ new Map();
|
|
111270
111271
|
const visible = /* @__PURE__ */ new Set();
|
|
@@ -111321,11 +111322,11 @@ async function run(io, options, count2) {
|
|
|
111321
111322
|
};
|
|
111322
111323
|
const closed = () => {
|
|
111323
111324
|
const reason = "Codex connection closed before all work and results finished.";
|
|
111324
|
-
if (work.work().some((w) => ["running", "unknown"].includes(w.status))) note("Connection lost; managed cleanup is unconfirmed.");
|
|
111325
|
+
if (hostCleanup !== "confirmed" && work.work().some((w) => ["running", "unknown"].includes(w.status))) note("Connection lost; managed cleanup is unconfirmed.");
|
|
111325
111326
|
end(reason, makeFailure("runtime", reason, { code: "connection_lost", detail: reason }));
|
|
111326
111327
|
};
|
|
111327
111328
|
const inputFailed = (e) => {
|
|
111328
|
-
if (work.work().some((w) => ["running", "unknown"].includes(w.status))) note("Connection input failed; managed cleanup is unconfirmed.");
|
|
111329
|
+
if (hostCleanup !== "confirmed" && work.work().some((w) => ["running", "unknown"].includes(w.status))) note("Connection input failed; managed cleanup is unconfirmed.");
|
|
111329
111330
|
end(e.message, executionFailure(e));
|
|
111330
111331
|
};
|
|
111331
111332
|
io.stdout.once("close", closed);
|
|
@@ -111548,6 +111549,14 @@ async function run(io, options, count2) {
|
|
|
111548
111549
|
return;
|
|
111549
111550
|
}
|
|
111550
111551
|
const p = obj2(msg.params);
|
|
111552
|
+
if (msg.method === "wildcrane/cleanup") {
|
|
111553
|
+
if (p.status === "confirmed") hostCleanup = "confirmed";
|
|
111554
|
+
else if (p.status === "unconfirmed") {
|
|
111555
|
+
hostCleanup = "unconfirmed";
|
|
111556
|
+
note(str2(p.diagnostic) || "Codex cleanup is unconfirmed.");
|
|
111557
|
+
}
|
|
111558
|
+
return;
|
|
111559
|
+
}
|
|
111551
111560
|
const source = str2(p.threadId);
|
|
111552
111561
|
if (!work.own(source)) return;
|
|
111553
111562
|
if (msg.method === "item/commandExecution/terminalInteraction") {
|
|
@@ -113343,8 +113352,8 @@ function machineId() {
|
|
|
113343
113352
|
var machineName = () => os4.hostname().replace(/\.local$/, "");
|
|
113344
113353
|
|
|
113345
113354
|
// src/protocol.ts
|
|
113346
|
-
var VERSION = true ? "0.6.
|
|
113347
|
-
var AKB_VERSION = true ? "0.11.
|
|
113355
|
+
var VERSION = true ? "0.6.107" : "0.0.0";
|
|
113356
|
+
var AKB_VERSION = true ? "0.11.87" : "0.0.0";
|
|
113348
113357
|
var EXIT_REFUSED = 10;
|
|
113349
113358
|
var EXIT_OUTDATED = 11;
|
|
113350
113359
|
var EXIT_UPDATE = 12;
|
|
@@ -114667,12 +114676,13 @@ import fs25 from "node:fs";
|
|
|
114667
114676
|
import os6 from "node:os";
|
|
114668
114677
|
import path29 from "node:path";
|
|
114669
114678
|
var RELEASED = "https://raw.githubusercontent.com/wildcrane-ai/wildcrane/main/plugins/claude-code/.claude-plugin/plugin.json";
|
|
114679
|
+
var ANTIGRAVITY_RELEASED = "https://raw.githubusercontent.com/wildcrane-ai/wildcrane/antigravity-plugin/plugin.json";
|
|
114670
114680
|
var TIMEOUT_MS3 = 5e3;
|
|
114671
114681
|
var KEEP_MS2 = 6 * 60 * 6e4;
|
|
114672
114682
|
var RETRY_MS = 5 * 6e4;
|
|
114673
114683
|
var pluginRoot = (host2) => (host2 === "claude-code" || host2 === "zcode") && process.env.CLAUDE_PLUGIN_ROOT || path29.resolve(path29.dirname(process.argv[1] ?? ""), "..", "..");
|
|
114674
114684
|
var CLAUDE_MANIFEST = path29.join(".claude-plugin", "plugin.json");
|
|
114675
|
-
var MANIFEST = { "claude-code": CLAUDE_MANIFEST, zcode: CLAUDE_MANIFEST, codex: "plugin.json", grok: "plugin.json", opencode: "package.json", dsh: "package.json", cursor: path29.join(".cursor-plugin", "plugin.json"), kimi: "kimi.plugin.json" };
|
|
114685
|
+
var MANIFEST = { "claude-code": CLAUDE_MANIFEST, zcode: CLAUDE_MANIFEST, codex: "plugin.json", grok: "plugin.json", antigravity: "plugin.json", opencode: "package.json", dsh: "package.json", cursor: path29.join(".cursor-plugin", "plugin.json"), kimi: "kimi.plugin.json" };
|
|
114676
114686
|
function pluginVersion(host2 = "claude-code", root2 = pluginRoot(host2)) {
|
|
114677
114687
|
const file3 = MANIFEST[host2];
|
|
114678
114688
|
try {
|
|
@@ -114710,7 +114720,7 @@ function codexSource(home4 = process.env.CODEX_HOME || path29.join(os6.homedir()
|
|
|
114710
114720
|
}
|
|
114711
114721
|
}
|
|
114712
114722
|
function pluginInfo(host2 = "claude-code") {
|
|
114713
|
-
void checkReleased();
|
|
114723
|
+
void checkReleased(host2 === "antigravity" ? ANTIGRAVITY_RELEASED : RELEASED);
|
|
114714
114724
|
const version3 = pluginVersion(host2);
|
|
114715
114725
|
return { version: version3, latest: newerOf(version3, released?.value ?? null), ...host2 === "codex" ? { source: codexSource() } : {} };
|
|
114716
114726
|
}
|
|
@@ -115880,7 +115890,7 @@ async function startSettingsServer(action, port = 0) {
|
|
|
115880
115890
|
|
|
115881
115891
|
// src/plugin.ts
|
|
115882
115892
|
function hostOf(arg, env2) {
|
|
115883
|
-
if (arg === "codex" || arg === "cursor" || arg === "dsh" || arg === "kimi" || arg === "grok" || arg === "opencode") return arg;
|
|
115893
|
+
if (arg === "codex" || arg === "cursor" || arg === "dsh" || arg === "kimi" || arg === "grok" || arg === "opencode" || arg === "antigravity") return arg;
|
|
115884
115894
|
return env2.ZCODE_PLUGIN_ROOT && env2.ZCODE_PLUGIN_ROOT === env2.CLAUDE_PLUGIN_ROOT ? "zcode" : "claude-code";
|
|
115885
115895
|
}
|
|
115886
115896
|
var panelKeyFile = () => path37.join(runnerHome(), "plugin", "panel.key");
|
|
@@ -116000,7 +116010,15 @@ var DSH_UPDATE = "run `dsh plugin --profile web add wildcrane-dsh@latest` in a t
|
|
|
116000
116010
|
var KIMI_UPDATE = "run `/plugins` in Kimi Code, update WildCrane, then restart Kimi Code";
|
|
116001
116011
|
var GROK_UPDATE = "run `grok plugin update wildcrane` in a terminal, then reopen the Grok Build session";
|
|
116002
116012
|
var OPENCODE_UPDATE = "run `npx --yes wildcrane-opencode@latest update`, then reopen OpenCode. Pinned versions stay pinned; see the plugin README to change the pin";
|
|
116003
|
-
var
|
|
116013
|
+
var ANTIGRAVITY_UPDATE = "run `agy plugin install https://github.com/wildcrane-ai/wildcrane/tree/antigravity-plugin` in a terminal, then reopen Antigravity CLI";
|
|
116014
|
+
var HOST_UPDATE = {
|
|
116015
|
+
dsh: DSH_UPDATE,
|
|
116016
|
+
kimi: KIMI_UPDATE,
|
|
116017
|
+
grok: GROK_UPDATE,
|
|
116018
|
+
opencode: OPENCODE_UPDATE,
|
|
116019
|
+
antigravity: ANTIGRAVITY_UPDATE
|
|
116020
|
+
};
|
|
116021
|
+
var updateSteps = (as, plugin) => HOST_UPDATE[as] ?? (plugin.source === "git" ? CODEX_UPGRADE : CODEX_SWITCH);
|
|
116004
116022
|
var OUTDATED = {
|
|
116005
116023
|
"claude-code": "WildCrane's Runner is out of date and could not update, so tasks no longer run on this computer. Tell the user to check the network, then restart Claude Code.",
|
|
116006
116024
|
codex: "WildCrane's Runner is out of date and could not update, so tasks no longer run on this computer. Tell the user to check the network, then restart Codex.",
|
|
@@ -116009,6 +116027,7 @@ var OUTDATED = {
|
|
|
116009
116027
|
dsh: "WildCrane's Runner is out of date and could not update, so tasks no longer run on this computer. Tell the user to check the network, then restart dsh.",
|
|
116010
116028
|
opencode: "WildCrane's Runner is out of date and could not update. Check the network, then restart OpenCode.",
|
|
116011
116029
|
grok: "WildCrane's Runner is out of date and could not update, so tasks no longer run on this computer. Tell the user to check the network, then restart Grok Build.",
|
|
116030
|
+
antigravity: "WildCrane's Runner is out of date and could not update. Check the network, then restart Antigravity CLI.",
|
|
116012
116031
|
kimi: "WildCrane's Runner is out of date and could not update, so tasks no longer run on this computer. Tell the user to check the network, then restart Kimi Code."
|
|
116013
116032
|
};
|
|
116014
116033
|
var LOCAL = `This WildCrane plugin was installed from a local folder, so it gets no updates. Tell the user once in this conversation how to switch to the source that updates: ${CODEX_SWITCH}.`;
|
|
@@ -116024,7 +116043,7 @@ function nextOf(as, state2, plugin, seen) {
|
|
|
116024
116043
|
if (as === "codex" && plugin.source === "local") return LOCAL;
|
|
116025
116044
|
if (seen && !seen.connections.some((c) => c.state === "ready")) return NOT_READY(seen.connections, seen.web);
|
|
116026
116045
|
if (seen && seen.folder === null && seen.refused === null) return NOT_ADDED;
|
|
116027
|
-
return (as === "codex" || as
|
|
116046
|
+
return (as === "codex" || HOST_UPDATE[as]) && plugin.version && plugin.latest ? NEWER(as, plugin) : null;
|
|
116028
116047
|
}
|
|
116029
116048
|
async function state(cwd) {
|
|
116030
116049
|
const plugin = pluginInfo(host);
|
|
@@ -116169,10 +116188,11 @@ var GoalInput = import_zod4.z.object({
|
|
|
116169
116188
|
});
|
|
116170
116189
|
var linked = (id2, goals) => goals.map(goalOf).map((goal) => ({ ...goal, url: goal.task?.url ?? discussionUrl(id2) }));
|
|
116171
116190
|
var draftText = (draft) => text2({ ...draft, ideas: draft.goals });
|
|
116191
|
+
var passesDiscussionId = (as) => as === "dsh" || as === "grok" || as === "antigravity";
|
|
116172
116192
|
var PROCESS = `process-${crypto10.randomUUID()}`;
|
|
116173
116193
|
var threadOf = (meta4) => {
|
|
116174
116194
|
if (host === "opencode" && (typeof meta4?.threadId !== "string" || !meta4.threadId.trim())) throw new Error("OpenCode session identity is missing. Reload the WildCrane plugin and retry.");
|
|
116175
|
-
return `${host}:${host
|
|
116195
|
+
return `${host}:${passesDiscussionId(host) ? crypto10.randomUUID() : typeof meta4?.threadId === "string" && meta4.threadId ? meta4.threadId : PROCESS}`;
|
|
116176
116196
|
};
|
|
116177
116197
|
var pathOf = (given, meta4) => given || Object.keys(meta4?.["x-codex-turn-metadata"]?.workspaces ?? {})[0] || "";
|
|
116178
116198
|
var SIGNED_OUT = { error: "signed_out", message: "Not signed in to WildCrane. Call wildcrane_open_settings to open settings and sign in, then try again." };
|
|
@@ -116208,10 +116228,10 @@ function server() {
|
|
|
116208
116228
|
const saveWhat = "\u4FDD\u5B58\u8BA8\u8BBA\u4E2D\u5168\u90E8\u5F00\u653E\u76EE\u6807\uFF0C\u5FC5\u987B\u4F7F\u7528\u6700\u8FD1\u8BFB\u53D6\u7684\u7248\u672C\uFF1B\u9057\u6F0F\u7684\u5F00\u653E\u76EE\u6807\u4F1A\u88AB\u4E22\u5F03\u3002\u4FDD\u5B58\u4E0D\u4F1A\u5F00\u59CB\u4EFB\u52A1\uFF0C\u7528\u6237\u4ECE\u7F51\u9875\u5F00\u59CB\u3002";
|
|
116209
116229
|
if (host !== "claude-code") {
|
|
116210
116230
|
mcp.registerTool("wildcrane_draft_read", {
|
|
116211
|
-
description: host
|
|
116231
|
+
description: passesDiscussionId(host) ? "Read a WildCrane discussion: its goals, their version, the studios a goal can use, and its web page. Without `discussionId` it opens a new one in the project of `path`; pass the returned `discussion` on every later call in this chat." : "Read this session's WildCrane discussion: its goals, their version, the studios a goal can use, and its web page. Opens one on first use, in the project of `path`.",
|
|
116212
116232
|
inputSchema: {
|
|
116213
116233
|
path: import_zod4.z.string().optional().describe("The current working directory. The component runs elsewhere and cannot see it."),
|
|
116214
|
-
discussionId: import_zod4.z.string().optional().describe(host
|
|
116234
|
+
discussionId: import_zod4.z.string().optional().describe(passesDiscussionId(host) ? "Leave out only on the first call in this chat." : "Leave out for this session's discussion.")
|
|
116215
116235
|
}
|
|
116216
116236
|
}, async ({ path: given, discussionId }, extra) => {
|
|
116217
116237
|
if (process.env.WILDCRANE_JOB) return jobDraft();
|
|
@@ -116344,7 +116364,7 @@ async function main(as = "claude-code") {
|
|
|
116344
116364
|
}, 1e3);
|
|
116345
116365
|
accountWatch.unref();
|
|
116346
116366
|
run2();
|
|
116347
|
-
if (!process.env.WILDCRANE_JOB)
|
|
116367
|
+
if (!process.env.WILDCRANE_JOB) pluginInfo(host);
|
|
116348
116368
|
}
|
|
116349
116369
|
|
|
116350
116370
|
// src/plugin-main.ts
|