@luz-ds/ai 0.1.0 → 0.3.0

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 (80) hide show
  1. package/README.md +11 -7
  2. package/dist/skills/luz/SKILL.md +14 -10
  3. package/dist/skills/luz/assets/agents/luz-agent-seogeo.md +10 -1
  4. package/dist/skills/luz/assets/examples/landing-service/app.js +51 -0
  5. package/dist/skills/luz/assets/examples/landing-service/index.html.tpl +83 -0
  6. package/dist/skills/luz/assets/facts.json +5 -5
  7. package/dist/skills/luz/assets/skills/luz-meta/SKILL.md +2 -2
  8. package/dist/skills/luz/assets/skills/luz-meta/references/head.md +32 -1
  9. package/dist/skills/luz/assets/skills/luz-money/SKILL.md +69 -0
  10. package/dist/skills/luz/assets/skills/luz-money/references/license-change.md +21 -0
  11. package/dist/skills/luz/assets/skills/luz-money/references/models-commercial.md +192 -0
  12. package/dist/skills/luz/assets/skills/luz-money/references/models-open-source.md +170 -0
  13. package/dist/skills/luz/assets/skills/luz-money/references/platforms.md +103 -0
  14. package/dist/skills/luz/assets/skills/luz-money/references/report.md +82 -0
  15. package/dist/skills/luz/assets/templates/app.html.tpl +31 -28
  16. package/dist/skills/luz/assets/templates/blog.html.tpl +19 -19
  17. package/dist/skills/luz/assets/templates/docs.html.tpl +18 -18
  18. package/dist/skills/luz/assets/templates/landing.html.tpl +19 -19
  19. package/dist/skills/luz/references/components/accordion.md +16 -0
  20. package/dist/skills/luz/references/components/alert.md +13 -0
  21. package/dist/skills/luz/references/components/app-bar.md +34 -0
  22. package/dist/skills/luz/references/components/badge.md +7 -0
  23. package/dist/skills/luz/references/components/bar-list.md +18 -0
  24. package/dist/skills/luz/references/components/breadcrumb.md +13 -0
  25. package/dist/skills/luz/references/components/button-link.md +7 -0
  26. package/dist/skills/luz/references/components/button.md +7 -0
  27. package/dist/skills/luz/references/components/card.md +10 -0
  28. package/dist/skills/luz/references/components/checkbox.md +10 -0
  29. package/dist/skills/luz/references/components/code-block.md +9 -0
  30. package/dist/skills/luz/references/components/copy.md +8 -0
  31. package/dist/skills/luz/references/components/dashboard.md +27 -0
  32. package/dist/skills/luz/references/components/date.md +11 -0
  33. package/dist/skills/luz/references/components/dropdown.md +17 -0
  34. package/dist/skills/luz/references/components/email.md +11 -0
  35. package/dist/skills/luz/references/components/faq.md +38 -0
  36. package/dist/skills/luz/references/components/fieldset.md +17 -0
  37. package/dist/skills/luz/references/components/figure.md +12 -0
  38. package/dist/skills/luz/references/components/hero.md +24 -0
  39. package/dist/skills/luz/references/components/meter.md +8 -0
  40. package/dist/skills/luz/references/components/modal.md +26 -0
  41. package/dist/skills/luz/references/components/navbar.md +23 -0
  42. package/dist/skills/luz/references/components/number.md +11 -0
  43. package/dist/skills/luz/references/components/objects-actions.md +20 -0
  44. package/dist/skills/luz/references/components/objects-grid.md +15 -0
  45. package/dist/skills/luz/references/components/objects-list.md +10 -0
  46. package/dist/skills/luz/references/components/objects-media.md +12 -0
  47. package/dist/skills/luz/references/components/objects-page.md +18 -0
  48. package/dist/skills/luz/references/components/objects-shell.md +15 -0
  49. package/dist/skills/luz/references/components/page-header.md +12 -0
  50. package/dist/skills/luz/references/components/pagination.md +15 -0
  51. package/dist/skills/luz/references/components/progress.md +8 -0
  52. package/dist/skills/luz/references/components/prose.md +19 -0
  53. package/dist/skills/luz/references/components/radio.md +13 -0
  54. package/dist/skills/luz/references/components/range.md +10 -0
  55. package/dist/skills/luz/references/components/section.md +26 -0
  56. package/dist/skills/luz/references/components/select.md +14 -0
  57. package/dist/skills/luz/references/components/sidebar.md +23 -0
  58. package/dist/skills/luz/references/components/site-footer.md +17 -0
  59. package/dist/skills/luz/references/components/site-header.md +26 -0
  60. package/dist/skills/luz/references/components/skip-link.md +11 -0
  61. package/dist/skills/luz/references/components/stat.md +17 -0
  62. package/dist/skills/luz/references/components/switch.md +11 -0
  63. package/dist/skills/luz/references/components/table-sort.md +23 -0
  64. package/dist/skills/luz/references/components/table.md +17 -0
  65. package/dist/skills/luz/references/components/tabs.md +12 -0
  66. package/dist/skills/luz/references/components/tag.md +7 -0
  67. package/dist/skills/luz/references/components/text.md +11 -0
  68. package/dist/skills/luz/references/components/textarea.md +11 -0
  69. package/dist/skills/luz/references/components/toast.md +15 -0
  70. package/dist/skills/luz/references/components/tool.md +38 -0
  71. package/dist/skills/luz/references/components.md +101 -0
  72. package/dist/skills/luz/references/design.md +204 -0
  73. package/dist/skills/luz/references/done.md +45 -0
  74. package/dist/skills/luz/references/kinds/app.md +8 -1
  75. package/dist/skills/luz/references/kinds/landing.md +2 -2
  76. package/dist/skills/luz/references/magic.md +84 -0
  77. package/dist/skills/luz/references/reviewers.md +12 -2
  78. package/dist/skills/luz/references/skills.md +2 -0
  79. package/dist/skills/luz/scripts/luz.mjs +489 -8
  80. package/package.json +1 -1
@@ -4,17 +4,22 @@
4
4
  *
5
5
  * It reads and reports; `init`, `site new` (and `magic`, the same), `agent add`, `skill add` and `remove` write or delete: only the files
6
6
  * they name, under the folder it is given, and never over one that exists unless --force says so (`magic` never takes it). It never asks a question, never reaches the
7
- * network and runs no program. It finds its own data from its own path, so it works from any folder.
7
+ * network and runs no program but one: `shot` starts the browser of the machine (Chrome, Chromium or Edge), headless, to take
8
+ * pictures of a page, and writes them only into a new folder of its own. It finds its own data from its own path, so it works from any folder.
8
9
  *
9
10
  * luz-ai doctor [--dir <folder>] [--json]
10
11
  * luz-ai lint [path...] [--target portable|claude] [--json]
11
12
  * luz-ai facts [--json]
12
13
  * luz-ai site new --name <name> --kind <kind> --stack <stack> --target <folder> [--lang <code>] [--dry-run] [--force] [--json]
14
+ * luz-ai shot --target <folder> [--page <file>] [--out <folder>] [--json]
13
15
  *
14
16
  * Exit codes: 0 nothing blocks, 1 a problem blocks, 2 the command was used wrongly.
15
17
  */
16
- import { existsSync, lstatSync, mkdirSync, readdirSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
17
- import { basename, dirname, join, relative, resolve, sep } from "node:path";
18
+ import { spawn } from "node:child_process";
19
+ import { existsSync, lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
20
+ import { createServer } from "node:http";
21
+ import { homedir, tmpdir } from "node:os";
22
+ import { basename, delimiter, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
18
23
  import { fileURLToPath } from "node:url";
19
24
  import { parseArgs } from "node:util";
20
25
 
@@ -49,7 +54,7 @@ const BANNER = [
49
54
  /** The banner and a blank line, or nothing when stdout is not a terminal. */
50
55
  const banner = (tty) => (tty ? `${BANNER.join("\n")}\n\n` : "");
51
56
 
52
- const HELP = `luz-ai: starts a site with LUZ and lints the skills and subagents of a project. Only init, new, magic, add and remove write.
57
+ const HELP = `luz-ai: starts a site with LUZ and lints the skills and subagents of a project. Only init, new, magic, add and remove write; shot writes only its pictures, in a new folder.
53
58
 
54
59
  Usage:
55
60
  luz-ai <command> [options]
@@ -66,6 +71,8 @@ Commands:
66
71
  facts the versions, the kinds of site and the stacks of this release
67
72
  doctor the project, the assistants it has and whether their skills and agents pass lint
68
73
  lint the front matter and the body of skills (SKILL.md) and subagents (.md)
74
+ shot pictures and measures of a page at 390, 820 and 1440 px, with the browser of the machine (in a new folder)
75
+ money money scan: the facts of a repository (licence, kind, funding) that the luz-money skill reads; it only reads
69
76
 
70
77
  Options:
71
78
  --json one JSON object on stdout
@@ -190,6 +197,45 @@ Example:
190
197
  luz-ai remove luz-agent-optimiza --dry-run
191
198
  `;
192
199
 
200
+ const HELP_SHOT = `luz-ai shot: pictures of a page at three widths, and what can be measured on them, to look at before saying it is done.
201
+
202
+ Usage:
203
+ luz-ai shot --target <folder> [--page <file>] [--click <selector>] [--out <folder>] [--json]
204
+
205
+ --target the folder of the site
206
+ --page the page in it, index.html by default
207
+ --click a CSS selector: a second picture at each width after that element is clicked (a copy button, a tab)
208
+ --out a folder that does not exist yet, for the pictures; by default a new folder in the temporary folder of the machine
209
+
210
+ It starts the browser of the machine, headless: Chrome, Chromium or Edge, or the one LUZ_BROWSER names (a path to one of
211
+ them; any other program is refused). It runs no other program, changes nothing in the site and writes only the pictures,
212
+ into its own new folder. The page is served from the site's folder on 127.0.0.1, at a port the system picks, for the
213
+ browser alone and only while the pictures are taken, so its scripts run as on a real host. It takes the first screen at 390 x 844,
214
+ 820 x 1180 and 1440 x 900, and measures each: how far the page scrolls sideways, how many screens it is long, where the
215
+ first primary action is and whether it is in the first screen, how many primary actions there are and how many "…" are left.
216
+ The page loads LUZ from its CDN, as a visitor's browser would. With no browser it says so and exits 0: then read the HTML
217
+ against references/done.md.
218
+
219
+ Example:
220
+ luz-ai shot --target ./acme
221
+ `;
222
+
223
+ const HELP_MONEY = `luz-ai money: the facts of a repository that the luz-money skill reads before it suggests ways to earn money from it. It only reads.
224
+
225
+ Usage:
226
+ luz-ai money scan [--dir <folder>] [--json]
227
+
228
+ It reads the licence (its SPDX id, its family, whether the OSI approves it), the kind of project, whether it uses LUZ or is LUZ
229
+ itself (the skill is for a project made with LUZ), what it
230
+ already has to be paid (.github/FUNDING.yml, the funding field of package.json, SPONSORS.md, a sponsors section in the README),
231
+ SUPPORT, SECURITY, GOVERNANCE and CONTRIBUTING (a CLA or a DCO), and whether the folder is a git repository.
232
+ No word of a file is printed: only facts about it. It runs no program and uses no network: the authors (git shortlog) and
233
+ the stars of GitHub (gh) are commands the skill runs itself, in the plan the person sees.
234
+
235
+ Example:
236
+ luz-ai money scan --dir . --json
237
+ `;
238
+
193
239
  const HELP_FACTS = `luz-ai facts: the versions of the LUZ packages, the kinds of site and the stacks of this release.
194
240
 
195
241
  Usage:
@@ -587,6 +633,18 @@ function runDoctor(dir) {
587
633
  if (differ.length) warnings.push(`${entry.name} is not the same in ${SKILL_PLACES[0]} and ${SKILL_PLACES[1]} (${differ.slice(0, 3).join(", ")}${differ.length > 3 ? ", …" : ""}): ${entry.name === SELF ? "run init --target claude,codex --force" : skillNames().includes(entry.name) ? `run add ${entry.name} --force` : "make the two copies the same"}`);
588
634
  }
589
635
  }
636
+ // The luz skill of the project against the one of this luz-ai: an old copy has no design guide and no shot, and says nothing
637
+ const own = resolve(HERE, "..");
638
+ const carried = (map) => new Map([...map].filter(([k]) => ["SKILL.md", "LICENSE", "agents", "assets", "references", "scripts"].includes(k.split(sep)[0]) && !k.split(sep).some((part) => part.startsWith("."))));
639
+ for (const place of SKILL_PLACES) {
640
+ const copy = join(dir, place, SELF);
641
+ if (!existsSync(copy) || isLink(copy) || realpathSync(copy) === realpathSync(own)) continue;
642
+ const mine = carried(tree(own));
643
+ const theirs = carried(tree(copy));
644
+ // A name of the project's copy is written only when it is plain (no hidden character, no line break)
645
+ const differ = [...new Set([...mine.keys(), ...theirs.keys()])].filter((k) => mine.get(k) !== theirs.get(k)).map((k) => k.split(sep).join("/")).filter((k) => /^[\w./-]{1,120}$/.test(k)).sort();
646
+ if (differ.length) warnings.push(`the luz skill in ${place} is not the one of luz-ai ${FACTS.versions.ai} (${differ.slice(0, 3).join(", ")}${differ.length > 3 ? `, and ${differ.length - 3} more` : ""}): tell the person, who updates it with npx @luz-ds/ai@latest init --target ${place.startsWith(".claude") ? "claude" : "codex"} --force`);
647
+ }
590
648
  const { checked, problems: found, warnings: soft } = runCheck([], dir);
591
649
  problems.push(...found);
592
650
  warnings.push(...soft);
@@ -595,6 +653,216 @@ function runDoctor(dir) {
595
653
 
596
654
  // ---- facts and site new ---------------------------------------------------------------------------------------
597
655
 
656
+ // The widths of references/done.md: a phone, a tablet, a laptop
657
+ const SHOT_SIZES = [[390, 844], [820, 1180], [1440, 900]];
658
+ const BROWSERS = ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser", "chrome", "microsoft-edge", "microsoft-edge-stable", "msedge"];
659
+ // The names a browser's program has: LUZ_BROWSER is taken only when it names one, so it never runs another program
660
+ const BROWSER_NAMES = new Set([...BROWSERS, "chrome-headless-shell", "google chrome", "microsoft edge"]);
661
+ const isBrowserName = (path) => BROWSER_NAMES.has(basename(path).toLowerCase().replace(/\.exe$/, ""));
662
+ const BROWSER_APPS = [
663
+ "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
664
+ "/Applications/Chromium.app/Contents/MacOS/Chromium",
665
+ "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
666
+ ...["ProgramFiles", "ProgramFiles(x86)", "LOCALAPPDATA"].flatMap((v) => (process.env[v] ? [join(process.env[v], "Google/Chrome/Application/chrome.exe"), join(process.env[v], "Microsoft/Edge/Application/msedge.exe")] : [])),
667
+ ];
668
+
669
+ /** The browser to start: LUZ_BROWSER, else the first of the usual names on the PATH, else the usual places. Null when none. */
670
+ function findBrowser() {
671
+ const named = process.env.LUZ_BROWSER;
672
+ if (named) return isAbsolute(named) && existsSync(named) && isBrowserName(named) ? named : null;
673
+ const exts = process.platform === "win32" ? [".exe", ""] : [""];
674
+ // Not a folder of the project's packages (npx puts node_modules/.bin first) and not a relative one
675
+ for (const dir of (process.env.PATH ?? "").split(delimiter).filter((d) => d && isAbsolute(d) && !d.split(/[\\/]/).includes("node_modules"))) {
676
+ for (const name of BROWSERS) for (const ext of exts) if (existsSync(join(dir, name + ext))) return join(dir, name + ext);
677
+ }
678
+ return BROWSER_APPS.find((p) => existsSync(p)) ?? null;
679
+ }
680
+
681
+ /** The script the server adds to the page for a run of `shot`: it measures, or it clicks, then it writes into the DOM. */
682
+ function shotScript(mode, click) {
683
+ const measure = `const root = document.documentElement;
684
+ const primary = [...document.querySelectorAll(".luz-btn--primary, button:not([type]), button[type=submit]")].filter((e) => e.getClientRects().length);
685
+ const top = primary.length ? Math.round(primary[0].getBoundingClientRect().top + scrollY) : null;
686
+ const pre = document.createElement("pre");
687
+ pre.id = "luz-shot-m";
688
+ pre.textContent = JSON.stringify({ overflowX: Math.max(0, root.scrollWidth - innerWidth), screens: Math.round((root.scrollHeight / innerHeight) * 10) / 10,
689
+ primary: primary.length, primaryTop: top, primaryInFirstScreen: top !== null && top < innerHeight, placeholders: document.body.innerText.split("…").length - 1 });
690
+ document.body.append(pre);`;
691
+ // The selector is the person's flag, never the page's: it is written as JSON, with < escaped, so it cannot close the script
692
+ const clicker = `const target = document.querySelector(${JSON.stringify(click ?? "").replace(/</g, "\\x3c")});
693
+ if (target) target.click();`;
694
+ return `<script>addEventListener("load", () => setTimeout(() => {
695
+ ${mode === "click" ? clicker : measure}
696
+ }, 1500));</script>`;
697
+ }
698
+
699
+ // What the server of `shot` hands out: the files of the site, by their extension
700
+ const TYPES = { ".html": "text/html", ".htm": "text/html", ".css": "text/css", ".js": "text/javascript", ".mjs": "text/javascript", ".json": "application/json", ".svg": "image/svg+xml", ".png": "image/png", ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".gif": "image/gif", ".webp": "image/webp", ".avif": "image/avif", ".ico": "image/x-icon", ".woff2": "font/woff2", ".woff": "font/woff", ".txt": "text/plain", ".csv": "text/csv", ".xml": "application/xml" };
701
+
702
+ /**
703
+ * A server of the site's folder on 127.0.0.1, at a port the system picks, for the browser of `shot` only: GET and HEAD, the
704
+ * files under the folder and nothing outside it (a link out is refused), so a module script loads as it does on a real host.
705
+ * The page gets the script of the run it is asked for (`?luz-shot=measure` or `click`); no other query changes anything.
706
+ * It answers only the Host it was given, and never a hidden file, a folder of packages or a type of file it does not know.
707
+ */
708
+ function serveSite(root, page, click) {
709
+ const base = realpathSync(root);
710
+ let host = "";
711
+ const server = createServer((req, res) => {
712
+ const deny = (code) => {
713
+ res.writeHead(code, { "content-type": "text/plain" });
714
+ res.end(String(code));
715
+ };
716
+ if (req.method !== "GET" && req.method !== "HEAD") return deny(405);
717
+ // Only the browser of shot, at the address it was given: no other name for this machine (a page rebinding a domain)
718
+ if (req.headers.host !== host) return deny(421);
719
+ let url;
720
+ try {
721
+ url = new URL(req.url ?? "/", "http://127.0.0.1");
722
+ } catch {
723
+ return deny(400);
724
+ }
725
+ let rel;
726
+ try {
727
+ rel = decodeURIComponent(url.pathname).replace(/^\/+/, "");
728
+ } catch {
729
+ return deny(400);
730
+ }
731
+ if (rel === "" || rel.endsWith("/")) rel += "index.html";
732
+ // No hidden file or folder (.env, .git) and no package of the project: a page's script could read them and send them away
733
+ const hidden = (path) => path.split(/[\\/]/).some((part) => part.startsWith(".") || part === "node_modules");
734
+ if (hidden(rel)) return deny(404);
735
+ const wanted = resolve(base, rel);
736
+ let real;
737
+ try {
738
+ real = realpathSync(wanted);
739
+ } catch {
740
+ return deny(404);
741
+ }
742
+ if (real !== base && !real.startsWith(base + sep)) return deny(403);
743
+ // The same on the real path: a link inside the site to a hidden folder is refused too
744
+ if (hidden(relative(base, real))) return deny(404);
745
+ if (!statSync(real).isFile()) return deny(404);
746
+ const ext = real.slice(real.lastIndexOf(".")).toLowerCase();
747
+ if (!Object.hasOwn(TYPES, ext)) return deny(404);
748
+ let body = readFileSync(real);
749
+ const mode = url.searchParams.get("luz-shot");
750
+ if (relative(base, real) === page && (mode === "measure" || mode === "click")) {
751
+ const html = body.toString("utf-8");
752
+ const script = shotScript(mode, click);
753
+ body = Buffer.from(/<\/body>/i.test(html) ? html.replace(/<\/body>/i, () => `${script}</body>`) : html + script);
754
+ }
755
+ res.writeHead(200, { "content-type": TYPES[ext], "cache-control": "no-store" });
756
+ res.end(req.method === "HEAD" ? undefined : body);
757
+ });
758
+ return new Promise((done, fail) => {
759
+ server.once("error", fail);
760
+ server.listen(0, "127.0.0.1", () => {
761
+ host = `127.0.0.1:${server.address().port}`;
762
+ done(server);
763
+ });
764
+ });
765
+ }
766
+
767
+ /** Runs the browser with no shell and no wait on the loop, so the server keeps answering it; a minute at most. */
768
+ function runBrowser(browser, args) {
769
+ return new Promise((done) => {
770
+ const child = spawn(browser, args, { shell: false, stdio: ["ignore", "pipe", "ignore"] });
771
+ let stdout = "";
772
+ child.stdout.on("data", (chunk) => {
773
+ if (stdout.length < 4_000_000) stdout += chunk;
774
+ });
775
+ const timer = setTimeout(() => child.kill("SIGKILL"), 60000);
776
+ child.on("error", (error) => {
777
+ clearTimeout(timer);
778
+ done({ status: null, stdout, error });
779
+ });
780
+ child.on("close", (status, signal) => {
781
+ clearTimeout(timer);
782
+ done({ status, signal, stdout });
783
+ });
784
+ });
785
+ }
786
+
787
+ /** What a page may write as its measures: numbers and true or false under the names `shot` measures, nothing else. */
788
+ const MEASURES = { overflowX: "number", screens: "number", primary: "number", primaryTop: "number", primaryInFirstScreen: "boolean", placeholders: "number" };
789
+ function cleanMeasures(raw) {
790
+ if (raw === null || typeof raw !== "object") return null;
791
+ const out = {};
792
+ for (const [key, type] of Object.entries(MEASURES)) {
793
+ const value = raw[key];
794
+ if (typeof value === type && (type !== "number" || Number.isFinite(value))) out[key] = value;
795
+ else if (key === "primaryTop" && value === null) out[key] = null;
796
+ else return null;
797
+ }
798
+ return out;
799
+ }
800
+
801
+ async function runShot(values) {
802
+ if (!values.target) return { error: "--target is missing: the folder of the site. Example: luz-ai shot --target ./acme" };
803
+ const site = resolve(values.target);
804
+ const page = (values.page ?? "index.html").split("\\").join("/");
805
+ if (/[\r\n]/.test(page) || HIDDEN.test(page) || isAbsolute(page) || page.split("/").includes("..")) return { error: "--page is a file inside --target, on one line, with no .." };
806
+ const click = values.click;
807
+ if (click !== undefined && (click.length === 0 || click.length > 200 || /[\r\n<]/.test(click) || HIDDEN.test(click))) return { error: "--click is one CSS selector on one line, of 200 characters at most, with no <" };
808
+ const file = join(site, page);
809
+ if (!existsSync(file) || !statSync(file).isFile()) return { error: `${file} was not found` };
810
+ const browser = findBrowser();
811
+ const report = { ok: false, browser, page: file, out: null, shots: [], next: [] };
812
+ if (!browser) {
813
+ report.next = [process.env.LUZ_BROWSER ? "LUZ_BROWSER does not name the program of Chrome, Chromium or Edge, so nothing was started. Read the HTML against references/done.md, say that nobody looked at the page rendered, and tell the person." : "No browser was found. Read the HTML against references/done.md and say that nobody looked at the page rendered; the person may set LUZ_BROWSER to the path of Chrome, Chromium or Edge."];
814
+ return { report };
815
+ }
816
+ if (values.out && existsSync(resolve(values.out))) return { error: `${resolve(values.out)} exists: shot writes only into a folder that does not exist yet` };
817
+ // A browser installed as a snap sees only the home folder, not the temporary folder of the machine
818
+ const out = values.out ? resolve(values.out) : mkdtempSync(join(/[\\/]snap[\\/]/.test(browser) ? homedir() : tmpdir(), "luz-shot-"));
819
+ if (values.out) mkdirSync(out);
820
+ report.out = out;
821
+ const server = await serveSite(site, relative(realpathSync(site), realpathSync(file)), click);
822
+ const origin = `http://127.0.0.1:${server.address().port}/`;
823
+ const at = (mode) => `${origin}${page.split("/").map(encodeURIComponent).join("/")}${mode ? `?luz-shot=${mode}` : ""}`;
824
+ const base = ["--headless", "--disable-gpu", "--hide-scrollbars", "--no-first-run", "--no-default-browser-check", "--mute-audio", "--disable-background-networking", "--disable-extensions", "--disable-sync", "--virtual-time-budget=10000", `--user-data-dir=${join(out, "profile")}`];
825
+ try {
826
+ for (const [width, height] of SHOT_SIZES) {
827
+ const size = `--window-size=${width},${height}`;
828
+ const picture = join(out, `${width}.png`);
829
+ const shotRun = await runBrowser(browser, [...base, size, `--screenshot=${picture}`, at(null)]);
830
+ const dump = await runBrowser(browser, [...base, size, "--dump-dom", at("measure")]);
831
+ let measures = null;
832
+ const json = /<pre id="luz-shot-m">([^<]*)<\/pre>/.exec(dump.stdout ?? "")?.[1];
833
+ try {
834
+ measures = json ? cleanMeasures(JSON.parse(json.replace(/&quot;/g, '"').replace(/&amp;/g, "&"))) : null;
835
+ } catch {
836
+ measures = null;
837
+ }
838
+ const shot = { width, height, file: existsSync(picture) ? picture : null, measures, error: shotRun.error ? String(shotRun.error.message) : existsSync(picture) ? null : `the browser wrote no picture (exit ${shotRun.status ?? shotRun.signal})` };
839
+ if (click !== undefined) {
840
+ const after = join(out, `${width}-after-click.png`);
841
+ await runBrowser(browser, [...base, size, `--screenshot=${after}`, at("click")]);
842
+ shot.afterClick = existsSync(after) ? after : null;
843
+ }
844
+ report.shots.push(shot);
845
+ }
846
+ } finally {
847
+ await new Promise((done) => server.close(() => done()));
848
+ }
849
+ report.ok = report.shots.some((s) => s.file);
850
+ report.next = report.ok
851
+ ? ["Open each picture now and say in one line what you see in it before you go on; then go through references/done.md with the pictures and the measures. If you cannot see images, say so in the report."]
852
+ : [`The browser wrote nothing in ${out} (a browser installed as a flatpak may not reach that folder). Read the HTML against references/done.md, say that nobody looked at the page rendered, and tell the person.`];
853
+ return { report };
854
+ }
855
+
856
+ function shotText(r) {
857
+ if (!r.browser) return `shot: no browser found\n ${r.next.join("\n ")}\n`;
858
+ const line = (s) => {
859
+ const m = s.measures;
860
+ const what = m && !m.error ? [`sideways ${m.overflowX} px`, `${m.screens} screens`, m.primaryTop === null ? "no primary action" : `first primary at ${m.primaryTop} px${m.primaryInFirstScreen ? " (first screen)" : " (below the first screen)"}`, `${m.primary} primary`, `${m.placeholders} … left`].join(", ") : "no measures";
861
+ return ` ${s.width} px: ${s.file ?? s.error}\n ${what}${s.afterClick ? `\n after the click: ${s.afterClick}` : ""}`;
862
+ };
863
+ return [`shot: ${r.shots.filter((s) => s.file).length} of ${r.shots.length} pictures of ${r.page}, with ${r.browser}`, ...r.shots.map(line), `next: ${r.next.join(" ")}`, ""].join("\n");
864
+ }
865
+
598
866
  function runFacts(json) {
599
867
  if (json) return `${JSON.stringify(FACTS, null, 2)}\n`;
600
868
  const lines = ["facts:", ...Object.entries(FACTS.versions).map(([pkg, v]) => ` @luz-ds/${pkg} ${v}`), ` kinds: ${FACTS.kinds.join(", ")}`, ` stacks: ${FACTS.stacks.map((s) => (s.page ? s.id : `${s.id} (by hand)`)).join(", ")}`];
@@ -1134,6 +1402,195 @@ function initText({ dryRun, places, files, notes, next }) {
1134
1402
  return `${out.join("\n")}\n`;
1135
1403
  }
1136
1404
 
1405
+
1406
+ // ---- money scan: the facts of a repository for the luz-money skill ---------------------------------------------
1407
+ // It reads files only: it runs no program and uses no network (the history and GitHub are the skill's own commands,
1408
+ // git shortlog and gh, which the person sees in the plan). No word of a file reaches the output, only facts about it (a licence by its SPDX id, a heading by its presence), so a file that talks to an AI
1409
+ // never reaches the skill as words.
1410
+
1411
+ const MONEY_SKIP = new Set(["node_modules", ".git", "dist", "build", "vendor", "coverage", "target", "__pycache__", ".venv", "venv", ".next", ".nuxt"]);
1412
+ const LICENSE_TESTS = [
1413
+ // The GNU licences are told by their title, at the start of a line: the text of the GPL names the Affero licence in its section 13
1414
+ ["AGPL-3.0", /^\s*GNU AFFERO GENERAL PUBLIC LICENSE\s+Version 3/im],
1415
+ ["LGPL-3.0", /^\s*GNU LESSER GENERAL PUBLIC LICENSE\s+Version 3/im],
1416
+ ["LGPL-2.1", /^\s*GNU LESSER GENERAL PUBLIC LICENSE\s+Version 2\.1/im],
1417
+ ["GPL-3.0", /^\s*GNU GENERAL PUBLIC LICENSE\s+Version 3/im],
1418
+ ["GPL-2.0", /^\s*GNU GENERAL PUBLIC LICENSE\s+Version 2/im],
1419
+ ["MPL-2.0", /Mozilla Public License,? Version 2\.0/i],
1420
+ ["Apache-2.0", /Apache License\s+Version 2\.0/i],
1421
+ ["BUSL-1.1", /Business Source License 1\.1/i],
1422
+ ["FSL-1.1", /Functional Source License/i],
1423
+ ["SSPL-1.0", /Server Side Public License/i],
1424
+ ["Elastic-2.0", /Elastic License 2\.0/i],
1425
+ ["MIT", /Permission is hereby granted, free of charge/i],
1426
+ ["ISC", /Permission to use, copy, modify, and\/or distribute this software for any purpose/i],
1427
+ ["BSD-3-Clause", /Redistribution and use in source and binary forms[\s\S]*Neither the name/i],
1428
+ ["BSD-2-Clause", /Redistribution and use in source and binary forms/i],
1429
+ ["Unlicense", /This is free and unencumbered software/i],
1430
+ ["CC0-1.0", /CC0 1\.0 Universal/i],
1431
+ ];
1432
+ const LICENSE_FAMILY = {
1433
+ permissive: ["MIT", "ISC", "BSD-2-Clause", "BSD-3-Clause", "Apache-2.0", "Unlicense", "CC0-1.0", "0BSD"],
1434
+ copyleft: ["GPL-2.0", "GPL-3.0", "AGPL-3.0"],
1435
+ "weak-copyleft": ["LGPL-2.1", "LGPL-3.0", "MPL-2.0", "EPL-2.0"],
1436
+ "source-available": ["BUSL-1.1", "FSL-1.1", "SSPL-1.0", "Elastic-2.0"],
1437
+ };
1438
+ // Approved by the OSI (opensource.org/licenses): CC0 is not, and no source-available licence is
1439
+ const OSI = new Set(["MIT", "ISC", "BSD-2-Clause", "BSD-3-Clause", "Apache-2.0", "Unlicense", "0BSD", "GPL-2.0", "GPL-3.0", "AGPL-3.0", "LGPL-2.1", "LGPL-3.0", "MPL-2.0", "EPL-2.0"]);
1440
+ const PAID_APIS = /^(openai|@anthropic-ai\/sdk|@google\/generative-ai|@google\/genai|replicate|twilio|@aws-sdk\/.+|@mistralai\/.+|cohere-ai)$/;
1441
+ const PAYMENTS = /^(stripe|@stripe\/.+|@paddle\/.+|@polar-sh\/.+|@lemonsqueezy\/.+)$/;
1442
+ // The keys GitHub reads in FUNDING.yml (docs.github.com, checked on 2026-12-03): any other word is not printed
1443
+ const FUNDING_KEYS = new Set(["github", "patreon", "open_collective", "ko_fi", "tidelift", "community_bridge", "liberapay", "issuehunt", "polar", "buy_me_a_coffee", "thanks_dev", "custom", "lfx_crowdfunding", "otechie"]);
1444
+ const ROOT_FILES = ["SUPPORT.md", "SECURITY.md", "ROADMAP.md", "GOVERNANCE.md", "CONTRIBUTING.md", "CODE_OF_CONDUCT.md", "CHANGELOG.md"];
1445
+
1446
+ /** The files under a folder, relative, breadth first, without the folders of dependencies and builds (at most `max`). */
1447
+ function moneyWalk(base, max = 4000, depth = 4) {
1448
+ const out = [];
1449
+ let level = [""];
1450
+ for (let d = 0; d <= depth && level.length && out.length < max; d++) {
1451
+ const next = [];
1452
+ for (const rel of level) {
1453
+ let entries;
1454
+ try {
1455
+ entries = readdirSync(join(base, rel), { withFileTypes: true });
1456
+ } catch {
1457
+ continue;
1458
+ }
1459
+ for (const e of entries) {
1460
+ const path = rel ? `${rel}/${e.name}` : e.name;
1461
+ if (e.isSymbolicLink()) continue;
1462
+ if (e.isDirectory()) {
1463
+ if (!MONEY_SKIP.has(e.name) && (!e.name.startsWith(".") || e.name === ".github")) next.push(path);
1464
+ } else if (e.isFile() && out.length < max) out.push(path);
1465
+ }
1466
+ }
1467
+ level = next;
1468
+ }
1469
+ return out;
1470
+ }
1471
+
1472
+ // A file is read only when it is a plain file: never through a symbolic link
1473
+ const readSoft = (path) => {
1474
+ try {
1475
+ if (lstatSync(path).isSymbolicLink()) return null;
1476
+ return readFileSync(path, "utf-8");
1477
+ } catch {
1478
+ return null;
1479
+ }
1480
+ };
1481
+
1482
+ // Only a known id leaves the scan: any other value of package.json is text of the project, and is never printed
1483
+ function licenseOf(spdx) {
1484
+ const id = typeof spdx === "string" ? spdx.trim().replace(/-(only|or-later)$/, "").replace(/\+$/, "") : null;
1485
+ const family = Object.entries(LICENSE_FAMILY).find(([, ids]) => ids.includes(id))?.[0];
1486
+ return family ? { spdx: id, family, osi: OSI.has(id) } : { spdx: null, family: "unknown", osi: null };
1487
+ }
1488
+
1489
+ export function runMoneyScan(dir) {
1490
+ const base = resolve(dir);
1491
+ const files = moneyWalk(base);
1492
+ const at = (rel) => files.includes(rel);
1493
+ const root = files.filter((f) => !f.includes("/"));
1494
+ const pkg = (() => {
1495
+ try {
1496
+ return JSON.parse(readSoft(join(base, "package.json")) ?? "null");
1497
+ } catch {
1498
+ return null;
1499
+ }
1500
+ })();
1501
+ const deps = Object.keys({ ...(pkg?.dependencies ?? {}), ...(pkg?.devDependencies ?? {}), ...(pkg?.peerDependencies ?? {}) });
1502
+
1503
+ // The licence: the file at the root first, then the field of package.json
1504
+ const licenseFile = root.find((f) => /^(LICENSE|LICENCE|COPYING)(\.(md|txt))?$/i.test(f)) ?? null;
1505
+ let license;
1506
+ if (licenseFile) {
1507
+ const text = readSoft(join(base, licenseFile)) ?? "";
1508
+ const found = LICENSE_TESTS.find(([, re]) => re.test(text))?.[0] ?? null;
1509
+ license = found ? licenseOf(found) : { spdx: null, family: "unknown", osi: null };
1510
+ } else if (typeof pkg?.license === "string" && pkg.license !== "UNLICENSED") license = licenseOf(pkg.license);
1511
+ else if (pkg?.license === "UNLICENSED" || (pkg?.private && !pkg?.license)) license = { spdx: null, family: "proprietary", osi: false };
1512
+ else license = { spdx: null, family: "none", osi: false };
1513
+ let eeFolder = false;
1514
+ try {
1515
+ eeFolder = statSync(join(base, "ee")).isDirectory();
1516
+ } catch {}
1517
+ license = { file: licenseFile, ...license, commercialFile: root.some((f) => /^LICEN[CS]E[-_.]COMMERCIAL/i.test(f)), eeFolder };
1518
+
1519
+ // The kinds of project, from their files
1520
+ const kinds = new Set();
1521
+ const pyproject = readSoft(join(base, "pyproject.toml"));
1522
+ const cargo = readSoft(join(base, "Cargo.toml"));
1523
+ if (pkg?.bin || /\[project\.scripts\]/.test(pyproject ?? "") || at("src/main.rs")) kinds.add("cli");
1524
+ if ((pkg && !pkg.private && (pkg.main || pkg.exports || pkg.module)) || (pyproject && !/\[project\.scripts\]/.test(pyproject)) || (cargo && at("src/lib.rs"))) kinds.add("library");
1525
+ const docker = root.some((f) => /^(Dockerfile|docker-compose\.ya?ml|compose\.ya?ml)$/.test(f));
1526
+ const data = files.some((f) => /(^|\/)(migrations|migrate)\//.test(f) || f.endsWith("prisma/schema.prisma"));
1527
+ const webDeps = deps.some((d) => /^(next|nuxt|@sveltejs\/kit|@remix-run\/.+|express|fastify|koa|hono|@nestjs\/core)$/.test(d)) || /django|flask|fastapi|rails/i.test(pyproject ?? "");
1528
+ if ((docker && (data || webDeps)) || (data && webDeps) || deps.some((d) => /^(next|nuxt|@sveltejs\/kit|@remix-run\/.+)$/.test(d))) kinds.add("web-app");
1529
+ const manifest = (() => {
1530
+ try {
1531
+ return JSON.parse(readSoft(join(base, "manifest.json")) ?? "null");
1532
+ } catch {
1533
+ return null;
1534
+ }
1535
+ })();
1536
+ if (pkg?.engines?.vscode || manifest?.manifest_version || at("shopify.app.toml") || files.some((f) => /(^|\/)META-INF\/plugin\.xml$/.test(f) || f === "plugin.xml")) kinds.add("extension");
1537
+ if (files.some((f) => /(^|\/)(openapi|swagger)\.(ya?ml|json)$/.test(f))) kinds.add("api");
1538
+ if ((pkg?.style || (pkg?.keywords ?? []).some((k) => /^(css|ui|components|design-system)$/i.test(k)))) kinds.add("ui");
1539
+ if (at("index.html") || files.some((f) => f.endsWith(".html") && !f.includes("node_modules"))) kinds.add("site");
1540
+
1541
+ const htmls = files.filter((f) => f.endsWith(".html")).slice(0, 50);
1542
+ const usesLuz = deps.some((d) => d.startsWith("@luz-ds/")) || htmls.some((f) => (readSoft(join(base, f)) ?? "").includes("@luz-ds/"));
1543
+ // luz-money is for a project made with LUZ, not for LUZ itself: its packages are @luz-ds/*
1544
+ const corePkg = (() => {
1545
+ try {
1546
+ return JSON.parse(readSoft(join(base, "packages/core/package.json")) ?? "null");
1547
+ } catch {
1548
+ return null;
1549
+ }
1550
+ })();
1551
+ const luzItself = (typeof pkg?.name === "string" && pkg.name.startsWith("@luz-ds/")) || corePkg?.name === "@luz-ds/core";
1552
+
1553
+ // What the project already has to be paid
1554
+ const fundingText = readSoft(join(base, ".github/FUNDING.yml")) ?? readSoft(join(base, "FUNDING.yml"));
1555
+ const fundingYml = fundingText === null ? null : [...new Set(fundingText.split(/\r?\n/).map((l) => l.match(/^([a-z_]+)\s*:/)?.[1]).filter((k) => FUNDING_KEYS.has(k)))].sort();
1556
+ const readme = root.find((f) => /^README(\.[a-z]+)?$/i.test(f));
1557
+ const readmeSection = readme ? /^#{1,6}\s*(sponsor|backer|funding|donat|support the|patrocin)/im.test(readSoft(join(base, readme)) ?? "") : false;
1558
+ const funding = { fundingYml, packageJson: Boolean(pkg?.funding), files: root.filter((f) => /^(SPONSORS|BACKERS)\.md$/i.test(f)), readmeSection };
1559
+ const present = ROOT_FILES.flatMap((f) => (at(f) ? [f] : at(`.github/${f}`) ? [`.github/${f}`] : []));
1560
+ const contributingText = readSoft(join(base, "CONTRIBUTING.md")) ?? readSoft(join(base, ".github/CONTRIBUTING.md")) ?? "";
1561
+ const contributing = { cla: /Contributor License Agreement|\bCLA\b/.test(contributingText), dco: /Developer Certificate of Origin|\bDCO\b|Signed-off-by/.test(contributingText) };
1562
+
1563
+ return {
1564
+ dir: base,
1565
+ license,
1566
+ kinds: [...kinds].sort(),
1567
+ usesLuz,
1568
+ luzItself,
1569
+ funding,
1570
+ files: present,
1571
+ contributing,
1572
+ dependencies: { paidApis: deps.filter((d) => PAID_APIS.test(d)).sort(), payments: deps.filter((d) => PAYMENTS.test(d)).sort() },
1573
+ git: existsSync(join(base, ".git")),
1574
+ };
1575
+ }
1576
+
1577
+ function moneyText(f) {
1578
+ const l = f.license;
1579
+ const licence = l.spdx ? `${l.spdx} (${l.family}, ${l.osi ? "OSI" : "not OSI"})` : l.family === "unknown" ? `not recognised (${l.file})` : l.family === "proprietary" ? "proprietary (UNLICENSED or private)" : "none found";
1580
+ const has = [f.funding.fundingYml ? `.github/FUNDING.yml (${f.funding.fundingYml.join(", ") || "empty"})` : "", f.funding.packageJson ? "funding in package.json" : "", ...f.funding.files, f.funding.readmeSection ? "a sponsors section in the README" : ""].filter(Boolean);
1581
+ const out = [
1582
+ `money scan: ${f.dir}`,
1583
+ `licence: ${licence}${l.commercialFile ? "; a commercial licence file" : ""}${l.eeFolder ? "; an ee/ folder" : ""}`,
1584
+ `kinds: ${f.kinds.join(", ") || "none recognised"}; uses LUZ: ${f.usesLuz ? "yes" : "no"}`,
1585
+ ...(f.luzItself ? ["note: this is LUZ itself; luz-money is for a project made with LUZ"] : []),
1586
+ `funding: ${has.length ? has.join("; ") : "none yet"}`,
1587
+ `files: ${f.files.join(", ") || "none of SUPPORT, SECURITY, ROADMAP, GOVERNANCE, CONTRIBUTING"}${f.contributing.cla ? "; a CLA" : ""}${f.contributing.dco ? "; a DCO" : ""}`,
1588
+ `git: ${f.git ? "a repository (the authors: git shortlog -sn HEAD)" : "not a git repository"}`,
1589
+ "next: the luz-money skill reads these facts with --json and writes the report",
1590
+ ];
1591
+ return `${out.join("\n")}\n`;
1592
+ }
1593
+
1137
1594
  // ---- main -----------------------------------------------------------------------------------------------------
1138
1595
 
1139
1596
  /** A wrong use: the message first, and the table of commands only when the command itself is wrong. */
@@ -1162,7 +1619,7 @@ export function main(argv, { tty = Boolean(process.stdout.isTTY) } = {}) {
1162
1619
  const [command, ...rest] = argv;
1163
1620
  if (command === "--help" || command === "-h") return show(banner(tty) + HELP);
1164
1621
  if (!command) return usage("a command is missing (init, new, magic, site new, agents, skills, list, add, remove, agent, skill, facts, doctor or lint)", true);
1165
- if (!["init", "site", "agent", "skill", "facts", "doctor", "lint", "list", "remove"].includes(command)) return usage(`"${command}" is not a command (init, new, magic, site new, agents, skills, list, add, remove, agent, skill, facts, doctor, lint)`, true);
1622
+ if (!["init", "site", "agent", "skill", "facts", "doctor", "lint", "list", "remove", "shot", "money"].includes(command)) return usage(`"${command}" is not a command (init, new, magic, site new, agents, skills, list, add, remove, agent, skill, facts, doctor, lint, shot, money)`, true);
1166
1623
  let args;
1167
1624
  try {
1168
1625
  args = parseArgs({
@@ -1183,18 +1640,29 @@ export function main(argv, { tty = Boolean(process.stdout.isTTY) } = {}) {
1183
1640
  all: { type: "boolean" },
1184
1641
  for: { type: "string" },
1185
1642
  set: { type: "string", multiple: true },
1643
+ page: { type: "string" },
1644
+ click: { type: "string" },
1645
+ out: { type: "string" },
1186
1646
  },
1187
1647
  });
1188
1648
  } catch (error) {
1189
1649
  return usage(error.message);
1190
1650
  }
1191
1651
  const { values, positionals } = args;
1192
- for (const flag of ["dir", "target"]) {
1652
+ for (const flag of ["dir", "target", "out"]) {
1193
1653
  const v = values[flag];
1194
1654
  if (v !== undefined && (/[\r\n]/.test(v) || HIDDEN.test(v) || v.startsWith("-"))) return usage(`--${flag} is a path on one line, with no control or hidden character, and not starting with "-"`);
1195
1655
  }
1196
- if (values.help) return show({ init: HELP_INIT, site: HELP_SITE, agent: HELP_AGENT, skill: HELP_SKILL, facts: HELP_FACTS, doctor: HELP_DOCTOR, lint: HELP_LINT, list: HELP_LIST, remove: HELP_REMOVE }[command]);
1656
+ if (values.help) return show({ init: HELP_INIT, site: HELP_SITE, agent: HELP_AGENT, skill: HELP_SKILL, facts: HELP_FACTS, doctor: HELP_DOCTOR, lint: HELP_LINT, list: HELP_LIST, remove: HELP_REMOVE, shot: HELP_SHOT, money: HELP_MONEY }[command]);
1197
1657
  if (values.all && command !== "init") return usage("--all is only for init");
1658
+ if (command === "money") {
1659
+ if (positionals[0] !== "scan" || positionals.length > 1) return usage('"money" takes one word: scan');
1660
+ const base = resolve(values.dir ?? ".");
1661
+ if (!existsSync(base)) return usage(`${base} was not found`);
1662
+ const facts = runMoneyScan(base);
1663
+ process.stdout.write(values.json ? `${JSON.stringify(facts, null, 2)}\n` : moneyText(facts));
1664
+ return 0;
1665
+ }
1198
1666
  if (magic && !values.help) {
1199
1667
  if (values.force) return usage("magic never takes --force: it writes only into a folder that does not exist yet");
1200
1668
  if (!values.target) return usage("--target is missing: magic writes only into a folder that does not exist yet, so it needs the folder it will make. Example: luz-ai magic --name Acme --kind landing --stack vanilla --target ./acme");
@@ -1256,6 +1724,14 @@ export function main(argv, { tty = Boolean(process.stdout.isTTY) } = {}) {
1256
1724
  return 0;
1257
1725
  }
1258
1726
  if (command === "facts") return show(runFacts(values.json));
1727
+ if (command === "shot") {
1728
+ if (positionals.length) return usage("shot takes no word: use --target <folder>");
1729
+ return runShot(values).then(({ error, report }) => {
1730
+ if (error) return usage(error);
1731
+ process.stdout.write(values.json ? `${JSON.stringify(report, null, 2)}\n` : shotText(report));
1732
+ return 0;
1733
+ });
1734
+ }
1259
1735
  if (command === "lint" && values.target && !["portable", "claude"].includes(values.target)) return usage(`--target is portable or claude, not "${values.target}"`);
1260
1736
  if (command === "doctor" && positionals.length) return usage("doctor takes no path: use --dir <folder>");
1261
1737
 
@@ -1281,4 +1757,9 @@ const started = (() => {
1281
1757
  return false;
1282
1758
  }
1283
1759
  })();
1284
- if (started) process.exitCode = main(process.argv.slice(2));
1760
+ if (started) {
1761
+ // `shot` answers later (its server waits on the browser): its exit code arrives as a promise
1762
+ const code = main(process.argv.slice(2));
1763
+ if (code instanceof Promise) code.then((c) => (process.exitCode = c));
1764
+ else process.exitCode = code;
1765
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luz-ds/ai",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "LUZ Design System — the luz skill for AI assistants (Claude Code, Codex, Gemini CLI, Cursor): it asks what you want to make, writes a starter page that @luz-ds/check reads without a finding, and adds the agents and skills of luz-ai",
5
5
  "license": "MIT",
6
6
  "type": "module",