@xemahq/xema 0.59.0 → 0.60.1

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 (850) hide show
  1. package/README.md +1 -2
  2. package/dist/appliance-owner.d.ts.map +1 -1
  3. package/dist/appliance-owner.js +6 -6
  4. package/dist/appliance-owner.js.map +1 -1
  5. package/dist/assets/appliance-base/authorization.lock.json +5186 -0
  6. package/dist/assets/appliance-base/distribution.lock.json +760 -279
  7. package/dist/assets/appliance-base/images.lock.json +576 -513
  8. package/dist/assets/appliance-lean/authorization.lock.json +4648 -0
  9. package/dist/assets/appliance-lean/distribution.lock.json +641 -186
  10. package/dist/assets/appliance-lean/images.lock.json +574 -512
  11. package/dist/assets/boot-graph.json +33 -14
  12. package/dist/assets/distribution-assets.manifest.json +23 -20
  13. package/dist/cli.d.ts.map +1 -1
  14. package/dist/cli.js +7 -9
  15. package/dist/cli.js.map +1 -1
  16. package/dist/commands/biome-dev.d.ts.map +1 -1
  17. package/dist/commands/biome-dev.js +41 -137
  18. package/dist/commands/biome-dev.js.map +1 -1
  19. package/dist/commands/biome-lifecycle.d.ts +24 -0
  20. package/dist/commands/biome-lifecycle.d.ts.map +1 -0
  21. package/dist/commands/biome-lifecycle.js +253 -0
  22. package/dist/commands/biome-lifecycle.js.map +1 -0
  23. package/dist/commands/biome.d.ts +2 -4
  24. package/dist/commands/biome.d.ts.map +1 -1
  25. package/dist/commands/biome.js +61 -46
  26. package/dist/commands/biome.js.map +1 -1
  27. package/dist/commands/config.d.ts.map +1 -1
  28. package/dist/commands/config.js +96 -8
  29. package/dist/commands/config.js.map +1 -1
  30. package/dist/commands/doctor.d.ts.map +1 -1
  31. package/dist/commands/doctor.js +13 -20
  32. package/dist/commands/doctor.js.map +1 -1
  33. package/dist/commands/down.d.ts.map +1 -1
  34. package/dist/commands/down.js +14 -21
  35. package/dist/commands/down.js.map +1 -1
  36. package/dist/commands/init.d.ts.map +1 -1
  37. package/dist/commands/init.js +6 -3
  38. package/dist/commands/init.js.map +1 -1
  39. package/dist/commands/installation-tenancy.d.ts +11 -0
  40. package/dist/commands/installation-tenancy.d.ts.map +1 -0
  41. package/dist/commands/installation-tenancy.js +308 -0
  42. package/dist/commands/installation-tenancy.js.map +1 -0
  43. package/dist/commands/installation.d.ts.map +1 -1
  44. package/dist/commands/installation.js +19 -5
  45. package/dist/commands/installation.js.map +1 -1
  46. package/dist/commands/logs.d.ts +2 -0
  47. package/dist/commands/logs.d.ts.map +1 -1
  48. package/dist/commands/logs.js +41 -8
  49. package/dist/commands/logs.js.map +1 -1
  50. package/dist/commands/{dev.d.ts → mirror.d.ts} +1 -1
  51. package/dist/commands/mirror.d.ts.map +1 -0
  52. package/dist/commands/mirror.js +132 -0
  53. package/dist/commands/mirror.js.map +1 -0
  54. package/dist/commands/source.d.ts.map +1 -1
  55. package/dist/commands/source.js +3 -2
  56. package/dist/commands/source.js.map +1 -1
  57. package/dist/commands/status.d.ts.map +1 -1
  58. package/dist/commands/status.js +40 -21
  59. package/dist/commands/status.js.map +1 -1
  60. package/dist/commands/up.d.ts.map +1 -1
  61. package/dist/commands/up.js +36 -4
  62. package/dist/commands/up.js.map +1 -1
  63. package/dist/dev/infra-preflight.d.ts.map +1 -1
  64. package/dist/dev/infra-preflight.js +0 -4
  65. package/dist/dev/infra-preflight.js.map +1 -1
  66. package/dist/lib/confirm.d.ts +3 -0
  67. package/dist/lib/confirm.d.ts.map +1 -0
  68. package/dist/lib/confirm.js +19 -0
  69. package/dist/lib/confirm.js.map +1 -0
  70. package/dist/lib/output-format.d.ts +6 -0
  71. package/dist/lib/output-format.d.ts.map +1 -0
  72. package/dist/lib/output-format.js +20 -0
  73. package/dist/lib/output-format.js.map +1 -0
  74. package/dist/mirror/config/mirror-config-document.d.ts +18 -0
  75. package/dist/mirror/config/mirror-config-document.d.ts.map +1 -0
  76. package/dist/mirror/config/mirror-config-document.js +57 -0
  77. package/dist/mirror/config/mirror-config-document.js.map +1 -0
  78. package/dist/mirror/config/mirror-config-schema.d.ts +54 -0
  79. package/dist/mirror/config/mirror-config-schema.d.ts.map +1 -0
  80. package/dist/mirror/config/mirror-config-schema.js +80 -0
  81. package/dist/mirror/config/mirror-config-schema.js.map +1 -0
  82. package/dist/mirror/kit/delta.d.ts +4 -0
  83. package/dist/mirror/kit/delta.d.ts.map +1 -0
  84. package/dist/mirror/kit/delta.js +41 -0
  85. package/dist/mirror/kit/delta.js.map +1 -0
  86. package/dist/mirror/kit/export-kit.d.ts +16 -0
  87. package/dist/mirror/kit/export-kit.d.ts.map +1 -0
  88. package/dist/mirror/kit/export-kit.js +112 -0
  89. package/dist/mirror/kit/export-kit.js.map +1 -0
  90. package/dist/mirror/kit/import-kit.d.ts +9 -0
  91. package/dist/mirror/kit/import-kit.d.ts.map +1 -0
  92. package/dist/mirror/kit/import-kit.js +166 -0
  93. package/dist/mirror/kit/import-kit.js.map +1 -0
  94. package/dist/mirror/kit/kit-archive.d.ts +4 -0
  95. package/dist/mirror/kit/kit-archive.d.ts.map +1 -0
  96. package/dist/mirror/kit/kit-archive.js +38 -0
  97. package/dist/mirror/kit/kit-archive.js.map +1 -0
  98. package/dist/mirror/kit/kit-layout.d.ts +10 -0
  99. package/dist/mirror/kit/kit-layout.d.ts.map +1 -0
  100. package/dist/mirror/kit/kit-layout.js +19 -0
  101. package/dist/mirror/kit/kit-layout.js.map +1 -0
  102. package/dist/mirror/kit/kit-sums.d.ts +5 -0
  103. package/dist/mirror/kit/kit-sums.d.ts.map +1 -0
  104. package/dist/mirror/kit/kit-sums.js +63 -0
  105. package/dist/mirror/kit/kit-sums.js.map +1 -0
  106. package/dist/mirror/kit/layout-sync.d.ts +8 -0
  107. package/dist/mirror/kit/layout-sync.d.ts.map +1 -0
  108. package/dist/mirror/kit/layout-sync.js +58 -0
  109. package/dist/mirror/kit/layout-sync.js.map +1 -0
  110. package/dist/mirror/plan/bundle-content.d.ts +10 -0
  111. package/dist/mirror/plan/bundle-content.d.ts.map +1 -0
  112. package/dist/mirror/plan/bundle-content.js +61 -0
  113. package/dist/mirror/plan/bundle-content.js.map +1 -0
  114. package/dist/mirror/plan/declaration-file.d.ts +9 -0
  115. package/dist/mirror/plan/declaration-file.d.ts.map +1 -0
  116. package/dist/mirror/plan/declaration-file.js +27 -0
  117. package/dist/mirror/plan/declaration-file.js.map +1 -0
  118. package/dist/mirror/plan/edition-inputs.d.ts +57 -0
  119. package/dist/mirror/plan/edition-inputs.d.ts.map +1 -0
  120. package/dist/mirror/plan/edition-inputs.js +44 -0
  121. package/dist/mirror/plan/edition-inputs.js.map +1 -0
  122. package/dist/mirror/plan/edition-reader.d.ts +9 -0
  123. package/dist/mirror/plan/edition-reader.d.ts.map +1 -0
  124. package/dist/mirror/plan/edition-reader.js +47 -0
  125. package/dist/mirror/plan/edition-reader.js.map +1 -0
  126. package/dist/mirror/plan/image-content.d.ts +30 -0
  127. package/dist/mirror/plan/image-content.d.ts.map +1 -0
  128. package/dist/mirror/plan/image-content.js +120 -0
  129. package/dist/mirror/plan/image-content.js.map +1 -0
  130. package/dist/mirror/plan/npm-lockfile.d.ts +12 -0
  131. package/dist/mirror/plan/npm-lockfile.d.ts.map +1 -0
  132. package/dist/mirror/plan/npm-lockfile.js +106 -0
  133. package/dist/mirror/plan/npm-lockfile.js.map +1 -0
  134. package/dist/mirror/plan/oci-reads.d.ts +22 -0
  135. package/dist/mirror/plan/oci-reads.d.ts.map +1 -0
  136. package/dist/mirror/plan/oci-reads.js +43 -0
  137. package/dist/mirror/plan/oci-reads.js.map +1 -0
  138. package/dist/mirror/plan/plan-command.d.ts +22 -0
  139. package/dist/mirror/plan/plan-command.d.ts.map +1 -0
  140. package/dist/mirror/plan/plan-command.js +81 -0
  141. package/dist/mirror/plan/plan-command.js.map +1 -0
  142. package/dist/mirror/plan/plan-file.d.ts +13 -0
  143. package/dist/mirror/plan/plan-file.d.ts.map +1 -0
  144. package/dist/mirror/plan/plan-file.js +63 -0
  145. package/dist/mirror/plan/plan-file.js.map +1 -0
  146. package/dist/mirror/plan/resolve-content-set.d.ts +16 -0
  147. package/dist/mirror/plan/resolve-content-set.d.ts.map +1 -0
  148. package/dist/mirror/plan/resolve-content-set.js +90 -0
  149. package/dist/mirror/plan/resolve-content-set.js.map +1 -0
  150. package/dist/mirror/preflight/glob.d.ts +2 -0
  151. package/dist/mirror/preflight/glob.d.ts.map +1 -0
  152. package/dist/mirror/preflight/glob.js +59 -0
  153. package/dist/mirror/preflight/glob.js.map +1 -0
  154. package/dist/mirror/preflight/harbor-api.d.ts +27 -0
  155. package/dist/mirror/preflight/harbor-api.d.ts.map +1 -0
  156. package/dist/mirror/preflight/harbor-api.js +39 -0
  157. package/dist/mirror/preflight/harbor-api.js.map +1 -0
  158. package/dist/mirror/preflight/preflight.d.ts +18 -0
  159. package/dist/mirror/preflight/preflight.d.ts.map +1 -0
  160. package/dist/mirror/preflight/preflight.js +41 -0
  161. package/dist/mirror/preflight/preflight.js.map +1 -0
  162. package/dist/mirror/preflight/tag-moves.d.ts +16 -0
  163. package/dist/mirror/preflight/tag-moves.d.ts.map +1 -0
  164. package/dist/mirror/preflight/tag-moves.js +28 -0
  165. package/dist/mirror/preflight/tag-moves.js.map +1 -0
  166. package/dist/mirror/preflight/write-probe.d.ts +10 -0
  167. package/dist/mirror/preflight/write-probe.d.ts.map +1 -0
  168. package/dist/mirror/preflight/write-probe.js +36 -0
  169. package/dist/mirror/preflight/write-probe.js.map +1 -0
  170. package/dist/mirror/target/extras.d.ts +16 -0
  171. package/dist/mirror/target/extras.d.ts.map +1 -0
  172. package/dist/mirror/target/extras.js +47 -0
  173. package/dist/mirror/target/extras.js.map +1 -0
  174. package/dist/mirror/target/npm-registry.d.ts +20 -0
  175. package/dist/mirror/target/npm-registry.d.ts.map +1 -0
  176. package/dist/mirror/target/npm-registry.js +67 -0
  177. package/dist/mirror/target/npm-registry.js.map +1 -0
  178. package/dist/mirror/target/npm-sync.d.ts +15 -0
  179. package/dist/mirror/target/npm-sync.d.ts.map +1 -0
  180. package/dist/mirror/target/npm-sync.js +44 -0
  181. package/dist/mirror/target/npm-sync.js.map +1 -0
  182. package/dist/mirror/target/oci-items.d.ts +27 -0
  183. package/dist/mirror/target/oci-items.d.ts.map +1 -0
  184. package/dist/mirror/target/oci-items.js +79 -0
  185. package/dist/mirror/target/oci-items.js.map +1 -0
  186. package/dist/mirror/target/oci-sync.d.ts +20 -0
  187. package/dist/mirror/target/oci-sync.d.ts.map +1 -0
  188. package/dist/mirror/target/oci-sync.js +93 -0
  189. package/dist/mirror/target/oci-sync.js.map +1 -0
  190. package/dist/mirror/target/receipt-store.d.ts +13 -0
  191. package/dist/mirror/target/receipt-store.d.ts.map +1 -0
  192. package/dist/mirror/target/receipt-store.js +61 -0
  193. package/dist/mirror/target/receipt-store.js.map +1 -0
  194. package/dist/mirror/target/receipt.d.ts +13 -0
  195. package/dist/mirror/target/receipt.d.ts.map +1 -0
  196. package/dist/mirror/target/receipt.js +25 -0
  197. package/dist/mirror/target/receipt.js.map +1 -0
  198. package/dist/mirror/target/seed-push.d.ts +15 -0
  199. package/dist/mirror/target/seed-push.d.ts.map +1 -0
  200. package/dist/mirror/target/seed-push.js +20 -0
  201. package/dist/mirror/target/seed-push.js.map +1 -0
  202. package/dist/mirror/target/target-access.d.ts +7 -0
  203. package/dist/mirror/target/target-access.d.ts.map +1 -0
  204. package/dist/mirror/target/target-access.js +17 -0
  205. package/dist/mirror/target/target-access.js.map +1 -0
  206. package/dist/mirror/target/target-commands.d.ts +21 -0
  207. package/dist/mirror/target/target-commands.d.ts.map +1 -0
  208. package/dist/mirror/target/target-commands.js +134 -0
  209. package/dist/mirror/target/target-commands.js.map +1 -0
  210. package/dist/mirror/target/target-context.d.ts +11 -0
  211. package/dist/mirror/target/target-context.d.ts.map +1 -0
  212. package/dist/mirror/target/target-context.js +31 -0
  213. package/dist/mirror/target/target-context.js.map +1 -0
  214. package/dist/mirror/target/target-ports.d.ts +18 -0
  215. package/dist/mirror/target/target-ports.d.ts.map +1 -0
  216. package/dist/mirror/target/target-ports.js +49 -0
  217. package/dist/mirror/target/target-ports.js.map +1 -0
  218. package/dist/mirror/target/target-state.d.ts +22 -0
  219. package/dist/mirror/target/target-state.d.ts.map +1 -0
  220. package/dist/mirror/target/target-state.js +41 -0
  221. package/dist/mirror/target/target-state.js.map +1 -0
  222. package/dist/runtime/biome-dev.d.ts +0 -16
  223. package/dist/runtime/biome-dev.d.ts.map +1 -1
  224. package/dist/runtime/biome-dev.js +0 -53
  225. package/dist/runtime/biome-dev.js.map +1 -1
  226. package/dist/runtime/biome-host/biome-directory-packer.d.ts +3 -0
  227. package/dist/runtime/biome-host/biome-directory-packer.d.ts.map +1 -0
  228. package/dist/runtime/biome-host/biome-directory-packer.js +12 -0
  229. package/dist/runtime/biome-host/biome-directory-packer.js.map +1 -0
  230. package/dist/runtime/biome-host/bundle-packer.d.ts +8 -0
  231. package/dist/runtime/biome-host/bundle-packer.d.ts.map +1 -0
  232. package/dist/runtime/biome-host/bundle-packer.js +3 -0
  233. package/dist/runtime/biome-host/bundle-packer.js.map +1 -0
  234. package/dist/runtime/biome-host/from-spec.d.ts +33 -0
  235. package/dist/runtime/biome-host/from-spec.d.ts.map +1 -0
  236. package/dist/runtime/biome-host/from-spec.js +70 -0
  237. package/dist/runtime/biome-host/from-spec.js.map +1 -0
  238. package/dist/runtime/biome-host/lifecycle-client.d.ts +20 -0
  239. package/dist/runtime/biome-host/lifecycle-client.d.ts.map +1 -0
  240. package/dist/runtime/biome-host/lifecycle-client.js +197 -0
  241. package/dist/runtime/biome-host/lifecycle-client.js.map +1 -0
  242. package/dist/runtime/biome-host/lifecycle-contract.d.ts +95 -0
  243. package/dist/runtime/biome-host/lifecycle-contract.d.ts.map +1 -0
  244. package/dist/runtime/biome-host/lifecycle-contract.js +61 -0
  245. package/dist/runtime/biome-host/lifecycle-contract.js.map +1 -0
  246. package/dist/runtime/biome-host/lifecycle-flow.d.ts +29 -0
  247. package/dist/runtime/biome-host/lifecycle-flow.d.ts.map +1 -0
  248. package/dist/runtime/biome-host/lifecycle-flow.js +106 -0
  249. package/dist/runtime/biome-host/lifecycle-flow.js.map +1 -0
  250. package/dist/runtime/biome-host/plan-sources.d.ts +4 -0
  251. package/dist/runtime/biome-host/plan-sources.d.ts.map +1 -0
  252. package/dist/runtime/biome-host/plan-sources.js +26 -0
  253. package/dist/runtime/biome-host/plan-sources.js.map +1 -0
  254. package/dist/runtime/biome-host/relay/bundle-fetch.d.ts +12 -0
  255. package/dist/runtime/biome-host/relay/bundle-fetch.d.ts.map +1 -0
  256. package/dist/runtime/biome-host/relay/bundle-fetch.js +76 -0
  257. package/dist/runtime/biome-host/relay/bundle-fetch.js.map +1 -0
  258. package/dist/runtime/biome-host/relay/declared-scheme.d.ts +3 -0
  259. package/dist/runtime/biome-host/relay/declared-scheme.d.ts.map +1 -0
  260. package/dist/runtime/biome-host/relay/declared-scheme.js +14 -0
  261. package/dist/runtime/biome-host/relay/declared-scheme.js.map +1 -0
  262. package/dist/runtime/biome-host/relay/npm-token.d.ts +4 -0
  263. package/dist/runtime/biome-host/relay/npm-token.d.ts.map +1 -0
  264. package/dist/runtime/biome-host/relay/npm-token.js +16 -0
  265. package/dist/runtime/biome-host/relay/npm-token.js.map +1 -0
  266. package/dist/runtime/biome-host/relay/relay-flow.d.ts +16 -0
  267. package/dist/runtime/biome-host/relay/relay-flow.d.ts.map +1 -0
  268. package/dist/runtime/biome-host/relay/relay-flow.js +48 -0
  269. package/dist/runtime/biome-host/relay/relay-flow.js.map +1 -0
  270. package/dist/runtime/biome-host/source-staging.d.ts +17 -0
  271. package/dist/runtime/biome-host/source-staging.d.ts.map +1 -0
  272. package/dist/runtime/biome-host/source-staging.js +80 -0
  273. package/dist/runtime/biome-host/source-staging.js.map +1 -0
  274. package/dist/runtime/biome-host/sse.d.ts +2 -0
  275. package/dist/runtime/biome-host/sse.d.ts.map +1 -0
  276. package/dist/runtime/biome-host/sse.js +33 -0
  277. package/dist/runtime/biome-host/sse.js.map +1 -0
  278. package/dist/runtime/biome-local-install.js +1 -1
  279. package/dist/runtime/biome-local-install.js.map +1 -1
  280. package/dist/runtime/browser-origins.d.ts +9 -0
  281. package/dist/runtime/browser-origins.d.ts.map +1 -1
  282. package/dist/runtime/browser-origins.js +10 -0
  283. package/dist/runtime/browser-origins.js.map +1 -1
  284. package/dist/runtime/config/config-document.d.ts +10 -0
  285. package/dist/runtime/config/config-document.d.ts.map +1 -0
  286. package/dist/runtime/config/config-document.js +56 -0
  287. package/dist/runtime/config/config-document.js.map +1 -0
  288. package/dist/runtime/config/config-migrations.d.ts +21 -0
  289. package/dist/runtime/config/config-migrations.d.ts.map +1 -0
  290. package/dist/runtime/config/config-migrations.js +102 -0
  291. package/dist/runtime/config/config-migrations.js.map +1 -0
  292. package/dist/runtime/config/config-paths.d.ts +3 -0
  293. package/dist/runtime/config/config-paths.d.ts.map +1 -0
  294. package/dist/runtime/config/config-paths.js +9 -0
  295. package/dist/runtime/config/config-paths.js.map +1 -0
  296. package/dist/runtime/config/dev-mode.d.ts +0 -1
  297. package/dist/runtime/config/dev-mode.d.ts.map +1 -1
  298. package/dist/runtime/config/dev-mode.js +11 -27
  299. package/dist/runtime/config/dev-mode.js.map +1 -1
  300. package/dist/runtime/config/init-presets.js +5 -9
  301. package/dist/runtime/config/init-presets.js.map +1 -1
  302. package/dist/runtime/config/launch-config-help.d.ts +4 -0
  303. package/dist/runtime/config/launch-config-help.d.ts.map +1 -0
  304. package/dist/runtime/config/launch-config-help.js +42 -0
  305. package/dist/runtime/config/launch-config-help.js.map +1 -0
  306. package/dist/runtime/config/launch-config.d.ts +60 -0
  307. package/dist/runtime/config/launch-config.d.ts.map +1 -0
  308. package/dist/runtime/config/launch-config.js +123 -0
  309. package/dist/runtime/config/launch-config.js.map +1 -0
  310. package/dist/runtime/config/launch-schema.d.ts +18 -0
  311. package/dist/runtime/config/launch-schema.d.ts.map +1 -0
  312. package/dist/runtime/config/launch-schema.js +31 -0
  313. package/dist/runtime/config/launch-schema.js.map +1 -0
  314. package/dist/runtime/config/loader.d.ts.map +1 -1
  315. package/dist/runtime/config/loader.js +4 -14
  316. package/dist/runtime/config/loader.js.map +1 -1
  317. package/dist/runtime/config/schema.d.ts +43 -38
  318. package/dist/runtime/config/schema.d.ts.map +1 -1
  319. package/dist/runtime/config/schema.js +17 -46
  320. package/dist/runtime/config/schema.js.map +1 -1
  321. package/dist/runtime/config/sources-config.d.ts +0 -2
  322. package/dist/runtime/config/sources-config.d.ts.map +1 -1
  323. package/dist/runtime/config/sources-config.js +10 -29
  324. package/dist/runtime/config/sources-config.js.map +1 -1
  325. package/dist/runtime/config/versioned-document.d.ts +26 -0
  326. package/dist/runtime/config/versioned-document.d.ts.map +1 -0
  327. package/dist/runtime/config/versioned-document.js +87 -0
  328. package/dist/runtime/config/versioned-document.js.map +1 -0
  329. package/dist/runtime/directory-changes.d.ts +12 -0
  330. package/dist/runtime/directory-changes.d.ts.map +1 -0
  331. package/dist/runtime/directory-changes.js +62 -0
  332. package/dist/runtime/directory-changes.js.map +1 -0
  333. package/dist/runtime/foreground.d.ts +2 -0
  334. package/dist/runtime/foreground.d.ts.map +1 -1
  335. package/dist/runtime/foreground.js +5 -20
  336. package/dist/runtime/foreground.js.map +1 -1
  337. package/dist/runtime/infra/infra-runner.js +5 -5
  338. package/dist/runtime/infra/infra-runner.js.map +1 -1
  339. package/dist/runtime/infra/keycloak-realm.d.ts +3 -19
  340. package/dist/runtime/infra/keycloak-realm.d.ts.map +1 -1
  341. package/dist/runtime/infra/keycloak-realm.js +12 -133
  342. package/dist/runtime/infra/keycloak-realm.js.map +1 -1
  343. package/dist/runtime/installation/current-launcher-renderer.js.map +1 -1
  344. package/dist/runtime/installation/from-current-config.d.ts.map +1 -1
  345. package/dist/runtime/installation/from-current-config.js +24 -47
  346. package/dist/runtime/installation/from-current-config.js.map +1 -1
  347. package/dist/runtime/installation/index.d.ts +1 -0
  348. package/dist/runtime/installation/index.d.ts.map +1 -1
  349. package/dist/runtime/installation/index.js +1 -0
  350. package/dist/runtime/installation/index.js.map +1 -1
  351. package/dist/runtime/installation/installation-file.d.ts +3 -0
  352. package/dist/runtime/installation/installation-file.d.ts.map +1 -0
  353. package/dist/runtime/installation/installation-file.js +9 -0
  354. package/dist/runtime/installation/installation-file.js.map +1 -0
  355. package/dist/runtime/installation/readiness.d.ts +6 -7
  356. package/dist/runtime/installation/readiness.d.ts.map +1 -1
  357. package/dist/runtime/installation/readiness.js +82 -132
  358. package/dist/runtime/installation/readiness.js.map +1 -1
  359. package/dist/runtime/installation/state-store.d.ts +4 -0
  360. package/dist/runtime/installation/state-store.d.ts.map +1 -1
  361. package/dist/runtime/installation/state-store.js +22 -1
  362. package/dist/runtime/installation/state-store.js.map +1 -1
  363. package/dist/runtime/installation/to-current-config.d.ts +4 -1
  364. package/dist/runtime/installation/to-current-config.d.ts.map +1 -1
  365. package/dist/runtime/installation/to-current-config.js +10 -36
  366. package/dist/runtime/installation/to-current-config.js.map +1 -1
  367. package/dist/runtime/launch-plan-format.d.ts.map +1 -1
  368. package/dist/runtime/launch-plan-format.js +31 -6
  369. package/dist/runtime/launch-plan-format.js.map +1 -1
  370. package/dist/runtime/launch-result.d.ts +15 -0
  371. package/dist/runtime/launch-result.d.ts.map +1 -0
  372. package/dist/runtime/launch-result.js +3 -0
  373. package/dist/runtime/launch-result.js.map +1 -0
  374. package/dist/runtime/launch.d.ts +16 -5
  375. package/dist/runtime/launch.d.ts.map +1 -1
  376. package/dist/runtime/launch.js +151 -315
  377. package/dist/runtime/launch.js.map +1 -1
  378. package/dist/runtime/license/helm-pull-secret.d.ts +1 -1
  379. package/dist/runtime/license/helm-pull-secret.d.ts.map +1 -1
  380. package/dist/runtime/license/helm-pull-secret.js +2 -2
  381. package/dist/runtime/license/helm-pull-secret.js.map +1 -1
  382. package/dist/runtime/lifecycle-progress/index.d.ts +9 -0
  383. package/dist/runtime/lifecycle-progress/index.d.ts.map +1 -0
  384. package/dist/runtime/lifecycle-progress/index.js +30 -0
  385. package/dist/runtime/lifecycle-progress/index.js.map +1 -0
  386. package/dist/runtime/lifecycle-progress/json-renderer.d.ts +3 -0
  387. package/dist/runtime/lifecycle-progress/json-renderer.d.ts.map +1 -0
  388. package/dist/runtime/lifecycle-progress/json-renderer.js +27 -0
  389. package/dist/runtime/lifecycle-progress/json-renderer.js.map +1 -0
  390. package/dist/runtime/lifecycle-progress/text-renderer.d.ts +5 -0
  391. package/dist/runtime/lifecycle-progress/text-renderer.d.ts.map +1 -0
  392. package/dist/runtime/lifecycle-progress/text-renderer.js +83 -0
  393. package/dist/runtime/lifecycle-progress/text-renderer.js.map +1 -0
  394. package/dist/runtime/lifecycle-progress/types.d.ts +79 -0
  395. package/dist/runtime/lifecycle-progress/types.d.ts.map +1 -0
  396. package/dist/runtime/lifecycle-progress/types.js +32 -0
  397. package/dist/runtime/lifecycle-progress/types.js.map +1 -0
  398. package/dist/runtime/lock-loader.d.ts +13 -3
  399. package/dist/runtime/lock-loader.d.ts.map +1 -1
  400. package/dist/runtime/lock-loader.js +28 -8
  401. package/dist/runtime/lock-loader.js.map +1 -1
  402. package/dist/runtime/paths.d.ts +2 -0
  403. package/dist/runtime/paths.d.ts.map +1 -1
  404. package/dist/runtime/paths.js +17 -4
  405. package/dist/runtime/paths.js.map +1 -1
  406. package/dist/runtime/roster.d.ts +6 -5
  407. package/dist/runtime/roster.d.ts.map +1 -1
  408. package/dist/runtime/roster.js +0 -21
  409. package/dist/runtime/roster.js.map +1 -1
  410. package/dist/runtime/runner/container-preflight.d.ts +3 -2
  411. package/dist/runtime/runner/container-preflight.d.ts.map +1 -1
  412. package/dist/runtime/runner/container-preflight.js +5 -5
  413. package/dist/runtime/runner/container-preflight.js.map +1 -1
  414. package/dist/runtime/runner/container-runner.d.ts +0 -22
  415. package/dist/runtime/runner/container-runner.d.ts.map +1 -1
  416. package/dist/runtime/runner/container-runner.js +0 -112
  417. package/dist/runtime/runner/container-runner.js.map +1 -1
  418. package/dist/runtime/runner/docker-cli.d.ts +1 -0
  419. package/dist/runtime/runner/docker-cli.d.ts.map +1 -1
  420. package/dist/runtime/runner/docker-cli.js +19 -0
  421. package/dist/runtime/runner/docker-cli.js.map +1 -1
  422. package/dist/runtime/runner/helm-cli.d.ts +1 -0
  423. package/dist/runtime/runner/helm-cli.d.ts.map +1 -1
  424. package/dist/runtime/runner/helm-cli.js +5 -1
  425. package/dist/runtime/runner/helm-cli.js.map +1 -1
  426. package/dist/runtime/runner/helm-pre-install.d.ts +3 -2
  427. package/dist/runtime/runner/helm-pre-install.d.ts.map +1 -1
  428. package/dist/runtime/runner/helm-pre-install.js +3 -3
  429. package/dist/runtime/runner/helm-pre-install.js.map +1 -1
  430. package/dist/runtime/runner/helm-runner.d.ts +29 -4
  431. package/dist/runtime/runner/helm-runner.d.ts.map +1 -1
  432. package/dist/runtime/runner/helm-runner.js +44 -14
  433. package/dist/runtime/runner/helm-runner.js.map +1 -1
  434. package/dist/runtime/runner/kube-cli.d.ts +1 -0
  435. package/dist/runtime/runner/kube-cli.d.ts.map +1 -1
  436. package/dist/runtime/runner/kube-cli.js +24 -2
  437. package/dist/runtime/runner/kube-cli.js.map +1 -1
  438. package/dist/runtime/secrets/managed-local-key-provider.d.ts +2 -0
  439. package/dist/runtime/secrets/managed-local-key-provider.d.ts.map +1 -1
  440. package/dist/runtime/secrets/managed-local-key-provider.js +17 -8
  441. package/dist/runtime/secrets/managed-local-key-provider.js.map +1 -1
  442. package/dist/runtime/seed/closure-container.d.ts +8 -0
  443. package/dist/runtime/seed/closure-container.d.ts.map +1 -0
  444. package/dist/runtime/seed/closure-container.js +23 -0
  445. package/dist/runtime/seed/closure-container.js.map +1 -0
  446. package/dist/runtime/seed/closure-helm.d.ts +9 -0
  447. package/dist/runtime/seed/closure-helm.d.ts.map +1 -0
  448. package/dist/runtime/seed/closure-helm.js +16 -0
  449. package/dist/runtime/seed/closure-helm.js.map +1 -0
  450. package/dist/runtime/seed/closure-names.d.ts +4 -0
  451. package/dist/runtime/seed/closure-names.d.ts.map +1 -0
  452. package/dist/runtime/seed/closure-names.js +29 -0
  453. package/dist/runtime/seed/closure-names.js.map +1 -0
  454. package/dist/runtime/seed/closure-native.d.ts +3 -0
  455. package/dist/runtime/seed/closure-native.d.ts.map +1 -0
  456. package/dist/runtime/seed/closure-native.js +18 -0
  457. package/dist/runtime/seed/closure-native.js.map +1 -0
  458. package/dist/runtime/seed/installation-tar.d.ts +5 -0
  459. package/dist/runtime/seed/installation-tar.d.ts.map +1 -0
  460. package/dist/runtime/seed/installation-tar.js +30 -0
  461. package/dist/runtime/seed/installation-tar.js.map +1 -0
  462. package/dist/runtime/seed/launch-env.d.ts +42 -0
  463. package/dist/runtime/seed/launch-env.d.ts.map +1 -0
  464. package/dist/runtime/seed/launch-env.js +150 -0
  465. package/dist/runtime/seed/launch-env.js.map +1 -0
  466. package/dist/runtime/seed/seed-container.d.ts +13 -0
  467. package/dist/runtime/seed/seed-container.d.ts.map +1 -0
  468. package/dist/runtime/seed/seed-container.js +175 -0
  469. package/dist/runtime/seed/seed-container.js.map +1 -0
  470. package/dist/runtime/seed/seed-delivery-env.d.ts +39 -0
  471. package/dist/runtime/seed/seed-delivery-env.d.ts.map +1 -0
  472. package/dist/runtime/seed/seed-delivery-env.js +47 -0
  473. package/dist/runtime/seed/seed-delivery-env.js.map +1 -0
  474. package/dist/runtime/seed/seed-down.d.ts +2 -0
  475. package/dist/runtime/seed/seed-down.d.ts.map +1 -0
  476. package/dist/runtime/seed/seed-down.js +52 -0
  477. package/dist/runtime/seed/seed-down.js.map +1 -0
  478. package/dist/runtime/seed/seed-env-file.d.ts +3 -0
  479. package/dist/runtime/seed/seed-env-file.d.ts.map +1 -0
  480. package/dist/runtime/seed/seed-env-file.js +24 -0
  481. package/dist/runtime/seed/seed-env-file.js.map +1 -0
  482. package/dist/runtime/seed/seed-env-secret.d.ts +18 -0
  483. package/dist/runtime/seed/seed-env-secret.d.ts.map +1 -0
  484. package/dist/runtime/seed/seed-env-secret.js +62 -0
  485. package/dist/runtime/seed/seed-env-secret.js.map +1 -0
  486. package/dist/runtime/seed/seed-environment.d.ts +12 -0
  487. package/dist/runtime/seed/seed-environment.d.ts.map +1 -0
  488. package/dist/runtime/seed/seed-environment.js +66 -0
  489. package/dist/runtime/seed/seed-environment.js.map +1 -0
  490. package/dist/runtime/seed/seed-facts.d.ts +22 -0
  491. package/dist/runtime/seed/seed-facts.d.ts.map +1 -0
  492. package/dist/runtime/seed/seed-facts.js +40 -0
  493. package/dist/runtime/seed/seed-facts.js.map +1 -0
  494. package/dist/runtime/seed/seed-helm.d.ts +10 -0
  495. package/dist/runtime/seed/seed-helm.d.ts.map +1 -0
  496. package/dist/runtime/seed/seed-helm.js +74 -0
  497. package/dist/runtime/seed/seed-helm.js.map +1 -0
  498. package/dist/runtime/seed/seed-image-user.d.ts +6 -0
  499. package/dist/runtime/seed/seed-image-user.d.ts.map +1 -0
  500. package/dist/runtime/seed/seed-image-user.js +14 -0
  501. package/dist/runtime/seed/seed-image-user.js.map +1 -0
  502. package/dist/runtime/seed/seed-installation-files.d.ts +23 -0
  503. package/dist/runtime/seed/seed-installation-files.d.ts.map +1 -0
  504. package/dist/runtime/seed/seed-installation-files.js +51 -0
  505. package/dist/runtime/seed/seed-installation-files.js.map +1 -0
  506. package/dist/runtime/seed/seed-installation.d.ts +20 -0
  507. package/dist/runtime/seed/seed-installation.d.ts.map +1 -0
  508. package/dist/runtime/seed/seed-installation.js +36 -0
  509. package/dist/runtime/seed/seed-installation.js.map +1 -0
  510. package/dist/runtime/seed/seed-launcher.d.ts +14 -0
  511. package/dist/runtime/seed/seed-launcher.d.ts.map +1 -0
  512. package/dist/runtime/seed/seed-launcher.js +155 -0
  513. package/dist/runtime/seed/seed-launcher.js.map +1 -0
  514. package/dist/runtime/seed/seed-options.d.ts +22 -0
  515. package/dist/runtime/seed/seed-options.d.ts.map +1 -0
  516. package/dist/runtime/seed/seed-options.js +57 -0
  517. package/dist/runtime/seed/seed-options.js.map +1 -0
  518. package/dist/runtime/seed/seed-platform-endpoints.d.ts +8 -0
  519. package/dist/runtime/seed/seed-platform-endpoints.d.ts.map +1 -0
  520. package/dist/runtime/seed/seed-platform-endpoints.js +55 -0
  521. package/dist/runtime/seed/seed-platform-endpoints.js.map +1 -0
  522. package/dist/runtime/seed/seed-process.d.ts +22 -0
  523. package/dist/runtime/seed/seed-process.d.ts.map +1 -0
  524. package/dist/runtime/seed/seed-process.js +79 -0
  525. package/dist/runtime/seed/seed-process.js.map +1 -0
  526. package/dist/runtime/seed/seed-record.d.ts +101 -0
  527. package/dist/runtime/seed/seed-record.d.ts.map +1 -0
  528. package/dist/runtime/seed/seed-record.js +141 -0
  529. package/dist/runtime/seed/seed-record.js.map +1 -0
  530. package/dist/runtime/seed/seed-resolved-deployment.d.ts +14 -0
  531. package/dist/runtime/seed/seed-resolved-deployment.d.ts.map +1 -0
  532. package/dist/runtime/seed/seed-resolved-deployment.js +52 -0
  533. package/dist/runtime/seed/seed-resolved-deployment.js.map +1 -0
  534. package/dist/runtime/seed/substrate-facts.d.ts +52 -0
  535. package/dist/runtime/seed/substrate-facts.d.ts.map +1 -0
  536. package/dist/runtime/seed/substrate-facts.js +92 -0
  537. package/dist/runtime/seed/substrate-facts.js.map +1 -0
  538. package/dist/runtime/seed/supervisor-contract.d.ts +9 -0
  539. package/dist/runtime/seed/supervisor-contract.d.ts.map +1 -0
  540. package/dist/runtime/seed/supervisor-contract.js +68 -0
  541. package/dist/runtime/seed/supervisor-contract.js.map +1 -0
  542. package/dist/runtime/seed/workload-identity-facts.d.ts +17 -0
  543. package/dist/runtime/seed/workload-identity-facts.d.ts.map +1 -0
  544. package/dist/runtime/seed/workload-identity-facts.js +53 -0
  545. package/dist/runtime/seed/workload-identity-facts.js.map +1 -0
  546. package/dist/runtime/sources/schema.d.ts +2 -0
  547. package/dist/runtime/sources/schema.d.ts.map +1 -1
  548. package/dist/runtime/sources/schema.js +10 -9
  549. package/dist/runtime/sources/schema.js.map +1 -1
  550. package/dist/runtime/store-client.d.ts +0 -10
  551. package/dist/runtime/store-client.d.ts.map +1 -1
  552. package/dist/runtime/store-client.js +0 -5
  553. package/dist/runtime/store-client.js.map +1 -1
  554. package/dist/runtime/tenancy/identity-installer.d.ts +11 -0
  555. package/dist/runtime/tenancy/identity-installer.d.ts.map +1 -0
  556. package/dist/runtime/tenancy/identity-installer.js +39 -0
  557. package/dist/runtime/tenancy/identity-installer.js.map +1 -0
  558. package/dist/runtime/tenancy/import-cache.d.ts +5 -0
  559. package/dist/runtime/tenancy/import-cache.d.ts.map +1 -0
  560. package/dist/runtime/tenancy/import-cache.js +27 -0
  561. package/dist/runtime/tenancy/import-cache.js.map +1 -0
  562. package/dist/runtime/tenancy/openfga.d.ts +4 -0
  563. package/dist/runtime/tenancy/openfga.d.ts.map +1 -0
  564. package/dist/runtime/tenancy/openfga.js +29 -0
  565. package/dist/runtime/tenancy/openfga.js.map +1 -0
  566. package/dist/runtime/tenancy/servers.d.ts +18 -0
  567. package/dist/runtime/tenancy/servers.d.ts.map +1 -0
  568. package/dist/runtime/tenancy/servers.js +102 -0
  569. package/dist/runtime/tenancy/servers.js.map +1 -0
  570. package/dist/runtime/tenancy/session.d.ts +19 -0
  571. package/dist/runtime/tenancy/session.d.ts.map +1 -0
  572. package/dist/runtime/tenancy/session.js +79 -0
  573. package/dist/runtime/tenancy/session.js.map +1 -0
  574. package/dist/runtime/tenancy/specs.d.ts +27 -0
  575. package/dist/runtime/tenancy/specs.d.ts.map +1 -0
  576. package/dist/runtime/tenancy/specs.js +129 -0
  577. package/dist/runtime/tenancy/specs.js.map +1 -0
  578. package/examples/01-local-native.yaml +1 -3
  579. package/examples/02-local-container-full.yaml +0 -2
  580. package/examples/03-byo-infra.yaml +1 -5
  581. package/examples/06-biome-sources.yaml +1 -3
  582. package/package.json +32 -37
  583. package/xema.config.example.yaml +1 -10
  584. package/dist/assets/keycloak/realm-xema.json +0 -397
  585. package/dist/commands/dev.d.ts.map +0 -1
  586. package/dist/commands/dev.js +0 -196
  587. package/dist/commands/dev.js.map +0 -1
  588. package/dist/commands/edition.d.ts +0 -3
  589. package/dist/commands/edition.d.ts.map +0 -1
  590. package/dist/commands/edition.js +0 -54
  591. package/dist/commands/edition.js.map +0 -1
  592. package/dist/commands/serve.d.ts +0 -3
  593. package/dist/commands/serve.d.ts.map +0 -1
  594. package/dist/commands/serve.js +0 -114
  595. package/dist/commands/serve.js.map +0 -1
  596. package/dist/dev/carved-installs.d.ts +0 -3
  597. package/dist/dev/carved-installs.d.ts.map +0 -1
  598. package/dist/dev/carved-installs.js +0 -63
  599. package/dist/dev/carved-installs.js.map +0 -1
  600. package/dist/dev/env-defaults.d.ts +0 -15
  601. package/dist/dev/env-defaults.d.ts.map +0 -1
  602. package/dist/dev/env-defaults.js +0 -178
  603. package/dist/dev/env-defaults.js.map +0 -1
  604. package/dist/dev/forked-worker-bootstrap-protocol.d.ts +0 -17
  605. package/dist/dev/forked-worker-bootstrap-protocol.d.ts.map +0 -1
  606. package/dist/dev/forked-worker-bootstrap-protocol.js +0 -35
  607. package/dist/dev/forked-worker-bootstrap-protocol.js.map +0 -1
  608. package/dist/dev/forked-worker-bootstrap.d.ts +0 -18
  609. package/dist/dev/forked-worker-bootstrap.d.ts.map +0 -1
  610. package/dist/dev/forked-worker-bootstrap.js +0 -84
  611. package/dist/dev/forked-worker-bootstrap.js.map +0 -1
  612. package/dist/dev/forked-worker.d.ts +0 -43
  613. package/dist/dev/forked-worker.d.ts.map +0 -1
  614. package/dist/dev/forked-worker.js +0 -358
  615. package/dist/dev/forked-worker.js.map +0 -1
  616. package/dist/edition/verify-image-evidence.bundle.mjs +0 -70456
  617. package/dist/edition/verify-image-evidence.bundle.provenance.json +0 -3957
  618. package/dist/runtime/backing-registration.d.ts +0 -11
  619. package/dist/runtime/backing-registration.d.ts.map +0 -1
  620. package/dist/runtime/backing-registration.js +0 -94
  621. package/dist/runtime/backing-registration.js.map +0 -1
  622. package/dist/runtime/edition/run-entry.d.ts +0 -9
  623. package/dist/runtime/edition/run-entry.d.ts.map +0 -1
  624. package/dist/runtime/edition/run-entry.js +0 -36
  625. package/dist/runtime/edition/run-entry.js.map +0 -1
  626. package/dist/runtime/edition/verb-map.d.ts +0 -70
  627. package/dist/runtime/edition/verb-map.d.ts.map +0 -1
  628. package/dist/runtime/edition/verb-map.js +0 -166
  629. package/dist/runtime/edition/verb-map.js.map +0 -1
  630. package/dist/runtime/env-seeder.d.ts +0 -26
  631. package/dist/runtime/env-seeder.d.ts.map +0 -1
  632. package/dist/runtime/env-seeder.js +0 -340
  633. package/dist/runtime/env-seeder.js.map +0 -1
  634. package/dist/runtime/port-map.d.ts +0 -3
  635. package/dist/runtime/port-map.d.ts.map +0 -1
  636. package/dist/runtime/port-map.js +0 -25
  637. package/dist/runtime/port-map.js.map +0 -1
  638. package/dist/runtime/run-manifest.d.ts +0 -52
  639. package/dist/runtime/run-manifest.d.ts.map +0 -1
  640. package/dist/runtime/run-manifest.js +0 -585
  641. package/dist/runtime/run-manifest.js.map +0 -1
  642. package/dist/runtime/runner/native-runner.d.ts +0 -13
  643. package/dist/runtime/runner/native-runner.d.ts.map +0 -1
  644. package/dist/runtime/runner/native-runner.js +0 -94
  645. package/dist/runtime/runner/native-runner.js.map +0 -1
  646. package/dist/runtime/runner/service-runner.d.ts +0 -28
  647. package/dist/runtime/runner/service-runner.d.ts.map +0 -1
  648. package/dist/runtime/runner/service-runner.js +0 -10
  649. package/dist/runtime/runner/service-runner.js.map +0 -1
  650. package/dist/runtime/secrets/generated-platform-secrets.d.ts +0 -16
  651. package/dist/runtime/secrets/generated-platform-secrets.d.ts.map +0 -1
  652. package/dist/runtime/secrets/generated-platform-secrets.js +0 -115
  653. package/dist/runtime/secrets/generated-platform-secrets.js.map +0 -1
  654. package/dist/runtime/secrets/resolver.d.ts +0 -23
  655. package/dist/runtime/secrets/resolver.d.ts.map +0 -1
  656. package/dist/runtime/secrets/resolver.js +0 -266
  657. package/dist/runtime/secrets/resolver.js.map +0 -1
  658. package/dist/runtime/supervisor.d.ts +0 -67
  659. package/dist/runtime/supervisor.d.ts.map +0 -1
  660. package/dist/runtime/supervisor.js +0 -227
  661. package/dist/runtime/supervisor.js.map +0 -1
  662. package/edition/README.md +0 -293
  663. package/edition/adapter-bundled-versions.mjs +0 -108
  664. package/edition/adapter-host-versions.mjs +0 -41
  665. package/edition/assemble-producer-input.mjs +0 -1414
  666. package/edition/assemble-third-party-input.mjs +0 -336
  667. package/edition/authored-source-check.mjs +0 -135
  668. package/edition/authorization-base.mjs +0 -357
  669. package/edition/biome-content.mjs +0 -327
  670. package/edition/build-biome-index.mjs +0 -180
  671. package/edition/build-ledger-completeness.mjs +0 -67
  672. package/edition/build-ledger.mjs +0 -107
  673. package/edition/build-platform-service-index.mjs +0 -292
  674. package/edition/build-runtime-image-source-index.mjs +0 -1187
  675. package/edition/built-verifier.mjs +0 -55
  676. package/edition/candidate-edition.mjs +0 -697
  677. package/edition/canonical-evidence-json.mjs +0 -82
  678. package/edition/canonical-repository-url.mjs +0 -47
  679. package/edition/catalogue-edition.mjs +0 -49
  680. package/edition/catalogue-evidence.mjs +0 -228
  681. package/edition/catalogue-fetch.mjs +0 -124
  682. package/edition/catalogue-lock-field.mjs +0 -41
  683. package/edition/catalogue-pin.mjs +0 -71
  684. package/edition/catalogue.mjs +0 -223
  685. package/edition/chart-set-source-commit.mjs +0 -97
  686. package/edition/check-committed-image-evidence.mjs +0 -412
  687. package/edition/checkout-indexed-source-repositories.mjs +0 -283
  688. package/edition/collected-refusals.mjs +0 -59
  689. package/edition/comment-blanker.mjs +0 -75
  690. package/edition/connector-source-authority.mjs +0 -60
  691. package/edition/contract-authority.mjs +0 -122
  692. package/edition/cosign-certificate-constraints.mjs +0 -50
  693. package/edition/cross-repo-build-inputs.mjs +0 -158
  694. package/edition/customer-definition.mjs +0 -174
  695. package/edition/customer-edition-verbs.mjs +0 -617
  696. package/edition/customer-flags.mjs +0 -15
  697. package/edition/develop-catalogue-free-resolve.mjs +0 -280
  698. package/edition/develop-chart-roster.mjs +0 -96
  699. package/edition/develop-chart-set.mjs +0 -147
  700. package/edition/develop-coverage-readers.mjs +0 -217
  701. package/edition/develop-coverage-run.mjs +0 -50
  702. package/edition/develop-coverage-verdict.mjs +0 -153
  703. package/edition/develop-coverage.mjs +0 -131
  704. package/edition/develop-current-resolution.mjs +0 -29
  705. package/edition/develop-edition-invariants.mjs +0 -142
  706. package/edition/develop-edition-resolve.mjs +0 -211
  707. package/edition/develop-edition.mjs +0 -379
  708. package/edition/develop-engine-image.mjs +0 -95
  709. package/edition/develop-follow.mjs +0 -491
  710. package/edition/develop-freeze.mjs +0 -289
  711. package/edition/develop-git-bundles.mjs +0 -255
  712. package/edition/develop-graph.mjs +0 -28
  713. package/edition/develop-image-coordinate.mjs +0 -54
  714. package/edition/develop-image-probe.mjs +0 -120
  715. package/edition/develop-image-record.mjs +0 -194
  716. package/edition/develop-record-ancestry.mjs +0 -144
  717. package/edition/develop-record-verify.mjs +0 -216
  718. package/edition/develop-resolve-report.mjs +0 -159
  719. package/edition/develop-select-records.mjs +0 -172
  720. package/edition/develop-selection-line.mjs +0 -30
  721. package/edition/develop-selection-pins.mjs +0 -36
  722. package/edition/develop-snapshot-inputs.mjs +0 -93
  723. package/edition/develop-verify-image-record.mjs +0 -109
  724. package/edition/dispatched-runtime-components.mjs +0 -172
  725. package/edition/dist-check.mjs +0 -1137
  726. package/edition/distribution-evidence-set.mjs +0 -1064
  727. package/edition/distribution-paths.mjs +0 -191
  728. package/edition/edition-artifact.mjs +0 -529
  729. package/edition/edition-biome-manifests.mjs +0 -85
  730. package/edition/edition-ceiling.mjs +0 -180
  731. package/edition/edition-channel.mjs +0 -20
  732. package/edition/edition-chart-set.mjs +0 -104
  733. package/edition/edition-config.mjs +0 -374
  734. package/edition/edition-constants.mjs +0 -110
  735. package/edition/edition-contract-parse.mjs +0 -179
  736. package/edition/edition-contract.json +0 -100
  737. package/edition/edition-image-seal.mjs +0 -110
  738. package/edition/edition-kind.mjs +0 -10
  739. package/edition/edition-list.mjs +0 -35
  740. package/edition/edition-locks.mjs +0 -79
  741. package/edition/edition-pin-verbs.mjs +0 -183
  742. package/edition/edition-pin.mjs +0 -17
  743. package/edition/edition-pinned-inputs.mjs +0 -116
  744. package/edition/edition-protocol.mjs +0 -277
  745. package/edition/edition-publisher.mjs +0 -21
  746. package/edition/edition-seal.mjs +0 -257
  747. package/edition/edition-source-pins.mjs +0 -211
  748. package/edition/edition-unpin.mjs +0 -16
  749. package/edition/edition-workspace.mjs +0 -204
  750. package/edition/evidence-checkout.mjs +0 -439
  751. package/edition/evidence-grammars.mjs +0 -18
  752. package/edition/evidence-input-mode.mjs +0 -136
  753. package/edition/evidence-trust-pin.mjs +0 -380
  754. package/edition/evidence-trust-policy.mjs +0 -374
  755. package/edition/external-source-walk.mjs +0 -485
  756. package/edition/first-party-source-ids.mjs +0 -62
  757. package/edition/fleet-coordinate-finality.mjs +0 -363
  758. package/edition/fulcio-certificate-extensions.mjs +0 -231
  759. package/edition/git-json.mjs +0 -54
  760. package/edition/git-source-auth.mjs +0 -131
  761. package/edition/image-delivery-entitlement-descriptor.mjs +0 -106
  762. package/edition/image-evidence-replay-state.mjs +0 -242
  763. package/edition/image-evidence.mjs +0 -1404
  764. package/edition/image-lock-service-rows.mjs +0 -26
  765. package/edition/image-subject-identity.mjs +0 -24
  766. package/edition/images-from-record.mjs +0 -298
  767. package/edition/indexes-at-pins.mjs +0 -13
  768. package/edition/kernel-capability-domain.mjs +0 -30
  769. package/edition/kernel-contract-authority.mjs +0 -517
  770. package/edition/kernel-contract-source-path-set.mjs +0 -94
  771. package/edition/kernel-package.mjs +0 -206
  772. package/edition/kernel-protocol-choice.mjs +0 -239
  773. package/edition/kernel-signer-kind.mjs +0 -23
  774. package/edition/lib.mjs +0 -3303
  775. package/edition/locked-bundle-signer.mjs +0 -297
  776. package/edition/map-with-concurrency.mjs +0 -19
  777. package/edition/no-follow-file.mjs +0 -94
  778. package/edition/oci-evidence-verbs.mjs +0 -419
  779. package/edition/oci-image-source-evidence.mjs +0 -364
  780. package/edition/operation-grant-admission.mjs +0 -285
  781. package/edition/operation-requirements.mjs +0 -282
  782. package/edition/oras-process.mjs +0 -35
  783. package/edition/oras.mjs +0 -742
  784. package/edition/pin-source.mjs +0 -242
  785. package/edition/pinned-cosign.mjs +0 -70
  786. package/edition/plan-image-evidence-refresh.mjs +0 -427
  787. package/edition/platform-lock-readability.mjs +0 -901
  788. package/edition/platform-service-class.mjs +0 -85
  789. package/edition/platform-service-ownership.mjs +0 -88
  790. package/edition/platform-service-source-authority.mjs +0 -105
  791. package/edition/positive-closure.mjs +0 -162
  792. package/edition/previous-seal-registry.mjs +0 -149
  793. package/edition/produce-distribution-completeness-evidence.mjs +0 -318
  794. package/edition/produce-edition-catalogue-evidence.mjs +0 -252
  795. package/edition/produce-image-delivery-entitlement-evidence.mjs +0 -304
  796. package/edition/produce-image-source-evidence.mjs +0 -788
  797. package/edition/producer-evidence-bundle.mjs +0 -201
  798. package/edition/producer-evidence-index-file.mjs +0 -4
  799. package/edition/record-refused.mjs +0 -12
  800. package/edition/registry-credentials.mjs +0 -225
  801. package/edition/release-catalogue.mjs +0 -47
  802. package/edition/release-channel-guard.mjs +0 -108
  803. package/edition/release-edition-artifact.mjs +0 -152
  804. package/edition/release-edition.mjs +0 -54
  805. package/edition/remedy-command.mjs +0 -89
  806. package/edition/repin-evidence-trust.mjs +0 -109
  807. package/edition/required-resource-provider.mjs +0 -58
  808. package/edition/resolve-chart-set.mjs +0 -376
  809. package/edition/resolve-customer-edition.mjs +0 -374
  810. package/edition/resolve-distribution.mjs +0 -2639
  811. package/edition/resolve-edition.mjs +0 -192
  812. package/edition/resolve-images.mjs +0 -2294
  813. package/edition/seal-image-digests.mjs +0 -954
  814. package/edition/sealed-distribution-lock.mjs +0 -22
  815. package/edition/sealed-evidence-accept.mjs +0 -82
  816. package/edition/shallow-checkout.mjs +0 -18
  817. package/edition/sigstore-bundle-media-type.mjs +0 -4
  818. package/edition/source-authority.mjs +0 -713
  819. package/edition/source-closure.mjs +0 -115
  820. package/edition/store-publisher-trust.mjs +0 -40
  821. package/edition/strict-json.mjs +0 -121
  822. package/edition/string-order.mjs +0 -5
  823. package/edition/third-party-admission.mjs +0 -91
  824. package/edition/third-party-bundle-registry.mjs +0 -242
  825. package/edition/third-party-certificate-extensions.mjs +0 -21
  826. package/edition/third-party-image-pins.mjs +0 -41
  827. package/edition/third-party-pins-trusted.mjs +0 -24
  828. package/edition/third-party-producer-evidence.mjs +0 -76
  829. package/edition/third-party-source-check.mjs +0 -28
  830. package/edition/third-party-source-context.mjs +0 -41
  831. package/edition/third-party-source-evidence.mjs +0 -287
  832. package/edition/third-party-source-flags.mjs +0 -134
  833. package/edition/third-party-source-pins.mjs +0 -259
  834. package/edition/third-party-source-uniqueness.mjs +0 -54
  835. package/edition/third-party-source-walk.mjs +0 -115
  836. package/edition/third-party-source-writer.mjs +0 -213
  837. package/edition/third-party-subjects.mjs +0 -128
  838. package/edition/trust-policy-arming-verb.mjs +0 -60
  839. package/edition/trust-policy-arming.mjs +0 -144
  840. package/edition/trust-policy-image-ownership.mjs +0 -85
  841. package/edition/trusted-executable.mjs +0 -166
  842. package/edition/verifier-binding.mjs +0 -45
  843. package/edition/verifier-files.mjs +0 -8
  844. package/edition/verifier-kernel-schemas.mjs +0 -22
  845. package/edition/verifier-provenance.mjs +0 -64
  846. package/edition/verify-catalogue-evidence.mjs +0 -247
  847. package/edition/verify-image-evidence.mjs +0 -475
  848. package/edition/verify-image-platforms.mjs +0 -523
  849. package/edition/why.mjs +0 -56
  850. package/edition/workspace-sections.mjs +0 -276
@@ -1,1187 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { execFileSync } from 'node:child_process';
4
- import { existsSync, readFileSync, realpathSync, writeFileSync } from 'node:fs';
5
- import { isAbsolute, join } from 'node:path';
6
-
7
- import { buildValidatedPlatformServiceIndex } from './build-platform-service-index.mjs';
8
- import { canonicalPublicHttpsRepositoryUrl } from './canonical-repository-url.mjs';
9
- import { connectorCrossRepoBuildInputs } from './connector-source-authority.mjs';
10
- import { editionWorkspaceConfig, workspaceSection } from './edition-config.mjs';
11
- import { biomeIndexPath, dataRoot, platformServiceIndexPath, runtimeImageSourceIndexPath, WorkspaceRoot, configureEditionWorkspaceFromProcess, isEntryModule, sourcePath } from './edition-workspace.mjs';
12
- import { COMMIT_PATTERN } from './evidence-grammars.mjs';
13
- import { firstPartySources } from './first-party-source-ids.mjs';
14
- import {
15
- buildTrustedKernelContractAuthority,
16
- KERNEL_COMMIT_FLAG,
17
- describeKernelContractAuthorityDrift,
18
- validateKernelContractAuthorityFromGit,
19
- } from './kernel-contract-authority.mjs';
20
- import {
21
- buildBiomeIndex,
22
- compareStrings,
23
- distributionBiomeSourceRepositories,
24
- loadKernelDistributionSchemas,
25
- readGitJsonAtCommit,
26
- serializeJson,
27
- sha256Hex,
28
- } from './lib.mjs';
29
- import { createRegistryClientResolver } from './oci-image-source-evidence.mjs';
30
- import { disposeRegistrySessions } from './oras.mjs';
31
- import {
32
- platformServiceRuntimeBindings,
33
- } from './platform-service-source-authority.mjs';
34
- import {
35
- createExactCommitSourceAuthority,
36
- createPinnedSourceAuthority,
37
- createSourceAuthority,
38
- parseSourceModeArgs,
39
- } from './source-authority.mjs';
40
- import { readStrictJsonFile } from './strict-json.mjs';
41
- import { checkThirdPartySourcePins } from './third-party-source-check.mjs';
42
- import { loadThirdPartySourceContext } from './third-party-source-context.mjs';
43
- import {
44
- CHECK_THIRD_PARTY_FLAG,
45
- THIRD_PARTY_FLAG,
46
- THIRD_PARTY_WRITER_USAGE,
47
- takeThirdPartyFlags,
48
- } from './third-party-source-flags.mjs';
49
- import { commitThirdPartySourceWrite, planThirdPartySourceWrite } from './third-party-source-writer.mjs';
50
-
51
- if (isEntryModule(import.meta.url)) {
52
- configureEditionWorkspaceFromProcess([WorkspaceRoot.Data, WorkspaceRoot.Sources, WorkspaceRoot.Kernel]);
53
- }
54
-
55
- const runtimeImageSources = () =>
56
- workspaceSection('runtimeImageSources', 'building or validating the runtime image source index');
57
-
58
- const sourceDeclarations = () => runtimeImageSources().supplementalSources;
59
-
60
- /**
61
- * Content a producing repository copies OUT OF ANOTHER repository into its build
62
- * context before the image build.
63
- *
64
- * This is the ONLY image build input that is not derivable from the consuming
65
- * repository at its own commit — nothing inside `xema-base@<sha>` names the
66
- * bytes of `xema-cultivars/biomes/platform/mailops`. Every other input (the
67
- * resolved Dockerfile, its `COPY` sources, the `workspace:` graph) is read
68
- * straight out of the consuming commit, so this list is the whole hand-declared
69
- * surface and stays small by construction.
70
- *
71
- * The list is the data root's (`runtimeImageSources.crossRepoBuildInputs`), plus
72
- * one input per production connector derived from `connectorSources`; the
73
- * history of why each entry is there lives with the data. Each entry pins the vendored bytes to the SOURCE repository's own
74
- * `repositoryPins` commit — the revision this distribution has resolved, and
75
- * therefore the revision the producing build must clone.
76
- *
77
- * CLOSED (was a KNOWN GAP): the producing workflows used to clone with
78
- * `git clone --depth 1` and no ref — the source repository's default-branch HEAD
79
- * at build time — so a built image was not a function of any commit pair and its
80
- * published tag could describe bytes it did not contain. They now vendor through
81
- * `tooling/release/vendor-cross-repo-inputs.mjs`, driven by a per-repository
82
- * record the aggregator generates FROM THIS TABLE joined to `repositoryPins`
83
- * (`tooling/release/generate-cross-repo-build-inputs.mjs`). The same record
84
- * supplies `compute-image-tag.mjs`'s `--vendored` pins, so the bytes in the image
85
- * and the bytes in the hash come from one place. The gate
86
- * `cross-repo-build-inputs` fails on a stale record, and on a workflow that
87
- * hand-rolls a clone or a copy instead of reading it.
88
- *
89
- * Consequence worth knowing: a change to a source repository's vendored content
90
- * does NOT reach a consumer's image until this index is regenerated and the
91
- * emitted record re-committed. That is the point — the vendored revision is
92
- * declared, not whatever HEAD happened to be.
93
- */
94
- export const crossRepoBuildInputs = () => [
95
- ...runtimeImageSources().crossRepoBuildInputs,
96
- ...connectorCrossRepoBuildInputs(),
97
- ];
98
-
99
- /**
100
- * Context directories a build step creates, which exist in no commit. Declared
101
- * (`runtimeImageSources.buildStepContextDirectories`) so a Dockerfile COPY of
102
- * one is a REVIEWED absence rather than a silent miss.
103
- */
104
- const buildStepContextDirectoriesDeclared = () => runtimeImageSources().buildStepContextDirectories;
105
-
106
- /**
107
- * The logical-platform-service → actual-runtime-subject bindings that cannot be
108
- * inferred. DERIVED from `platform-service-source-authority.mjs`, which is the
109
- * one place the partition — own repository-root image vs. carried by another
110
- * subject — is declared. It used to be a second copy here, and the two could
111
- * only agree by hand.
112
- */
113
-
114
- function readJson(path) {
115
- return readStrictJsonFile(path);
116
- }
117
-
118
- function git(repo, args) {
119
- return execFileSync('git', ['-C', repo, ...args], {
120
- encoding: 'utf8',
121
- stdio: ['ignore', 'pipe', 'pipe'],
122
- }).trim();
123
- }
124
-
125
- function declaredSourceRepositories() {
126
- return [
127
- ...new Set([
128
- ...readJson(biomeIndexPath()).map(({ repo }) => repo),
129
- ...readJson(
130
- join(dataRoot(), 'platform-service-index.json'),
131
- ).services.map(({ repo }) => repo),
132
- ...sourceDeclarations().map(({ repo }) => repo),
133
- ...crossRepoBuildInputs().flatMap(({ consumerRepo, sourceRepo }) => [
134
- consumerRepo,
135
- sourceRepo,
136
- ]),
137
- ]),
138
- ];
139
- }
140
-
141
- /**
142
- * One repository, BOTH provenance axes, in ONE record.
143
- *
144
- * `sourceCommit` is the IMAGE axis and its meaning is unchanged: every image
145
- * subject from this repository must carry exactly this commit, and
146
- * `expectedProducerSource` throws when one does not. It is therefore
147
- * constrained to commits with published image evidence.
148
- *
149
- * `vendoredSourceCommit` is the SOURCE axis — where vendored bytes come from.
150
- * It is the published tip, because a vendored path needs its content to exist
151
- * at a published immutable commit and does NOT need an image to have been
152
- * built there. See `publishedSourceTip` in `source-authority.mjs` for the
153
- * measured production failure that fusing the two produced.
154
- *
155
- * They are emitted together, from one resolution, deliberately: the release has
156
- * ONE authority that answers both questions about a component, never two
157
- * competing ones that can disagree about which commit a component is at.
158
- */
159
- export function repositoryIdentity(repo, sourceAuthority) {
160
- const repoDirectory = sourcePath(repo);
161
- const sourceCommit = sourceAuthority.commitForRepository(repo);
162
- const vendoredSourceCommit =
163
- sourceAuthority.vendoredSourceCommitForRepository(repo);
164
- const repositoryUrl = canonicalPublicHttpsRepositoryUrl(
165
- git(repoDirectory, ['remote', 'get-url', 'origin']),
166
- `${repo} origin`,
167
- );
168
- return { repo, repositoryUrl, sourceCommit, vendoredSourceCommit };
169
- }
170
-
171
- /**
172
- * Refuse to WRITE an index whose declared vendored source paths do not exist at
173
- * the commit whose bytes the build will actually fetch.
174
- *
175
- * This assertion landed on `main` in `0dfbba7` and was removed by `a416f1e`
176
- * ("Revert the develop merge on main — the CONSUMER landed before its
177
- * PRODUCER") as COLLATERAL of reverting an unrelated cross-repo ordering
178
- * failure — 93 lines of this file among 62 reverted files. It is re-landed here
179
- * on its own merits, and on the SOURCE axis.
180
- *
181
- * Nothing reads the declared cross-repo build inputs at declaration time, so a path that
182
- * has moved fails SILENTLY where it is written and LOUDLY somewhere else
183
- * entirely: the consuming image build dies at "Fetch pinned cross-repo build
184
- * inputs", in another repository, for a declaration nobody was editing. The
185
- * defect belongs where it is authored, and an index that cannot be written is
186
- * strictly better than one that can be written and cannot be built from.
187
- */
188
- function assertVendoredSourcesResolve(crossRepoBuildInputs, resolveIdentity) {
189
- const unresolved = [];
190
- for (const input of crossRepoBuildInputs) {
191
- // The SOURCE axis, not the image pin. A vendored path is a fact about the
192
- // commit whose BYTES are vendored, and `vendor-cross-repo-inputs.mjs`
193
- // fetches exactly that commit — so asking the image-evidence pin whether a
194
- // source path exists answers about a commit the build never reads.
195
- const { vendoredSourceCommit } = resolveIdentity(input.sourceRepo);
196
- const found = git(sourcePath(input.sourceRepo), [
197
- 'ls-tree',
198
- '--name-only',
199
- vendoredSourceCommit,
200
- '--',
201
- input.sourcePath,
202
- ]);
203
- if (found.length === 0) {
204
- unresolved.push(
205
- `${input.sourceRepo}@${vendoredSourceCommit}:${input.sourcePath} does not ` +
206
- `exist (vendored into ${input.consumerRepo}` +
207
- `${input.consumerService ? ` service "${input.consumerService}"` : ''} ` +
208
- `at ${input.destinationPath})`,
209
- );
210
- }
211
- }
212
- if (unresolved.length > 0) {
213
- throw new Error(
214
- `the declared crossRepoBuildInputs name ${unresolved.length} source path(s) that do ` +
215
- `not exist at the vendored source commit this index pins. A vendored path ` +
216
- `is a fact about that PINNED commit, not about anybody's working tree or ` +
217
- `develop branch — fix the declaration, or pin a commit that carries it:` +
218
- `\n ${unresolved.join('\n ')}`,
219
- );
220
- }
221
- }
222
-
223
- const CURRENT_INDEX_SCHEMA_VERSION = 2;
224
-
225
- /**
226
- * The kernel-contract authority for a pin regeneration.
227
- *
228
- * ── WHY THIS IS NOT `buildTrustedKernelContractAuthority` ──
229
- *
230
- * This function regenerates `repositoryPins` — a PROJECTION of immutable
231
- * remote facts. Every one of those pins is read from
232
- * `refs/remotes/origin/main` of its repository, which is exactly right: a
233
- * production composition must resolve from durable, published state.
234
- *
235
- * The kernel-contract authority was the ONE exception, and it was the wrong
236
- * kind of exception. `buildTrustedKernelContractAuthority` takes its commit
237
- * from the LOCAL HEAD of `repos/xema-kernel-contracts` and requires that
238
- * checkout to be EXACTLY CLEAN — so regenerating thirteen pins that have
239
- * nothing to do with the kernel contract failed outright whenever somebody
240
- * had an uncommitted file in that one repository. Measured 2026-09-14: ten of
241
- * twenty-eight repositories in a shared checkout held another agent's
242
- * in-flight work, and the pins could not be regenerated at all.
243
- *
244
- * That is a development-state fact deciding a release-composition question,
245
- * and it is the boundary this change moves. Whether a colleague's working
246
- * tree is dirty must never determine whether we can resolve what production
247
- * ships.
248
- *
249
- * ── WHAT IS PRESERVED, AND WHY IT IS NOT WEAKER ──
250
- *
251
- * The authority is read from the COMMITTED index and re-verified from git AT
252
- * ITS OWN PINNED COMMIT: `validateKernelContractAuthorityFromGit` recomputes
253
- * the content digest from `ls-tree` + `cat-file` blobs at `sourceCommit` and
254
- * refuses anything that does not match byte for byte. No worktree file is
255
- * read on that path — it never was — so the provenance guarantee is identical
256
- * and the clean-checkout assertion was buying nothing for it.
257
- *
258
- * `requireHeadMatch: false` because MOVING the authority is a different
259
- * operation with its own tool: `xema edition index runtime-image-source
260
- * --repin-contract-authority`, which
261
- * legitimately demands a deliberate clean checkout because it is CHOOSING a
262
- * new commit. Re-deriving it here made pin regeneration silently re-pin the
263
- * contract as a side effect — two operations behind one command, and the one
264
- * nobody asked for is the one that took the lock.
265
- *
266
- * BOOTSTRAP is the single case with no committed authority to preserve: it
267
- * CHOOSES a commit exactly as the re-pin does, so it obeys the re-pin's one
268
- * rule — the caller states the commit (`--kernel-commit`) and the checkout's
269
- * HEAD must equal it. Stating a commit when a committed authority exists is
270
- * refused: it would be read by nobody.
271
- *
272
- * A committed index of any schemaVersion but the current one is refused by name,
273
- * never migrated: a schemaVersion 1 index is re-indexed by deleting it and
274
- * running bootstrap. Any other
275
- * schemaVersion is refused by name, never read as one of these.
276
- */
277
- async function resolveContractAuthority(schemas, kernelRoot, kernelCommit) {
278
- const repositoryDirectory = kernelRoot ?? undefined;
279
- const committed = existsSync(runtimeImageSourceIndexPath())
280
- ? readJson(runtimeImageSourceIndexPath())
281
- : undefined;
282
- if (committed !== undefined && committed.schemaVersion !== CURRENT_INDEX_SCHEMA_VERSION) {
283
- throw new Error(
284
- `${runtimeImageSourceIndexPath()} has schemaVersion ${JSON.stringify(committed.schemaVersion)}; ` +
285
- `this command reads only schemaVersion ${CURRENT_INDEX_SCHEMA_VERSION} and does not migrate older indexes: ` +
286
- `delete the index and re-run with ${KERNEL_COMMIT_FLAG} <40-hex> to bootstrap a new one`,
287
- );
288
- }
289
- if (committed === undefined || !committed.contractAuthority) {
290
- return buildTrustedKernelContractAuthority({
291
- ...(repositoryDirectory === undefined ? {} : { repositoryDirectory }),
292
- schemas,
293
- kernelCommit,
294
- });
295
- }
296
- if (kernelCommit !== undefined) {
297
- throw new Error(
298
- `${KERNEL_COMMIT_FLAG} states the commit of a NEW contract authority, and the committed index already pins ` +
299
- `${committed.contractAuthority.sourceCommit}: this command preserves it. Move it with ${REPIN_FLAG} ${KERNEL_COMMIT_FLAG} <40-hex>.`,
300
- );
301
- }
302
- return validateKernelContractAuthorityFromGit({
303
- authority: committed.contractAuthority,
304
- ...(repositoryDirectory === undefined ? {} : { repositoryDirectory }),
305
- schemas,
306
- requireHeadMatch: false,
307
- });
308
- }
309
-
310
- /**
311
- * Re-resolve ONE repository pin and PRESERVE every other one byte for byte.
312
- *
313
- * ── WHY A WHOLE-INDEX REBUILD IS THE WRONG TOOL FOR A ONE-REPOSITORY FIX ──
314
- *
315
- * `--trusted-write` re-resolves all thirteen pins against each repository's
316
- * `refs/remotes/origin/main`. That is exactly right when the question is "what
317
- * does the fleet look like now", and exactly wrong when the question is "ship
318
- * the fix that is already built in ONE repository": every other pin moves to
319
- * whatever that repository has published since, and every subject whose
320
- * identity depends on a moved pin is recomputed. Measured 2026-09-18 on this
321
- * index, a full rebuild moves 5 of 13 pins and recomputes 54 of 62 subjects,
322
- * 53 of them collateral — so a one-line fix arrives as a fleet-wide re-pin
323
- * nobody asked for, and every one of those 53 subjects is a coordinate the
324
- * registry must already be serving or delivery fails.
325
- *
326
- * The scope is a CHOICE somebody states, and it narrows: `--repo <repository>`
327
- * says "this repository has moved; nothing else has". Every pin outside it is
328
- * taken verbatim from the committed index, so it cannot drift by accident, and
329
- * every subject derived from an unmoved pin is recomputed at the SAME commit
330
- * and therefore lands byte-identical. Only the subjects whose identity actually
331
- * depends on the named repository change.
332
- *
333
- * It is deliberately NOT a separate code path: the scope seeds the memo map
334
- * `getRepositoryIdentity` already uses, so the index is produced by the one
335
- * builder, passes the one validator, and is byte-comparable with a full
336
- * rebuild's output for the parts that did not move. A second writer for
337
- * "narrow" indexes would be a second answer to what an index IS.
338
- *
339
- * A repository this index does not source is a REFUSAL, never a silent no-op —
340
- * a typo that quietly rewrote nothing would read in review as "the refresh ran".
341
- *
342
- * A declared source repository with NO committed pin JOINS the index through the
343
- * same scope: every committed pin is preserved verbatim and only the named
344
- * repository is resolved (at `--at`, which must be published). It needs no
345
- * full `--trusted-write`, which would re-derive and drift every other pin.
346
- */
347
- export function preserveOtherRepositoryPins(
348
- repoScope,
349
- committedIndex,
350
- declaredRepositories,
351
- ) {
352
- const declared = new Set(declaredRepositories);
353
- if (!declared.has(repoScope)) {
354
- throw new Error(
355
- `--repo "${repoScope}" is not a source repository of this index. ` +
356
- `Known repositories: ${[...declared].sort(compareStrings).join(', ')}`,
357
- );
358
- }
359
- const pins = Array.isArray(committedIndex?.repositoryPins)
360
- ? committedIndex.repositoryPins
361
- : [];
362
- if (pins.length === 0) {
363
- throw new Error(
364
- 'the committed runtime image source index declares no repositoryPins to preserve',
365
- );
366
- }
367
- return pins
368
- .filter((pin) => pin.repo !== repoScope)
369
- .map((pin) => ({
370
- repo: pin.repo,
371
- repositoryUrl: pin.repositoryUrl,
372
- sourceCommit: pin.sourceCommit,
373
- vendoredSourceCommit: pin.vendoredSourceCommit,
374
- }));
375
- }
376
-
377
- function committedRepositoryPinsToPreserve(repoScope) {
378
- if (!existsSync(runtimeImageSourceIndexPath())) {
379
- throw new Error(
380
- `--repo requires ${runtimeImageSourceIndexPath()} to exist: there is no ` +
381
- `committed index whose other pins could be preserved. Bootstrap with ` +
382
- `--trusted-write and no --repo.`,
383
- );
384
- }
385
- return preserveOtherRepositoryPins(
386
- repoScope,
387
- readJson(runtimeImageSourceIndexPath()),
388
- declaredSourceRepositories(),
389
- );
390
- }
391
-
392
- /**
393
- * `producerWorkflowPins` are operator-stated TRUST DATA: which commit of a
394
- * producer repository's workflow the verifier believes. Nothing is derived (not
395
- * from `repositoryPins`, not from a policy row); the committed pins are kept
396
- * exactly, and `--producer-workflow-pin <owner/repo>=<40-hex>` sets or updates
397
- * one. A bootstrap index with none committed writes `[]`, which the kernel allows.
398
- */
399
- export function mergeProducerWorkflowPins(committedPins, statedPins) {
400
- const merged = new Map(
401
- (Array.isArray(committedPins) ? committedPins : []).map((pin) => [
402
- pin.repository,
403
- { repository: pin.repository, workflowCommit: pin.workflowCommit },
404
- ]),
405
- );
406
- for (const pin of statedPins) {
407
- merged.set(pin.repository, { repository: pin.repository, workflowCommit: pin.workflowCommit });
408
- }
409
- return [...merged.values()].sort((left, right) => compareStrings(left.repository, right.repository));
410
- }
411
-
412
- /**
413
- * The committed index with one producer workflow pin merged in by `mergeProducerWorkflowPins`: what the third-party
414
- * writer adds (`{repository, workflowCommit: sourceCommit}`). Every repository pin and subject is kept exactly: a
415
- * third-party repository is not an index repository, so nothing about it can be re-resolved.
416
- */
417
- export function indexWithProducerWorkflowPin({ committedIndex, pin }) {
418
- return {
419
- ...committedIndex,
420
- producerWorkflowPins: mergeProducerWorkflowPins(committedIndex.producerWorkflowPins, [pin]),
421
- };
422
- }
423
-
424
- const PRODUCER_WORKFLOW_PIN_FLAG = '--producer-workflow-pin';
425
-
426
- /**
427
- * Every `--producer-workflow-pin <owner/repo>=<40-hex>` of the argv. A malformed
428
- * value, or a repository stated twice, is refused here; the repository and
429
- * commit grammar is the kernel's, applied by the index parse.
430
- */
431
- export function parseProducerWorkflowPinFlags(argv) {
432
- const pins = [];
433
- const remaining = [];
434
- for (let index = 0; index < argv.length; index += 1) {
435
- if (argv[index] !== PRODUCER_WORKFLOW_PIN_FLAG) {
436
- remaining.push(argv[index]);
437
- continue;
438
- }
439
- const value = argv[index + 1];
440
- const separator = value?.indexOf('=') ?? -1;
441
- if (separator < 1 || value.startsWith('--')) {
442
- throw new Error(`${PRODUCER_WORKFLOW_PIN_FLAG} requires <owner/repo>=<40-hex-commit>`);
443
- }
444
- const repository = value.slice(0, separator);
445
- const workflowCommit = value.slice(separator + 1);
446
- if (pins.some((pin) => pin.repository === repository)) {
447
- throw new Error(`${PRODUCER_WORKFLOW_PIN_FLAG} names ${repository} more than once`);
448
- }
449
- if (!COMMIT_PATTERN.test(workflowCommit)) {
450
- throw new Error(`${PRODUCER_WORKFLOW_PIN_FLAG} ${repository}: the commit must be a full 40-hex sha`);
451
- }
452
- pins.push({ repository, workflowCommit });
453
- index += 1;
454
- }
455
- return { producerWorkflowPins: pins, remaining };
456
- }
457
-
458
- /**
459
- * A `--producer-workflow-pin` is trust data for the index `--trusted-write`
460
- * writes, and only there. Every other mode writes nothing, so a pin stated to
461
- * one would be silently ignored; `--check-sources` included: it grades the
462
- * committed index against the sources, and a pin is not a source.
463
- */
464
- export function assertProducerWorkflowPinsWritten(producerWorkflowPins, flag, usage) {
465
- if (producerWorkflowPins.length > 0 && flag !== '--trusted-write') {
466
- throw new Error(`${PRODUCER_WORKFLOW_PIN_FLAG} states trust data for a written index: ${flag} writes none\n${usage}`);
467
- }
468
- }
469
-
470
- /**
471
- * `biomeIndex` and `platformServiceIndex` are the indexes this one is built
472
- * over, INJECTED: the release CLI passes the committed ones read from disk
473
- * (byte-identical to reading them here), a develop snapshot passes the ones it
474
- * built at its own pins.
475
- */
476
- export async function buildTrustedIndex(
477
- schemas,
478
- sourceAuthority,
479
- kernelRoot,
480
- repoScope,
481
- { biomeIndex, platformServiceIndex, kernelCommit, producerWorkflowPins = [] },
482
- ) {
483
- const contractAuthority = await resolveContractAuthority(schemas, kernelRoot, kernelCommit);
484
- const repositoryIdentities = new Map();
485
- if (repoScope !== undefined) {
486
- for (const pin of committedRepositoryPinsToPreserve(repoScope)) {
487
- repositoryIdentities.set(pin.repo, pin);
488
- }
489
- }
490
- const getRepositoryIdentity = (repo) => {
491
- let identity = repositoryIdentities.get(repo);
492
- if (!identity) {
493
- if (repoScope !== undefined && repo !== repoScope) {
494
- throw new Error(
495
- `source repository "${repo}" has no committed pin and is not the --repo scope ` +
496
- `"${repoScope}". A scoped write adds one repository; resolving "${repo}" live ` +
497
- `would re-pin a repository nobody asked about. Add it with its own --repo ${repo} --at <sha>.`,
498
- );
499
- }
500
- identity = repositoryIdentity(repo, sourceAuthority);
501
- repositoryIdentities.set(repo, identity);
502
- }
503
- return identity;
504
- };
505
- const supplementalSubjects = sourceDeclarations().map((declaration) => {
506
- const repoDirectory = sourcePath(declaration.repo);
507
- const { sourceCommit, repositoryUrl } = getRepositoryIdentity(
508
- declaration.repo,
509
- );
510
- const sourceManifestJson = readGitJsonAtCommit(
511
- repoDirectory,
512
- declaration.sourceManifestPath,
513
- sourceCommit,
514
- );
515
- return {
516
- kind: declaration.kind,
517
- id: declaration.id,
518
- imageRef: `${editionWorkspaceConfig().imageRegistry}/${declaration.id}`,
519
- repositoryUrl,
520
- repo: declaration.repo,
521
- path:
522
- declaration.path === '.'
523
- ? declaration.repo
524
- : `${declaration.repo}/${declaration.path}`,
525
- sourceManifestPath: `${declaration.repo}/${declaration.sourceManifestPath}`,
526
- sourceCommit,
527
- sourceManifestHash: sha256Hex(serializeJson(sourceManifestJson)),
528
- };
529
- }).sort(compareSubject);
530
- const sourceRepos = new Set([
531
- ...biomeIndex.map((biome) => biome.repo),
532
- ...platformServiceIndex.services.map((service) => service.repo),
533
- ...supplementalSubjects.map((subject) => subject.repo),
534
- ]);
535
- const repositoryPins = [...sourceRepos]
536
- .sort(compareStrings)
537
- .map(getRepositoryIdentity);
538
- const sortedCrossRepoBuildInputs = [...crossRepoBuildInputs()].sort(
539
- (left, right) =>
540
- compareStrings(
541
- [left.consumerRepo, left.consumerService, left.destinationPath].join(
542
- '\u0000',
543
- ),
544
- [right.consumerRepo, right.consumerService, right.destinationPath].join(
545
- '\u0000',
546
- ),
547
- ),
548
- );
549
- assertVendoredSourcesResolve(sortedCrossRepoBuildInputs, getRepositoryIdentity);
550
- const buildStepContextDirectories = [...buildStepContextDirectoriesDeclared()].sort(
551
- (left, right) =>
552
- compareStrings(
553
- `${left.repo}\u0000${left.path}`,
554
- `${right.repo}\u0000${right.path}`,
555
- ),
556
- );
557
- for (const directory of buildStepContextDirectories) {
558
- if (!sourceRepos.has(directory.repo)) {
559
- throw new Error(
560
- `build-step context directory "${directory.path}" names repository ` +
561
- `"${directory.repo}", which is not an image source repository`,
562
- );
563
- }
564
- }
565
- for (const input of sortedCrossRepoBuildInputs) {
566
- for (const repo of [input.consumerRepo, input.sourceRepo]) {
567
- if (!sourceRepos.has(repo)) {
568
- throw new Error(
569
- `cross-repo build input for "${input.consumerService}" names repository ` +
570
- `"${repo}", which is not an image source repository`,
571
- );
572
- }
573
- }
574
- }
575
- return {
576
- schemaVersion: CURRENT_INDEX_SCHEMA_VERSION,
577
- contractAuthority,
578
- supplementalSubjects,
579
- crossRepoBuildInputs: sortedCrossRepoBuildInputs,
580
- buildStepContextDirectories,
581
- repositoryPins,
582
- producerWorkflowPins: mergeProducerWorkflowPins(
583
- existsSync(runtimeImageSourceIndexPath()) ? readJson(runtimeImageSourceIndexPath()).producerWorkflowPins : [],
584
- producerWorkflowPins,
585
- ),
586
- platformServiceBindings: [...platformServiceRuntimeBindings()].sort(
587
- (left, right) =>
588
- compareStrings(left.platformService, right.platformService),
589
- ),
590
- };
591
- }
592
-
593
- function compareSubject(left, right) {
594
- return (
595
- compareStrings(left.kind, right.kind) || compareStrings(left.id, right.id)
596
- );
597
- }
598
-
599
- /**
600
- * Every release pin names a first-party repository (`firstPartySources`) at
601
- * the URL declared there. The converse is not required: a first-party
602
- * repository is in the develop graph before any release pins it.
603
- */
604
- function assertPinsAreFirstParty(repositoryPins) {
605
- const declared = firstPartySources('checking that every release pin is a first-party repository');
606
- for (const pin of repositoryPins) {
607
- const source = declared[pin.repo];
608
- if (source === undefined) {
609
- throw new Error(
610
- `runtime-image-source-index pins ${JSON.stringify(pin.repo)}, which edition-workspace.json does not declare under "firstPartySources"`,
611
- );
612
- }
613
- if (source.repositoryUrl !== pin.repositoryUrl) {
614
- throw new Error(
615
- `runtime-image-source-index pins ${pin.repo} at ${pin.repositoryUrl}, but "firstPartySources" declares it at ${source.repositoryUrl}`,
616
- );
617
- }
618
- }
619
- }
620
-
621
- export async function validateRuntimeImageSourceIndex(
622
- index,
623
- schemas,
624
- {
625
- // Whether `repositoryPins` must already cover every image source repository.
626
- // TRUE by default, and true for everyone who PRODUCES this index — that is
627
- // this module's own contract and the assertion below is where it lives.
628
- //
629
- // The kernel-authority repin passes false, because it produces nothing here:
630
- // it rewrites ONE field, `contractAuthority`, on an index somebody else
631
- // built. Requiring coverage of it makes onboarding a new source repository
632
- // impossible by construction — the repin refuses the stale index, and the
633
- // rebuild that would add the missing pin refuses the un-repinned authority.
634
- // Measured 2026-08-26 when `repos/xema-connectors` was carved out: the
635
- // documented six-step chain deadlocked at its own first step.
636
- assertRepositoryCoverage = true,
637
- // WHICH kernel checkout the committed authority is re-verified against.
638
- // Undefined keeps the default in-aggregator checkout; see `parseKernelRoot`
639
- // for why a shared working tree must not decide this.
640
- kernelRoot = undefined,
641
- // The indexes this one is validated against: the committed ones by default,
642
- // a develop snapshot's own when it injects them.
643
- biomeIndex = readJson(biomeIndexPath()),
644
- platformServiceIndex = readJson(
645
- join(dataRoot(), 'platform-service-index.json'),
646
- ),
647
- } = {},
648
- ) {
649
- await validateKernelContractAuthorityFromGit({
650
- authority: index.contractAuthority,
651
- ...(kernelRoot === undefined ? {} : { repositoryDirectory: kernelRoot }),
652
- schemas,
653
- onDrift: (drift) =>
654
- console.log(`[runtime-image-source-index] ${describeKernelContractAuthorityDrift(drift)}`),
655
- });
656
- // Every platform service carries an exact source identity (the kernel lock
657
- // schema requires it), so "is it in platform-service-index.json" no longer
658
- // separates the two kinds — it is now true of all of them. The partition is
659
- // the declared runtime binding, read from the one authority that owns it.
660
- const expectedBindings = platformServiceRuntimeBindings()
661
- .map((binding) => binding.platformService)
662
- .sort(compareStrings);
663
- const actualBindings = index.platformServiceBindings.map(
664
- (binding) => binding.platformService,
665
- );
666
- if (serializeJson(actualBindings) !== serializeJson(expectedBindings)) {
667
- throw new Error(
668
- 'runtime-image-source-index platform bindings do not exactly cover every declared platform service that another subject carries',
669
- );
670
- }
671
- const supplemental = new Set(
672
- index.supplementalSubjects.map(
673
- (subject) => `${subject.kind}\0${subject.id}`,
674
- ),
675
- );
676
- const expectedRepositories = [
677
- ...new Set([
678
- ...biomeIndex.map((biome) => biome.repo),
679
- ...platformServiceIndex.services.map((service) => service.repo),
680
- ...index.supplementalSubjects.map((subject) => subject.repo),
681
- ]),
682
- ].sort(compareStrings);
683
- const actualRepositories = index.repositoryPins.map(
684
- (repository) => repository.repo,
685
- );
686
- if (
687
- assertRepositoryCoverage &&
688
- serializeJson(actualRepositories) !== serializeJson(expectedRepositories)
689
- ) {
690
- throw new Error(
691
- 'runtime-image-source-index repository pins do not exactly cover every image source repository',
692
- );
693
- }
694
- const repositoryPins = new Map(
695
- index.repositoryPins.map((repository) => [repository.repo, repository]),
696
- );
697
- for (const repository of index.repositoryPins) {
698
- if (
699
- canonicalPublicHttpsRepositoryUrl(
700
- repository.repositoryUrl,
701
- `${repository.repo} repositoryUrl`,
702
- ) !== repository.repositoryUrl
703
- ) {
704
- throw new Error(`${repository.repo} repositoryUrl is not canonical`);
705
- }
706
- }
707
- assertPinsAreFirstParty(index.repositoryPins);
708
- // Every subject a biome contributes to the image plane — BOTH the standing
709
- // services and the runtime components. A runtime component is a full image
710
- // subject (built, signed, mirrored) that simply is never scheduled, so a
711
- // platform service may legitimately bind to one: `opencode-image-prepuller`
712
- // is a standing service whose whole job is to keep the `opencode-worker`
713
- // runtime-component image warm on every node.
714
- const biomeImageSubjects = new Set(
715
- biomeIndex.flatMap((biome) => [
716
- // A worker running a sibling service's image is not a subject of its own.
717
- ...(biome.services ?? [])
718
- .filter((service) => !Object.hasOwn(biome.workerImages ?? {}, service))
719
- .map((service) => `service\0${service}`),
720
- ...(biome.runtimeComponents ?? []).map(
721
- (component) => `runtime-component\0${component}`,
722
- ),
723
- ]),
724
- );
725
- for (const binding of index.platformServiceBindings) {
726
- const key = `${binding.subjectKind}\0${binding.subjectId}`;
727
- if (!supplemental.has(key) && !biomeImageSubjects.has(key)) {
728
- throw new Error(
729
- `platform service "${binding.platformService}" binds unknown runtime subject "${binding.subjectKind}:${binding.subjectId}"`,
730
- );
731
- }
732
- }
733
- for (const subject of index.supplementalSubjects) {
734
- if (
735
- canonicalPublicHttpsRepositoryUrl(
736
- subject.repositoryUrl,
737
- `${subject.kind}:${subject.id} repositoryUrl`,
738
- ) !== subject.repositoryUrl
739
- ) {
740
- throw new Error(
741
- `${subject.kind}:${subject.id} repositoryUrl is not canonical`,
742
- );
743
- }
744
- if (
745
- !subject.path.startsWith(`${subject.repo}/`) &&
746
- subject.path !== subject.repo
747
- ) {
748
- throw new Error(
749
- `${subject.kind}:${subject.id} source path escapes ${subject.repo}`,
750
- );
751
- }
752
- if (!subject.sourceManifestPath.startsWith(`${subject.repo}/`)) {
753
- throw new Error(
754
- `${subject.kind}:${subject.id} source manifest escapes ${subject.repo}`,
755
- );
756
- }
757
- const repository = repositoryPins.get(subject.repo);
758
- if (
759
- !repository ||
760
- repository.repositoryUrl !== subject.repositoryUrl ||
761
- repository.sourceCommit !== subject.sourceCommit
762
- ) {
763
- throw new Error(
764
- `${subject.kind}:${subject.id} does not match its repository pin`,
765
- );
766
- }
767
- }
768
- return index;
769
- }
770
-
771
- /** The follow-ups a re-pin owes; printed on stderr, because the repin itself changes only one field. */
772
- export const REPIN_CONTRACT_AUTHORITY_FOLLOW_UPS = Object.freeze([
773
- 'xema edition repin-evidence-trust (with the data-root and kernel flags): the evidence trust pin binds the authority; re-pin it.',
774
- 'Re-resolve every edition (xema edition resolve): each images.lock.json carries the contract authority, so its normalizedImageLockDigest changes.',
775
- 'Signed producer statements made under the old authority no longer verify: a statement binds the authority it was signed under, so they must be re-signed.',
776
- ]);
777
-
778
- /**
779
- * Replace ONLY `contractAuthority` of the committed runtime image source index
780
- * with the one trusted from the kernel checkout at the commit the caller
781
- * states (`kernelCommit`, required; HEAD must equal it), and write it back.
782
- *
783
- * The document is read as raw strict JSON and the field replaced BEFORE it is
784
- * parsed, so a stale index cannot block its own repair (the wire schema
785
- * checks the shape of `sourcePaths` only, from contracts 0.110.3).
786
- * The new authority's `sourcePaths` are the set the stated commit declares,
787
- * and `buildTrustedKernelContractAuthority` requires this CLI's bundled set to
788
- * equal it: a repin is trusted generation at HEAD.
789
- * Every repository pin and subject is kept byte for byte. Repository coverage
790
- * is not asserted: this repin produces no pin, and requiring coverage would
791
- * make a stale index unrepairable.
792
- */
793
- export async function repinContractAuthority(schemas, kernelRoot, kernelCommit) {
794
- const path = runtimeImageSourceIndexPath();
795
- if (!existsSync(path)) {
796
- throw new Error(`${path} does not exist: there is no index whose contract authority could be re-pinned`);
797
- }
798
- const raw = readJson(path);
799
- const contractAuthority = await buildTrustedKernelContractAuthority({
800
- ...(kernelRoot === undefined ? {} : { repositoryDirectory: kernelRoot }),
801
- schemas,
802
- kernelCommit,
803
- });
804
- const candidate = schemas.parseRuntimeImageSourceIndex({ ...raw, contractAuthority });
805
- await validateRuntimeImageSourceIndex(candidate, schemas, {
806
- assertRepositoryCoverage: false,
807
- kernelRoot,
808
- });
809
- writeFileSync(path, serializeJson(candidate));
810
- return { path, previous: raw.contractAuthority, current: contractAuthority };
811
- }
812
-
813
- /**
814
- * `--kernel-root` names WHICH checkout of the kernel repository the committed
815
- * contract authority is re-verified against. It relaxes NOTHING: the digest is
816
- * still recomputed from `ls-tree` + `cat-file` blobs at the authority's own
817
- * pinned commit and must match byte for byte.
818
- *
819
- * It exists for the reason this file already argues one function down — a
820
- * development-state fact must not decide a release-composition question. The
821
- * default checkout is SHARED, so it routinely sits on a stale or unrelated
822
- * history, and the authority pin then fails an ancestry test that says nothing
823
- * about the pin and everything about whose branch that directory is on.
824
- * Measured 2026-09-14: the pin was refused as "not an ancestor of kernel HEAD"
825
- * by a checkout 39 commits behind, while being a perfectly ordinary ancestor of
826
- * the published history.
827
- */
828
- function parseRepoScope(argv) {
829
- const index = argv.indexOf('--repo');
830
- if (index === -1) {return { repoScope: undefined, remaining: argv };}
831
- const value = argv[index + 1];
832
- if (!value || value.startsWith('--')) {
833
- throw new Error('--repo requires a repository path, e.g. repos/<name>');
834
- }
835
- return {
836
- repoScope: value,
837
- remaining: [...argv.slice(0, index), ...argv.slice(index + 2)],
838
- };
839
- }
840
-
841
- /**
842
- * `--at <sha>` — pin the `--repo` repository at an EXACT commit instead of at
843
- * whatever the live resolver judges newest-built. Only meaningful with `--repo`,
844
- * and refused without it: "pin everything at this one commit" is not a thing.
845
- */
846
- function parseExactCommit(argv) {
847
- const index = argv.indexOf('--at');
848
- if (index === -1) {return { exactCommit: undefined, remaining: argv };}
849
- const value = argv[index + 1];
850
- if (!value || value.startsWith('--')) {
851
- throw new Error('--at requires a full 40-character commit sha');
852
- }
853
- return {
854
- exactCommit: value,
855
- remaining: [...argv.slice(0, index), ...argv.slice(index + 2)],
856
- };
857
- }
858
-
859
- function parseKernelRoot(argv) {
860
- const index = argv.indexOf('--kernel-root');
861
- if (index === -1) {return { kernelRoot: undefined, remaining: argv };}
862
- const value = argv[index + 1];
863
- if (!value) {throw new Error('--kernel-root requires a directory');}
864
- if (!isAbsolute(value)) {
865
- throw new Error('--kernel-root requires an ABSOLUTE directory');
866
- }
867
- return {
868
- kernelRoot: realpathSync(value),
869
- remaining: [...argv.slice(0, index), ...argv.slice(index + 2)],
870
- };
871
- }
872
-
873
- /**
874
- * `--kernel-commit <40-hex>`: the kernel commit a NEW contract authority is
875
- * taken from. Required wherever one is chosen (the re-pin, and a bootstrap
876
- * `--trusted-write`), refused everywhere else.
877
- */
878
- function parseKernelCommit(argv) {
879
- const index = argv.indexOf(KERNEL_COMMIT_FLAG);
880
- if (index === -1) {return { kernelCommit: undefined, remaining: argv };}
881
- const value = argv[index + 1];
882
- if (!value || !COMMIT_PATTERN.test(value)) {
883
- throw new Error(`${KERNEL_COMMIT_FLAG} requires a full 40-character commit sha`);
884
- }
885
- return {
886
- kernelCommit: value,
887
- remaining: [...argv.slice(0, index), ...argv.slice(index + 2)],
888
- };
889
- }
890
-
891
- /**
892
- * @param {{ schemas: object, repositoryPins: object[], kernelRoot?: string, producerWorkflowPins?: object[] }} request
893
- * `kernelRoot` is the kernel checkout the committed contract authority is re-verified against
894
- * (the default checkout when omitted); `producerWorkflowPins` are the operator-stated ones a
895
- * trusted write merges over the committed ones.
896
- * @returns {{ platformServiceIndex, biomeIndex, runtimeImageSourceIndex }}
897
- */
898
- export async function buildIndexesAtPins({ schemas, repositoryPins, kernelRoot, producerWorkflowPins = [] }) {
899
- const sourceAuthority = createPinnedSourceAuthority({ pins: repositoryPins });
900
- const platformServiceIndex = buildValidatedPlatformServiceIndex(schemas, sourceAuthority);
901
- const biomeIndex = await buildBiomeIndex(platformServiceIndex, distributionBiomeSourceRepositories(), sourceAuthority);
902
- const runtimeImageSourceIndex = schemas.parseRuntimeImageSourceIndex(
903
- await buildTrustedIndex(schemas, sourceAuthority, kernelRoot, undefined, {
904
- biomeIndex,
905
- platformServiceIndex,
906
- producerWorkflowPins,
907
- }),
908
- );
909
- await validateRuntimeImageSourceIndex(runtimeImageSourceIndex, schemas, { biomeIndex, platformServiceIndex, kernelRoot });
910
- return { platformServiceIndex, biomeIndex, runtimeImageSourceIndex };
911
- }
912
-
913
- /**
914
- * A repository JOINING the index (`--repo <repository>` with no committed pin): all three indexes,
915
- * from ONE resolution of the joining repository, with every committed pin kept.
916
- *
917
- * WHY HERE AND NOT A `--repo` ON THE BIOME BUILDER. The biome builder's `--repo` was removed
918
- * because it resolved the scoped repository LIVE a second time, so a build landing between the two
919
- * commands split the two artifacts on exactly that repository (see `build-biome-index.mjs`). A
920
- * joining repository has the same shape: the runtime index cannot take it until the biome index
921
- * names its biomes, and the biome index cannot take it until a pin exists. So the joining
922
- * repository is resolved ONCE here (`sourceAuthority`, live or `--at`), appended to the committed
923
- * pins, and every index is derived from that one pin set by the same builders a develop snapshot
924
- * uses; nothing else is resolved live.
925
- *
926
- * Every committed pin that survives must come back field for field; one that differs is refused by
927
- * name. A committed pin whose repository is no longer a source repository is DROPPED, and the caller
928
- * names it (`describeRepositoryPinChanges`). A second declared repository with no pin is refused by
929
- * the pinned authority: one joining repository per write.
930
- */
931
- export async function buildIndexesWithJoiningRepository({
932
- schemas,
933
- sourceAuthority,
934
- repoScope,
935
- committedPins,
936
- kernelRoot,
937
- producerWorkflowPins = [],
938
- }) {
939
- if (committedPins.some((pin) => pin.repo === repoScope)) {
940
- throw new Error(`--repo "${repoScope}" already has a committed pin: it is a refresh, not a join`);
941
- }
942
- const kept = committedPins.map(({ repo, repositoryUrl, sourceCommit, vendoredSourceCommit }) => ({
943
- repo,
944
- repositoryUrl,
945
- sourceCommit,
946
- vendoredSourceCommit,
947
- }));
948
- const repositoryPins = [...kept, repositoryIdentity(repoScope, sourceAuthority)];
949
- const built = await buildIndexesAtPins({ schemas, repositoryPins, kernelRoot, producerWorkflowPins });
950
- const written = new Map(built.runtimeImageSourceIndex.repositoryPins.map((pin) => [pin.repo, pin]));
951
- const moved = kept.filter((pin) => written.has(pin.repo) && serializeJson(written.get(pin.repo)) !== serializeJson(pin));
952
- if (moved.length > 0) {
953
- throw new Error(
954
- `a join must keep every committed pin, and ${moved.map((pin) => pin.repo).join(', ')} came back different ` +
955
- '(its repositoryUrl no longer matches its origin remote?)',
956
- );
957
- }
958
- if (!written.has(repoScope)) {
959
- throw new Error(
960
- `--repo "${repoScope}" contributes no biome, platform service or supplemental subject at ` +
961
- `${repositoryPins.at(-1).sourceCommit}: there is nothing for it to join`,
962
- );
963
- }
964
- return built;
965
- }
966
-
967
- /**
968
- * What a write did to the committed `repositoryPins`, by NAME: the repositories added, the ones
969
- * dropped (a committed pin whose repository no longer sources any subject), the ones moved, and
970
- * how many were kept unchanged. A count alone hid a dropped pin inside "N other pin(s)
971
- * preserved", which is the one change a reviewer must see.
972
- */
973
- export function describeRepositoryPinChanges(committedPins, writtenPins) {
974
- const committed = new Map((committedPins ?? []).map((pin) => [pin.repo, pin]));
975
- const written = new Map(writtenPins.map((pin) => [pin.repo, pin]));
976
- const added = [...written.keys()].filter((repo) => !committed.has(repo)).sort(compareStrings);
977
- const dropped = [...committed.keys()].filter((repo) => !written.has(repo)).sort(compareStrings);
978
- const moved = [...written.keys()]
979
- .filter((repo) => committed.has(repo) && serializeJson(committed.get(repo)) !== serializeJson(written.get(repo)))
980
- .sort(compareStrings);
981
- const kept = written.size - added.length - moved.length;
982
- const named = (label, repos) => `${label} ${repos.length}${repos.length > 0 ? ` (${repos.join(', ')})` : ''}`;
983
- return {
984
- added,
985
- dropped,
986
- moved,
987
- kept,
988
- summary: `${named('added', added)}; ${named('moved', moved)}; ${named('dropped', dropped)}; kept ${kept} unchanged`,
989
- };
990
- }
991
-
992
- const REPIN_FLAG = '--repin-contract-authority';
993
- const USAGE =
994
- 'usage: build-runtime-image-source-index.mjs (--check | --check-sources | --trusted-write | ' +
995
- '--repin-contract-authority --kernel-commit <40-hex-commit>) ' +
996
- '[--source published|workspace] [--kernel-root <absolute-checkout>] ' +
997
- '[--repo <repository> [--at <40-hex-commit>]] [--producer-workflow-pin <owner/repo>=<40-hex-commit> ...] ' +
998
- '(--trusted-write on a data root with no committed contract authority also requires --kernel-commit)\n' +
999
- ` build-runtime-image-source-index.mjs --trusted-write ${THIRD_PARTY_WRITER_USAGE}\n` +
1000
- ` build-runtime-image-source-index.mjs ${CHECK_THIRD_PARTY_FLAG} [--cosign <absolute cosign path>]`;
1001
-
1002
- /** `--trusted-write --third-party <name>`: verify one third-party source and commit its pin, evidence and producer workflow pin. */
1003
- async function writeThirdPartySource({ schemas, writer, cosignBinary, kernelRoot }) {
1004
- const context = loadThirdPartySourceContext({ dataRoot: dataRoot(), schemas, cosignBinary });
1005
- try {
1006
- const plan = await planThirdPartySourceWrite({
1007
- request: writer,
1008
- context,
1009
- clientFor: createRegistryClientResolver({ dataRoot: dataRoot() }),
1010
- dataRoot: dataRoot(),
1011
- withProducerWorkflowPin: indexWithProducerWorkflowPin,
1012
- });
1013
- await validateRuntimeImageSourceIndex(plan.candidateIndex, schemas, { kernelRoot });
1014
- const next = commitThirdPartySourceWrite({
1015
- dataRoot: dataRoot(),
1016
- plan,
1017
- indexPath: runtimeImageSourceIndexPath(),
1018
- indexText: serializeJson(plan.candidateIndex),
1019
- });
1020
- console.log(`[runtime-image-source-index] ${next}`);
1021
- } finally {
1022
- context.dispose();
1023
- disposeRegistrySessions();
1024
- }
1025
- }
1026
-
1027
- async function main() {
1028
- const { writer, cosignBinary, remaining: afterThirdPartyFlags } = takeThirdPartyFlags(process.argv.slice(2));
1029
- const { kernelRoot, remaining: afterKernelRootFlag } = parseKernelRoot(afterThirdPartyFlags);
1030
- const { kernelCommit, remaining: afterKernelRoot } = parseKernelCommit(afterKernelRootFlag);
1031
- const { producerWorkflowPins, remaining: afterWorkflowPins } = parseProducerWorkflowPinFlags(afterKernelRoot);
1032
- const { repoScope, remaining: afterRepoScope } = parseRepoScope(afterWorkflowPins);
1033
- const { exactCommit, remaining: argv } = parseExactCommit(afterRepoScope);
1034
- const { mode, remaining } = parseSourceModeArgs(argv);
1035
- if (exactCommit !== undefined && repoScope === undefined) {
1036
- throw new Error('--at requires --repo: it pins ONE repository at an exact commit');
1037
- }
1038
- const [flag] = remaining;
1039
- if (
1040
- remaining.length !== 1 ||
1041
- ![CHECK_THIRD_PARTY_FLAG, '--check', '--check-sources', '--trusted-write', REPIN_FLAG].includes(flag)
1042
- ) {
1043
- throw new Error(USAGE);
1044
- }
1045
- if (cosignBinary !== undefined && writer === undefined && flag !== CHECK_THIRD_PARTY_FLAG) {
1046
- throw new Error(`--cosign belongs to ${THIRD_PARTY_FLAG} or ${CHECK_THIRD_PARTY_FLAG}: ${flag} runs no cosign\n${USAGE}`);
1047
- }
1048
- if (kernelCommit !== undefined && ![REPIN_FLAG, '--trusted-write'].includes(flag)) {
1049
- throw new Error(`${KERNEL_COMMIT_FLAG} states the commit of a new contract authority: ${flag} chooses none\n${USAGE}`);
1050
- }
1051
- assertProducerWorkflowPinsWritten(producerWorkflowPins, flag, USAGE);
1052
- const schemas = await loadKernelDistributionSchemas();
1053
- if (flag === CHECK_THIRD_PARTY_FLAG) {
1054
- if (repoScope !== undefined || exactCommit !== undefined || kernelCommit !== undefined) {
1055
- throw new Error(`${CHECK_THIRD_PARTY_FLAG} re-verifies the committed third-party pins only: it takes no --repo, --at or ${KERNEL_COMMIT_FLAG}`);
1056
- }
1057
- const { checked } = await checkThirdPartySourcePins({ dataRoot: dataRoot(), schemas, cosignBinary });
1058
- console.log(
1059
- checked === 0
1060
- ? '[runtime-image-source-index] no third-party source is pinned in this data root'
1061
- : `[runtime-image-source-index] third-party source check passed for ${checked} pinned source(s)`,
1062
- );
1063
- return;
1064
- }
1065
- if (writer !== undefined) {
1066
- if (flag !== '--trusted-write') {
1067
- throw new Error(`${THIRD_PARTY_FLAG} writes a pin: it takes --trusted-write\n${USAGE}`);
1068
- }
1069
- if (repoScope !== undefined || exactCommit !== undefined || kernelCommit !== undefined || producerWorkflowPins.length > 0) {
1070
- throw new Error(`${THIRD_PARTY_FLAG} writes one third-party pin: it takes no --repo, --at, ${KERNEL_COMMIT_FLAG} or ${PRODUCER_WORKFLOW_PIN_FLAG}`);
1071
- }
1072
- await writeThirdPartySource({ schemas, writer, cosignBinary, kernelRoot });
1073
- return;
1074
- }
1075
- if (flag === REPIN_FLAG) {
1076
- if (repoScope !== undefined || exactCommit !== undefined) {
1077
- throw new Error(`${REPIN_FLAG} replaces the contract authority only: it takes no --repo or --at`);
1078
- }
1079
- if (kernelCommit === undefined) {
1080
- throw new Error(`${REPIN_FLAG} requires ${KERNEL_COMMIT_FLAG} <40-hex-commit>: the commit the authority moves to is stated, never read from the checkout\n${USAGE}`);
1081
- }
1082
- const { path, previous, current } = await repinContractAuthority(schemas, kernelRoot, kernelCommit);
1083
- console.log(
1084
- `[runtime-image-source-index] wrote ${path} (contract authority ${previous?.sourceCommit ?? 'absent'} -> ${current.sourceCommit}; every repository pin and subject preserved)`,
1085
- );
1086
- for (const followUp of REPIN_CONTRACT_AUTHORITY_FOLLOW_UPS) {
1087
- console.error(`[runtime-image-source-index] owed after the re-pin: ${followUp}`);
1088
- }
1089
- return;
1090
- }
1091
- if (
1092
- !existsSync(runtimeImageSourceIndexPath()) &&
1093
- flag !== '--trusted-write'
1094
- ) {
1095
- throw new Error(`${runtimeImageSourceIndexPath()} does not exist`);
1096
- }
1097
- if (flag === '--check') {
1098
- const parsed = schemas.parseRuntimeImageSourceIndex(
1099
- readJson(runtimeImageSourceIndexPath()),
1100
- );
1101
- await validateRuntimeImageSourceIndex(parsed, schemas, { kernelRoot });
1102
- console.log(
1103
- `[runtime-image-source-index] offline check passed for ${parsed.supplementalSubjects.length} supplemental subjects and ${parsed.platformServiceBindings.length} bindings`,
1104
- );
1105
- return;
1106
- }
1107
- const committedPins = existsSync(runtimeImageSourceIndexPath())
1108
- ? readJson(runtimeImageSourceIndexPath()).repositoryPins ?? []
1109
- : [];
1110
- const liveAuthority = () => createSourceAuthority({ mode, knownRepositories: declaredSourceRepositories() });
1111
- const sourceAuthority =
1112
- exactCommit === undefined
1113
- ? liveAuthority()
1114
- : createExactCommitSourceAuthority({ delegate: liveAuthority(), repo: repoScope, commit: exactCommit });
1115
- // A `--repo` with no committed pin JOINS the index, and the biome and platform-service indexes
1116
- // must take it in the same write: see `buildIndexesWithJoiningRepository`.
1117
- const joining = repoScope !== undefined && !committedPins.some((pin) => pin.repo === repoScope);
1118
- let candidate;
1119
- let joined;
1120
- if (joining) {
1121
- if (committedPins.length === 0) {
1122
- throw new Error(
1123
- `--repo requires ${runtimeImageSourceIndexPath()} with committed repositoryPins: there are none to keep. ` +
1124
- 'Bootstrap with --trusted-write and no --repo.',
1125
- );
1126
- }
1127
- if (kernelCommit !== undefined) {
1128
- throw new Error(`${KERNEL_COMMIT_FLAG} chooses a new contract authority; a join keeps the committed one`);
1129
- }
1130
- joined = await buildIndexesWithJoiningRepository({
1131
- schemas,
1132
- sourceAuthority,
1133
- repoScope,
1134
- committedPins,
1135
- kernelRoot,
1136
- producerWorkflowPins,
1137
- });
1138
- candidate = joined.runtimeImageSourceIndex;
1139
- } else {
1140
- candidate = schemas.parseRuntimeImageSourceIndex(
1141
- await buildTrustedIndex(schemas, sourceAuthority, kernelRoot, repoScope, {
1142
- biomeIndex: readJson(biomeIndexPath()),
1143
- platformServiceIndex: readJson(join(dataRoot(), 'platform-service-index.json')),
1144
- kernelCommit,
1145
- producerWorkflowPins,
1146
- }),
1147
- );
1148
- await validateRuntimeImageSourceIndex(candidate, schemas, { kernelRoot });
1149
- }
1150
- const outputs = [
1151
- [runtimeImageSourceIndexPath(), serializeJson(candidate)],
1152
- ...(joined === undefined
1153
- ? []
1154
- : [
1155
- [biomeIndexPath(), serializeJson(joined.biomeIndex)],
1156
- [platformServiceIndexPath(), serializeJson(joined.platformServiceIndex)],
1157
- ]),
1158
- ];
1159
- if (flag === '--check-sources') {
1160
- const stale = outputs.filter(([path, text]) => !existsSync(path) || readFileSync(path, 'utf8') !== text);
1161
- if (stale.length > 0) {
1162
- throw new Error(
1163
- `${stale.map(([path]) => path).join(', ')} does not match exact trusted sources`,
1164
- );
1165
- }
1166
- console.log('[runtime-image-source-index] trusted source check passed');
1167
- return;
1168
- }
1169
- for (const [path, text] of outputs) {writeFileSync(path, text);}
1170
- const changes = describeRepositoryPinChanges(committedPins, candidate.repositoryPins);
1171
- console.log(
1172
- `[runtime-image-source-index] wrote ${outputs.map(([path]) => path).join(', ')} (${
1173
- repoScope === undefined
1174
- ? 'all repository pins re-resolved'
1175
- : `${joining ? 'joined' : 're-resolved'} ${repoScope}${
1176
- exactCommit === undefined ? '' : ` at the exact commit ${exactCommit}`
1177
- }`
1178
- }; ${changes.summary})`,
1179
- );
1180
- }
1181
-
1182
- if (isEntryModule(import.meta.url)) {
1183
- main().catch((error) => {
1184
- console.error(`[runtime-image-source-index] ${error.message}`);
1185
- process.exitCode = 1;
1186
- });
1187
- }