@bitcobblers/wod-wiki-tools 0.42.2148 → 0.43.2149

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.
Files changed (43) hide show
  1. package/dist/bin/wod.cjs +110 -11
  2. package/dist/bin/wod.cjs.map +1 -1
  3. package/dist/bin/wod.mjs +2 -2
  4. package/dist/{chunk-DHEXWQBU.mjs → chunk-7I32OIIN.mjs} +48 -6
  5. package/dist/chunk-7I32OIIN.mjs.map +1 -0
  6. package/dist/{chunk-VXFSQEMS.mjs → chunk-AZ2PNCV7.mjs} +3 -3
  7. package/dist/chunk-AZ2PNCV7.mjs.map +1 -0
  8. package/dist/index.cjs +110 -11
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.mjs +2 -2
  13. package/dist/{scaffoldCatalog-BY6FUYYW.mjs → scaffoldCatalog-WAAK2H3B.mjs} +3 -3
  14. package/dist/{scaffoldCatalog-BY6FUYYW.mjs.map → scaffoldCatalog-WAAK2H3B.mjs.map} +1 -1
  15. package/dist/skills/README.md +40 -0
  16. package/dist/skills/wod-extraction/SKILL.md +656 -0
  17. package/dist/skills-CZDOAQUB.mjs +57 -0
  18. package/dist/skills-CZDOAQUB.mjs.map +1 -0
  19. package/dist/web/playground/assets/main-BuLuMS0t.js +206 -0
  20. package/dist/web/playground/assets/main-D-S_QDDm.css +2 -0
  21. package/dist/web/playground/assets/seedSync.worker-BUgvB_87.js +36 -0
  22. package/dist/web/playground/assets/{statementBuilderFlow-BeAnFeTJ.js → statementBuilderFlow-B5iVhWRJ.js} +2 -2
  23. package/dist/web/playground/index.html +2 -2
  24. package/dist/web/{server/seed/core/chunks/canvas.034cd2d8.json → playground/seed/core/chunks/canvas.a1805113.json} +1 -1
  25. package/dist/web/playground/seed/core/chunks/{efforts.de0a7ecf.json → efforts.61670858.json} +1 -1
  26. package/dist/web/playground/seed/core/manifest.json +7 -7
  27. package/dist/web/playground/seed/core/report.html +10 -10
  28. package/dist/web/server/assets/main-CNdQmybx.js +206 -0
  29. package/dist/web/server/assets/main-D-S_QDDm.css +2 -0
  30. package/dist/web/server/assets/seedSync.worker-BUgvB_87.js +36 -0
  31. package/dist/web/server/assets/{statementBuilderFlow-CRtDUMGT.js → statementBuilderFlow-CepJ5fur.js} +2 -2
  32. package/dist/web/server/index.html +2 -2
  33. package/dist/web/{playground/seed/core/chunks/canvas.034cd2d8.json → server/seed/core/chunks/canvas.a1805113.json} +1 -1
  34. package/dist/web/server/seed/core/chunks/{efforts.de0a7ecf.json → efforts.61670858.json} +1 -1
  35. package/dist/web/server/seed/core/manifest.json +7 -7
  36. package/dist/web/server/seed/core/report.html +11 -11
  37. package/package.json +7 -7
  38. package/dist/chunk-DHEXWQBU.mjs.map +0 -1
  39. package/dist/chunk-VXFSQEMS.mjs.map +0 -1
  40. package/dist/web/playground/assets/main-Ca77F_Lt.js +0 -206
  41. package/dist/web/playground/assets/main-CnObKKRQ.css +0 -2
  42. package/dist/web/server/assets/main-CnObKKRQ.css +0 -2
  43. package/dist/web/server/assets/main-D9NNBwfl.js +0 -206
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cli/skills.ts"],"names":[],"mappings":";;;;;;;;AAoCA,SAAS,gBAAA,CAAiB,QAAgB,GAAA,EAAiC;AACzE,EAAA,MAAM,KAAA,GAAQ,OAAO,KAAA,CAAM,IAAI,OAAO,CAAA,CAAA,EAAI,GAAG,CAAA,WAAA,CAAA,EAAgB,GAAG,CAAC,CAAA;AACjE,EAAA,OAAO,KAAA,GAAQ,CAAC,CAAA,CAAE,IAAA,GAAO,OAAA,CAAQ,gBAAA,EAAkB,IAAI,CAAA,IAAK,MAAA;AAC9D;AAGO,SAAS,kBAAkB,IAAA,EAA8B;AAC9D,EAAA,IAAI,CAAC,UAAA,CAAW,IAAI,CAAA,SAAU,EAAC;AAC/B,EAAA,OAAO,WAAA,CAAY,IAAA,EAAM,EAAE,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AAA,EAAM;AACT,IAAA,MAAM,IAAI,MAAM,yGAAoG,CAAA;AAAA,EACtH;AACA,EAAA,MAAM,MAAA,GAAS,kBAAkB,IAAI,CAAA;AACrC,EAAA,IAAI,MAAA,CAAO,WAAW,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,CAAA,gBAAA,EAAmB,IAAI,CAAA,CAAE,CAAA;AAElE,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,OAAA,CAAQ,OAAA,CAAQ,GAAA,IAAO,QAAQ,GAAA,EAAK,CAAA,EAAG,SAAA,EAAW,QAAQ,CAAA;AAC9E,EAAA,MAAM,YAAsB,EAAC;AAC7B,EAAA,MAAM,UAAoB,EAAC;AAC3B,EAAA,KAAA,MAAW,SAAS,MAAA,EAAQ;AAC1B,IAAA,MAAM,WAAA,GAAc,IAAA,CAAK,MAAA,EAAQ,KAAA,CAAM,IAAI,CAAA;AAC3C,IAAA,IAAI,UAAA,CAAW,WAAW,CAAA,IAAK,OAAA,CAAQ,UAAU,IAAA,EAAM;AACrD,MAAA,OAAA,CAAQ,IAAA,CAAK,MAAM,IAAI,CAAA;AACvB,MAAA;AAAA,IACF;AAEA,IAAA,MAAA,CAAO,aAAa,EAAE,SAAA,EAAW,IAAA,EAAM,KAAA,EAAO,MAAM,CAAA;AACpD,IAAA,SAAA,CAAU,MAAA,EAAQ,EAAE,SAAA,EAAW,IAAA,EAAM,CAAA;AACrC,IAAA,MAAA,CAAO,MAAM,IAAA,EAAM,WAAA,EAAa,EAAE,SAAA,EAAW,MAAM,CAAA;AACnD,IAAA,SAAA,CAAU,IAAA,CAAK,MAAM,IAAI,CAAA;AAAA,EAC3B;AACA,EAAA,OAAO,EAAE,IAAA,EAAM,MAAA,EAAQ,SAAA,EAAW,OAAA,EAAQ;AAC5C","file":"skills-CZDOAQUB.mjs","sourcesContent":["/**\n * `wod skills list | install` — the agent skills bundled with this CLI.\n *\n * The skills are the parsing rules an agent needs to read and write correct\n * Whiteboard Script (see `skills/<name>/SKILL.md` in the wod-wiki repo). They\n * ship inside the package as `skills/<name>/SKILL.md`, which is also the layout\n * `npx skills experimental_sync` discovers in an installed dependency, so a\n * project can get them without this command.\n *\n * `install` copies them into `<dir>/.agents/skills/` — the shared location agent\n * CLIs read (see the `skills` CLI's discovery list), no network, no npx.\n *\n * Lazily imported by cli/runner.ts (dynamic import), so static node:fs/node:path\n * imports stay out of browser bundles.\n */\nimport { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, rmSync } from 'node:fs';\nimport { dirname, join, resolve } from 'node:path';\n\nexport interface BundledSkill {\n /** Directory name, which is also the frontmatter `name`. */\n name: string;\n description: string;\n /** Absolute path of the skill directory. */\n path: string;\n}\n\nexport interface InstallResult {\n /** Skills root the files were read from. */\n root: string;\n /** `.agents/skills` directory that received them. */\n target: string;\n installed: string[];\n /** Already present and left alone (pass force to replace). */\n skipped: string[];\n}\n\nfunction frontmatterField(source: string, key: string): string | undefined {\n const match = source.match(new RegExp(`^${key}:[ \\t]*(.*)$`, 'm'));\n return match?.[1].trim().replace(/^(['\"])(.*)\\1$/, '$2') || undefined;\n}\n\n/** Every `<root>/<name>/SKILL.md` directory, frontmatter read for the listing. */\nexport function listBundledSkills(root: string): BundledSkill[] {\n if (!existsSync(root)) return [];\n return readdirSync(root, { withFileTypes: true })\n .filter((entry) => entry.isDirectory() && existsSync(join(root, entry.name, 'SKILL.md')))\n .sort((a, b) => a.name.localeCompare(b.name))\n .map((entry) => {\n const source = readFileSync(join(root, entry.name, 'SKILL.md'), 'utf-8');\n return {\n name: entry.name,\n description: frontmatterField(source, 'description') ?? '',\n path: join(root, entry.name),\n };\n });\n}\n\n/**\n * Skills root of this install, probed from the running CLI script: `<pkg>/dist/skills`\n * when built (`dist/bin/wod.mjs`), `skills/` in a checkout (`bin/wod`,\n * `packages/tools/src/bin/wod.ts`).\n */\nexport function bundledSkillsRoot(): string | undefined {\n const scriptDir = dirname(realpathSync(process.argv[1] ?? process.cwd()));\n const candidates = ['skills', '../skills', '../../skills', '../../../skills', '../../../../skills'].map((rel) =>\n resolve(scriptDir, rel),\n );\n return candidates.find((candidate) => listBundledSkills(candidate).length > 0);\n}\n\n/** Copy every bundled skill into `<dir>/.agents/skills/`. */\nexport function installSkills(options: { dir?: string; force?: boolean; root?: string } = {}): InstallResult {\n const root = options.root ?? bundledSkillsRoot();\n if (!root) {\n throw new Error('no bundled skills found next to this CLI — reinstall the package or run from the wod-wiki checkout');\n }\n const skills = listBundledSkills(root);\n if (skills.length === 0) throw new Error(`no skills under ${root}`);\n\n const target = join(resolve(options.dir ?? process.cwd()), '.agents', 'skills');\n const installed: string[] = [];\n const skipped: string[] = [];\n for (const skill of skills) {\n const destination = join(target, skill.name);\n if (existsSync(destination) && options.force !== true) {\n skipped.push(skill.name);\n continue;\n }\n // Replacing: drop the old directory so files removed upstream do not linger.\n rmSync(destination, { recursive: true, force: true });\n mkdirSync(target, { recursive: true });\n cpSync(skill.path, destination, { recursive: true });\n installed.push(skill.name);\n }\n return { root, target, installed, skipped };\n}\n"]}