@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,258 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerCommand = registerCommand;
4
+ const node_fs_1 = require("node:fs");
5
+ const node_path_1 = require("node:path");
6
+ const yaml_1 = require("yaml");
7
+ const cli_errors_1 = require("../lib/cli-errors");
8
+ const exit_codes_1 = require("../lib/exit-codes");
9
+ const loader_1 = require("../runtime/config/loader");
10
+ const foreground_1 = require("../runtime/foreground");
11
+ const installation_1 = require("../runtime/installation");
12
+ const launch_1 = require("../runtime/launch");
13
+ const managed_local_secret_store_1 = require("../runtime/secrets/managed-local-secret-store");
14
+ function registerCommand(program) {
15
+ const installation = program
16
+ .command('installation')
17
+ .summary('Plan, apply, inspect, and diagnose this Xema installation')
18
+ .description('Create or validate XemaInstallation setup documents and compile the current ' +
19
+ 'xema.config.yaml launcher input through the same desired-state engine.');
20
+ installation
21
+ .command('init')
22
+ .summary('Create a developer, starter, or single-node installation file')
23
+ .requiredOption('--profile <profile>', `One of: ${(0, installation_1.setupInstallationProfiles)().join(' | ')}`)
24
+ .option('--name <name>', 'Installation name', 'xema')
25
+ .option('--edition <edition>', 'Distribution edition', 'oss')
26
+ .option('--output <path>', 'Output installation file', 'xema.installation.yaml')
27
+ .option('--force', 'Replace an existing installation file', false)
28
+ .action(async (opts) => {
29
+ await runGuarded('init', async () => {
30
+ const output = (0, node_path_1.resolve)(opts.output);
31
+ if ((0, node_fs_1.existsSync)(output) && !opts.force) {
32
+ throw new Error(`Installation output already exists at ${output}; pass --force to replace it.`);
33
+ }
34
+ const profile = (0, installation_1.parseSetupInstallationProfile)(opts.profile);
35
+ const template = (0, installation_1.createInstallationProfileTemplate)(profile, opts.name, opts.edition);
36
+ const desired = (0, installation_1.compileXemaInstallation)(template);
37
+ (0, installation_1.renderInstallationSetup)(desired);
38
+ (0, node_fs_1.writeFileSync)(output, (0, yaml_1.stringify)(template), {
39
+ encoding: 'utf8',
40
+ flag: opts.force ? 'w' : 'wx',
41
+ });
42
+ console.log(`Wrote ${output} for ${profile} (${desired.effectivePlanHash}).`);
43
+ console.log(`Next: xema installation doctor --file ${JSON.stringify(output)}`);
44
+ });
45
+ });
46
+ installation
47
+ .command('doctor')
48
+ .summary('Validate setup profile, provider readiness, and render obligations')
49
+ .requiredOption('--file <path>', 'Path to xema.installation.yaml')
50
+ .option('--available-provider <provider...>', 'Explicitly confirm configured Kubernetes/external provider availability')
51
+ .action(async (opts) => {
52
+ await runGuarded('doctor', async () => {
53
+ const path = (0, node_path_1.resolve)(opts.file);
54
+ const desired = (0, installation_1.compileXemaInstallation)((0, yaml_1.parse)((0, node_fs_1.readFileSync)(path, 'utf8')));
55
+ const readiness = await providerReadiness(desired, opts.availableProvider ?? [], path);
56
+ const rendering = (0, installation_1.renderInstallationSetup)(desired, {
57
+ providers: readiness,
58
+ });
59
+ console.log(`Profile: ${rendering.profile}`);
60
+ console.log(`Effective hash: ${rendering.effectivePlanHash}`);
61
+ console.log(`Providers: ${readiness.length === 0 ? 'none required' : 'ready'}`);
62
+ console.log(`Artifacts: ${String(rendering.artifacts.length)}`);
63
+ console.log(`Obligations: ${rendering.renderedArtifacts
64
+ .map((item) => item.obligation)
65
+ .join(', ')}`);
66
+ if (rendering.profile === installation_1.InstallationProfile.SingleNodeProduction) {
67
+ console.log('Executor: unavailable — single-node apply requires an artifact-consuming Kubernetes executor; the per-service Helm runner is not accepted as readiness proof.');
68
+ }
69
+ else {
70
+ console.log('Readiness: apply will prove the exact distribution-lock workload roster before committing state.');
71
+ }
72
+ console.log('Setup doctor passed without applying side effects.');
73
+ });
74
+ });
75
+ installation
76
+ .command('plan')
77
+ .summary('Compile and display a redacted deterministic installation plan')
78
+ .option('--config <path>', 'Path to xema.config.yaml')
79
+ .action(async (opts) => {
80
+ await runGuarded('plan', async () => {
81
+ const loaded = loadAndCompile(opts);
82
+ console.log((0, installation_1.formatInstallationPlan)((0, installation_1.planInstallation)(loaded.desired, new installation_1.InstallationStateStore())));
83
+ });
84
+ });
85
+ installation
86
+ .command('apply')
87
+ .summary('Apply the compiled installation plan through the shared launcher')
88
+ .option('--config <path>', 'Path to xema.config.yaml')
89
+ .option('--web', 'Also start the host-shell frontend', false)
90
+ .option('--detach', 'Return after container workloads are ready (container substrate only)', false)
91
+ .option('--allow-destructive', 'Authorize a reviewed destructive installation transition', false)
92
+ .action(async (opts) => {
93
+ await runGuarded('apply', async () => {
94
+ const loaded = loadAndCompile(opts);
95
+ const store = new installation_1.InstallationStateStore();
96
+ const preview = (0, installation_1.planInstallation)(loaded.desired, store);
97
+ console.log((0, installation_1.formatInstallationPlan)(preview));
98
+ const rendering = (0, installation_1.renderCurrentLauncherPlan)(loaded.desired);
99
+ const result = await (0, installation_1.applyInstallation)(loaded.desired, store, (onReady) => (0, foreground_1.bringUpForeground)({
100
+ config: rendering.config,
101
+ includeWeb: rendering.config.app.web.enabled,
102
+ detach: opts.detach,
103
+ installationIdentity: loaded.installationIdentity,
104
+ installationId: loaded.desired.metadata.name,
105
+ planHash: loaded.desired.effectivePlanHash,
106
+ onReady: async (handle) => {
107
+ await onReady(await (0, installation_1.proveLocalLaunchReadiness)(handle, loaded.desired.effectivePlanHash));
108
+ },
109
+ }), {
110
+ allowDestructive: opts.allowDestructive,
111
+ forceExecution: true,
112
+ renderedArtifacts: rendering.renderedArtifacts,
113
+ });
114
+ console.log(result.executed
115
+ ? `Applied installation plan ${result.desired.effectivePlanHash}.`
116
+ : `No changes — installation plan ${result.desired.effectivePlanHash} is already applied.`);
117
+ });
118
+ });
119
+ installation
120
+ .command('status')
121
+ .summary('Compare desired, last-applied, and observed installation state')
122
+ .option('--config <path>', 'Path to xema.config.yaml')
123
+ .action(async (opts) => {
124
+ await runGuarded('status', async () => {
125
+ const loaded = loadAndCompile(opts);
126
+ const store = new installation_1.InstallationStateStore();
127
+ const observedPlan = store.read(loaded.desired.metadata.name)?.plan ?? loaded.desired;
128
+ const expectation = resolveStatusExpectation(loaded, observedPlan);
129
+ const report = await (0, installation_1.installationStatus)(loaded.desired, store, expectation);
130
+ console.log(JSON.stringify(report, null, 2));
131
+ });
132
+ });
133
+ installation
134
+ .command('support-bundle')
135
+ .summary('Write a redacted, integrity-hashed diagnostic bundle')
136
+ .option('--config <path>', 'Path to xema.config.yaml')
137
+ .option('--output <path>', 'Output JSON path')
138
+ .option('--force', 'Replace an existing output file', false)
139
+ .action(async (opts) => {
140
+ await runGuarded('support-bundle', async () => {
141
+ const loaded = loadAndCompile(opts);
142
+ const store = new installation_1.InstallationStateStore();
143
+ const observedPlan = store.read(loaded.desired.metadata.name)?.plan ?? loaded.desired;
144
+ const expectation = resolveStatusExpectation(loaded, observedPlan);
145
+ const report = await (0, installation_1.installationStatus)(loaded.desired, store, expectation);
146
+ const bundle = (0, installation_1.createSupportBundle)(loaded.config, loaded.desired, report);
147
+ const output = (0, node_path_1.resolve)(opts.output ?? `xema-support-${loaded.desired.metadata.name}.json`);
148
+ (0, installation_1.writeSupportBundle)(output, bundle, { overwrite: opts.force });
149
+ console.log(`Wrote redacted support bundle ${output} (${bundle.manifest.algorithm}:${bundle.manifest.payloadHash}).`);
150
+ });
151
+ });
152
+ }
153
+ function resolveStatusExpectation(loaded, observedPlan) {
154
+ const config = observedPlan.effectivePlanHash === loaded.desired.effectivePlanHash
155
+ ? loaded.config
156
+ : (0, installation_1.launcherConfigFromInstallation)(observedPlan);
157
+ const plan = (0, launch_1.resolveLaunchPlan)({
158
+ config,
159
+ includeWeb: config.app.web.enabled,
160
+ installationIdentity: loaded.installationIdentity,
161
+ offline: true,
162
+ });
163
+ return (0, installation_1.readinessExpectationFromLaunchPlan)(plan, observedPlan.effectivePlanHash, observedPlan.metadata.name);
164
+ }
165
+ async function providerReadiness(desired, available, installationIdentity) {
166
+ const declared = new Set();
167
+ const baseDirectory = (0, node_path_1.dirname)(installationIdentity);
168
+ for (const value of available) {
169
+ if (!Object.values(installation_1.SecretReferenceProvider).includes(value)) {
170
+ throw new Error(`Unknown secret provider readiness value "${value}".`);
171
+ }
172
+ declared.add(value);
173
+ }
174
+ const readiness = new Map();
175
+ for (const binding of desired.spec.secrets) {
176
+ const provider = binding.provider;
177
+ if (provider === installation_1.SecretReferenceProvider.Environment) {
178
+ const value = process.env[binding.variable];
179
+ if (value === undefined || value.length === 0) {
180
+ throw new Error(`Environment provider is unresolved for binding "${binding.name}"; ${binding.variable} is unset or empty.`);
181
+ }
182
+ readiness.set(provider, { provider, available: true });
183
+ continue;
184
+ }
185
+ if (provider === installation_1.SecretReferenceProvider.File) {
186
+ const path = (0, node_path_1.isAbsolute)(binding.path)
187
+ ? binding.path
188
+ : (0, node_path_1.resolve)(baseDirectory, binding.path);
189
+ const metadata = (0, node_fs_1.lstatSync)(path);
190
+ if (!metadata.isFile() || metadata.size === 0) {
191
+ throw new Error(`File provider is unresolved for binding "${binding.name}"; its source must be a non-empty regular file.`);
192
+ }
193
+ if (process.platform !== 'win32' && (metadata.mode & 0o077) !== 0) {
194
+ throw new Error(`File provider is unsafe for binding "${binding.name}"; its source must have mode 0600 or stricter.`);
195
+ }
196
+ readiness.set(provider, { provider, available: true });
197
+ continue;
198
+ }
199
+ if (provider === installation_1.SecretReferenceProvider.Prompt) {
200
+ if (process.stdin.isTTY !== true || process.stderr.isTTY !== true) {
201
+ throw new Error(`Prompt provider is unavailable for binding "${binding.name}" outside an interactive terminal.`);
202
+ }
203
+ readiness.set(provider, { provider, available: true });
204
+ continue;
205
+ }
206
+ if (provider === installation_1.SecretReferenceProvider.ManagedLocal) {
207
+ const store = new managed_local_secret_store_1.ManagedLocalSecretStore({ installationIdentity });
208
+ if (!(await store.verify(binding.entry))) {
209
+ throw new Error(`Managed-local binding "${binding.name}" has no authenticated immutable entry "${binding.entry}".`);
210
+ }
211
+ readiness.set(provider, {
212
+ provider,
213
+ available: true,
214
+ keyRef: store.keyReference(),
215
+ resolvedEntries: [
216
+ ...(readiness.get(provider)?.resolvedEntries ?? []),
217
+ binding.entry,
218
+ ],
219
+ });
220
+ continue;
221
+ }
222
+ if (!declared.has(provider)) {
223
+ throw new Error(`Secret provider ${provider} has not been confirmed available; no fallback provider was attempted.`);
224
+ }
225
+ readiness.set(provider, { provider, available: true });
226
+ }
227
+ return [...readiness.values()];
228
+ }
229
+ function loadAndCompile(opts) {
230
+ return (0, cli_errors_1.asConfigError)(() => {
231
+ const loaded = (0, loader_1.loadXemaConfig)({ explicit: opts.config });
232
+ const sourceConfig = opts.web === true
233
+ ? {
234
+ ...loaded.config,
235
+ app: {
236
+ ...loaded.config.app,
237
+ web: { ...loaded.config.app.web, enabled: true },
238
+ },
239
+ }
240
+ : loaded.config;
241
+ const desired = (0, installation_1.compileCurrentInstallation)(sourceConfig, loaded.installationIdentity);
242
+ return {
243
+ config: sourceConfig,
244
+ installationIdentity: loaded.installationIdentity,
245
+ desired,
246
+ };
247
+ });
248
+ }
249
+ async function runGuarded(command, operation) {
250
+ try {
251
+ await operation();
252
+ }
253
+ catch (error) {
254
+ const message = error instanceof Error ? error.message : String(error);
255
+ (0, exit_codes_1.exitWith)((0, cli_errors_1.lifecycleExitCode)(error), `xema installation ${command} failed: ${message}`);
256
+ }
257
+ }
258
+ //# sourceMappingURL=installation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installation.js","sourceRoot":"","sources":["../../src/commands/installation.ts"],"names":[],"mappings":";;AAqEA,0CA4NC;AAjSD,qCAKiB;AACjB,yCAAyD;AAEzD,+BAAsE;AAEtE,kDAAqE;AACrE,kDAA6C;AAC7C,qDAA0D;AAC1D,sDAA0D;AAC1D,0DAoBiC;AACjC,8CAAsD;AACtD,8FAAwF;AAiCxF,SAAgB,eAAe,CAAC,OAAgB;IAC9C,MAAM,YAAY,GAAG,OAAO;SACzB,OAAO,CAAC,cAAc,CAAC;SACvB,OAAO,CAAC,2DAA2D,CAAC;SACpE,WAAW,CACV,8EAA8E;QAC5E,wEAAwE,CAC3E,CAAC;IAEJ,YAAY;SACT,OAAO,CAAC,MAAM,CAAC;SACf,OAAO,CAAC,+DAA+D,CAAC;SACxE,cAAc,CACb,qBAAqB,EACrB,WAAW,IAAA,wCAAyB,GAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CACrD;SACA,MAAM,CAAC,eAAe,EAAE,mBAAmB,EAAE,MAAM,CAAC;SACpD,MAAM,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,KAAK,CAAC;SAC5D,MAAM,CAAC,iBAAiB,EAAE,0BAA0B,EAAE,wBAAwB,CAAC;SAC/E,MAAM,CAAC,SAAS,EAAE,uCAAuC,EAAE,KAAK,CAAC;SACjE,MAAM,CAAC,KAAK,EAAE,IAA6B,EAAE,EAAE;QAC9C,MAAM,UAAU,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE;YAClC,MAAM,MAAM,GAAG,IAAA,mBAAO,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACpC,IAA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B,CAC5B,CAAC;QACF,OAAO;YACL,MAAM,EAAE,YAAY;YACpB,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;YACjD,OAAO;SACR,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,UAAU,CACvB,OAAe,EACf,SAA8B;IAE9B,IAAI,CAAC;QACH,MAAM,SAAS,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,IAAA,qBAAQ,EACN,IAAA,8BAAiB,EAAC,KAAK,CAAC,EACxB,qBAAqB,OAAO,YAAY,OAAO,EAAE,CAClD,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'commander';
2
+ export declare function registerCommand(program: Command): void;
3
+ //# sourceMappingURL=license.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../src/commands/license.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsCtD"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerCommand = registerCommand;
4
+ const node_fs_1 = require("node:fs");
5
+ const exit_codes_1 = require("../lib/exit-codes");
6
+ const loader_1 = require("../runtime/config/loader");
7
+ const license_report_1 = require("../runtime/license/license-report");
8
+ const license_store_1 = require("../runtime/license/license-store");
9
+ const resolve_license_1 = require("../runtime/license/resolve-license");
10
+ const store_license_1 = require("../runtime/license/store-license");
11
+ function registerCommand(program) {
12
+ const license = program
13
+ .command('license')
14
+ .summary('Inspect and apply the Xema license')
15
+ .description('A license says which editions, biomes and capability classes this ' +
16
+ 'installation may run. The open-source edition needs no license at all — ' +
17
+ 'one is compiled into the CLI — so these commands are for a commercial ' +
18
+ 'or appliance license.');
19
+ license
20
+ .command('apply')
21
+ .argument('<file>', 'File holding the license (a single-line compact JWS), or `-` for stdin.')
22
+ .summary('Install or replace this machine\'s license')
23
+ .description('Verify a license and store it in the credential store ' +
24
+ `(${license_store_1.LICENSE_STORE_DESCRIPTION}). The file is read, never echoed. A license ` +
25
+ 'that does not verify is REFUSED and nothing is written.')
26
+ .action((file) => {
27
+ runApply(file);
28
+ });
29
+ license
30
+ .command('show')
31
+ .summary('Report the license state and what it entitles')
32
+ .description('Print which license is in force, where it sits on the expiry ladder, and ' +
33
+ 'whether it entitles the configured edition. Never prints the license itself.')
34
+ .option('--config <path>', 'Path to xema.config.yaml (selects the edition).')
35
+ .action((opts) => {
36
+ runShow(opts.config);
37
+ });
38
+ }
39
+ function readLicenseInput(file) {
40
+ const raw = file === '-' ? (0, node_fs_1.readFileSync)(0, 'utf8') : (0, node_fs_1.readFileSync)(file, 'utf8');
41
+ const token = raw.trim();
42
+ if (token.length === 0) {
43
+ throw new Error(file === '-'
44
+ ? 'stdin carried no license.'
45
+ : `${file} is empty — it must hold the license token.`);
46
+ }
47
+ return token;
48
+ }
49
+ function runApply(file) {
50
+ let token;
51
+ try {
52
+ token = readLicenseInput(file);
53
+ }
54
+ catch (err) {
55
+ return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, `xema license apply: ${err instanceof Error ? err.message : String(err)}`);
56
+ }
57
+ const stored = (0, store_license_1.storeCustomerLicense)(token);
58
+ if (!stored.ok) {
59
+ return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, [
60
+ `xema license apply: refused — the license did not verify (${stored.code}).`,
61
+ ` ${stored.message}`,
62
+ '',
63
+ stored.remediation,
64
+ ].join('\n'));
65
+ }
66
+ console.log(`✓ License stored — ${license_store_1.LICENSE_STORE_DESCRIPTION}`);
67
+ console.log(` ${(0, license_report_1.describeLicenseState)(stored.resolution)}`);
68
+ for (const warning of (0, license_report_1.licenseWarnings)(stored.resolution)) {
69
+ console.log(` ${warning}`);
70
+ }
71
+ console.log('');
72
+ console.log('Check what it entitles with `xema license show`.');
73
+ (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.Ok);
74
+ }
75
+ function runShow(configPath) {
76
+ const resolution = (0, resolve_license_1.resolveEffectiveLicense)();
77
+ if (!resolution.ok) {
78
+ return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.GenericError, [
79
+ `xema license: no license is in force (${resolution.code}).`,
80
+ ` ${resolution.message}`,
81
+ '',
82
+ resolution.remediation,
83
+ ].join('\n'));
84
+ }
85
+ console.log((0, license_report_1.describeLicenseState)(resolution));
86
+ const { config } = (0, loader_1.loadXemaConfig)(configPath !== undefined ? { explicit: configPath } : {});
87
+ for (const line of (0, license_report_1.describeEditionEntitlement)((0, license_report_1.evaluateEditionEntitlement)(resolution, config.edition))) {
88
+ console.log(line);
89
+ }
90
+ const warnings = (0, license_report_1.licenseWarnings)(resolution);
91
+ for (const warning of warnings) {
92
+ console.log('');
93
+ console.log(warning);
94
+ }
95
+ (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.Ok);
96
+ }
97
+ //# sourceMappingURL=license.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.js","sourceRoot":"","sources":["../../src/commands/license.ts"],"names":[],"mappings":";;AA0BA,0CAsCC;AAhED,qCAAuC;AAEvC,kDAA8D;AAC9D,qDAA0D;AAC1D,sEAK2C;AAC3C,oEAA6E;AAC7E,wEAA6E;AAC7E,oEAAwE;AAcxE,SAAgB,eAAe,CAAC,OAAgB;IAC9C,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,SAAS,CAAC;SAClB,OAAO,CAAC,oCAAoC,CAAC;SAC7C,WAAW,CACV,oEAAoE;QAClE,0EAA0E;QAC1E,wEAAw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C,YAAY,EAC5B;YACE,yCAAyC,UAAU,CAAC,IAAI,IAAI;YAC5D,KAAK,UAAU,CAAC,OAAO,EAAE;YACzB,EAAE;YACF,UAAU,CAAC,WAAW;SACvB,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,IAAA,qCAAoB,EAAC,UAAU,CAAC,CAAC,CAAC;IAC9C,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,uBAAc,EAC/B,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CACzD,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,IAAA,2CAA0B,EAC3C,IAAA,2CAA0B,EAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CACvD,EAAE,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,QAAQ,GAAG,IAAA,gCAAe,EAAC,UAAU,CAAC,CAAC;IAC7C,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IACD,IAAA,qBAAQ,EAAC,4BAAe,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Command } from 'commander';
2
+ export declare const ISSUER_ENV_VAR = "XEMA_ISSUER";
3
+ export declare function registerCommand(program: Command): void;
4
+ //# sourceMappingURL=login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,eAAO,MAAM,cAAc,gBAAgB,CAAC;AAQ5C,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2BtD"}
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ISSUER_ENV_VAR = void 0;
4
+ exports.registerCommand = registerCommand;
5
+ const exit_codes_1 = require("../lib/exit-codes");
6
+ const device_flow_1 = require("../runtime/auth/device-flow");
7
+ const session_auth_1 = require("../runtime/auth/session-auth");
8
+ const session_store_1 = require("../runtime/auth/session-store");
9
+ const token_claims_1 = require("../runtime/auth/token-claims");
10
+ exports.ISSUER_ENV_VAR = 'XEMA_ISSUER';
11
+ function registerCommand(program) {
12
+ program
13
+ .command('login')
14
+ .description('Sign in to a Xema deployment via device-code login')
15
+ .option('--endpoint <url>', 'Platform API base URL (or env XEMA_ENDPOINT)')
16
+ .option('--issuer <url>', `OIDC issuer URL (or env ${exports.ISSUER_ENV_VAR})`)
17
+ .option('--client-id <id>', `Realm client id used for the device grant (default: ${device_flow_1.DEFAULT_CLI_CLIENT_ID})`)
18
+ .action(async (opts) => {
19
+ await runLogin(opts);
20
+ });
21
+ program
22
+ .command('logout')
23
+ .description('Remove the stored Xema session')
24
+ .action(() => {
25
+ runLogout();
26
+ });
27
+ program
28
+ .command('whoami')
29
+ .description('Show the current Xema session')
30
+ .action(async () => {
31
+ await runWhoami();
32
+ });
33
+ }
34
+ function requireValue(fromFlag, envVar, flagName, label) {
35
+ const value = fromFlag ?? process.env[envVar];
36
+ if (value === undefined || value.length === 0) {
37
+ return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, `No ${label}. Pass ${flagName} <url> or set ${envVar}.`);
38
+ }
39
+ return value;
40
+ }
41
+ async function runLogin(opts) {
42
+ const endpoint = requireValue(opts.endpoint, 'XEMA_ENDPOINT', '--endpoint', 'platform endpoint').replace(/\/+$/, '');
43
+ const issuer = requireValue(opts.issuer, exports.ISSUER_ENV_VAR, '--issuer', 'OIDC issuer').replace(/\/+$/, '');
44
+ const clientId = opts.clientId !== undefined && opts.clientId.length > 0
45
+ ? opts.clientId
46
+ : device_flow_1.DEFAULT_CLI_CLIENT_ID;
47
+ const deps = (0, device_flow_1.defaultDeviceFlowDeps)();
48
+ try {
49
+ const endpoints = await (0, device_flow_1.discoverOidcEndpoints)(issuer, deps);
50
+ const authorization = await (0, device_flow_1.requestDeviceAuthorization)(endpoints, clientId, deps);
51
+ console.log('');
52
+ console.log(` Open: ${authorization.verificationUri}`);
53
+ console.log(` Code: ${authorization.userCode}`);
54
+ if (authorization.verificationUriComplete !== undefined) {
55
+ console.log('');
56
+ console.log(` Or go straight to: ${authorization.verificationUriComplete}`);
57
+ }
58
+ console.log('');
59
+ console.log('Waiting for approval…');
60
+ const tokens = await (0, device_flow_1.pollForDeviceTokens)(endpoints, clientId, authorization, deps);
61
+ const subject = (0, token_claims_1.displaySubjectFromToken)(tokens.accessToken);
62
+ const session = {
63
+ endpoint,
64
+ issuer: endpoints.issuer,
65
+ clientId,
66
+ accessToken: tokens.accessToken,
67
+ ...(tokens.refreshToken !== undefined
68
+ ? { refreshToken: tokens.refreshToken }
69
+ : {}),
70
+ expiresAt: tokens.expiresAt,
71
+ ...(subject !== undefined ? { subject } : {}),
72
+ };
73
+ (0, session_store_1.writeSession)(session);
74
+ console.log('');
75
+ console.log(subject !== undefined
76
+ ? `Signed in as ${subject} → ${endpoint}`
77
+ : `Signed in → ${endpoint}`);
78
+ if (tokens.refreshToken === undefined) {
79
+ console.log('Note: the identity provider returned no refresh token, so this ' +
80
+ 'session ends when the access token expires. Enable the ' +
81
+ '`offline_access` scope on the realm client to keep it alive.');
82
+ }
83
+ console.log(`Session stored at ${session_store_1.SESSION_FILE}`);
84
+ }
85
+ catch (err) {
86
+ if (err instanceof device_flow_1.DeviceFlowError) {
87
+ (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.GenericError, err.message);
88
+ }
89
+ throw err;
90
+ }
91
+ }
92
+ function runLogout() {
93
+ const removed = (0, session_store_1.clearSession)();
94
+ (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.Ok, removed
95
+ ? `Signed out — removed ${session_store_1.SESSION_FILE}`
96
+ : 'No stored Xema session; nothing to remove.');
97
+ }
98
+ async function runWhoami() {
99
+ let stored;
100
+ try {
101
+ stored = (0, session_store_1.readSession)();
102
+ }
103
+ catch (err) {
104
+ const detail = err instanceof Error ? err.message : String(err);
105
+ return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, detail);
106
+ }
107
+ if (stored === undefined) {
108
+ return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.NotFound, 'Not signed in. Run `xema login`.');
109
+ }
110
+ let session;
111
+ try {
112
+ session = await (0, session_auth_1.loadUsableSession)();
113
+ }
114
+ catch (err) {
115
+ const detail = err instanceof Error ? err.message : String(err);
116
+ return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, detail);
117
+ }
118
+ if (session === undefined) {
119
+ return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.NotFound, 'Not signed in. Run `xema login`.');
120
+ }
121
+ console.log(`Subject : ${session.subject ?? '(unknown)'}`);
122
+ console.log(`Endpoint: ${session.endpoint}`);
123
+ console.log(`Issuer : ${session.issuer}`);
124
+ console.log(`Client : ${session.clientId}`);
125
+ console.log(`Expires : ${new Date(session.expiresAt).toISOString()}`);
126
+ }
127
+ //# sourceMappingURL=login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;AA+CA,0CA2BC;AAzDD,kDAA8D;AAC9D,6DAOqC;AACrC,+DAAiE;AACjE,iEAMuC;AACvC,+DAAuE;AAK1D,QAAA,cAAc,GAAG,aAAa,CAAC;AAQ5C,SAAgB,eAAe,CAAC,OAAgB;IAC9C,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,oDAAoD,CAAC;SACjE,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,CAAC,GAAG,CAAC,aAAa,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxE,CAAC"}
@@ -1,3 +1,24 @@
1
+ import { XemaCliExitCode } from '../lib/exit-codes';
2
+ import { loadXemaConfig } from '../runtime/config/loader';
3
+ import { DockerCli } from '../runtime/runner/docker-cli';
4
+ import { HelmCli } from '../runtime/runner/helm-cli';
5
+ import { KubeCli } from '../runtime/runner/kube-cli';
1
6
  import type { Command } from 'commander';
7
+ interface LogsOptions {
8
+ follow?: boolean;
9
+ config?: string;
10
+ }
11
+ export interface LogsSeams {
12
+ readonly docker?: DockerCli;
13
+ readonly helm?: HelmCli;
14
+ readonly kube?: KubeCli;
15
+ readonly loadConfig?: typeof loadXemaConfig;
16
+ }
17
+ export interface LogsOutcome {
18
+ readonly exitCode: XemaCliExitCode;
19
+ readonly lines: readonly string[];
20
+ }
2
21
  export declare function registerCommand(program: Command): void;
22
+ export declare function runLogs(service: string | undefined, opts?: LogsOptions, seams?: LogsSeams): Promise<LogsOutcome>;
23
+ export {};
3
24
  //# sourceMappingURL=logs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../src/commands/logs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CActD"}
1
+ {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../src/commands/logs.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAGrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBzC,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,cAAc,CAAC;CAC7C;AAOD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IAEnC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwBtD;AAaD,wBAAsB,OAAO,CAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,IAAI,GAAE,WAAgB,EACtB,KAAK,GAAE,SAAc,GACpB,OAAO,CAAC,WAAW,CAAC,CAoBtB"}