@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,418 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.LocalInstallationReadinessObserver = void 0;
18
+ exports.readinessExpectationFromLaunchPlan = readinessExpectationFromLaunchPlan;
19
+ exports.proveLocalLaunchReadiness = proveLocalLaunchReadiness;
20
+ const helm_release_readiness_1 = require("./helm-release-readiness");
21
+ const readiness_proof_1 = require("./readiness-proof");
22
+ const schema_1 = require("../config/schema");
23
+ const run_manifest_1 = require("../run-manifest");
24
+ const container_runner_1 = require("../runner/container-runner");
25
+ const docker_cli_1 = require("../runner/docker-cli");
26
+ const health_probe_1 = require("../runner/health-probe");
27
+ __exportStar(require("./readiness-proof"), exports);
28
+ function readinessExpectationFromLaunchPlan(plan, effectivePlanHash, installationId, executionId) {
29
+ if (plan.substrate === schema_1.Substrate.Helm && plan.helmNamespace === undefined) {
30
+ throw new Error('A Helm launch plan must resolve its Kubernetes namespace before readiness can be proved.');
31
+ }
32
+ return {
33
+ substrate: plan.substrate,
34
+ distributionLockPath: plan.lock.path,
35
+ installationId,
36
+ effectivePlanHash,
37
+ ...(executionId === undefined ? {} : { executionId }),
38
+ ...(plan.helmNamespace === undefined
39
+ ? {}
40
+ : { namespace: plan.helmNamespace }),
41
+ workloads: plan.roster.map((entry) => {
42
+ const port = plan.ports.get(entry.name);
43
+ if (port === undefined) {
44
+ throw new Error(`Resolved launch plan has no port for expected workload ${entry.name}.`);
45
+ }
46
+ return {
47
+ name: entry.name,
48
+ unitType: entry.unitType,
49
+ port,
50
+ ...(plan.substrate === schema_1.Substrate.Container
51
+ ? {
52
+ image: (0, container_runner_1.containerImageForRosterEntry)(entry),
53
+ containerPort: container_runner_1.DEFAULT_CONTAINER_SERVICE_PORT,
54
+ }
55
+ : {}),
56
+ };
57
+ }),
58
+ };
59
+ }
60
+ async function proveLocalLaunchReadiness(handle, effectivePlanHash, observer = new LocalInstallationReadinessObserver()) {
61
+ const observed = await observer.observe(readinessExpectationFromLaunchPlan(handle.plan, effectivePlanHash, handle.installationId, handle.executionId));
62
+ const handleIdentityIssue = handle.planHash === effectivePlanHash
63
+ ? []
64
+ : [
65
+ {
66
+ code: readiness_proof_1.InstallationReadinessIssueCode.PlanIdentityMismatch,
67
+ message: `Launch handle plan ${handle.planHash} does not match effective plan ${effectivePlanHash}.`,
68
+ remediation: 'Discard the stale launch handle and execute the current desired plan.',
69
+ },
70
+ ];
71
+ const running = new Set(handle.result.running.map((workload) => workload.name));
72
+ const executionIssues = handle.plan.roster
73
+ .filter((workload) => !running.has(workload.name))
74
+ .map((workload) => {
75
+ const skipped = handle.result.skipped.find((candidate) => candidate.name === workload.name);
76
+ return {
77
+ code: readiness_proof_1.InstallationReadinessIssueCode.MissingWorkload,
78
+ workload: workload.name,
79
+ message: skipped === undefined
80
+ ? `Launch execution did not report expected workload ${workload.name} ready.`
81
+ : `Launch execution skipped expected workload ${workload.name}: ${skipped.reason}`,
82
+ remediation: 'Resolve the launch failure and re-run `xema installation apply`; an older same-name workload is not readiness evidence.',
83
+ };
84
+ });
85
+ return {
86
+ ...observed,
87
+ ready: observed.ready &&
88
+ handleIdentityIssue.length === 0 &&
89
+ executionIssues.length === 0,
90
+ issues: [
91
+ ...observed.issues,
92
+ ...handleIdentityIssue,
93
+ ...executionIssues,
94
+ ],
95
+ };
96
+ }
97
+ class LocalInstallationReadinessObserver {
98
+ docker;
99
+ readinessProbe;
100
+ nativeManifest;
101
+ processProbe;
102
+ nativePortOwnerProbe;
103
+ nativeProcessIdentityProbe;
104
+ helmObserver;
105
+ constructor(docker = new docker_cli_1.DockerCli(), readinessProbe = health_probe_1.probeReadyOnce, nativeManifest = run_manifest_1.readRunManifest, processProbe = processIsAlive, nativePortOwnerProbe = run_manifest_1.runManifestEntryOwnsPortAsync, nativeProcessIdentityProbe = run_manifest_1.runManifestEntryProcessMatchesAsync, helmObserver = new helm_release_readiness_1.HelmReleaseReadinessObserver()) {
106
+ this.docker = docker;
107
+ this.readinessProbe = readinessProbe;
108
+ this.nativeManifest = nativeManifest;
109
+ this.processProbe = processProbe;
110
+ this.nativePortOwnerProbe = nativePortOwnerProbe;
111
+ this.nativeProcessIdentityProbe = nativeProcessIdentityProbe;
112
+ this.helmObserver = helmObserver;
113
+ }
114
+ async observe(expectation) {
115
+ switch (expectation.substrate) {
116
+ case schema_1.Substrate.Native:
117
+ return this.observeNative(expectation);
118
+ case schema_1.Substrate.Container:
119
+ return this.observeContainers(expectation);
120
+ case schema_1.Substrate.Helm:
121
+ return this.helmObserver.observe(expectation);
122
+ }
123
+ }
124
+ async observeNative(expectation) {
125
+ const manifest = this.nativeManifest(expectation.installationId);
126
+ const consumed = new Set();
127
+ const workloads = [];
128
+ const issues = [];
129
+ const expectedResults = await (0, readiness_proof_1.mapConcurrentOrdered)(expectation.workloads, readiness_proof_1.MAX_CONCURRENT_READINESS_PROBES, async (expected) => {
130
+ const candidates = manifest.filter((entry) => entry.name === expected.name);
131
+ const entry = expectation.executionId === undefined
132
+ ? candidates.length === 1
133
+ ? candidates[0]
134
+ : undefined
135
+ : candidates.find((candidate) => candidate.executionId === expectation.executionId);
136
+ if (entry === undefined) {
137
+ return {
138
+ workloads: [],
139
+ issues: [(0, readiness_proof_1.missingWorkload)(expected.name)],
140
+ };
141
+ }
142
+ consumed.add(entry);
143
+ const processAlive = this.processProbe(entry.pid);
144
+ const processFingerprintMatches = processAlive &&
145
+ (await this.nativeProcessIdentityProbe(entry));
146
+ const lifecycleReady = entry.state === run_manifest_1.RunManifestServiceState.Ready;
147
+ const planMatches = entry.planHash === expectation.effectivePlanHash;
148
+ const executionMatches = expectation.executionId === undefined ||
149
+ entry.executionId === expectation.executionId;
150
+ const portMatches = entry.port === expected.port;
151
+ const endpointOwned = lifecycleReady &&
152
+ processFingerprintMatches &&
153
+ portMatches &&
154
+ (await this.nativePortOwnerProbe(entry));
155
+ const serviceReady = endpointOwned &&
156
+ (await this.readinessProbe(`http://127.0.0.1:${String(expected.port)}/health/ready`));
157
+ const workload = {
158
+ name: expected.name,
159
+ state: processAlive &&
160
+ lifecycleReady &&
161
+ processFingerprintMatches &&
162
+ planMatches &&
163
+ executionMatches &&
164
+ portMatches &&
165
+ endpointOwned &&
166
+ serviceReady
167
+ ? 'ready'
168
+ : 'unhealthy',
169
+ expected: true,
170
+ checks: {
171
+ processAlive,
172
+ lifecycleState: entry.state,
173
+ lifecycleReady,
174
+ processFingerprintMatches,
175
+ installationId: entry.installationId,
176
+ planHash: entry.planHash,
177
+ planMatches,
178
+ executionId: entry.executionId,
179
+ executionMatches,
180
+ recordedPort: entry.port,
181
+ expectedPort: expected.port,
182
+ portMatches,
183
+ endpointOwned,
184
+ serviceReady,
185
+ pid: entry.pid,
186
+ port: expected.port,
187
+ },
188
+ };
189
+ const workloadIssues = [];
190
+ if (!processAlive) {
191
+ workloadIssues.push({
192
+ code: readiness_proof_1.InstallationReadinessIssueCode.ProcessNotRunning,
193
+ workload: expected.name,
194
+ message: `Expected process ${expected.name} is not running.`,
195
+ remediation: 'Inspect the workload logs, then re-run `xema installation apply`.',
196
+ });
197
+ }
198
+ else if (!lifecycleReady) {
199
+ workloadIssues.push({
200
+ code: readiness_proof_1.InstallationReadinessIssueCode.ServiceNotReady,
201
+ workload: expected.name,
202
+ message: `Native workload ${expected.name} is still in its durable starting state.`,
203
+ remediation: 'Wait for the exact spawned process to pass readiness or inspect its startup failure.',
204
+ });
205
+ }
206
+ else if (!processFingerprintMatches) {
207
+ workloadIssues.push({
208
+ code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
209
+ workload: expected.name,
210
+ message: `Process ${String(entry.pid)} no longer matches the recorded birth fingerprint for ${expected.name}.`,
211
+ remediation: 'Treat the PID as reused/stale, leave it untouched, and launch a new exact execution.',
212
+ });
213
+ }
214
+ else if (!serviceReady) {
215
+ workloadIssues.push((0, readiness_proof_1.serviceNotReady)(expected.name));
216
+ }
217
+ if (!planMatches) {
218
+ workloadIssues.push((0, readiness_proof_1.planIdentityMismatch)(expected.name));
219
+ }
220
+ if (!executionMatches) {
221
+ workloadIssues.push((0, readiness_proof_1.executionIdentityMismatch)(expected.name));
222
+ }
223
+ if (!portMatches) {
224
+ workloadIssues.push({
225
+ code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
226
+ workload: expected.name,
227
+ message: `Native manifest records ${expected.name} on port ${String(entry.port)}, expected ${String(expected.port)}.`,
228
+ remediation: 'Stop the mismatched process and reapply the exact distribution-lock launch plan.',
229
+ });
230
+ }
231
+ if (processAlive && portMatches && !endpointOwned) {
232
+ workloadIssues.push({
233
+ code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
234
+ workload: expected.name,
235
+ message: `Process ${String(entry.pid)} does not own the recorded ready endpoint for ${expected.name}.`,
236
+ remediation: 'Stop the unrelated endpoint owner and reapply; health must be served by the recorded workload process tree.',
237
+ });
238
+ }
239
+ return { workloads: [workload], issues: workloadIssues };
240
+ });
241
+ for (const result of expectedResults) {
242
+ workloads.push(...result.workloads);
243
+ issues.push(...result.issues);
244
+ }
245
+ for (const entry of manifest) {
246
+ if (!consumed.has(entry)) {
247
+ const processAlive = this.processProbe(entry.pid);
248
+ workloads.push({
249
+ name: entry.name,
250
+ state: processAlive ? 'unexpected-running' : 'stale',
251
+ expected: false,
252
+ checks: {
253
+ processAlive,
254
+ pid: entry.pid,
255
+ installationId: entry.installationId,
256
+ planHash: entry.planHash,
257
+ executionId: entry.executionId,
258
+ },
259
+ });
260
+ issues.push((0, readiness_proof_1.unexpectedWorkload)(entry.name));
261
+ }
262
+ }
263
+ return (0, readiness_proof_1.buildReadinessProof)(expectation, workloads, issues);
264
+ }
265
+ async observeContainers(expectation) {
266
+ if (!(await this.docker.available())) {
267
+ return (0, readiness_proof_1.unavailableProof)(expectation, 'The container runtime is not reachable.', 'Start the configured Docker/Podman runtime and run `xema installation status` again.');
268
+ }
269
+ let states;
270
+ try {
271
+ const names = await this.docker.launcherServiceContainersStrict(expectation.installationId);
272
+ states = await this.docker.inspectContainers(names);
273
+ }
274
+ catch (error) {
275
+ return (0, readiness_proof_1.unavailableProof)(expectation, `Container readiness observation failed: ${error instanceof Error ? error.message : String(error)}`, 'Restore the container runtime API and retry; no applied state was committed.');
276
+ }
277
+ const consumed = new Set();
278
+ const workloads = [];
279
+ const issues = [];
280
+ const expectedResults = await (0, readiness_proof_1.mapConcurrentOrdered)(expectation.workloads, readiness_proof_1.MAX_CONCURRENT_READINESS_PROBES, async (expected) => {
281
+ const candidates = states.filter((state) => state.name === expected.name);
282
+ const state = expectation.executionId === undefined
283
+ ? candidates.length === 1
284
+ ? candidates[0]
285
+ : undefined
286
+ : candidates.find((candidate) => candidate.executionId === expectation.executionId);
287
+ if (state === undefined) {
288
+ return {
289
+ workloads: [],
290
+ issues: [(0, readiness_proof_1.missingWorkload)(expected.name)],
291
+ };
292
+ }
293
+ consumed.add(state);
294
+ const portBindingMatches = expected.containerPort !== undefined &&
295
+ state.publishedPorts[expected.containerPort] === expected.port;
296
+ const serviceReady = state.running &&
297
+ portBindingMatches &&
298
+ (await this.readinessProbe(`http://127.0.0.1:${String(expected.port)}/health/ready`));
299
+ const healthAcceptable = state.health === undefined || state.health === 'healthy';
300
+ const imageMatches = expected.image !== undefined && state.image === expected.image;
301
+ const installationMatches = state.installationId === expectation.installationId;
302
+ const planMatches = state.planHash === expectation.effectivePlanHash;
303
+ const executionMatches = expectation.executionId === undefined ||
304
+ state.executionId === expectation.executionId;
305
+ const workload = {
306
+ name: expected.name,
307
+ state: state.running &&
308
+ healthAcceptable &&
309
+ imageMatches &&
310
+ installationMatches &&
311
+ planMatches &&
312
+ executionMatches &&
313
+ portBindingMatches &&
314
+ serviceReady
315
+ ? 'ready'
316
+ : 'unhealthy',
317
+ expected: true,
318
+ checks: {
319
+ containerRunning: state.running,
320
+ containerHealth: state.health ?? 'not-configured',
321
+ expectedImage: expected.image ?? 'missing',
322
+ observedImage: state.image,
323
+ imageMatches,
324
+ installationId: state.installationId ?? 'missing',
325
+ installationMatches,
326
+ planHash: state.planHash ?? 'missing',
327
+ planMatches,
328
+ executionId: state.executionId ?? 'missing',
329
+ executionMatches,
330
+ expectedContainerPort: expected.containerPort ?? 'missing',
331
+ observedHostPort: expected.containerPort === undefined
332
+ ? 'missing'
333
+ : (state.publishedPorts[expected.containerPort] ?? 'missing'),
334
+ portBindingMatches,
335
+ serviceReady,
336
+ port: expected.port,
337
+ },
338
+ };
339
+ const workloadIssues = [];
340
+ if (!state.running) {
341
+ workloadIssues.push({
342
+ code: readiness_proof_1.InstallationReadinessIssueCode.ContainerNotRunning,
343
+ workload: expected.name,
344
+ message: `Expected container ${expected.name} is not running.`,
345
+ remediation: 'Inspect the container logs and runtime state, then re-run `xema installation apply`.',
346
+ });
347
+ }
348
+ if (!healthAcceptable) {
349
+ workloadIssues.push({
350
+ code: readiness_proof_1.InstallationReadinessIssueCode.ContainerUnhealthy,
351
+ workload: expected.name,
352
+ message: `Container ${expected.name} reports health ${state.health ?? 'unknown'}.`,
353
+ remediation: 'Inspect the container healthcheck output and service logs before reapplying.',
354
+ });
355
+ }
356
+ if (!imageMatches) {
357
+ workloadIssues.push({
358
+ code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
359
+ workload: expected.name,
360
+ message: `Container ${expected.name} uses ${state.image}, not the distribution-lock image ${expected.image ?? 'missing'}.`,
361
+ remediation: 'Remove the stale container and re-run apply so the pinned distribution image is launched.',
362
+ });
363
+ }
364
+ if (!planMatches || !installationMatches) {
365
+ workloadIssues.push((0, readiness_proof_1.planIdentityMismatch)(expected.name));
366
+ }
367
+ if (!executionMatches) {
368
+ workloadIssues.push((0, readiness_proof_1.executionIdentityMismatch)(expected.name));
369
+ }
370
+ if (!portBindingMatches) {
371
+ workloadIssues.push({
372
+ code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
373
+ workload: expected.name,
374
+ message: `Container ${expected.name} does not publish its expected service port to host port ${String(expected.port)}.`,
375
+ remediation: 'Reconcile the installation so the owned container, not an unrelated host process, serves the probed endpoint.',
376
+ });
377
+ }
378
+ if (state.running && !serviceReady) {
379
+ workloadIssues.push((0, readiness_proof_1.serviceNotReady)(expected.name));
380
+ }
381
+ return { workloads: [workload], issues: workloadIssues };
382
+ });
383
+ for (const result of expectedResults) {
384
+ workloads.push(...result.workloads);
385
+ issues.push(...result.issues);
386
+ }
387
+ for (const state of states) {
388
+ if (!consumed.has(state)) {
389
+ workloads.push({
390
+ name: state.name,
391
+ state: state.running ? 'unexpected-running' : 'unexpected-stopped',
392
+ expected: false,
393
+ checks: {
394
+ containerRunning: state.running,
395
+ observedImage: state.image,
396
+ installationId: state.installationId ?? 'missing',
397
+ planHash: state.planHash ?? 'missing',
398
+ executionId: state.executionId ?? 'missing',
399
+ containerHealth: state.health ?? 'not-configured',
400
+ },
401
+ });
402
+ issues.push((0, readiness_proof_1.unexpectedWorkload)(state.name));
403
+ }
404
+ }
405
+ return (0, readiness_proof_1.buildReadinessProof)(expectation, workloads, issues);
406
+ }
407
+ }
408
+ exports.LocalInstallationReadinessObserver = LocalInstallationReadinessObserver;
409
+ function processIsAlive(pid) {
410
+ try {
411
+ process.kill(pid, 0);
412
+ return true;
413
+ }
414
+ catch (error) {
415
+ return error.code === 'EPERM';
416
+ }
417
+ }
418
+ //# sourceMappingURL=readiness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readiness.js","sourceRoot":"","sources":["../../../src/runtime/installation/readiness.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA0CA,gFA2CC;AAED,8DAsDC;AA7ID,qEAAwE;AACxE,uDAgB2B;AAC3B,6CAA6C;AAC7C,kDAMyB;AACzB,iEAGoC;AACpC,qDAAiD;AACjD,yDAAwD;AASxD,oDAAkC;AAElC,SAAgB,kCAAkC,CAChD,IAGC,EACD,iBAAyB,EACzB,cAAsB,EACtB,WAAoB;IAEpB,IAAI,IAAI,CAAC,SAAS,KAAK,kBAAS,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CACb,0FAA0F,CAC3F,CAAC;IACJ,CAAC;IACD,OAAO;QACL,S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,EAAE,KAAK,CAAC,QAAQ,IAAI,SAAS;wBACrC,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,SAAS;wBAC3C,eAAe,EAAE,KAAK,CAAC,MAAM,IAAI,gBAAgB;qBAClD;iBACF,CAAC,CAAC;gBACH,MAAM,CAAC,IAAI,CAAC,IAAA,oCAAkB,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC;QACD,OAAO,IAAA,qCAAmB,EAAC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;CACF;AAzXD,gFAyXC;AAED,SAAS,cAAc,CAAC,GAAW;IACjC,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAQ,KAA+B,CAAC,IAAI,KAAK,OAAO,CAAC;IAC3D,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function serializeInstallation(value: unknown): string;
2
+ export declare function hashInstallation(value: unknown): string;
3
+ //# sourceMappingURL=serialization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../../../src/runtime/installation/serialization.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE5D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIvD"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serializeInstallation = serializeInstallation;
4
+ exports.hashInstallation = hashInstallation;
5
+ const node_crypto_1 = require("node:crypto");
6
+ function serializeInstallation(value) {
7
+ return serializeValue(value);
8
+ }
9
+ function hashInstallation(value) {
10
+ return (0, node_crypto_1.createHash)('sha256')
11
+ .update(serializeInstallation(value))
12
+ .digest('hex');
13
+ }
14
+ function serializeValue(value) {
15
+ if (value === null ||
16
+ typeof value === 'boolean' ||
17
+ typeof value === 'string') {
18
+ return JSON.stringify(value);
19
+ }
20
+ if (typeof value === 'number') {
21
+ if (!Number.isFinite(value)) {
22
+ throw new Error('Installation plans cannot contain non-finite numbers');
23
+ }
24
+ return JSON.stringify(value);
25
+ }
26
+ if (Array.isArray(value)) {
27
+ return `[${value.map((entry) => serializeValue(entry)).join(',')}]`;
28
+ }
29
+ if (typeof value === 'object') {
30
+ const record = value;
31
+ return `{${Object.keys(record)
32
+ .filter((key) => record[key] !== undefined)
33
+ .sort()
34
+ .map((key) => `${JSON.stringify(key)}:${serializeValue(record[key])}`)
35
+ .join(',')}}`;
36
+ }
37
+ throw new Error(`Installation plans cannot contain values of type ${typeof value}`);
38
+ }
39
+ //# sourceMappingURL=serialization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialization.js","sourceRoot":"","sources":["../../../src/runtime/installation/serialization.ts"],"names":[],"mappings":";;AAEA,sDAEC;AAED,4CAIC;AAVD,6CAAyC;AAEzC,SAAgB,qBAAqB,CAAC,KAAc;IAClD,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC;SACxB,MAAM,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;SACpC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,IACE,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,SAAS;QAC1B,OAAO,KAAK,KAAK,QAAQ,EACzB,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC1E,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACtE,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,KAA0C,CAAC;QAC1D,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;aAC3B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;aAC1C,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;aACrE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAClB,CAAC;IACD,MAAM,IAAI,KAAK,CACb,oDAAoD,OAAO,KAAK,EAAE,CACnE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { InstallationProfile, type XemaInstallation } from './contract';
2
+ declare const SETUP_PROFILES: readonly [InstallationProfile.Developer, InstallationProfile.Starter, InstallationProfile.SingleNodeProduction];
3
+ export type SetupInstallationProfile = (typeof SETUP_PROFILES)[number];
4
+ export declare function parseSetupInstallationProfile(value: string): SetupInstallationProfile;
5
+ export declare function createInstallationProfileTemplate(profile: SetupInstallationProfile, name: string, edition?: string): XemaInstallation;
6
+ export declare function setupInstallationProfiles(): readonly SetupInstallationProfile[];
7
+ export {};
8
+ //# sourceMappingURL=setup-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-profile.d.ts","sourceRoot":"","sources":["../../../src/runtime/installation/setup-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EAInB,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,cAAc,iHAIV,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,MAAM,GACZ,wBAAwB,CAQ1B;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,wBAAwB,EACjC,IAAI,EAAE,MAAM,EACZ,OAAO,SAAQ,GACd,gBAAgB,CAmBlB;AAED,wBAAgB,yBAAyB,IAAI,SAAS,wBAAwB,EAAE,CAE/E"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseSetupInstallationProfile = parseSetupInstallationProfile;
4
+ exports.createInstallationProfileTemplate = createInstallationProfileTemplate;
5
+ exports.setupInstallationProfiles = setupInstallationProfiles;
6
+ const contract_1 = require("./contract");
7
+ const SETUP_PROFILES = [
8
+ contract_1.InstallationProfile.Developer,
9
+ contract_1.InstallationProfile.Starter,
10
+ contract_1.InstallationProfile.SingleNodeProduction,
11
+ ];
12
+ function parseSetupInstallationProfile(value) {
13
+ const profile = SETUP_PROFILES.find((candidate) => candidate === value);
14
+ if (profile === undefined) {
15
+ throw new Error(`Unsupported setup profile "${value}". Choose ${SETUP_PROFILES.join(', ')}.`);
16
+ }
17
+ return profile;
18
+ }
19
+ function createInstallationProfileTemplate(profile, name, edition = 'oss') {
20
+ return {
21
+ apiVersion: contract_1.XEMA_INSTALLATION_API_VERSION,
22
+ kind: contract_1.XEMA_INSTALLATION_KIND,
23
+ metadata: { name },
24
+ spec: {
25
+ profile,
26
+ lifecycle: {
27
+ environment: profile === contract_1.InstallationProfile.SingleNodeProduction
28
+ ? contract_1.LifecycleEnvironment.Production
29
+ : contract_1.LifecycleEnvironment.Development,
30
+ },
31
+ distribution: {
32
+ kind: contract_1.DistributionReferenceKind.Edition,
33
+ edition,
34
+ },
35
+ },
36
+ };
37
+ }
38
+ function setupInstallationProfiles() {
39
+ return SETUP_PROFILES;
40
+ }
41
+ //# sourceMappingURL=setup-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-profile.js","sourceRoot":"","sources":["../../../src/runtime/installation/setup-profile.ts"],"names":[],"mappings":";;AAiBA,sEAUC;AAED,8EAuBC;AAED,8DAEC;AAxDD,yCAOoB;AAEpB,MAAM,cAAc,GAAG;IACrB,8BAAmB,CAAC,SAAS;IAC7B,8BAAmB,CAAC,OAAO;IAC3B,8BAAmB,CAAC,oBAAoB;CAChC,CAAC;AAIX,SAAgB,6BAA6B,CAC3C,KAAa;IAEb,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC;IACxE,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,8BAA8B,KAAK,aAAa,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC7E,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAgB,iCAAiC,CAC/C,OAAiC,EACjC,IAAY,EACZ,OAAO,GAAG,KAAK;IAEf,OAAO;QACL,UAAU,EAAE,wCAA6B;QACzC,IAAI,EAAE,iCAAsB;QAC5B,QAAQ,EAAE,EAAE,IAAI,EAAE;QAClB,IAAI,EAAE;YACJ,OAAO;YACP,SAAS,EAAE;gBACT,WAAW,EACT,OAAO,KAAK,8BAAmB,CAAC,oBAAoB;oBAClD,CAAC,CAAC,+BAAoB,CAAC,UAAU;oBACjC,CAAC,CAAC,+BAAoB,CAAC,WAAW;aACvC;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,oCAAyB,CAAC,OAAO;gBACvC,OAAO;aACR;SACF;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB;IACvC,OAAO,cAAc,CAAC;AACxB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { InstallationProfile, SecretReferenceProvider } from './contract';
2
+ import { InstallationRenderObligation, type InstallationRenderAcknowledgement } from './diff';
3
+ import type { CompiledXemaInstallation } from './compiler';
4
+ declare const RENDERER_ID = "xema-cli-installation-setup/v1";
5
+ export interface SecretProviderReadiness {
6
+ readonly provider: SecretReferenceProvider;
7
+ readonly available: boolean;
8
+ readonly keyRef?: string;
9
+ readonly resolvedEntries?: readonly string[];
10
+ }
11
+ export interface InstallationSetupRenderOptions {
12
+ readonly providers?: readonly SecretProviderReadiness[];
13
+ }
14
+ export interface InstallationSetupArtifact {
15
+ readonly path: string;
16
+ readonly mediaType: 'application/json';
17
+ readonly obligation: InstallationRenderObligation;
18
+ readonly effectivePlanHash: string;
19
+ readonly digest: string;
20
+ readonly content: string;
21
+ }
22
+ export interface InstallationSetupRendering {
23
+ readonly rendererId: typeof RENDERER_ID;
24
+ readonly profile: InstallationProfile;
25
+ readonly effectivePlanHash: string;
26
+ readonly artifacts: readonly InstallationSetupArtifact[];
27
+ readonly renderedArtifacts: readonly InstallationRenderAcknowledgement[];
28
+ }
29
+ export declare function renderInstallationSetup(installation: CompiledXemaInstallation, opts?: InstallationSetupRenderOptions): InstallationSetupRendering;
30
+ export {};
31
+ //# sourceMappingURL=setup-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-renderer.d.ts","sourceRoot":"","sources":["../../../src/runtime/installation/setup-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,4BAA4B,EAC5B,KAAK,iCAAiC,EACv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