wildcrane-runner 0.6.58 → 0.6.60-conversations.1
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 +10 -9
- package/dist/akb/package.json +1 -1
- package/dist/akb-proxy.mjs +1 -1
- package/dist/launcher.mjs +5 -4
- package/dist/plugin.mjs +5 -4
- package/dist/runner.mjs +12 -119
- package/dist/settings.mjs +5 -4
- package/package.json +1 -1
package/dist/akb/dist/kanban.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// ai4kanban 0.11.
|
|
2
|
+
// ai4kanban 0.11.47 — built by runner/scripts/build.mjs. Do not edit.
|
|
3
3
|
import { createRequire as __ai4kanbanRequire } from 'node:module'
|
|
4
4
|
const require = __ai4kanbanRequire(import.meta.url)
|
|
5
5
|
var __create = Object.create;
|
|
@@ -878,11 +878,11 @@ function byDispatchOrder(a, b) {
|
|
|
878
878
|
return rank(LEVEL_RANK, a.priority) - rank(LEVEL_RANK, b.priority) || a.id - b.id;
|
|
879
879
|
}
|
|
880
880
|
function canRefine(card) {
|
|
881
|
-
if (card.isGroup) return false;
|
|
882
881
|
if (awaitingApproval(card)) return false;
|
|
883
|
-
|
|
882
|
+
const unfinished = !card.isGroup && planUnfinished(card);
|
|
883
|
+
if (card.status !== "todo" && !unfinished) return false;
|
|
884
884
|
const { total, done: done2 } = card.todos;
|
|
885
|
-
if (total > 0 && done2 === total && !
|
|
885
|
+
if (total > 0 && done2 === total && !unfinished) return false;
|
|
886
886
|
if (card.questions.length > 0 && card.questions.every(hasOptions)) return false;
|
|
887
887
|
return true;
|
|
888
888
|
}
|
|
@@ -4256,6 +4256,7 @@ function connect(stdout, stdin, onCall, dialect = {}) {
|
|
|
4256
4256
|
});
|
|
4257
4257
|
stdout.on("close", () => closed2("the agent closed the connection"));
|
|
4258
4258
|
stdout.on("error", (err) => closed2(String(err)));
|
|
4259
|
+
stdin.on("error", (err) => closed2(String(err)));
|
|
4259
4260
|
return {
|
|
4260
4261
|
/** Ask the agent something. Rejects with the agent's own words when it says no. */
|
|
4261
4262
|
call(method, params) {
|
|
@@ -4354,7 +4355,7 @@ var init_package = __esm({
|
|
|
4354
4355
|
"../cli/package.json"() {
|
|
4355
4356
|
package_default = {
|
|
4356
4357
|
name: "wildcrane",
|
|
4357
|
-
version: "0.11.
|
|
4358
|
+
version: "0.11.47",
|
|
4358
4359
|
akbContract: 12,
|
|
4359
4360
|
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.",
|
|
4360
4361
|
keywords: [
|
|
@@ -23737,7 +23738,7 @@ var init_review_rejections = __esm({
|
|
|
23737
23738
|
var refine_default;
|
|
23738
23739
|
var init_refine = __esm({
|
|
23739
23740
|
"../cli/src/guide/refine.md"() {
|
|
23740
|
-
refine_default = '# Refine a card\n\nPlan one card in this session until it can be built.\n\n- **\u91CD\u590D\u5361\u7247**: \u82E5\u53D1\u73B0\u53E6\u4E00\u5F20\u4EFB\u52A1\u5B8C\u6574\u8986\u76D6\u672C\u5361\uFF0C\u5373\u4F7F\u5BF9\u65B9\u5C1A\u672A\u5B9E\u65BD\uFF0C\u4E5F\u5148\u5C06\u5176\u7F3A\u5C11\u7684\u6709\u7528\u4FE1\u606F\u8865\u5165\u5E76\u786E\u8BA4\u4FDD\u5B58\u6210\u529F\uFF1B\n \u4FDD\u5B58\u5931\u8D25\u5219\u4FDD\u7559\u672C\u5361\u5E76\u505C\u6B62\u3002\u6CA1\u6709\u4FE1\u606F\u9700\u8981\u8865\u5145\u6216\u5DF2\u4FDD\u5B58\u6210\u529F\u540E\uFF0C\u8FD0\u884C\n `akb raw reject <id> --reason "<\u627F\u63A5\u4EFB\u52A1\u7F16\u53F7\u53CA\u5B8C\u6574\u8986\u76D6\u539F\u56E0>"` \u5E76\u505C\u6B62\u3002\n \u4E0D\u8BF7\u6C42\u786E\u8BA4\uFF0C\u4E0D\u8FD0\u884C\u9884\u89C8\uFF1B\u4EC5\u90E8\u5206\u91CD\u53E0\u4E0D\u4E22\u5F03\u3002\n- **Unchecked card**: a card with `triage:` set and an empty `## Scope` was never checked\n against the project. Check it first; when the project already does\n the work, or what it concerns no longer exists, run\n `akb raw reject <id> --reason "<what shows it>"` and stop.\n- **Gone or already done**: for any other card, append a question asking the user whether to\n discard it, run no preview agent, and stop.\n- **Studio rules**: write the card as the studio rules at the end of this prompt say.\n- **Preview agents**: an agent\'s `After` names the previews it waits for; the board approves\n previews in stages, one stage per Approve, and the card\'s `previews` were chosen when its\n goal was written. A card without `previews` has not chosen: choose and save them first, as\n the list says, then run only its first stage. Run each agent the list above names whose\n section is missing or outdated with `akb raw previews <agent> <id> --print`, one at a time in this\n session; leave out `--print` only for an agent the list says runs in a session of its own.\n- **Stale mentions**: rewrite any sentence that relies on a card no longer on the board.\n- **Questions**: settle every decision you can and record the answers as `akb guide writing`\n says; ask only what `akb guide update-questions` says to ask.\n- **Write**: shape the card as `akb guide writing` says, then run `akb raw validate <id>` and\n fix every reported line.\n- **Ready**: settle every fact from the project and authoritative sources. Once the card\n validates, judge whether it can be built as written, or before its last Approve: if so, run\n `akb raw update <id> --status ready`; otherwise leave what blocks it as an open question.\n\nFollow any closing steps the flow printed, then stop: the user approves the previews or starts\nthe build.\n';
|
|
23741
|
+
refine_default = '# Refine a card\n\nPlan one card in this session until it can be built.\n\n- **\u91CD\u590D\u5361\u7247**: \u82E5\u53D1\u73B0\u53E6\u4E00\u5F20\u4EFB\u52A1\u5B8C\u6574\u8986\u76D6\u672C\u5361\uFF0C\u5373\u4F7F\u5BF9\u65B9\u5C1A\u672A\u5B9E\u65BD\uFF0C\u4E5F\u5148\u5C06\u5176\u7F3A\u5C11\u7684\u6709\u7528\u4FE1\u606F\u8865\u5165\u5E76\u786E\u8BA4\u4FDD\u5B58\u6210\u529F\uFF1B\n \u4FDD\u5B58\u5931\u8D25\u5219\u4FDD\u7559\u672C\u5361\u5E76\u505C\u6B62\u3002\u6CA1\u6709\u4FE1\u606F\u9700\u8981\u8865\u5145\u6216\u5DF2\u4FDD\u5B58\u6210\u529F\u540E\uFF0C\u8FD0\u884C\n `akb raw reject <id> --reason "<\u627F\u63A5\u4EFB\u52A1\u7F16\u53F7\u53CA\u5B8C\u6574\u8986\u76D6\u539F\u56E0>"` \u5E76\u505C\u6B62\u3002\n \u4E0D\u8BF7\u6C42\u786E\u8BA4\uFF0C\u4E0D\u8FD0\u884C\u9884\u89C8\uFF1B\u4EC5\u90E8\u5206\u91CD\u53E0\u4E0D\u4E22\u5F03\u3002\n- **Unchecked card**: a card with `triage:` set and an empty `## Scope` was never checked\n against the project. Check it first; when the project already does\n the work, or what it concerns no longer exists, run\n `akb raw reject <id> --reason "<what shows it>"` and stop.\n- **Gone or already done**: for any other card, append a question asking the user whether to\n discard it, run no preview agent, and stop.\n- **Existing group**: read its subtasks and check that they cover the parent\u2019s outcome;\n keep a complete split, or fill gaps by updating subtasks and dependencies without\n duplicating work or resetting progress. Finish the pass without marking the parent\n ready merely because its split is complete; its completion still follows its subtasks.\n- **Studio rules**: write the card as the studio rules at the end of this prompt say.\n- **Preview agents**: an agent\'s `After` names the previews it waits for; the board approves\n previews in stages, one stage per Approve, and the card\'s `previews` were chosen when its\n goal was written. A card without `previews` has not chosen: choose and save them first, as\n the list says, then run only its first stage. Run each agent the list above names whose\n section is missing or outdated with `akb raw previews <agent> <id> --print`, one at a time in this\n session; leave out `--print` only for an agent the list says runs in a session of its own.\n- **Stale mentions**: rewrite any sentence that relies on a card no longer on the board.\n- **Questions**: settle every decision you can and record the answers as `akb guide writing`\n says; ask only what `akb guide update-questions` says to ask.\n- **Write**: shape the card as `akb guide writing` says, then run `akb raw validate <id>` and\n fix every reported line.\n- **Ready**: settle every fact from the project and authoritative sources. Once the card\n validates, judge whether it can be built as written, or before its last Approve: if so, run\n `akb raw update <id> --status ready`; otherwise leave what blocks it as an open question.\n\nFollow any closing steps the flow printed, then stop: the user approves the previews or starts\nthe build.\n';
|
|
23741
23742
|
}
|
|
23742
23743
|
});
|
|
23743
23744
|
|
|
@@ -25196,7 +25197,7 @@ async function startRefinement(req) {
|
|
|
25196
25197
|
}
|
|
25197
25198
|
function refinementAfter(action, cardId2, flowId) {
|
|
25198
25199
|
const card = currentCard(cardId2);
|
|
25199
|
-
if (!card || card.openBlockers.length > 0) return null;
|
|
25200
|
+
if (!card || card.isGroup || card.openBlockers.length > 0) return null;
|
|
25200
25201
|
if (card.questions.length > 0 || action === "clarify" || card.deliversIn !== "plan") return null;
|
|
25201
25202
|
if (planDeliveryGap(card) === null) return null;
|
|
25202
25203
|
if (awaitingApproval(card)) return null;
|
|
@@ -25218,13 +25219,13 @@ function refinesAfter(action, changed, before) {
|
|
|
25218
25219
|
function stalledLine(cardId2, next) {
|
|
25219
25220
|
if (next !== null) return null;
|
|
25220
25221
|
const card = cardId2 === null ? null : currentCard(cardId2);
|
|
25221
|
-
if (!card || refinementStep(card) === "done") return null;
|
|
25222
|
+
if (!card || card.isGroup || refinementStep(card) === "done") return null;
|
|
25222
25223
|
return `#${card.id} is still in To do after planning, and the board won't plan it again on its own \u2014 refine it again, or mark it ready yourself.`;
|
|
25223
25224
|
}
|
|
25224
25225
|
function planStageEnd(run3) {
|
|
25225
25226
|
if (run3.cardId === null || stageOfAction(run3.action) !== "plan") return null;
|
|
25226
25227
|
const card = currentCard(run3.cardId);
|
|
25227
|
-
if (!card || card.openBlockers.length > 0 || card.questions.length > 0) return null;
|
|
25228
|
+
if (!card || card.isGroup || card.openBlockers.length > 0 || card.questions.length > 0) return null;
|
|
25228
25229
|
if (refinementStep(card) !== "done") return null;
|
|
25229
25230
|
return endOfStage(stageContract("plan"), card);
|
|
25230
25231
|
}
|
package/dist/akb/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"wildcrane","version":"0.11.
|
|
1
|
+
{"name":"wildcrane","version":"0.11.47","akbContract":12,"type":"module","private":true}
|
package/dist/akb-proxy.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.60-conversations.1 — 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/launcher.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.60-conversations.1 — 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.60-conversations.1" : "0.0.0";
|
|
26907
|
+
var AKB_VERSION = true ? "0.11.47" : "0.0.0";
|
|
26908
26908
|
var EXIT_REFUSED = 10;
|
|
26909
26909
|
var EXIT_OUTDATED = 11;
|
|
26910
26910
|
var EXIT_UPDATE = 12;
|
|
@@ -30515,6 +30515,7 @@ function connect(stdout, stdin, onCall, dialect = {}) {
|
|
|
30515
30515
|
});
|
|
30516
30516
|
stdout.on("close", () => closed("the agent closed the connection"));
|
|
30517
30517
|
stdout.on("error", (err) => closed(String(err)));
|
|
30518
|
+
stdin.on("error", (err) => closed(String(err)));
|
|
30518
30519
|
return {
|
|
30519
30520
|
/** Ask the agent something. Rejects with the agent's own words when it says no. */
|
|
30520
30521
|
call(method, params) {
|
|
@@ -30590,7 +30591,7 @@ function createTail(log) {
|
|
|
30590
30591
|
// ../cli/package.json
|
|
30591
30592
|
var package_default = {
|
|
30592
30593
|
name: "wildcrane",
|
|
30593
|
-
version: "0.11.
|
|
30594
|
+
version: "0.11.47",
|
|
30594
30595
|
akbContract: 12,
|
|
30595
30596
|
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.",
|
|
30596
30597
|
keywords: [
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.60-conversations.1 — 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;
|
|
@@ -73774,8 +73774,8 @@ function machineId() {
|
|
|
73774
73774
|
var machineName = () => os3.hostname().replace(/\.local$/, "");
|
|
73775
73775
|
|
|
73776
73776
|
// src/protocol.ts
|
|
73777
|
-
var VERSION = true ? "0.6.
|
|
73778
|
-
var AKB_VERSION = true ? "0.11.
|
|
73777
|
+
var VERSION = true ? "0.6.60-conversations.1" : "0.0.0";
|
|
73778
|
+
var AKB_VERSION = true ? "0.11.47" : "0.0.0";
|
|
73779
73779
|
var EXIT_REFUSED = 10;
|
|
73780
73780
|
var EXIT_OUTDATED = 11;
|
|
73781
73781
|
var EXIT_UPDATE = 12;
|
|
@@ -77098,6 +77098,7 @@ function connect(stdout, stdin, onCall, dialect = {}) {
|
|
|
77098
77098
|
});
|
|
77099
77099
|
stdout.on("close", () => closed("the agent closed the connection"));
|
|
77100
77100
|
stdout.on("error", (err) => closed(String(err)));
|
|
77101
|
+
stdin.on("error", (err) => closed(String(err)));
|
|
77101
77102
|
return {
|
|
77102
77103
|
/** Ask the agent something. Rejects with the agent's own words when it says no. */
|
|
77103
77104
|
call(method, params) {
|
|
@@ -77173,7 +77174,7 @@ function createTail(log) {
|
|
|
77173
77174
|
// ../cli/package.json
|
|
77174
77175
|
var package_default = {
|
|
77175
77176
|
name: "wildcrane",
|
|
77176
|
-
version: "0.11.
|
|
77177
|
+
version: "0.11.47",
|
|
77177
77178
|
akbContract: 12,
|
|
77178
77179
|
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.",
|
|
77179
77180
|
keywords: [
|
package/dist/runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.60-conversations.1 — 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;
|
|
@@ -111420,8 +111420,8 @@ function status(line) {
|
|
|
111420
111420
|
}
|
|
111421
111421
|
|
|
111422
111422
|
// src/protocol.ts
|
|
111423
|
-
var VERSION = true ? "0.6.
|
|
111424
|
-
var AKB_VERSION = true ? "0.11.
|
|
111423
|
+
var VERSION = true ? "0.6.60-conversations.1" : "0.0.0";
|
|
111424
|
+
var AKB_VERSION = true ? "0.11.47" : "0.0.0";
|
|
111425
111425
|
var AKB_CONTRACT = true ? 12 : 0;
|
|
111426
111426
|
var EXIT_REFUSED = 10;
|
|
111427
111427
|
var EXIT_OUTDATED = 11;
|
|
@@ -113090,6 +113090,7 @@ function connect(stdout, stdin, onCall, dialect = {}) {
|
|
|
113090
113090
|
});
|
|
113091
113091
|
stdout.on("close", () => closed("the agent closed the connection"));
|
|
113092
113092
|
stdout.on("error", (err) => closed(String(err)));
|
|
113093
|
+
stdin.on("error", (err) => closed(String(err)));
|
|
113093
113094
|
return {
|
|
113094
113095
|
/** Ask the agent something. Rejects with the agent's own words when it says no. */
|
|
113095
113096
|
call(method, params) {
|
|
@@ -113165,7 +113166,7 @@ function createTail(log) {
|
|
|
113165
113166
|
// ../cli/package.json
|
|
113166
113167
|
var package_default = {
|
|
113167
113168
|
name: "wildcrane",
|
|
113168
|
-
version: "0.11.
|
|
113169
|
+
version: "0.11.47",
|
|
113169
113170
|
akbContract: 12,
|
|
113170
113171
|
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.",
|
|
113171
113172
|
keywords: [
|
|
@@ -119346,15 +119347,6 @@ function assetsOf(text3) {
|
|
|
119346
119347
|
return {};
|
|
119347
119348
|
}
|
|
119348
119349
|
}
|
|
119349
|
-
function taskAssetFiles(ws) {
|
|
119350
|
-
if (!ws.number) return [];
|
|
119351
|
-
const state = stateDir(ws);
|
|
119352
|
-
const roots = [
|
|
119353
|
-
path34.join(ws.board, "assets", String(ws.number)),
|
|
119354
|
-
...state ? ["assets", "mockups"].map((folder) => path34.join(state, folder, String(ws.number))) : []
|
|
119355
|
-
];
|
|
119356
|
-
return roots.filter((root2) => fs30.lstatSync(root2, { throwIfNoEntry: false })?.isDirectory()).flatMap((root2) => filesUnder(root2).filter((p2) => !p2.split("/").some((part) => part.startsWith(".") || part === "node_modules")).map((p2) => path34.join(root2, p2)));
|
|
119357
|
-
}
|
|
119358
119350
|
var assetsText = (assets) => `${JSON.stringify(Object.fromEntries(Object.entries(assets).sort(([a2], [b2]) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0)), null, 2)}
|
|
119359
119351
|
`;
|
|
119360
119352
|
function pull(ws, machineId2) {
|
|
@@ -119367,7 +119359,7 @@ function pull(ws, machineId2) {
|
|
|
119367
119359
|
return readCloud(ws);
|
|
119368
119360
|
});
|
|
119369
119361
|
}
|
|
119370
|
-
var replyAssetsSynced = (ws) => !
|
|
119362
|
+
var replyAssetsSynced = (ws) => !readBase(ws).pendingAssets?.includes(ws.task);
|
|
119371
119363
|
function syncedCardVersion(ws) {
|
|
119372
119364
|
const base = readBase(ws);
|
|
119373
119365
|
const card = Object.entries(base.files).find(([p2]) => p2.startsWith(rootOf(ws) + "todo/") && numberOfCard(p2.slice(rootOf(ws).length)) === ws.number);
|
|
@@ -119479,13 +119471,9 @@ async function pullAssets(ws, record, assets) {
|
|
|
119479
119471
|
record.number = ws.number;
|
|
119480
119472
|
}
|
|
119481
119473
|
const file3 = cardFile(ws);
|
|
119482
|
-
const out =
|
|
119474
|
+
const out = {};
|
|
119483
119475
|
for (const [name, ref] of Object.entries(assets)) {
|
|
119484
119476
|
const held4 = record.assets[name];
|
|
119485
|
-
if (record.pendingAssets?.includes(name) && held4) {
|
|
119486
|
-
out[name] = held4;
|
|
119487
|
-
continue;
|
|
119488
|
-
}
|
|
119489
119477
|
if (ref.error && !ref.version) {
|
|
119490
119478
|
if (held4?.artifact === ref.artifact) out[name] = held4;
|
|
119491
119479
|
continue;
|
|
@@ -119624,7 +119612,6 @@ async function uploadAsset(artifact, { bytes: bytes2, type }) {
|
|
|
119624
119612
|
async function pushAssets(ws, record, before) {
|
|
119625
119613
|
const started = performance.now();
|
|
119626
119614
|
logSync("assets.start", { project: ws.project, task: ws.task, entries: Object.keys(record.assets).length });
|
|
119627
|
-
const errors = [];
|
|
119628
119615
|
if (ws.cloudTask && ws.number && (record.task !== ws.cloudTask || record.number !== ws.number)) {
|
|
119629
119616
|
record.task = ws.cloudTask;
|
|
119630
119617
|
record.number = ws.number;
|
|
@@ -119632,7 +119619,7 @@ async function pushAssets(ws, record, before) {
|
|
|
119632
119619
|
}
|
|
119633
119620
|
const file3 = cardFile(ws);
|
|
119634
119621
|
const body = readText(file3);
|
|
119635
|
-
if (body === null) return { ok: true, value:
|
|
119622
|
+
if (body === null) return { ok: true, value: void 0 };
|
|
119636
119623
|
const refs = {};
|
|
119637
119624
|
const canonical = (target) => {
|
|
119638
119625
|
const real = (file4) => fs30.existsSync(file4) ? fs30.realpathSync(file4) : path34.dirname(file4) === file4 ? file4 : path34.join(real(path34.dirname(file4)), path34.basename(file4));
|
|
@@ -119735,6 +119722,8 @@ async function pushAssets(ws, record, before) {
|
|
|
119735
119722
|
const made = await createArtifact(ws.cloudTask, node.key.slice(0, 200), out.kind);
|
|
119736
119723
|
if (!made.ok) return { ...made, error: `${node.key}: ${made.error}` };
|
|
119737
119724
|
artifact = made.value.id;
|
|
119725
|
+
for (const alias of node.aliases) record.assets[alias] = { artifact, kind: out.kind, version: 0, hash: "" };
|
|
119726
|
+
writeRecord(ws, record);
|
|
119738
119727
|
}
|
|
119739
119728
|
const sent = await uploadAsset(artifact, out);
|
|
119740
119729
|
if (!sent.ok) return { ...sent, error: `${node.key}: ${sent.error}` };
|
|
@@ -119743,108 +119732,14 @@ async function pushAssets(ws, record, before) {
|
|
|
119743
119732
|
entry = { ...entry, localHash: localHash ?? void 0, dependencies: [...node.dependencies.values()] };
|
|
119744
119733
|
let changed = false;
|
|
119745
119734
|
for (const alias of node.aliases) {
|
|
119746
|
-
if (!isDeepStrictEqual(record.assets[alias], entry)
|
|
119735
|
+
if (!isDeepStrictEqual(record.assets[alias], entry)) {
|
|
119747
119736
|
record.assets[alias] = entry;
|
|
119748
|
-
record.pendingAssets = record.pendingAssets?.filter((key) => key !== alias);
|
|
119749
119737
|
changed = true;
|
|
119750
119738
|
}
|
|
119751
119739
|
refs[alias] = { artifact: entry.artifact, version: entry.version };
|
|
119752
119740
|
}
|
|
119753
119741
|
if (changed) writeRecord(ws, record);
|
|
119754
119742
|
}
|
|
119755
|
-
const sendResource = async (file4) => {
|
|
119756
|
-
const key = canonical(file4);
|
|
119757
|
-
if (refs[key]) return { ok: true, value: void 0 };
|
|
119758
|
-
assetPath(ws, key, cardFile(ws));
|
|
119759
|
-
const sendFile = async () => {
|
|
119760
|
-
const previous = record.assets[key];
|
|
119761
|
-
const size = fs30.statSync(file4).size;
|
|
119762
|
-
if (size > ASSET_FILE_LIMIT) return { ok: false, code: "too_large", error: `${key}: This asset is over 100 MiB.` };
|
|
119763
|
-
const digest2 = crypto5.createHash("sha256");
|
|
119764
|
-
for await (const chunk of fs30.createReadStream(file4)) digest2.update(chunk);
|
|
119765
|
-
const hash = digest2.digest("hex");
|
|
119766
|
-
let entry = previous;
|
|
119767
|
-
if (!entry?.version || entry.kind !== "asset" || entry.hash !== hash) {
|
|
119768
|
-
if (!ws.cloudTask) return { ok: true, value: void 0 };
|
|
119769
|
-
let artifact = entry?.kind === "asset" ? entry.artifact : void 0;
|
|
119770
|
-
if (!artifact) {
|
|
119771
|
-
const made = await createArtifact(ws.cloudTask, key.slice(0, 200), "asset");
|
|
119772
|
-
if (!made.ok) return { ...made, error: `${key}: ${made.error}` };
|
|
119773
|
-
artifact = made.value.id;
|
|
119774
|
-
record.assets[key] = { artifact, kind: "asset", version: 0, hash: "" };
|
|
119775
|
-
writeRecord(ws, record);
|
|
119776
|
-
}
|
|
119777
|
-
const type = TYPES[path34.extname(file4).toLowerCase()] ?? "application/octet-stream";
|
|
119778
|
-
const upload2 = await createUpload(artifact, type, Math.max(size, 1));
|
|
119779
|
-
if (!upload2.ok) return { ...upload2, error: `${key}: ${upload2.error}` };
|
|
119780
|
-
const route = `/v1/uploads/${encodeURIComponent(upload2.value.id)}`;
|
|
119781
|
-
if (upload2.value.parts) {
|
|
119782
|
-
const { count: count2, size: partSize, url: partUrl } = upload2.value.parts;
|
|
119783
|
-
const source = await fs30.promises.open(file4, "r");
|
|
119784
|
-
try {
|
|
119785
|
-
for (let part = 1; part <= count2; part++) {
|
|
119786
|
-
const bytes2 = Buffer.alloc(Math.min(partSize, size - (part - 1) * partSize));
|
|
119787
|
-
let offset = 0;
|
|
119788
|
-
while (offset < bytes2.length) {
|
|
119789
|
-
const read4 = await source.read(bytes2, offset, bytes2.length - offset, (part - 1) * partSize + offset);
|
|
119790
|
-
if (!read4.bytesRead) throw new Error(`${key}: file changed during upload`);
|
|
119791
|
-
offset += read4.bytesRead;
|
|
119792
|
-
}
|
|
119793
|
-
const put = await upload(partUrl.replace("{part}", String(part)), bytes2, type);
|
|
119794
|
-
if (!put.ok) return { ...put, error: `${key}: ${put.error}` };
|
|
119795
|
-
}
|
|
119796
|
-
} finally {
|
|
119797
|
-
await source.close();
|
|
119798
|
-
}
|
|
119799
|
-
const completed = await completeUpload(upload2.value.url ?? `${route}/complete`);
|
|
119800
|
-
if (!completed.ok) return { ...completed, error: `${key}: ${completed.error}` };
|
|
119801
|
-
} else {
|
|
119802
|
-
const put = await upload(upload2.value.url ?? route, fs30.readFileSync(file4), type);
|
|
119803
|
-
if (!put.ok) return { ...put, error: `${key}: ${put.error}` };
|
|
119804
|
-
}
|
|
119805
|
-
const sent2 = await createVersion(artifact, upload2.value.id);
|
|
119806
|
-
if (!sent2.ok) return { ...sent2, error: `${key}: ${sent2.error}` };
|
|
119807
|
-
entry = { artifact, version: sent2.value.version, hash, localHash: hash, kind: "asset" };
|
|
119808
|
-
}
|
|
119809
|
-
refs[key] = { artifact: entry.artifact, version: entry.version };
|
|
119810
|
-
if (record.assets[key] !== entry || record.pendingAssets?.includes(key)) {
|
|
119811
|
-
record.assets[key] = entry;
|
|
119812
|
-
record.pendingAssets = record.pendingAssets?.filter((p2) => p2 !== key);
|
|
119813
|
-
writeRecord(ws, record);
|
|
119814
|
-
}
|
|
119815
|
-
return { ok: true, value: void 0 };
|
|
119816
|
-
};
|
|
119817
|
-
let sent;
|
|
119818
|
-
try {
|
|
119819
|
-
sent = await sendFile();
|
|
119820
|
-
} catch (error) {
|
|
119821
|
-
sent = { ok: false, error: `${key}: ${renderError(error)}` };
|
|
119822
|
-
}
|
|
119823
|
-
if (!sent.ok) {
|
|
119824
|
-
if (sent.code && !["too_large", "payload_too_large", "storage_limit", "storage_limit_reached", "service_unavailable"].includes(sent.code)) return sent;
|
|
119825
|
-
record.pendingAssets = [.../* @__PURE__ */ new Set([...record.pendingAssets ?? [], key])];
|
|
119826
|
-
writeRecord(ws, record);
|
|
119827
|
-
errors.push({ error: sent.error, ...!sent.code || sent.code === "service_unavailable" ? { offline: true } : {} });
|
|
119828
|
-
console.error(`runner: asset upload pending: ${sent.error}`);
|
|
119829
|
-
if (before[key]) refs[key] = before[key];
|
|
119830
|
-
}
|
|
119831
|
-
return { ok: true, value: void 0 };
|
|
119832
|
-
};
|
|
119833
|
-
const files = [...new Map(taskAssetFiles(ws).map((file4) => [canonical(file4), file4])).values()];
|
|
119834
|
-
logSync("assets.files", { project: ws.project, task: ws.task, graph: graph.length, files: files.length, ms: Math.round(performance.now() - started) });
|
|
119835
|
-
let next = 0;
|
|
119836
|
-
let failure2;
|
|
119837
|
-
await Promise.all(Array.from({ length: Math.min(4, files.length) }, async () => {
|
|
119838
|
-
while (!failure2 && next < files.length) {
|
|
119839
|
-
try {
|
|
119840
|
-
const sent = await sendResource(files[next++]);
|
|
119841
|
-
if (!sent.ok) failure2 ??= sent;
|
|
119842
|
-
} catch (error) {
|
|
119843
|
-
failure2 ??= { ok: false, code: "bad_request", error: renderError(error) };
|
|
119844
|
-
}
|
|
119845
|
-
}
|
|
119846
|
-
}));
|
|
119847
|
-
if (failure2) return failure2;
|
|
119848
119743
|
} catch (error) {
|
|
119849
119744
|
return { ok: false, code: "bad_request", error: error instanceof Error ? error.message : String(error) };
|
|
119850
119745
|
}
|
|
@@ -119853,7 +119748,7 @@ async function pushAssets(ws, record, before) {
|
|
|
119853
119748
|
if (!isDeepStrictEqual(assetsOf(readText(list2)), refs)) write(list2, assetsText(refs));
|
|
119854
119749
|
}
|
|
119855
119750
|
logSync("assets.end", { project: ws.project, task: ws.task, ms: Math.round(performance.now() - started) });
|
|
119856
|
-
return { ok: true, value:
|
|
119751
|
+
return { ok: true, value: void 0 };
|
|
119857
119752
|
}
|
|
119858
119753
|
function resetSorted(ws) {
|
|
119859
119754
|
for (const sub of ["dismissed", "archived"]) fs30.rmSync(path34.join(ws.board, "triage", sub), { recursive: true, force: true });
|
|
@@ -119930,8 +119825,6 @@ async function send2(ws, job) {
|
|
|
119930
119825
|
if (!archived) {
|
|
119931
119826
|
const assets = await pushAssets(item.folder, item.record, assetsOf(assetsListOf(item.folder, base)));
|
|
119932
119827
|
if (assets.ok) {
|
|
119933
|
-
const error = assets.value.errors[0];
|
|
119934
|
-
if (error) assetErrors[item.folder.task] = { ...error, blocking: false };
|
|
119935
119828
|
writeRecord(item.folder, item.record);
|
|
119936
119829
|
continue;
|
|
119937
119830
|
}
|
package/dist/settings.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.60-conversations.1 — 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;
|
|
@@ -26980,8 +26980,8 @@ function alive(pid) {
|
|
|
26980
26980
|
var sleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
26981
26981
|
|
|
26982
26982
|
// src/protocol.ts
|
|
26983
|
-
var VERSION = true ? "0.6.
|
|
26984
|
-
var AKB_VERSION = true ? "0.11.
|
|
26983
|
+
var VERSION = true ? "0.6.60-conversations.1" : "0.0.0";
|
|
26984
|
+
var AKB_VERSION = true ? "0.11.47" : "0.0.0";
|
|
26985
26985
|
|
|
26986
26986
|
// src/api.ts
|
|
26987
26987
|
var RUNTIMES = ["claude-code", "codex", "cursor", "opencode", "kimi", "dsh", "zcode", "grok"];
|
|
@@ -29788,6 +29788,7 @@ function connect(stdout, stdin, onCall, dialect = {}) {
|
|
|
29788
29788
|
});
|
|
29789
29789
|
stdout.on("close", () => closed("the agent closed the connection"));
|
|
29790
29790
|
stdout.on("error", (err) => closed(String(err)));
|
|
29791
|
+
stdin.on("error", (err) => closed(String(err)));
|
|
29791
29792
|
return {
|
|
29792
29793
|
/** Ask the agent something. Rejects with the agent's own words when it says no. */
|
|
29793
29794
|
call(method, params) {
|
|
@@ -29863,7 +29864,7 @@ function createTail(log) {
|
|
|
29863
29864
|
// ../cli/package.json
|
|
29864
29865
|
var package_default = {
|
|
29865
29866
|
name: "wildcrane",
|
|
29866
|
-
version: "0.11.
|
|
29867
|
+
version: "0.11.47",
|
|
29867
29868
|
akbContract: 12,
|
|
29868
29869
|
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.",
|
|
29869
29870
|
keywords: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wildcrane-runner",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.60-conversations.1",
|
|
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/",
|