@xemahq/xema 0.13.0 → 0.15.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 (564) hide show
  1. package/README.md +90 -21
  2. package/dist/assets/appliance-base/distribution.lock.json +5144 -0
  3. package/dist/assets/appliance-base/images.lock.json +1706 -0
  4. package/dist/assets/appliance-lean/distribution.lock.json +2888 -0
  5. package/dist/assets/appliance-lean/images.lock.json +1229 -0
  6. package/dist/assets/boot-graph.json +380 -28
  7. package/dist/assets/cloud/distribution.lock.json +5278 -0
  8. package/dist/assets/cloud/images.lock.json +1713 -0
  9. package/dist/assets/core/distribution.lock.json +2401 -354
  10. package/dist/assets/core/images.lock.json +1208 -268
  11. package/dist/assets/distribution-assets.manifest.json +147 -0
  12. package/dist/assets/keycloak/realm-xema.json +412 -0
  13. package/dist/assets/minimal/distribution.lock.json +2710 -0
  14. package/dist/assets/minimal/images.lock.json +1149 -0
  15. package/dist/assets/oss/distribution.lock.json +3742 -494
  16. package/dist/assets/oss/images.lock.json +1591 -472
  17. package/dist/assets/starter/distribution.lock.json +3422 -0
  18. package/dist/assets/starter/images.lock.json +1404 -0
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +40 -1
  21. package/dist/cli.js.map +1 -1
  22. package/dist/commands/apply.d.ts.map +1 -1
  23. package/dist/commands/apply.js +2 -2
  24. package/dist/commands/apply.js.map +1 -1
  25. package/dist/commands/biome-dev.d.ts +3 -0
  26. package/dist/commands/biome-dev.d.ts.map +1 -0
  27. package/dist/commands/biome-dev.js +176 -0
  28. package/dist/commands/biome-dev.js.map +1 -0
  29. package/dist/commands/biome-validate.d.ts +10 -0
  30. package/dist/commands/biome-validate.d.ts.map +1 -0
  31. package/dist/commands/biome-validate.js +49 -0
  32. package/dist/commands/biome-validate.js.map +1 -0
  33. package/dist/commands/biome.d.ts.map +1 -1
  34. package/dist/commands/biome.js +437 -26
  35. package/dist/commands/biome.js.map +1 -1
  36. package/dist/commands/canopy.d.ts +3 -0
  37. package/dist/commands/canopy.d.ts.map +1 -0
  38. package/dist/commands/canopy.js +214 -0
  39. package/dist/commands/canopy.js.map +1 -0
  40. package/dist/commands/config.d.ts +3 -0
  41. package/dist/commands/config.d.ts.map +1 -0
  42. package/dist/commands/config.js +78 -0
  43. package/dist/commands/config.js.map +1 -0
  44. package/dist/commands/dev.d.ts.map +1 -1
  45. package/dist/commands/dev.js +92 -20
  46. package/dist/commands/dev.js.map +1 -1
  47. package/dist/commands/dist.d.ts +13 -0
  48. package/dist/commands/dist.d.ts.map +1 -1
  49. package/dist/commands/dist.js +51 -11
  50. package/dist/commands/dist.js.map +1 -1
  51. package/dist/commands/doctor.d.ts +25 -0
  52. package/dist/commands/doctor.d.ts.map +1 -1
  53. package/dist/commands/doctor.js +422 -18
  54. package/dist/commands/doctor.js.map +1 -1
  55. package/dist/commands/down.d.ts +10 -0
  56. package/dist/commands/down.d.ts.map +1 -1
  57. package/dist/commands/down.js +107 -33
  58. package/dist/commands/down.js.map +1 -1
  59. package/dist/commands/export.js +1 -1
  60. package/dist/commands/export.js.map +1 -1
  61. package/dist/commands/import.d.ts.map +1 -1
  62. package/dist/commands/import.js +2 -2
  63. package/dist/commands/import.js.map +1 -1
  64. package/dist/commands/init.d.ts.map +1 -1
  65. package/dist/commands/init.js +56 -3
  66. package/dist/commands/init.js.map +1 -1
  67. package/dist/commands/installation.d.ts +3 -0
  68. package/dist/commands/installation.d.ts.map +1 -0
  69. package/dist/commands/installation.js +258 -0
  70. package/dist/commands/installation.js.map +1 -0
  71. package/dist/commands/license.d.ts +3 -0
  72. package/dist/commands/license.d.ts.map +1 -0
  73. package/dist/commands/license.js +97 -0
  74. package/dist/commands/license.js.map +1 -0
  75. package/dist/commands/login.d.ts +4 -0
  76. package/dist/commands/login.d.ts.map +1 -0
  77. package/dist/commands/login.js +127 -0
  78. package/dist/commands/login.js.map +1 -0
  79. package/dist/commands/logs.d.ts +21 -0
  80. package/dist/commands/logs.d.ts.map +1 -1
  81. package/dist/commands/logs.js +133 -32
  82. package/dist/commands/logs.js.map +1 -1
  83. package/dist/commands/objects.d.ts.map +1 -1
  84. package/dist/commands/objects.js +85 -6
  85. package/dist/commands/objects.js.map +1 -1
  86. package/dist/commands/plan.d.ts.map +1 -1
  87. package/dist/commands/plan.js +2 -2
  88. package/dist/commands/plan.js.map +1 -1
  89. package/dist/commands/run.d.ts.map +1 -1
  90. package/dist/commands/run.js +61 -9
  91. package/dist/commands/run.js.map +1 -1
  92. package/dist/commands/serve.d.ts.map +1 -1
  93. package/dist/commands/serve.js +67 -14
  94. package/dist/commands/serve.js.map +1 -1
  95. package/dist/commands/shell.d.ts.map +1 -1
  96. package/dist/commands/shell.js +190 -6
  97. package/dist/commands/shell.js.map +1 -1
  98. package/dist/commands/source.d.ts +3 -0
  99. package/dist/commands/source.d.ts.map +1 -0
  100. package/dist/commands/source.js +120 -0
  101. package/dist/commands/source.js.map +1 -0
  102. package/dist/commands/status.d.ts.map +1 -1
  103. package/dist/commands/status.js +29 -3
  104. package/dist/commands/status.js.map +1 -1
  105. package/dist/commands/up.d.ts.map +1 -1
  106. package/dist/commands/up.js +70 -5
  107. package/dist/commands/up.js.map +1 -1
  108. package/dist/dev/env-defaults.d.ts +1 -0
  109. package/dist/dev/env-defaults.d.ts.map +1 -1
  110. package/dist/dev/env-defaults.js +24 -12
  111. package/dist/dev/env-defaults.js.map +1 -1
  112. package/dist/dev/forked-worker-bootstrap-protocol.d.ts +17 -0
  113. package/dist/dev/forked-worker-bootstrap-protocol.d.ts.map +1 -0
  114. package/dist/dev/forked-worker-bootstrap-protocol.js +35 -0
  115. package/dist/dev/forked-worker-bootstrap-protocol.js.map +1 -0
  116. package/dist/dev/forked-worker-bootstrap.d.ts +18 -0
  117. package/dist/dev/forked-worker-bootstrap.d.ts.map +1 -0
  118. package/dist/dev/forked-worker-bootstrap.js +84 -0
  119. package/dist/dev/forked-worker-bootstrap.js.map +1 -0
  120. package/dist/dev/forked-worker.d.ts +29 -0
  121. package/dist/dev/forked-worker.d.ts.map +1 -1
  122. package/dist/dev/forked-worker.js +267 -42
  123. package/dist/dev/forked-worker.js.map +1 -1
  124. package/dist/dev/opa-policies.d.ts +3 -0
  125. package/dist/dev/opa-policies.d.ts.map +1 -0
  126. package/dist/dev/opa-policies.js +64 -0
  127. package/dist/dev/opa-policies.js.map +1 -0
  128. package/dist/lib/cli-errors.d.ts +7 -0
  129. package/dist/lib/cli-errors.d.ts.map +1 -0
  130. package/dist/lib/cli-errors.js +30 -0
  131. package/dist/lib/cli-errors.js.map +1 -0
  132. package/dist/lib/control-plane.d.ts +5 -1
  133. package/dist/lib/control-plane.d.ts.map +1 -1
  134. package/dist/lib/control-plane.js +61 -8
  135. package/dist/lib/control-plane.js.map +1 -1
  136. package/dist/lib/exit-codes.d.ts +3 -4
  137. package/dist/lib/exit-codes.d.ts.map +1 -1
  138. package/dist/lib/exit-codes.js +3 -4
  139. package/dist/lib/exit-codes.js.map +1 -1
  140. package/dist/lib/http-error.d.ts +2 -0
  141. package/dist/lib/http-error.d.ts.map +1 -0
  142. package/dist/lib/http-error.js +51 -0
  143. package/dist/lib/http-error.js.map +1 -0
  144. package/dist/lib/roster-profile.d.ts +10 -0
  145. package/dist/lib/roster-profile.d.ts.map +1 -0
  146. package/dist/lib/roster-profile.js +44 -0
  147. package/dist/lib/roster-profile.js.map +1 -0
  148. package/dist/runtime/asset-provenance.d.ts +17 -0
  149. package/dist/runtime/asset-provenance.d.ts.map +1 -0
  150. package/dist/runtime/asset-provenance.js +29 -0
  151. package/dist/runtime/asset-provenance.js.map +1 -0
  152. package/dist/runtime/auth/client-bootstrap.d.ts +11 -0
  153. package/dist/runtime/auth/client-bootstrap.d.ts.map +1 -0
  154. package/dist/runtime/auth/client-bootstrap.js +60 -0
  155. package/dist/runtime/auth/client-bootstrap.js.map +1 -0
  156. package/dist/runtime/auth/device-flow.d.ts +43 -0
  157. package/dist/runtime/auth/device-flow.d.ts.map +1 -0
  158. package/dist/runtime/auth/device-flow.js +201 -0
  159. package/dist/runtime/auth/device-flow.js.map +1 -0
  160. package/dist/runtime/auth/session-auth.d.ts +8 -0
  161. package/dist/runtime/auth/session-auth.d.ts.map +1 -0
  162. package/dist/runtime/auth/session-auth.js +43 -0
  163. package/dist/runtime/auth/session-auth.js.map +1 -0
  164. package/dist/runtime/auth/session-store.d.ts +19 -0
  165. package/dist/runtime/auth/session-store.d.ts.map +1 -0
  166. package/dist/runtime/auth/session-store.js +83 -0
  167. package/dist/runtime/auth/session-store.js.map +1 -0
  168. package/dist/runtime/auth/token-claims.d.ts +2 -0
  169. package/dist/runtime/auth/token-claims.d.ts.map +1 -0
  170. package/dist/runtime/auth/token-claims.js +45 -0
  171. package/dist/runtime/auth/token-claims.js.map +1 -0
  172. package/dist/runtime/biome-dev.d.ts +28 -0
  173. package/dist/runtime/biome-dev.d.ts.map +1 -0
  174. package/dist/runtime/biome-dev.js +131 -0
  175. package/dist/runtime/biome-dev.js.map +1 -0
  176. package/dist/runtime/biome-local-install.d.ts +29 -0
  177. package/dist/runtime/biome-local-install.d.ts.map +1 -0
  178. package/dist/runtime/biome-local-install.js +243 -0
  179. package/dist/runtime/biome-local-install.js.map +1 -0
  180. package/dist/runtime/biome-provenance.d.ts +26 -0
  181. package/dist/runtime/biome-provenance.d.ts.map +1 -0
  182. package/dist/runtime/biome-provenance.js +70 -0
  183. package/dist/runtime/biome-provenance.js.map +1 -0
  184. package/dist/runtime/biome-publish.d.ts +48 -0
  185. package/dist/runtime/biome-publish.d.ts.map +1 -0
  186. package/dist/runtime/biome-publish.js +278 -0
  187. package/dist/runtime/biome-publish.js.map +1 -0
  188. package/dist/runtime/biome-scaffold.d.ts +35 -0
  189. package/dist/runtime/biome-scaffold.d.ts.map +1 -0
  190. package/dist/runtime/biome-scaffold.js +151 -0
  191. package/dist/runtime/biome-scaffold.js.map +1 -0
  192. package/dist/runtime/biome-validate.d.ts +28 -0
  193. package/dist/runtime/biome-validate.d.ts.map +1 -0
  194. package/dist/runtime/biome-validate.js +452 -0
  195. package/dist/runtime/biome-validate.js.map +1 -0
  196. package/dist/runtime/boot-graph-loader.d.ts +1 -0
  197. package/dist/runtime/boot-graph-loader.d.ts.map +1 -1
  198. package/dist/runtime/boot-graph-loader.js +99 -7
  199. package/dist/runtime/boot-graph-loader.js.map +1 -1
  200. package/dist/runtime/canopy-refs.d.ts +8 -0
  201. package/dist/runtime/canopy-refs.d.ts.map +1 -0
  202. package/dist/runtime/canopy-refs.js +51 -0
  203. package/dist/runtime/canopy-refs.js.map +1 -0
  204. package/dist/runtime/canopy-replies.d.ts +14 -0
  205. package/dist/runtime/canopy-replies.d.ts.map +1 -0
  206. package/dist/runtime/canopy-replies.js +39 -0
  207. package/dist/runtime/canopy-replies.js.map +1 -0
  208. package/dist/runtime/capability-invoke.d.ts +35 -0
  209. package/dist/runtime/capability-invoke.d.ts.map +1 -0
  210. package/dist/runtime/capability-invoke.js +119 -0
  211. package/dist/runtime/capability-invoke.js.map +1 -0
  212. package/dist/runtime/cleanup.d.ts +10 -0
  213. package/dist/runtime/cleanup.d.ts.map +1 -0
  214. package/dist/runtime/cleanup.js +35 -0
  215. package/dist/runtime/cleanup.js.map +1 -0
  216. package/dist/runtime/config/dev-mode.d.ts +8 -0
  217. package/dist/runtime/config/dev-mode.d.ts.map +1 -0
  218. package/dist/runtime/config/dev-mode.js +84 -0
  219. package/dist/runtime/config/dev-mode.js.map +1 -0
  220. package/dist/runtime/config/init-presets.d.ts +1 -1
  221. package/dist/runtime/config/init-presets.d.ts.map +1 -1
  222. package/dist/runtime/config/init-presets.js +68 -13
  223. package/dist/runtime/config/init-presets.js.map +1 -1
  224. package/dist/runtime/config/loader.d.ts +1 -0
  225. package/dist/runtime/config/loader.d.ts.map +1 -1
  226. package/dist/runtime/config/loader.js +41 -5
  227. package/dist/runtime/config/loader.js.map +1 -1
  228. package/dist/runtime/config/schema.d.ts +27 -12
  229. package/dist/runtime/config/schema.d.ts.map +1 -1
  230. package/dist/runtime/config/schema.js +113 -8
  231. package/dist/runtime/config/schema.js.map +1 -1
  232. package/dist/runtime/config/sources-config.d.ts +14 -0
  233. package/dist/runtime/config/sources-config.d.ts.map +1 -0
  234. package/dist/runtime/config/sources-config.js +79 -0
  235. package/dist/runtime/config/sources-config.js.map +1 -0
  236. package/dist/runtime/distribution/available-biome.d.ts.map +1 -1
  237. package/dist/runtime/distribution/available-biome.js +2 -0
  238. package/dist/runtime/distribution/available-biome.js.map +1 -1
  239. package/dist/runtime/distribution/compose.d.ts +2 -1
  240. package/dist/runtime/distribution/compose.d.ts.map +1 -1
  241. package/dist/runtime/distribution/compose.js +4 -1
  242. package/dist/runtime/distribution/compose.js.map +1 -1
  243. package/dist/runtime/env-seeder.d.ts +5 -0
  244. package/dist/runtime/env-seeder.d.ts.map +1 -1
  245. package/dist/runtime/env-seeder.js +152 -19
  246. package/dist/runtime/env-seeder.js.map +1 -1
  247. package/dist/runtime/foreground.d.ts +9 -0
  248. package/dist/runtime/foreground.d.ts.map +1 -1
  249. package/dist/runtime/foreground.js +37 -3
  250. package/dist/runtime/foreground.js.map +1 -1
  251. package/dist/runtime/infra/infra-catalog.d.ts +34 -1
  252. package/dist/runtime/infra/infra-catalog.d.ts.map +1 -1
  253. package/dist/runtime/infra/infra-catalog.js +202 -10
  254. package/dist/runtime/infra/infra-catalog.js.map +1 -1
  255. package/dist/runtime/infra/infra-environment.d.ts +10 -0
  256. package/dist/runtime/infra/infra-environment.d.ts.map +1 -0
  257. package/dist/runtime/infra/infra-environment.js +76 -0
  258. package/dist/runtime/infra/infra-environment.js.map +1 -0
  259. package/dist/runtime/infra/infra-plan.d.ts +2 -1
  260. package/dist/runtime/infra/infra-plan.d.ts.map +1 -1
  261. package/dist/runtime/infra/infra-plan.js +10 -0
  262. package/dist/runtime/infra/infra-plan.js.map +1 -1
  263. package/dist/runtime/infra/infra-runner.d.ts +16 -1
  264. package/dist/runtime/infra/infra-runner.d.ts.map +1 -1
  265. package/dist/runtime/infra/infra-runner.js +245 -55
  266. package/dist/runtime/infra/infra-runner.js.map +1 -1
  267. package/dist/runtime/infra/keycloak-realm.d.ts +25 -0
  268. package/dist/runtime/infra/keycloak-realm.d.ts.map +1 -0
  269. package/dist/runtime/infra/keycloak-realm.js +116 -0
  270. package/dist/runtime/infra/keycloak-realm.js.map +1 -0
  271. package/dist/runtime/infra/postgres-endpoint.d.ts +8 -0
  272. package/dist/runtime/infra/postgres-endpoint.d.ts.map +1 -0
  273. package/dist/runtime/infra/postgres-endpoint.js +21 -0
  274. package/dist/runtime/infra/postgres-endpoint.js.map +1 -0
  275. package/dist/runtime/installation/compiler.d.ts +114 -0
  276. package/dist/runtime/installation/compiler.d.ts.map +1 -0
  277. package/dist/runtime/installation/compiler.js +456 -0
  278. package/dist/runtime/installation/compiler.js.map +1 -0
  279. package/dist/runtime/installation/contract.d.ts +296 -0
  280. package/dist/runtime/installation/contract.d.ts.map +1 -0
  281. package/dist/runtime/installation/contract.js +504 -0
  282. package/dist/runtime/installation/contract.js.map +1 -0
  283. package/dist/runtime/installation/current-launcher-renderer.d.ts +12 -0
  284. package/dist/runtime/installation/current-launcher-renderer.d.ts.map +1 -0
  285. package/dist/runtime/installation/current-launcher-renderer.js +123 -0
  286. package/dist/runtime/installation/current-launcher-renderer.js.map +1 -0
  287. package/dist/runtime/installation/diagnostics.d.ts +16 -0
  288. package/dist/runtime/installation/diagnostics.d.ts.map +1 -0
  289. package/dist/runtime/installation/diagnostics.js +21 -0
  290. package/dist/runtime/installation/diagnostics.js.map +1 -0
  291. package/dist/runtime/installation/diff.d.ts +32 -0
  292. package/dist/runtime/installation/diff.d.ts.map +1 -0
  293. package/dist/runtime/installation/diff.js +136 -0
  294. package/dist/runtime/installation/diff.js.map +1 -0
  295. package/dist/runtime/installation/format.d.ts +3 -0
  296. package/dist/runtime/installation/format.d.ts.map +1 -0
  297. package/dist/runtime/installation/format.js +22 -0
  298. package/dist/runtime/installation/format.js.map +1 -0
  299. package/dist/runtime/installation/from-current-config.d.ts +9 -0
  300. package/dist/runtime/installation/from-current-config.d.ts.map +1 -0
  301. package/dist/runtime/installation/from-current-config.js +245 -0
  302. package/dist/runtime/installation/from-current-config.js.map +1 -0
  303. package/dist/runtime/installation/helm-release-readiness.d.ts +9 -0
  304. package/dist/runtime/installation/helm-release-readiness.d.ts.map +1 -0
  305. package/dist/runtime/installation/helm-release-readiness.js +97 -0
  306. package/dist/runtime/installation/helm-release-readiness.js.map +1 -0
  307. package/dist/runtime/installation/helm-release.d.ts +24 -0
  308. package/dist/runtime/installation/helm-release.d.ts.map +1 -0
  309. package/dist/runtime/installation/helm-release.js +96 -0
  310. package/dist/runtime/installation/helm-release.js.map +1 -0
  311. package/dist/runtime/installation/index.d.ts +22 -0
  312. package/dist/runtime/installation/index.d.ts.map +1 -0
  313. package/dist/runtime/installation/index.js +38 -0
  314. package/dist/runtime/installation/index.js.map +1 -0
  315. package/dist/runtime/installation/json-schema.d.ts +4 -0
  316. package/dist/runtime/installation/json-schema.d.ts.map +1 -0
  317. package/dist/runtime/installation/json-schema.js +16 -0
  318. package/dist/runtime/installation/json-schema.js.map +1 -0
  319. package/dist/runtime/installation/kubernetes-readiness.d.ts +60 -0
  320. package/dist/runtime/installation/kubernetes-readiness.d.ts.map +1 -0
  321. package/dist/runtime/installation/kubernetes-readiness.js +384 -0
  322. package/dist/runtime/installation/kubernetes-readiness.js.map +1 -0
  323. package/dist/runtime/installation/lifecycle.d.ts +25 -0
  324. package/dist/runtime/installation/lifecycle.d.ts.map +1 -0
  325. package/dist/runtime/installation/lifecycle.js +157 -0
  326. package/dist/runtime/installation/lifecycle.js.map +1 -0
  327. package/dist/runtime/installation/readiness-proof.d.ts +72 -0
  328. package/dist/runtime/installation/readiness-proof.d.ts.map +1 -0
  329. package/dist/runtime/installation/readiness-proof.js +142 -0
  330. package/dist/runtime/installation/readiness-proof.js.map +1 -0
  331. package/dist/runtime/installation/readiness.d.ts +21 -0
  332. package/dist/runtime/installation/readiness.d.ts.map +1 -0
  333. package/dist/runtime/installation/readiness.js +418 -0
  334. package/dist/runtime/installation/readiness.js.map +1 -0
  335. package/dist/runtime/installation/serialization.d.ts +3 -0
  336. package/dist/runtime/installation/serialization.d.ts.map +1 -0
  337. package/dist/runtime/installation/serialization.js +39 -0
  338. package/dist/runtime/installation/serialization.js.map +1 -0
  339. package/dist/runtime/installation/setup-profile.d.ts +8 -0
  340. package/dist/runtime/installation/setup-profile.d.ts.map +1 -0
  341. package/dist/runtime/installation/setup-profile.js +41 -0
  342. package/dist/runtime/installation/setup-profile.js.map +1 -0
  343. package/dist/runtime/installation/setup-renderer.d.ts +31 -0
  344. package/dist/runtime/installation/setup-renderer.d.ts.map +1 -0
  345. package/dist/runtime/installation/setup-renderer.js +238 -0
  346. package/dist/runtime/installation/setup-renderer.js.map +1 -0
  347. package/dist/runtime/installation/state-store.d.ts +28 -0
  348. package/dist/runtime/installation/state-store.d.ts.map +1 -0
  349. package/dist/runtime/installation/state-store.js +377 -0
  350. package/dist/runtime/installation/state-store.js.map +1 -0
  351. package/dist/runtime/installation/status.d.ts +24 -0
  352. package/dist/runtime/installation/status.d.ts.map +1 -0
  353. package/dist/runtime/installation/status.js +52 -0
  354. package/dist/runtime/installation/status.js.map +1 -0
  355. package/dist/runtime/installation/support-bundle.d.ts +30 -0
  356. package/dist/runtime/installation/support-bundle.d.ts.map +1 -0
  357. package/dist/runtime/installation/support-bundle.js +145 -0
  358. package/dist/runtime/installation/support-bundle.js.map +1 -0
  359. package/dist/runtime/installation/to-current-config.d.ts +4 -0
  360. package/dist/runtime/installation/to-current-config.d.ts.map +1 -0
  361. package/dist/runtime/installation/to-current-config.js +171 -0
  362. package/dist/runtime/installation/to-current-config.js.map +1 -0
  363. package/dist/runtime/installation/validation.d.ts +8 -0
  364. package/dist/runtime/installation/validation.d.ts.map +1 -0
  365. package/dist/runtime/installation/validation.js +117 -0
  366. package/dist/runtime/installation/validation.js.map +1 -0
  367. package/dist/runtime/installation/validators/common.d.ts +4 -0
  368. package/dist/runtime/installation/validators/common.d.ts.map +1 -0
  369. package/dist/runtime/installation/validators/common.js +32 -0
  370. package/dist/runtime/installation/validators/common.js.map +1 -0
  371. package/dist/runtime/installation/validators/infrastructure.d.ts +4 -0
  372. package/dist/runtime/installation/validators/infrastructure.d.ts.map +1 -0
  373. package/dist/runtime/installation/validators/infrastructure.js +96 -0
  374. package/dist/runtime/installation/validators/infrastructure.js.map +1 -0
  375. package/dist/runtime/installation/validators/operational.d.ts +4 -0
  376. package/dist/runtime/installation/validators/operational.d.ts.map +1 -0
  377. package/dist/runtime/installation/validators/operational.js +68 -0
  378. package/dist/runtime/installation/validators/operational.js.map +1 -0
  379. package/dist/runtime/installation/validators/profile.d.ts +4 -0
  380. package/dist/runtime/installation/validators/profile.d.ts.map +1 -0
  381. package/dist/runtime/installation/validators/profile.js +80 -0
  382. package/dist/runtime/installation/validators/profile.js.map +1 -0
  383. package/dist/runtime/installation/validators/secrets.d.ts +4 -0
  384. package/dist/runtime/installation/validators/secrets.d.ts.map +1 -0
  385. package/dist/runtime/installation/validators/secrets.js +85 -0
  386. package/dist/runtime/installation/validators/secrets.js.map +1 -0
  387. package/dist/runtime/launch-plan-format.d.ts +3 -0
  388. package/dist/runtime/launch-plan-format.d.ts.map +1 -0
  389. package/dist/runtime/launch-plan-format.js +57 -0
  390. package/dist/runtime/launch-plan-format.js.map +1 -0
  391. package/dist/runtime/launch.d.ts +35 -3
  392. package/dist/runtime/launch.d.ts.map +1 -1
  393. package/dist/runtime/launch.js +382 -37
  394. package/dist/runtime/launch.js.map +1 -1
  395. package/dist/runtime/license/license-clock.d.ts +12 -0
  396. package/dist/runtime/license/license-clock.d.ts.map +1 -0
  397. package/dist/runtime/license/license-clock.js +57 -0
  398. package/dist/runtime/license/license-clock.js.map +1 -0
  399. package/dist/runtime/license/license-report.d.ts +19 -0
  400. package/dist/runtime/license/license-report.d.ts.map +1 -0
  401. package/dist/runtime/license/license-report.js +105 -0
  402. package/dist/runtime/license/license-report.js.map +1 -0
  403. package/dist/runtime/license/license-store.d.ts +5 -0
  404. package/dist/runtime/license/license-store.d.ts.map +1 -0
  405. package/dist/runtime/license/license-store.js +11 -0
  406. package/dist/runtime/license/license-store.js.map +1 -0
  407. package/dist/runtime/license/registry-credential.d.ts +26 -0
  408. package/dist/runtime/license/registry-credential.d.ts.map +1 -0
  409. package/dist/runtime/license/registry-credential.js +94 -0
  410. package/dist/runtime/license/registry-credential.js.map +1 -0
  411. package/dist/runtime/license/resolve-license.d.ts +30 -0
  412. package/dist/runtime/license/resolve-license.d.ts.map +1 -0
  413. package/dist/runtime/license/resolve-license.js +73 -0
  414. package/dist/runtime/license/resolve-license.js.map +1 -0
  415. package/dist/runtime/license/store-license.d.ts +18 -0
  416. package/dist/runtime/license/store-license.d.ts.map +1 -0
  417. package/dist/runtime/license/store-license.js +26 -0
  418. package/dist/runtime/license/store-license.js.map +1 -0
  419. package/dist/runtime/lock-loader.d.ts +3 -6
  420. package/dist/runtime/lock-loader.d.ts.map +1 -1
  421. package/dist/runtime/lock-loader.js +26 -20
  422. package/dist/runtime/lock-loader.js.map +1 -1
  423. package/dist/runtime/native-process-group.d.ts +46 -0
  424. package/dist/runtime/native-process-group.d.ts.map +1 -0
  425. package/dist/runtime/native-process-group.js +390 -0
  426. package/dist/runtime/native-process-group.js.map +1 -0
  427. package/dist/runtime/object-registry-client.d.ts +31 -0
  428. package/dist/runtime/object-registry-client.d.ts.map +1 -0
  429. package/dist/runtime/object-registry-client.js +54 -0
  430. package/dist/runtime/object-registry-client.js.map +1 -0
  431. package/dist/runtime/paths.d.ts +2 -0
  432. package/dist/runtime/paths.d.ts.map +1 -1
  433. package/dist/runtime/paths.js +3 -0
  434. package/dist/runtime/paths.js.map +1 -1
  435. package/dist/runtime/roster.d.ts +12 -5
  436. package/dist/runtime/roster.d.ts.map +1 -1
  437. package/dist/runtime/roster.js +89 -11
  438. package/dist/runtime/roster.js.map +1 -1
  439. package/dist/runtime/run-manifest.d.ts +52 -0
  440. package/dist/runtime/run-manifest.d.ts.map +1 -0
  441. package/dist/runtime/run-manifest.js +587 -0
  442. package/dist/runtime/run-manifest.js.map +1 -0
  443. package/dist/runtime/runner/container-preflight.d.ts +77 -0
  444. package/dist/runtime/runner/container-preflight.d.ts.map +1 -0
  445. package/dist/runtime/runner/container-preflight.js +360 -0
  446. package/dist/runtime/runner/container-preflight.js.map +1 -0
  447. package/dist/runtime/runner/container-runner.d.ts +14 -0
  448. package/dist/runtime/runner/container-runner.d.ts.map +1 -1
  449. package/dist/runtime/runner/container-runner.js +110 -14
  450. package/dist/runtime/runner/container-runner.js.map +1 -1
  451. package/dist/runtime/runner/docker-cli.d.ts +35 -2
  452. package/dist/runtime/runner/docker-cli.d.ts.map +1 -1
  453. package/dist/runtime/runner/docker-cli.js +314 -9
  454. package/dist/runtime/runner/docker-cli.js.map +1 -1
  455. package/dist/runtime/runner/health-probe.d.ts +1 -0
  456. package/dist/runtime/runner/health-probe.d.ts.map +1 -1
  457. package/dist/runtime/runner/health-probe.js +3 -2
  458. package/dist/runtime/runner/health-probe.js.map +1 -1
  459. package/dist/runtime/runner/helm-cli.d.ts +19 -1
  460. package/dist/runtime/runner/helm-cli.d.ts.map +1 -1
  461. package/dist/runtime/runner/helm-cli.js +76 -8
  462. package/dist/runtime/runner/helm-cli.js.map +1 -1
  463. package/dist/runtime/runner/helm-runner.d.ts +3 -0
  464. package/dist/runtime/runner/helm-runner.d.ts.map +1 -1
  465. package/dist/runtime/runner/helm-runner.js +23 -7
  466. package/dist/runtime/runner/helm-runner.js.map +1 -1
  467. package/dist/runtime/runner/host-platform.d.ts +39 -0
  468. package/dist/runtime/runner/host-platform.d.ts.map +1 -0
  469. package/dist/runtime/runner/host-platform.js +136 -0
  470. package/dist/runtime/runner/host-platform.js.map +1 -0
  471. package/dist/runtime/runner/kube-cli.d.ts +23 -0
  472. package/dist/runtime/runner/kube-cli.d.ts.map +1 -0
  473. package/dist/runtime/runner/kube-cli.js +112 -0
  474. package/dist/runtime/runner/kube-cli.js.map +1 -0
  475. package/dist/runtime/runner/native-runner.d.ts.map +1 -1
  476. package/dist/runtime/runner/native-runner.js +46 -15
  477. package/dist/runtime/runner/native-runner.js.map +1 -1
  478. package/dist/runtime/runner/service-runner.d.ts +5 -0
  479. package/dist/runtime/runner/service-runner.d.ts.map +1 -1
  480. package/dist/runtime/runner/service-runner.js.map +1 -1
  481. package/dist/runtime/runner/stream-outcome.d.ts +7 -0
  482. package/dist/runtime/runner/stream-outcome.d.ts.map +1 -0
  483. package/dist/runtime/runner/stream-outcome.js +13 -0
  484. package/dist/runtime/runner/stream-outcome.js.map +1 -0
  485. package/dist/runtime/secrets/managed-local-cipher.d.ts +18 -0
  486. package/dist/runtime/secrets/managed-local-cipher.d.ts.map +1 -0
  487. package/dist/runtime/secrets/managed-local-cipher.js +110 -0
  488. package/dist/runtime/secrets/managed-local-cipher.js.map +1 -0
  489. package/dist/runtime/secrets/managed-local-files.d.ts +4 -0
  490. package/dist/runtime/secrets/managed-local-files.d.ts.map +1 -0
  491. package/dist/runtime/secrets/managed-local-files.js +132 -0
  492. package/dist/runtime/secrets/managed-local-files.js.map +1 -0
  493. package/dist/runtime/secrets/managed-local-key-provider.d.ts +27 -0
  494. package/dist/runtime/secrets/managed-local-key-provider.d.ts.map +1 -0
  495. package/dist/runtime/secrets/managed-local-key-provider.js +144 -0
  496. package/dist/runtime/secrets/managed-local-key-provider.js.map +1 -0
  497. package/dist/runtime/secrets/managed-local-secret-store.d.ts +18 -0
  498. package/dist/runtime/secrets/managed-local-secret-store.d.ts.map +1 -0
  499. package/dist/runtime/secrets/managed-local-secret-store.js +82 -0
  500. package/dist/runtime/secrets/managed-local-secret-store.js.map +1 -0
  501. package/dist/runtime/secrets/managed-local-store.d.ts +33 -0
  502. package/dist/runtime/secrets/managed-local-store.d.ts.map +1 -0
  503. package/dist/runtime/secrets/managed-local-store.js +121 -0
  504. package/dist/runtime/secrets/managed-local-store.js.map +1 -0
  505. package/dist/runtime/secrets/resolver.d.ts +23 -0
  506. package/dist/runtime/secrets/resolver.d.ts.map +1 -0
  507. package/dist/runtime/secrets/resolver.js +265 -0
  508. package/dist/runtime/secrets/resolver.js.map +1 -0
  509. package/dist/runtime/secrets/url-security.d.ts +3 -0
  510. package/dist/runtime/secrets/url-security.d.ts.map +1 -0
  511. package/dist/runtime/secrets/url-security.js +13 -0
  512. package/dist/runtime/secrets/url-security.js.map +1 -0
  513. package/dist/runtime/sources/credentials.d.ts +2 -0
  514. package/dist/runtime/sources/credentials.d.ts.map +1 -1
  515. package/dist/runtime/sources/credentials.js +51 -1
  516. package/dist/runtime/sources/credentials.js.map +1 -1
  517. package/dist/runtime/sources/kinds/distribution.js +3 -3
  518. package/dist/runtime/sources/kinds/distribution.js.map +1 -1
  519. package/dist/runtime/sources/kinds/git.d.ts +6 -3
  520. package/dist/runtime/sources/kinds/git.d.ts.map +1 -1
  521. package/dist/runtime/sources/kinds/git.js +99 -22
  522. package/dist/runtime/sources/kinds/git.js.map +1 -1
  523. package/dist/runtime/sources/manifest-walk.d.ts +1 -0
  524. package/dist/runtime/sources/manifest-walk.d.ts.map +1 -1
  525. package/dist/runtime/sources/manifest-walk.js +16 -11
  526. package/dist/runtime/sources/manifest-walk.js.map +1 -1
  527. package/dist/runtime/sources/resolve-context.d.ts +7 -0
  528. package/dist/runtime/sources/resolve-context.d.ts.map +1 -0
  529. package/dist/runtime/sources/resolve-context.js +3 -0
  530. package/dist/runtime/sources/resolve-context.js.map +1 -0
  531. package/dist/runtime/sources/resolver.d.ts +2 -2
  532. package/dist/runtime/sources/resolver.d.ts.map +1 -1
  533. package/dist/runtime/sources/resolver.js +11 -5
  534. package/dist/runtime/sources/resolver.js.map +1 -1
  535. package/dist/runtime/sources/schema.d.ts.map +1 -1
  536. package/dist/runtime/sources/schema.js +51 -3
  537. package/dist/runtime/sources/schema.js.map +1 -1
  538. package/dist/runtime/store-client.d.ts +59 -0
  539. package/dist/runtime/store-client.d.ts.map +1 -0
  540. package/dist/runtime/store-client.js +72 -0
  541. package/dist/runtime/store-client.js.map +1 -0
  542. package/dist/runtime/store-submit.d.ts +31 -0
  543. package/dist/runtime/store-submit.d.ts.map +1 -0
  544. package/dist/runtime/store-submit.js +77 -0
  545. package/dist/runtime/store-submit.js.map +1 -0
  546. package/dist/runtime/supervisor.d.ts +18 -0
  547. package/dist/runtime/supervisor.d.ts.map +1 -1
  548. package/dist/runtime/supervisor.js +162 -15
  549. package/dist/runtime/supervisor.js.map +1 -1
  550. package/dist/runtime/waves.d.ts +1 -1
  551. package/dist/runtime/waves.d.ts.map +1 -1
  552. package/dist/runtime/waves.js +86 -19
  553. package/dist/runtime/waves.js.map +1 -1
  554. package/examples/01-local-native.yaml +4 -1
  555. package/examples/03-byo-infra.yaml +17 -7
  556. package/examples/05-appliance-helm.yaml +1 -1
  557. package/examples/06-biome-sources.yaml +4 -1
  558. package/package.json +20 -28
  559. package/xema.config.example.yaml +22 -18
  560. package/LICENSE +0 -176
  561. package/dist/lib/command-registry.d.ts +0 -5
  562. package/dist/lib/command-registry.d.ts.map +0 -1
  563. package/dist/lib/command-registry.js +0 -17
  564. package/dist/lib/command-registry.js.map +0 -1
@@ -0,0 +1,278 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MissingRuntimeToolError = exports.BiomePublishConfigError = exports.COSIGN_KEY_ENV = exports.BIOME_ARTIFACT_TYPE = void 0;
4
+ exports.publishBiome = publishBiome;
5
+ exports.attestArgsWithPredicate = attestArgsWithPredicate;
6
+ exports.loadManifest = loadManifest;
7
+ exports.buildOrasArgs = buildOrasArgs;
8
+ exports.collectBiomeFiles = collectBiomeFiles;
9
+ const node_child_process_1 = require("node:child_process");
10
+ const node_fs_1 = require("node:fs");
11
+ const node_os_1 = require("node:os");
12
+ const node_path_1 = require("node:path");
13
+ const biome_1 = require("@xemahq/kernel-contracts/biome");
14
+ const biome_provenance_1 = require("./biome-provenance");
15
+ const loader_1 = require("./config/loader");
16
+ const credentials_1 = require("./sources/credentials");
17
+ const schema_1 = require("./sources/schema");
18
+ exports.BIOME_ARTIFACT_TYPE = 'application/vnd.xema.biome.manifest.v1+json';
19
+ exports.COSIGN_KEY_ENV = 'COSIGN_KEY';
20
+ const EXCLUDE_DIRS = new Set([
21
+ 'node_modules',
22
+ '.git',
23
+ '.turbo',
24
+ '.cache',
25
+ 'coverage',
26
+ '.nyc_output',
27
+ ]);
28
+ const EXCLUDE_FILES = new Set(['.DS_Store']);
29
+ const DEFAULT_OCI_USERNAME = 'token';
30
+ class BiomePublishConfigError extends Error {
31
+ constructor(message) {
32
+ super(message);
33
+ this.name = 'BiomePublishConfigError';
34
+ }
35
+ }
36
+ exports.BiomePublishConfigError = BiomePublishConfigError;
37
+ class MissingRuntimeToolError extends Error {
38
+ tool;
39
+ constructor(tool, message) {
40
+ super(message);
41
+ this.tool = tool;
42
+ this.name = 'MissingRuntimeToolError';
43
+ }
44
+ }
45
+ exports.MissingRuntimeToolError = MissingRuntimeToolError;
46
+ function publishBiome(options) {
47
+ const biomeDir = (0, node_path_1.resolve)(options.path);
48
+ const manifest = loadManifest(biomeDir);
49
+ const biomeId = manifest.xema.id;
50
+ const version = manifest.version;
51
+ const tag = options.tag !== undefined && options.tag.length > 0 ? options.tag : version;
52
+ const credentials = new credentials_1.CredentialResolver();
53
+ const auth = resolveRegistryAndToken(options, credentials);
54
+ const ociRef = `${auth.registry.replace(/\/+$/, '')}/${biomeId}:${tag}`;
55
+ const files = collectBiomeFiles(biomeDir);
56
+ if (files.length === 0) {
57
+ throw new BiomePublishConfigError(`Biome at ${biomeDir} has no files to publish.`);
58
+ }
59
+ const username = options.username ?? DEFAULT_OCI_USERNAME;
60
+ const orasArgs = buildOrasArgs({
61
+ ociRef,
62
+ biomeId,
63
+ version,
64
+ files,
65
+ hasToken: auth.tokenEnv !== undefined,
66
+ username,
67
+ });
68
+ const cosignKey = process.env[exports.COSIGN_KEY_ENV];
69
+ const cosignArgs = buildCosignArgs(ociRef, cosignKey);
70
+ const cosignAttestArgs = buildCosignAttestArgs(ociRef, cosignKey);
71
+ const plan = {
72
+ biomeId,
73
+ version,
74
+ registry: auth.registry,
75
+ tag,
76
+ ociRef,
77
+ files,
78
+ orasArgs,
79
+ cosignArgs,
80
+ cosignAttestArgs,
81
+ ...(auth.tokenEnv !== undefined ? { tokenEnv: auth.tokenEnv } : {}),
82
+ tokenPresent: credentials.has(auth.tokenEnv),
83
+ cosignKeyResolved: cosignKey !== undefined && cosignKey.length > 0,
84
+ };
85
+ if (options.dryRun === true) {
86
+ printPlan(plan, biomeDir, username);
87
+ return plan;
88
+ }
89
+ ensureToolInstalled('oras');
90
+ ensureToolInstalled('cosign');
91
+ if (!plan.cosignKeyResolved) {
92
+ throw new BiomePublishConfigError(`${exports.COSIGN_KEY_ENV} is not set — a published biome MUST be cosign-signed AND carry a ` +
93
+ 'SLSA provenance attestation (the fetcher refuses artifacts missing either). ' +
94
+ 'Set COSIGN_KEY to your cosign private key ref.');
95
+ }
96
+ const token = auth.tokenEnv !== undefined ? credentials.resolve(auth.tokenEnv, auth.sourceName) : undefined;
97
+ const startedOn = new Date().toISOString();
98
+ runTool('oras', orasArgs, biomeDir, token);
99
+ runTool('cosign', cosignArgs, biomeDir, undefined);
100
+ attestProvenance({ plan, biomeDir, startedOn });
101
+ console.log(`Published, signed and attested ${ociRef}.`);
102
+ return plan;
103
+ }
104
+ function attestProvenance(input) {
105
+ const predicate = (0, biome_provenance_1.buildProvenancePredicate)({
106
+ biomeId: input.plan.biomeId,
107
+ version: input.plan.version,
108
+ tag: input.plan.tag,
109
+ ociRef: input.plan.ociRef,
110
+ biomeDir: input.biomeDir,
111
+ files: input.plan.files,
112
+ builder: (0, biome_provenance_1.resolveBuilder)(process.env),
113
+ startedOn: input.startedOn,
114
+ finishedOn: new Date().toISOString(),
115
+ });
116
+ const workDir = (0, node_fs_1.mkdtempSync)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'xema-biome-provenance-'));
117
+ const predicatePath = (0, node_path_1.join)(workDir, 'slsa-provenance.json');
118
+ try {
119
+ (0, node_fs_1.writeFileSync)(predicatePath, `${JSON.stringify(predicate, null, 2)}\n`, {
120
+ mode: 0o600,
121
+ });
122
+ runTool('cosign', attestArgsWithPredicate(input.plan.cosignAttestArgs, predicatePath), input.biomeDir, undefined);
123
+ }
124
+ finally {
125
+ (0, node_fs_1.rmSync)(workDir, { recursive: true, force: true });
126
+ }
127
+ }
128
+ function attestArgsWithPredicate(attestArgs, predicatePath) {
129
+ return [...attestArgs, '--predicate', predicatePath];
130
+ }
131
+ function loadManifest(biomeDir) {
132
+ if (!(0, node_fs_1.existsSync)(biomeDir) || !(0, node_fs_1.statSync)(biomeDir).isDirectory()) {
133
+ throw new BiomePublishConfigError(`Biome path is not a directory: ${biomeDir}`);
134
+ }
135
+ const manifestPath = (0, node_path_1.join)(biomeDir, biome_1.BIOME_MANIFEST_FILENAME);
136
+ if (!(0, node_fs_1.existsSync)(manifestPath)) {
137
+ throw new BiomePublishConfigError(`No ${biome_1.BIOME_MANIFEST_FILENAME} at ${biomeDir} — is this a biome directory?`);
138
+ }
139
+ return (0, biome_1.parseBiomeManifest)(JSON.parse((0, node_fs_1.readFileSync)(manifestPath, 'utf8')));
140
+ }
141
+ function resolveRegistryAndToken(options, _credentials) {
142
+ if (options.registry !== undefined && options.registry.length > 0) {
143
+ return {
144
+ registry: options.registry,
145
+ ...(options.tokenEnv !== undefined ? { tokenEnv: options.tokenEnv } : {}),
146
+ sourceName: '--registry',
147
+ };
148
+ }
149
+ const { config } = (0, loader_1.loadXemaConfig)({ explicit: options.configPath });
150
+ const ociSources = config.sources.filter((s) => s.kind === schema_1.SourceKind.Oci);
151
+ if (ociSources.length === 0) {
152
+ throw new BiomePublishConfigError('No target registry: pass --registry <host>, or add an `oci` source to your ' +
153
+ 'xema.config.yaml (`xema source add ...`).');
154
+ }
155
+ let chosen;
156
+ if (options.source !== undefined) {
157
+ const match = ociSources.find((s) => s.name === options.source);
158
+ if (match === undefined) {
159
+ throw new BiomePublishConfigError(`No oci source named "${options.source}". Configured oci sources: ` +
160
+ `${ociSources.map((s) => s.name).join(', ')}.`);
161
+ }
162
+ chosen = match;
163
+ }
164
+ else if (ociSources.length === 1) {
165
+ chosen = ociSources[0];
166
+ }
167
+ else {
168
+ throw new BiomePublishConfigError(`Multiple oci sources configured (${ociSources.map((s) => s.name).join(', ')}). ` +
169
+ 'Pick one with --source <name>, or pass --registry <host>.');
170
+ }
171
+ return {
172
+ registry: chosen.registry,
173
+ ...(chosen.authTokenEnv !== undefined ? { tokenEnv: chosen.authTokenEnv } : {}),
174
+ sourceName: `source "${chosen.name}"`,
175
+ };
176
+ }
177
+ function buildOrasArgs(input) {
178
+ const args = ['push', input.ociRef, '--artifact-type', exports.BIOME_ARTIFACT_TYPE];
179
+ args.push('--annotation', `org.opencontainers.image.title=${input.biomeId}`);
180
+ args.push('--annotation', `org.opencontainers.image.version=${input.version}`);
181
+ if (input.hasToken) {
182
+ args.push('--username', input.username, '--password-stdin');
183
+ }
184
+ for (const file of input.files) {
185
+ args.push(file);
186
+ }
187
+ return args;
188
+ }
189
+ function buildCosignArgs(ociRef, cosignKey) {
190
+ const keyRef = resolveCosignKeyRef(cosignKey);
191
+ return ['sign', '--yes', '--key', keyRef, ociRef];
192
+ }
193
+ function buildCosignAttestArgs(ociRef, cosignKey) {
194
+ return [
195
+ 'attest',
196
+ '--yes',
197
+ '--key',
198
+ resolveCosignKeyRef(cosignKey),
199
+ '--type',
200
+ biome_provenance_1.SLSA_PROVENANCE_PREDICATE_TYPE,
201
+ ociRef,
202
+ ];
203
+ }
204
+ function resolveCosignKeyRef(cosignKey) {
205
+ return cosignKey !== undefined && cosignKey.length > 0 ? cosignKey : `$${exports.COSIGN_KEY_ENV}`;
206
+ }
207
+ function collectBiomeFiles(root) {
208
+ const out = [];
209
+ const walk = (dir) => {
210
+ for (const entry of (0, node_fs_1.readdirSync)(dir, { withFileTypes: true })) {
211
+ if (entry.isDirectory()) {
212
+ if (EXCLUDE_DIRS.has(entry.name)) {
213
+ continue;
214
+ }
215
+ walk((0, node_path_1.join)(dir, entry.name));
216
+ }
217
+ else if (entry.isFile()) {
218
+ if (EXCLUDE_FILES.has(entry.name)) {
219
+ continue;
220
+ }
221
+ out.push(toPosix((0, node_path_1.relative)(root, (0, node_path_1.join)(dir, entry.name))));
222
+ }
223
+ }
224
+ };
225
+ walk(root);
226
+ out.sort((a, b) => a.localeCompare(b));
227
+ return out;
228
+ }
229
+ function toPosix(p) {
230
+ return node_path_1.sep === '/' ? p : p.split(node_path_1.sep).join('/');
231
+ }
232
+ function ensureToolInstalled(tool) {
233
+ const probe = (0, node_child_process_1.spawnSync)(tool, ['version'], { stdio: 'ignore' });
234
+ if (probe.error !== undefined || probe.status === null) {
235
+ throw new MissingRuntimeToolError(tool, `"${tool}" CLI not found on PATH — install it to publish signed biome artifacts ` +
236
+ `(oras: https://oras.land, cosign: https://github.com/sigstore/cosign).`);
237
+ }
238
+ }
239
+ function runTool(tool, args, cwd, stdinInput) {
240
+ const result = (0, node_child_process_1.spawnSync)(tool, [...args], {
241
+ cwd,
242
+ stdio: [stdinInput !== undefined ? 'pipe' : 'ignore', 'inherit', 'inherit'],
243
+ ...(stdinInput !== undefined ? { input: `${stdinInput}\n` } : {}),
244
+ });
245
+ if (result.error !== undefined) {
246
+ throw new Error(`${tool} failed to start: ${result.error.message}`);
247
+ }
248
+ if (result.status !== 0) {
249
+ throw new Error(`${tool} ${args.join(' ')} exited with code ${String(result.status)}.`);
250
+ }
251
+ }
252
+ function renderCommand(tool, args) {
253
+ const shown = args.map((a) => (/[\s"']/.test(a) ? JSON.stringify(a) : a));
254
+ return `${tool} ${shown.join(' ')}`;
255
+ }
256
+ function printPlan(plan, biomeDir, username) {
257
+ console.log(`biome publish (dry-run) — ${plan.biomeId} v${plan.version}`);
258
+ console.log(` biome dir : ${biomeDir}`);
259
+ console.log(` registry : ${plan.registry}`);
260
+ console.log(` tag : ${plan.tag}`);
261
+ console.log(` oci ref : ${plan.ociRef}`);
262
+ console.log(` files : ${String(plan.files.length)} (${plan.files.join(', ')})`);
263
+ if (plan.tokenEnv !== undefined) {
264
+ console.log(` auth : --username ${username} --password-stdin ` +
265
+ `(token from $${plan.tokenEnv}, ${plan.tokenPresent ? 'present' : 'NOT SET'})`);
266
+ }
267
+ else {
268
+ console.log(' auth : ambient oras credentials (run `oras login` first)');
269
+ }
270
+ if (!plan.cosignKeyResolved) {
271
+ console.log(` cosign : ${exports.COSIGN_KEY_ENV} not set — required for the real publish`);
272
+ }
273
+ console.log('');
274
+ console.log(` ${renderCommand('oras', plan.orasArgs)}`);
275
+ console.log(` ${renderCommand('cosign', plan.cosignArgs)}`);
276
+ console.log(` ${renderCommand('cosign', attestArgsWithPredicate(plan.cosignAttestArgs, '<temp>/slsa-provenance.json'))}`);
277
+ }
278
+ //# sourceMappingURL=biome-publish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-publish.js","sourceRoot":"","sources":["../../src/runtime/biome-publish.ts"],"names":[],"mappings":";;;AA6KA,oCAqEC;AA+CD,0DAKC;AASD,oCAYC;AA8ED,sCAYC;AA0CD,8CAoBC;AAndD,2DAA+C;AAC/C,qCAQiB;AACjB,qCAAiC;AACjC,yCAAyD;AAEzD,0DAIwC;AAExC,yDAI4B;AAC5B,4CAAiD;AACjD,uDAA2D;AAC3D,6CAA8D;AAqCjD,QAAA,mBAAmB,GAAG,6CAA6C,CAAC;AAGpE,QAAA,cAAc,GAAG,YAAY,CAAC;AAuB3C,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,cAAc;IACd,MAAM;IAGN,QAAQ;IACR,QAAQ;IAER,UAAU;IACV,aAAa;CACd,CAAC,CAAC;AAGH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAG7C,MAAM,oBAAoB,GAAG,OAAO,CAAC;AA6CrC,MAAa,uBAAwB,SAAQ,KAAK;IAChD,YAAY,OA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server",
4
+ Web = "web"
5
+ }
6
+ export declare enum ScaffoldScope {
7
+ Kernel = "kernel",
8
+ System = "system",
9
+ Base = "base",
10
+ Platform = "platform"
11
+ }
12
+ export declare const DEFAULT_SCAFFOLD_SCOPE = ScaffoldScope.Platform;
13
+ export declare const DEFAULT_SCAFFOLD_TARGET = ScaffoldTarget.Server;
14
+ export interface ScaffoldOptions {
15
+ readonly name: string;
16
+ readonly dir?: string;
17
+ readonly scope?: ScaffoldScope;
18
+ readonly target?: ScaffoldTarget;
19
+ readonly description?: string;
20
+ }
21
+ export interface ScaffoldResult {
22
+ readonly biomeDir: string;
23
+ readonly manifestPath: string;
24
+ readonly files: readonly string[];
25
+ readonly manifest: BiomeManifest;
26
+ }
27
+ export declare class BiomeScaffoldExistsError extends Error {
28
+ readonly biomeDir: string;
29
+ constructor(biomeDir: string);
30
+ }
31
+ export declare class BiomeScaffoldNameError extends Error {
32
+ constructor(name: string);
33
+ }
34
+ export declare function scaffoldBiome(options: ScaffoldOptions): ScaffoldResult;
35
+ //# sourceMappingURL=biome-scaffold.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-scaffold.d.ts","sourceRoot":"","sources":["../../src/runtime/biome-scaffold.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,gCAAgC,CAAC;AAexC,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AAUD,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAGD,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAE7D,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAQ7D,MAAM,WAAW,eAAe;IAE9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IAEjC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAE7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAElC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;CAClC;AAGD,qBAAa,wBAAyB,SAAQ,KAAK;aACrB,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM;CAO7C;AAGD,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,IAAI,EAAE,MAAM;CAOzB;AAOD,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,CA8CtE"}
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BiomeScaffoldNameError = exports.BiomeScaffoldExistsError = exports.DEFAULT_SCAFFOLD_TARGET = exports.DEFAULT_SCAFFOLD_SCOPE = exports.ScaffoldScope = exports.ScaffoldTarget = void 0;
4
+ exports.scaffoldBiome = scaffoldBiome;
5
+ const node_fs_1 = require("node:fs");
6
+ const node_path_1 = require("node:path");
7
+ const biome_1 = require("@xemahq/kernel-contracts/biome");
8
+ var ScaffoldTarget;
9
+ (function (ScaffoldTarget) {
10
+ ScaffoldTarget["Server"] = "server";
11
+ ScaffoldTarget["Web"] = "web";
12
+ })(ScaffoldTarget || (exports.ScaffoldTarget = ScaffoldTarget = {}));
13
+ var ScaffoldScope;
14
+ (function (ScaffoldScope) {
15
+ ScaffoldScope["Kernel"] = "kernel";
16
+ ScaffoldScope["System"] = "system";
17
+ ScaffoldScope["Base"] = "base";
18
+ ScaffoldScope["Platform"] = "platform";
19
+ })(ScaffoldScope || (exports.ScaffoldScope = ScaffoldScope = {}));
20
+ exports.DEFAULT_SCAFFOLD_SCOPE = ScaffoldScope.Platform;
21
+ exports.DEFAULT_SCAFFOLD_TARGET = ScaffoldTarget.Server;
22
+ const DEFAULT_PACKAGE_SCOPE = '@xema-biomes';
23
+ const BIOME_ID_RE = /^[a-z][a-z0-9-]*$/;
24
+ class BiomeScaffoldExistsError extends Error {
25
+ biomeDir;
26
+ constructor(biomeDir) {
27
+ super(`Refusing to scaffold: "${biomeDir}" already exists. ` +
28
+ 'Pick another name or remove the existing directory first.');
29
+ this.biomeDir = biomeDir;
30
+ this.name = 'BiomeScaffoldExistsError';
31
+ }
32
+ }
33
+ exports.BiomeScaffoldExistsError = BiomeScaffoldExistsError;
34
+ class BiomeScaffoldNameError extends Error {
35
+ constructor(name) {
36
+ super(`Invalid biome name "${name}" — expected lowercase kebab-case ` +
37
+ '(a leading letter, then letters/digits/dashes), e.g. "acme-tickets".');
38
+ this.name = 'BiomeScaffoldNameError';
39
+ }
40
+ }
41
+ exports.BiomeScaffoldNameError = BiomeScaffoldNameError;
42
+ function scaffoldBiome(options) {
43
+ const { name } = options;
44
+ if (!BIOME_ID_RE.test(name)) {
45
+ throw new BiomeScaffoldNameError(name);
46
+ }
47
+ const scope = options.scope ?? exports.DEFAULT_SCAFFOLD_SCOPE;
48
+ const target = options.target ?? exports.DEFAULT_SCAFFOLD_TARGET;
49
+ const parentDir = (0, node_path_1.resolve)(options.dir ?? process.cwd());
50
+ const biomeDir = (0, node_path_1.join)(parentDir, name);
51
+ if ((0, node_fs_1.existsSync)(biomeDir)) {
52
+ throw new BiomeScaffoldExistsError(biomeDir);
53
+ }
54
+ const displayName = humanizeBiomeName(name);
55
+ const description = options.description !== undefined && options.description.length > 0
56
+ ? options.description
57
+ : `${displayName} — a Xema biome.`;
58
+ const manifestObject = buildManifestObject({ name, displayName, description, scope, target });
59
+ const manifestJson = `${JSON.stringify(manifestObject, null, 2)}\n`;
60
+ const files = [];
61
+ const write = (relativePath, contents) => {
62
+ const absolute = (0, node_path_1.join)(biomeDir, relativePath);
63
+ (0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(absolute), { recursive: true });
64
+ (0, node_fs_1.writeFileSync)(absolute, contents, 'utf8');
65
+ files.push(relativePath);
66
+ };
67
+ write(biome_1.BIOME_MANIFEST_FILENAME, manifestJson);
68
+ write('README.md', renderReadme({ name, displayName, description, target }));
69
+ write((0, node_path_1.join)('skills', 'hello', 'SKILL.md'), renderSampleSkill(displayName));
70
+ if (target === ScaffoldTarget.Server) {
71
+ write((0, node_path_1.join)('api', name, 'README.md'), renderServiceReadme(name, displayName));
72
+ write((0, node_path_1.join)('api', name, 'index.ts'), renderServicePlaceholder(name));
73
+ }
74
+ else {
75
+ write((0, node_path_1.join)('web', 'README.md'), renderWebReadme(displayName));
76
+ }
77
+ const manifestPath = (0, node_path_1.join)(biomeDir, biome_1.BIOME_MANIFEST_FILENAME);
78
+ const manifest = (0, biome_1.parseBiomeManifest)(JSON.parse((0, node_fs_1.readFileSync)(manifestPath, 'utf8')));
79
+ return { biomeDir, manifestPath, files, manifest };
80
+ }
81
+ function buildManifestObject(input) {
82
+ const xemaBase = {
83
+ id: input.name,
84
+ displayName: input.displayName,
85
+ description: input.description,
86
+ scope: input.scope,
87
+ target: input.target,
88
+ requiresCapabilities: [],
89
+ exposesCapabilities: [],
90
+ };
91
+ const xema = input.target === ScaffoldTarget.Server
92
+ ? {
93
+ ...xemaBase,
94
+ ships: {
95
+ apis: [{ name: input.name, path: `./api/${input.name}` }],
96
+ },
97
+ }
98
+ : xemaBase;
99
+ return {
100
+ name: `${DEFAULT_PACKAGE_SCOPE}/${input.name}`,
101
+ version: '0.1.0',
102
+ xema,
103
+ };
104
+ }
105
+ function humanizeBiomeName(name) {
106
+ return name
107
+ .split('-')
108
+ .filter((part) => part.length > 0)
109
+ .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
110
+ .join(' ');
111
+ }
112
+ function renderReadme(input) {
113
+ const structure = input.target === ScaffoldTarget.Server
114
+ ? `- \`xema-biome.json\` — the biome manifest (identity + what it ships).\n` +
115
+ `- \`api/${input.name}/\` — the biome's server (NestJS) service placeholder.\n` +
116
+ `- \`skills/\` — Skill bundles this biome ships (one folder per skill).`
117
+ : `- \`xema-biome.json\` — the biome manifest (identity + what it ships).\n` +
118
+ `- \`web/\` — the biome's web surface placeholder.\n` +
119
+ `- \`skills/\` — Skill bundles this biome ships (one folder per skill).`;
120
+ return (`# ${input.displayName}\n\n` +
121
+ `${input.description}\n\n` +
122
+ `## Structure\n\n${structure}\n\n` +
123
+ `## Publish\n\n` +
124
+ `\`\`\`sh\nxema biome publish . --registry <host> --dry-run\n\`\`\`\n`);
125
+ }
126
+ function renderSampleSkill(displayName) {
127
+ return (`---\n` +
128
+ `name: hello\n` +
129
+ `description: A sample skill shipped by the ${displayName} biome. Replace this with a real skill.\n` +
130
+ `---\n\n` +
131
+ `# hello\n\n` +
132
+ `This is a placeholder Skill bundle. \`SKILL.md\` is the only required file; ` +
133
+ `add \`reference/\`, \`scripts/\`, or \`assets/\` alongside it as needed.\n`);
134
+ }
135
+ function renderServiceReadme(name, displayName) {
136
+ return (`# ${displayName} API\n\n` +
137
+ `Server (NestJS) service placeholder for the \`${name}\` biome. The manifest's ` +
138
+ `\`ships.apis[].path\` points here (\`./api/${name}\`). Replace this placeholder ` +
139
+ `with a real service tree before publishing a runnable biome.\n`);
140
+ }
141
+ function renderServicePlaceholder(name) {
142
+ return (`// Placeholder entrypoint for the "${name}" biome API service.\n` +
143
+ `// Replace with a real NestJS bootstrap (see @xemahq/biome-api-sdk).\n\n` +
144
+ `export const BIOME_ID = '${name}';\n`);
145
+ }
146
+ function renderWebReadme(displayName) {
147
+ return (`# ${displayName} Web\n\n` +
148
+ `Web surface placeholder for the ${displayName} biome. Replace with a real ` +
149
+ `web bundle (see the host-shell web-biome framework).\n`);
150
+ }
151
+ //# sourceMappingURL=biome-scaffold.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-scaffold.js","s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AAG,KAAK,CAAC,WAAW,MAAM;QAC1B,mBAAmB,SAAS,MAAM;QAClC,gBAAgB;QAChB,sEAAsE,CACvE,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,WAAmB;IAC5C,OAAO,CACL,OAAO;QACP,eAAe;QACf,8CAA8C,WAAW,2CAA2C;QACpG,SAAS;QACT,aAAa;QACb,8EAA8E;QAC9E,4EAA4E,CAC7E,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY,EAAE,WAAmB;IAC5D,OAAO,CACL,KAAK,WAAW,UAAU;QAC1B,iDAAiD,IAAI,2BAA2B;QAChF,8CAA8C,IAAI,gCAAgC;QAClF,gEAAgE,CACjE,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,IAAY;IAC5C,OAAO,CACL,sCAAsC,IAAI,wBAAwB;QAClE,0EAA0E;QAC1E,4BAA4B,IAAI,MAAM,CACvC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,WAAmB;IAC1C,OAAO,CACL,KAAK,WAAW,UAAU;QAC1B,mCAAmC,WAAW,8BAA8B;QAC5E,wDAAwD,CACzD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { type BiomeManifest } from '@xemahq/kernel-contracts/biome';
2
+ export declare enum BiomeDevCheck {
3
+ Manifest = "manifest",
4
+ Agents = "agents",
5
+ Contributions = "contributions",
6
+ Skills = "skills",
7
+ Workflows = "workflows"
8
+ }
9
+ export declare enum BiomeCheckStatus {
10
+ Passed = "passed",
11
+ Failed = "failed",
12
+ Skipped = "skipped"
13
+ }
14
+ export interface BiomeCheckResult {
15
+ readonly check: BiomeDevCheck;
16
+ readonly status: BiomeCheckStatus;
17
+ readonly summary: string;
18
+ readonly issues: readonly string[];
19
+ }
20
+ export interface BiomeValidationReport {
21
+ readonly biomeRoot: string;
22
+ readonly manifest?: BiomeManifest;
23
+ readonly results: readonly BiomeCheckResult[];
24
+ readonly passed: boolean;
25
+ readonly contributionCounts: ReadonlyMap<string, number>;
26
+ }
27
+ export declare function validateBiomeDir(biomeRoot: string): BiomeValidationReport;
28
+ //# sourceMappingURL=biome-validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-validate.d.ts","sourceRoot":"","sources":["../../src/runtime/biome-validate.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,gCAAgC,CAAC;AAyCxC,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAGD,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;IAEjB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAElC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAE9C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEzB,QAAQ,CAAC,kBAAkB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1D;AAuBD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,qBAAqB,CAqCzE"}