wildcrane-runner 0.6.127 → 0.6.128
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 +1501 -1258
- package/dist/akb/package.json +1 -1
- package/dist/akb-proxy.mjs +1 -1
- package/dist/codex-proxy.mjs +1 -1
- package/dist/codex-retained.mjs +1 -1
- package/dist/flow-worker-main.mjs +1313 -1071
- package/dist/launcher.mjs +49 -31
- package/dist/plugin.mjs +49 -31
- package/dist/runner.mjs +2109 -1863
- package/dist/settings.mjs +309 -291
- package/package.json +1 -1
package/dist/launcher.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.128 — 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;
|
|
@@ -41121,8 +41121,8 @@ function saveAlphaUpdates(value) {
|
|
|
41121
41121
|
}
|
|
41122
41122
|
|
|
41123
41123
|
// src/protocol.ts
|
|
41124
|
-
var VERSION = true ? "0.6.
|
|
41125
|
-
var AKB_VERSION = true ? "0.11.
|
|
41124
|
+
var VERSION = true ? "0.6.128" : "0.0.0";
|
|
41125
|
+
var AKB_VERSION = true ? "0.11.110" : "0.0.0";
|
|
41126
41126
|
var EXIT_REFUSED = 10;
|
|
41127
41127
|
var EXIT_OUTDATED = 11;
|
|
41128
41128
|
var EXIT_UPDATE = 12;
|
|
@@ -41754,24 +41754,49 @@ var STUDIO_SCHEMA = {
|
|
|
41754
41754
|
var validate = new import_ajv.Ajv({ allErrors: true, meta: false, validateSchema: false }).compile(STUDIO_SCHEMA);
|
|
41755
41755
|
var comments = /<!--[^]*?(?:-->|$)/g;
|
|
41756
41756
|
var blank = (text2) => text2.replace(/[^\r\n]/g, " ");
|
|
41757
|
-
|
|
41758
|
-
|
|
41759
|
-
|
|
41760
|
-
|
|
41761
|
-
|
|
41762
|
-
|
|
41763
|
-
|
|
41764
|
-
visible += body.slice(at);
|
|
41765
|
-
const headings = headingsOf(visible);
|
|
41766
|
-
return headings.flatMap((heading, index) => {
|
|
41767
|
-
const start = heading.index;
|
|
41768
|
-
const end = start + heading[0].length;
|
|
41769
|
-
if (!/^ {0,3}##[ \t]+Land(?:[ \t]+#+)?[ \t]*$/.test(visible.slice(start, end))) return [];
|
|
41770
|
-
const text2 = visible.slice(end, headings[index + 1]?.index).replace(comments, "").trim();
|
|
41771
|
-
return [{ offset: start + heading[0].indexOf("#"), empty: !text2, text: text2 }];
|
|
41757
|
+
function studioSections(body) {
|
|
41758
|
+
const headings = [...withoutCode(body).replace(comments, blank).matchAll(/^ {0,3}#{1,2}(?=[ \t\r\n]|$)[^\r\n]*/gm)];
|
|
41759
|
+
return headings.map((heading, index) => {
|
|
41760
|
+
const start = heading.index + heading[0].indexOf("#");
|
|
41761
|
+
const content = heading.index + heading[0].length;
|
|
41762
|
+
const name = /^##[ \t]+(.+?)(?:[ \t]+#+)?[ \t]*$/.exec(body.slice(start, content))?.[1];
|
|
41763
|
+
return { name, start, content, end: headings[index + 1]?.index ?? body.length };
|
|
41772
41764
|
});
|
|
41773
41765
|
}
|
|
41774
|
-
function
|
|
41766
|
+
function checkStudioSections(body, previews, fail) {
|
|
41767
|
+
let visible = "", end = 0;
|
|
41768
|
+
for (const block of previews) {
|
|
41769
|
+
visible += body.slice(end, block.start) + blank(body.slice(block.start, block.end));
|
|
41770
|
+
end = block.end;
|
|
41771
|
+
}
|
|
41772
|
+
visible += body.slice(end);
|
|
41773
|
+
const sections = studioSections(visible);
|
|
41774
|
+
const instructions = {
|
|
41775
|
+
Land: "Describe delivery, checks and what to record.",
|
|
41776
|
+
Work: "Describe the workflow and tools.",
|
|
41777
|
+
Previews: "Put Preview blocks under this heading, or leave it empty if none are needed."
|
|
41778
|
+
};
|
|
41779
|
+
for (const name of ["Land", "Work", "Previews"]) {
|
|
41780
|
+
const matching = sections.filter((section) => section.name === name);
|
|
41781
|
+
const code = `studio-${name.toLowerCase()}`;
|
|
41782
|
+
if (!matching.length) fail(0, name, `${code}-missing`, `Missing ## ${name} section`, `Add ## ${name} to the Studio body. ${instructions[name]}`);
|
|
41783
|
+
for (const [index2, section] of matching.entries()) {
|
|
41784
|
+
if (index2) fail(section.start, name, `${code}-duplicate`, `Repeated ## ${name} section`, `Combine its contents under one ## ${name} heading.`);
|
|
41785
|
+
if (name !== "Previews" && !visible.slice(section.content, section.end).replace(comments, "").trim()) {
|
|
41786
|
+
fail(section.start, name, `${code}-empty`, `The ## ${name} section is empty`, instructions[name]);
|
|
41787
|
+
}
|
|
41788
|
+
}
|
|
41789
|
+
}
|
|
41790
|
+
let index = 0;
|
|
41791
|
+
for (const block of previews) {
|
|
41792
|
+
while (sections[index] && sections[index].end <= block.start) index++;
|
|
41793
|
+
const section = sections[index];
|
|
41794
|
+
if (section?.name !== "Previews" || block.start < section.content) {
|
|
41795
|
+
fail(block.start, `previews.${block.id}`, "preview-section", `Preview ${block.id} is outside ## Previews`, "Move the block under ## Previews.");
|
|
41796
|
+
}
|
|
41797
|
+
}
|
|
41798
|
+
}
|
|
41799
|
+
function parseStudioFile(id, source, from, { requirePreviewCopy = false, requireSections = false } = {}) {
|
|
41775
41800
|
const problems = [];
|
|
41776
41801
|
const fail = (offset, path39, code, message, hint2) => problems.push({ file: from, ...sourcePosition(source, offset), path: path39, code, message, hint: hint2 });
|
|
41777
41802
|
const result = () => ({ problem: problems.map((p) => `${p.file}:${p.line}:${p.column} ${p.path}: ${p.code} \u2014 ${p.message}. ${p.hint}`).join("\n"), problems });
|
|
@@ -41823,14 +41848,7 @@ function parseStudioFile(id, source, from, { requirePreviewCopy = false, require
|
|
|
41823
41848
|
);
|
|
41824
41849
|
}
|
|
41825
41850
|
}
|
|
41826
|
-
if (
|
|
41827
|
-
const sections = landSections(body, parsed.blocks);
|
|
41828
|
-
if (!sections.length) fail(bodyOffset, "Land", "studio-land-missing", "Missing ## Land section", "Add ## Land to the Studio body and describe delivery, checks and what to record.");
|
|
41829
|
-
for (const [index, { offset, empty }] of sections.entries()) {
|
|
41830
|
-
if (index) fail(bodyOffset + offset, "Land", "studio-land-duplicate", "Repeated ## Land section", "Combine delivery instructions under one ## Land heading.");
|
|
41831
|
-
if (empty) fail(bodyOffset + offset, "Land", "studio-land-empty", "The ## Land section is empty", "Describe delivery, checks and what to record under ## Land.");
|
|
41832
|
-
}
|
|
41833
|
-
}
|
|
41851
|
+
if (requireSections) checkStudioSections(body, parsed.blocks, (offset, ...problem) => fail(bodyOffset + offset, ...problem));
|
|
41834
41852
|
if (problems.length) return result();
|
|
41835
41853
|
let rules = "", at = 0;
|
|
41836
41854
|
for (const block of parsed.blocks) {
|
|
@@ -41943,7 +41961,7 @@ function checkStudioFiles(value, official = false, checks = {}) {
|
|
|
41943
41961
|
const first = read3.problems[0];
|
|
41944
41962
|
return first ? { ok: false, ...first, problems: read3.problems } : { ok: true, def: read3.def, files: read3.files };
|
|
41945
41963
|
}
|
|
41946
|
-
function inspect(value, official, { allowLegacyPreviewCopy,
|
|
41964
|
+
function inspect(value, official, { allowLegacyPreviewCopy, allowLegacySections } = {}) {
|
|
41947
41965
|
const problems = [];
|
|
41948
41966
|
const fail = (file2, reason, tooLarge = false) => {
|
|
41949
41967
|
problems.push({ file: file2, reason, ...tooLarge ? { tooLarge } : {} });
|
|
@@ -42016,7 +42034,7 @@ function inspect(value, official, { allowLegacyPreviewCopy, allowLegacyLand } =
|
|
|
42016
42034
|
});
|
|
42017
42035
|
}
|
|
42018
42036
|
const source = files[STUDIO_FILE];
|
|
42019
|
-
const read3 = typeof source === "string" ? parseStudioFile("studio", source, STUDIO_FILE, { requirePreviewCopy: !official && !allowLegacyPreviewCopy,
|
|
42037
|
+
const read3 = typeof source === "string" ? parseStudioFile("studio", source, STUDIO_FILE, { requirePreviewCopy: !official && !allowLegacyPreviewCopy, requireSections: !allowLegacySections }) : null;
|
|
42020
42038
|
if (!read3) fail(STUDIO_FILE, "is missing");
|
|
42021
42039
|
else if ("problem" in read3) for (const problem of read3.problems) problems.push({ ...problem, reason: problem.message });
|
|
42022
42040
|
if (!read3 || "problem" in read3) return { problems };
|
|
@@ -43593,8 +43611,8 @@ function createTail(log) {
|
|
|
43593
43611
|
// ../cli/package.json
|
|
43594
43612
|
var package_default = {
|
|
43595
43613
|
name: "wildcrane",
|
|
43596
|
-
version: "0.11.
|
|
43597
|
-
akbContract:
|
|
43614
|
+
version: "0.11.110",
|
|
43615
|
+
akbContract: 42,
|
|
43598
43616
|
canonicalCommands: true,
|
|
43599
43617
|
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.",
|
|
43600
43618
|
keywords: [
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// wildcrane-runner 0.6.
|
|
1
|
+
// wildcrane-runner 0.6.128 — 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;
|
|
@@ -108190,24 +108190,49 @@ var STUDIO_SCHEMA = {
|
|
|
108190
108190
|
var validate3 = new import_ajv2.Ajv({ allErrors: true, meta: false, validateSchema: false }).compile(STUDIO_SCHEMA);
|
|
108191
108191
|
var comments = /<!--[^]*?(?:-->|$)/g;
|
|
108192
108192
|
var blank = (text3) => text3.replace(/[^\r\n]/g, " ");
|
|
108193
|
-
|
|
108194
|
-
|
|
108195
|
-
|
|
108196
|
-
|
|
108197
|
-
|
|
108198
|
-
|
|
108199
|
-
|
|
108200
|
-
visible += body.slice(at);
|
|
108201
|
-
const headings = headingsOf(visible);
|
|
108202
|
-
return headings.flatMap((heading, index) => {
|
|
108203
|
-
const start = heading.index;
|
|
108204
|
-
const end = start + heading[0].length;
|
|
108205
|
-
if (!/^ {0,3}##[ \t]+Land(?:[ \t]+#+)?[ \t]*$/.test(visible.slice(start, end))) return [];
|
|
108206
|
-
const text3 = visible.slice(end, headings[index + 1]?.index).replace(comments, "").trim();
|
|
108207
|
-
return [{ offset: start + heading[0].indexOf("#"), empty: !text3, text: text3 }];
|
|
108193
|
+
function studioSections(body) {
|
|
108194
|
+
const headings = [...withoutCode(body).replace(comments, blank).matchAll(/^ {0,3}#{1,2}(?=[ \t\r\n]|$)[^\r\n]*/gm)];
|
|
108195
|
+
return headings.map((heading, index) => {
|
|
108196
|
+
const start = heading.index + heading[0].indexOf("#");
|
|
108197
|
+
const content = heading.index + heading[0].length;
|
|
108198
|
+
const name = /^##[ \t]+(.+?)(?:[ \t]+#+)?[ \t]*$/.exec(body.slice(start, content))?.[1];
|
|
108199
|
+
return { name, start, content, end: headings[index + 1]?.index ?? body.length };
|
|
108208
108200
|
});
|
|
108209
108201
|
}
|
|
108210
|
-
function
|
|
108202
|
+
function checkStudioSections(body, previews, fail) {
|
|
108203
|
+
let visible = "", end = 0;
|
|
108204
|
+
for (const block of previews) {
|
|
108205
|
+
visible += body.slice(end, block.start) + blank(body.slice(block.start, block.end));
|
|
108206
|
+
end = block.end;
|
|
108207
|
+
}
|
|
108208
|
+
visible += body.slice(end);
|
|
108209
|
+
const sections = studioSections(visible);
|
|
108210
|
+
const instructions = {
|
|
108211
|
+
Land: "Describe delivery, checks and what to record.",
|
|
108212
|
+
Work: "Describe the workflow and tools.",
|
|
108213
|
+
Previews: "Put Preview blocks under this heading, or leave it empty if none are needed."
|
|
108214
|
+
};
|
|
108215
|
+
for (const name of ["Land", "Work", "Previews"]) {
|
|
108216
|
+
const matching = sections.filter((section) => section.name === name);
|
|
108217
|
+
const code = `studio-${name.toLowerCase()}`;
|
|
108218
|
+
if (!matching.length) fail(0, name, `${code}-missing`, `Missing ## ${name} section`, `Add ## ${name} to the Studio body. ${instructions[name]}`);
|
|
108219
|
+
for (const [index2, section] of matching.entries()) {
|
|
108220
|
+
if (index2) fail(section.start, name, `${code}-duplicate`, `Repeated ## ${name} section`, `Combine its contents under one ## ${name} heading.`);
|
|
108221
|
+
if (name !== "Previews" && !visible.slice(section.content, section.end).replace(comments, "").trim()) {
|
|
108222
|
+
fail(section.start, name, `${code}-empty`, `The ## ${name} section is empty`, instructions[name]);
|
|
108223
|
+
}
|
|
108224
|
+
}
|
|
108225
|
+
}
|
|
108226
|
+
let index = 0;
|
|
108227
|
+
for (const block of previews) {
|
|
108228
|
+
while (sections[index] && sections[index].end <= block.start) index++;
|
|
108229
|
+
const section = sections[index];
|
|
108230
|
+
if (section?.name !== "Previews" || block.start < section.content) {
|
|
108231
|
+
fail(block.start, `previews.${block.id}`, "preview-section", `Preview ${block.id} is outside ## Previews`, "Move the block under ## Previews.");
|
|
108232
|
+
}
|
|
108233
|
+
}
|
|
108234
|
+
}
|
|
108235
|
+
function parseStudioFile(id2, source, from, { requirePreviewCopy = false, requireSections = false } = {}) {
|
|
108211
108236
|
const problems = [];
|
|
108212
108237
|
const fail = (offset, path40, code, message, hint2) => problems.push({ file: from, ...sourcePosition(source, offset), path: path40, code, message, hint: hint2 });
|
|
108213
108238
|
const result = () => ({ problem: problems.map((p) => `${p.file}:${p.line}:${p.column} ${p.path}: ${p.code} \u2014 ${p.message}. ${p.hint}`).join("\n"), problems });
|
|
@@ -108259,14 +108284,7 @@ function parseStudioFile(id2, source, from, { requirePreviewCopy = false, requir
|
|
|
108259
108284
|
);
|
|
108260
108285
|
}
|
|
108261
108286
|
}
|
|
108262
|
-
if (
|
|
108263
|
-
const sections = landSections(body, parsed.blocks);
|
|
108264
|
-
if (!sections.length) fail(bodyOffset, "Land", "studio-land-missing", "Missing ## Land section", "Add ## Land to the Studio body and describe delivery, checks and what to record.");
|
|
108265
|
-
for (const [index, { offset, empty }] of sections.entries()) {
|
|
108266
|
-
if (index) fail(bodyOffset + offset, "Land", "studio-land-duplicate", "Repeated ## Land section", "Combine delivery instructions under one ## Land heading.");
|
|
108267
|
-
if (empty) fail(bodyOffset + offset, "Land", "studio-land-empty", "The ## Land section is empty", "Describe delivery, checks and what to record under ## Land.");
|
|
108268
|
-
}
|
|
108269
|
-
}
|
|
108287
|
+
if (requireSections) checkStudioSections(body, parsed.blocks, (offset, ...problem) => fail(bodyOffset + offset, ...problem));
|
|
108270
108288
|
if (problems.length) return result();
|
|
108271
108289
|
let rules = "", at = 0;
|
|
108272
108290
|
for (const block of parsed.blocks) {
|
|
@@ -108379,7 +108397,7 @@ function checkStudioFiles(value, official = false, checks = {}) {
|
|
|
108379
108397
|
const first = read3.problems[0];
|
|
108380
108398
|
return first ? { ok: false, ...first, problems: read3.problems } : { ok: true, def: read3.def, files: read3.files };
|
|
108381
108399
|
}
|
|
108382
|
-
function inspect(value, official, { allowLegacyPreviewCopy,
|
|
108400
|
+
function inspect(value, official, { allowLegacyPreviewCopy, allowLegacySections } = {}) {
|
|
108383
108401
|
const problems = [];
|
|
108384
108402
|
const fail = (file3, reason, tooLarge = false) => {
|
|
108385
108403
|
problems.push({ file: file3, reason, ...tooLarge ? { tooLarge } : {} });
|
|
@@ -108452,7 +108470,7 @@ function inspect(value, official, { allowLegacyPreviewCopy, allowLegacyLand } =
|
|
|
108452
108470
|
});
|
|
108453
108471
|
}
|
|
108454
108472
|
const source = files[STUDIO_FILE];
|
|
108455
|
-
const read3 = typeof source === "string" ? parseStudioFile("studio", source, STUDIO_FILE, { requirePreviewCopy: !official && !allowLegacyPreviewCopy,
|
|
108473
|
+
const read3 = typeof source === "string" ? parseStudioFile("studio", source, STUDIO_FILE, { requirePreviewCopy: !official && !allowLegacyPreviewCopy, requireSections: !allowLegacySections }) : null;
|
|
108456
108474
|
if (!read3) fail(STUDIO_FILE, "is missing");
|
|
108457
108475
|
else if ("problem" in read3) for (const problem of read3.problems) problems.push({ ...problem, reason: problem.message });
|
|
108458
108476
|
if (!read3 || "problem" in read3) return { problems };
|
|
@@ -109812,8 +109830,8 @@ function createTail(log) {
|
|
|
109812
109830
|
// ../cli/package.json
|
|
109813
109831
|
var package_default = {
|
|
109814
109832
|
name: "wildcrane",
|
|
109815
|
-
version: "0.11.
|
|
109816
|
-
akbContract:
|
|
109833
|
+
version: "0.11.110",
|
|
109834
|
+
akbContract: 42,
|
|
109817
109835
|
canonicalCommands: true,
|
|
109818
109836
|
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.",
|
|
109819
109837
|
keywords: [
|
|
@@ -114446,8 +114464,8 @@ function machineId() {
|
|
|
114446
114464
|
var machineName = () => os4.hostname().replace(/\.local$/, "");
|
|
114447
114465
|
|
|
114448
114466
|
// src/protocol.ts
|
|
114449
|
-
var VERSION = true ? "0.6.
|
|
114450
|
-
var AKB_VERSION = true ? "0.11.
|
|
114467
|
+
var VERSION = true ? "0.6.128" : "0.0.0";
|
|
114468
|
+
var AKB_VERSION = true ? "0.11.110" : "0.0.0";
|
|
114451
114469
|
var EXIT_OUTDATED = 11;
|
|
114452
114470
|
var EXIT_UPDATE = 12;
|
|
114453
114471
|
var EXIT_ALREADY_RUNNING = 13;
|