@bitcobblers/wod-wiki-tools 0.42.2148 → 0.43.2150
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/bin/wod.cjs +110 -11
- package/dist/bin/wod.cjs.map +1 -1
- package/dist/bin/wod.mjs +2 -2
- package/dist/{chunk-DHEXWQBU.mjs → chunk-D2AQYVU3.mjs} +48 -6
- package/dist/chunk-D2AQYVU3.mjs.map +1 -0
- package/dist/{chunk-VXFSQEMS.mjs → chunk-RVKV4WMA.mjs} +3 -3
- package/dist/chunk-RVKV4WMA.mjs.map +1 -0
- package/dist/index.cjs +110 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{scaffoldCatalog-BY6FUYYW.mjs → scaffoldCatalog-OXITWHCI.mjs} +3 -3
- package/dist/{scaffoldCatalog-BY6FUYYW.mjs.map → scaffoldCatalog-OXITWHCI.mjs.map} +1 -1
- package/dist/skills/README.md +40 -0
- package/dist/skills/wod-extraction/SKILL.md +656 -0
- package/dist/skills-CZDOAQUB.mjs +57 -0
- package/dist/skills-CZDOAQUB.mjs.map +1 -0
- package/dist/web/playground/assets/main-DGG3i9qV.js +206 -0
- package/dist/web/playground/assets/main-ju42oR5B.css +2 -0
- package/dist/web/playground/assets/seedSync.worker-Dtm5ikdF.js +36 -0
- package/dist/web/playground/assets/{statementBuilderFlow-BeAnFeTJ.js → statementBuilderFlow-B3qp5guB.js} +2 -2
- package/dist/web/playground/index.html +2 -2
- package/dist/web/{server/seed/core/chunks/canvas.034cd2d8.json → playground/seed/core/chunks/canvas.851cb23d.json} +1 -1
- package/dist/web/playground/seed/core/chunks/{efforts.de0a7ecf.json → efforts.d87cfa3d.json} +1 -1
- package/dist/web/playground/seed/core/manifest.json +7 -7
- package/dist/web/playground/seed/core/report.html +10 -10
- package/dist/web/server/assets/main-fU6_8XGm.js +206 -0
- package/dist/web/server/assets/main-ju42oR5B.css +2 -0
- package/dist/web/server/assets/seedSync.worker-Dtm5ikdF.js +36 -0
- package/dist/web/server/assets/{statementBuilderFlow-CRtDUMGT.js → statementBuilderFlow-RCWlzYMU.js} +2 -2
- package/dist/web/server/index.html +2 -2
- package/dist/web/{playground/seed/core/chunks/canvas.034cd2d8.json → server/seed/core/chunks/canvas.851cb23d.json} +1 -1
- package/dist/web/server/seed/core/chunks/{efforts.de0a7ecf.json → efforts.d87cfa3d.json} +1 -1
- package/dist/web/server/seed/core/manifest.json +7 -7
- package/dist/web/server/seed/core/report.html +10 -10
- package/package.json +7 -7
- package/dist/chunk-DHEXWQBU.mjs.map +0 -1
- package/dist/chunk-VXFSQEMS.mjs.map +0 -1
- package/dist/web/playground/assets/main-Ca77F_Lt.js +0 -206
- package/dist/web/playground/assets/main-CnObKKRQ.css +0 -2
- package/dist/web/server/assets/main-CnObKKRQ.css +0 -2
- package/dist/web/server/assets/main-D9NNBwfl.js +0 -206
|
@@ -5,8 +5,8 @@ if (typeof globalThis.require === 'undefined') {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
// src/version.ts
|
|
8
|
-
var VERSION = "0.
|
|
8
|
+
var VERSION = "0.43.2150";
|
|
9
9
|
|
|
10
10
|
export { VERSION };
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-RVKV4WMA.mjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-RVKV4WMA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/version.ts"],"names":[],"mappings":";;;;;;;AAIO,IAAM,OAAA,GAAU","file":"chunk-RVKV4WMA.mjs","sourcesContent":["/**\n * Auto-generated build version metadata.\n * Do not edit directly; updated by scripts/stamp-version.ts\n */\nexport const VERSION = '0.43.2150';\nexport const GIT_SHA = 'cd85290';\nexport const BUILD_TIME = '2026-10-21T03:51:03.849Z';\nexport const SEMVER = {\n version: '0.43.2150',\n gitSha: 'cd85290',\n buildTime: '2026-10-21T03:51:03.849Z',\n} as const;\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1028,7 +1028,7 @@ var init_compiler = __esm({
|
|
|
1028
1028
|
var VERSION;
|
|
1029
1029
|
var init_version = __esm({
|
|
1030
1030
|
"src/version.ts"() {
|
|
1031
|
-
VERSION = "0.
|
|
1031
|
+
VERSION = "0.43.2150";
|
|
1032
1032
|
}
|
|
1033
1033
|
});
|
|
1034
1034
|
|
|
@@ -1237,6 +1237,63 @@ directory, \`https://owner.github.io/repo/\`, e.g.
|
|
|
1237
1237
|
}
|
|
1238
1238
|
});
|
|
1239
1239
|
|
|
1240
|
+
// src/cli/skills.ts
|
|
1241
|
+
var skills_exports = {};
|
|
1242
|
+
__export(skills_exports, {
|
|
1243
|
+
bundledSkillsRoot: () => bundledSkillsRoot,
|
|
1244
|
+
installSkills: () => installSkills,
|
|
1245
|
+
listBundledSkills: () => listBundledSkills
|
|
1246
|
+
});
|
|
1247
|
+
function frontmatterField(source, key) {
|
|
1248
|
+
const match = source.match(new RegExp(`^${key}:[ ]*(.*)$`, "m"));
|
|
1249
|
+
return match?.[1].trim().replace(/^(['"])(.*)\1$/, "$2") || void 0;
|
|
1250
|
+
}
|
|
1251
|
+
function listBundledSkills(root) {
|
|
1252
|
+
if (!fs.existsSync(root)) return [];
|
|
1253
|
+
return fs.readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory() && fs.existsSync(path.join(root, entry.name, "SKILL.md"))).sort((a, b) => a.name.localeCompare(b.name)).map((entry) => {
|
|
1254
|
+
const source = fs.readFileSync(path.join(root, entry.name, "SKILL.md"), "utf-8");
|
|
1255
|
+
return {
|
|
1256
|
+
name: entry.name,
|
|
1257
|
+
description: frontmatterField(source, "description") ?? "",
|
|
1258
|
+
path: path.join(root, entry.name)
|
|
1259
|
+
};
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
function bundledSkillsRoot() {
|
|
1263
|
+
const scriptDir = path.dirname(fs.realpathSync(process.argv[1] ?? process.cwd()));
|
|
1264
|
+
const candidates = ["skills", "../skills", "../../skills", "../../../skills", "../../../../skills"].map(
|
|
1265
|
+
(rel) => path.resolve(scriptDir, rel)
|
|
1266
|
+
);
|
|
1267
|
+
return candidates.find((candidate) => listBundledSkills(candidate).length > 0);
|
|
1268
|
+
}
|
|
1269
|
+
function installSkills(options = {}) {
|
|
1270
|
+
const root = options.root ?? bundledSkillsRoot();
|
|
1271
|
+
if (!root) {
|
|
1272
|
+
throw new Error("no bundled skills found next to this CLI \u2014 reinstall the package or run from the wod-wiki checkout");
|
|
1273
|
+
}
|
|
1274
|
+
const skills = listBundledSkills(root);
|
|
1275
|
+
if (skills.length === 0) throw new Error(`no skills under ${root}`);
|
|
1276
|
+
const target = path.join(path.resolve(options.dir ?? process.cwd()), ".agents", "skills");
|
|
1277
|
+
const installed = [];
|
|
1278
|
+
const skipped = [];
|
|
1279
|
+
for (const skill of skills) {
|
|
1280
|
+
const destination = path.join(target, skill.name);
|
|
1281
|
+
if (fs.existsSync(destination) && options.force !== true) {
|
|
1282
|
+
skipped.push(skill.name);
|
|
1283
|
+
continue;
|
|
1284
|
+
}
|
|
1285
|
+
fs.rmSync(destination, { recursive: true, force: true });
|
|
1286
|
+
fs.mkdirSync(target, { recursive: true });
|
|
1287
|
+
fs.cpSync(skill.path, destination, { recursive: true });
|
|
1288
|
+
installed.push(skill.name);
|
|
1289
|
+
}
|
|
1290
|
+
return { root, target, installed, skipped };
|
|
1291
|
+
}
|
|
1292
|
+
var init_skills = __esm({
|
|
1293
|
+
"src/cli/skills.ts"() {
|
|
1294
|
+
}
|
|
1295
|
+
});
|
|
1296
|
+
|
|
1240
1297
|
// src/server/errors.ts
|
|
1241
1298
|
var HttpError;
|
|
1242
1299
|
var init_errors = __esm({
|
|
@@ -1540,13 +1597,13 @@ __export(server_exports, {
|
|
|
1540
1597
|
runCliServer: () => runCliServer
|
|
1541
1598
|
});
|
|
1542
1599
|
function withResolvers() {
|
|
1543
|
-
let
|
|
1600
|
+
let resolve4;
|
|
1544
1601
|
let reject;
|
|
1545
1602
|
const promise = new Promise((res, rej) => {
|
|
1546
|
-
|
|
1603
|
+
resolve4 = res;
|
|
1547
1604
|
reject = rej;
|
|
1548
1605
|
});
|
|
1549
|
-
return { promise, resolve:
|
|
1606
|
+
return { promise, resolve: resolve4, reject };
|
|
1550
1607
|
}
|
|
1551
1608
|
function startHttpServer(handler, host, port) {
|
|
1552
1609
|
const b = globalThis.Bun;
|
|
@@ -1554,7 +1611,7 @@ function startHttpServer(handler, host, port) {
|
|
|
1554
1611
|
const s = b.serve({ port, hostname: host, fetch: handler });
|
|
1555
1612
|
return Promise.resolve({ stop: () => s.stop() });
|
|
1556
1613
|
}
|
|
1557
|
-
const { promise, resolve:
|
|
1614
|
+
const { promise, resolve: resolve4, reject } = withResolvers();
|
|
1558
1615
|
const server = http__default.default.createServer(async (req, res) => {
|
|
1559
1616
|
try {
|
|
1560
1617
|
const url = new URL(req.url || "/", `http://${req.headers.host || `${host}:${port}`}`);
|
|
@@ -1579,7 +1636,7 @@ function startHttpServer(handler, host, port) {
|
|
|
1579
1636
|
});
|
|
1580
1637
|
server.once("error", reject);
|
|
1581
1638
|
server.listen(port, host, () => {
|
|
1582
|
-
|
|
1639
|
+
resolve4({
|
|
1583
1640
|
stop: () => {
|
|
1584
1641
|
const close = withResolvers();
|
|
1585
1642
|
server.close(() => close.resolve());
|
|
@@ -2055,8 +2112,8 @@ async function loadLanguagePack(moduleSpec) {
|
|
|
2055
2112
|
try {
|
|
2056
2113
|
let importPath = moduleSpec;
|
|
2057
2114
|
if (moduleSpec.startsWith(".") || moduleSpec.startsWith("/") || moduleSpec.includes("\\") || moduleSpec.endsWith(".ts") || moduleSpec.endsWith(".js") || moduleSpec.endsWith(".mjs")) {
|
|
2058
|
-
const { resolve:
|
|
2059
|
-
const resolved =
|
|
2115
|
+
const { resolve: resolve4, pathToFileURL } = getPathUtils();
|
|
2116
|
+
const resolved = resolve4(process.cwd(), moduleSpec);
|
|
2060
2117
|
importPath = pathToFileURL(resolved).href;
|
|
2061
2118
|
}
|
|
2062
2119
|
const imported = await import(
|
|
@@ -3943,7 +4000,7 @@ function parseCliArgs(args) {
|
|
|
3943
4000
|
if (Number.isSafeInteger(v) && v >= 0) result.seedVersion = v;
|
|
3944
4001
|
i++;
|
|
3945
4002
|
} else if (!result.subcommand) {
|
|
3946
|
-
if (arg === "parse" || arg === "run" || arg === "query" || arg === "download" || arg === "export" || arg === "import" || arg === "publish" || arg === "build" || arg === "seed" || arg === "reset" || arg === "init" || arg === "db" || arg === "server" || arg === "serve" || arg === "playground" || arg === "init-catalog" || arg === "help" || arg === "version") {
|
|
4003
|
+
if (arg === "parse" || arg === "run" || arg === "query" || arg === "download" || arg === "export" || arg === "import" || arg === "publish" || arg === "build" || arg === "seed" || arg === "reset" || arg === "init" || arg === "db" || arg === "server" || arg === "serve" || arg === "playground" || arg === "init-catalog" || arg === "skills" || arg === "help" || arg === "version") {
|
|
3947
4004
|
result.subcommand = arg;
|
|
3948
4005
|
} else {
|
|
3949
4006
|
result.target = arg;
|
|
@@ -3983,13 +4040,13 @@ function readBunStdinText() {
|
|
|
3983
4040
|
async function readStdin() {
|
|
3984
4041
|
const bunText = readBunStdinText();
|
|
3985
4042
|
if (bunText) return bunText();
|
|
3986
|
-
return new Promise((
|
|
4043
|
+
return new Promise((resolve4, reject) => {
|
|
3987
4044
|
const chunks = [];
|
|
3988
4045
|
process.stdin.on("data", (chunk) => {
|
|
3989
4046
|
chunks.push(typeof chunk === "string" ? Buffer.from(chunk) : chunk);
|
|
3990
4047
|
});
|
|
3991
4048
|
process.stdin.on("end", () => {
|
|
3992
|
-
|
|
4049
|
+
resolve4(Buffer.concat(chunks).toString("utf-8"));
|
|
3993
4050
|
});
|
|
3994
4051
|
process.stdin.on("error", (err) => {
|
|
3995
4052
|
reject(err);
|
|
@@ -4013,6 +4070,13 @@ USAGE:
|
|
|
4013
4070
|
Scaffold a new catalog repository (package.json, example
|
|
4014
4071
|
collection, GitHub Actions Pages workflow). Refuses an
|
|
4015
4072
|
existing destination.
|
|
4073
|
+
wod skills <list | install> [options]
|
|
4074
|
+
Agent skills bundled with this CLI \u2014 the Whiteboard
|
|
4075
|
+
Script extraction rules an agent needs to parse and write
|
|
4076
|
+
correct workouts. install copies them to
|
|
4077
|
+
<dir>/.agents/skills/ (no network); they are also
|
|
4078
|
+
publishable via npx skills add bitcobblers/wod-wiki.
|
|
4079
|
+
wod skills install [--dir <path>] [--force]
|
|
4016
4080
|
wod seed [options]
|
|
4017
4081
|
wod reset [options]
|
|
4018
4082
|
wod init Initialize the configured database (idempotent)
|
|
@@ -4267,12 +4331,47 @@ async function cliMain(argv = process.argv.slice(2), io = {}) {
|
|
|
4267
4331
|
const result = scaffoldCatalog2(parsed.target);
|
|
4268
4332
|
writeOut(`[wod init-catalog] Created ${result.dir} (${result.files.length} files)`);
|
|
4269
4333
|
writeOut(`Next: cd ${parsed.target} && bun install && bunx wod build . --output dist`);
|
|
4334
|
+
writeOut(`Agents: wod skills install --dir ${parsed.target} (Whiteboard Script extraction rules \u2192 .agents/skills/)`);
|
|
4270
4335
|
return 0;
|
|
4271
4336
|
} catch (error) {
|
|
4272
4337
|
writeErr(`[wod init-catalog] ${error.message}`);
|
|
4273
4338
|
return 1;
|
|
4274
4339
|
}
|
|
4275
4340
|
}
|
|
4341
|
+
if (parsed.subcommand === "skills") {
|
|
4342
|
+
const action = parsed.target ?? "list";
|
|
4343
|
+
const { bundledSkillsRoot: bundledSkillsRoot2, installSkills: installSkills2, listBundledSkills: listBundledSkills2 } = await Promise.resolve().then(() => (init_skills(), skills_exports));
|
|
4344
|
+
try {
|
|
4345
|
+
if (action === "list") {
|
|
4346
|
+
const root = bundledSkillsRoot2();
|
|
4347
|
+
if (!root) {
|
|
4348
|
+
writeErr("[wod skills] No bundled skills found next to this CLI");
|
|
4349
|
+
return 1;
|
|
4350
|
+
}
|
|
4351
|
+
const skills = listBundledSkills2(root);
|
|
4352
|
+
for (const skill of skills) writeOut(`${skill.name} \u2014 ${skill.description}`);
|
|
4353
|
+
writeOut(`[wod skills] ${skills.length} skill(s) from ${root}`);
|
|
4354
|
+
return 0;
|
|
4355
|
+
}
|
|
4356
|
+
if (action === "install") {
|
|
4357
|
+
const result = installSkills2({ dir: parsed.dir, force: parsed.force === true });
|
|
4358
|
+
for (const name of result.installed) writeOut(`[wod skills] installed ${name} \u2192 ${nodePath().join(result.target, name)}`);
|
|
4359
|
+
for (const name of result.skipped) writeOut(`[wod skills] ${name} already installed (use --force to replace)`);
|
|
4360
|
+
writeOut(`[wod skills] ${result.installed.length} installed, ${result.skipped.length} kept \u2014 source ${result.root}`);
|
|
4361
|
+
if (result.installed.length === 0 && result.skipped.length === 0) {
|
|
4362
|
+
writeErr("[wod skills] No bundled skills found");
|
|
4363
|
+
return 1;
|
|
4364
|
+
}
|
|
4365
|
+
writeOut("[wod skills] Agents read .agents/skills/; use `npx skills add bitcobblers/wod-wiki` for per-agent links.");
|
|
4366
|
+
return 0;
|
|
4367
|
+
}
|
|
4368
|
+
writeErr(`[wod skills] Unknown action '${action}' (expected: list | install)`);
|
|
4369
|
+
return 1;
|
|
4370
|
+
} catch (error) {
|
|
4371
|
+
writeErr(`[wod skills] ${error.message}`);
|
|
4372
|
+
return 1;
|
|
4373
|
+
}
|
|
4374
|
+
}
|
|
4276
4375
|
if (parsed.subcommand === "parse") {
|
|
4277
4376
|
if (!parsed.target) {
|
|
4278
4377
|
writeErr('[wod parse] Error: Missing input file or "-" for stdin');
|