zen-code 4.6.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 (33) hide show
  1. package/dist/MultiLineTextInput-B4NEXnFm.mjs +23343 -0
  2. package/dist/devtools-BHqoL8a6.mjs +11653 -0
  3. package/dist/graphBuilder-B3IJ7dB2.mjs +2641 -0
  4. package/dist/{index-B6kFMamn.mjs → index-DEcMgCTj.mjs} +1 -1
  5. package/dist/{memories-DirsFRdm.mjs → memories-rSGKIPk5.mjs} +1 -1
  6. package/dist/nonInteractive.mjs +7 -6
  7. package/dist/{subTasks-Bt97OwvY.mjs → subTasks-5KLIr9iy.mjs} +2 -2
  8. package/dist/zen-code.mjs +8654 -2
  9. package/dist/zen-keyboard.mjs +7 -6
  10. package/package.json +7 -9
  11. package/dist/MultiLineTextInput-e7hD79Wp.mjs +0 -24631
  12. package/dist/app-CM8R0ZR6.mjs +0 -16249
  13. package/dist/assets/worker-I4QjJYba.js +0 -1
  14. package/dist/checkpoint-1sAx_j1E-DrVPlSLR.mjs +0 -319
  15. package/dist/checkpoint-DxiUsHMy-Cjy5WGNC.mjs +0 -394
  16. package/dist/chunk-YWE62C55-DID9N9eS.mjs +0 -193
  17. package/dist/devtools-CzaVuYnh.mjs +0 -2667
  18. package/dist/graphBuilder-mpLrx9tk.mjs +0 -49189
  19. package/dist/index-BUGHAUbY.mjs +0 -117
  20. package/dist/index-C5j-48Ft.mjs +0 -75
  21. package/dist/index-ChCbbHFS.mjs +0 -463
  22. package/dist/index-DS5HVciX.mjs +0 -216
  23. package/dist/index-FHDPQ2Qk.mjs +0 -211
  24. package/dist/kysely-Bchvsze0.mjs +0 -4316
  25. package/dist/load-Cjl9cJ0o.mjs +0 -105
  26. package/dist/migrator-BatO36Tk.mjs +0 -592
  27. package/dist/pg-adapter-BFtir1GE-BU2H39HC.mjs +0 -62
  28. package/dist/postgres-dialect-DaHvQ_AZ.mjs +0 -211
  29. package/dist/queue-Cu_nO_wt-ChzSaooi.mjs +0 -106
  30. package/dist/remote-threads-CrG03ZS7-C9duTCnB.mjs +0 -157
  31. package/dist/shallow-tfhh5rlz.mjs +0 -331
  32. package/dist/sql-CJsUpKEQ.mjs +0 -8106
  33. package/dist/sqlite-adapter-BKOLSdoL-BlGKN04G.mjs +0 -71
@@ -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
- };