zen-code 4.5.0 → 4.6.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.
Files changed (37) hide show
  1. package/dist/MultiLineTextInput-B4NEXnFm.mjs +23343 -0
  2. package/dist/cli.mjs +44 -20
  3. package/dist/devtools-BHqoL8a6.mjs +11653 -0
  4. package/dist/graphBuilder-B3IJ7dB2.mjs +2641 -0
  5. package/dist/{index-BHwkVemt.mjs → index-DEcMgCTj.mjs} +1 -1
  6. package/dist/{memories-B8HqG014.mjs → memories-rSGKIPk5.mjs} +1 -1
  7. package/dist/metadata-XVTVXthy.mjs +6 -0
  8. package/dist/nonInteractive.mjs +7 -6
  9. package/dist/{subTasks-BTMXARkP.mjs → subTasks-5KLIr9iy.mjs} +47 -48
  10. package/dist/zen-code.mjs +8654 -2
  11. package/dist/zen-keyboard.mjs +7 -6
  12. package/package.json +7 -9
  13. package/dist/MultiLineTextInput-e7hD79Wp.mjs +0 -24631
  14. package/dist/app-DtYW5k3J.mjs +0 -16061
  15. package/dist/assets/worker-I4QjJYba.js +0 -1
  16. package/dist/checkpoint-1sAx_j1E-4BdN8r-w.mjs +0 -319
  17. package/dist/checkpoint-DxiUsHMy-BV-8KBKD.mjs +0 -394
  18. package/dist/chunk-YWE62C55-DID9N9eS.mjs +0 -193
  19. package/dist/devtools-CzaVuYnh.mjs +0 -2667
  20. package/dist/graphBuilder-B0bC88R_.mjs +0 -48756
  21. package/dist/id-Cu7CRpDw.mjs +0 -79
  22. package/dist/index-BUGHAUbY.mjs +0 -117
  23. package/dist/index-Bgm_TqjU.mjs +0 -212
  24. package/dist/index-C5j-48Ft.mjs +0 -75
  25. package/dist/index-CSvPIzA-.mjs +0 -464
  26. package/dist/index-DS5HVciX.mjs +0 -216
  27. package/dist/kysely-Bchvsze0.mjs +0 -4316
  28. package/dist/load-Cjl9cJ0o.mjs +0 -105
  29. package/dist/migrator-BatO36Tk.mjs +0 -592
  30. package/dist/pg-adapter-BFtir1GE-BU2H39HC.mjs +0 -62
  31. package/dist/postgres-dialect-DaHvQ_AZ.mjs +0 -211
  32. package/dist/queue-Bfg-8ehP-Lko1egu-.mjs +0 -106
  33. package/dist/remote-threads-CrG03ZS7-C9duTCnB.mjs +0 -157
  34. package/dist/shallow-DAx5vVov.mjs +0 -332
  35. package/dist/sql-CJsUpKEQ.mjs +0 -8106
  36. package/dist/sqlite-adapter-Bbonr5S5-DQLjfvyu.mjs +0 -68
  37. package/dist/zen-init.mjs +0 -1
@@ -1,105 +0,0 @@
1
- import { existsSync as S, readdirSync as _, lstatSync as L, statSync as v, readFileSync as I } from "node:fs";
2
- import { resolve as m, join as d } from "node:path";
3
- import { parse as b } from "yaml";
4
- const A = 10 * 1024 * 1024, E = 64, f = 1024;
5
- function g(t, o) {
6
- try {
7
- const n = m(t), s = m(o), e = n.substring(s.length);
8
- return n === s || e.startsWith("/") || e === "";
9
- } catch {
10
- return !1;
11
- }
12
- }
13
- function N(t, o) {
14
- return t ? t.length > E ? [!1, "name exceeds 64 characters"] : /^[a-z0-9]+(-[a-z0-9]+)*$/.test(t) ? t !== o ? [!1, `name '${t}' must match directory name '${o}'`] : [!0, ""] : [!1, "name must be lowercase alphanumeric with single hyphens only"] : [!1, "name is required"];
15
- }
16
- function x(t, o) {
17
- try {
18
- const n = v(t);
19
- if (n.size > A)
20
- return console.warn(`Skipping ${t}: file too large (${n.size} bytes)`), null;
21
- const s = I(t, "utf-8"), e = /^---\s*\n(.*?)\n---\s*\n/s, c = s.match(e);
22
- if (!c)
23
- return console.warn(`Skipping ${t}: no valid YAML frontmatter found`), null;
24
- const a = c[1];
25
- let r;
26
- try {
27
- r = b(a);
28
- } catch (w) {
29
- return console.warn(`Invalid YAML in ${t}: ${w}`), null;
30
- }
31
- if (typeof r != "object" || r === null)
32
- return console.warn(`Skipping ${t}: frontmatter is not a mapping`), null;
33
- const i = r.name, l = r.description;
34
- if (!i || !l)
35
- return console.warn(`Skipping ${t}: missing required 'name' or 'description'`), null;
36
- const p = t.split("/").slice(-2)[0], [$, h] = N(String(i), p);
37
- $ || console.warn(`Skill '${i}' in ${t} does not follow Agent Skills spec: ${h}. Consider renaming to be spec-compliant.`);
38
- let u = String(l);
39
- return u.length > f && (console.warn(`Description exceeds ${f} chars in ${t}, truncating`), u = u.substring(0, f)), {
40
- name: String(i),
41
- description: u,
42
- path: t,
43
- source: o,
44
- license: r.license,
45
- compatibility: r.compatibility,
46
- metadata: r.metadata,
47
- allowed_tools: r["allowed-tools"]
48
- };
49
- } catch (n) {
50
- return console.warn(`Error reading ${t}: ${n.message}`), null;
51
- }
52
- }
53
- function y(t, o) {
54
- if (!S(t))
55
- return [];
56
- let n;
57
- try {
58
- n = m(t);
59
- } catch {
60
- return [];
61
- }
62
- const s = [];
63
- let e;
64
- try {
65
- e = _(t);
66
- } catch {
67
- return [];
68
- }
69
- for (const c of e) {
70
- const a = d(t, c);
71
- if (!g(a, n))
72
- continue;
73
- let r;
74
- try {
75
- r = L(a);
76
- } catch {
77
- continue;
78
- }
79
- if (!r.isDirectory())
80
- continue;
81
- const i = d(a, "SKILL.md");
82
- if (!S(i) || !g(i, n))
83
- continue;
84
- const l = x(i, o);
85
- l && s.push(l);
86
- }
87
- return s;
88
- }
89
- function k(t, o) {
90
- const n = /* @__PURE__ */ new Map();
91
- if (t) {
92
- const s = y(t, "user");
93
- for (const e of s)
94
- n.set(e.name, e);
95
- }
96
- if (o) {
97
- const s = y(o, "project");
98
- for (const e of s)
99
- n.set(e.name, e);
100
- }
101
- return Array.from(n.values());
102
- }
103
- export {
104
- k as l
105
- };