@xemahq/xema 0.14.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 (418) hide show
  1. package/README.md +23 -2
  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 +339 -29
  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 +1802 -125
  10. package/dist/assets/core/images.lock.json +1175 -235
  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 +2438 -226
  16. package/dist/assets/oss/images.lock.json +1502 -618
  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 +4 -0
  21. package/dist/cli.js.map +1 -1
  22. package/dist/commands/apply.js +1 -1
  23. package/dist/commands/apply.js.map +1 -1
  24. package/dist/commands/biome.d.ts.map +1 -1
  25. package/dist/commands/biome.js +84 -7
  26. package/dist/commands/biome.js.map +1 -1
  27. package/dist/commands/canopy.js +1 -1
  28. package/dist/commands/canopy.js.map +1 -1
  29. package/dist/commands/dev.d.ts.map +1 -1
  30. package/dist/commands/dev.js +27 -5
  31. package/dist/commands/dev.js.map +1 -1
  32. package/dist/commands/dist.d.ts +13 -0
  33. package/dist/commands/dist.d.ts.map +1 -1
  34. package/dist/commands/dist.js +50 -10
  35. package/dist/commands/dist.js.map +1 -1
  36. package/dist/commands/doctor.d.ts +25 -0
  37. package/dist/commands/doctor.d.ts.map +1 -1
  38. package/dist/commands/doctor.js +422 -18
  39. package/dist/commands/doctor.js.map +1 -1
  40. package/dist/commands/down.d.ts +10 -0
  41. package/dist/commands/down.d.ts.map +1 -1
  42. package/dist/commands/down.js +81 -41
  43. package/dist/commands/down.js.map +1 -1
  44. package/dist/commands/export.js +1 -1
  45. package/dist/commands/export.js.map +1 -1
  46. package/dist/commands/import.js +1 -1
  47. package/dist/commands/import.js.map +1 -1
  48. package/dist/commands/init.d.ts.map +1 -1
  49. package/dist/commands/init.js +56 -3
  50. package/dist/commands/init.js.map +1 -1
  51. package/dist/commands/installation.d.ts.map +1 -1
  52. package/dist/commands/installation.js +169 -12
  53. package/dist/commands/installation.js.map +1 -1
  54. package/dist/commands/license.d.ts +3 -0
  55. package/dist/commands/license.d.ts.map +1 -0
  56. package/dist/commands/license.js +97 -0
  57. package/dist/commands/license.js.map +1 -0
  58. package/dist/commands/login.d.ts +4 -0
  59. package/dist/commands/login.d.ts.map +1 -0
  60. package/dist/commands/login.js +127 -0
  61. package/dist/commands/login.js.map +1 -0
  62. package/dist/commands/logs.d.ts +21 -0
  63. package/dist/commands/logs.d.ts.map +1 -1
  64. package/dist/commands/logs.js +131 -22
  65. package/dist/commands/logs.js.map +1 -1
  66. package/dist/commands/objects.js +2 -2
  67. package/dist/commands/objects.js.map +1 -1
  68. package/dist/commands/plan.js +1 -1
  69. package/dist/commands/plan.js.map +1 -1
  70. package/dist/commands/run.js +1 -1
  71. package/dist/commands/run.js.map +1 -1
  72. package/dist/commands/serve.d.ts.map +1 -1
  73. package/dist/commands/serve.js +39 -6
  74. package/dist/commands/serve.js.map +1 -1
  75. package/dist/commands/shell.js +1 -1
  76. package/dist/commands/shell.js.map +1 -1
  77. package/dist/commands/up.d.ts.map +1 -1
  78. package/dist/commands/up.js +20 -5
  79. package/dist/commands/up.js.map +1 -1
  80. package/dist/dev/env-defaults.d.ts +1 -0
  81. package/dist/dev/env-defaults.d.ts.map +1 -1
  82. package/dist/dev/env-defaults.js +15 -6
  83. package/dist/dev/env-defaults.js.map +1 -1
  84. package/dist/dev/forked-worker-bootstrap-protocol.d.ts +17 -0
  85. package/dist/dev/forked-worker-bootstrap-protocol.d.ts.map +1 -0
  86. package/dist/dev/forked-worker-bootstrap-protocol.js +35 -0
  87. package/dist/dev/forked-worker-bootstrap-protocol.js.map +1 -0
  88. package/dist/dev/forked-worker-bootstrap.d.ts +18 -0
  89. package/dist/dev/forked-worker-bootstrap.d.ts.map +1 -0
  90. package/dist/dev/forked-worker-bootstrap.js +84 -0
  91. package/dist/dev/forked-worker-bootstrap.js.map +1 -0
  92. package/dist/dev/forked-worker.d.ts +14 -0
  93. package/dist/dev/forked-worker.d.ts.map +1 -1
  94. package/dist/dev/forked-worker.js +200 -33
  95. package/dist/dev/forked-worker.js.map +1 -1
  96. package/dist/lib/control-plane.d.ts +5 -1
  97. package/dist/lib/control-plane.d.ts.map +1 -1
  98. package/dist/lib/control-plane.js +56 -6
  99. package/dist/lib/control-plane.js.map +1 -1
  100. package/dist/runtime/asset-provenance.d.ts +17 -0
  101. package/dist/runtime/asset-provenance.d.ts.map +1 -0
  102. package/dist/runtime/asset-provenance.js +29 -0
  103. package/dist/runtime/asset-provenance.js.map +1 -0
  104. package/dist/runtime/auth/client-bootstrap.d.ts +11 -0
  105. package/dist/runtime/auth/client-bootstrap.d.ts.map +1 -0
  106. package/dist/runtime/auth/client-bootstrap.js +60 -0
  107. package/dist/runtime/auth/client-bootstrap.js.map +1 -0
  108. package/dist/runtime/auth/device-flow.d.ts +43 -0
  109. package/dist/runtime/auth/device-flow.d.ts.map +1 -0
  110. package/dist/runtime/auth/device-flow.js +201 -0
  111. package/dist/runtime/auth/device-flow.js.map +1 -0
  112. package/dist/runtime/auth/session-auth.d.ts +8 -0
  113. package/dist/runtime/auth/session-auth.d.ts.map +1 -0
  114. package/dist/runtime/auth/session-auth.js +43 -0
  115. package/dist/runtime/auth/session-auth.js.map +1 -0
  116. package/dist/runtime/auth/session-store.d.ts +19 -0
  117. package/dist/runtime/auth/session-store.d.ts.map +1 -0
  118. package/dist/runtime/auth/session-store.js +83 -0
  119. package/dist/runtime/auth/session-store.js.map +1 -0
  120. package/dist/runtime/auth/token-claims.d.ts +2 -0
  121. package/dist/runtime/auth/token-claims.d.ts.map +1 -0
  122. package/dist/runtime/auth/token-claims.js +45 -0
  123. package/dist/runtime/auth/token-claims.js.map +1 -0
  124. package/dist/runtime/biome-provenance.d.ts +26 -0
  125. package/dist/runtime/biome-provenance.d.ts.map +1 -0
  126. package/dist/runtime/biome-provenance.js +70 -0
  127. package/dist/runtime/biome-provenance.js.map +1 -0
  128. package/dist/runtime/biome-publish.d.ts +14 -0
  129. package/dist/runtime/biome-publish.d.ts.map +1 -1
  130. package/dist/runtime/biome-publish.js +69 -5
  131. package/dist/runtime/biome-publish.js.map +1 -1
  132. package/dist/runtime/biome-scaffold.d.ts.map +1 -1
  133. package/dist/runtime/biome-scaffold.js +0 -2
  134. package/dist/runtime/biome-scaffold.js.map +1 -1
  135. package/dist/runtime/biome-validate.d.ts.map +1 -1
  136. package/dist/runtime/biome-validate.js +4 -2
  137. package/dist/runtime/biome-validate.js.map +1 -1
  138. package/dist/runtime/cleanup.d.ts +10 -0
  139. package/dist/runtime/cleanup.d.ts.map +1 -0
  140. package/dist/runtime/cleanup.js +35 -0
  141. package/dist/runtime/cleanup.js.map +1 -0
  142. package/dist/runtime/config/init-presets.d.ts.map +1 -1
  143. package/dist/runtime/config/init-presets.js +6 -3
  144. package/dist/runtime/config/init-presets.js.map +1 -1
  145. package/dist/runtime/distribution/available-biome.d.ts.map +1 -1
  146. package/dist/runtime/distribution/available-biome.js +2 -0
  147. package/dist/runtime/distribution/available-biome.js.map +1 -1
  148. package/dist/runtime/distribution/compose.d.ts +2 -1
  149. package/dist/runtime/distribution/compose.d.ts.map +1 -1
  150. package/dist/runtime/distribution/compose.js +1 -0
  151. package/dist/runtime/distribution/compose.js.map +1 -1
  152. package/dist/runtime/env-seeder.d.ts.map +1 -1
  153. package/dist/runtime/env-seeder.js +44 -13
  154. package/dist/runtime/env-seeder.js.map +1 -1
  155. package/dist/runtime/foreground.d.ts +6 -1
  156. package/dist/runtime/foreground.d.ts.map +1 -1
  157. package/dist/runtime/foreground.js +30 -7
  158. package/dist/runtime/foreground.js.map +1 -1
  159. package/dist/runtime/infra/infra-catalog.d.ts +33 -1
  160. package/dist/runtime/infra/infra-catalog.d.ts.map +1 -1
  161. package/dist/runtime/infra/infra-catalog.js +201 -10
  162. package/dist/runtime/infra/infra-catalog.js.map +1 -1
  163. package/dist/runtime/infra/infra-environment.d.ts +10 -0
  164. package/dist/runtime/infra/infra-environment.d.ts.map +1 -0
  165. package/dist/runtime/infra/infra-environment.js +76 -0
  166. package/dist/runtime/infra/infra-environment.js.map +1 -0
  167. package/dist/runtime/infra/infra-plan.d.ts +2 -1
  168. package/dist/runtime/infra/infra-plan.d.ts.map +1 -1
  169. package/dist/runtime/infra/infra-plan.js +10 -0
  170. package/dist/runtime/infra/infra-plan.js.map +1 -1
  171. package/dist/runtime/infra/infra-runner.d.ts +12 -2
  172. package/dist/runtime/infra/infra-runner.d.ts.map +1 -1
  173. package/dist/runtime/infra/infra-runner.js +194 -73
  174. package/dist/runtime/infra/infra-runner.js.map +1 -1
  175. package/dist/runtime/infra/keycloak-realm.d.ts +25 -0
  176. package/dist/runtime/infra/keycloak-realm.d.ts.map +1 -0
  177. package/dist/runtime/infra/keycloak-realm.js +116 -0
  178. package/dist/runtime/infra/keycloak-realm.js.map +1 -0
  179. package/dist/runtime/infra/postgres-endpoint.d.ts +8 -0
  180. package/dist/runtime/infra/postgres-endpoint.d.ts.map +1 -0
  181. package/dist/runtime/infra/postgres-endpoint.js +21 -0
  182. package/dist/runtime/infra/postgres-endpoint.js.map +1 -0
  183. package/dist/runtime/installation/compiler.d.ts +104 -27
  184. package/dist/runtime/installation/compiler.d.ts.map +1 -1
  185. package/dist/runtime/installation/compiler.js +361 -95
  186. package/dist/runtime/installation/compiler.js.map +1 -1
  187. package/dist/runtime/installation/contract.d.ts +234 -63
  188. package/dist/runtime/installation/contract.d.ts.map +1 -1
  189. package/dist/runtime/installation/contract.js +396 -74
  190. package/dist/runtime/installation/contract.js.map +1 -1
  191. package/dist/runtime/installation/current-launcher-renderer.d.ts +12 -0
  192. package/dist/runtime/installation/current-launcher-renderer.d.ts.map +1 -0
  193. package/dist/runtime/installation/current-launcher-renderer.js +123 -0
  194. package/dist/runtime/installation/current-launcher-renderer.js.map +1 -0
  195. package/dist/runtime/installation/diff.d.ts +15 -0
  196. package/dist/runtime/installation/diff.d.ts.map +1 -1
  197. package/dist/runtime/installation/diff.js +66 -29
  198. package/dist/runtime/installation/diff.js.map +1 -1
  199. package/dist/runtime/installation/format.js +4 -4
  200. package/dist/runtime/installation/format.js.map +1 -1
  201. package/dist/runtime/installation/from-current-config.d.ts +3 -2
  202. package/dist/runtime/installation/from-current-config.d.ts.map +1 -1
  203. package/dist/runtime/installation/from-current-config.js +214 -44
  204. package/dist/runtime/installation/from-current-config.js.map +1 -1
  205. package/dist/runtime/installation/helm-release-readiness.d.ts +9 -0
  206. package/dist/runtime/installation/helm-release-readiness.d.ts.map +1 -0
  207. package/dist/runtime/installation/helm-release-readiness.js +97 -0
  208. package/dist/runtime/installation/helm-release-readiness.js.map +1 -0
  209. package/dist/runtime/installation/helm-release.d.ts +24 -0
  210. package/dist/runtime/installation/helm-release.d.ts.map +1 -0
  211. package/dist/runtime/installation/helm-release.js +96 -0
  212. package/dist/runtime/installation/helm-release.js.map +1 -0
  213. package/dist/runtime/installation/index.d.ts +9 -0
  214. package/dist/runtime/installation/index.d.ts.map +1 -1
  215. package/dist/runtime/installation/index.js +9 -0
  216. package/dist/runtime/installation/index.js.map +1 -1
  217. package/dist/runtime/installation/json-schema.d.ts +4 -0
  218. package/dist/runtime/installation/json-schema.d.ts.map +1 -0
  219. package/dist/runtime/installation/json-schema.js +16 -0
  220. package/dist/runtime/installation/json-schema.js.map +1 -0
  221. package/dist/runtime/installation/kubernetes-readiness.d.ts +60 -0
  222. package/dist/runtime/installation/kubernetes-readiness.d.ts.map +1 -0
  223. package/dist/runtime/installation/kubernetes-readiness.js +384 -0
  224. package/dist/runtime/installation/kubernetes-readiness.js.map +1 -0
  225. package/dist/runtime/installation/lifecycle.d.ts +6 -4
  226. package/dist/runtime/installation/lifecycle.d.ts.map +1 -1
  227. package/dist/runtime/installation/lifecycle.js +94 -7
  228. package/dist/runtime/installation/lifecycle.js.map +1 -1
  229. package/dist/runtime/installation/readiness-proof.d.ts +72 -0
  230. package/dist/runtime/installation/readiness-proof.d.ts.map +1 -0
  231. package/dist/runtime/installation/readiness-proof.js +142 -0
  232. package/dist/runtime/installation/readiness-proof.js.map +1 -0
  233. package/dist/runtime/installation/readiness.d.ts +21 -0
  234. package/dist/runtime/installation/readiness.d.ts.map +1 -0
  235. package/dist/runtime/installation/readiness.js +418 -0
  236. package/dist/runtime/installation/readiness.js.map +1 -0
  237. package/dist/runtime/installation/setup-profile.d.ts +8 -0
  238. package/dist/runtime/installation/setup-profile.d.ts.map +1 -0
  239. package/dist/runtime/installation/setup-profile.js +41 -0
  240. package/dist/runtime/installation/setup-profile.js.map +1 -0
  241. package/dist/runtime/installation/setup-renderer.d.ts +31 -0
  242. package/dist/runtime/installation/setup-renderer.d.ts.map +1 -0
  243. package/dist/runtime/installation/setup-renderer.js +238 -0
  244. package/dist/runtime/installation/setup-renderer.js.map +1 -0
  245. package/dist/runtime/installation/state-store.d.ts +11 -3
  246. package/dist/runtime/installation/state-store.d.ts.map +1 -1
  247. package/dist/runtime/installation/state-store.js +157 -37
  248. package/dist/runtime/installation/state-store.js.map +1 -1
  249. package/dist/runtime/installation/status.d.ts +6 -12
  250. package/dist/runtime/installation/status.d.ts.map +1 -1
  251. package/dist/runtime/installation/status.js +28 -114
  252. package/dist/runtime/installation/status.js.map +1 -1
  253. package/dist/runtime/installation/support-bundle.d.ts.map +1 -1
  254. package/dist/runtime/installation/support-bundle.js +18 -3
  255. package/dist/runtime/installation/support-bundle.js.map +1 -1
  256. package/dist/runtime/installation/to-current-config.d.ts +4 -0
  257. package/dist/runtime/installation/to-current-config.d.ts.map +1 -0
  258. package/dist/runtime/installation/to-current-config.js +171 -0
  259. package/dist/runtime/installation/to-current-config.js.map +1 -0
  260. package/dist/runtime/installation/validation.d.ts.map +1 -1
  261. package/dist/runtime/installation/validation.js +78 -0
  262. package/dist/runtime/installation/validation.js.map +1 -1
  263. package/dist/runtime/installation/validators/common.d.ts.map +1 -1
  264. package/dist/runtime/installation/validators/common.js +7 -4
  265. package/dist/runtime/installation/validators/common.js.map +1 -1
  266. package/dist/runtime/installation/validators/infrastructure.d.ts.map +1 -1
  267. package/dist/runtime/installation/validators/infrastructure.js +20 -2
  268. package/dist/runtime/installation/validators/infrastructure.js.map +1 -1
  269. package/dist/runtime/installation/validators/operational.d.ts.map +1 -1
  270. package/dist/runtime/installation/validators/operational.js +44 -102
  271. package/dist/runtime/installation/validators/operational.js.map +1 -1
  272. package/dist/runtime/installation/validators/profile.d.ts.map +1 -1
  273. package/dist/runtime/installation/validators/profile.js +53 -51
  274. package/dist/runtime/installation/validators/profile.js.map +1 -1
  275. package/dist/runtime/installation/validators/secrets.d.ts.map +1 -1
  276. package/dist/runtime/installation/validators/secrets.js +44 -27
  277. package/dist/runtime/installation/validators/secrets.js.map +1 -1
  278. package/dist/runtime/launch.d.ts +10 -0
  279. package/dist/runtime/launch.d.ts.map +1 -1
  280. package/dist/runtime/launch.js +123 -18
  281. package/dist/runtime/launch.js.map +1 -1
  282. package/dist/runtime/license/license-clock.d.ts +12 -0
  283. package/dist/runtime/license/license-clock.d.ts.map +1 -0
  284. package/dist/runtime/license/license-clock.js +57 -0
  285. package/dist/runtime/license/license-clock.js.map +1 -0
  286. package/dist/runtime/license/license-report.d.ts +19 -0
  287. package/dist/runtime/license/license-report.d.ts.map +1 -0
  288. package/dist/runtime/license/license-report.js +105 -0
  289. package/dist/runtime/license/license-report.js.map +1 -0
  290. package/dist/runtime/license/license-store.d.ts +5 -0
  291. package/dist/runtime/license/license-store.d.ts.map +1 -0
  292. package/dist/runtime/license/license-store.js +11 -0
  293. package/dist/runtime/license/license-store.js.map +1 -0
  294. package/dist/runtime/license/registry-credential.d.ts +26 -0
  295. package/dist/runtime/license/registry-credential.d.ts.map +1 -0
  296. package/dist/runtime/license/registry-credential.js +94 -0
  297. package/dist/runtime/license/registry-credential.js.map +1 -0
  298. package/dist/runtime/license/resolve-license.d.ts +30 -0
  299. package/dist/runtime/license/resolve-license.d.ts.map +1 -0
  300. package/dist/runtime/license/resolve-license.js +73 -0
  301. package/dist/runtime/license/resolve-license.js.map +1 -0
  302. package/dist/runtime/license/store-license.d.ts +18 -0
  303. package/dist/runtime/license/store-license.d.ts.map +1 -0
  304. package/dist/runtime/license/store-license.js +26 -0
  305. package/dist/runtime/license/store-license.js.map +1 -0
  306. package/dist/runtime/lock-loader.d.ts +3 -6
  307. package/dist/runtime/lock-loader.d.ts.map +1 -1
  308. package/dist/runtime/lock-loader.js +26 -20
  309. package/dist/runtime/lock-loader.js.map +1 -1
  310. package/dist/runtime/native-process-group.d.ts +46 -0
  311. package/dist/runtime/native-process-group.d.ts.map +1 -0
  312. package/dist/runtime/native-process-group.js +390 -0
  313. package/dist/runtime/native-process-group.js.map +1 -0
  314. package/dist/runtime/paths.d.ts +1 -0
  315. package/dist/runtime/paths.d.ts.map +1 -1
  316. package/dist/runtime/paths.js +1 -0
  317. package/dist/runtime/paths.js.map +1 -1
  318. package/dist/runtime/roster.d.ts +4 -3
  319. package/dist/runtime/roster.d.ts.map +1 -1
  320. package/dist/runtime/roster.js +17 -5
  321. package/dist/runtime/roster.js.map +1 -1
  322. package/dist/runtime/run-manifest.d.ts +34 -5
  323. package/dist/runtime/run-manifest.d.ts.map +1 -1
  324. package/dist/runtime/run-manifest.js +434 -120
  325. package/dist/runtime/run-manifest.js.map +1 -1
  326. package/dist/runtime/runner/container-preflight.d.ts +77 -0
  327. package/dist/runtime/runner/container-preflight.d.ts.map +1 -0
  328. package/dist/runtime/runner/container-preflight.js +360 -0
  329. package/dist/runtime/runner/container-preflight.js.map +1 -0
  330. package/dist/runtime/runner/container-runner.d.ts +8 -0
  331. package/dist/runtime/runner/container-runner.d.ts.map +1 -1
  332. package/dist/runtime/runner/container-runner.js +93 -16
  333. package/dist/runtime/runner/container-runner.js.map +1 -1
  334. package/dist/runtime/runner/docker-cli.d.ts +30 -2
  335. package/dist/runtime/runner/docker-cli.d.ts.map +1 -1
  336. package/dist/runtime/runner/docker-cli.js +275 -11
  337. package/dist/runtime/runner/docker-cli.js.map +1 -1
  338. package/dist/runtime/runner/health-probe.d.ts +1 -0
  339. package/dist/runtime/runner/health-probe.d.ts.map +1 -1
  340. package/dist/runtime/runner/health-probe.js +3 -2
  341. package/dist/runtime/runner/health-probe.js.map +1 -1
  342. package/dist/runtime/runner/helm-cli.d.ts +19 -1
  343. package/dist/runtime/runner/helm-cli.d.ts.map +1 -1
  344. package/dist/runtime/runner/helm-cli.js +76 -8
  345. package/dist/runtime/runner/helm-cli.js.map +1 -1
  346. package/dist/runtime/runner/helm-runner.d.ts +3 -0
  347. package/dist/runtime/runner/helm-runner.d.ts.map +1 -1
  348. package/dist/runtime/runner/helm-runner.js +23 -7
  349. package/dist/runtime/runner/helm-runner.js.map +1 -1
  350. package/dist/runtime/runner/host-platform.d.ts +39 -0
  351. package/dist/runtime/runner/host-platform.d.ts.map +1 -0
  352. package/dist/runtime/runner/host-platform.js +136 -0
  353. package/dist/runtime/runner/host-platform.js.map +1 -0
  354. package/dist/runtime/runner/kube-cli.d.ts +23 -0
  355. package/dist/runtime/runner/kube-cli.d.ts.map +1 -0
  356. package/dist/runtime/runner/kube-cli.js +112 -0
  357. package/dist/runtime/runner/kube-cli.js.map +1 -0
  358. package/dist/runtime/runner/native-runner.d.ts.map +1 -1
  359. package/dist/runtime/runner/native-runner.js +27 -3
  360. package/dist/runtime/runner/native-runner.js.map +1 -1
  361. package/dist/runtime/runner/service-runner.d.ts +5 -0
  362. package/dist/runtime/runner/service-runner.d.ts.map +1 -1
  363. package/dist/runtime/runner/service-runner.js.map +1 -1
  364. package/dist/runtime/runner/stream-outcome.d.ts +7 -0
  365. package/dist/runtime/runner/stream-outcome.d.ts.map +1 -0
  366. package/dist/runtime/runner/stream-outcome.js +13 -0
  367. package/dist/runtime/runner/stream-outcome.js.map +1 -0
  368. package/dist/runtime/secrets/managed-local-cipher.d.ts +18 -0
  369. package/dist/runtime/secrets/managed-local-cipher.d.ts.map +1 -0
  370. package/dist/runtime/secrets/managed-local-cipher.js +110 -0
  371. package/dist/runtime/secrets/managed-local-cipher.js.map +1 -0
  372. package/dist/runtime/secrets/managed-local-files.d.ts +4 -0
  373. package/dist/runtime/secrets/managed-local-files.d.ts.map +1 -0
  374. package/dist/runtime/secrets/managed-local-files.js +132 -0
  375. package/dist/runtime/secrets/managed-local-files.js.map +1 -0
  376. package/dist/runtime/secrets/managed-local-key-provider.d.ts +27 -0
  377. package/dist/runtime/secrets/managed-local-key-provider.d.ts.map +1 -0
  378. package/dist/runtime/secrets/managed-local-key-provider.js +144 -0
  379. package/dist/runtime/secrets/managed-local-key-provider.js.map +1 -0
  380. package/dist/runtime/secrets/managed-local-secret-store.d.ts +18 -0
  381. package/dist/runtime/secrets/managed-local-secret-store.d.ts.map +1 -0
  382. package/dist/runtime/secrets/managed-local-secret-store.js +82 -0
  383. package/dist/runtime/secrets/managed-local-secret-store.js.map +1 -0
  384. package/dist/runtime/secrets/managed-local-store.d.ts +7 -0
  385. package/dist/runtime/secrets/managed-local-store.d.ts.map +1 -1
  386. package/dist/runtime/secrets/managed-local-store.js +46 -127
  387. package/dist/runtime/secrets/managed-local-store.js.map +1 -1
  388. package/dist/runtime/sources/credentials.d.ts +2 -0
  389. package/dist/runtime/sources/credentials.d.ts.map +1 -1
  390. package/dist/runtime/sources/credentials.js +49 -0
  391. package/dist/runtime/sources/credentials.js.map +1 -1
  392. package/dist/runtime/sources/kinds/distribution.js +3 -3
  393. package/dist/runtime/sources/kinds/distribution.js.map +1 -1
  394. package/dist/runtime/sources/manifest-walk.d.ts +1 -0
  395. package/dist/runtime/sources/manifest-walk.d.ts.map +1 -1
  396. package/dist/runtime/sources/manifest-walk.js +16 -11
  397. package/dist/runtime/sources/manifest-walk.js.map +1 -1
  398. package/dist/runtime/sources/schema.d.ts.map +1 -1
  399. package/dist/runtime/sources/schema.js +51 -3
  400. package/dist/runtime/sources/schema.js.map +1 -1
  401. package/dist/runtime/store-client.d.ts +1 -1
  402. package/dist/runtime/store-client.d.ts.map +1 -1
  403. package/dist/runtime/store-client.js +2 -1
  404. package/dist/runtime/store-client.js.map +1 -1
  405. package/dist/runtime/store-submit.d.ts +31 -0
  406. package/dist/runtime/store-submit.d.ts.map +1 -0
  407. package/dist/runtime/store-submit.js +77 -0
  408. package/dist/runtime/store-submit.js.map +1 -0
  409. package/dist/runtime/supervisor.d.ts +12 -0
  410. package/dist/runtime/supervisor.d.ts.map +1 -1
  411. package/dist/runtime/supervisor.js +141 -26
  412. package/dist/runtime/supervisor.js.map +1 -1
  413. package/package.json +20 -29
  414. package/LICENSE +0 -176
  415. package/dist/lib/command-registry.d.ts +0 -5
  416. package/dist/lib/command-registry.d.ts.map +0 -1
  417. package/dist/lib/command-registry.js +0 -17
  418. package/dist/lib/command-registry.js.map +0 -1
@@ -5,9 +5,12 @@ exports.compileCurrentInstallation = compileCurrentInstallation;
5
5
  exports.planInstallation = planInstallation;
6
6
  exports.applyInstallation = applyInstallation;
7
7
  const compiler_1 = require("./compiler");
8
+ const contract_1 = require("./contract");
8
9
  const diff_1 = require("./diff");
9
10
  const from_current_config_1 = require("./from-current-config");
11
+ const readiness_1 = require("./readiness");
10
12
  const serialization_1 = require("./serialization");
13
+ const schema_1 = require("../config/schema");
11
14
  function installationContext(installationIdentity) {
12
15
  return {
13
16
  installationId: `local-${(0, serialization_1.hashInstallation)(installationIdentity).slice(0, 20)}`,
@@ -17,7 +20,7 @@ function compileCurrentInstallation(config, installationIdentity) {
17
20
  return (0, compiler_1.compileXemaInstallation)((0, from_current_config_1.installationFromCurrentConfig)(config, installationContext(installationIdentity)));
18
21
  }
19
22
  function planInstallation(desired, store) {
20
- const appliedState = store.read(desired.installationId);
23
+ const appliedState = store.read(desired.metadata.name);
21
24
  const applied = appliedState?.plan;
22
25
  return {
23
26
  desired,
@@ -25,29 +28,52 @@ function planInstallation(desired, store) {
25
28
  diff: applied === undefined
26
29
  ? {
27
30
  classification: diff_1.InstallationChangeClass.RequiresRollout,
31
+ renderObligations: [
32
+ diff_1.InstallationRenderObligation.RuntimeReconfigure,
33
+ diff_1.InstallationRenderObligation.WorkloadRollout,
34
+ diff_1.InstallationRenderObligation.InfrastructureReconcile,
35
+ diff_1.InstallationRenderObligation.DataAndRecoveryReconcile,
36
+ ],
28
37
  changes: [
29
38
  {
30
39
  path: '<installation>',
31
40
  classification: diff_1.InstallationChangeClass.RequiresRollout,
41
+ renderObligation: diff_1.InstallationRenderObligation.InfrastructureReconcile,
32
42
  },
33
43
  ],
34
44
  }
35
45
  : (0, diff_1.diffInstallationPlans)(applied, desired),
36
46
  };
37
47
  }
38
- async function applyInstallation(desired, store, executor, opts = {}) {
39
- const release = store.acquireApplyLock(desired.installationId);
48
+ async function applyInstallation(desired, store, executor, opts) {
49
+ assertApplyProfileSupported(desired.spec.profile);
50
+ const releaseLocalRuntime = store.acquireLocalRuntimeLock();
51
+ let release;
40
52
  let ready = false;
41
53
  try {
54
+ release = store.acquireApplyLock(desired.metadata.name);
42
55
  const planned = planInstallation(desired, store);
43
56
  assertChangeAuthorized(planned.diff, opts);
57
+ assertRenderAcknowledged(planned.diff, desired, opts.renderedArtifacts);
44
58
  if (planned.diff.changes.length === 0 && opts.forceExecution !== true) {
45
59
  return { ...planned, executed: false };
46
60
  }
47
- await executor(async () => {
48
- store.write(desired);
61
+ if (desired.spec.profile === contract_1.InstallationProfile.Starter) {
62
+ store.claimLocalRuntimeOwner(desired.metadata.name);
63
+ }
64
+ await executor(async (proof) => {
65
+ if (ready) {
66
+ throw new Error('Installation executor reported readiness more than once.');
67
+ }
68
+ if (proof.substrate !== substrateForProfile(desired.spec.profile)) {
69
+ throw new Error(`Installation readiness proof used substrate ${proof.substrate}, expected ${substrateForProfile(desired.spec.profile)} for profile ${desired.spec.profile}.`);
70
+ }
71
+ (0, readiness_1.assertInstallationReady)(proof);
72
+ if (proof.effectivePlanHash !== desired.effectivePlanHash) {
73
+ throw new Error('Installation readiness proof is bound to a different effective plan.');
74
+ }
75
+ store.write(desired, opts.renderedArtifacts);
49
76
  ready = true;
50
- release();
51
77
  });
52
78
  if (!ready) {
53
79
  throw new Error('Installation executor completed without reporting a ready installation.');
@@ -55,7 +81,68 @@ async function applyInstallation(desired, store, executor, opts = {}) {
55
81
  return { ...planned, executed: true };
56
82
  }
57
83
  finally {
58
- release();
84
+ try {
85
+ release?.();
86
+ }
87
+ finally {
88
+ releaseLocalRuntime();
89
+ }
90
+ }
91
+ }
92
+ function assertApplyProfileSupported(profile) {
93
+ switch (profile) {
94
+ case contract_1.InstallationProfile.Developer:
95
+ case contract_1.InstallationProfile.Starter:
96
+ case contract_1.InstallationProfile.SingleNodeProduction:
97
+ return;
98
+ case contract_1.InstallationProfile.BusinessHa:
99
+ case contract_1.InstallationProfile.EnterpriseRegulated:
100
+ case contract_1.InstallationProfile.HostedCell:
101
+ throw new Error(`Installation apply does not support profile ${profile}; its dedicated renderer and executor are unavailable.`);
102
+ }
103
+ }
104
+ function substrateForProfile(profile) {
105
+ switch (profile) {
106
+ case contract_1.InstallationProfile.Developer:
107
+ return schema_1.Substrate.Native;
108
+ case contract_1.InstallationProfile.Starter:
109
+ return schema_1.Substrate.Container;
110
+ case contract_1.InstallationProfile.SingleNodeProduction:
111
+ case contract_1.InstallationProfile.BusinessHa:
112
+ case contract_1.InstallationProfile.EnterpriseRegulated:
113
+ case contract_1.InstallationProfile.HostedCell:
114
+ return schema_1.Substrate.Helm;
115
+ }
116
+ }
117
+ function assertRenderAcknowledged(diff, desired, acknowledgements) {
118
+ const byObligation = new Map();
119
+ for (const acknowledgement of acknowledgements) {
120
+ if (byObligation.has(acknowledgement.obligation)) {
121
+ throw new Error(`Installation renderer acknowledged ${acknowledgement.obligation} more than once.`);
122
+ }
123
+ if (acknowledgement.effectivePlanHash !== desired.effectivePlanHash) {
124
+ throw new Error(`Installation renderer acknowledgement for ${acknowledgement.obligation} is bound to a different effective plan.`);
125
+ }
126
+ if (!/^sha256:[a-f0-9]{64}$/.test(acknowledgement.artifactDigest)) {
127
+ throw new Error(`Installation renderer acknowledgement for ${acknowledgement.obligation} has an invalid artifact digest.`);
128
+ }
129
+ if (acknowledgement.rendererId.length === 0) {
130
+ throw new Error('Installation renderer id must not be empty.');
131
+ }
132
+ byObligation.set(acknowledgement.obligation, acknowledgement);
133
+ }
134
+ const materialObligations = [
135
+ ...new Set([
136
+ diff_1.InstallationRenderObligation.RuntimeReconfigure,
137
+ diff_1.InstallationRenderObligation.WorkloadRollout,
138
+ diff_1.InstallationRenderObligation.InfrastructureReconcile,
139
+ diff_1.InstallationRenderObligation.DataAndRecoveryReconcile,
140
+ ...diff.renderObligations,
141
+ ]),
142
+ ];
143
+ const missing = materialObligations.filter((obligation) => !byObligation.has(obligation));
144
+ if (missing.length > 0) {
145
+ throw new Error(`Installation renderer did not fulfill material obligations: ${missing.join(', ')}.`);
59
146
  }
60
147
  }
61
148
  function assertChangeAuthorized(diff, opts) {
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../../src/runtime/installation/lifecycle.ts"],"names":[],"mappings":";;AAqCA,kDAMC;AAED,gEAUC;AAED,4CAsBC;AAED,8CA6BC;AA9GD,yCAGoB;AACpB,iCAIgB;AAChB,+DAG+B;AAC/B,mDAAmD;AAwBnD,SAAgB,mBAAmB,CACjC,oBAA4B;IAE5B,OAAO;QACL,cAAc,EAAE,SAAS,IAAA,gCAAgB,EAAC,oBAAoB,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE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B;SAC1B,CAAC;KACH,CAAC;IACF,MAAM,OAAO,GAAG,mBAAmB,CAAC,MAAM,CACxC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAC9C,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,+DAA+D,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACrF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,sBAAsB,CAC7B,IAA0B,EAC1B,IAA8B;IAE9B,IAAI,IAAI,CAAC,cAAc,KAAK,8BAAuB,CAAC,QAAQ,EAAE,CAAC;QAC7D,MAAM,IAAI,KAAK,CACb,oIAAoI,CACrI,CAAC;IACJ,CAAC;IACD,IACE,IAAI,CAAC,cAAc,KAAK,8BAAuB,CAAC,WAAW;QAC3D,IAAI,CAAC,gBAAgB,KAAK,IAAI,EAC9B,CAAC;QACD,MAAM,IAAI,KAAK,CACb,2GAA2G,CAC5G,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,72 @@
1
+ import type { Substrate } from '../config/schema';
2
+ import type { RuntimeUnitType } from '../unit-type';
3
+ export declare enum InstallationReadinessIssueCode {
4
+ ObserverUnavailable = "observer-unavailable",
5
+ MissingWorkload = "missing-workload",
6
+ UnexpectedWorkload = "unexpected-workload",
7
+ ProcessNotRunning = "process-not-running",
8
+ ContainerNotRunning = "container-not-running",
9
+ ContainerUnhealthy = "container-unhealthy",
10
+ ServiceNotReady = "service-not-ready",
11
+ GenerationNotObserved = "generation-not-observed",
12
+ ReplicasNotReady = "replicas-not-ready",
13
+ JobNotComplete = "job-not-complete",
14
+ JobFailed = "job-failed",
15
+ ServiceMissing = "service-missing",
16
+ EndpointsMissing = "endpoints-missing",
17
+ BootstrapMarkerMissing = "bootstrap-marker-missing",
18
+ SmokeCheckFailed = "smoke-check-failed",
19
+ BackupPrerequisiteMissing = "backup-prerequisite-missing",
20
+ PlanIdentityMismatch = "plan-identity-mismatch",
21
+ ExecutionIdentityMismatch = "execution-identity-mismatch"
22
+ }
23
+ export declare const MAX_CONCURRENT_READINESS_PROBES = 32;
24
+ export interface InstallationReadinessIssue {
25
+ readonly code: InstallationReadinessIssueCode;
26
+ readonly workload?: string;
27
+ readonly message: string;
28
+ readonly remediation: string;
29
+ }
30
+ export interface ExpectedInstallationWorkload {
31
+ readonly name: string;
32
+ readonly unitType: RuntimeUnitType;
33
+ readonly port: number;
34
+ readonly image?: string;
35
+ readonly containerPort?: number;
36
+ }
37
+ export interface InstallationReadinessExpectation {
38
+ readonly substrate: Substrate;
39
+ readonly workloads: readonly ExpectedInstallationWorkload[];
40
+ readonly distributionLockPath: string;
41
+ readonly installationId: string;
42
+ readonly effectivePlanHash: string;
43
+ readonly executionId?: string;
44
+ readonly namespace?: string;
45
+ }
46
+ export interface ObservedInstallationWorkload {
47
+ readonly name: string;
48
+ readonly state: string;
49
+ readonly expected: boolean;
50
+ readonly checks: Readonly<Record<string, string | number | boolean>>;
51
+ }
52
+ export interface InstallationReadinessProof {
53
+ readonly substrate: Substrate;
54
+ readonly effectivePlanHash?: string;
55
+ readonly expectedWorkloads: readonly string[];
56
+ readonly ready: boolean;
57
+ readonly workloads: readonly ObservedInstallationWorkload[];
58
+ readonly issues: readonly InstallationReadinessIssue[];
59
+ }
60
+ export interface InstallationReadinessObserver {
61
+ observe(expectation: InstallationReadinessExpectation): Promise<InstallationReadinessProof>;
62
+ }
63
+ export declare function assertInstallationReady(proof: InstallationReadinessProof): void;
64
+ export declare function buildReadinessProof(expectation: InstallationReadinessExpectation, workloads: readonly ObservedInstallationWorkload[], issues: readonly InstallationReadinessIssue[]): InstallationReadinessProof;
65
+ export declare function unavailableProof(expectation: InstallationReadinessExpectation, message: string, remediation: string): InstallationReadinessProof;
66
+ export declare function missingWorkload(name: string): InstallationReadinessIssue;
67
+ export declare function unexpectedWorkload(name: string): InstallationReadinessIssue;
68
+ export declare function serviceNotReady(name: string): InstallationReadinessIssue;
69
+ export declare function planIdentityMismatch(name: string): InstallationReadinessIssue;
70
+ export declare function executionIdentityMismatch(name: string): InstallationReadinessIssue;
71
+ export declare function mapConcurrentOrdered<T, R>(items: readonly T[], concurrency: number, mapper: (item: T) => Promise<R>): Promise<R[]>;
72
+ //# sourceMappingURL=readiness-proof.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readiness-proof.d.ts","sourceRoot":"","sources":["../../../src/runtime/installation/readiness-proof.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAapD,oBAAY,8BAA8B;IACxC,mBAAmB,yBAAyB;IAC5C,eAAe,qBAAqB;IACpC,kBAAkB,wBAAwB;IAC1C,iBAAiB,wBAAwB;IACzC,mBAAmB,0BAA0B;IAC7C,kBAAkB,wBAAwB;IAC1C,eAAe,sBAAsB;IACrC,qBAAqB,4BAA4B;IACjD,gBAAgB,uBAAuB;IACvC,cAAc,qBAAqB;IACnC,SAAS,eAAe;IACxB,cAAc,oBAAoB;IAClC,gBAAgB,sBAAsB;IACtC,sBAAsB,6BAA6B;IACnD,gBAAgB,uBAAuB;IACvC,yBAAyB,gCAAgC;IACzD,oBAAoB,2BAA2B;IAC/C,yBAAyB,gCAAgC;CAC1D;AAED,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,8BAA8B,CAAC;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CA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,gCAAgC,GAC5C,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACxC;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,0BAA0B,GAChC,IAAI,CA6BN;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,gCAAgC,EAC7C,SAAS,EAAE,SAAS,4BAA4B,EAAE,EAClD,MAAM,EAAE,SAAS,0BAA0B,EAAE,GAC5C,0BAA0B,CAS5B;AAmBD,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,gCAAgC,EAC7C,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAClB,0BAA0B,CAQ5B;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,0BAA0B,CAQxE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,0BAA0B,CAQ3E;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,0BAA0B,CAQxE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,GACX,0BAA0B,CAQ5B;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,GACX,0BAA0B,CAQ5B;AAOD,wBAAsB,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAC7C,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,CAAC,EAAE,CAAC,CAkBd"}
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MAX_CONCURRENT_READINESS_PROBES = exports.InstallationReadinessIssueCode = void 0;
4
+ exports.assertInstallationReady = assertInstallationReady;
5
+ exports.buildReadinessProof = buildReadinessProof;
6
+ exports.unavailableProof = unavailableProof;
7
+ exports.missingWorkload = missingWorkload;
8
+ exports.unexpectedWorkload = unexpectedWorkload;
9
+ exports.serviceNotReady = serviceNotReady;
10
+ exports.planIdentityMismatch = planIdentityMismatch;
11
+ exports.executionIdentityMismatch = executionIdentityMismatch;
12
+ exports.mapConcurrentOrdered = mapConcurrentOrdered;
13
+ var InstallationReadinessIssueCode;
14
+ (function (InstallationReadinessIssueCode) {
15
+ InstallationReadinessIssueCode["ObserverUnavailable"] = "observer-unavailable";
16
+ InstallationReadinessIssueCode["MissingWorkload"] = "missing-workload";
17
+ InstallationReadinessIssueCode["UnexpectedWorkload"] = "unexpected-workload";
18
+ InstallationReadinessIssueCode["ProcessNotRunning"] = "process-not-running";
19
+ InstallationReadinessIssueCode["ContainerNotRunning"] = "container-not-running";
20
+ InstallationReadinessIssueCode["ContainerUnhealthy"] = "container-unhealthy";
21
+ InstallationReadinessIssueCode["ServiceNotReady"] = "service-not-ready";
22
+ InstallationReadinessIssueCode["GenerationNotObserved"] = "generation-not-observed";
23
+ InstallationReadinessIssueCode["ReplicasNotReady"] = "replicas-not-ready";
24
+ InstallationReadinessIssueCode["JobNotComplete"] = "job-not-complete";
25
+ InstallationReadinessIssueCode["JobFailed"] = "job-failed";
26
+ InstallationReadinessIssueCode["ServiceMissing"] = "service-missing";
27
+ InstallationReadinessIssueCode["EndpointsMissing"] = "endpoints-missing";
28
+ InstallationReadinessIssueCode["BootstrapMarkerMissing"] = "bootstrap-marker-missing";
29
+ InstallationReadinessIssueCode["SmokeCheckFailed"] = "smoke-check-failed";
30
+ InstallationReadinessIssueCode["BackupPrerequisiteMissing"] = "backup-prerequisite-missing";
31
+ InstallationReadinessIssueCode["PlanIdentityMismatch"] = "plan-identity-mismatch";
32
+ InstallationReadinessIssueCode["ExecutionIdentityMismatch"] = "execution-identity-mismatch";
33
+ })(InstallationReadinessIssueCode || (exports.InstallationReadinessIssueCode = InstallationReadinessIssueCode = {}));
34
+ exports.MAX_CONCURRENT_READINESS_PROBES = 32;
35
+ function assertInstallationReady(proof) {
36
+ const expected = new Set(proof.expectedWorkloads);
37
+ const readyExpected = new Set(proof.workloads
38
+ .filter((workload) => workload.expected && workload.state === 'ready')
39
+ .map((workload) => workload.name));
40
+ const structurallyComplete = expected.size > 0 &&
41
+ expected.size === proof.expectedWorkloads.length &&
42
+ proof.workloads.length === expected.size &&
43
+ [...expected].every((name) => readyExpected.has(name)) &&
44
+ proof.workloads.every((workload) => workload.expected);
45
+ if (proof.ready && proof.issues.length === 0 && structurallyComplete) {
46
+ return;
47
+ }
48
+ const structuralDetail = structurallyComplete
49
+ ? ''
50
+ : '\n- [invalid-proof] Readiness evidence does not contain one ready observation for every unique expected workload.';
51
+ throw new Error(`Installation readiness proof failed:\n${proof.issues
52
+ .map((issue) => `- [${issue.code}] ${issue.message} Remediation: ${issue.remediation}`)
53
+ .join('\n')}${structuralDetail}`);
54
+ }
55
+ function buildReadinessProof(expectation, workloads, issues) {
56
+ return {
57
+ substrate: expectation.substrate,
58
+ ...observedEffectivePlanHash(workloads),
59
+ expectedWorkloads: expectation.workloads.map((workload) => workload.name),
60
+ ready: issues.length === 0,
61
+ workloads,
62
+ issues,
63
+ };
64
+ }
65
+ function observedEffectivePlanHash(workloads) {
66
+ const identities = new Set(workloads.flatMap((workload) => {
67
+ const identity = workload.checks.planHash;
68
+ return typeof identity === 'string' && identity !== 'missing'
69
+ ? [identity]
70
+ : [];
71
+ }));
72
+ if (identities.size !== 1) {
73
+ return {};
74
+ }
75
+ return { effectivePlanHash: [...identities][0] };
76
+ }
77
+ function unavailableProof(expectation, message, remediation) {
78
+ return buildReadinessProof(expectation, [], [
79
+ {
80
+ code: InstallationReadinessIssueCode.ObserverUnavailable,
81
+ message,
82
+ remediation,
83
+ },
84
+ ]);
85
+ }
86
+ function missingWorkload(name) {
87
+ return {
88
+ code: InstallationReadinessIssueCode.MissingWorkload,
89
+ workload: name,
90
+ message: `Expected workload ${name} is missing.`,
91
+ remediation: 'Run `xema installation apply` and inspect the workload-specific startup error.',
92
+ };
93
+ }
94
+ function unexpectedWorkload(name) {
95
+ return {
96
+ code: InstallationReadinessIssueCode.UnexpectedWorkload,
97
+ workload: name,
98
+ message: `Launcher-owned workload ${name} is not present in the resolved distribution-lock roster.`,
99
+ remediation: 'Run `xema down`, review the selected edition/features, and reapply the installation.',
100
+ };
101
+ }
102
+ function serviceNotReady(name) {
103
+ return {
104
+ code: InstallationReadinessIssueCode.ServiceNotReady,
105
+ workload: name,
106
+ message: `Expected service ${name} did not pass /health/ready.`,
107
+ remediation: 'Inspect the service logs and dependency health, then re-run the readiness check.',
108
+ };
109
+ }
110
+ function planIdentityMismatch(name) {
111
+ return {
112
+ code: InstallationReadinessIssueCode.PlanIdentityMismatch,
113
+ workload: name,
114
+ message: `Workload ${name} was not launched for the expected effective plan.`,
115
+ remediation: 'Stop stale workloads and re-run apply so every workload carries the current plan hash.',
116
+ };
117
+ }
118
+ function executionIdentityMismatch(name) {
119
+ return {
120
+ code: InstallationReadinessIssueCode.ExecutionIdentityMismatch,
121
+ workload: name,
122
+ message: `Workload ${name} was not launched by the execution being proved.`,
123
+ remediation: 'Stop the stale execution and re-run apply so readiness is bound to exactly one launch.',
124
+ };
125
+ }
126
+ async function mapConcurrentOrdered(items, concurrency, mapper) {
127
+ const results = new Array(items.length);
128
+ let nextIndex = 0;
129
+ const workers = Array.from({ length: Math.min(concurrency, items.length) }, async () => {
130
+ for (;;) {
131
+ const index = nextIndex;
132
+ nextIndex += 1;
133
+ if (index >= items.length) {
134
+ return;
135
+ }
136
+ results[index] = await mapper(items[index]);
137
+ }
138
+ });
139
+ await Promise.all(workers);
140
+ return results;
141
+ }
142
+ //# sourceMappingURL=readiness-proof.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readiness-proof.js","sourceRoot":"","sources":["../../../src/runtime/installation/readiness-proof.ts"],"names":[],"mappings":";;;AA0FA,0DA+BC;AAED,kDAaC;AAmBD,4CAYC;AAED,0CAQC;AAED,gDAQC;AAED,0CAQC;AAED,oDAUC;AAED,8DAUC;AAOD,oDAsBC;AA5OD,IAAY,8BAmBX;AAn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,IAAI,EAAE,8BAA8B,CAAC,yBAAyB;QAC9D,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,YAAY,IAAI,kDAAkD;QAC3E,WAAW,EACT,wFAAwF;KAC3F,CAAC;AACJ,CAAC;AAOM,KAAK,UAAU,oBAAoB,CACxC,KAAmB,EACnB,WAAmB,EACnB,MAA+B;IAE/B,MAAM,OAAO,GAAG,IAAI,KAAK,CAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CACxB,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,EAC/C,KAAK,IAAI,EAAE;QACT,SAAS,CAAC;YACR,MAAM,KAAK,GAAG,SAAS,CAAC;YACxB,SAAS,IAAI,CAAC,CAAC;YACf,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC1B,OAAO;YACT,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAM,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CACF,CAAC;IACF,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type InstallationReadinessExpectation, type InstallationReadinessObserver, type InstallationReadinessProof } from './readiness-proof';
2
+ import { type RunManifestEntry } from '../run-manifest';
3
+ import { DockerCli } from '../runner/docker-cli';
4
+ import type { LaunchHandle, LaunchPlan } from '../launch';
5
+ export * from './readiness-proof';
6
+ export declare function readinessExpectationFromLaunchPlan(plan: Pick<LaunchPlan, 'substrate' | 'roster' | 'ports' | 'lock' | 'helmNamespace'>, effectivePlanHash: string, installationId: string, executionId?: string): InstallationReadinessExpectation;
7
+ export declare function proveLocalLaunchReadiness(handle: LaunchHandle, effectivePlanHash: string, observer?: InstallationReadinessObserver): Promise<InstallationReadinessProof>;
8
+ export declare class LocalInstallationReadinessObserver implements InstallationReadinessObserver {
9
+ private readonly docker;
10
+ private readonly readinessProbe;
11
+ private readonly nativeManifest;
12
+ private readonly processProbe;
13
+ private readonly nativePortOwnerProbe;
14
+ private readonly nativeProcessIdentityProbe;
15
+ private readonly helmObserver;
16
+ constructor(docker?: DockerCli, readinessProbe?: (url: string) => Promise<boolean>, nativeManifest?: (installationId: string) => readonly RunManifestEntry[], processProbe?: (pid: number) => boolean, nativePortOwnerProbe?: (entry: RunManifestEntry) => Promise<boolean>, nativeProcessIdentityProbe?: (entry: RunManifestEntry) => Promise<boolean>, helmObserver?: InstallationReadinessObserver);
17
+ observe(expectation: InstallationReadinessExpectation): Promise<InstallationReadinessProof>;
18
+ private observeNative;
19
+ private observeContainers;
20
+ }
21
+ //# sourceMappingURL=readiness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../../../src/runtime/installation/readiness.ts"],"names":[],"mappings":"AACA,OAAO,EAWL,KAAK,gCAAgC,EAErC,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAEhC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAO1D,cAAc,mBAAmB,CAAC;AAElC,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,IAAI,CACR,UAAU,EACV,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,eAAe,CAC5D,EACD,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,MAAM,GACnB,gCAAgC,CAmClC;AAED,wBAAsB,yBAAyB,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