@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,1414 +0,0 @@
1
- #!/usr/bin/env node
2
- // assemble-producer-input — producer-input assembly for detached image-source
3
- // evidence.
4
- //
5
- // xema edition evidence assemble-input \
6
- // --output <absolute-path> \
7
- // --image-repository <registry>/<namespace>/<service> \
8
- // --manifest-digest sha256:<64-hex> \
9
- // --subject-kind service --subject-id <service> \
10
- // --source-repo repos/<repo> \
11
- // --source-path repos/<repo>/<biome-or-package-path> \
12
- // --source-commit <40-hex> \
13
- // --provenance <absolute-predicate-json> \
14
- // [--ttl-seconds <1..policy-max>] \
15
- // [--source-manifest-hash <64-hex>] [--source-tree-hash <64-hex>]
16
- //
17
- // Emits the EXACT producer input manifest `produce-image-source-evidence.mjs`
18
- // accepts. The assembled manifest is validated with the producer's own gates —
19
- // `assertProducerInput`, the full kernel statement schema, and (from the
20
- // GITHUB_* environment) `assertGitHubProducerContext` — BEFORE it is written:
21
- // the assembler never emits a manifest the producer would reject.
22
- //
23
- // Field derivation:
24
- // * contractAuthority — the verifier-embedded kernel contract authority
25
- // (single source of truth; the offline verifier only
26
- // ever accepts that exact object).
27
- // * sourceHashAlgorithm — read from `@xemahq/distribution-source-hash` via
28
- // lib.mjs `imageInputSourceHashAlgorithm()` — the one
29
- // algorithm an image lock may name.
30
- // * producerWorkflowSha — GITHUB_SHA of the running producer workflow.
31
- // * signer — derived from the running workflow's context:
32
- // certificateIdentity is exactly
33
- // https://github.com/<repo>/<workflow-path>@<ref>.
34
- // * builder — builderId is the building workflow; buildType and
35
- // the definition/parameters digests are read off the
36
- // BuildKit SLSA v1 predicate the build exported
37
- // (`--provenance`) — the same bytes the workflow
38
- // cosign-attests, so the evidence cannot describe a
39
- // different build than the one that ran.
40
- // * sourceManifestHash — the kernel computeBiomeSourceManifestHash of the git-blob-at-commit,
41
- // the exact runtime-image-source-index algorithm
42
- // (lib.mjs `readGitJsonAtCommit` + `serializeJson`).
43
- // * sourceTreeHash — computed here with lib.mjs `hashImageBuildInputs`
44
- // under `imageInputSourceHashAlgorithm()` — the SAME
45
- // functions and package the lock resolver and every
46
- // producer's `compute-image-tag.mjs` use. The request
47
- // is reconstructed exactly as the producing build saw
48
- // it: the service directory comes from the subject's
49
- // own manifest at the build commit
50
- // (resolve-images `subjectServicePath`), and the
51
- // vendored cross-repo inputs + build-step directories
52
- // come from the producing checkout's committed
53
- // `tooling/release/cross-repo-build-inputs.json` AT
54
- // THAT COMMIT — never the live distribution index,
55
- // which may already pin newer source revisions.
56
- // * manifestDigest cross-check, manifestMediaType, platforms — read from the
57
- // registry with the fail-closed OCI client at the canonical
58
- // `<imageRepository>:<sourceTreeHash>` coordinate: the digest served there
59
- // must be exactly the caller's `--manifest-digest`, and platforms are
60
- // proven by their hash-verified image configs (verify-image-platforms
61
- // `resolvePublishedPlatforms`).
62
- // * sbomDigest, provenanceDigest — the cosign attestation artifacts the
63
- // producing workflow attached to the delivered manifest digest: the
64
- // `sha256-<digest>.att` manifest's DSSE envelope layers, classified by
65
- // their `predicateType` annotation and bound to the delivered digest
66
- // through their decoded in-toto statement subject. A missing attestation
67
- // fails fast naming the cosign `--type` flag that emits it.
68
- // MULTIPLICITY IS EXPECTED: a multi-arch index is the product of one
69
- // build per platform, and lanes attest accordingly — one SLSA + one SBOM
70
- // attestation per architecture, all bound to the index digest (plus
71
- // further copies whenever a lane re-runs, because cosign attest APPENDS).
72
- // The assembler therefore selects ONE deterministic witness per type:
73
- // the provenance layer whose statement names the PRIMARY build's own
74
- // builder id + invocation id (the identity of the caller's `--provenance`
75
- // predicate, so the statement's artifact section and build section
76
- // describe the SAME build), and — no caller-side SBOM reference exists —
77
- // the smallest SBOM layer digest. A subject with no layer describing the
78
- // primary build fails fast.
79
- //
80
- // The runtime image source index, the registry credential declaration and the
81
- // declared trust policy are read from the data root (`--data-root`), and the
82
- // subject's source objects from the source checkouts under `--sources-root`
83
- // at their aggregator-relative paths.
84
- //
85
- // Registry credentials come from image-registry-credentials.json (the file
86
- // names environment variables, never secrets).
87
-
88
- import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
89
- import { dirname, isAbsolute, join, resolve } from 'node:path';
90
-
91
- import { editionWorkspaceConfig } from './edition-config.mjs';
92
- import {
93
- WorkspaceRoot,
94
- configureEditionWorkspaceFromArgv,
95
- dataRoot,
96
- isEntryModule,
97
- sourcePath as sourceCheckoutPath,
98
- } from './edition-workspace.mjs';
99
- import { COMMIT_PATTERN, GITHUB_REF_PATTERN, GITHUB_REPOSITORY_PATTERN, SHA256_DIGEST_PATTERN, SHA256_HEX_PATTERN } from './evidence-grammars.mjs';
100
- import { firstPartySourceId } from './first-party-source-ids.mjs';
101
- import { canonicalJson } from './image-evidence.mjs';
102
- import { oidcCertificateSignerKind } from './kernel-signer-kind.mjs';
103
- import {
104
- assertGitCommitExists,
105
- compareStrings,
106
- hashImageBuildInputs,
107
- imageInputSourceHashAlgorithm,
108
- loadKernelDistributionSchemas,
109
- readGitJsonAtCommit,
110
- serializeJson,
111
- sha256Hex,
112
- } from './lib.mjs';
113
- import { OrasRegistry } from './oras.mjs';
114
- import { assertGitHubProducerContext, assertProducerInput, buildImageSourceStatements, readPinnedContractAuthority, sandboxedGit } from './produce-image-source-evidence.mjs';
115
- import {
116
- loadRegistryCredentialDeclarations,
117
- resolveRegistryCredential,
118
- splitImageRef,
119
- } from './registry-credentials.mjs';
120
- import {
121
- COMPOSED_PROCESS_DECLARATION_FILE,
122
- COMPOSED_PROCESS_IMAGE_PATH,
123
- composedProcessSubjectId,
124
- subjectServicePath,
125
- } from './resolve-images.mjs';
126
- import {
127
- platformIdentity,
128
- resolvePublishedPlatforms,
129
- } from './verify-image-platforms.mjs';
130
-
131
- const SOURCE_REPO_PATTERN = /^(?:repos|submodules)\/[a-zA-Z0-9_.-]+$/;
132
- // The kernel's `CanonicalIdentifierSchema` shape (runId / subject id).
133
- const CANONICAL_IDENTIFIER_PATTERN =
134
- /^[a-zA-Z0-9](?:[a-zA-Z0-9._:/@+-]{0,254}[a-zA-Z0-9])?$/;
135
- /** `--subject-id` has the kernel's `CanonicalIdentifierSchema` shape. */
136
- export function assertCanonicalSubjectId(subjectId) {
137
- if (!CANONICAL_IDENTIFIER_PATTERN.test(subjectId ?? '')) {
138
- throw new Error(`--subject-id ${JSON.stringify(subjectId ?? null)} is not a canonical identifier`);
139
- }
140
- }
141
-
142
- // cosign v2 attaches every attestation of a subject as one layer of the
143
- // single `sha256-<subject-digest>.att` manifest; each layer is a DSSE
144
- // envelope whose `predicateType` annotation names the attestation.
145
- const ATTESTATION_TAG_SUFFIX = '.att';
146
- const DSSE_ENVELOPE_LAYER_MEDIA_TYPE = 'application/vnd.dsse.envelope.v1+json';
147
- const IN_TOTO_PAYLOAD_TYPE = 'application/vnd.in-toto+json';
148
- const PREDICATE_TYPE_ANNOTATION = 'predicateType';
149
- const SBOM_PREDICATE_TYPE = 'https://spdx.dev/Document';
150
- const PROVENANCE_PREDICATE_TYPE = 'https://slsa.dev/provenance/v1';
151
- // The third mandatory deploy predicate (see the producing workflows). It
152
- // legitimately shares the `.att` manifest but occupies no producer-input slot.
153
- const DEPLOY_SOURCE_PREDICATE_TYPE =
154
- 'https://xema.dev/attestations/deploy-source/v1';
155
- const MAX_ATTESTATION_LAYER_BYTES = 64 * 1024 * 1024;
156
- // The vendoring record the producing workflow consumed — committed in the
157
- // producing repository, read AT THE BUILD COMMIT (see header).
158
- const CROSS_REPO_RECORD_PATH = 'tooling/release/cross-repo-build-inputs.json';
159
-
160
- function canonicalRelativePath(value, label) {
161
- if (
162
- typeof value !== 'string' ||
163
- value.length === 0 ||
164
- value !== value.normalize('NFC') ||
165
- value.startsWith('/') ||
166
- value.endsWith('/') ||
167
- value
168
- .split('/')
169
- .some((segment) => segment === '' || segment === '.' || segment === '..')
170
- ) {
171
- throw new Error(
172
- `${label} must be an NFC-normalized repository-relative path without traversal`,
173
- );
174
- }
175
- return value;
176
- }
177
-
178
- export function assertWorkflowContext(env) {
179
- const repository = env.GITHUB_REPOSITORY;
180
- const ref = env.GITHUB_REF;
181
- const sha = env.GITHUB_SHA;
182
- const workflowRef = env.GITHUB_WORKFLOW_REF;
183
- if (!GITHUB_REPOSITORY_PATTERN.test(repository ?? '')) {
184
- throw new Error('GITHUB_REPOSITORY is not an exact owner/repo slug');
185
- }
186
- if (!GITHUB_REF_PATTERN.test(ref ?? '')) {
187
- throw new Error('GITHUB_REF is not an exact branch or tag ref');
188
- }
189
- if (!COMMIT_PATTERN.test(sha ?? '')) {
190
- throw new Error('GITHUB_SHA is not an exact 40-hex commit');
191
- }
192
- const prefix = `${repository}/`;
193
- const suffix = `@${ref}`;
194
- if (
195
- typeof workflowRef !== 'string' ||
196
- !workflowRef.startsWith(prefix) ||
197
- !workflowRef.endsWith(suffix) ||
198
- workflowRef.length <= prefix.length + suffix.length
199
- ) {
200
- throw new Error(
201
- `GITHUB_WORKFLOW_REF "${workflowRef}" is not exactly <repository>/<workflow-path>@<ref> for this run`,
202
- );
203
- }
204
- const path = workflowRef.slice(
205
- prefix.length,
206
- workflowRef.length - suffix.length,
207
- );
208
- if (
209
- !path.startsWith('.github/workflows/') ||
210
- path.split('/').some((segment) => !segment || segment === '..')
211
- ) {
212
- throw new Error(
213
- `GITHUB_WORKFLOW_REF names "${path}", which is not an exact workflow file under .github/workflows/`,
214
- );
215
- }
216
- const runId = env.GITHUB_RUN_ID;
217
- if (!CANONICAL_IDENTIFIER_PATTERN.test(runId ?? '')) {
218
- throw new Error('GITHUB_RUN_ID is not a usable run identifier');
219
- }
220
- const runAttempt = Number(env.GITHUB_RUN_ATTEMPT);
221
- if (
222
- !Number.isSafeInteger(runAttempt) ||
223
- runAttempt < 1 ||
224
- String(runAttempt) !== env.GITHUB_RUN_ATTEMPT
225
- ) {
226
- throw new Error('GITHUB_RUN_ATTEMPT is not a positive integer');
227
- }
228
- return { repository, ref, sha, path, workflowRef, runId, runAttempt };
229
- }
230
-
231
- /**
232
- * The build identity section of the producer input. `buildType` and the two
233
- * digests are read off the BuildKit SLSA v1 predicate the producing workflow
234
- * exported from the image it just pushed — the same bytes it cosign-attests
235
- * and the deploy plane re-verifies — so the evidence can never describe a
236
- * different build than the one that ran.
237
- */
238
- export function deriveBuilder({ provenancePath, sourceCommit }) {
239
- if (!isAbsolute(provenancePath)) {
240
- throw new Error('--provenance must be an absolute path');
241
- }
242
- let predicate;
243
- try {
244
- predicate = JSON.parse(readFileSync(provenancePath, 'utf8'));
245
- } catch (error) {
246
- throw new Error(
247
- `cannot read the exported BuildKit provenance predicate at ${provenancePath}: ${error.message}`,
248
- );
249
- }
250
- const label = 'exported BuildKit SLSA v1 provenance predicate';
251
- if (
252
- typeof predicate !== 'object' ||
253
- predicate === null ||
254
- Array.isArray(predicate)
255
- ) {
256
- throw new Error(`${label} is not a JSON object`);
257
- }
258
- const buildDefinition = predicate.buildDefinition;
259
- if (
260
- typeof buildDefinition !== 'object' ||
261
- buildDefinition === null ||
262
- Array.isArray(buildDefinition)
263
- ) {
264
- throw new Error(
265
- `${label} has no buildDefinition object — SLSA v1 (BuildKit >= v0.28) is required; ` +
266
- 'pin the BuildKit image and pass provenance: mode=max,version=v1 to docker/build-push-action',
267
- );
268
- }
269
- // SLSA v1 names the build type INSIDE buildDefinition; a top-level buildType
270
- // is the retired v0.2 shape.
271
- const buildType = buildDefinition.buildType;
272
- if (typeof buildType !== 'string' || buildType.length === 0) {
273
- throw new Error(
274
- `${label} names no buildDefinition.buildType — is this SLSA v1 output?`,
275
- );
276
- }
277
- const revision =
278
- predicate.runDetails?.metadata?.buildkit_metadata?.vcs?.revision;
279
- if (revision !== sourceCommit) {
280
- throw new Error(
281
- `${label} records VCS revision "${String(revision)}", not source commit ${sourceCommit} — ` +
282
- 'the exported predicate must describe exactly the build this evidence names',
283
- );
284
- }
285
- const parameters = {};
286
- if ('externalParameters' in buildDefinition) {
287
- parameters.externalParameters = buildDefinition.externalParameters;
288
- }
289
- if ('internalParameters' in buildDefinition) {
290
- parameters.internalParameters = buildDefinition.internalParameters;
291
- }
292
- if (Object.keys(parameters).length === 0) {
293
- throw new Error(
294
- `${label} carries neither externalParameters nor internalParameters — nothing binds the build's inputs`,
295
- );
296
- }
297
- return {
298
- buildType,
299
- buildDefinitionDigest: `sha256:${sha256Hex(canonicalJson(buildDefinition))}`,
300
- parametersDigest: `sha256:${sha256Hex(canonicalJson(parameters))}`,
301
- // The parsed predicate itself: the registry scan below binds the
302
- // statement's provenance witness to this exact build's identity.
303
- predicate,
304
- };
305
- }
306
-
307
- /**
308
- * The identity the PRIMARY build's SLSA attestation must carry: builder id +
309
- * invocation id, read off a decoded SLSA v1 predicate. Both spellings of the
310
- * invocation key occur in the wild — BuildKit's own rendering writes
311
- * `invocationId`, lanes whose predicates passed through other renderings
312
- * carry `invocationID` — so both are read, never rewritten.
313
- */
314
- function slsaBuildIdentity(predicate, label) {
315
- const builderId = predicate?.runDetails?.builder?.id;
316
- if (typeof builderId !== 'string' || builderId.length === 0) {
317
- throw new Error(`${label} records no runDetails.builder.id — the builder identity is what binds an attestation to one build`);
318
- }
319
- const metadata = predicate?.runDetails?.metadata;
320
- const invocationId =
321
- typeof metadata?.invocationId === 'string'
322
- ? metadata.invocationId
323
- : typeof metadata?.invocationID === 'string'
324
- ? metadata.invocationID
325
- : undefined;
326
- if (invocationId === undefined || invocationId.length === 0) {
327
- throw new Error(
328
- `${label} records no runDetails.metadata.invocationId/invocationID — without an invocation id one build's attestation cannot be told from another's`,
329
- );
330
- }
331
- return { builderId, invocationId };
332
- }
333
-
334
- /**
335
- * The vendoring record the producing checkout committed — read at the BUILD
336
- * commit, because it pins the cross-repo bytes the build actually consumed.
337
- * Absent record (a repository with no cross-repo inputs) returns null.
338
- *
339
- * EVERY field this function returns is validated HERE, before any consumer
340
- * filters it. An entry that drops out of the source-hash closure does not fail
341
- * — it produces a DIFFERENT `sourceTreeHash`, and the only symptom is the
342
- * registry cross-check reporting "the image was not published from this source
343
- * identity" hundreds of lines later, naming neither the record nor the entry.
344
- * A malformed vendoring record is unusable, full stop; it must say so here.
345
- */
346
- export function readCrossRepoRecord(repoDir, commit, repo) {
347
- const label = `${repo}@${commit}:${CROSS_REPO_RECORD_PATH}`;
348
- let present = true;
349
- try {
350
- sandboxedGit(repoDir, [
351
- 'cat-file',
352
- '-e',
353
- `${commit}:${CROSS_REPO_RECORD_PATH}`,
354
- ]);
355
- } catch {
356
- present = false;
357
- }
358
- if (!present) {return null;}
359
- let record;
360
- try {
361
- record = readGitJsonAtCommit(repoDir, CROSS_REPO_RECORD_PATH, commit);
362
- } catch (error) {
363
- throw new Error(`${label} is not readable JSON: ${error.message}`);
364
- }
365
- if (record?.schemaVersion !== 1 || !Array.isArray(record.inputs)) {
366
- throw new Error(`${label} is not a schemaVersion 1 cross-repo record`);
367
- }
368
- // Build-step context directories ride straight into `hashImageBuildInputs`.
369
- // They were consumed with `?? []` and NO validation at all, so a record
370
- // carrying a non-array (or a traversing path) silently hashed a different
371
- // closure than the build consumed.
372
- const buildStepContextDirectories = record.buildStepContextDirectories ?? [];
373
- if (!Array.isArray(buildStepContextDirectories)) {
374
- throw new Error(
375
- `${label} buildStepContextDirectories must be an array of repository-relative directories`,
376
- );
377
- }
378
- for (const directory of buildStepContextDirectories) {
379
- canonicalRelativePath(
380
- directory,
381
- `${label} buildStepContextDirectories entry`,
382
- );
383
- }
384
- // Shape FIRST, selection second. The `consumerService` filter used to run
385
- // BEFORE this validation, so an entry MISSING `consumerService` compared
386
- // `undefined !== null && undefined !== id` — true — and was silently skipped
387
- // by the very check that exists to reject it.
388
- for (const input of record.inputs) {
389
- if (
390
- input === null ||
391
- typeof input !== 'object' ||
392
- Array.isArray(input) ||
393
- (input.consumerService !== null &&
394
- typeof input.consumerService !== 'string') ||
395
- (typeof input.consumerService === 'string' &&
396
- input.consumerService.length === 0) ||
397
- typeof input.sourceRepo !== 'string' ||
398
- !SOURCE_REPO_PATTERN.test(input.sourceRepo) ||
399
- !COMMIT_PATTERN.test(input.sourceCommit ?? '') ||
400
- typeof input.sourcePath !== 'string' ||
401
- typeof input.destinationPath !== 'string'
402
- ) {
403
- throw new Error(`${label} carries a malformed input ${serializeJson(input ?? null)}`);
404
- }
405
- canonicalRelativePath(input.sourcePath, `${label} input sourcePath`);
406
- canonicalRelativePath(
407
- input.destinationPath,
408
- `${label} input destinationPath`,
409
- );
410
- }
411
- return { inputs: record.inputs, buildStepContextDirectories };
412
- }
413
-
414
- /**
415
- * The subject's source identity, computed with the exact lock algorithms:
416
- * sourceManifestHash (the runtime-image-source-index algorithm),
417
- * sourceTreeHash (the ImageInputV2 build-input closure), and the
418
- * repositoryUrl the verifier binds (the runtime-image-source-index pin).
419
- */
420
- /**
421
- * The `platform-service-index.json` entry a `platform`-kind subject is built
422
- * from.
423
- *
424
- * `platform` subjects are the fleet's only repository-ROOT subjects: their lock
425
- * entry is synthesized in `resolve-images.mjs` from
426
- * `distributionLock.platformServices[].source`, with `path === repo` and
427
- * `sourceManifestPath === '<repo>/package.json'` — they are whole repositories
428
- * (the five generic submodules), not biome directories.
429
- *
430
- * `deriveSubjectSourceIdentity` recognized only two shapes: a supplemental
431
- * subject declared in the runtime index, or a biome subject whose path names a
432
- * directory inside the repository. A `platform` subject is neither, so EVERY one
433
- * of them failed deterministically — before any registry hop — on "is not a
434
- * supplemental subject, so its source path must name a biome directory". All
435
- * five generic submodules were therefore unable to produce image-source evidence
436
- * at all.
437
- *
438
- * The index is the SAME authority `resolve-images.mjs` resolved the lock's
439
- * platform subjects from, so resolving through it here is what makes the
440
- * assembler's `sourceTreeHash` equal the lock's `contentHash` — the equality the
441
- * whole producer contract rests on. `imageKey` (not `name`) is the subject id,
442
- * because that is the field `resolve-images.mjs` uses for `subjectId`.
443
- */
444
- function findPlatformServiceSource({ readPlatformServiceIndex, kind, id, repo }) {
445
- if (typeof readPlatformServiceIndex !== 'function') {
446
- throw new Error(
447
- `subject ${kind}:${id} is a platform subject, which is resolved from ` +
448
- 'platform-service-index.json, but no reader for that index was provided',
449
- );
450
- }
451
- const matches = readPlatformServiceIndex().services.filter(
452
- (candidate) => candidate.imageKey === id && candidate.repo === repo,
453
- );
454
- if (matches.length !== 1) {
455
- throw new Error(
456
- `subject ${kind}:${id} matches ${matches.length} entries of ` +
457
- `platform-service-index.json for repository "${repo}"; exactly one is ` +
458
- 'required — a platform subject is resolved from that index, which is the ' +
459
- 'same authority resolve-images.mjs built the lock from',
460
- );
461
- }
462
- return matches[0];
463
- }
464
-
465
- export async function deriveSubjectSourceIdentity({
466
- runtimeIndex,
467
- // Lazy on purpose: platform-service-index.json is needed ONLY to resolve a
468
- // `platform` subject, and requiring it for every subject made the file an
469
- // unconditional input of a derivation that mostly does not read it.
470
- readPlatformServiceIndex,
471
- // The kernel enum member, passed in rather than written as a literal: the
472
- // subject kind is a closed set the kernel owns, and a local copy is a second
473
- // source of truth waiting to drift.
474
- platformSubjectKind,
475
- // The kernel's `RuntimeImageSubjectKind.ComposedProcess`, passed in for the
476
- // reason `platformSubjectKind` is. Undefined: no subject is a composed one.
477
- composedProcessSubjectKind = undefined,
478
- declaration,
479
- }) {
480
- const { kind, id, repo, path, sourceCommit } = declaration;
481
- if (typeof platformSubjectKind !== 'string' || !platformSubjectKind) {
482
- throw new Error(
483
- 'the kernel platform subject kind is required to resolve a source identity',
484
- );
485
- }
486
- const pin = runtimeIndex.repositoryPins.find(
487
- (candidate) => candidate.repo === repo,
488
- );
489
- if (!pin) {
490
- throw new Error(
491
- `subject ${kind}:${id} names source repository "${repo}", which has no ` +
492
- 'repository pin in runtime-image-source-index.json — it is not an image source repository',
493
- );
494
- }
495
- const repoDir = sourceCheckoutPath(repo);
496
- assertGitCommitExists(repoDir, sourceCommit);
497
- // Supplemental subjects (host shell, independently sourced platform images)
498
- // declare their source manifest in the runtime index; biome subjects carry
499
- // `<biome>/xema-biome.json`.
500
- const supplemental = runtimeIndex.supplementalSubjects.find(
501
- (candidate) => candidate.kind === kind && candidate.id === id,
502
- );
503
- let manifestRepoRelativePath;
504
- let subjectForServicePath = { kind, id, repo, path };
505
- if (supplemental) {
506
- if (supplemental.repo !== repo || supplemental.path !== path) {
507
- throw new Error(
508
- `subject ${kind}:${id} is a supplemental subject of ${supplemental.repo}:${supplemental.path} ` +
509
- `in runtime-image-source-index.json, not of ${repo}:${path}`,
510
- );
511
- }
512
- if (!supplemental.sourceManifestPath.startsWith(`${repo}/`)) {
513
- throw new Error(
514
- `subject ${kind}:${id} sourceManifestPath "${supplemental.sourceManifestPath}" ` +
515
- `escapes its repository "${repo}"`,
516
- );
517
- }
518
- manifestRepoRelativePath = supplemental.sourceManifestPath.slice(
519
- repo.length + 1,
520
- );
521
- subjectForServicePath = {
522
- ...subjectForServicePath,
523
- sourceManifestPath: manifestRepoRelativePath,
524
- };
525
- } else if (composedProcessSubjectKind !== undefined && kind === composedProcessSubjectKind) {
526
- // The composed-process image of one build: a Dockerfile-only image at the
527
- // repository's `infra/composed-process/`, whose declaration is its
528
- // `image-build-inputs.json` — exactly the shape resolve-images.mjs names
529
- // in the lock (`readComposedProcessDeclarations`).
530
- if (path !== `${repo}/${COMPOSED_PROCESS_IMAGE_PATH}`) {
531
- throw new Error(
532
- `subject ${kind}:${id} declares source path "${path}", but a composed-process ` +
533
- `image is built from "${repo}/${COMPOSED_PROCESS_IMAGE_PATH}"`,
534
- );
535
- }
536
- const expectedId = composedProcessSubjectId(firstPartySourceId(repo));
537
- if (id !== expectedId) {
538
- throw new Error(
539
- `subject ${kind}:${id} is not the composed-process subject of "${repo}" ("${expectedId}")`,
540
- );
541
- }
542
- manifestRepoRelativePath = `${COMPOSED_PROCESS_IMAGE_PATH}/${COMPOSED_PROCESS_DECLARATION_FILE}`;
543
- subjectForServicePath = {
544
- ...subjectForServicePath,
545
- sourceManifestPath: manifestRepoRelativePath,
546
- };
547
- } else if (kind === platformSubjectKind) {
548
- // The third shape: a whole-repository platform service. See
549
- // `findPlatformServiceSource`.
550
- const service = findPlatformServiceSource({
551
- readPlatformServiceIndex,
552
- kind,
553
- id,
554
- repo,
555
- });
556
- if (path !== repo) {
557
- throw new Error(
558
- `subject ${kind}:${id} declares source path "${path}", but a platform ` +
559
- `subject is the whole repository "${repo}" — resolve-images.mjs sets ` +
560
- 'path === repo for it, and any other path hashes a closure the lock never named',
561
- );
562
- }
563
- if (!service.path.startsWith(`${repo}/`)) {
564
- throw new Error(
565
- `subject ${kind}:${id} platform-service-index path "${service.path}" ` +
566
- `escapes its repository "${repo}"`,
567
- );
568
- }
569
- manifestRepoRelativePath = service.path.slice(repo.length + 1);
570
- // Setting `sourceManifestPath` is what makes `subjectServicePath` return the
571
- // repository ROOT instead of reading a `xema-biome.json` that does not
572
- // exist — exactly the path whose build-input closure produced the lock's
573
- // contentHash.
574
- subjectForServicePath = {
575
- ...subjectForServicePath,
576
- sourceManifestPath: manifestRepoRelativePath,
577
- };
578
- } else {
579
- if (path === repo) {
580
- throw new Error(
581
- `subject ${kind}:${id} is not a supplemental subject, so its source path ` +
582
- 'must name a biome directory inside the repository, not the repository root',
583
- );
584
- }
585
- manifestRepoRelativePath = `${path.slice(repo.length + 1)}/xema-biome.json`;
586
- }
587
- const { computeBiomeSourceManifestHash } = await loadKernelDistributionSchemas();
588
- const sourceManifestHash = await computeBiomeSourceManifestHash(
589
- readGitJsonAtCommit(repoDir, manifestRepoRelativePath, sourceCommit),
590
- );
591
- const servicePath = subjectServicePath(subjectForServicePath, sourceCommit);
592
- // Vendored cross-repo inputs EXACTLY as the build consumed them: the record
593
- // committed in the producing checkout at the build commit. A `null`
594
- // consumerService vendors for EVERY service of the consumer repository.
595
- // `readCrossRepoRecord` has already proven EVERY entry well-formed, so the
596
- // filter below can only ever narrow a valid set — it can no longer be the
597
- // thing that hides an invalid one.
598
- const record = readCrossRepoRecord(repoDir, sourceCommit, repo);
599
- const crossRepoInputs = [];
600
- for (const input of record?.inputs ?? []) {
601
- // A composed image carries EVERY service of its build, so it vendors every
602
- // input the record declares — the same set resolve-images.mjs hashes.
603
- const composed =
604
- composedProcessSubjectKind !== undefined && kind === composedProcessSubjectKind;
605
- if (!composed && input.consumerService !== null && input.consumerService !== id) {
606
- continue;
607
- }
608
- const sourceRepoDir = sourceCheckoutPath(input.sourceRepo);
609
- assertGitCommitExists(sourceRepoDir, input.sourceCommit);
610
- crossRepoInputs.push({
611
- destinationPath: input.destinationPath,
612
- sourceRepoDir,
613
- sourcePath: input.sourcePath,
614
- sourceCommit: input.sourceCommit,
615
- });
616
- }
617
- const sourceTreeHash = hashImageBuildInputs(
618
- {
619
- repoDir,
620
- service: id,
621
- servicePath,
622
- commit: sourceCommit,
623
- crossRepoInputs,
624
- buildStepDirectories: [...(record?.buildStepContextDirectories ?? [])],
625
- },
626
- imageInputSourceHashAlgorithm(),
627
- );
628
- return {
629
- repositoryUrl: pin.repositoryUrl,
630
- sourceManifestHash,
631
- sourceTreeHash,
632
- };
633
- }
634
-
635
- /**
636
- * The SBOM + provenance digests carried by the subject's cosign attestation
637
- * manifest (`sha256-<digest>.att`): the DSSE envelope layer digests, bound to
638
- * the delivered digest through their decoded statement subject. Fail-closed on
639
- * every gap, naming the pipeline step that must emit the missing artifact.
640
- *
641
- * A merged multi-arch index legitimately carries SEVERAL attestations of each
642
- * type — one per platform build, plus one more per lane re-run, because
643
- * `cosign attest` appends. Every candidate is validated (envelope shape,
644
- * predicate type, subject binding) and then ONE witness per type is selected
645
- * deterministically:
646
- *
647
- * * SLSA provenance — the candidate whose statement names the SAME build as
648
- * the caller's exported `--provenance` predicate (equal builder id AND
649
- * invocation id), so the statement's artifact and build sections describe
650
- * one and the same build. Ties (identical re-attestations of that build)
651
- * resolve to the smallest layer digest; no match fails loudly.
652
- * * SBOM — no caller-side reference exists, so the smallest layer digest
653
- * among the validated candidates. Content-addressed, stable, and every
654
- * candidate already proved it is an SBOM attestation bound to the
655
- * delivered digest.
656
- */
657
- async function resolveCosignAttestationDigests({
658
- client,
659
- repository,
660
- imageRepository,
661
- manifestDigest,
662
- label,
663
- referenceProvenance,
664
- }) {
665
- const attestationTag = `sha256-${manifestDigest.slice('sha256:'.length)}${ATTESTATION_TAG_SUFFIX}`;
666
- let attestation;
667
- try {
668
- attestation = await client.getManifestByTag(repository, attestationTag);
669
- } catch (error) {
670
- throw new Error(
671
- `${label} has no cosign attestation manifest at tag ${attestationTag}: ${error.message}. ` +
672
- 'The producing workflow must `cosign attest` the SBOM (--type spdxjson) and the SLSA ' +
673
- `provenance (--type slsaprovenance1) against the exact delivered digest ${manifestDigest}. ` +
674
- 'If this digest is a multi-arch index merged AFTER the build attested the pre-merge image ' +
675
- '(a separate multi-arch merge workflow), the merge step must re-run those attest calls on the merged ' +
676
- 'index.',
677
- );
678
- }
679
- if (attestation.isIndex) {
680
- throw new Error(
681
- `${label} attestation tag ${attestationTag} resolved to an index; the assembler expects the ` +
682
- 'single-manifest / multi-layer shape cosign v2.6.3 writes',
683
- );
684
- }
685
- const layers = Array.isArray(attestation.document.layers)
686
- ? attestation.document.layers
687
- : [];
688
- if (layers.length === 0) {
689
- throw new Error(
690
- `${label} attestation manifest ${attestation.digest} carries no layers`,
691
- );
692
- }
693
- const deliveredHex = manifestDigest.slice('sha256:'.length);
694
- const sbomCandidates = [];
695
- const provenanceCandidates = [];
696
- for (const layer of layers) {
697
- if (layer?.mediaType !== DSSE_ENVELOPE_LAYER_MEDIA_TYPE) {
698
- throw new Error(
699
- `${label} attestation manifest ${attestation.digest} carries a ` +
700
- `"${String(layer?.mediaType)}" layer; only ${DSSE_ENVELOPE_LAYER_MEDIA_TYPE} ` +
701
- 'layers are admissible',
702
- );
703
- }
704
- const predicateType = layer.annotations?.[PREDICATE_TYPE_ANNOTATION];
705
- if (typeof predicateType !== 'string' || predicateType.length === 0) {
706
- throw new Error(
707
- `${label} attestation layer ${layer.digest} has no "${PREDICATE_TYPE_ANNOTATION}" annotation`,
708
- );
709
- }
710
- if (predicateType === DEPLOY_SOURCE_PREDICATE_TYPE) {continue;}
711
- if (
712
- predicateType !== SBOM_PREDICATE_TYPE &&
713
- predicateType !== PROVENANCE_PREDICATE_TYPE
714
- ) {
715
- throw new Error(
716
- `${label} attestation layer ${layer.digest} has unrecognized predicate type ` +
717
- `"${predicateType}" — only ${SBOM_PREDICATE_TYPE}, ${PROVENANCE_PREDICATE_TYPE} and ` +
718
- `${DEPLOY_SOURCE_PREDICATE_TYPE} may hang off a producer subject`,
719
- );
720
- }
721
- // Fetching the envelope proves it is stored and content-addressed, and the
722
- // decoded statement must bind EXACTLY the delivered digest: an attestation
723
- // that names any other subject describes a different image.
724
- const bytes = await client.getBlob(
725
- repository,
726
- layer.digest,
727
- MAX_ATTESTATION_LAYER_BYTES,
728
- );
729
- let envelope;
730
- try {
731
- envelope = JSON.parse(bytes.toString('utf8'));
732
- } catch {
733
- throw new Error(
734
- `${label} attestation layer ${layer.digest} is not valid JSON`,
735
- );
736
- }
737
- if (envelope?.payloadType !== IN_TOTO_PAYLOAD_TYPE) {
738
- throw new Error(
739
- `${label} attestation layer ${layer.digest} is not an ${IN_TOTO_PAYLOAD_TYPE} DSSE envelope`,
740
- );
741
- }
742
- let statement;
743
- try {
744
- statement = JSON.parse(
745
- Buffer.from(String(envelope.payload), 'base64').toString('utf8'),
746
- );
747
- } catch {
748
- throw new Error(
749
- `${label} attestation layer ${layer.digest} carries no decodable in-toto statement`,
750
- );
751
- }
752
- if (statement?.predicateType !== predicateType) {
753
- throw new Error(
754
- `${label} attestation layer ${layer.digest} annotates "${predicateType}" ` +
755
- `but its statement declares "${String(statement?.predicateType)}"`,
756
- );
757
- }
758
- const expectedSubject = {
759
- name: imageRepository,
760
- digest: { sha256: deliveredHex },
761
- };
762
- if (
763
- !Array.isArray(statement.subject) ||
764
- statement.subject.length !== 1 ||
765
- JSON.stringify(statement.subject[0]) !== JSON.stringify(expectedSubject)
766
- ) {
767
- throw new Error(
768
- `${label} attestation layer ${layer.digest} binds ` +
769
- `${serializeJson(statement.subject ?? null)}, not the delivered subject ` +
770
- `${serializeJson(expectedSubject)} — the producing workflow must attest the exact ` +
771
- 'digest the canonical coordinate serves',
772
- );
773
- }
774
- if (predicateType === SBOM_PREDICATE_TYPE) {
775
- sbomCandidates.push({ digest: layer.digest, statement });
776
- } else {
777
- provenanceCandidates.push({ digest: layer.digest, statement });
778
- }
779
- }
780
- if (sbomCandidates.length === 0) {
781
- throw new Error(
782
- `${label} carries no SBOM attestation (${SBOM_PREDICATE_TYPE}) — the producing workflow must run ` +
783
- `cosign attest --yes --type spdxjson --predicate <spdx.json> ${imageRepository}@${manifestDigest}`,
784
- );
785
- }
786
- if (provenanceCandidates.length === 0) {
787
- throw new Error(
788
- `${label} carries no SLSA provenance attestation (${PROVENANCE_PREDICATE_TYPE}) — the producing ` +
789
- `workflow must run cosign attest --yes --type slsaprovenance1 --predicate <slsa-provenance.json> ` +
790
- `${imageRepository}@${manifestDigest}`,
791
- );
792
- }
793
- // The provenance witness must describe the SAME build the statement's build
794
- // section describes — the caller's exported predicate. A multi-platform
795
- // index carries one attestation per platform build; picking any other
796
- // build's would attest the index with a different source's provenance.
797
- const referenceIdentity = slsaBuildIdentity(
798
- referenceProvenance,
799
- 'the exported --provenance predicate',
800
- );
801
- const matches = provenanceCandidates.filter((candidate) => {
802
- try {
803
- const identity = slsaBuildIdentity(
804
- candidate.statement.predicate,
805
- `attestation layer ${candidate.digest}`,
806
- );
807
- return (
808
- identity.builderId === referenceIdentity.builderId &&
809
- identity.invocationId === referenceIdentity.invocationId
810
- );
811
- } catch {
812
- // A candidate whose predicate names no build identity can never be the
813
- // primary build's witness; it stays admissible for nothing.
814
- return false;
815
- }
816
- });
817
- if (matches.length === 0) {
818
- throw new Error(
819
- `${label} carries ${provenanceCandidates.length} SLSA provenance attestation(s) but none ` +
820
- `describes the primary build (builder "${referenceIdentity.builderId}", invocation ` +
821
- `"${referenceIdentity.invocationId}") — the lane must re-attest the merged index with ` +
822
- 'that build\'s own predicate (mirror release-arm64-host-web.yaml\'s attest step)',
823
- );
824
- }
825
- matches.sort((left, right) => compareStrings(left.digest, right.digest));
826
- const provenanceDigest = matches[0].digest;
827
- const sbomsByDigest = [...sbomCandidates].sort((left, right) =>
828
- compareStrings(left.digest, right.digest),
829
- );
830
- const sbomDigest = sbomsByDigest[0].digest;
831
- return { sbomDigest, provenanceDigest };
832
- }
833
-
834
- /**
835
- * Registry side of one subject, resolved at the canonical
836
- * `<imageRepository>:<sourceTreeHash>` coordinate: the served manifest digest
837
- * (which must be exactly the caller's), its media type, the hash-proven
838
- * platform set, and the SBOM/provenance attestation digests.
839
- * `referenceProvenance` is the caller's parsed exported BuildKit predicate —
840
- * the identity anchor the provenance-witness selection binds to.
841
- */
842
- export async function resolveImageArtifactEvidence({
843
- imageRepository,
844
- manifestDigest,
845
- sourceTreeHash,
846
- referenceProvenance,
847
- distributionsRoot = dataRoot(),
848
- env = process.env,
849
- fetchImpl = globalThis.fetch,
850
- registryFor = null,
851
- }) {
852
- if (!SHA256_DIGEST_PATTERN.test(manifestDigest ?? '')) {
853
- throw new Error('--manifest-digest must be an exact sha256:<64-hex> digest');
854
- }
855
- if (!SHA256_HEX_PATTERN.test(sourceTreeHash ?? '')) {
856
- throw new Error('sourceTreeHash must be 64 lowercase sha256 hex characters');
857
- }
858
- assertReferenceProvenance(referenceProvenance);
859
- const { authority, repository } = splitImageRef(imageRepository);
860
- const declarations = loadRegistryCredentialDeclarations(distributionsRoot);
861
- const credential = resolveRegistryCredential({ authority, declarations, env });
862
- const client = registryFor
863
- ? registryFor({ authority, credential })
864
- : new OrasRegistry({ credential, fetchImpl });
865
- return publishedArtifactEvidence({
866
- client,
867
- repository,
868
- imageRepository,
869
- read: { tag: sourceTreeHash },
870
- expectedDigest: manifestDigest,
871
- coordinate: `${imageRepository}:${sourceTreeHash}`,
872
- referenceProvenance,
873
- });
874
- }
875
-
876
- /**
877
- * The artifact section of a producer subject read BY DIGEST: the manifest at
878
- * `<imageRepository>@<manifestDigest>` (its bytes must hash to that digest),
879
- * its hash-proven platforms and its cosign SBOM + SLSA attestation digests. A
880
- * third-party publisher's image carries no `:<sourceTreeHash>` tag
881
- * (`evidence assemble-third-party-input`), so nothing is read by tag.
882
- */
883
- export async function resolveImageArtifactEvidenceByDigest({
884
- client,
885
- imageRepository,
886
- manifestDigest,
887
- referenceProvenance,
888
- }) {
889
- if (!SHA256_DIGEST_PATTERN.test(manifestDigest ?? '')) {
890
- throw new Error('the image manifest digest must be an exact sha256:<64-hex> digest');
891
- }
892
- assertReferenceProvenance(referenceProvenance);
893
- const { repository } = splitImageRef(imageRepository);
894
- return publishedArtifactEvidence({
895
- client,
896
- repository,
897
- imageRepository,
898
- read: { digest: manifestDigest },
899
- expectedDigest: manifestDigest,
900
- coordinate: `${imageRepository}@${manifestDigest}`,
901
- referenceProvenance,
902
- });
903
- }
904
-
905
- function assertReferenceProvenance(referenceProvenance) {
906
- if (
907
- typeof referenceProvenance !== 'object' ||
908
- referenceProvenance === null ||
909
- Array.isArray(referenceProvenance)
910
- ) {
911
- throw new Error(
912
- 'referenceProvenance (the parsed exported BuildKit SLSA v1 predicate) is required — ' +
913
- 'it is what binds the selected provenance attestation to the primary build',
914
- );
915
- }
916
- }
917
-
918
- /** The artifact evidence of the manifest `read` names (exactly one of `{tag}` or `{digest}`), which must be `expectedDigest`. */
919
- async function publishedArtifactEvidence({
920
- client,
921
- repository,
922
- imageRepository,
923
- read,
924
- expectedDigest,
925
- coordinate,
926
- referenceProvenance,
927
- }) {
928
- const top =
929
- read.tag === undefined
930
- ? await client.getManifestByDigest(repository, read.digest)
931
- : await client.getManifestByTag(repository, read.tag);
932
- if (top.digest !== expectedDigest) {
933
- throw new Error(
934
- read.tag === undefined
935
- ? `${coordinate} was served as ${top.digest}: the registry returned a manifest that is not the digest it was read by`
936
- : `${coordinate} serves ${top.digest}, not the caller-declared ${expectedDigest} — ` +
937
- 'the image was not published from this source identity (wrong build commit, ' +
938
- 'or the cross-repo record at the build commit differs from the one this source carries)',
939
- );
940
- }
941
- // Proves EVERY platform by its own hash-verified image config and refuses
942
- // attestation children as platforms — exactly the evidence the producer
943
- // input carries.
944
- const published = await resolvePublishedPlatforms({
945
- client,
946
- repository,
947
- ...read,
948
- coordinate,
949
- });
950
- if (published.indexDigest !== top.digest) {
951
- throw new Error(
952
- `${coordinate} did not resolve to the exact published manifest this evidence names`,
953
- );
954
- }
955
- const label = `${imageRepository}@${top.digest}`;
956
- const { sbomDigest, provenanceDigest } =
957
- await resolveCosignAttestationDigests({
958
- client,
959
- repository,
960
- imageRepository,
961
- manifestDigest: top.digest,
962
- label,
963
- referenceProvenance,
964
- });
965
- const platforms = published.platforms
966
- .map((entry) => ({
967
- ...entry.platform,
968
- manifestDigest: entry.manifestDigest,
969
- }))
970
- // The kernel's canonical platform order: os/architecture/variant,
971
- // code-point comparison (assertPlatforms re-checks this on verification).
972
- .sort((left, right) =>
973
- compareStrings(platformIdentity(left), platformIdentity(right)),
974
- );
975
- return {
976
- manifestDigest: top.digest,
977
- manifestMediaType: top.mediaType,
978
- platforms,
979
- sbomDigest,
980
- provenanceDigest,
981
- };
982
- }
983
-
984
- /**
985
- * The producer's DECLARED evidence lifetime, in seconds.
986
- *
987
- * This used to default to the trust policy's `maxProducerTtlSeconds` (the
988
- * CEILING), which is wrong in two independent ways:
989
- *
990
- * 1. It collapses two numbers that must move independently. The ceiling is the
991
- * VERIFIER's tolerance; this is the PRODUCER's intent. With them equal,
992
- * `assertTimeWindow`'s `expires - issued > maxTtlSeconds` sits exactly on
993
- * the boundary, so lowering the policy ceiling by one second retroactively
994
- * invalidates every bundle ever signed — the ceiling could never be
995
- * tightened without re-producing the entire fleet's evidence.
996
- * 2. "As long as permitted" is not a decision. The offline verifier has NO
997
- * revocation channel, so this TTL *is* the revocation window for a
998
- * mis-issued or leaked bundle. Taking the maximum by default makes that
999
- * window as wide as the policy allows, by omission rather than by choice.
1000
- *
1001
- * 72h is the shortest value that still spans a weekend: a bundle produced late
1002
- * Friday is still valid Monday morning, so a release or delivery that slips
1003
- * over a weekend never needs an out-of-band refresh. Everything shorter buys
1004
- * marginal revocation latency and pays for it in operational surprise.
1005
- *
1006
- * A producer that genuinely needs a different lifetime passes `--ttl-seconds`;
1007
- * the ceiling still bounds it, and the value is asserted against the ceiling
1008
- * below so this constant can never quietly exceed the policy.
1009
- */
1010
- export const DEFAULT_PRODUCER_TTL_SECONDS = 3 * 24 * 60 * 60;
1011
-
1012
- /** Where the ceiling on a producer lifetime is held: the closed set of producer kinds. */
1013
- export const ProducerTtlCeilingSource = Object.freeze({
1014
- /** First party: the data root's trust policy `maxProducerTtlSeconds`, read here. */
1015
- TrustPolicy: 'trust-policy',
1016
- /**
1017
- * A third-party publisher on public inputs: the vendor policy's `maxProducerTtlSeconds`, enforced by
1018
- * the third-party pin writer (`index runtime-image-source --trusted-write --third-party`) and `verify-evidence`.
1019
- */
1020
- VendorAdmission: 'vendor-admission',
1021
- });
1022
-
1023
- /** The latest instant an RFC 3339 `expiresAt` (four-digit year) can name. */
1024
- const LATEST_EXPIRES_AT = Date.UTC(9999, 11, 31, 23, 59, 59);
1025
-
1026
- /** `--ttl-seconds` as given, or undefined when it is not. */
1027
- export const producerTtlSecondsFlag = (value) => (value === undefined ? undefined : Number(value));
1028
-
1029
- /**
1030
- * The producer lifetime of an input issued at `now`. The default is DEFAULT_PRODUCER_TTL_SECONDS, bowed to the
1031
- * ceiling when it is read here (`ceiling.source` TrustPolicy, `ceiling.maxTtlSeconds`); an explicit value above that
1032
- * ceiling is refused. With VendorAdmission the ceiling is the vendor policy's, enforced by the third-party pin writer
1033
- * (`index runtime-image-source --trusted-write --third-party`) and `verify-evidence`; this CLI holds no second one. Either way a value that is not a positive integer, or whose `expiresAt` is past the last
1034
- * instant RFC 3339 can name, is refused by name.
1035
- */
1036
- export function resolveProducerTtlSeconds({ ttlSeconds, now, ceiling }) {
1037
- let maxTtlSeconds;
1038
- if (ceiling?.source === ProducerTtlCeilingSource.TrustPolicy) {
1039
- ({ maxTtlSeconds } = ceiling);
1040
- if (!Number.isSafeInteger(maxTtlSeconds) || maxTtlSeconds < 1) {
1041
- throw new Error(`the trust policy's maxProducerTtlSeconds ${String(maxTtlSeconds)} is not a positive integer`);
1042
- }
1043
- } else if (ceiling?.source === ProducerTtlCeilingSource.VendorAdmission) {
1044
- maxTtlSeconds = null;
1045
- } else {
1046
- throw new Error(`a producer TTL ceiling source is one of ${Object.values(ProducerTtlCeilingSource).join(', ')}`);
1047
- }
1048
- // The DEFAULT bows to the policy ceiling; an EXPLICIT `--ttl-seconds` above
1049
- // it still fails below. Tightening `maxProducerTtlSeconds` is a legitimate
1050
- // operator decision, and it must not break every producer until someone
1051
- // edits a constant in this file — but a caller who NAMES a lifetime the
1052
- // verifier will reject has made a mistake, and gets told so.
1053
- const effective =
1054
- ttlSeconds ?? (maxTtlSeconds === null ? DEFAULT_PRODUCER_TTL_SECONDS : Math.min(DEFAULT_PRODUCER_TTL_SECONDS, maxTtlSeconds));
1055
- if (maxTtlSeconds !== null && (!Number.isSafeInteger(effective) || effective < 1 || effective > maxTtlSeconds)) {
1056
- throw new Error(
1057
- `--ttl-seconds must be an integer between 1 and the trust policy's maxProducerTtlSeconds (${maxTtlSeconds})`,
1058
- );
1059
- }
1060
- if (!Number.isSafeInteger(effective) || effective < 1) {
1061
- throw new Error(
1062
- `--ttl-seconds must be a positive integer number of seconds (got ${String(ttlSeconds)}); the vendor policy's ` +
1063
- 'maxProducerTtlSeconds is its ceiling, enforced by the pin writer and verify-evidence',
1064
- );
1065
- }
1066
- if (now + effective * 1000 > LATEST_EXPIRES_AT) {
1067
- throw new Error(
1068
- `--ttl-seconds ${effective} puts expiresAt past ${new Date(LATEST_EXPIRES_AT).toISOString()}, the last instant an ` +
1069
- 'RFC 3339 time can name',
1070
- );
1071
- }
1072
- return effective;
1073
- }
1074
-
1075
- function readProducerTtlSeconds(distributionsRoot) {
1076
- const declared = editionWorkspaceConfig().evidenceTrustPolicy.policy;
1077
- if (declared === null) {
1078
- throw new Error(
1079
- `${distributionsRoot} declares no evidenceTrustPolicy in edition-workspace.json; the producer TTL ceiling comes from it`,
1080
- );
1081
- }
1082
- const policyPath = join(distributionsRoot, declared);
1083
- let policy;
1084
- try {
1085
- policy = JSON.parse(readFileSync(policyPath, 'utf8'));
1086
- } catch (error) {
1087
- throw new Error(
1088
- `cannot read the committed trust policy at ${policyPath}: ${error.message}`,
1089
- );
1090
- }
1091
- if (
1092
- policy?.schemaVersion !== 1 ||
1093
- !Number.isSafeInteger(policy.maxProducerTtlSeconds) ||
1094
- policy.maxProducerTtlSeconds < 1
1095
- ) {
1096
- throw new Error(
1097
- `${policyPath} does not declare a positive integer maxProducerTtlSeconds`,
1098
- );
1099
- }
1100
- return policy.maxProducerTtlSeconds;
1101
- }
1102
-
1103
- function rfc3339(timestamp) {
1104
- return new Date(timestamp).toISOString().replace(/\.\d{3}Z$/, 'Z');
1105
- }
1106
-
1107
- /**
1108
- * Assemble the complete producer input manifest for ONE image subject and
1109
- * prove — before anything is written — that it satisfies the producer's exact
1110
- * field contract, the kernel statement schema, and the running GitHub context
1111
- * the producer action will compare it against.
1112
- */
1113
- export async function assembleProducerInput({
1114
- imageRepository,
1115
- manifestDigest,
1116
- subjectKind,
1117
- subjectId,
1118
- sourceRepo,
1119
- sourcePath,
1120
- sourceCommit,
1121
- provenancePath,
1122
- sourceManifestHash: declaredSourceManifestHash,
1123
- sourceTreeHash: declaredSourceTreeHash,
1124
- ttlSeconds,
1125
- distributionsRoot = dataRoot(),
1126
- env = process.env,
1127
- fetchImpl = globalThis.fetch,
1128
- registryFor = null,
1129
- now = Date.now(),
1130
- }) {
1131
- const schemas = await loadKernelDistributionSchemas();
1132
- const contractAuthority = readPinnedContractAuthority({
1133
- dataRoot: distributionsRoot,
1134
- schemas,
1135
- });
1136
- const subjectKinds = Object.values(schemas.RuntimeImageSubjectKind);
1137
- if (!subjectKinds.includes(subjectKind)) {
1138
- throw new Error(
1139
- `--subject-kind "${String(subjectKind)}" must be one of ${subjectKinds.join(', ')}`,
1140
- );
1141
- }
1142
- assertCanonicalSubjectId(subjectId);
1143
- if (!SOURCE_REPO_PATTERN.test(sourceRepo ?? '')) {
1144
- throw new Error(
1145
- `--source-repo "${String(sourceRepo)}" must be an aggregator-plane repository (repos/<name> or submodules/<name>)`,
1146
- );
1147
- }
1148
- canonicalRelativePath(sourcePath, '--source-path');
1149
- if (sourcePath !== sourceRepo && !sourcePath.startsWith(`${sourceRepo}/`)) {
1150
- throw new Error(`--source-path must stay inside ${sourceRepo}`);
1151
- }
1152
- if (!COMMIT_PATTERN.test(sourceCommit ?? '')) {
1153
- throw new Error('--source-commit must be an exact 40-hex commit');
1154
- }
1155
- const context = assertWorkflowContext(env);
1156
- const runtimeIndex = schemas.parseRuntimeImageSourceIndex(
1157
- JSON.parse(
1158
- readFileSync(
1159
- join(distributionsRoot, 'runtime-image-source-index.json'),
1160
- 'utf8',
1161
- ),
1162
- ),
1163
- );
1164
- const source = await deriveSubjectSourceIdentity({
1165
- runtimeIndex,
1166
- // Parsed through the kernel schema, not read raw: a `platform` subject's
1167
- // whole source identity is resolved from this index, so a malformed index
1168
- // must fail rather than produce a subtly wrong closure.
1169
- readPlatformServiceIndex: () =>
1170
- schemas.parsePlatformServiceSourceIndex(
1171
- JSON.parse(
1172
- readFileSync(
1173
- join(distributionsRoot, 'platform-service-index.json'),
1174
- 'utf8',
1175
- ),
1176
- ),
1177
- ),
1178
- platformSubjectKind: schemas.RuntimeImageSubjectKind.Platform,
1179
- composedProcessSubjectKind: schemas.RuntimeImageSubjectKind.ComposedProcess,
1180
- declaration: {
1181
- kind: subjectKind,
1182
- id: subjectId,
1183
- repo: sourceRepo,
1184
- path: sourcePath,
1185
- sourceCommit,
1186
- },
1187
- });
1188
- if (
1189
- declaredSourceManifestHash !== undefined &&
1190
- declaredSourceManifestHash !== source.sourceManifestHash
1191
- ) {
1192
- throw new Error(
1193
- `--source-manifest-hash "${String(declaredSourceManifestHash)}" does not match the ` +
1194
- `${source.sourceManifestHash} computed from ${sourceRepo}@${sourceCommit} — ` +
1195
- 'the declared source identity is not the one this manifest hashes',
1196
- );
1197
- }
1198
- if (
1199
- declaredSourceTreeHash !== undefined &&
1200
- declaredSourceTreeHash !== source.sourceTreeHash
1201
- ) {
1202
- throw new Error(
1203
- `--source-tree-hash "${String(declaredSourceTreeHash)}" does not match the ` +
1204
- `${source.sourceTreeHash} computed from the build-input closure of ` +
1205
- `${sourceRepo}@${sourceCommit} — the declared coordinate is not the one this source builds`,
1206
- );
1207
- }
1208
- const builder = deriveBuilder({ provenancePath, sourceCommit });
1209
- const artifact = await resolveImageArtifactEvidence({
1210
- imageRepository,
1211
- manifestDigest,
1212
- sourceTreeHash: source.sourceTreeHash,
1213
- referenceProvenance: builder.predicate,
1214
- distributionsRoot,
1215
- env,
1216
- fetchImpl,
1217
- registryFor,
1218
- });
1219
- const effectiveTtlSeconds = resolveProducerTtlSeconds({
1220
- ttlSeconds,
1221
- now,
1222
- ceiling: { source: ProducerTtlCeilingSource.TrustPolicy, maxTtlSeconds: readProducerTtlSeconds(distributionsRoot) },
1223
- });
1224
- const input = producerInputDocument({
1225
- contractAuthority,
1226
- context,
1227
- builder,
1228
- now,
1229
- ttlSeconds: effectiveTtlSeconds,
1230
- subject: {
1231
- kind: subjectKind,
1232
- id: subjectId,
1233
- repositoryUrl: source.repositoryUrl,
1234
- repo: sourceRepo,
1235
- path: sourcePath,
1236
- sourceCommit,
1237
- sourceManifestHash: source.sourceManifestHash,
1238
- sourceTreeHash: source.sourceTreeHash,
1239
- imageRepository,
1240
- ...artifact,
1241
- },
1242
- });
1243
- assertAssembledProducerInput({ input, schemas, contractAuthority, context });
1244
- return input;
1245
- }
1246
-
1247
- /**
1248
- * The producer input of ONE subject, in the exact shape
1249
- * `produce-image-source-evidence.mjs` accepts. `context` is
1250
- * {@link assertWorkflowContext}'s and `builder` {@link deriveBuilder}'s; the
1251
- * subject carries every per-subject field (source identity and artifact).
1252
- */
1253
- export function producerInputDocument({ contractAuthority, context, builder, now, ttlSeconds, subject }) {
1254
- return {
1255
- schemaVersion: 1,
1256
- contractAuthority: { ...contractAuthority },
1257
- sourceHashAlgorithm: imageInputSourceHashAlgorithm(),
1258
- producerWorkflowSha: context.sha,
1259
- signer: {
1260
- kind: oidcCertificateSignerKind(),
1261
- certificateIdentity: `https://github.com/${context.repository}/${context.path}@${context.ref}`,
1262
- oidcIssuer: 'https://token.actions.githubusercontent.com',
1263
- githubWorkflow: {
1264
- repository: context.repository,
1265
- ref: context.ref,
1266
- path: context.path,
1267
- },
1268
- },
1269
- builder: {
1270
- builderId: `https://github.com/${context.repository}/${context.path}`,
1271
- buildType: builder.buildType,
1272
- buildDefinitionDigest: builder.buildDefinitionDigest,
1273
- parametersDigest: builder.parametersDigest,
1274
- },
1275
- runId: context.runId,
1276
- runAttempt: context.runAttempt,
1277
- issuedAt: rfc3339(now),
1278
- expiresAt: rfc3339(now + ttlSeconds * 1000),
1279
- expectedSubjects: [`${subject.kind}:${subject.id}`],
1280
- subjects: [
1281
- {
1282
- kind: subject.kind,
1283
- id: subject.id,
1284
- repositoryUrl: subject.repositoryUrl,
1285
- repo: subject.repo,
1286
- path: subject.path,
1287
- sourceCommit: subject.sourceCommit,
1288
- sourceManifestHash: subject.sourceManifestHash,
1289
- sourceTreeHash: subject.sourceTreeHash,
1290
- imageRepository: subject.imageRepository,
1291
- manifestDigest: subject.manifestDigest,
1292
- manifestMediaType: subject.manifestMediaType,
1293
- platforms: subject.platforms,
1294
- sbomDigest: subject.sbomDigest,
1295
- provenanceDigest: subject.provenanceDigest,
1296
- },
1297
- ],
1298
- };
1299
- }
1300
-
1301
- /**
1302
- * Prove an assembled input satisfies the producer BEFORE anything reads it:
1303
- * the exact field contract, then the kernel statement schema the producer
1304
- * builds (the same parse produce-image-source-evidence.mjs runs before
1305
- * signing), then the GitHub context the producer compares against.
1306
- */
1307
- export function assertAssembledProducerInput({ input, schemas, contractAuthority, context }) {
1308
- assertProducerInput(input, contractAuthority);
1309
- buildImageSourceStatements(input, schemas, contractAuthority);
1310
- assertGitHubProducerContext(input, {
1311
- repository: context.repository,
1312
- ref: context.ref,
1313
- sha: context.sha,
1314
- workflowRef: context.workflowRef,
1315
- });
1316
- }
1317
-
1318
- /**
1319
- * The `--name value` pairs of an assembler's argv: each flag once, each with a
1320
- * value, none outside `known`.
1321
- */
1322
- export function readAssemblerFlags(args, known) {
1323
- const flags = new Map();
1324
- for (let index = 0; index < args.length; index += 2) {
1325
- const flag = args[index];
1326
- if (!flag.startsWith('--')) {
1327
- throw new Error(`unexpected argument "${flag}"`);
1328
- }
1329
- const name = flag.slice(2);
1330
- const value = args[index + 1];
1331
- if (value === undefined || value.startsWith('--')) {
1332
- throw new Error(`--${name} requires a value`);
1333
- }
1334
- if (flags.has(name)) {
1335
- throw new Error(`--${name} was given twice`);
1336
- }
1337
- flags.set(name, value);
1338
- }
1339
- for (const name of flags.keys()) {
1340
- if (!known.has(name)) {
1341
- throw new Error(`unknown option "--${name}"`);
1342
- }
1343
- }
1344
- return flags;
1345
- }
1346
-
1347
- /**
1348
- * Write an assembled input to `output`. The output directory is caller scratch
1349
- * space — created deterministically (the producer action's input-manifest
1350
- * must be repository-relative, so the caller cannot sidestep this by pointing
1351
- * at RUNNER_TEMP). `wx` refuses to overwrite an existing manifest.
1352
- */
1353
- export function writeProducerInputFile(output, input) {
1354
- mkdirSync(dirname(output), { recursive: true });
1355
- writeFileSync(output, serializeJson(input), { flag: 'wx', mode: 0o600 });
1356
- }
1357
-
1358
- function requireValue(flags, name) {
1359
- const value = flags.get(name);
1360
- if (value === undefined) {
1361
- throw new Error(`--${name} is required`);
1362
- }
1363
- return value;
1364
- }
1365
-
1366
- async function main() {
1367
- const args = configureEditionWorkspaceFromArgv(process.argv.slice(2), [
1368
- WorkspaceRoot.Data,
1369
- WorkspaceRoot.Sources,
1370
- WorkspaceRoot.Kernel,
1371
- ]);
1372
- const known = new Set([
1373
- 'output',
1374
- 'image-repository',
1375
- 'manifest-digest',
1376
- 'subject-kind',
1377
- 'subject-id',
1378
- 'source-repo',
1379
- 'source-path',
1380
- 'source-commit',
1381
- 'source-manifest-hash',
1382
- 'source-tree-hash',
1383
- 'provenance',
1384
- 'ttl-seconds',
1385
- ]);
1386
- const flags = readAssemblerFlags(args, known);
1387
- const output = resolve(requireValue(flags, 'output'));
1388
- const input = await assembleProducerInput({
1389
- imageRepository: requireValue(flags, 'image-repository'),
1390
- manifestDigest: requireValue(flags, 'manifest-digest'),
1391
- subjectKind: requireValue(flags, 'subject-kind'),
1392
- subjectId: requireValue(flags, 'subject-id'),
1393
- sourceRepo: requireValue(flags, 'source-repo'),
1394
- sourcePath: requireValue(flags, 'source-path'),
1395
- sourceCommit: requireValue(flags, 'source-commit'),
1396
- provenancePath: resolve(requireValue(flags, 'provenance')),
1397
- sourceManifestHash: flags.get('source-manifest-hash'),
1398
- sourceTreeHash: flags.get('source-tree-hash'),
1399
- ttlSeconds: producerTtlSecondsFlag(flags.get('ttl-seconds')),
1400
- });
1401
- writeProducerInputFile(output, input);
1402
- console.log(
1403
- `[assemble-producer-input] wrote ${output} for subject ` +
1404
- `${input.subjects[0].kind}:${input.subjects[0].id} ` +
1405
- `(${input.subjects[0].imageRepository}@${input.subjects[0].manifestDigest})`,
1406
- );
1407
- }
1408
-
1409
- if (isEntryModule(import.meta.url)) {
1410
- main().catch((error) => {
1411
- console.error(`[assemble-producer-input] ${error.message}`);
1412
- process.exitCode = 1;
1413
- });
1414
- }