@g3nomaly/core 0.3.0 → 0.3.2

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 (247) hide show
  1. package/LICENSE +95 -0
  2. package/dist/cli/commands/add.d.ts +37 -0
  3. package/dist/cli/commands/add.d.ts.map +1 -0
  4. package/dist/cli/commands/add.js +99 -0
  5. package/dist/cli/commands/add.js.map +1 -0
  6. package/dist/cli/commands/conflict.d.ts +52 -0
  7. package/dist/cli/commands/conflict.d.ts.map +1 -0
  8. package/dist/cli/commands/conflict.js +88 -0
  9. package/dist/cli/commands/conflict.js.map +1 -0
  10. package/dist/cli/commands/installFromSources.d.ts +78 -0
  11. package/dist/cli/commands/installFromSources.d.ts.map +1 -0
  12. package/dist/cli/commands/installFromSources.js +187 -0
  13. package/dist/cli/commands/installFromSources.js.map +1 -0
  14. package/dist/cli/commands/ls.d.ts +26 -0
  15. package/dist/cli/commands/ls.d.ts.map +1 -0
  16. package/dist/cli/commands/ls.js +85 -0
  17. package/dist/cli/commands/ls.js.map +1 -0
  18. package/dist/cli/commands/remove.d.ts +19 -0
  19. package/dist/cli/commands/remove.d.ts.map +1 -0
  20. package/dist/cli/commands/remove.js +123 -0
  21. package/dist/cli/commands/remove.js.map +1 -0
  22. package/dist/cli/commands/sources.d.ts +69 -0
  23. package/dist/cli/commands/sources.d.ts.map +1 -0
  24. package/dist/cli/commands/sources.js +103 -0
  25. package/dist/cli/commands/sources.js.map +1 -0
  26. package/dist/cli/commands/update.d.ts +17 -0
  27. package/dist/cli/commands/update.d.ts.map +1 -0
  28. package/dist/cli/commands/update.js +110 -0
  29. package/dist/cli/commands/update.js.map +1 -0
  30. package/dist/cli/dialogue.d.ts +126 -0
  31. package/dist/cli/dialogue.d.ts.map +1 -0
  32. package/dist/cli/dialogue.js +156 -0
  33. package/dist/cli/dialogue.js.map +1 -0
  34. package/dist/cli/index.d.ts +19 -0
  35. package/dist/cli/index.d.ts.map +1 -0
  36. package/dist/cli/index.js +16 -0
  37. package/dist/cli/index.js.map +1 -0
  38. package/dist/cli/installDialogues.d.ts +23 -0
  39. package/dist/cli/installDialogues.d.ts.map +1 -0
  40. package/dist/cli/installDialogues.js +89 -0
  41. package/dist/cli/installDialogues.js.map +1 -0
  42. package/dist/cli/pick.d.ts +23 -0
  43. package/dist/cli/pick.d.ts.map +1 -0
  44. package/dist/cli/pick.js +44 -0
  45. package/dist/cli/pick.js.map +1 -0
  46. package/dist/cli/report.d.ts +58 -0
  47. package/dist/cli/report.d.ts.map +1 -0
  48. package/dist/cli/report.js +92 -0
  49. package/dist/cli/report.js.map +1 -0
  50. package/dist/cli/theme.d.ts +27 -0
  51. package/dist/cli/theme.d.ts.map +1 -0
  52. package/dist/cli/theme.js +29 -0
  53. package/dist/cli/theme.js.map +1 -0
  54. package/dist/cli/types.d.ts +96 -0
  55. package/dist/cli/types.d.ts.map +1 -0
  56. package/dist/cli/types.js +2 -0
  57. package/dist/cli/types.js.map +1 -0
  58. package/dist/config/config.d.ts +55 -0
  59. package/dist/config/config.d.ts.map +1 -0
  60. package/dist/config/config.js +107 -0
  61. package/dist/config/config.js.map +1 -0
  62. package/dist/config/index.d.ts +4 -0
  63. package/dist/config/index.d.ts.map +1 -0
  64. package/dist/config/index.js +3 -0
  65. package/dist/config/index.js.map +1 -0
  66. package/dist/config/types.d.ts +182 -0
  67. package/dist/config/types.d.ts.map +1 -0
  68. package/dist/config/types.js +51 -0
  69. package/dist/config/types.js.map +1 -0
  70. package/dist/hash/hash.d.ts +23 -0
  71. package/dist/hash/hash.d.ts.map +1 -0
  72. package/dist/hash/hash.js +43 -0
  73. package/dist/hash/hash.js.map +1 -0
  74. package/dist/hash/index.d.ts +2 -0
  75. package/dist/hash/index.d.ts.map +1 -0
  76. package/dist/hash/index.js +3 -0
  77. package/dist/hash/index.js.map +1 -0
  78. package/dist/index.d.ts +1 -0
  79. package/dist/index.d.ts.map +1 -0
  80. package/dist/index.js +3 -0
  81. package/dist/index.js.map +1 -0
  82. package/dist/installer/classify.d.ts +33 -0
  83. package/dist/installer/classify.d.ts.map +1 -0
  84. package/dist/installer/classify.js +82 -0
  85. package/dist/installer/classify.js.map +1 -0
  86. package/dist/installer/files.d.ts +19 -0
  87. package/dist/installer/files.d.ts.map +1 -0
  88. package/dist/installer/files.js +23 -0
  89. package/dist/installer/files.js.map +1 -0
  90. package/dist/installer/index.d.ts +19 -0
  91. package/dist/installer/index.d.ts.map +1 -0
  92. package/dist/installer/index.js +14 -0
  93. package/dist/installer/index.js.map +1 -0
  94. package/dist/installer/install.d.ts +25 -0
  95. package/dist/installer/install.d.ts.map +1 -0
  96. package/dist/installer/install.js +74 -0
  97. package/dist/installer/install.js.map +1 -0
  98. package/dist/installer/io.d.ts +9 -0
  99. package/dist/installer/io.d.ts.map +1 -0
  100. package/dist/installer/io.js +23 -0
  101. package/dist/installer/io.js.map +1 -0
  102. package/dist/installer/manifest.d.ts +69 -0
  103. package/dist/installer/manifest.d.ts.map +1 -0
  104. package/dist/installer/manifest.js +70 -0
  105. package/dist/installer/manifest.js.map +1 -0
  106. package/dist/installer/manifestSources.d.ts +32 -0
  107. package/dist/installer/manifestSources.d.ts.map +1 -0
  108. package/dist/installer/manifestSources.js +50 -0
  109. package/dist/installer/manifestSources.js.map +1 -0
  110. package/dist/installer/marketplace.d.ts +46 -0
  111. package/dist/installer/marketplace.d.ts.map +1 -0
  112. package/dist/installer/marketplace.js +72 -0
  113. package/dist/installer/marketplace.js.map +1 -0
  114. package/dist/installer/origin.d.ts +59 -0
  115. package/dist/installer/origin.d.ts.map +1 -0
  116. package/dist/installer/origin.js +29 -0
  117. package/dist/installer/origin.js.map +1 -0
  118. package/dist/installer/remove.d.ts +26 -0
  119. package/dist/installer/remove.d.ts.map +1 -0
  120. package/dist/installer/remove.js +49 -0
  121. package/dist/installer/remove.js.map +1 -0
  122. package/dist/installer/resolve.d.ts +127 -0
  123. package/dist/installer/resolve.d.ts.map +1 -0
  124. package/dist/installer/resolve.js +251 -0
  125. package/dist/installer/resolve.js.map +1 -0
  126. package/dist/installer/sourceRegistry.d.ts +96 -0
  127. package/dist/installer/sourceRegistry.d.ts.map +1 -0
  128. package/dist/installer/sourceRegistry.js +86 -0
  129. package/dist/installer/sourceRegistry.js.map +1 -0
  130. package/dist/installer/types.d.ts +133 -0
  131. package/dist/installer/types.d.ts.map +1 -0
  132. package/dist/installer/types.js +31 -0
  133. package/dist/installer/types.js.map +1 -0
  134. package/dist/registry/index.d.ts +8 -0
  135. package/dist/registry/index.d.ts.map +1 -0
  136. package/dist/registry/index.js +9 -0
  137. package/dist/registry/index.js.map +1 -0
  138. package/dist/registry/registry.handlers.d.ts +16 -0
  139. package/dist/registry/registry.handlers.d.ts.map +1 -0
  140. package/dist/registry/registry.handlers.js +13 -0
  141. package/dist/registry/registry.handlers.js.map +1 -0
  142. package/dist/registry/registry.io.d.ts +38 -0
  143. package/dist/registry/registry.io.d.ts.map +1 -0
  144. package/dist/registry/registry.io.js +101 -0
  145. package/dist/registry/registry.io.js.map +1 -0
  146. package/dist/registry/registry.mutations.d.ts +19 -0
  147. package/dist/registry/registry.mutations.d.ts.map +1 -0
  148. package/dist/registry/registry.mutations.js +29 -0
  149. package/dist/registry/registry.mutations.js.map +1 -0
  150. package/dist/registry/registry.selectors.d.ts +68 -0
  151. package/dist/registry/registry.selectors.d.ts.map +1 -0
  152. package/dist/registry/registry.selectors.js +91 -0
  153. package/dist/registry/registry.selectors.js.map +1 -0
  154. package/dist/registry/registry.store.d.ts +47 -0
  155. package/dist/registry/registry.store.d.ts.map +1 -0
  156. package/dist/registry/registry.store.js +36 -0
  157. package/dist/registry/registry.store.js.map +1 -0
  158. package/dist/registry/registry.template.d.ts +29 -0
  159. package/dist/registry/registry.template.d.ts.map +1 -0
  160. package/dist/registry/registry.template.js +70 -0
  161. package/dist/registry/registry.template.js.map +1 -0
  162. package/dist/registry/types.d.ts +47 -0
  163. package/dist/registry/types.d.ts.map +1 -0
  164. package/dist/registry/types.js +35 -0
  165. package/dist/registry/types.js.map +1 -0
  166. package/dist/security/index.d.ts +2 -0
  167. package/dist/security/index.d.ts.map +1 -0
  168. package/dist/security/index.js +3 -0
  169. package/dist/security/index.js.map +1 -0
  170. package/dist/security/securityParser.d.ts +15 -0
  171. package/dist/security/securityParser.d.ts.map +1 -0
  172. package/dist/security/securityParser.js +79 -0
  173. package/dist/security/securityParser.js.map +1 -0
  174. package/dist/security/securityWorker.d.ts +19 -0
  175. package/dist/security/securityWorker.d.ts.map +1 -0
  176. package/dist/security/securityWorker.js +137 -0
  177. package/dist/security/securityWorker.js.map +1 -0
  178. package/dist/sources/checkout.d.ts +20 -0
  179. package/dist/sources/checkout.d.ts.map +1 -0
  180. package/dist/sources/checkout.js +33 -0
  181. package/dist/sources/checkout.js.map +1 -0
  182. package/dist/sources/git.d.ts +11 -0
  183. package/dist/sources/git.d.ts.map +1 -0
  184. package/dist/sources/git.js +24 -0
  185. package/dist/sources/git.js.map +1 -0
  186. package/dist/sources/index.d.ts +5 -0
  187. package/dist/sources/index.d.ts.map +1 -0
  188. package/dist/sources/index.js +6 -0
  189. package/dist/sources/index.js.map +1 -0
  190. package/dist/sources/local.d.ts +12 -0
  191. package/dist/sources/local.d.ts.map +1 -0
  192. package/dist/sources/local.js +22 -0
  193. package/dist/sources/local.js.map +1 -0
  194. package/dist/sources/npm.d.ts +16 -0
  195. package/dist/sources/npm.d.ts.map +1 -0
  196. package/dist/sources/npm.js +162 -0
  197. package/dist/sources/npm.js.map +1 -0
  198. package/dist/sources/packageJson.d.ts +3 -0
  199. package/dist/sources/packageJson.d.ts.map +1 -0
  200. package/dist/sources/packageJson.js +13 -0
  201. package/dist/sources/packageJson.js.map +1 -0
  202. package/dist/sources/parse.d.ts +42 -0
  203. package/dist/sources/parse.d.ts.map +1 -0
  204. package/dist/sources/parse.js +114 -0
  205. package/dist/sources/parse.js.map +1 -0
  206. package/dist/sources/process.d.ts +21 -0
  207. package/dist/sources/process.d.ts.map +1 -0
  208. package/dist/sources/process.js +46 -0
  209. package/dist/sources/process.js.map +1 -0
  210. package/dist/sources/register.d.ts +31 -0
  211. package/dist/sources/register.d.ts.map +1 -0
  212. package/dist/sources/register.js +52 -0
  213. package/dist/sources/register.js.map +1 -0
  214. package/dist/sources/types.d.ts +108 -0
  215. package/dist/sources/types.d.ts.map +1 -0
  216. package/dist/sources/types.js +53 -0
  217. package/dist/sources/types.js.map +1 -0
  218. package/dist/utils/errors.d.ts +8 -0
  219. package/dist/utils/errors.d.ts.map +1 -0
  220. package/dist/utils/errors.js +11 -0
  221. package/dist/utils/errors.js.map +1 -0
  222. package/dist/utils/index.d.ts +7 -0
  223. package/dist/utils/index.d.ts.map +1 -0
  224. package/dist/utils/index.js +7 -0
  225. package/dist/utils/index.js.map +1 -0
  226. package/dist/utils/merge.d.ts +12 -0
  227. package/dist/utils/merge.d.ts.map +1 -0
  228. package/dist/utils/merge.js +28 -0
  229. package/dist/utils/merge.js.map +1 -0
  230. package/dist/utils/packageMeta.d.ts +26 -0
  231. package/dist/utils/packageMeta.d.ts.map +1 -0
  232. package/dist/utils/packageMeta.js +24 -0
  233. package/dist/utils/packageMeta.js.map +1 -0
  234. package/dist/utils/paths.d.ts +27 -0
  235. package/dist/utils/paths.d.ts.map +1 -0
  236. package/dist/utils/paths.js +51 -0
  237. package/dist/utils/paths.js.map +1 -0
  238. package/dist/utils/prompt.d.ts +8 -0
  239. package/dist/utils/prompt.d.ts.map +1 -0
  240. package/dist/utils/prompt.js +13 -0
  241. package/dist/utils/prompt.js.map +1 -0
  242. package/dist/utils/version.d.ts +14 -0
  243. package/dist/utils/version.d.ts.map +1 -0
  244. package/dist/utils/version.js +140 -0
  245. package/dist/utils/version.js.map +1 -0
  246. package/package.json +64 -3
  247. package/README.md +0 -3
@@ -0,0 +1,107 @@
1
+ // packages/core/src/config/config.ts
2
+ import { existsSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import { deepMerge } from "../utils/merge";
5
+ import { G3nConfigFileSchema, G3nConfigSchema, } from "./types";
6
+ if ("window" in globalThis) {
7
+ throw new Error("@g3nomaly/core config utilities are CLI-only");
8
+ }
9
+ // ---------------------------------------------------------------------------
10
+ // Path helper
11
+ // ---------------------------------------------------------------------------
12
+ const CONFIG_FILE = ".g3n.config.json";
13
+ /** Returns the path of `.g3n.config.json` inside a project root. */
14
+ export function getConfigPath(projectRoot) {
15
+ return join(projectRoot, CONFIG_FILE);
16
+ }
17
+ /**
18
+ * @brief Finds the directory that owns the project's `.g3n.config.json`: the nearest ancestor
19
+ * of `fromDir` holding the config file, else the root of the git repository containing `fromDir`.
20
+ *
21
+ * @param fromDir - Directory to search up from, the working directory by default.
22
+ * @returns The project root, or `null` outside a git repository when no config exists on the way up.
23
+ */
24
+ export function resolveProjectRoot(fromDir = process.cwd()) {
25
+ let dir = fromDir;
26
+ while (true) {
27
+ if (existsSync(join(dir, CONFIG_FILE)))
28
+ return dir;
29
+ if (existsSync(join(dir, ".git")))
30
+ return dir;
31
+ const parent = dirname(dir);
32
+ if (parent === dir)
33
+ return null;
34
+ dir = parent;
35
+ }
36
+ }
37
+ // ---------------------------------------------------------------------------
38
+ // Read
39
+ // ---------------------------------------------------------------------------
40
+ /**
41
+ * @brief Reads and validates `.g3n.config.json`, or returns an empty file view when it is missing.
42
+ *
43
+ * @returns The sections present on disk, none when the file is missing.
44
+ */
45
+ async function readConfigFile(projectRoot) {
46
+ const file = Bun.file(getConfigPath(projectRoot));
47
+ if (!(await file.exists()))
48
+ return {};
49
+ return G3nConfigFileSchema.parse(await file.json());
50
+ }
51
+ /**
52
+ * @brief Loads `.g3n.config.json` from the project root as a fully-defaulted view.
53
+ *
54
+ * Sections missing on disk read as their defaults.
55
+ *
56
+ * @returns The config with every section defaulted.
57
+ */
58
+ export async function loadConfig(projectRoot) {
59
+ return G3nConfigSchema.parse(await readConfigFile(projectRoot));
60
+ }
61
+ /**
62
+ * @brief Deep-merges updates into the existing config file and writes back to disk.
63
+ *
64
+ * Only sections already on disk or named in `updates` are written — a
65
+ * package's init never materializes another package's section.
66
+ *
67
+ * @param updates - Partial config to merge, with every key optional at every depth.
68
+ * @returns The saved config with every section defaulted.
69
+ */
70
+ export async function saveConfig(projectRoot, updates) {
71
+ const existing = await readConfigFile(projectRoot);
72
+ const merged = G3nConfigFileSchema.parse(deepMerge(existing, updates));
73
+ await Bun.write(getConfigPath(projectRoot), JSON.stringify(merged, null, 2));
74
+ return G3nConfigSchema.parse(merged);
75
+ }
76
+ // ---------------------------------------------------------------------------
77
+ // Section accessors
78
+ // ---------------------------------------------------------------------------
79
+ /**
80
+ * @brief Loads the `g3nui` section with its defaults applied.
81
+ *
82
+ * @returns The section, defaulted where missing on disk.
83
+ */
84
+ export async function loadG3nuiConfig(projectRoot) {
85
+ return (await loadConfig(projectRoot)).g3nui;
86
+ }
87
+ /**
88
+ * @brief Loads the `g3nerate` section with its defaults applied.
89
+ *
90
+ * @returns The section, defaulted where missing on disk.
91
+ */
92
+ export async function loadG3nerateConfig(projectRoot) {
93
+ return (await loadConfig(projectRoot)).g3nerate;
94
+ }
95
+ /**
96
+ * @brief Loads the `skills` section with its defaults applied.
97
+ *
98
+ * @returns The section, defaulted where missing on disk.
99
+ */
100
+ export async function loadSkillsConfig(projectRoot) {
101
+ return (await loadConfig(projectRoot)).skills;
102
+ }
103
+ /** Tells whether `.g3n.config.json` exists in a project root. */
104
+ export async function configExists(projectRoot) {
105
+ return Bun.file(getConfigPath(projectRoot)).exists();
106
+ }
107
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,eAAe,GA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@
1
+ export type { G3nuiSettings, G3nuiConfig, G3nerateSettings, G3nerateConfig, SkillTarget, SkillsInstallDirs, SkillsSettings, SkillsConfig, G3nConfigFile, G3nConfig, } from "./types";
2
+ export { G3nuiSettingsSchema, G3nuiConfigSchema, G3nerateSettingsSchema, G3nerateConfigSchema, SkillTargetSchema, SkillsInstallDirsSchema, SkillsSettingsSchema, SkillsConfigSchema, G3nConfigFileSchema, G3nConfigSchema, } from "./types";
3
+ export { getConfigPath, resolveProjectRoot, loadConfig, saveConfig, loadG3nuiConfig, loadG3nerateConfig, loadSkillsConfig, configExists, } from "./config";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,GACb,MAAM,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { G3nuiSettingsSchema, G3nuiConfigSchema, G3nerateSettingsSchema, G3nerateConfigSchema, SkillTargetSchema, SkillsInstallDirsSchema, SkillsSettingsSchema, SkillsConfigSchema, G3nConfigFileSchema, G3nConfigSchema, } from "./types";
2
+ export { getConfigPath, resolveProjectRoot, loadConfig, saveConfig, loadG3nuiConfig, loadG3nerateConfig, loadSkillsConfig, configExists, } from "./config";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,GACb,MAAM,UAAU,CAAC"}
@@ -0,0 +1,182 @@
1
+ import { z } from "zod";
2
+ export declare const G3nuiSettingsSchema: z.ZodObject<{
3
+ componentsDir: z.ZodDefault<z.ZodString>;
4
+ includeDebugFiles: z.ZodDefault<z.ZodBoolean>;
5
+ includeMetaFiles: z.ZodDefault<z.ZodBoolean>;
6
+ registeredPackages: z.ZodDefault<z.ZodArray<z.ZodString>>;
7
+ }, z.core.$strip>;
8
+ export declare const G3nuiConfigSchema: z.ZodObject<{
9
+ settings: z.ZodDefault<z.ZodObject<{
10
+ componentsDir: z.ZodDefault<z.ZodString>;
11
+ includeDebugFiles: z.ZodDefault<z.ZodBoolean>;
12
+ includeMetaFiles: z.ZodDefault<z.ZodBoolean>;
13
+ registeredPackages: z.ZodDefault<z.ZodArray<z.ZodString>>;
14
+ }, z.core.$strip>>;
15
+ }, z.core.$strip>;
16
+ export declare const G3nerateSettingsSchema: z.ZodObject<{
17
+ outputDir: z.ZodDefault<z.ZodString>;
18
+ }, z.core.$strip>;
19
+ export declare const G3nerateConfigSchema: z.ZodObject<{
20
+ settings: z.ZodDefault<z.ZodObject<{
21
+ outputDir: z.ZodDefault<z.ZodString>;
22
+ }, z.core.$strip>>;
23
+ }, z.core.$strip>;
24
+ export declare const SkillTargetSchema: z.ZodEnum<{
25
+ claude: "claude";
26
+ codex: "codex";
27
+ }>;
28
+ export declare const SkillsInstallDirsSchema: z.ZodObject<{
29
+ claude: z.ZodDefault<z.ZodString>;
30
+ codex: z.ZodDefault<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ export declare const SkillsSettingsSchema: z.ZodObject<{
33
+ filetreeRoot: z.ZodDefault<z.ZodString>;
34
+ targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
35
+ claude: "claude";
36
+ codex: "codex";
37
+ }>>>;
38
+ installDirs: z.ZodDefault<z.ZodObject<{
39
+ claude: z.ZodDefault<z.ZodString>;
40
+ codex: z.ZodDefault<z.ZodString>;
41
+ }, z.core.$strip>>;
42
+ }, z.core.$strip>;
43
+ export declare const SkillsConfigSchema: z.ZodObject<{
44
+ settings: z.ZodDefault<z.ZodObject<{
45
+ filetreeRoot: z.ZodDefault<z.ZodString>;
46
+ targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
47
+ claude: "claude";
48
+ codex: "codex";
49
+ }>>>;
50
+ installDirs: z.ZodDefault<z.ZodObject<{
51
+ claude: z.ZodDefault<z.ZodString>;
52
+ codex: z.ZodDefault<z.ZodString>;
53
+ }, z.core.$strip>>;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>;
56
+ /** What `.g3n.config.json` holds on disk: only the sections a package's init has written. */
57
+ export declare const G3nConfigFileSchema: z.ZodObject<{
58
+ g3nui: z.ZodOptional<z.ZodObject<{
59
+ settings: z.ZodDefault<z.ZodObject<{
60
+ componentsDir: z.ZodDefault<z.ZodString>;
61
+ includeDebugFiles: z.ZodDefault<z.ZodBoolean>;
62
+ includeMetaFiles: z.ZodDefault<z.ZodBoolean>;
63
+ registeredPackages: z.ZodDefault<z.ZodArray<z.ZodString>>;
64
+ }, z.core.$strip>>;
65
+ }, z.core.$strip>>;
66
+ g3nerate: z.ZodOptional<z.ZodObject<{
67
+ settings: z.ZodDefault<z.ZodObject<{
68
+ outputDir: z.ZodDefault<z.ZodString>;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>>;
71
+ skills: z.ZodOptional<z.ZodObject<{
72
+ settings: z.ZodDefault<z.ZodObject<{
73
+ filetreeRoot: z.ZodDefault<z.ZodString>;
74
+ targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
75
+ claude: "claude";
76
+ codex: "codex";
77
+ }>>>;
78
+ installDirs: z.ZodDefault<z.ZodObject<{
79
+ claude: z.ZodDefault<z.ZodString>;
80
+ codex: z.ZodDefault<z.ZodString>;
81
+ }, z.core.$strip>>;
82
+ }, z.core.$strip>>;
83
+ }, z.core.$strip>>;
84
+ }, z.core.$strip>;
85
+ /** The fully-defaulted view every consumer reads through `loadConfig`. */
86
+ export declare const G3nConfigSchema: z.ZodObject<{
87
+ g3nui: z.ZodDefault<z.ZodObject<{
88
+ settings: z.ZodDefault<z.ZodObject<{
89
+ componentsDir: z.ZodDefault<z.ZodString>;
90
+ includeDebugFiles: z.ZodDefault<z.ZodBoolean>;
91
+ includeMetaFiles: z.ZodDefault<z.ZodBoolean>;
92
+ registeredPackages: z.ZodDefault<z.ZodArray<z.ZodString>>;
93
+ }, z.core.$strip>>;
94
+ }, z.core.$strip>>;
95
+ g3nerate: z.ZodDefault<z.ZodObject<{
96
+ settings: z.ZodDefault<z.ZodObject<{
97
+ outputDir: z.ZodDefault<z.ZodString>;
98
+ }, z.core.$strip>>;
99
+ }, z.core.$strip>>;
100
+ skills: z.ZodDefault<z.ZodObject<{
101
+ settings: z.ZodDefault<z.ZodObject<{
102
+ filetreeRoot: z.ZodDefault<z.ZodString>;
103
+ targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
104
+ claude: "claude";
105
+ codex: "codex";
106
+ }>>>;
107
+ installDirs: z.ZodDefault<z.ZodObject<{
108
+ claude: z.ZodDefault<z.ZodString>;
109
+ codex: z.ZodDefault<z.ZodString>;
110
+ }, z.core.$strip>>;
111
+ }, z.core.$strip>>;
112
+ }, z.core.$strip>>;
113
+ }, z.core.$strip>;
114
+ /**
115
+ * @brief Settings of the `g3nui` section.
116
+ *
117
+ * @property componentsDir - Where components are installed in the user's project.
118
+ * @property includeDebugFiles - Whether to copy `.debug.ts` files alongside components.
119
+ * @property includeMetaFiles - Whether to copy `.meta.ts` files alongside components.
120
+ * @property registeredPackages - External package adapters to load, e.g. `["shadcn"]`.
121
+ */
122
+ export type G3nuiSettings = z.infer<typeof G3nuiSettingsSchema>;
123
+ /**
124
+ * @brief Config of the `g3nui` section.
125
+ *
126
+ * @property settings - Settings of the section, defaulted where missing on disk.
127
+ */
128
+ export type G3nuiConfig = z.infer<typeof G3nuiConfigSchema>;
129
+ /**
130
+ * @brief Settings of the `g3nerate` section.
131
+ *
132
+ * @property outputDir - Output directory for generated files.
133
+ */
134
+ export type G3nerateSettings = z.infer<typeof G3nerateSettingsSchema>;
135
+ /**
136
+ * @brief Config of the `g3nerate` section.
137
+ *
138
+ * @property settings - Settings of the section, defaulted where missing on disk.
139
+ */
140
+ export type G3nerateConfig = z.infer<typeof G3nerateConfigSchema>;
141
+ /**
142
+ * @brief Agent harness that skills are installed for: `claude` or `codex`.
143
+ */
144
+ export type SkillTarget = z.infer<typeof SkillTargetSchema>;
145
+ /**
146
+ * @brief Skill install directory per harness.
147
+ *
148
+ * @property claude - Skill install directory for Claude Code, relative to the project root.
149
+ * @property codex - Skill install directory for Codex, relative to the project root.
150
+ */
151
+ export type SkillsInstallDirs = z.infer<typeof SkillsInstallDirsSchema>;
152
+ /**
153
+ * @brief Settings of the `skills` section.
154
+ *
155
+ * @property filetreeRoot - Where the plan, phase and task tree lives, relative to the project root.
156
+ * @property targets - Agent harnesses skills are installed for.
157
+ * @property installDirs - Install directory per target; the skills.json registry sits next to each.
158
+ */
159
+ export type SkillsSettings = z.infer<typeof SkillsSettingsSchema>;
160
+ /**
161
+ * @brief Config of the `skills` section.
162
+ *
163
+ * @property settings - Settings of the section, defaulted where missing on disk.
164
+ */
165
+ export type SkillsConfig = z.infer<typeof SkillsConfigSchema>;
166
+ /**
167
+ * @brief Shape of `.g3n.config.json` on disk: only the sections a package's init has written.
168
+ *
169
+ * @property g3nui - The `g3nui` section, when written.
170
+ * @property g3nerate - The `g3nerate` section, when written.
171
+ * @property skills - The `skills` section, when written.
172
+ */
173
+ export type G3nConfigFile = z.infer<typeof G3nConfigFileSchema>;
174
+ /**
175
+ * @brief The fully-defaulted config every consumer reads through `loadConfig`.
176
+ *
177
+ * @property g3nui - The `g3nui` section.
178
+ * @property g3nerate - The `g3nerate` section.
179
+ * @property skills - The `skills` section.
180
+ */
181
+ export type G3nConfig = z.infer<typeof G3nConfigSchema>;
182
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,mBAAmB;;;;;iBAK9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;iBAE5B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;iBAE/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;EAA8B,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAI/B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;iBAE7B,CAAC;AAMH,6FAA6F;AAC7F,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI9B,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI1B,CAAC;AAMH;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAS,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAW,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACpE;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAM,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACzE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAW,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACpE;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAK,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAU,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACrE;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAS,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAa,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,51 @@
1
+ // packages/core/src/config/types.ts
2
+ import { z } from "zod";
3
+ // ---------------------------------------------------------------------------
4
+ // Per-package section schemas — settings only. Package metadata (version,
5
+ // description, license) lives in each package's package.json and is read at
6
+ // runtime via `readPackageMeta`, never persisted here.
7
+ // ---------------------------------------------------------------------------
8
+ export const G3nuiSettingsSchema = z.object({
9
+ componentsDir: z.string().default("src/components/ui"),
10
+ includeDebugFiles: z.boolean().default(false),
11
+ includeMetaFiles: z.boolean().default(false),
12
+ registeredPackages: z.array(z.string()).default([]),
13
+ });
14
+ export const G3nuiConfigSchema = z.object({
15
+ settings: G3nuiSettingsSchema.default(() => G3nuiSettingsSchema.parse({})),
16
+ });
17
+ export const G3nerateSettingsSchema = z.object({
18
+ outputDir: z.string().default("src/generated"),
19
+ });
20
+ export const G3nerateConfigSchema = z.object({
21
+ settings: G3nerateSettingsSchema.default(() => G3nerateSettingsSchema.parse({})),
22
+ });
23
+ export const SkillTargetSchema = z.enum(["claude", "codex"]);
24
+ export const SkillsInstallDirsSchema = z.object({
25
+ claude: z.string().default(".claude/skills"),
26
+ codex: z.string().default(".agents/skills"),
27
+ });
28
+ export const SkillsSettingsSchema = z.object({
29
+ filetreeRoot: z.string().default("docs/task-manager"),
30
+ targets: z.array(SkillTargetSchema).min(1).default(["claude"]),
31
+ installDirs: SkillsInstallDirsSchema.default(() => SkillsInstallDirsSchema.parse({})),
32
+ });
33
+ export const SkillsConfigSchema = z.object({
34
+ settings: SkillsSettingsSchema.default(() => SkillsSettingsSchema.parse({})),
35
+ });
36
+ // ---------------------------------------------------------------------------
37
+ // Root config schemas
38
+ // ---------------------------------------------------------------------------
39
+ /** What `.g3n.config.json` holds on disk: only the sections a package's init has written. */
40
+ export const G3nConfigFileSchema = z.object({
41
+ g3nui: G3nuiConfigSchema.optional(),
42
+ g3nerate: G3nerateConfigSchema.optional(),
43
+ skills: SkillsConfigSchema.optional(),
44
+ });
45
+ /** The fully-defaulted view every consumer reads through `loadConfig`. */
46
+ export const G3nConfigSchema = z.object({
47
+ g3nui: G3nuiConfigSchema.default(() => G3nuiConfigSchema.parse({})),
48
+ g3nerate: G3nerateConfigSchema.default(() => G3nerateConfigSchema.parse({})),
49
+ skills: SkillsConfigSchema.default(() => SkillsConfigSchema.parse({})),
50
+ });
51
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,0EAA0E;AAC1E,4EAA4E;AAC5E,uDAAuD;AACvD,8EAA8E;AAE9E,MAA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CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;CACzE,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @brief Hashes a file's contents using SHA-256.
3
+ *
4
+ * Uses Bun's native file API + Web Crypto — no external dependencies.
5
+ *
6
+ * @param filePath - Absolute or relative path to the file
7
+ * @returns Lowercase hex SHA-256 digest
8
+ */
9
+ export declare function hashFile(filePath: string): Promise<string>;
10
+ /**
11
+ * @brief Hashes an arbitrary string using SHA-256.
12
+ *
13
+ * Useful for hashing in-memory content before writing to disk.
14
+ *
15
+ * @param content - String to hash
16
+ * @returns Lowercase hex SHA-256 digest
17
+ */
18
+ export declare function hashString(content: string): Promise<string>;
19
+ /** Short (first 12 chars) SHA-256 hash of a file — for display purposes. */
20
+ export declare function hashFileShort(filePath: string): Promise<string>;
21
+ /** Short (first 12 chars) SHA-256 hash of a string — for display purposes. */
22
+ export declare function hashStringShort(content: string): Promise<string>;
23
+ //# sourceMappingURL=hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/hash/hash.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMhE;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMjE;AAED,4EAA4E;AAC5E,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAErE;AAED,8EAA8E;AAC9E,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtE"}
@@ -0,0 +1,43 @@
1
+ // packages/core/src/hash/hash.ts
2
+ if ("window" in globalThis) {
3
+ throw new Error("@g3nomaly/core hash utilities are CLI-only");
4
+ }
5
+ /**
6
+ * @brief Hashes a file's contents using SHA-256.
7
+ *
8
+ * Uses Bun's native file API + Web Crypto — no external dependencies.
9
+ *
10
+ * @param filePath - Absolute or relative path to the file
11
+ * @returns Lowercase hex SHA-256 digest
12
+ */
13
+ export async function hashFile(filePath) {
14
+ const file = Bun.file(filePath);
15
+ const buffer = await file.arrayBuffer();
16
+ const hashBuffer = await crypto.subtle.digest("SHA-256", buffer);
17
+ const hashArray = Array.from(new Uint8Array(hashBuffer));
18
+ return hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
19
+ }
20
+ /**
21
+ * @brief Hashes an arbitrary string using SHA-256.
22
+ *
23
+ * Useful for hashing in-memory content before writing to disk.
24
+ *
25
+ * @param content - String to hash
26
+ * @returns Lowercase hex SHA-256 digest
27
+ */
28
+ export async function hashString(content) {
29
+ const encoder = new TextEncoder();
30
+ const buffer = encoder.encode(content);
31
+ const hashBuffer = await crypto.subtle.digest("SHA-256", buffer);
32
+ const hashArray = Array.from(new Uint8Array(hashBuffer));
33
+ return hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
34
+ }
35
+ /** Short (first 12 chars) SHA-256 hash of a file — for display purposes. */
36
+ export async function hashFileShort(filePath) {
37
+ return (await hashFile(filePath)).substring(0, 12);
38
+ }
39
+ /** Short (first 12 chars) SHA-256 hash of a string — for display purposes. */
40
+ export async function hashStringShort(content) {
41
+ return (await hashString(content)).substring(0, 12);
42
+ }
43
+ //# sourceMappingURL=hash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.js","sourceRoot":"","sources":["../../src/hash/hash.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;IAC3B,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAgB;IAC7C,MAAM,IAAI,G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AACrD,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAe;IACnD,OAAO,CAAC,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { hashFile, hashString, hashFileShort, hashStringShort } from "./hash";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hash/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ // packages/core/src/hash/index.ts
2
+ export { hashFile, hashString, hashFileShort, hashStringShort } from "./hash";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hash/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // packages/core/src/index.ts
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,6BAA6B"}
@@ -0,0 +1,33 @@
1
+ import type { BaseFileEntry, BaseRegistryEntry } from "../registry/types";
2
+ import type { FileClassification, InstallerIO } from "./types";
3
+ /**
4
+ * @brief Maps each file path of a manifest entry to the hash it was installed with.
5
+ *
6
+ * @param entry - Manifest entry to read. `undefined` when the package was never installed.
7
+ * @returns `path → hash` map, e.g. `{ "SKILL.md": "a1b2" }`. Empty when no file has a hash.
8
+ */
9
+ export declare function recordedHashes(entry: Pick<BaseRegistryEntry, "files"> | undefined): Record<string, string>;
10
+ /**
11
+ * @brief Classifies one file against its copy on disk and the install-time record.
12
+ *
13
+ * @param file - Registry entry of the file. Its `hash` is the package's current hash, or `undefined` to resolve it.
14
+ * @param installDir - Absolute folder the package is installed into.
15
+ * @param recordedHash - Hash recorded in the user manifest at install time. `undefined` when never installed.
16
+ * @param io - Filesystem boundary used to test for the file and hash it.
17
+ * @param resolveLatestHash - Looks up the package hash when `file.hash` is not set.
18
+ * @returns Classification that `applyClassifications` consumes.
19
+ * @throws {Error} When `file` has no hash and no `resolveLatestHash` is given.
20
+ */
21
+ export declare function classifyFile<F extends BaseFileEntry>(file: F, installDir: string, recordedHash: string | undefined, io: InstallerIO, resolveLatestHash?: (file: F) => Promise<string>): Promise<FileClassification<F>>;
22
+ /**
23
+ * @brief Classifies every file in a registry entry, in the order given.
24
+ *
25
+ * @param files - Registry entries to classify.
26
+ * @param installDir - Absolute folder the package is installed into.
27
+ * @param recorded - Install-time hashes by file path, e.g. `{ "SKILL.md": "a1b2" }`. Missing paths were never installed.
28
+ * @param io - Filesystem boundary used to test for each file and hash it.
29
+ * @param resolveLatestHash - Looks up the package hash for files whose `hash` is not set.
30
+ * @returns One classification per file, in the same order.
31
+ */
32
+ export declare function classifyFiles<F extends BaseFileEntry>(files: readonly F[], installDir: string, recorded: Record<string, string | undefined>, io: InstallerIO, resolveLatestHash?: (file: F) => Promise<string>): Promise<FileClassification<F>[]>;
33
+ //# sourceMappingURL=classify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/installer/classify.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE9D;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM1G;AA6BD;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAAC,CAAC,SAAS,aAAa,EACxD,IAAI,EAAE,CAAC,EACP,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,EAAE,EAAE,WAAW,EACf,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,GAC/C,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAUhC;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,aAAa,EACzD,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAC5C,EAAE,EAAE,WAAW,EACf,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,GAC/C,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAMlC"}
@@ -0,0 +1,82 @@
1
+ // packages/core/src/installer/classify.ts
2
+ import path from "node:path";
3
+ import { FileState } from "./types";
4
+ /**
5
+ * @brief Maps each file path of a manifest entry to the hash it was installed with.
6
+ *
7
+ * @param entry - Manifest entry to read. `undefined` when the package was never installed.
8
+ * @returns `path → hash` map, e.g. `{ "SKILL.md": "a1b2" }`. Empty when no file has a hash.
9
+ */
10
+ export function recordedHashes(entry) {
11
+ const map = {};
12
+ for (const file of entry?.files ?? []) {
13
+ if (file.hash)
14
+ map[file.path] = file.hash;
15
+ }
16
+ return map;
17
+ }
18
+ /**
19
+ * @brief Decides a file's state from what is on disk, what was recorded and what the package ships now.
20
+ *
21
+ * @param exists - Whether the file is on disk.
22
+ * @param currentHash - Hash of the file on disk. `null` when it does not exist.
23
+ * @param recordedHash - Hash recorded at install time. `undefined` when the file was never installed.
24
+ * @param latestHash - Hash of the package's current version of the file.
25
+ * @returns State that decides whether the file is written, kept or flagged as a conflict.
26
+ */
27
+ function resolveState(exists, currentHash, recordedHash, latestHash) {
28
+ if (!exists)
29
+ return FileState.SafeUpdate;
30
+ if (recordedHash === undefined) {
31
+ return currentHash === latestHash ? FileState.UpToDate : FileState.Conflict;
32
+ }
33
+ const userModified = currentHash !== recordedHash;
34
+ const registryChanged = latestHash !== recordedHash;
35
+ if (!userModified && !registryChanged)
36
+ return FileState.UpToDate;
37
+ if (!userModified)
38
+ return FileState.SafeUpdate;
39
+ if (!registryChanged)
40
+ return FileState.UserOnly;
41
+ return FileState.Conflict;
42
+ }
43
+ /**
44
+ * @brief Classifies one file against its copy on disk and the install-time record.
45
+ *
46
+ * @param file - Registry entry of the file. Its `hash` is the package's current hash, or `undefined` to resolve it.
47
+ * @param installDir - Absolute folder the package is installed into.
48
+ * @param recordedHash - Hash recorded in the user manifest at install time. `undefined` when never installed.
49
+ * @param io - Filesystem boundary used to test for the file and hash it.
50
+ * @param resolveLatestHash - Looks up the package hash when `file.hash` is not set.
51
+ * @returns Classification that `applyClassifications` consumes.
52
+ * @throws {Error} When `file` has no hash and no `resolveLatestHash` is given.
53
+ */
54
+ export async function classifyFile(file, installDir, recordedHash, io, resolveLatestHash) {
55
+ const destPath = path.join(installDir, file.path);
56
+ const latestHash = file.hash ?? (await resolveLatestHash?.(file));
57
+ if (latestHash === undefined) {
58
+ throw new Error(`no hash for "${file.path}" and no resolveLatestHash provided`);
59
+ }
60
+ const exists = io.exists(destPath);
61
+ const currentHash = exists ? await io.hashFile(destPath) : null;
62
+ const state = resolveState(exists, currentHash, recordedHash, latestHash);
63
+ return { file, destPath, state, exists, currentHash, recordedHash, latestHash };
64
+ }
65
+ /**
66
+ * @brief Classifies every file in a registry entry, in the order given.
67
+ *
68
+ * @param files - Registry entries to classify.
69
+ * @param installDir - Absolute folder the package is installed into.
70
+ * @param recorded - Install-time hashes by file path, e.g. `{ "SKILL.md": "a1b2" }`. Missing paths were never installed.
71
+ * @param io - Filesystem boundary used to test for each file and hash it.
72
+ * @param resolveLatestHash - Looks up the package hash for files whose `hash` is not set.
73
+ * @returns One classification per file, in the same order.
74
+ */
75
+ export async function classifyFiles(files, installDir, recorded, io, resolveLatestHash) {
76
+ const classifications = [];
77
+ for (const file of files) {
78
+ classifications.push(await classifyFile(file, installDir, recorded[file.path], io, resolveLatestHash));
79
+ }
80
+ return classifications;
81
+ }
82
+ //# sourceMappingURL=classify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classify.js","sourceRoot":"","sources":["../../src/installer/classify.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnC;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAmD;IAChF,MAAM,GAAG,GAA2B,EAAE,CAAA;IACtC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC;QACtC,IAAI,IAAI,CAAC,IAAI;YAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAA;IAC3C,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,YAAY,CACnB,MAAe,EACf,WAA0B,EAC1B,YAAgC,EAChC,UAAkB;IAElB,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC,UAAU,CAAA;IACxC,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CA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,EAAE,YAAY,EAAE,UAAU,EAAE,CAAA;AACjF,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,KAAmB,EACnB,UAAkB,EAClB,QAA4C,EAC5C,EAAe,EACf,iBAAgD;IAEhD,MAAM,eAAe,GAA4B,EAAE,CAAA;IACnD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,eAAe,CAAC,IAAI,CAAC,MAAM,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAA;IACxG,CAAC;IACD,OAAO,eAAe,CAAA;AACxB,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @brief What `listFiles` leaves out. `node_modules` and `.git` are always skipped.
3
+ *
4
+ * @property skipDirs - Folder names, or folder paths relative to the listed root, e.g. `tests` or `.claude-plugin/types`.
5
+ * @property skipFiles - Tested against each file name, e.g. `/\.test\.tsx?$/`.
6
+ */
7
+ export interface FileFilter {
8
+ skipDirs?: readonly string[];
9
+ skipFiles?: RegExp;
10
+ }
11
+ /**
12
+ * @brief Lists every file below a folder, leaving out the folders and files `filter` names.
13
+ *
14
+ * @param dir - Absolute folder to list.
15
+ * @param filter - Folders and files to skip.
16
+ * @returns Paths relative to `dir`, sorted.
17
+ */
18
+ export declare function listFiles(dir: string, filter?: FileFilter): string[];
19
+ //# sourceMappingURL=files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/installer/files.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAG,SAAS,MAAM,EAAE,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,UAAe,GAAG,MAAM,EAAE,CAUxE"}