@wildo-ai/platform-config-lib 1.1.11 → 1.1.13

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 (389) hide show
  1. package/dist/esm/_unimplemented/soft-warn.d.ts +24 -49
  2. package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -1
  3. package/dist/esm/_unimplemented/soft-warn.js +24 -49
  4. package/dist/esm/_unimplemented/soft-warn.js.map +1 -1
  5. package/dist/esm/blueprint/anchored-region.d.ts.map +1 -1
  6. package/dist/esm/blueprint/anchored-region.js.map +1 -1
  7. package/dist/esm/blueprint/blueprint.schemas.d.ts +0 -89
  8. package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -1
  9. package/dist/esm/blueprint/blueprint.schemas.js.map +1 -1
  10. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  11. package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
  12. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -1
  13. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -1
  14. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  15. package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
  16. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  17. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  18. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +8 -1
  19. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  20. package/dist/esm/bootstrap/bootstrap.schemas.js +15 -1
  21. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  22. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +10 -2
  23. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +10 -2
  25. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  26. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +21 -0
  27. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
  28. package/dist/esm/bootstrap/platform-store-preconnect.js +25 -0
  29. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -1
  30. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts +80 -0
  31. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts.map +1 -0
  32. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js +81 -0
  33. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js.map +1 -0
  34. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +41 -9
  35. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  36. package/dist/esm/bootstrap/runtime-backing-service-access.js +77 -28
  37. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  38. package/dist/esm/bootstrap/runtime-network-policy.d.ts +117 -12
  39. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  40. package/dist/esm/bootstrap/runtime-network-policy.js +222 -23
  41. package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -1
  42. package/dist/esm/bootstrap/runtime-network-topology.d.ts +31 -4
  43. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  44. package/dist/esm/bootstrap/runtime-network-topology.js +43 -2
  45. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  46. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -1
  47. package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -1
  48. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +40 -2
  49. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  50. package/dist/esm/bootstrap/runtime-principal.contracts.js +66 -3
  51. package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -1
  52. package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -1
  53. package/dist/esm/bootstrap/runtime-response-integrity.js +3 -3
  54. package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -1
  55. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -1
  56. package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -1
  57. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  58. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  59. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts.map +1 -1
  60. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  61. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -1
  62. package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -1
  63. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  64. package/dist/esm/config-authoring.entry.js.map +1 -1
  65. package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
  66. package/dist/esm/credentials/credential-generator.service.js.map +1 -1
  67. package/dist/esm/index.d.ts +5 -1
  68. package/dist/esm/index.d.ts.map +1 -1
  69. package/dist/esm/index.js +5 -1
  70. package/dist/esm/index.js.map +1 -1
  71. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts +119 -0
  72. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts.map +1 -0
  73. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js +109 -0
  74. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js.map +1 -0
  75. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts +182 -0
  76. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts.map +1 -0
  77. package/dist/esm/key-management/application-signing-key-rotation.contracts.js +145 -0
  78. package/dist/esm/key-management/application-signing-key-rotation.contracts.js.map +1 -0
  79. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts +156 -0
  80. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts.map +1 -0
  81. package/dist/esm/key-management/approval-seal-manifested-copy.js +617 -0
  82. package/dist/esm/key-management/approval-seal-manifested-copy.js.map +1 -0
  83. package/dist/esm/key-management/approval-seal-verifier.d.ts +114 -40
  84. package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -1
  85. package/dist/esm/key-management/approval-seal-verifier.js +143 -12
  86. package/dist/esm/key-management/approval-seal-verifier.js.map +1 -1
  87. package/dist/esm/key-management/approval-seal.contracts.d.ts +12 -15
  88. package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -1
  89. package/dist/esm/key-management/approval-seal.contracts.js +20 -0
  90. package/dist/esm/key-management/approval-seal.contracts.js.map +1 -1
  91. package/dist/esm/key-management/data-key.contracts.d.ts +0 -2
  92. package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -1
  93. package/dist/esm/key-management/data-key.contracts.js.map +1 -1
  94. package/dist/esm/key-management/es256-jws.d.ts.map +1 -1
  95. package/dist/esm/key-management/es256-jws.js.map +1 -1
  96. package/dist/esm/key-management/key-provider.spi.d.ts +8 -1
  97. package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -1
  98. package/dist/esm/key-management/key-provider.spi.js.map +1 -1
  99. package/dist/esm/key-management/keyring-rotation.contracts.d.ts +2 -12
  100. package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -1
  101. package/dist/esm/key-management/keyring-rotation.contracts.js +3 -3
  102. package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -1
  103. package/dist/esm/key-management/keyring-status.contracts.d.ts +0 -7
  104. package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -1
  105. package/dist/esm/key-management/keyring-status.contracts.js.map +1 -1
  106. package/dist/esm/key-management/pdf-incremental-update.d.ts +158 -0
  107. package/dist/esm/key-management/pdf-incremental-update.d.ts.map +1 -0
  108. package/dist/esm/key-management/pdf-incremental-update.js +730 -0
  109. package/dist/esm/key-management/pdf-incremental-update.js.map +1 -0
  110. package/dist/esm/key-management/pdf-truetype-font.d.ts +35 -0
  111. package/dist/esm/key-management/pdf-truetype-font.d.ts.map +1 -0
  112. package/dist/esm/key-management/pdf-truetype-font.js +152 -0
  113. package/dist/esm/key-management/pdf-truetype-font.js.map +1 -0
  114. package/dist/esm/key-management/qr-code.d.ts +38 -0
  115. package/dist/esm/key-management/qr-code.d.ts.map +1 -0
  116. package/dist/esm/key-management/qr-code.js +325 -0
  117. package/dist/esm/key-management/qr-code.js.map +1 -0
  118. package/dist/esm/key-management/signature-request.contracts.d.ts +0 -4
  119. package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -1
  120. package/dist/esm/key-management/signature-request.contracts.js.map +1 -1
  121. package/dist/esm/key-management/signing-log-export.contracts.d.ts +0 -1
  122. package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -1
  123. package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -1
  124. package/dist/esm/key-management/vault-custody.contracts.d.ts +43 -0
  125. package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -1
  126. package/dist/esm/key-management/vault-custody.contracts.js +66 -0
  127. package/dist/esm/key-management/vault-custody.contracts.js.map +1 -1
  128. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -1
  129. package/dist/esm/lockfile/build-parallelism.js.map +1 -1
  130. package/dist/esm/lockfile/canonical-json.d.ts +1 -1
  131. package/dist/esm/lockfile/canonical-json.d.ts.map +1 -1
  132. package/dist/esm/lockfile/canonical-json.js +1 -1
  133. package/dist/esm/lockfile/canonical-json.js.map +1 -1
  134. package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
  135. package/dist/esm/lockfile/file-lock-hold.js +2 -1
  136. package/dist/esm/lockfile/file-lock-hold.js.map +1 -1
  137. package/dist/esm/lockfile/lockfile-io.d.ts +6 -8
  138. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  139. package/dist/esm/lockfile/lockfile-io.js +6 -8
  140. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  141. package/dist/esm/lockfile/materialize-infra-section.d.ts +5 -6
  142. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  143. package/dist/esm/lockfile/materialize-infra-section.js +4 -5
  144. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  145. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +1 -247
  146. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  147. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +1 -1
  148. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  149. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts +146 -0
  150. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts.map +1 -0
  151. package/dist/esm/pnpm-settings/application-pnpm-settings.js +573 -0
  152. package/dist/esm/pnpm-settings/application-pnpm-settings.js.map +1 -0
  153. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
  154. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +15 -3
  155. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
  156. package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -1
  157. package/dist/esm/project-config/application-served-public-documents.loader.js +16 -8
  158. package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -1
  159. package/dist/esm/project-config/backend-compliance-section.reader.d.ts +35 -0
  160. package/dist/esm/project-config/backend-compliance-section.reader.d.ts.map +1 -0
  161. package/dist/esm/project-config/backend-compliance-section.reader.js +123 -0
  162. package/dist/esm/project-config/backend-compliance-section.reader.js.map +1 -0
  163. package/dist/esm/project-config/backend-compliance-section.worker.d.ts +20 -0
  164. package/dist/esm/project-config/backend-compliance-section.worker.d.ts.map +1 -0
  165. package/dist/esm/project-config/backend-compliance-section.worker.js +78 -0
  166. package/dist/esm/project-config/backend-compliance-section.worker.js.map +1 -0
  167. package/dist/esm/project-config/config-module-resolution.d.ts +32 -0
  168. package/dist/esm/project-config/config-module-resolution.d.ts.map +1 -0
  169. package/dist/esm/project-config/config-module-resolution.js +33 -0
  170. package/dist/esm/project-config/config-module-resolution.js.map +1 -0
  171. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  172. package/dist/esm/project-config/define-framework-config.js.map +1 -1
  173. package/dist/esm/project-config/define-infra-env-config.d.ts +146 -55
  174. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  175. package/dist/esm/project-config/define-infra-env-config.js +124 -71
  176. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  177. package/dist/esm/project-config/define-minion-config.d.ts +26 -36
  178. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  179. package/dist/esm/project-config/define-minion-config.js +64 -25
  180. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  181. package/dist/esm/project-config/define-saas-config.d.ts +41 -437
  182. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  183. package/dist/esm/project-config/define-saas-config.js +102 -94
  184. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  185. package/dist/esm/project-config/define-worker-config.d.ts +10 -20
  186. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  187. package/dist/esm/project-config/define-worker-config.js +10 -12
  188. package/dist/esm/project-config/define-worker-config.js.map +1 -1
  189. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
  190. package/dist/esm/project-config/hosted-infra-env-config.js +2 -1
  191. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
  192. package/dist/esm/project-config/index.d.ts +2 -0
  193. package/dist/esm/project-config/index.d.ts.map +1 -1
  194. package/dist/esm/project-config/index.js +2 -0
  195. package/dist/esm/project-config/index.js.map +1 -1
  196. package/dist/esm/project-config/loader-instances-zod.d.ts +19 -0
  197. package/dist/esm/project-config/loader-instances-zod.d.ts.map +1 -0
  198. package/dist/esm/project-config/loader-instances-zod.js +40 -0
  199. package/dist/esm/project-config/loader-instances-zod.js.map +1 -0
  200. package/dist/esm/project-config/loader.d.ts +131 -14
  201. package/dist/esm/project-config/loader.d.ts.map +1 -1
  202. package/dist/esm/project-config/loader.js +226 -12
  203. package/dist/esm/project-config/loader.js.map +1 -1
  204. package/dist/esm/project-config/minion-liveness.contracts.d.ts +131 -0
  205. package/dist/esm/project-config/minion-liveness.contracts.d.ts.map +1 -0
  206. package/dist/esm/project-config/minion-liveness.contracts.js +167 -0
  207. package/dist/esm/project-config/minion-liveness.contracts.js.map +1 -0
  208. package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -1
  209. package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -1
  210. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
  211. package/dist/esm/project-config/npm-version-range.js.map +1 -1
  212. package/dist/esm/project-config/owning-package-tsconfig.d.ts +7 -7
  213. package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -1
  214. package/dist/esm/project-config/owning-package-tsconfig.js +7 -7
  215. package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -1
  216. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -1
  217. package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
  218. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  219. package/dist/esm/project-config/provider-companion-discovery.js +3 -1
  220. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  221. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +71 -46
  222. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  223. package/dist/esm/project-config/provider-runtime-artifacts.js +150 -4
  224. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  225. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +0 -2
  226. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  227. package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -1
  228. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  229. package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
  230. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  231. package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
  232. package/dist/esm/project-config/shared/auth.schemas.d.ts +0 -17
  233. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  234. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  235. package/dist/esm/project-config/shared/backing-service-servability.d.ts.map +1 -1
  236. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -1
  237. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +9 -10
  238. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  239. package/dist/esm/project-config/shared/backing-services.schemas.js +13 -15
  240. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  241. package/dist/esm/project-config/shared/cdn.schemas.d.ts +0 -51
  242. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  243. package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -1
  244. package/dist/esm/project-config/shared/csp-defaults.d.ts +34 -6
  245. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  246. package/dist/esm/project-config/shared/csp-defaults.js +52 -8
  247. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
  248. package/dist/esm/project-config/shared/csp-emit.d.ts +60 -13
  249. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  250. package/dist/esm/project-config/shared/csp-emit.js +77 -24
  251. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  252. package/dist/esm/project-config/shared/csp.schemas.d.ts +72 -84
  253. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  254. package/dist/esm/project-config/shared/csp.schemas.js +40 -12
  255. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  256. package/dist/esm/project-config/shared/data-services.schemas.d.ts +0 -8
  257. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  258. package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
  259. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  260. package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
  261. package/dist/esm/project-config/shared/environment.schemas.d.ts +95 -8
  262. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  263. package/dist/esm/project-config/shared/environment.schemas.js +122 -10
  264. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  265. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +10 -4
  266. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  267. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  268. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -1
  269. package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -1
  270. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +1 -1
  271. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  272. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +1 -1
  273. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  274. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  275. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  276. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  277. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  278. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +20 -0
  279. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  280. package/dist/esm/project-config/shared/minion-resource-access.validation.js +21 -2
  281. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  282. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -1
  283. package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -1
  284. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +67 -38
  285. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -1
  286. package/dist/esm/project-config/shared/platform-key-management.schemas.js +113 -5
  287. package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -1
  288. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  289. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  290. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +2 -2
  291. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
  292. package/dist/esm/project-config/shared/platform-storage.schemas.js +16 -2
  293. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -1
  294. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +21 -23
  295. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  296. package/dist/esm/project-config/shared/service-definitions.schemas.js +4 -5
  297. package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
  298. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +0 -18
  299. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
  300. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -1
  301. package/dist/esm/project-config/static-asset-import-noop.d.ts +20 -3
  302. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -1
  303. package/dist/esm/project-config/static-asset-import-noop.js +36 -20
  304. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -1
  305. package/dist/esm/registry/artifact-domain.schemas.d.ts +0 -5
  306. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  307. package/dist/esm/registry/artifact-domain.schemas.js.map +1 -1
  308. package/dist/esm/registry/digest.schemas.d.ts.map +1 -1
  309. package/dist/esm/registry/digest.schemas.js.map +1 -1
  310. package/dist/esm/registry/index.d.ts +2 -3
  311. package/dist/esm/registry/index.d.ts.map +1 -1
  312. package/dist/esm/registry/index.js +2 -3
  313. package/dist/esm/registry/index.js.map +1 -1
  314. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
  315. package/dist/esm/registry/local-checkout-source.js.map +1 -1
  316. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +1 -98
  317. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  318. package/dist/esm/registry/lockfile-modules-section.schemas.js +1 -2
  319. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  320. package/dist/esm/registry/module-artifact.schemas.d.ts +17 -17
  321. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  322. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  323. package/dist/esm/registry/module-manifest.schemas.d.ts +151 -219
  324. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  325. package/dist/esm/registry/module-manifest.schemas.js +145 -13
  326. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  327. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
  328. package/dist/esm/registry/module-search.schemas.js.map +1 -1
  329. package/dist/esm/registry/registry-config.schemas.d.ts +0 -18
  330. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  331. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  332. package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -1
  333. package/dist/esm/registry/registry-defaults.constants.js.map +1 -1
  334. package/dist/esm/registry/registry-errors.d.ts +81 -3
  335. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  336. package/dist/esm/registry/registry-errors.js +185 -4
  337. package/dist/esm/registry/registry-errors.js.map +1 -1
  338. package/dist/esm/registry/registry-keys.schemas.d.ts.map +1 -1
  339. package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
  340. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  341. package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -1
  342. package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -1
  343. package/dist/esm/registry/registry-url-resolution.js.map +1 -1
  344. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  345. package/dist/esm/release/framework-release.constants.js.map +1 -1
  346. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  347. package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
  348. package/dist/esm/schemas/framework-secrets.schemas.d.ts +0 -7
  349. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  350. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  351. package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
  352. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  353. package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
  354. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +1 -1
  355. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  356. package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
  357. package/dist/esm/schemas/platform-config.schemas.d.ts +2 -2
  358. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  359. package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
  360. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -1
  361. package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -1
  362. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  363. package/dist/esm/workspace-scope/index.js.map +1 -1
  364. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  365. package/dist/esm/workspace-scope/resolve-homes.js.map +1 -1
  366. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  367. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  368. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
  369. package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
  370. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  371. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  372. package/dist/tsconfig.build.tsbuildinfo +1 -1
  373. package/package.json +12 -12
  374. package/dist/esm/_unimplemented/index.d.ts +0 -3
  375. package/dist/esm/_unimplemented/index.d.ts.map +0 -1
  376. package/dist/esm/_unimplemented/index.js +0 -3
  377. package/dist/esm/_unimplemented/index.js.map +0 -1
  378. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +0 -137
  379. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +0 -1
  380. package/dist/esm/_unimplemented/unimplemented-field-warning.js +0 -153
  381. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +0 -1
  382. package/dist/esm/project-config/shared/cdn.example.d.ts +0 -14
  383. package/dist/esm/project-config/shared/cdn.example.d.ts.map +0 -1
  384. package/dist/esm/project-config/shared/cdn.example.js +0 -38
  385. package/dist/esm/project-config/shared/cdn.example.js.map +0 -1
  386. package/dist/esm/project-config/shared/schema-version.schemas.d.ts +0 -15
  387. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +0 -1
  388. package/dist/esm/project-config/shared/schema-version.schemas.js +0 -40
  389. package/dist/esm/project-config/shared/schema-version.schemas.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.schemas.js","sourceRoot":"","sources":["../../../../src/bootstrap/bootstrap.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,EAE1C,4BAA4B,EAE5B,6BAA6B,EAC7B,mCAAmC,EAEnC,oCAAoC,EAEpC,gCAAgC,EAGhC,2BAA2B,EAE3B,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,GAM/B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCA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CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC;;;;;;;;OAQG;IACH,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC","sourcesContent":["import {\n AppConfiguration_Shared_AppIdentity_Schema,\n type AppConfiguration_Shared_AppIdentity,\n FrontendServicesConfigSchema,\n type FrontendServicesConfig,\n OrganizationTypesConfigSchema,\n OrganizationRelationshipKindsSchema,\n type OrganizationRelationshipKinds,\n ProfessionalQualificationKindsSchema,\n type ProfessionalQualificationKinds,\n KeyManagementConfigurationSchema,\n type KeyManagementConfiguration,\n type OrganizationTypesConfig,\n SystemsOfRecordConfigSchema,\n type SystemsOfRecordConfig,\n RuntimeEnvironment,\n} from '@wildo-ai/saas-models';\nimport { z } from 'zod';\nimport {\n EngineCapabilityActivationsSchema,\n MinionPlatformAccessCarriedSchema,\n MinionResourceAccessSchema,\n ProviderConfigurationsSchema,\n SaasConfigProvidersBlockSchema,\n type EngineCapabilityActivations,\n type MinionPlatformAccessCarried,\n type MinionResourceAccess,\n type ProviderConfigurations,\n type SaasConfigProvidersBlock,\n} from '../project-config/define-saas-config';\nimport {\n AppFrontendType,\n DataAccessSchema,\n ResourceLimitsSchema,\n WorkerRuntimeSchema,\n} from '../project-config/shared/service-definitions.schemas';\nimport {\n WorkerAuthSchema,\n WorkerHttpSchema,\n} from '../project-config/define-worker-config';\nimport { WildoAuthConfigSchema } from '../project-config/shared/auth.schemas';\nimport { DatabaseEngine } from '../project-config/shared/environment.schemas';\nimport { BackingServiceKind, BackingServiceSource } from '../project-config/shared/backing-services.schemas';\nimport type { BackingServiceProviderSelection } from '../project-config/shared/backing-service-servability';\n\n/**\n * Shared bootstrap execution mode.\n * The workflow semantics stay the same; only the executor differs.\n */\nexport enum BootstrapExecutorKind {\n LOCAL = 'local',\n REMOTE = 'remote',\n}\n\n/**\n * Shared bootstrap step identifiers.\n * These represent semantic workflow stages, not package-specific implementation details.\n */\nexport enum BootstrapStepId {\n INITIALIZE_PLATFORM = 'initialize-platform',\n ENSURE_APPLICATION = 'ensure-application',\n FETCH_BOOTSTRAP_CREDENTIALS = 'fetch-bootstrap-credentials',\n GENERATE_RUNTIME_ARTIFACTS = 'generate-runtime-artifacts',\n START_LOCAL_RUNTIME = 'start-local-runtime',\n}\n\n/**\n * Minimum bootstrap credentials required for an application backend to authenticate\n * with apps-manager and fetch its full runtime configuration.\n */\nexport const AppBootstrapCredentialsSchema = z.object({\n APPLICATION_ID: z.string().min(1),\n PLATFORM_APPLICATION_PRIMARY_SECRET: z.string().min(1),\n PLATFORM_APPS_MANAGER_URL: z.url(),\n APPLICATION_ENV: z.enum(RuntimeEnvironment),\n /**\n * The application's slug, carried beside the other identity keys because it becomes an env var on\n * every application runtime exactly as they do (#1177).\n *\n * It rides HERE rather than being threaded through each env builder's argument list because every\n * builder that needs it already receives this object — and because the envelope around it already\n * carries `appSlug`, so apps-manager has nothing new to look up.\n */\n APPLICATION_SLUG: z.string().min(1),\n});\n\n/**\n * Shared response envelope returned by apps-manager when bootstrap credentials are requested.\n * Both apps-manager and CLI should rely on this same contract.\n * `environment` / `APPLICATION_ENV` describe runtime semantics for the\n * bootstrapped application process, not the project-level remote environment id.\n */\nexport const AppBootstrapCredentialsResponseSchema = z.object({\n success: z.literal(true),\n appSlug: z.string().min(1),\n environment: z.enum(RuntimeEnvironment),\n credentials: AppBootstrapCredentialsSchema,\n});\n\nexport interface AdminAppManagedDeclaration {\n app: {\n name: string;\n slug: string;\n displayName: string;\n description?: string;\n type: 'saas';\n };\n frontendServices: Array<{\n serviceName: string;\n frontendType: AppFrontendType;\n }>;\n minions: Record<string, {\n resourceAccess?: MinionResourceAccess;\n /** R4/R5 — what this minion may read about ITSELF at the platform level. Absent ⇒ nothing. */\n platformAccess?: MinionPlatformAccessCarried;\n /** KD-12 — `'cron'` minions paired with a `schedule` produce MINION_TICK CronJob records. */\n mode?: 'always-up' | 'cron';\n schedule?: string;\n }>;\n workers: Record<string, {\n name: string;\n displayName: string;\n description?: string;\n runtime: {\n type: string;\n language: string;\n };\n http: {\n port: number;\n healthPath: string;\n readyPath: string;\n metricsPath?: string;\n };\n auth: 'wildo-jwt';\n replicas: number;\n resources?: {\n cpu?: string;\n memory?: string;\n };\n dataAccess?: {\n database?: 'read-only' | 'read-write' | 'none';\n cache?: boolean;\n queue?: 'consumer' | 'producer' | 'both' | 'none';\n };\n }>;\n engineCapabilities: EngineCapabilityActivations;\n providers: SaasConfigProvidersBlock;\n providerConfigurations: ProviderConfigurations;\n /** AUTHORITATIVE bucket — see `AdminAppManagedDeclarationSchema`. Required, at least one. */\n organizationTypes: OrganizationTypesConfig;\n /**\n * AUTHORITATIVE bucket — the application's declared systems of record (#1055). OPTIONAL, unlike its\n * sibling above: an application that reads nothing out of another system declares none.\n */\n systemsOfRecord?: SystemsOfRecordConfig;\n /** AUTHORITATIVE bucket — the relationship kinds between the organization types (#2722). OPTIONAL: none means no relationships. */\n organizationRelationships?: OrganizationRelationshipKinds;\n /** AUTHORITATIVE bucket — the professional qualification kinds the application recognizes (#2967). OPTIONAL: none means no decision requires one. */\n professionalQualificationKinds?: ProfessionalQualificationKinds;\n /**\n * AUTHORITATIVE bucket — which provider and key serve each key purpose (#2891). OPTIONAL: a purpose with no binding is\n * served by the engine's LOCAL provider, application-scoped. apps-manager, the custodian, resolves the keyring a signature\n * is made with from THIS stored copy, never from the request.\n */\n keyManagement?: KeyManagementConfiguration;\n}\n\n/**\n * The managed minion inventory as it travels the apps-manager wire — the ONE runtime source for\n * that block, in both directions.\n *\n * ## Why this is exported rather than module-private\n *\n * It is reached at three places in this file (`AdminAppManagedDeclarationSchema` for the CLI's\n * declaration, `AppBootstrapConfigMetadataResponseSchema` for what a backend fetches at boot), and\n * — since 2026-09-09 — by the application backend's configuration loader in\n * `@wildo-ai/saas-backend-lib`, which used to re-declare the block by hand.\n *\n * That hand copy is the reason this export exists, and the cost is measured rather than\n * hypothetical. A consumer-side copy of a wire block is parsed with Zod's strip-unknown semantics,\n * so a field added HERE and not mirrored THERE does not fail — it is silently deleted from the\n * payload on the way in. It happened twice: `mode` / `schedule` (the KD-12 cron-tick path, which\n * left every scheduled minion's MINION_TICK CronJob registration dead in production while the wire\n * carried the data correctly) and then `platformAccess`, added the same way and stripped the same\n * way. Neither surfaced as an error anywhere.\n *\n * Exporting the block costs nothing: `@wildo-ai/platform-config-lib`'s root index already\n * re-exports this module, and the engine already imports that root, so no consumer's module graph\n * changes — only the number of hand-maintained copies of this shape does.\n *\n * The engine keeps its OWN `AppConfiguration_MinionsSchema` (a `strictObject` typed against a named\n * interface, for the TS7056 serialization-ceiling reason documented there) and does NOT collapse\n * onto this one. The two are held in step by a mechanical field-parity pin in\n * `engine/saas-backend-lib/src/config/__tests__/managed-runtime-inventory-parity.backend.test.ts`,\n * so the remaining duplication cannot drift in silence the way this one did.\n */\nexport const AdminAppManagedMinionsSchema = z.record(\n z.string().min(1),\n z.object({\n resourceAccess: MinionResourceAccessSchema.optional(),\n /**\n * R4/R5 platform-access axis. Independent of `resourceAccess` (D12) — a\n * minion may hold either, both, or neither. apps-manager reads this to\n * decide whether to mint a principal-scoped attestation at all, and\n * `buildOwnCronRecordFilter` reads it to decide whether the minion has any\n * subject to query WITH, so a field dropped here confers nothing no matter\n * what the author wrote.\n */\n platformAccess: MinionPlatformAccessCarriedSchema.optional(),\n /**\n * KD-12 cron-tick path. When `mode === 'cron'` and `schedule` is\n * provided, the backend-api's `cron-job-sync.backend.service.ts`\n * registers a `MINION_TICK` CronJob record on\n * `platform-crontabs-batches-manager` so the per-minion queue\n * (`wildo.queue.{appId}.minion-tick.{minionName}`) actually fires\n * on schedule.\n */\n mode: z.enum(['always-up', 'cron']).optional(),\n schedule: z.string().min(1).optional(),\n }),\n).default({});\n\n/**\n * The managed worker inventory as it travels the apps-manager wire. Exported for the same reason as\n * `AdminAppManagedMinionsSchema` above, and held in step with the engine's\n * `AppConfiguration_WorkersSchema` by the same parity pin — read that JSDoc before changing either.\n */\nexport const AdminAppManagedWorkersSchema = z.record(\n z.string().min(1),\n z.object({\n name: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n runtime: WorkerRuntimeSchema,\n http: WorkerHttpSchema,\n auth: WorkerAuthSchema,\n replicas: z.number().int().positive(),\n resources: ResourceLimitsSchema.optional(),\n dataAccess: DataAccessSchema.optional(),\n }),\n).default({});\n\n/**\n * Admin-side projection of `wildo.saas.config.ts` carried from the CLI to\n * apps-manager at app initialization / re-apply time.\n *\n * Cross-bucket trust asymmetry (Slice 3 closeout):\n * Fields in this schema fall into TWO TRUST BUCKETS that the apps-manager\n * treats differently:\n *\n * 1. AUTHORITATIVE bucket (always honored, write-through):\n * - `app.name` / `app.slug` / `app.displayName` / `app.description`\n * — `appIdentity` core (F-53 swap: `app.name` is the canonical\n * identifier, `app.displayName` is the UI label only).\n * - `frontendServices` — frontend service registry (consumed by\n * `_merge_WildoApplicationConfig` to materialise endpoints).\n * - `minions` — minion runtime inventory, currently carrying the\n * per-minion `resourceAccess` authority whitelist used by\n * `start-minion-application`.\n * - `workers` — worker runtime inventory persisted by apps-manager so\n * the control-plane can validate worker identity and serve the\n * worker bootstrap contract without re-reading authored files.\n * - `engineCapabilities`, `providers`, and `providerConfigurations`\n * — the provider runtime graph and its non-secret settings.\n * - `organizationTypes` — the tenancy model (#1032, 2026-09-14). It\n * joined this bucket rather than staying backend-authored because\n * apps-manager SEEDS the first administrator's organization and must\n * derive that organization's type from these declarations; the\n * backend cannot publish what the platform needs before the backend\n * exists. Write-through like its siblings: the stored config is\n * replaced by the declaration on every init and re-apply.\n * - `systemsOfRecord` — the named instances of the systems this\n * application reads its own business rows out of (#1055). It is in\n * this bucket because the environment-variable names carrying each\n * instance's address and secrets are DERIVED from the declaration,\n * and the platform and the CLI derive them too — so the declaration,\n * not a backend-authored copy, has to be what travels.\n * - `organizationRelationships` — the relationship kinds between the\n * organization types (#2722). In this bucket because it is a statement\n * about the types above: a backend-authored copy could admit a pair of\n * types the declaration never named.\n *\n * 2. POLICY bucket (governed by override semantics):\n * - currently empty for provider registration. Capability activation\n * is authored as `engineCapabilities`, while provider routing is\n * materialized into `providers`.\n *\n * What is intentionally NOT here (out of bucket):\n * - JWT TTLs (`accessTokenExpirationMinutes`/`refreshTokenExpirationDays`)\n * travel via the SIBLING field `serviceAuth` on the request envelope\n * (see `AdminAppInitializeRequestSchema.serviceAuth`), NOT here.\n * This separation reflects that JWT TTLs are infra-environment policy\n * sourced from `wildo.infra.<env>.config.ts`, while\n * `managedDeclaration` projects the application-level\n * `wildo.saas.config.ts`.\n * - `dataServices.*` (Redis key prefix, S3 bucket prefix, etc.) — these\n * flow through `PlatformEnvConfigJson` env wiring, not the admin\n * declaration. The declaration carries application-level semantics\n * only.\n *\n * If you ADD a field, decide explicitly which bucket it belongs to and\n * document it in the merge service's JSDoc — silently widening the\n * declaration without consumer-side handling is the documented failure\n * mode this comment exists to prevent.\n */\nexport const AdminAppManagedDeclarationSchema = z.object({\n app: z.object({\n name: z.string().min(1),\n slug: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n type: z.literal('saas'),\n }),\n frontendServices: z.array(z.object({\n serviceName: z.string().min(1),\n frontendType: z.enum(AppFrontendType),\n })).default([]),\n minions: AdminAppManagedMinionsSchema,\n workers: AdminAppManagedWorkersSchema,\n engineCapabilities: EngineCapabilityActivationsSchema,\n providers: SaasConfigProvidersBlockSchema,\n providerConfigurations: ProviderConfigurationsSchema,\n organizationTypes: OrganizationTypesConfigSchema,\n systemsOfRecord: SystemsOfRecordConfigSchema.optional(),\n organizationRelationships: OrganizationRelationshipKindsSchema.optional(),\n professionalQualificationKinds: ProfessionalQualificationKindsSchema.optional(),\n keyManagement: KeyManagementConfigurationSchema.optional(),\n}) as z.ZodType<AdminAppManagedDeclaration>;\n\n/**\n * WHEN an application's OWN database gets its bootstrap rows, relative to the schema those rows need.\n *\n * ## The circularity this vocabulary exists to break\n *\n * On MongoDB, seeding an application's database needed no schema — a collection springs into being on\n * first write — so provisioning could create the database and its first rows in one uninterrupted\n * step. PostgreSQL removed that luxury and exposed a genuine cycle that had always been latent:\n *\n * - apps-manager seeds the application's database during provisioning;\n * - those rows need tables, which come from the application's OWN `migrations/` directory;\n * - those migrations are applied by the application backend at boot\n * (`applyStartupPostgresMigrations`, the production door);\n * - and the backend cannot boot until it is seeded, because its execution-context creator requires\n * exactly one APPLICATION row.\n *\n * Nothing inside that circle can break it. apps-manager cannot read the application's migration files\n * — in production they ship inside the application's own image — and the backend cannot supply the\n * seed, which is authored in `wildo.saas.config.ts`. Only the DEPLOY TOOLING holds both, which is why\n * this is a two-phase contract rather than a retry, a tolerance, or a longer timeout.\n *\n * Observed 2026-08-23 on the first PostgreSQL install: provisioning aborted with\n * `relation \"applications\" does not exist`, and `wildo local dev` failed. The same order holds on\n * every lane, so per-application PostgreSQL provisioning had never completed anywhere.\n *\n * ## Why a request field rather than an inferred tolerance\n *\n * Making apps-manager silently skip seeding when the schema happens to be absent would be a\n * fail-open: provisioning would report success having left the application unbootable, and the caller\n * would have no way to tell a deferred seed from a completed one. The caller states its intent, and\n * the response states what happened — see {@link AppDatabaseSeedingOutcome}.\n */\nexport enum AppDatabaseSeedingPhase {\n /**\n * Seed now. The default, and the ONLY behaviour any pre-2026-08-23 caller can produce, so every\n * MongoDB lane and every older CLI is unchanged.\n */\n REQUIRED = 'REQUIRED',\n /**\n * Provision infrastructure and platform records, but do NOT seed the application's own database —\n * the caller is about to create its schema and will then re-invoke with {@link REQUIRED}.\n */\n DEFERRED = 'DEFERRED',\n}\n\n/**\n * What provisioning actually DID about the application's own bootstrap rows.\n *\n * Reported so a caller can never mistake a deferred seed for a completed one. The CLI treats\n * {@link DEFERRED} as expected on its first phase and FATAL on its second — an application that is\n * still unseeded after its migrations have been applied is a defect, not a state to tolerate.\n */\nexport enum AppDatabaseSeedingOutcome {\n /** Bootstrap rows exist in the application's own database. */\n SEEDED = 'SEEDED',\n /** Skipped because the caller asked for {@link AppDatabaseSeedingPhase.DEFERRED}. */\n DEFERRED = 'DEFERRED',\n /**\n * Skipped because the application has no resolved persistence target. Distinct from\n * {@link DEFERRED}: nothing the caller does next will seed it — the target itself is missing.\n */\n NO_PERSISTENCE_TARGET = 'NO_PERSISTENCE_TARGET',\n}\n\nexport const AppBootstrapFirstAdminSeedSchema = z.object({\n userTypes: z.array(z.string().min(1)).min(1),\n});\n\nconst AppBootstrapRotatedPublicKeyEntrySchema = z.object({\n kid: z.string().min(1),\n publicKey: z.string().min(1),\n /** Last observation/token instant this retired key may authenticate. */\n notAfter: z.coerce.date().optional(),\n});\n\nexport interface AppBootstrapConfigMetadataResponse {\n appSlug: string;\n appIdentity?: AppConfiguration_Shared_AppIdentity;\n frontendServices?: FrontendServicesConfig;\n minions?: Record<string, {\n resourceAccess?: MinionResourceAccess;\n /** R4/R5 — what this minion may read about ITSELF at the platform level. Absent ⇒ nothing. */\n platformAccess?: MinionPlatformAccessCarried;\n /** KD-12 — `'cron'` minions paired with a `schedule` produce MINION_TICK CronJob records. */\n mode?: 'always-up' | 'cron';\n schedule?: string;\n }>;\n workers?: Record<string, {\n name: string;\n displayName: string;\n description?: string;\n runtime: {\n type: string;\n language: string;\n };\n http: {\n port: number;\n healthPath: string;\n readyPath: string;\n metricsPath?: string;\n };\n auth: 'wildo-jwt';\n replicas: number;\n resources?: {\n cpu?: string;\n memory?: string;\n };\n dataAccess?: {\n database?: 'read-only' | 'read-write' | 'none';\n cache?: boolean;\n queue?: 'consumer' | 'producer' | 'both' | 'none';\n };\n }>;\n engineCapabilities?: EngineCapabilityActivations;\n providers?: SaasConfigProvidersBlock;\n /** The application's organization types, as its declaration stored them (#1032). See the schema field. */\n organizationTypes?: OrganizationTypesConfig;\n /** The application's systems of record, as its declaration stored them (#1055). See the schema field. */\n systemsOfRecord?: SystemsOfRecordConfig;\n /** The application's relationship kinds, as its declaration stored them (#2722). See the schema field. */\n organizationRelationships?: OrganizationRelationshipKinds;\n /** The application's professional qualification kinds, as its declaration stored them (#2967). See the schema field. */\n professionalQualificationKinds?: ProfessionalQualificationKinds;\n email?: {\n isTransactionalWildoManaged: boolean;\n isMarketingWildoManaged: boolean;\n };\n providerConfigurations: ProviderConfigurations;\n jwt?: {\n publicKey: Record<string, string>;\n rotatedPublicKeys?: Record<string, Array<z.infer<typeof AppBootstrapRotatedPublicKeyEntrySchema>>>;\n accessTokenExpirationMinutes: number;\n refreshTokenExpirationDays: number;\n };\n}\n\nexport const AppBootstrapConfigMetadataResponseSchema = z.object({\n appSlug: z.string().min(1),\n appIdentity: AppConfiguration_Shared_AppIdentity_Schema.optional(),\n frontendServices: FrontendServicesConfigSchema.optional(),\n minions: AdminAppManagedMinionsSchema.optional(),\n workers: AdminAppManagedWorkersSchema.optional(),\n engineCapabilities: EngineCapabilityActivationsSchema.optional(),\n providers: SaasConfigProvidersBlockSchema.optional(),\n /**\n * The application's organization types (#1032). A running backend refuses to start without them, and this\n * response is the only road from the stored declaration to the backend — so a section missing HERE is not\n * rejected, it is deleted between apps-manager and the application, and the backend refuses a configuration\n * whose stored document is correct. That is what happened the first time the refusal met a real stack.\n * Optional on the wire because a stored document written before the declaration carried it still answers.\n */\n organizationTypes: OrganizationTypesConfigSchema.optional(),\n /**\n * The application's systems of record (#1055). Declared HERE for the same reason as its sibling\n * above, and it is the reason worth repeating: every schema on this road is a plain `z.object`, so a\n * section missing here is not rejected — it is DELETED between apps-manager and the application, and\n * the backend then boots believing the application declares none.\n */\n systemsOfRecord: SystemsOfRecordConfigSchema.optional(),\n /** The application's relationship kinds (#2722). Declared here for the same reason: an undeclared section is deleted on this road. */\n organizationRelationships: OrganizationRelationshipKindsSchema.optional(),\n /** The application's professional qualification kinds (#2967). Declared here for the same reason. */\n professionalQualificationKinds: ProfessionalQualificationKindsSchema.optional(),\n email: z.object({\n isTransactionalWildoManaged: z.boolean(),\n isMarketingWildoManaged: z.boolean(),\n }).optional(),\n providerConfigurations: ProviderConfigurationsSchema,\n jwt: z.object({\n publicKey: z.record(z.string(), z.string()),\n rotatedPublicKeys: z.record(\n z.string(),\n z.array(AppBootstrapRotatedPublicKeyEntrySchema),\n ).optional(),\n /**\n * Operator-authored JWT TTLs (Slice 3.3 hardening, F-24 / closeout).\n *\n * Sourced from `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,\n * refreshTokenExpirationDays}` (which itself was seeded from\n * `serviceAuth` in `wildo.infra.<env>.config.ts` at apps-manager init\n * time, falling back to `WildoAuthConfigSchema` defaults of 15 min /\n * 30 days when omitted \\u2014 access-token default tightened from 60\n * \\u2192 15 in Auth-hardening Slice A Step 5 on 2026-04-13; see the\n * file-level JSDoc on `auth.schemas.ts` for the threat-model rationale).\n * The application backend MUST consume these values at sign time\n * (`AuthTokenIssuerBackendService.issueAccessToken`,\n * `JwtBackendService.createRefreshToken`) instead of falling back to\n * developer-authored constants in `saas-config.backend.ts`.\n *\n * REQUIRED on the response (Slice 3 closeout): `_getDefault_WildoApplicationConfig`\n * always seeds these via `WildoAuthConfigSchema.parse(serviceAuth ?? {})`\n * (15 min / 30 days defaults), so any persisted\n * `Wildo_Application_Config.jwt` block has both fields populated.\n * Marking them required here lets the consumer\n * (`app-configuration-loader.backend.service.ts`) drop the\n * `accessTokenExpirationMinutes !== undefined ? ... : {}` defensive\n * spread and treat them as guaranteed values.\n */\n accessTokenExpirationMinutes: z.number().int().positive(),\n refreshTokenExpirationDays: z.number().int().positive(),\n }).optional(),\n}) as z.ZodType<AppBootstrapConfigMetadataResponse>;\n\nexport interface AppWorkerBootstrapResponse {\n appSlug: string;\n workerName: string;\n worker: z.infer<typeof AdminAppManagedWorkersSchema>[string];\n jwt: {\n publicKey: string;\n rotatedPublicKeys?: Array<z.infer<typeof AppBootstrapRotatedPublicKeyEntrySchema>>;\n };\n}\n\nexport const AppWorkerBootstrapResponseSchema = z.object({\n appSlug: z.string().min(1),\n workerName: z.string().min(1),\n worker: z.object({\n name: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n runtime: WorkerRuntimeSchema,\n http: WorkerHttpSchema,\n auth: WorkerAuthSchema,\n replicas: z.number().int().positive(),\n resources: ResourceLimitsSchema.optional(),\n dataAccess: DataAccessSchema.optional(),\n }),\n jwt: z.object({\n publicKey: z.string().min(1),\n rotatedPublicKeys: z.array(AppBootstrapRotatedPublicKeyEntrySchema).optional(),\n }),\n}) as z.ZodType<AppWorkerBootstrapResponse>;\n\ntype WildoAuthConfig = z.infer<typeof WildoAuthConfigSchema>;\n\n/**\n * Where ONE application's broker and object storage live, as its environment authored them (#1107).\n *\n * ## Why apps-manager has to be TOLD\n *\n * Both values are authored per application — `backingServices.rabbitmq.vhost` and\n * `backingServices.s3.bucket` in `wildo.infra.<env>.config.ts` — and the CLI writes them into that\n * application's own backend env. apps-manager, which provisions the vhost grant and issues the storage\n * credential, used to read them from its OWN process env instead. That env is generated from whichever\n * application last ran a full `wildo local init`, so every other application registered on the same\n * platform (`wildo local init --register-only`) had its broker principal granted on the owner's vhost\n * and its storage credential confined to the owner's bucket, while its backend connected to its own:\n * a vhost that did not exist and a bucket nobody had created.\n *\n * ## The same projection as the application's env, by construction\n *\n * The CLI derives this with the one function that also writes `RABBITMQ_VHOST` / `STORAGE_BUCKET` into\n * the application backend env, so the value apps-manager provisions and the value the backend connects\n * with cannot be two spellings of one fact.\n *\n * ## Absence is refused, never substituted\n *\n * apps-manager refuses to provision a vhost grant or issue a storage credential for an application whose\n * addressing it was never told, naming the remedy (register the application again). Substituting its own\n * env would be this defect with a warning attached. Every `wildo local dev` start registers the\n * application before its backends spawn, so a recorded addressing is always in place by the time a backend\n * asks. `rabbitmqVhost` absent inside a sent object is different: the application authored no vhost and\n * uses the broker's default vhost `/`.\n */\nexport interface ApplicationBackingServiceAddressing {\n /** The authored broker virtual host. Absent means the default vhost `/`. */\n rabbitmqVhost?: string;\n /** The object-storage bucket the application backend reads and writes. Always known: it has a projected default. */\n objectStorageBucket: string;\n /**\n * Which provider serves each backing service the application's environment DECLARES (#1692). See\n * {@link ApplicationBackingServiceProviderDeclarations}.\n */\n declaredProviders?: ApplicationBackingServiceProviderDeclarations;\n}\n\n/**\n * The `(source, provider)` pair each backing-service kind declares in the environment an application registers\n * in — its `backingServices` block, reduced to the half that decides WHICH SERVER serves it (#1692).\n *\n * ## Why apps-manager has to be told\n *\n * apps-manager mints every backing-service credential an application receives. It used to choose the provider\n * from its OWN environment — MongoDB Atlas when an Atlas API key happened to be configured, self-hosted\n * otherwise — and minted Redis and RabbitMQ on the platform's own servers unconditionally. So an application\n * declaring `redis: { source: MANAGED }` got no Valkey workload (the generators honour `source`) and a Redis\n * ACL user on the PLATFORM's Redis: a credential for a server it never connects to. The catalogue of provider\n * modules could not change that either, because nothing selected a module from what the application declared.\n * This is the same \"apps-manager read its own env instead of being told\" defect as the vhost and bucket above.\n *\n * ## Why the DECLARATION travels, not the resolved `InfraProvider`\n *\n * apps-manager resolves each entry with the SAME `resolveInfraProvider` the lockfile's infra section uses, so\n * the provider it dispatches on and the provider the lockfile records are one function's answer. Sending the\n * resolved provider instead would make a declaration that resolves to NOTHING — `redis: { source: MANAGED }`\n * has no `InfraProvider` member — indistinguishable from a kind that is not declared, and \"not declared\" keeps\n * the old behaviour, which is exactly the platform-server mint this contract exists to end. Carrying the pair\n * keeps \"declared, unservable\" representable so apps-manager can REFUSE it, naming what was declared.\n *\n * ## The meanings of absence\n *\n * - The whole map absent (a CLI predating #1692, or the platform's own application registered by INIT mode):\n * every kind keeps its previous behaviour.\n * - One kind absent from a sent map (the environment does not declare it): that kind alone keeps its previous\n * behaviour — self-hosted on the platform's own server, and for MongoDB Atlas-when-configured.\n *\n * ## A declaration is environment-wide; a mint is per application\n *\n * `backingServices` describes the environment, including stores only the PLATFORM uses (a self-hosted MongoDB\n * beside a PostgreSQL application, say). So apps-manager checks admin credentials only for the kinds it mints\n * for THIS application; a declared kind the application does not consume is checked only against the\n * catalogue, which the CLI has already done offline (#1693).\n */\nexport type ApplicationBackingServiceProviderDeclarations = Partial<Record<BackingServiceKind, BackingServiceProviderSelection>>;\n\nconst BackingServiceProviderSelectionSchema = z.object({\n source: z.enum(BackingServiceSource),\n provider: z.string().min(1).optional(),\n}).strict();\n\n/** Keyed by {@link BackingServiceKind}, total over it, each entry optional — see the type above. */\nexport const ApplicationBackingServiceProviderDeclarationsSchema = z.object(\n Object.fromEntries(\n Object.values(BackingServiceKind).map((kind) => [kind, BackingServiceProviderSelectionSchema.optional()]),\n ) as Record<BackingServiceKind, z.ZodOptional<typeof BackingServiceProviderSelectionSchema>>,\n).strict() as z.ZodType<ApplicationBackingServiceProviderDeclarations>;\n\nexport const ApplicationBackingServiceAddressingSchema = z.object({\n rabbitmqVhost: z.string().min(1).optional(),\n objectStorageBucket: z.string().min(1),\n declaredProviders: ApplicationBackingServiceProviderDeclarationsSchema.optional(),\n}).strict() as z.ZodType<ApplicationBackingServiceAddressing>;\n\nexport interface AdminAppInitializeRequest {\n name?: string;\n appDatabaseName?: string;\n override?: boolean;\n userEmail: string;\n userFirstName: string;\n userLastName: string;\n userPassword?: string;\n /**\n * The SECOND administrator (#575), when the deployment states one.\n *\n * `applicationAccessGrants.approve` is gated on `APP_ADMIN_SUPER_ADMIN` and refuses an approver\n * equal to the requester, with no auto-approval branch — so an application seeded with ONE\n * super-administrator cannot read any application-wide surface at all. Provisioning is where the\n * second one has to come from; nothing later mints it.\n *\n * ALL FOUR OR NONE. A partial set is an operator mistake rather than a request to fall back, and\n * the same reading `init.command.ts` already applies to partial `--admin-*` flags. Enforced by\n * `assertApproverIdentityIsWholeOrAbsent` at every door that reads one.\n */\n approverEmail?: string;\n approverFirstName?: string;\n approverLastName?: string;\n approverPassword?: string;\n managedDeclaration: AdminAppManagedDeclaration;\n /**\n * The application's own persistence engine — see the field's JSDoc on the schema below for why it\n * exists at all.\n *\n * ⚠️ This interface and that schema are TWO declarations of ONE contract, joined by the\n * `as z.ZodType<AdminAppInitializeRequest>` cast. The cast means a field added to only the schema\n * type-checks perfectly while being invisible to every CONSUMER — which is exactly what happened on\n * 2026-08-19: apps-manager's controller could not read `applicationDatabase` off a parsed request\n * though the schema accepted it. Add to BOTH, always.\n */\n applicationDatabase?: { engine: DatabaseEngine; databaseName?: string };\n firstAdminSeed?: AppBootstrapFirstAdminSeed;\n /**\n * WHEN to seed this application's own database. Absent means\n * {@link AppDatabaseSeedingPhase.REQUIRED} — see that enum for why the phase is stated rather\n * than inferred.\n */\n appDatabaseSeeding?: AppDatabaseSeedingPhase;\n serviceAuth?: WildoAuthConfig;\n /** See {@link ApplicationBackingServiceAddressing}. Interface AND schema, always. */\n backingServiceAddressing?: ApplicationBackingServiceAddressing;\n}\n\n/**\n * Shared admin request payload for a single app initialization.\n *\n * This describes the control-plane contract, independently of whether the\n * caller is the CLI or a future CI/CD executor.\n *\n * Required-by-contract fields:\n * - `managedDeclaration` — the projection of `wildo.saas.config.ts` that\n * seeds frontend services, capability policy, and external providers.\n * Omitting it would silently half-bootstrap an app, so the admin HTTP\n * boundary rejects requests without it.\n * - `userEmail` / `userFirstName` / `userLastName` — admin identity for\n * the seeded super-admin user. The previous implementation defaulted\n * these to a developer's personal identity, silently bypassing the\n * downstream `validateInitializationOptions` validation; that bypass\n * is now closed at the contract boundary.\n *\n * Optional-by-design fields:\n * - `userPassword` — the service auto-generates a secure password when\n * omitted (intentional one-shot bootstrap affordance).\n * - `name` / `appDatabaseName` / `override` / `firstAdminSeed` — caller\n * overrides; sensible defaults exist downstream.\n */\nexport const AdminAppInitializeRequestSchema = z.object({\n name: z.string().min(1).optional(),\n appDatabaseName: z.string().min(1).optional(),\n override: z.boolean().optional(),\n userEmail: z.email(),\n userFirstName: z.string().min(1),\n userLastName: z.string().min(1),\n userPassword: z.string().min(1).optional(),\n /**\n * The SECOND administrator (#575). Declared on BOTH the interface above and this schema — the\n * `as z.ZodType<AdminAppInitializeRequest>` cast means a field added to only one of them\n * type-checks perfectly and is invisible to every consumer, which is exactly what happened to\n * `applicationDatabase` on 2026-08-19.\n */\n approverEmail: z.email().optional(),\n approverFirstName: z.string().min(1).optional(),\n approverLastName: z.string().min(1).optional(),\n approverPassword: z.string().min(1).optional(),\n managedDeclaration: AdminAppManagedDeclarationSchema,\n /**\n * Which store this application's own resources persist to — mirrored from the authored\n * `applicationDatabase` in `wildo.infra.<env>.config.ts`, and carried under the SAME name so the\n * value is traceable end to end by one word.\n *\n * ## Why this field had to be added\n *\n * apps-manager already held the entire per-application PostgreSQL path: `mintAppCredentials`\n * provisioning the database, role and password, plus the `defaultAdapter` and `resourceIdFormat`\n * branches of the stored application config. All three were gated on\n * `WildoApplicationInitOptions.usePostgreSQL`, and on 2026-08-19 a repo-wide search found that flag\n * had FOUR mentions in the whole codebase — one declaration and three reads, in a single file.\n * **Nothing ever set it.**\n *\n * So the capability had no door. `backingServices.postgresql` had been authored for some time and\n * no application role ever appeared in `pg_roles`, because the declaration had no path to the\n * provisioner. This field is that path.\n *\n * OPTIONAL on the wire, and absence means POSTGRESQL — resolved by `resolveApplicationDatabaseEngine`\n * on the receiving side (#1571), the same answer the CLI gives. The current CLI always sends the\n * resolved engine; absence reaches apps-manager only from an older CLI or another door.\n */\n applicationDatabase: z.object({\n engine: z.enum(DatabaseEngine),\n /**\n * The AUTHORED database name, from `backingServices.postgresql.database`.\n *\n * Sent because two sources were naming this database and disagreeing: the provisioner derives\n * `wildo_<sanitized-slug>` while `env-vars-builder` emits the authored name as\n * `POSTGRESQL_DATABASE`. On 2026-08-19 that produced `wildo_wonder_todos` (owned by the app role)\n * beside `wonder-todos-db` (what the backend was told to connect to) — both empty, so the\n * application would have opened a database it did not own while its grants landed elsewhere.\n *\n * The authored value wins: it is the git-borne declaration, it is what the env already carries,\n * and the provisioner has always accepted an override — the caller simply never passed one.\n */\n databaseName: z.string().min(1).optional(),\n }).optional(),\n firstAdminSeed: AppBootstrapFirstAdminSeedSchema.optional(),\n /**\n * WHEN to seed this application's own database — see {@link AppDatabaseSeedingPhase}.\n *\n * OPTIONAL, and absence means `REQUIRED`, so a CLI that predates the two-phase contract keeps\n * exactly the single-phase behaviour every MongoDB application already has.\n */\n appDatabaseSeeding: z.enum(AppDatabaseSeedingPhase).optional(),\n /**\n * Authored `serviceAuth` projection from `wildo.infra.<env>.config.ts`,\n * threaded by the CLI so apps-manager can seed\n * `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,\n * refreshTokenExpirationDays}` from the operator's policy instead of a\n * hardcoded constant. When omitted (older CLI, or infra file that does\n * not author `serviceAuth`), apps-manager applies the\n * `WildoAuthConfigSchema` defaults (15 min / 30 days as of Auth-hardening\n * Slice A Step 5 on 2026-04-13; pre-Slice-A the access-token default\n * was 60 min) at init time via `WildoAuthConfigSchema.parse({})`.\n */\n serviceAuth: WildoAuthConfigSchema.optional(),\n /**\n * The application's authored broker vhost and storage bucket — see\n * {@link ApplicationBackingServiceAddressing} for why apps-manager must be told rather than read\n * them from its own env, and for the two meanings of absence.\n */\n backingServiceAddressing: ApplicationBackingServiceAddressingSchema.optional(),\n}) as z.ZodType<AdminAppInitializeRequest>;\n\nexport interface AdminAppInitializeTarget {\n slug: string;\n name?: string;\n appDatabaseName?: string;\n managedDeclaration: AdminAppManagedDeclaration;\n /**\n * The application's own persistence engine — identical semantics to\n * {@link AdminAppInitializeRequest.applicationDatabase}, per target.\n *\n * Added 2026-08-27. The batch envelope had no way to express it, so\n * `POST /admin/apps/initialize` could only ever register applications as MongoDB — the single-app\n * endpoint carried the selection and its batch sibling silently dropped it. One invariant, two\n * call sites, applied at one (`.claude/rules/invariant-call-site-enumeration.md`).\n *\n * ⚠️ Interface AND schema, always — the `as z.ZodType<AdminAppInitializeTarget>` cast below makes\n * a schema-only addition type-check while staying invisible to every consumer.\n */\n applicationDatabase?: { engine: DatabaseEngine; databaseName?: string };\n firstAdminSeed?: AppBootstrapFirstAdminSeed;\n serviceAuth?: WildoAuthConfig;\n /**\n * Per target, unlike `serviceAuth`'s shared-by-convention value: each application authors its own\n * vhost and bucket, so a batch-level field would reintroduce the one-owner defect it exists to fix.\n */\n backingServiceAddressing?: ApplicationBackingServiceAddressing;\n}\n\n/**\n * Per-target payload inside a batch admin initialization request.\n *\n * `managedDeclaration` is required for the same contract reason as in\n * `AdminAppInitializeRequestSchema`. Admin identity lives at the batch\n * envelope level (one admin user across all targets), not per target.\n */\nexport const AdminAppInitializeTargetSchema = z.object({\n slug: z.string().min(1),\n name: z.string().min(1).optional(),\n appDatabaseName: z.string().min(1).optional(),\n managedDeclaration: AdminAppManagedDeclarationSchema,\n /**\n * Per-target application persistence selection. Same shape and same meaning as\n * {@link AdminAppInitializeRequestSchema}'s field of this name — read that one for why the\n * selection must be authored rather than inferred from which backing services are declared.\n */\n applicationDatabase: z.object({\n engine: z.enum(DatabaseEngine),\n databaseName: z.string().min(1).optional(),\n }).optional(),\n firstAdminSeed: AppBootstrapFirstAdminSeedSchema.optional(),\n /**\n * Per-target `serviceAuth` projection. Today every target in a batch\n * shares the same infra-authored `serviceAuth` (one infra file per env),\n * but the field is per-target rather than batch-level so a future\n * targeted override (e.g. preview-app with a longer access TTL) can land\n * without breaking the contract. See\n * {@link AdminAppInitializeRequestSchema.serviceAuth} for full semantics.\n */\n serviceAuth: WildoAuthConfigSchema.optional(),\n /** Per-target addressing — see {@link AdminAppInitializeTarget.backingServiceAddressing}. */\n backingServiceAddressing: ApplicationBackingServiceAddressingSchema.optional(),\n}) as z.ZodType<AdminAppInitializeTarget>;\n\n/**\n * Whether a stated approver identity is WHOLE, ABSENT, or a half-filled mistake (#575).\n *\n * A named vocabulary because the three answers have three different remedies, and two of them are\n * easy to conflate: ABSENT is legitimate everywhere (a deployment provisioned before the approver\n * contract existed states nothing, and every boot re-runs INIT), while PARTIAL is an operator\n * mistake that must be named at the door where it was made.\n */\nexport enum ApproverIdentityCompleteness {\n /** All three identity fields present. Provisioning seeds a second administrator. */\n WHOLE = 'whole',\n /** None present. Provisioning proceeds with ONE administrator and says so. */\n ABSENT = 'absent',\n /** Some present. Refused — see {@link classifyApproverIdentity}. */\n PARTIAL = 'partial',\n}\n\nexport type ApproverIdentityClassification =\n | { completeness: ApproverIdentityCompleteness.WHOLE; email: string; firstName: string; lastName: string }\n | { completeness: ApproverIdentityCompleteness.ABSENT }\n | { completeness: ApproverIdentityCompleteness.PARTIAL; missing: string[] };\n\n/**\n * ONE definition of \"all four or none\" for the second administrator, shared by every door that\n * reads one (#575).\n *\n * ## Why it classifies rather than throws\n *\n * The callers owe different answers. An HTTP door refuses with a VALIDATION error naming the missing\n * fields, because an operator is present and the mistake is theirs. The INIT boot path cannot refuse\n * at all — a platform provisioned before this existed states nothing, and INIT runs on every boot, so\n * refusing there would make it unbootable with a remedy that needs the process that just refused\n * (`continuity-drift-and-cas-basis.md` Rule 3). Returning the classification lets each site apply the\n * response it owes rather than inheriting one.\n *\n * ## Why `password` is not part of the test\n *\n * It is GENERATED when omitted, exactly as `userPassword` is for the primary administrator. Requiring\n * it would make the only stated-identity door harder to use than the one it mirrors, for no gain: a\n * generated password is reset through the ordinary flow.\n */\nexport function classifyApproverIdentity(input: {\n email?: string | undefined;\n firstName?: string | undefined;\n lastName?: string | undefined;\n}): ApproverIdentityClassification {\n const present = (value: string | undefined): boolean => typeof value === 'string' && value.trim().length > 0;\n const stated = [\n ['email', input.email],\n ['firstName', input.firstName],\n ['lastName', input.lastName],\n ] as const;\n\n const missing = stated.filter(([, value]) => !present(value)).map(([field]) => field);\n if (missing.length === stated.length) return { completeness: ApproverIdentityCompleteness.ABSENT };\n if (missing.length > 0) return { completeness: ApproverIdentityCompleteness.PARTIAL, missing };\n return {\n completeness: ApproverIdentityCompleteness.WHOLE,\n email: input.email as string,\n firstName: input.firstName as string,\n lastName: input.lastName as string,\n };\n}\n\nexport interface AdminAppsInitializeBatchRequest {\n override?: boolean;\n userEmail: string;\n userFirstName: string;\n userLastName: string;\n userPassword?: string;\n /**\n * The SECOND administrator (#575), envelope-level like the primary identity and for the same\n * reason: the seeded administrators are shared across every target.\n *\n * Carried on the BATCH door as well as the single one because they are two hand-written copies of\n * one contract — the shape `invariant-call-site-enumeration.md` #23 records. A batch that\n * provisioned one administrator while the single door provisioned two would leave whichever\n * applications went through it unable to approve their own application-wide reads.\n */\n approverEmail?: string;\n approverFirstName?: string;\n approverLastName?: string;\n approverPassword?: string;\n targets: AdminAppInitializeTarget[];\n}\n\n/**\n * Batch admin initialization envelope. Admin identity is required at the\n * envelope level (the seeded admin user is shared across all targets).\n */\nexport const AdminAppsInitializeBatchRequestSchema = z.object({\n override: z.boolean().optional(),\n userEmail: z.email(),\n userFirstName: z.string().min(1),\n userLastName: z.string().min(1),\n userPassword: z.string().min(1).optional(),\n approverEmail: z.email().optional(),\n approverFirstName: z.string().min(1).optional(),\n approverLastName: z.string().min(1).optional(),\n approverPassword: z.string().min(1).optional(),\n targets: z.array(AdminAppInitializeTargetSchema).min(1),\n}) as z.ZodType<AdminAppsInitializeBatchRequest>;\n\nexport interface AdminAppReapplyDeclarationRequest {\n managedDeclaration: AdminAppManagedDeclaration;\n /**\n * Report what a reapply WOULD change and write nothing (issue #97).\n *\n * This is the comparison primitive behind every \"is the stored config still what the\n * application declares?\" question — the init postcondition and the `wildo local doctor`\n * drift check both ask it this way rather than each re-implementing an authored-vs-stored\n * differ. One comparison, one place it can be wrong.\n *\n * Optional and defaulting to a real reapply, so an existing caller keeps its behaviour: a flag\n * that silently turned writes into no-ops would be a far worse failure than the invisibility it\n * exists to cure.\n */\n dryRun?: boolean;\n}\n\n/**\n * Shared success response for a single app initialization request.\n */\nexport const AdminAppInitializeResponseSchema = z.object({\n success: z.literal(true),\n application: z.object({\n name: z.string().min(1),\n slug: z.string().min(1),\n }),\n credentials: z.object({\n email: z.email(),\n password: z.string().min(1),\n }),\n /**\n * What provisioning did about the application's own bootstrap rows — see\n * {@link AppDatabaseSeedingOutcome}.\n *\n * OPTIONAL so a CLI can still parse a response from an apps-manager that predates the two-phase\n * contract. A caller that DEPENDS on the two-phase flow must treat absence as \"unknown\" and say\n * so, never as `SEEDED`.\n */\n appDatabaseSeeding: z.enum(AppDatabaseSeedingOutcome).optional(),\n /**\n * The declaration slices this initialization applied to the stored application config (the\n * `updatedFields` of the declaration reapply init runs unconditionally); empty when the stored\n * config already matched `wildo.saas.config.ts`.\n *\n * What lets `wildo local dev` NAME the edit it applied instead of applying it silently.\n * OPTIONAL so a CLI can parse a response from an apps-manager that predates the field; absence means\n * \"not reported\", never \"nothing changed\".\n */\n declarationConvergedFields: z.array(z.string()).optional(),\n});\n\n/**\n * Shared admin request payload for reapplying the `wildo.saas.config.ts`\n * declaration projection (`AdminAppManagedDeclaration`) onto an\n * already-initialized application.\n *\n * Contract semantics — what this endpoint owns:\n * - Re-source the declaration-managed slices of `Wildo_Application_Config`\n * from the new declaration: `appIdentity` display fields,\n * `frontendServices` seed, `minions`, `workers`, `engineCapabilities`,\n * `providers`, `providerConfigurations`, `organizationTypes`,\n * `systemsOfRecord`, `organizationRelationships`, `professionalQualificationKinds` and `keyManagement`.\n * - Return a `updatedFields` diff so the caller can surface what changed.\n * - When `minions` changed (and only then), reconcile the minions'\n * runtime-principal backing-service credentials from the new declaration —\n * mint a new minion's, revoke a removed one's. The declaration is the\n * revocation authority, so the operation that changes it is the one that\n * brings credentials back in line. A dry run never reaches this step.\n *\n * Contract semantics — what this endpoint deliberately does NOT touch:\n * - Any other credential (DB users, JWT private keys, session secrets,\n * admin passwords, a new WORKER's principal secret). Those live in\n * `Wildo_Application_Secrets` and are owned by initialize / rotate flows.\n * - Database / infrastructure provisioning. Those are owned by\n * `/admin/apps/:appSlug/initialize` and the platform-init flow.\n * - K8s endpoints. Those are owned by\n * `/admin/apps/:appSlug/refresh` (config refresh) and the deploy flow.\n * - First-admin seeding (`firstAdminSeed`). User/role seeding happens\n * at init time only. Reapplying the declaration is a config-drift\n * operation; silently changing seeded role grants would be a\n * security regression. Callers wanting to change admin user types\n * must use a dedicated admin-management endpoint (not this one).\n *\n * Stable action identifier: `apps.reapply-declaration` (see\n * {@link APPS_REAPPLY_DECLARATION_ACTION_ID} in `bootstrap.contracts.ts`).\n * The CI/CD admin rights workstream (Step 8) reuses this identifier in\n * its permission grid so this endpoint can be granted independently\n * from the broader `apps.initialize` action.\n */\nexport const AdminAppReapplyDeclarationRequestSchema = z.strictObject({\n managedDeclaration: AdminAppManagedDeclarationSchema,\n dryRun: z.boolean().optional(),\n}) as z.ZodType<AdminAppReapplyDeclarationRequest>;\n\n/**\n * Shared success response for a managed-declaration reapply request.\n *\n * `updatedFields` lists the dot-paths of the declaration-projection\n * slices that actually changed (e.g. `appIdentity.displayName`,\n * `frontendServices`, `engineCapabilities`, `providers`).\n * An empty list means the stored config already matched the new\n * declaration — the operation is idempotent.\n *\n * When `dryRun` is `true` the same list describes what WOULD change; nothing\n * was written. An empty `updatedFields` under `dryRun` is therefore a positive\n * coherence proof: the stored config matches the declaration right now.\n */\nexport const AdminAppReapplyDeclarationResponseSchema = z.object({\n success: z.literal(true),\n appSlug: z.string().min(1),\n updatedFields: z.array(z.string()),\n appliedAt: z.string().datetime(),\n /**\n * Whether this response describes a PREVIEW or an APPLIED change.\n *\n * REQUIRED rather than optional, and echoed from the request rather than assumed by the\n * caller: `updatedFields` reads identically in both modes, so `['providerConfigurations']`\n * means two opposite things depending on this flag. A caller that cannot tell them apart may\n * report \"reapplied\" for a run that changed nothing on the server. Issue #97 is what a\n * silently implicit answer to \"did this actually take?\" costs.\n */\n dryRun: z.boolean(),\n});\n\nexport type AppBootstrapCredentials = z.infer<typeof AppBootstrapCredentialsSchema>;\nexport type AppBootstrapCredentialsResponse = z.infer<typeof AppBootstrapCredentialsResponseSchema>;\nexport type AppBootstrapFirstAdminSeed = z.infer<typeof AppBootstrapFirstAdminSeedSchema>;\nexport type AdminAppInitializeResponse = z.infer<typeof AdminAppInitializeResponseSchema>;\nexport type AdminAppReapplyDeclarationResponse = z.infer<typeof AdminAppReapplyDeclarationResponseSchema>;\n"]}
1
+ {"version":3,"file":"bootstrap.schemas.js","sourceRoot":"","sources":["../../../src/bootstrap/bootstrap.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,EAE1C,4BAA4B,EAE5B,6BAA6B,EA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AC;QACpB,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE;QAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAC5B,CAAC;IACF;;;;;;;OAOG;IACH,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,QAAQ,EAAE;IAChE;;;;;;;;OAQG;IACH,0BAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,YAAY,CAAC;IACpE,kBAAkB,EAAE,gCAAgC;IACpD,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAiD,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/D,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC;;;;;;;;OAQG;IACH,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC","sourcesContent":["import {\n AppConfiguration_Shared_AppIdentity_Schema,\n type AppConfiguration_Shared_AppIdentity,\n FrontendServicesConfigSchema,\n type FrontendServicesConfig,\n OrganizationTypesConfigSchema,\n OrganizationRelationshipKindsSchema,\n type OrganizationRelationshipKinds,\n ProfessionalQualificationKindsSchema,\n type ProfessionalQualificationKinds,\n KeyManagementConfigurationSchema,\n type KeyManagementConfiguration,\n type OrganizationTypesConfig,\n SystemsOfRecordConfigSchema,\n type SystemsOfRecordConfig,\n RuntimeEnvironment,\n} from '@wildo-ai/saas-models';\nimport { z } from 'zod';\nimport { z_wireDate } from '@wildo-ai/zod-decorators';\nimport {\n EngineCapabilityActivationsSchema,\n MinionPlatformAccessCarriedSchema,\n MinionResourceAccessSchema,\n ProviderConfigurationsSchema,\n SaasConfigProvidersBlockSchema,\n type EngineCapabilityActivations,\n type MinionPlatformAccessCarried,\n type MinionResourceAccess,\n type ProviderConfigurations,\n type SaasConfigProvidersBlock,\n} from '../project-config/define-saas-config';\nimport {\n AppFrontendType,\n DataAccessSchema,\n ResourceLimitsSchema,\n WorkerRuntimeSchema,\n} from '../project-config/shared/service-definitions.schemas';\nimport {\n WorkerAuthSchema,\n WorkerHttpSchema,\n} from '../project-config/define-worker-config';\nimport { WildoAuthConfigSchema } from '../project-config/shared/auth.schemas';\nimport { DatabaseEngine } from '../project-config/shared/environment.schemas';\nimport { BackingServiceKind, BackingServiceSource } from '../project-config/shared/backing-services.schemas';\nimport type { BackingServiceProviderSelection } from '../project-config/shared/backing-service-servability';\n\n/**\n * Shared bootstrap execution mode.\n * The workflow semantics stay the same; only the executor differs.\n */\nexport enum BootstrapExecutorKind {\n LOCAL = 'local',\n REMOTE = 'remote',\n}\n\n/**\n * Shared bootstrap step identifiers.\n * These represent semantic workflow stages, not package-specific implementation details.\n */\nexport enum BootstrapStepId {\n INITIALIZE_PLATFORM = 'initialize-platform',\n ENSURE_APPLICATION = 'ensure-application',\n FETCH_BOOTSTRAP_CREDENTIALS = 'fetch-bootstrap-credentials',\n GENERATE_RUNTIME_ARTIFACTS = 'generate-runtime-artifacts',\n START_LOCAL_RUNTIME = 'start-local-runtime',\n}\n\n/**\n * Minimum bootstrap credentials required for an application backend to authenticate\n * with apps-manager and fetch its full runtime configuration.\n */\nexport const AppBootstrapCredentialsSchema = z.object({\n APPLICATION_ID: z.string().min(1),\n PLATFORM_APPLICATION_PRIMARY_SECRET: z.string().min(1),\n PLATFORM_APPS_MANAGER_URL: z.url(),\n APPLICATION_ENV: z.enum(RuntimeEnvironment),\n /**\n * The application's slug, carried beside the other identity keys because it becomes an env var on\n * every application runtime exactly as they do (#1177).\n *\n * It rides HERE rather than being threaded through each env builder's argument list because every\n * builder that needs it already receives this object — and because the envelope around it already\n * carries `appSlug`, so apps-manager has nothing new to look up.\n */\n APPLICATION_SLUG: z.string().min(1),\n});\n\n/**\n * Shared response envelope returned by apps-manager when bootstrap credentials are requested.\n * Both apps-manager and CLI should rely on this same contract.\n * `environment` / `APPLICATION_ENV` describe runtime semantics for the\n * bootstrapped application process, not the project-level remote environment id.\n */\nexport const AppBootstrapCredentialsResponseSchema = z.object({\n success: z.literal(true),\n appSlug: z.string().min(1),\n environment: z.enum(RuntimeEnvironment),\n credentials: AppBootstrapCredentialsSchema,\n});\n\nexport interface AdminAppManagedDeclaration {\n app: {\n name: string;\n slug: string;\n displayName: string;\n description?: string;\n type: 'saas';\n };\n frontendServices: Array<{\n serviceName: string;\n frontendType: AppFrontendType;\n }>;\n minions: Record<string, {\n resourceAccess?: MinionResourceAccess;\n /** R4/R5 — what this minion may read about ITSELF at the platform level. Absent ⇒ nothing. */\n platformAccess?: MinionPlatformAccessCarried;\n /** KD-12 — `'cron'` minions paired with a `schedule` produce MINION_TICK CronJob records. */\n mode?: 'always-up' | 'cron';\n schedule?: string;\n }>;\n workers: Record<string, {\n name: string;\n displayName: string;\n description?: string;\n runtime: {\n type: string;\n language: string;\n };\n http: {\n port: number;\n healthPath: string;\n readyPath: string;\n metricsPath?: string;\n };\n auth: 'wildo-jwt';\n replicas: number;\n resources?: {\n cpu?: string;\n memory?: string;\n };\n dataAccess?: {\n database?: 'read-only' | 'read-write' | 'none';\n cache?: boolean;\n queue?: 'consumer' | 'producer' | 'both' | 'none';\n };\n }>;\n engineCapabilities: EngineCapabilityActivations;\n providers: SaasConfigProvidersBlock;\n providerConfigurations: ProviderConfigurations;\n /** AUTHORITATIVE bucket — see `AdminAppManagedDeclarationSchema`. Required, at least one. */\n organizationTypes: OrganizationTypesConfig;\n /**\n * AUTHORITATIVE bucket — the application's declared systems of record (#1055). OPTIONAL, unlike its\n * sibling above: an application that reads nothing out of another system declares none.\n */\n systemsOfRecord?: SystemsOfRecordConfig;\n /** AUTHORITATIVE bucket — the relationship kinds between the organization types (#2722). OPTIONAL: none means no relationships. */\n organizationRelationships?: OrganizationRelationshipKinds;\n /** AUTHORITATIVE bucket — the professional qualification kinds the application recognizes (#2967). OPTIONAL: none means no decision requires one. */\n professionalQualificationKinds?: ProfessionalQualificationKinds;\n /**\n * AUTHORITATIVE bucket — which provider and key serve each key purpose (#2891). OPTIONAL: a purpose with no binding is\n * served by the engine's LOCAL provider, application-scoped. apps-manager, the custodian, resolves the keyring a signature\n * is made with from THIS stored copy, never from the request.\n */\n keyManagement?: KeyManagementConfiguration;\n}\n\n/**\n * The managed minion inventory as it travels the apps-manager wire — the ONE runtime source for\n * that block, in both directions.\n *\n * ## Why this is exported rather than module-private\n *\n * It is reached at three places in this file (`AdminAppManagedDeclarationSchema` for the CLI's\n * declaration, `AppBootstrapConfigMetadataResponseSchema` for what a backend fetches at boot), and\n * — since 2026-09-09 — by the application backend's configuration loader in\n * `@wildo-ai/saas-backend-lib`, which used to re-declare the block by hand.\n *\n * That hand copy is the reason this export exists, and the cost is measured rather than\n * hypothetical. A consumer-side copy of a wire block is parsed with Zod's strip-unknown semantics,\n * so a field added HERE and not mirrored THERE does not fail — it is silently deleted from the\n * payload on the way in. It happened twice: `mode` / `schedule` (the KD-12 cron-tick path, which\n * left every scheduled minion's MINION_TICK CronJob registration dead in production while the wire\n * carried the data correctly) and then `platformAccess`, added the same way and stripped the same\n * way. Neither surfaced as an error anywhere.\n *\n * Exporting the block costs nothing: `@wildo-ai/platform-config-lib`'s root index already\n * re-exports this module, and the engine already imports that root, so no consumer's module graph\n * changes — only the number of hand-maintained copies of this shape does.\n *\n * The engine keeps its OWN `AppConfiguration_MinionsSchema` (a `strictObject` typed against a named\n * interface, for the TS7056 serialization-ceiling reason documented there) and does NOT collapse\n * onto this one. The two are held in step by a mechanical field-parity pin in\n * `engine/saas-backend-lib/src/config/__tests__/managed-runtime-inventory-parity.backend.test.ts`,\n * so the remaining duplication cannot drift in silence the way this one did.\n */\nexport const AdminAppManagedMinionsSchema = z.record(\n z.string().min(1),\n z.object({\n resourceAccess: MinionResourceAccessSchema.optional(),\n /**\n * R4/R5 platform-access axis. Independent of `resourceAccess` (D12) — a\n * minion may hold either, both, or neither. apps-manager reads this to\n * decide whether to mint a principal-scoped attestation at all, and\n * `buildOwnCronRecordFilter` reads it to decide whether the minion has any\n * subject to query WITH, so a field dropped here confers nothing no matter\n * what the author wrote.\n */\n platformAccess: MinionPlatformAccessCarriedSchema.optional(),\n /**\n * KD-12 cron-tick path. When `mode === 'cron'` and `schedule` is\n * provided, the backend-api's `cron-job-sync.backend.service.ts`\n * registers a `MINION_TICK` CronJob record on\n * `platform-crontabs-batches-manager` so the per-minion queue\n * (`wildo.queue.{appId}.minion-tick.{minionName}`) actually fires\n * on schedule.\n */\n mode: z.enum(['always-up', 'cron']).optional(),\n schedule: z.string().min(1).optional(),\n }),\n).default({});\n\n/**\n * The managed worker inventory as it travels the apps-manager wire. Exported for the same reason as\n * `AdminAppManagedMinionsSchema` above, and held in step with the engine's\n * `AppConfiguration_WorkersSchema` by the same parity pin — read that JSDoc before changing either.\n */\nexport const AdminAppManagedWorkersSchema = z.record(\n z.string().min(1),\n z.object({\n name: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n runtime: WorkerRuntimeSchema,\n http: WorkerHttpSchema,\n auth: WorkerAuthSchema,\n replicas: z.number().int().positive(),\n resources: ResourceLimitsSchema.optional(),\n dataAccess: DataAccessSchema.optional(),\n }),\n).default({});\n\n/**\n * Admin-side projection of `wildo.saas.config.ts` carried from the CLI to\n * apps-manager at app initialization / re-apply time.\n *\n * Cross-bucket trust asymmetry (Slice 3 closeout):\n * Fields in this schema fall into TWO TRUST BUCKETS that the apps-manager\n * treats differently:\n *\n * 1. AUTHORITATIVE bucket (always honored, write-through):\n * - `app.name` / `app.slug` / `app.displayName` / `app.description`\n * — `appIdentity` core (F-53 swap: `app.name` is the canonical\n * identifier, `app.displayName` is the UI label only).\n * - `frontendServices` — frontend service registry (consumed by\n * `_merge_WildoApplicationConfig` to materialise endpoints).\n * - `minions` — minion runtime inventory, currently carrying the\n * per-minion `resourceAccess` authority whitelist used by\n * `start-minion-application`.\n * - `workers` — worker runtime inventory persisted by apps-manager so\n * the control-plane can validate worker identity and serve the\n * worker bootstrap contract without re-reading authored files.\n * - `engineCapabilities`, `providers`, and `providerConfigurations`\n * — the provider runtime graph and its non-secret settings.\n * - `organizationTypes` — the tenancy model (#1032, 2026-09-14). It\n * joined this bucket rather than staying backend-authored because\n * apps-manager SEEDS the first administrator's organization and must\n * derive that organization's type from these declarations; the\n * backend cannot publish what the platform needs before the backend\n * exists. Write-through like its siblings: the stored config is\n * replaced by the declaration on every init and re-apply.\n * - `systemsOfRecord` — the named instances of the systems this\n * application reads its own business rows out of (#1055). It is in\n * this bucket because the environment-variable names carrying each\n * instance's address and secrets are DERIVED from the declaration,\n * and the platform and the CLI derive them too — so the declaration,\n * not a backend-authored copy, has to be what travels.\n * - `organizationRelationships` — the relationship kinds between the\n * organization types (#2722). In this bucket because it is a statement\n * about the types above: a backend-authored copy could admit a pair of\n * types the declaration never named.\n *\n * 2. POLICY bucket (governed by override semantics):\n * - currently empty for provider registration. Capability activation\n * is authored as `engineCapabilities`, while provider routing is\n * materialized into `providers`.\n *\n * What is intentionally NOT here (out of bucket):\n * - JWT TTLs (`accessTokenExpirationMinutes`/`refreshTokenExpirationDays`)\n * travel via the SIBLING field `serviceAuth` on the request envelope\n * (see `AdminAppInitializeRequestSchema.serviceAuth`), NOT here.\n * This separation reflects that JWT TTLs are infra-environment policy\n * sourced from `wildo.infra.<env>.config.ts`, while\n * `managedDeclaration` projects the application-level\n * `wildo.saas.config.ts`.\n * - `dataServices.*` (Redis key prefix, S3 bucket prefix, etc.) — these\n * flow through `PlatformEnvConfigJson` env wiring, not the admin\n * declaration. The declaration carries application-level semantics\n * only.\n *\n * If you ADD a field, decide explicitly which bucket it belongs to and\n * document it in the merge service's JSDoc — silently widening the\n * declaration without consumer-side handling is the documented failure\n * mode this comment exists to prevent.\n */\nexport const AdminAppManagedDeclarationSchema = z.object({\n app: z.object({\n name: z.string().min(1),\n slug: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n type: z.literal('saas'),\n }),\n frontendServices: z.array(z.object({\n serviceName: z.string().min(1),\n frontendType: z.enum(AppFrontendType),\n })).default([]),\n minions: AdminAppManagedMinionsSchema,\n workers: AdminAppManagedWorkersSchema,\n engineCapabilities: EngineCapabilityActivationsSchema,\n providers: SaasConfigProvidersBlockSchema,\n providerConfigurations: ProviderConfigurationsSchema,\n organizationTypes: OrganizationTypesConfigSchema,\n systemsOfRecord: SystemsOfRecordConfigSchema.optional(),\n organizationRelationships: OrganizationRelationshipKindsSchema.optional(),\n professionalQualificationKinds: ProfessionalQualificationKindsSchema.optional(),\n keyManagement: KeyManagementConfigurationSchema.optional(),\n}) as z.ZodType<AdminAppManagedDeclaration>;\n\n/**\n * WHEN an application's OWN database gets its bootstrap rows, relative to the schema those rows need.\n *\n * ## The circularity this vocabulary exists to break\n *\n * On MongoDB, seeding an application's database needed no schema — a collection springs into being on\n * first write — so provisioning could create the database and its first rows in one uninterrupted\n * step. PostgreSQL removed that luxury and exposed a genuine cycle that had always been latent:\n *\n * - apps-manager seeds the application's database during provisioning;\n * - those rows need tables, which come from the application's OWN `migrations/` directory;\n * - those migrations are applied by the application backend at boot\n * (`applyStartupPostgresMigrations`, the production door);\n * - and the backend cannot boot until it is seeded, because its execution-context creator requires\n * exactly one APPLICATION row.\n *\n * Nothing inside that circle can break it. apps-manager cannot read the application's migration files\n * — in production they ship inside the application's own image — and the backend cannot supply the\n * seed, which is authored in `wildo.saas.config.ts`. Only the DEPLOY TOOLING holds both, which is why\n * this is a two-phase contract rather than a retry, a tolerance, or a longer timeout.\n *\n * Observed 2026-08-23 on the first PostgreSQL install: provisioning aborted with\n * `relation \"applications\" does not exist`, and `wildo local dev` failed. The same order holds on\n * every lane, so per-application PostgreSQL provisioning had never completed anywhere.\n *\n * ## Why a request field rather than an inferred tolerance\n *\n * Making apps-manager silently skip seeding when the schema happens to be absent would be a\n * fail-open: provisioning would report success having left the application unbootable, and the caller\n * would have no way to tell a deferred seed from a completed one. The caller states its intent, and\n * the response states what happened — see {@link AppDatabaseSeedingOutcome}.\n */\nexport enum AppDatabaseSeedingPhase {\n /**\n * Seed now. The default, and the ONLY behaviour any pre-2026-08-23 caller can produce, so every\n * MongoDB lane and every older CLI is unchanged.\n */\n REQUIRED = 'REQUIRED',\n /**\n * Provision infrastructure and platform records, but do NOT seed the application's own database —\n * the caller is about to create its schema and will then re-invoke with {@link REQUIRED}.\n */\n DEFERRED = 'DEFERRED',\n}\n\n/**\n * What provisioning actually DID about the application's own bootstrap rows.\n *\n * Reported so a caller can never mistake a deferred seed for a completed one. The CLI treats\n * {@link DEFERRED} as expected on its first phase and FATAL on its second — an application that is\n * still unseeded after its migrations have been applied is a defect, not a state to tolerate.\n */\nexport enum AppDatabaseSeedingOutcome {\n /** Bootstrap rows exist in the application's own database. */\n SEEDED = 'SEEDED',\n /** Skipped because the caller asked for {@link AppDatabaseSeedingPhase.DEFERRED}. */\n DEFERRED = 'DEFERRED',\n /**\n * Skipped because the application has no resolved persistence target. Distinct from\n * {@link DEFERRED}: nothing the caller does next will seed it — the target itself is missing.\n */\n NO_PERSISTENCE_TARGET = 'NO_PERSISTENCE_TARGET',\n}\n\nexport const AppBootstrapFirstAdminSeedSchema = z.object({\n userTypes: z.array(z.string().min(1)).min(1),\n});\n\n/** A staged NEXT signing key (#2895): its public half and when apps-manager published it. */\nconst AppBootstrapNextPublicKeyEntrySchema = z.object({\n kid: z.string().min(1),\n publicKey: z.string().min(1),\n // Framework-internal z_wireDate (#3480): the bootstrap response is parsed raw from HTTP JSON, outside the DTO builder.\n publishedAt: z_wireDate(),\n});\n\nconst AppBootstrapRotatedPublicKeyEntrySchema = z.object({\n kid: z.string().min(1),\n publicKey: z.string().min(1),\n /** Last observation/token instant this retired key may authenticate. */\n // Framework-internal z_wireDate (#3480): the bootstrap response is parsed raw from HTTP JSON by the companion (companion-platform-config), outside the DTO builder.\n notAfter: z_wireDate().nullish(),\n});\n\nexport interface AppBootstrapConfigMetadataResponse {\n appSlug: string;\n appIdentity?: AppConfiguration_Shared_AppIdentity;\n frontendServices?: FrontendServicesConfig;\n minions?: Record<string, {\n resourceAccess?: MinionResourceAccess;\n /** R4/R5 — what this minion may read about ITSELF at the platform level. Absent ⇒ nothing. */\n platformAccess?: MinionPlatformAccessCarried;\n /** KD-12 — `'cron'` minions paired with a `schedule` produce MINION_TICK CronJob records. */\n mode?: 'always-up' | 'cron';\n schedule?: string;\n }>;\n workers?: Record<string, {\n name: string;\n displayName: string;\n description?: string;\n runtime: {\n type: string;\n language: string;\n };\n http: {\n port: number;\n healthPath: string;\n readyPath: string;\n metricsPath?: string;\n };\n auth: 'wildo-jwt';\n replicas: number;\n resources?: {\n cpu?: string;\n memory?: string;\n };\n dataAccess?: {\n database?: 'read-only' | 'read-write' | 'none';\n cache?: boolean;\n queue?: 'consumer' | 'producer' | 'both' | 'none';\n };\n }>;\n engineCapabilities?: EngineCapabilityActivations;\n providers?: SaasConfigProvidersBlock;\n /** The application's organization types, as its declaration stored them (#1032). See the schema field. */\n organizationTypes?: OrganizationTypesConfig;\n /** The application's systems of record, as its declaration stored them (#1055). See the schema field. */\n systemsOfRecord?: SystemsOfRecordConfig;\n /** The application's relationship kinds, as its declaration stored them (#2722). See the schema field. */\n organizationRelationships?: OrganizationRelationshipKinds;\n /** The application's professional qualification kinds, as its declaration stored them (#2967). See the schema field. */\n professionalQualificationKinds?: ProfessionalQualificationKinds;\n email?: {\n isTransactionalWildoManaged: boolean;\n isMarketingWildoManaged: boolean;\n };\n providerConfigurations: ProviderConfigurations;\n jwt?: {\n publicKey: Record<string, string>;\n rotatedPublicKeys?: Record<string, Array<z.infer<typeof AppBootstrapRotatedPublicKeyEntrySchema>>>;\n nextPublicKeys?: Record<string, z.infer<typeof AppBootstrapNextPublicKeyEntrySchema>>;\n accessTokenExpirationMinutes: number;\n refreshTokenExpirationDays: number;\n };\n}\n\nexport const AppBootstrapConfigMetadataResponseSchema = z.object({\n appSlug: z.string().min(1),\n appIdentity: AppConfiguration_Shared_AppIdentity_Schema.optional(),\n frontendServices: FrontendServicesConfigSchema.optional(),\n minions: AdminAppManagedMinionsSchema.optional(),\n workers: AdminAppManagedWorkersSchema.optional(),\n engineCapabilities: EngineCapabilityActivationsSchema.optional(),\n providers: SaasConfigProvidersBlockSchema.optional(),\n /**\n * The application's organization types (#1032). A running backend refuses to start without them, and this\n * response is the only road from the stored declaration to the backend — so a section missing HERE is not\n * rejected, it is deleted between apps-manager and the application, and the backend refuses a configuration\n * whose stored document is correct. That is what happened the first time the refusal met a real stack.\n * Optional on the wire because a stored document written before the declaration carried it still answers.\n */\n organizationTypes: OrganizationTypesConfigSchema.optional(),\n /**\n * The application's systems of record (#1055). Declared HERE for the same reason as its sibling\n * above, and it is the reason worth repeating: every schema on this road is a plain `z.object`, so a\n * section missing here is not rejected — it is DELETED between apps-manager and the application, and\n * the backend then boots believing the application declares none.\n */\n systemsOfRecord: SystemsOfRecordConfigSchema.optional(),\n /** The application's relationship kinds (#2722). Declared here for the same reason: an undeclared section is deleted on this road. */\n organizationRelationships: OrganizationRelationshipKindsSchema.optional(),\n /** The application's professional qualification kinds (#2967). Declared here for the same reason. */\n professionalQualificationKinds: ProfessionalQualificationKindsSchema.optional(),\n email: z.object({\n isTransactionalWildoManaged: z.boolean(),\n isMarketingWildoManaged: z.boolean(),\n }).optional(),\n providerConfigurations: ProviderConfigurationsSchema,\n jwt: z.object({\n publicKey: z.record(z.string(), z.string()),\n rotatedPublicKeys: z.record(\n z.string(),\n z.array(AppBootstrapRotatedPublicKeyEntrySchema),\n ).optional(),\n /**\n * #2895 — the staged NEXT key of each purpose, published ahead of being used. Declared here because every schema on\n * this road is a plain `z.object`: a field missing here is deleted between apps-manager and the application.\n */\n nextPublicKeys: z.record(z.string(), AppBootstrapNextPublicKeyEntrySchema).optional(),\n /**\n * Operator-authored JWT TTLs (Slice 3.3 hardening, F-24 / closeout).\n *\n * Sourced from `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,\n * refreshTokenExpirationDays}` (which itself was seeded from\n * `serviceAuth` in `wildo.infra.<env>.config.ts` at apps-manager init\n * time, falling back to `WildoAuthConfigSchema` defaults of 15 min /\n * 30 days when omitted \\u2014 access-token default tightened from 60\n * \\u2192 15 in Auth-hardening Slice A Step 5 on 2026-04-13; see the\n * file-level JSDoc on `auth.schemas.ts` for the threat-model rationale).\n * The application backend MUST consume these values at sign time\n * (`AuthTokenIssuerBackendService.issueAccessToken`,\n * `JwtBackendService.createRefreshToken`) instead of falling back to\n * developer-authored constants in `saas-config.backend.ts`.\n *\n * REQUIRED on the response (Slice 3 closeout): `_getDefault_WildoApplicationConfig`\n * always seeds these via `WildoAuthConfigSchema.parse(serviceAuth ?? {})`\n * (15 min / 30 days defaults), so any persisted\n * `Wildo_Application_Config.jwt` block has both fields populated.\n * Marking them required here lets the consumer\n * (`app-configuration-loader.backend.service.ts`) drop the\n * `accessTokenExpirationMinutes !== undefined ? ... : {}` defensive\n * spread and treat them as guaranteed values.\n */\n accessTokenExpirationMinutes: z.number().int().positive(),\n refreshTokenExpirationDays: z.number().int().positive(),\n }).optional(),\n}) as z.ZodType<AppBootstrapConfigMetadataResponse>;\n\nexport interface AppWorkerBootstrapResponse {\n appSlug: string;\n workerName: string;\n worker: z.infer<typeof AdminAppManagedWorkersSchema>[string];\n jwt: {\n publicKey: string;\n rotatedPublicKeys?: Array<z.infer<typeof AppBootstrapRotatedPublicKeyEntrySchema>>;\n };\n}\n\nexport const AppWorkerBootstrapResponseSchema = z.object({\n appSlug: z.string().min(1),\n workerName: z.string().min(1),\n worker: z.object({\n name: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n runtime: WorkerRuntimeSchema,\n http: WorkerHttpSchema,\n auth: WorkerAuthSchema,\n replicas: z.number().int().positive(),\n resources: ResourceLimitsSchema.optional(),\n dataAccess: DataAccessSchema.optional(),\n }),\n jwt: z.object({\n publicKey: z.string().min(1),\n rotatedPublicKeys: z.array(AppBootstrapRotatedPublicKeyEntrySchema).optional(),\n }),\n}) as z.ZodType<AppWorkerBootstrapResponse>;\n\ntype WildoAuthConfig = z.infer<typeof WildoAuthConfigSchema>;\n\n/**\n * Where ONE application's broker and object storage live, as its environment authored them (#1107).\n *\n * ## Why apps-manager has to be TOLD\n *\n * Both values are authored per application — `backingServices.rabbitmq.vhost` and\n * `backingServices.s3.bucket` in `wildo.infra.<env>.config.ts` — and the CLI writes them into that\n * application's own backend env. apps-manager, which provisions the vhost grant and issues the storage\n * credential, used to read them from its OWN process env instead. That env is generated from whichever\n * application last ran a full `wildo local init`, so every other application registered on the same\n * platform (`wildo local init --register-only`) had its broker principal granted on the owner's vhost\n * and its storage credential confined to the owner's bucket, while its backend connected to its own:\n * a vhost that did not exist and a bucket nobody had created.\n *\n * ## The same projection as the application's env, by construction\n *\n * The CLI derives this with the one function that also writes `RABBITMQ_VHOST` / `STORAGE_BUCKET` into\n * the application backend env, so the value apps-manager provisions and the value the backend connects\n * with cannot be two spellings of one fact.\n *\n * ## Absence is refused, never substituted\n *\n * apps-manager refuses to provision a vhost grant or issue a storage credential for an application whose\n * addressing it was never told, naming the remedy (register the application again). Substituting its own\n * env would be this defect with a warning attached. Every `wildo local dev` start registers the\n * application before its backends spawn, so a recorded addressing is always in place by the time a backend\n * asks. `rabbitmqVhost` absent inside a sent object is different: the application authored no vhost and\n * uses the broker's default vhost `/`.\n */\nexport interface ApplicationBackingServiceAddressing {\n /** The authored broker virtual host. Absent means the default vhost `/`. */\n rabbitmqVhost?: string;\n /** The object-storage bucket the application backend reads and writes. Always known: it has a projected default. */\n objectStorageBucket: string;\n /**\n * Which provider serves each backing service the application's environment DECLARES (#1692). See\n * {@link ApplicationBackingServiceProviderDeclarations}.\n */\n declaredProviders?: ApplicationBackingServiceProviderDeclarations;\n}\n\n/**\n * The `(source, provider)` pair each backing-service kind declares in the environment an application registers\n * in — its `backingServices` block, reduced to the half that decides WHICH SERVER serves it (#1692).\n *\n * ## Why apps-manager has to be told\n *\n * apps-manager mints every backing-service credential an application receives. It used to choose the provider\n * from its OWN environment — MongoDB Atlas when an Atlas API key happened to be configured, self-hosted\n * otherwise — and minted Redis and RabbitMQ on the platform's own servers unconditionally. So an application\n * declaring `redis: { source: MANAGED }` got no Valkey workload (the generators honour `source`) and a Redis\n * ACL user on the PLATFORM's Redis: a credential for a server it never connects to. The catalogue of provider\n * modules could not change that either, because nothing selected a module from what the application declared.\n * This is the same \"apps-manager read its own env instead of being told\" defect as the vhost and bucket above.\n *\n * ## Why the DECLARATION travels, not the resolved `InfraProvider`\n *\n * apps-manager resolves each entry with the SAME `resolveInfraProvider` the lockfile's infra section uses, so\n * the provider it dispatches on and the provider the lockfile records are one function's answer. Sending the\n * resolved provider instead would make a declaration that resolves to NOTHING — `redis: { source: MANAGED }`\n * has no `InfraProvider` member — indistinguishable from a kind that is not declared, and \"not declared\" keeps\n * the old behaviour, which is exactly the platform-server mint this contract exists to end. Carrying the pair\n * keeps \"declared, unservable\" representable so apps-manager can REFUSE it, naming what was declared.\n *\n * ## The meanings of absence\n *\n * - The whole map absent (a CLI predating #1692, or the platform's own application registered by INIT mode):\n * every kind keeps its previous behaviour.\n * - One kind absent from a sent map (the environment does not declare it): that kind alone keeps its previous\n * behaviour — self-hosted on the platform's own server, and for MongoDB Atlas-when-configured.\n *\n * ## A declaration is environment-wide; a mint is per application\n *\n * `backingServices` describes the environment, including stores only the PLATFORM uses (a self-hosted MongoDB\n * beside a PostgreSQL application, say). So apps-manager checks admin credentials only for the kinds it mints\n * for THIS application; a declared kind the application does not consume is checked only against the\n * catalogue, which the CLI has already done offline (#1693).\n */\nexport type ApplicationBackingServiceProviderDeclarations = Partial<Record<BackingServiceKind, BackingServiceProviderSelection>>;\n\nconst BackingServiceProviderSelectionSchema = z.object({\n source: z.enum(BackingServiceSource),\n provider: z.string().min(1).optional(),\n}).strict();\n\n/** Keyed by {@link BackingServiceKind}, total over it, each entry optional — see the type above. */\nexport const ApplicationBackingServiceProviderDeclarationsSchema = z.object(\n Object.fromEntries(\n Object.values(BackingServiceKind).map((kind) => [kind, BackingServiceProviderSelectionSchema.optional()]),\n ) as Record<BackingServiceKind, z.ZodOptional<typeof BackingServiceProviderSelectionSchema>>,\n).strict() as z.ZodType<ApplicationBackingServiceProviderDeclarations>;\n\nexport const ApplicationBackingServiceAddressingSchema = z.object({\n rabbitmqVhost: z.string().min(1).optional(),\n objectStorageBucket: z.string().min(1),\n declaredProviders: ApplicationBackingServiceProviderDeclarationsSchema.optional(),\n}).strict() as z.ZodType<ApplicationBackingServiceAddressing>;\n\nexport interface AdminAppInitializeRequest {\n name?: string;\n appDatabaseName?: string;\n override?: boolean;\n userEmail: string;\n userFirstName: string;\n userLastName: string;\n userPassword?: string;\n /**\n * The SECOND administrator (#575), when the deployment states one.\n *\n * `applicationAccessGrants.approve` is gated on `APP_ADMIN_SUPER_ADMIN` and refuses an approver\n * equal to the requester, with no auto-approval branch — so an application seeded with ONE\n * super-administrator cannot read any application-wide surface at all. Provisioning is where the\n * second one has to come from; nothing later mints it.\n *\n * ALL FOUR OR NONE. A partial set is an operator mistake rather than a request to fall back, and\n * the same reading `init.command.ts` already applies to partial `--admin-*` flags. Enforced by\n * `assertApproverIdentityIsWholeOrAbsent` at every door that reads one.\n */\n approverEmail?: string;\n approverFirstName?: string;\n approverLastName?: string;\n approverPassword?: string;\n managedDeclaration: AdminAppManagedDeclaration;\n /**\n * The application's own persistence engine — see the field's JSDoc on the schema below for why it\n * exists at all.\n *\n * ⚠️ This interface and that schema are TWO declarations of ONE contract, joined by the\n * `as z.ZodType<AdminAppInitializeRequest>` cast. The cast means a field added to only the schema\n * type-checks perfectly while being invisible to every CONSUMER — which is exactly what happened on\n * 2026-08-19: apps-manager's controller could not read `applicationDatabase` off a parsed request\n * though the schema accepted it. Add to BOTH, always.\n */\n applicationDatabase?: { engine: DatabaseEngine; databaseName?: string };\n firstAdminSeed?: AppBootstrapFirstAdminSeed;\n /**\n * WHEN to seed this application's own database. Absent means\n * {@link AppDatabaseSeedingPhase.REQUIRED} — see that enum for why the phase is stated rather\n * than inferred.\n */\n appDatabaseSeeding?: AppDatabaseSeedingPhase;\n serviceAuth?: WildoAuthConfig;\n /** See {@link ApplicationBackingServiceAddressing}. Interface AND schema, always. */\n backingServiceAddressing?: ApplicationBackingServiceAddressing;\n}\n\n/**\n * Shared admin request payload for a single app initialization.\n *\n * This describes the control-plane contract, independently of whether the\n * caller is the CLI or a future CI/CD executor.\n *\n * Required-by-contract fields:\n * - `managedDeclaration` — the projection of `wildo.saas.config.ts` that\n * seeds frontend services, capability policy, and external providers.\n * Omitting it would silently half-bootstrap an app, so the admin HTTP\n * boundary rejects requests without it.\n * - `userEmail` / `userFirstName` / `userLastName` — admin identity for\n * the seeded super-admin user. The previous implementation defaulted\n * these to a developer's personal identity, silently bypassing the\n * downstream `validateInitializationOptions` validation; that bypass\n * is now closed at the contract boundary.\n *\n * Optional-by-design fields:\n * - `userPassword` — the service auto-generates a secure password when\n * omitted (intentional one-shot bootstrap affordance).\n * - `name` / `appDatabaseName` / `override` / `firstAdminSeed` — caller\n * overrides; sensible defaults exist downstream.\n */\nexport const AdminAppInitializeRequestSchema = z.object({\n name: z.string().min(1).optional(),\n appDatabaseName: z.string().min(1).optional(),\n override: z.boolean().optional(),\n userEmail: z.email(),\n userFirstName: z.string().min(1),\n userLastName: z.string().min(1),\n userPassword: z.string().min(1).optional(),\n /**\n * The SECOND administrator (#575). Declared on BOTH the interface above and this schema — the\n * `as z.ZodType<AdminAppInitializeRequest>` cast means a field added to only one of them\n * type-checks perfectly and is invisible to every consumer, which is exactly what happened to\n * `applicationDatabase` on 2026-08-19.\n */\n approverEmail: z.email().optional(),\n approverFirstName: z.string().min(1).optional(),\n approverLastName: z.string().min(1).optional(),\n approverPassword: z.string().min(1).optional(),\n managedDeclaration: AdminAppManagedDeclarationSchema,\n /**\n * Which store this application's own resources persist to — mirrored from the authored\n * `applicationDatabase` in `wildo.infra.<env>.config.ts`, and carried under the SAME name so the\n * value is traceable end to end by one word.\n *\n * ## Why this field had to be added\n *\n * apps-manager already held the entire per-application PostgreSQL path: `mintAppCredentials`\n * provisioning the database, role and password, plus the `defaultAdapter` and `resourceIdFormat`\n * branches of the stored application config. All three were gated on\n * `WildoApplicationInitOptions.usePostgreSQL`, and on 2026-08-19 a repo-wide search found that flag\n * had FOUR mentions in the whole codebase — one declaration and three reads, in a single file.\n * **Nothing ever set it.**\n *\n * So the capability had no door. `backingServices.postgresql` had been authored for some time and\n * no application role ever appeared in `pg_roles`, because the declaration had no path to the\n * provisioner. This field is that path.\n *\n * OPTIONAL on the wire, and absence means POSTGRESQL — resolved by `resolveApplicationDatabaseEngine`\n * on the receiving side (#1571), the same answer the CLI gives. The current CLI always sends the\n * resolved engine; absence reaches apps-manager only from an older CLI or another door.\n */\n applicationDatabase: z.object({\n engine: z.enum(DatabaseEngine),\n /**\n * The AUTHORED database name, from `backingServices.postgresql.database`.\n *\n * Sent because two sources were naming this database and disagreeing: the provisioner derives\n * `wildo_<sanitized-slug>` while `env-vars-builder` emits the authored name as\n * `POSTGRESQL_DATABASE`. On 2026-08-19 that produced `wildo_wonder_todos` (owned by the app role)\n * beside `wonder-todos-db` (what the backend was told to connect to) — both empty, so the\n * application would have opened a database it did not own while its grants landed elsewhere.\n *\n * The authored value wins: it is the git-borne declaration, it is what the env already carries,\n * and the provisioner has always accepted an override — the caller simply never passed one.\n */\n databaseName: z.string().min(1).optional(),\n }).optional(),\n firstAdminSeed: AppBootstrapFirstAdminSeedSchema.optional(),\n /**\n * WHEN to seed this application's own database — see {@link AppDatabaseSeedingPhase}.\n *\n * OPTIONAL, and absence means `REQUIRED`, so a CLI that predates the two-phase contract keeps\n * exactly the single-phase behaviour every MongoDB application already has.\n */\n appDatabaseSeeding: z.enum(AppDatabaseSeedingPhase).optional(),\n /**\n * Authored `serviceAuth` projection from `wildo.infra.<env>.config.ts`,\n * threaded by the CLI so apps-manager can seed\n * `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,\n * refreshTokenExpirationDays}` from the operator's policy instead of a\n * hardcoded constant. When omitted (older CLI, or infra file that does\n * not author `serviceAuth`), apps-manager applies the\n * `WildoAuthConfigSchema` defaults (15 min / 30 days as of Auth-hardening\n * Slice A Step 5 on 2026-04-13; pre-Slice-A the access-token default\n * was 60 min) at init time via `WildoAuthConfigSchema.parse({})`.\n */\n serviceAuth: WildoAuthConfigSchema.optional(),\n /**\n * The application's authored broker vhost and storage bucket — see\n * {@link ApplicationBackingServiceAddressing} for why apps-manager must be told rather than read\n * them from its own env, and for the two meanings of absence.\n */\n backingServiceAddressing: ApplicationBackingServiceAddressingSchema.optional(),\n}) as z.ZodType<AdminAppInitializeRequest>;\n\nexport interface AdminAppInitializeTarget {\n slug: string;\n name?: string;\n appDatabaseName?: string;\n managedDeclaration: AdminAppManagedDeclaration;\n /**\n * The application's own persistence engine — identical semantics to\n * {@link AdminAppInitializeRequest.applicationDatabase}, per target.\n *\n * Added 2026-08-27. The batch envelope had no way to express it, so\n * `POST /admin/apps/initialize` could only ever register applications as MongoDB — the single-app\n * endpoint carried the selection and its batch sibling silently dropped it. One invariant, two\n * call sites, applied at one (`.claude/rules/invariant-call-site-enumeration.md`).\n *\n * ⚠️ Interface AND schema, always — the `as z.ZodType<AdminAppInitializeTarget>` cast below makes\n * a schema-only addition type-check while staying invisible to every consumer.\n */\n applicationDatabase?: { engine: DatabaseEngine; databaseName?: string };\n firstAdminSeed?: AppBootstrapFirstAdminSeed;\n serviceAuth?: WildoAuthConfig;\n /**\n * Per target, unlike `serviceAuth`'s shared-by-convention value: each application authors its own\n * vhost and bucket, so a batch-level field would reintroduce the one-owner defect it exists to fix.\n */\n backingServiceAddressing?: ApplicationBackingServiceAddressing;\n}\n\n/**\n * Per-target payload inside a batch admin initialization request.\n *\n * `managedDeclaration` is required for the same contract reason as in\n * `AdminAppInitializeRequestSchema`. Admin identity lives at the batch\n * envelope level (one admin user across all targets), not per target.\n */\nexport const AdminAppInitializeTargetSchema = z.object({\n slug: z.string().min(1),\n name: z.string().min(1).optional(),\n appDatabaseName: z.string().min(1).optional(),\n managedDeclaration: AdminAppManagedDeclarationSchema,\n /**\n * Per-target application persistence selection. Same shape and same meaning as\n * {@link AdminAppInitializeRequestSchema}'s field of this name — read that one for why the\n * selection must be authored rather than inferred from which backing services are declared.\n */\n applicationDatabase: z.object({\n engine: z.enum(DatabaseEngine),\n databaseName: z.string().min(1).optional(),\n }).optional(),\n firstAdminSeed: AppBootstrapFirstAdminSeedSchema.optional(),\n /**\n * Per-target `serviceAuth` projection. Today every target in a batch\n * shares the same infra-authored `serviceAuth` (one infra file per env),\n * but the field is per-target rather than batch-level so a future\n * targeted override (e.g. preview-app with a longer access TTL) can land\n * without breaking the contract. See\n * {@link AdminAppInitializeRequestSchema.serviceAuth} for full semantics.\n */\n serviceAuth: WildoAuthConfigSchema.optional(),\n /** Per-target addressing — see {@link AdminAppInitializeTarget.backingServiceAddressing}. */\n backingServiceAddressing: ApplicationBackingServiceAddressingSchema.optional(),\n}) as z.ZodType<AdminAppInitializeTarget>;\n\n/**\n * Whether a stated approver identity is WHOLE, ABSENT, or a half-filled mistake (#575).\n *\n * A named vocabulary because the three answers have three different remedies, and two of them are\n * easy to conflate: ABSENT is legitimate everywhere (a deployment provisioned before the approver\n * contract existed states nothing, and every boot re-runs INIT), while PARTIAL is an operator\n * mistake that must be named at the door where it was made.\n */\nexport enum ApproverIdentityCompleteness {\n /** All three identity fields present. Provisioning seeds a second administrator. */\n WHOLE = 'whole',\n /** None present. Provisioning proceeds with ONE administrator and says so. */\n ABSENT = 'absent',\n /** Some present. Refused — see {@link classifyApproverIdentity}. */\n PARTIAL = 'partial',\n}\n\nexport type ApproverIdentityClassification =\n | { completeness: ApproverIdentityCompleteness.WHOLE; email: string; firstName: string; lastName: string }\n | { completeness: ApproverIdentityCompleteness.ABSENT }\n | { completeness: ApproverIdentityCompleteness.PARTIAL; missing: string[] };\n\n/**\n * ONE definition of \"all four or none\" for the second administrator, shared by every door that\n * reads one (#575).\n *\n * ## Why it classifies rather than throws\n *\n * The callers owe different answers. An HTTP door refuses with a VALIDATION error naming the missing\n * fields, because an operator is present and the mistake is theirs. The INIT boot path cannot refuse\n * at all — a platform provisioned before this existed states nothing, and INIT runs on every boot, so\n * refusing there would make it unbootable with a remedy that needs the process that just refused\n * (`continuity-drift-and-cas-basis.md` Rule 3). Returning the classification lets each site apply the\n * response it owes rather than inheriting one.\n *\n * ## Why `password` is not part of the test\n *\n * It is GENERATED when omitted, exactly as `userPassword` is for the primary administrator. Requiring\n * it would make the only stated-identity door harder to use than the one it mirrors, for no gain: a\n * generated password is reset through the ordinary flow.\n */\nexport function classifyApproverIdentity(input: {\n email?: string | undefined;\n firstName?: string | undefined;\n lastName?: string | undefined;\n}): ApproverIdentityClassification {\n const present = (value: string | undefined): boolean => typeof value === 'string' && value.trim().length > 0;\n const stated = [\n ['email', input.email],\n ['firstName', input.firstName],\n ['lastName', input.lastName],\n ] as const;\n\n const missing = stated.filter(([, value]) => !present(value)).map(([field]) => field);\n if (missing.length === stated.length) return { completeness: ApproverIdentityCompleteness.ABSENT };\n if (missing.length > 0) return { completeness: ApproverIdentityCompleteness.PARTIAL, missing };\n return {\n completeness: ApproverIdentityCompleteness.WHOLE,\n email: input.email as string,\n firstName: input.firstName as string,\n lastName: input.lastName as string,\n };\n}\n\nexport interface AdminAppsInitializeBatchRequest {\n override?: boolean;\n userEmail: string;\n userFirstName: string;\n userLastName: string;\n userPassword?: string;\n /**\n * The SECOND administrator (#575), envelope-level like the primary identity and for the same\n * reason: the seeded administrators are shared across every target.\n *\n * Carried on the BATCH door as well as the single one because they are two hand-written copies of\n * one contract — the shape `invariant-call-site-enumeration.md` #23 records. A batch that\n * provisioned one administrator while the single door provisioned two would leave whichever\n * applications went through it unable to approve their own application-wide reads.\n */\n approverEmail?: string;\n approverFirstName?: string;\n approverLastName?: string;\n approverPassword?: string;\n targets: AdminAppInitializeTarget[];\n}\n\n/**\n * Batch admin initialization envelope. Admin identity is required at the\n * envelope level (the seeded admin user is shared across all targets).\n */\nexport const AdminAppsInitializeBatchRequestSchema = z.object({\n override: z.boolean().optional(),\n userEmail: z.email(),\n userFirstName: z.string().min(1),\n userLastName: z.string().min(1),\n userPassword: z.string().min(1).optional(),\n approverEmail: z.email().optional(),\n approverFirstName: z.string().min(1).optional(),\n approverLastName: z.string().min(1).optional(),\n approverPassword: z.string().min(1).optional(),\n targets: z.array(AdminAppInitializeTargetSchema).min(1),\n}) as z.ZodType<AdminAppsInitializeBatchRequest>;\n\nexport interface AdminAppReapplyDeclarationRequest {\n managedDeclaration: AdminAppManagedDeclaration;\n /**\n * Report what a reapply WOULD change and write nothing (issue #97).\n *\n * This is the comparison primitive behind every \"is the stored config still what the\n * application declares?\" question — the init postcondition and the `wildo local doctor`\n * drift check both ask it this way rather than each re-implementing an authored-vs-stored\n * differ. One comparison, one place it can be wrong.\n *\n * Optional and defaulting to a real reapply, so an existing caller keeps its behaviour: a flag\n * that silently turned writes into no-ops would be a far worse failure than the invisibility it\n * exists to cure.\n */\n dryRun?: boolean;\n}\n\n/**\n * Shared success response for a single app initialization request.\n */\nexport const AdminAppInitializeResponseSchema = z.object({\n success: z.literal(true),\n application: z.object({\n name: z.string().min(1),\n slug: z.string().min(1),\n }),\n credentials: z.object({\n email: z.email(),\n password: z.string().min(1),\n }),\n /**\n * What provisioning did about the application's own bootstrap rows — see\n * {@link AppDatabaseSeedingOutcome}.\n *\n * OPTIONAL so a CLI can still parse a response from an apps-manager that predates the two-phase\n * contract. A caller that DEPENDS on the two-phase flow must treat absence as \"unknown\" and say\n * so, never as `SEEDED`.\n */\n appDatabaseSeeding: z.enum(AppDatabaseSeedingOutcome).optional(),\n /**\n * The declaration slices this initialization applied to the stored application config (the\n * `updatedFields` of the declaration reapply init runs unconditionally); empty when the stored\n * config already matched `wildo.saas.config.ts`.\n *\n * What lets `wildo local dev` NAME the edit it applied instead of applying it silently.\n * OPTIONAL so a CLI can parse a response from an apps-manager that predates the field; absence means\n * \"not reported\", never \"nothing changed\".\n */\n declarationConvergedFields: z.array(z.string()).optional(),\n});\n\n/**\n * Shared admin request payload for reapplying the `wildo.saas.config.ts`\n * declaration projection (`AdminAppManagedDeclaration`) onto an\n * already-initialized application.\n *\n * Contract semantics — what this endpoint owns:\n * - Re-source the declaration-managed slices of `Wildo_Application_Config`\n * from the new declaration: `appIdentity` display fields,\n * `frontendServices` seed, `minions`, `workers`, `engineCapabilities`,\n * `providers`, `providerConfigurations`, `organizationTypes`,\n * `systemsOfRecord`, `organizationRelationships`, `professionalQualificationKinds` and `keyManagement`.\n * - Return a `updatedFields` diff so the caller can surface what changed.\n * - When `minions` changed (and only then), reconcile the minions'\n * runtime-principal backing-service credentials from the new declaration —\n * mint a new minion's, revoke a removed one's. The declaration is the\n * revocation authority, so the operation that changes it is the one that\n * brings credentials back in line. A dry run never reaches this step.\n *\n * Contract semantics — what this endpoint deliberately does NOT touch:\n * - Any other credential (DB users, JWT private keys, session secrets,\n * admin passwords, a new WORKER's principal secret). Those live in\n * `Wildo_Application_Secrets` and are owned by initialize / rotate flows.\n * - Database / infrastructure provisioning. Those are owned by\n * `/admin/apps/:appSlug/initialize` and the platform-init flow.\n * - K8s endpoints. Those are owned by\n * `/admin/apps/:appSlug/refresh` (config refresh) and the deploy flow.\n * - First-admin seeding (`firstAdminSeed`). User/role seeding happens\n * at init time only. Reapplying the declaration is a config-drift\n * operation; silently changing seeded role grants would be a\n * security regression. Callers wanting to change admin user types\n * must use a dedicated admin-management endpoint (not this one).\n *\n * Stable action identifier: `apps.reapply-declaration` (see\n * {@link APPS_REAPPLY_DECLARATION_ACTION_ID} in `bootstrap.contracts.ts`).\n * The CI/CD admin rights workstream (Step 8) reuses this identifier in\n * its permission grid so this endpoint can be granted independently\n * from the broader `apps.initialize` action.\n */\nexport const AdminAppReapplyDeclarationRequestSchema = z.strictObject({\n managedDeclaration: AdminAppManagedDeclarationSchema,\n dryRun: z.boolean().optional(),\n}) as z.ZodType<AdminAppReapplyDeclarationRequest>;\n\n/**\n * Shared success response for a managed-declaration reapply request.\n *\n * `updatedFields` lists the dot-paths of the declaration-projection\n * slices that actually changed (e.g. `appIdentity.displayName`,\n * `frontendServices`, `engineCapabilities`, `providers`).\n * An empty list means the stored config already matched the new\n * declaration — the operation is idempotent.\n *\n * When `dryRun` is `true` the same list describes what WOULD change; nothing\n * was written. An empty `updatedFields` under `dryRun` is therefore a positive\n * coherence proof: the stored config matches the declaration right now.\n */\nexport const AdminAppReapplyDeclarationResponseSchema = z.object({\n success: z.literal(true),\n appSlug: z.string().min(1),\n updatedFields: z.array(z.string()),\n appliedAt: z.string().datetime(),\n /**\n * Whether this response describes a PREVIEW or an APPLIED change.\n *\n * REQUIRED rather than optional, and echoed from the request rather than assumed by the\n * caller: `updatedFields` reads identically in both modes, so `['providerConfigurations']`\n * means two opposite things depending on this flag. A caller that cannot tell them apart may\n * report \"reapplied\" for a run that changed nothing on the server. Issue #97 is what a\n * silently implicit answer to \"did this actually take?\" costs.\n */\n dryRun: z.boolean(),\n});\n\nexport type AppBootstrapCredentials = z.infer<typeof AppBootstrapCredentialsSchema>;\nexport type AppBootstrapCredentialsResponse = z.infer<typeof AppBootstrapCredentialsResponseSchema>;\nexport type AppBootstrapFirstAdminSeed = z.infer<typeof AppBootstrapFirstAdminSeedSchema>;\nexport type AdminAppInitializeResponse = z.infer<typeof AdminAppInitializeResponseSchema>;\nexport type AdminAppReapplyDeclarationResponse = z.infer<typeof AdminAppReapplyDeclarationResponseSchema>;\n"]}
@@ -70,6 +70,13 @@ export declare enum PlatformInfrastructureEnvKey {
70
70
  STORAGE_BUCKET = "STORAGE_BUCKET",
71
71
  STORAGE_ACCESS_KEY = "STORAGE_ACCESS_KEY",
72
72
  STORAGE_SECRET_KEY = "STORAGE_SECRET_KEY",
73
+ /**
74
+ * The role apps-manager's object-storage broker names when it calls STS `AssumeRole` (#2172), as an ARN.
75
+ * apps-manager only. Optional: a MinIO-compatible store issues a session for the CALLING key and names no role,
76
+ * while AWS STS (and SeaweedFS, Ceph RGW) require one, and the broker refuses issuance against such a store when
77
+ * this is absent. Rendered from `platformStorage.stsRoleArn` in the environment's infra file.
78
+ */
79
+ STORAGE_STS_ROLE_ARN = "STORAGE_STS_ROLE_ARN",
73
80
  PG_HOST = "PG_HOST",
74
81
  PG_PORT = "PG_PORT",
75
82
  PG_ADMIN_USER = "PG_ADMIN_USER",
@@ -248,7 +255,7 @@ export declare enum PlatformKubernetesEnvKey {
248
255
  * use to derive cookie `Domain` and CORS allowlist entries. It applies
249
256
  * to BOTH Kubernetes and Docker Compose deployments — naming it
250
257
  * `K8S_*` (as in the previous `K8S_EXTERNAL_BASE_DOMAIN`) was a
251
- * conflation; see `external-public-domain-rename.md`.
258
+ * conflation.
252
259
  */
253
260
  export declare enum PlatformIngressEnvKey {
254
261
  WILDO_PUBLIC_DOMAIN = "WILDO_PUBLIC_DOMAIN",
@@ -360,7 +367,8 @@ export declare enum PlatformOwnershipDnsEnvKey {
360
367
  /**
361
368
  * Documentation-site BUILD env-var contract.
362
369
  *
363
- * Projected from `WildoInfraEnvConfig.documentationSite` by `env-vars-builder`. Unlike the
370
+ * Read from `WildoInfraEnvConfig.documentationSite`, in the loaded descriptor, by the documentation image's build
371
+ * arguments and the CI workflow (`wildo config sync`); no runtime environment carries them (#2310). Unlike the
364
372
  * other families here these are consumed by a BUILD rather than a running service: a
365
373
  * Docusaurus bundle compiles its origins in, so the values must be present when the site is
366
374
  * built, and a bundle built with the wrong ones silently points every reader at the wrong
@@ -1 +1 @@
1
- {"version":3,"file":"platform-runtime-env.contracts.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/platform-runtime-env.contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,YAAY,iBAAiB;IAC7B;;;;;;;;;;OAUG;IACH,gBAAgB,qBAAqB;IACrC,uBAAuB,4BAA4B;IACnD,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;CACxC;AAED,oBAAY,wBAAwB;IAClC,yBAAyB,8BAA8B;IACvD,qCAAqC,0CAA0C;IAC/E,4BAA4B,iCAAiC;CAC9D;AAED,oBAAY,4BAA4B;IACtC,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,qBAAqB,0BAA0B;IAC/C,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB;;;;OAIG;IACH,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,wBAAwB,6BAA6B;IACrD;;;;OAIG;IACH,cAAc,mBAAmB;IACjC,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;IACnD,gBAAgB,qBAAqB;IACrC;;;;;;OAMG;IACH,gBAAgB,qBAAqB;IACrC,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,aAAa,kBAAkB;IAC/B,iBAAiB,sBAAsB;IACvC;;;;;;OAMG;IACH,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B;;;;;;;;;;;;;OAaG;IACH,cAAc,mBAAmB;IACjC;;;;;;;OAOG;IACH,iBAAiB,sBAAsB;IACvC,iBAAiB,sB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eAAO,MAAM,oBAAoB,4BAAsB,CAAC;AACxD,eAAO,MAAM,yBAAyB,iCAA2B,CAAC;AAClE,eAAO,MAAM,sBAAsB,8BAAwB,CAAC;AAC5D,eAAO,MAAM,sBAAsB,8BAAwB,CAAC;AAC5D,eAAO,MAAM,4BAA4B,oCAA8B,CAAC;AACxE,eAAO,MAAM,gCAAgC,wCAAkC,CAAC;AAChF,eAAO,MAAM,oBAAoB,4BAAsB,CAAC;AACxD,eAAO,MAAM,2BAA2B,mCAA6B,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAU3E;AAED,eAAO,MAAM,mCAAmC,aA4B9C,CAAC"}
1
+ {"version":3,"file":"platform-runtime-env.contracts.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/platform-runtime-env.contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,YAAY,iBAAiB;IAC7B;;;;;;;;;;OAUG;IACH,gBAAgB,qBAAqB;IACrC,uBAAuB,4BAA4B;IACnD,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;CACxC;AAED,oBAAY,wBAAwB;IAClC,yBAAyB,8BAA8B;IACvD,qCAAqC,0CAA0C;IAC/E,4BAA4B,iCAAiC;CAC9D;AAED,oBAAY,4BAA4B;IACtC,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,qBAAqB,0BAA0B;IAC/C,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB;;;;OAIG;IACH,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,wBAAwB,6BAA6B;IACrD;;;;OAIG;IACH,cAAc,mBAAmB;IACjC,u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kC,uCAAuC;CAC1E;AAED;;;;;;;GAOG;AACH,oBAAY,mBAAmB;IAC7B,iCAAiC,sCAAsC;CACxE;AAED;;;;;;;GAOG;AACH,oBAAY,0BAA0B;IACpC,gCAAgC,qCAAqC;CACtE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,+BAA+B;IACzC,uBAAuB,4BAA4B;IACnD,kBAAkB,uBAAuB;IACzC,gCAAgC,qCAAqC;CACtE;AAED,eAAO,MAAM,gCAAgC,wCAAkC,CAAC;AAChF,eAAO,MAAM,sBAAsB,8BAAwB,CAAC;AAC5D,eAAO,MAAM,yBAAyB,iCAA2B,CAAC;AAClE,eAAO,MAAM,6BAA6B,qCAA+B,CAAC;AAC1E,eAAO,MAAM,uBAAuB,+BAAyB,CAAC;AAC9D,eAAO,MAAM,oBAAoB,4BAAsB,CAAC;AACxD,eAAO,MAAM,yBAAyB,iCAA2B,CAAC;AAClE,eAAO,MAAM,sBAAsB,8BAAwB,CAAC;AAC5D,eAAO,MAAM,sBAAsB,8BAAwB,CAAC;AAC5D,eAAO,MAAM,4BAA4B,oCAA8B,CAAC;AACxE,eAAO,MAAM,gCAAgC,wCAAkC,CAAC;AAChF,eAAO,MAAM,oBAAoB,4BAAsB,CAAC;AACxD,eAAO,MAAM,2BAA2B,mCAA6B,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAU3E;AAED,eAAO,MAAM,mCAAmC,aA4B9C,CAAC"}
@@ -73,6 +73,13 @@ export var PlatformInfrastructureEnvKey;
73
73
  PlatformInfrastructureEnvKey["STORAGE_BUCKET"] = "STORAGE_BUCKET";
74
74
  PlatformInfrastructureEnvKey["STORAGE_ACCESS_KEY"] = "STORAGE_ACCESS_KEY";
75
75
  PlatformInfrastructureEnvKey["STORAGE_SECRET_KEY"] = "STORAGE_SECRET_KEY";
76
+ /**
77
+ * The role apps-manager's object-storage broker names when it calls STS `AssumeRole` (#2172), as an ARN.
78
+ * apps-manager only. Optional: a MinIO-compatible store issues a session for the CALLING key and names no role,
79
+ * while AWS STS (and SeaweedFS, Ceph RGW) require one, and the broker refuses issuance against such a store when
80
+ * this is absent. Rendered from `platformStorage.stsRoleArn` in the environment's infra file.
81
+ */
82
+ PlatformInfrastructureEnvKey["STORAGE_STS_ROLE_ARN"] = "STORAGE_STS_ROLE_ARN";
76
83
  PlatformInfrastructureEnvKey["PG_HOST"] = "PG_HOST";
77
84
  PlatformInfrastructureEnvKey["PG_PORT"] = "PG_PORT";
78
85
  PlatformInfrastructureEnvKey["PG_ADMIN_USER"] = "PG_ADMIN_USER";
@@ -266,7 +273,7 @@ export var PlatformKubernetesEnvKey;
266
273
  * use to derive cookie `Domain` and CORS allowlist entries. It applies
267
274
  * to BOTH Kubernetes and Docker Compose deployments — naming it
268
275
  * `K8S_*` (as in the previous `K8S_EXTERNAL_BASE_DOMAIN`) was a
269
- * conflation; see `external-public-domain-rename.md`.
276
+ * conflation.
270
277
  */
271
278
  export var PlatformIngressEnvKey;
272
279
  (function (PlatformIngressEnvKey) {
@@ -384,7 +391,8 @@ export var PlatformOwnershipDnsEnvKey;
384
391
  /**
385
392
  * Documentation-site BUILD env-var contract.
386
393
  *
387
- * Projected from `WildoInfraEnvConfig.documentationSite` by `env-vars-builder`. Unlike the
394
+ * Read from `WildoInfraEnvConfig.documentationSite`, in the loaded descriptor, by the documentation image's build
395
+ * arguments and the CI workflow (`wildo config sync`); no runtime environment carries them (#2310). Unlike the
388
396
  * other families here these are consumed by a BUILD rather than a running service: a
389
397
  * Docusaurus bundle compiles its origins in, so the values must be present when the site is
390
398
  * built, and a bundle built with the wrong ones silently points every reader at the wrong
@@ -1 +1 @@
1
- {"version":3,"file":"platform-runtime-env.contracts.js","sourceRoot":"","sources":["../../../../src/bootstrap/platform-runtime-env.contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;G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AuB;IACjE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CACb,yCAAyC,OAAO,eAAe,eAAe,KAAK;YACnF,qFAAqF;YACrF,mCAAmC,CACpC,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,IAAI,GAAG,CAAS;IACjE,4BAA4B,CAAC,iBAAiB;IAC9C,4BAA4B,CAAC,kBAAkB;IAC/C,4BAA4B,CAAC,oBAAoB;IACjD,4BAA4B,CAAC,uBAAuB;IACpD,4BAA4B,CAAC,kBAAkB;IAC/C,4BAA4B,CAAC,kBAAkB;IAC/C,4BAA4B,CAAC,iBAAiB;IAC9C,4BAA4B,CAAC,cAAc;IAC3C,4BAA4B,CAAC,qBAAqB;IAClD,sBAAsB,CAAC,iCAAiC;IACxD,sBAAsB,CAAC,gCAAgC;IACvD,sBAAsB,CAAC,kDAAkD;IACzE,sBAAsB,CAAC,4BAA4B;IACnD,sBAAsB,CAAC,qCAAqC;IAC5D,sBAAsB,CAAC,+BAA+B;IACtD,sBAAsB,CAAC,iCAAiC;IACxD,sBAAsB,CAAC,uBAAuB;IAC9C,sBAAsB,CAAC,6CAA6C;IACpE,sBAAsB,CAAC,4CAA4C;IACnE,sBAAsB,CAAC,mCAAmC;IAC1D,sBAAsB,CAAC,qBAAqB;IAC5C,mBAAmB,CAAC,cAAc;IAClC,mBAAmB,CAAC,6BAA6B;IACjD,yFAAyF;IACzF,iGAAiG;IACjG,gGAAgG;IAChG,2BAA2B,CAAC,0BAA0B;CACvD,CAAC,CAAC","sourcesContent":["/**\n * Shared environment contract for platform runtime processes.\n *\n * This captures the canonical env-var vocabulary used by CLI-generated platform\n * `.env` material and by platform services such as apps-manager at runtime.\n * Keep these keys declarative and cross-executor: the contract owns names and\n * sensitivity classification, while writers/readers own behavior.\n */\n\nexport enum PlatformProcessEnvKey {\n HOST = 'HOST',\n PORT = 'PORT',\n SERVICE_NAME = 'SERVICE_NAME',\n /**\n * The APPLICATION this process belongs to, as its slug (#1177).\n *\n * Distinct from {@link SERVICE_NAME}, which names the PROCESS — `wonder-todos-backend-api`,\n * `marketing-scrapper`, `my-node-worker`. Only the first of those contains the application's name,\n * which is why the logger cannot derive the application from it: a minion and a worker are named\n * after themselves.\n *\n * Emitted for APPLICATION runtimes only (backend, minion, worker, companion). The platform's own\n * services belong to no application and deliberately do not carry it.\n */\n APPLICATION_SLUG = 'APPLICATION_SLUG',\n PLATFORM_ENVIRONMENT_ID = 'PLATFORM_ENVIRONMENT_ID',\n APPLICATION_ENV = 'APPLICATION_ENV',\n APPS_MANAGER_MODE = 'APPS_MANAGER_MODE',\n}\n\nexport enum PlatformServiceUrlEnvKey {\n PLATFORM_APPS_MANAGER_URL = 'PLATFORM_APPS_MANAGER_URL',\n PLATFORM_CRONTABS_BATCHES_MANAGER_URL = 'PLATFORM_CRONTABS_BATCHES_MANAGER_URL',\n PLATFORM_MODULE_REGISTRY_URL = 'PLATFORM_MODULE_REGISTRY_URL',\n}\n\nexport enum PlatformInfrastructureEnvKey {\n MONGO_CONNECT_URL = 'MONGO_CONNECT_URL',\n MONGO_PLATFORM_URL = 'MONGO_PLATFORM_URL',\n BASE_MONGO_SERVER_URL = 'BASE_MONGO_SERVER_URL',\n REDIS_HOST = 'REDIS_HOST',\n REDIS_PORT = 'REDIS_PORT',\n /**\n * Optional Redis logical database index (0–15). Emitted only when the\n * author sets `backingServices.redis.database` in `wildo.infra.<env>.config.ts`.\n * Consumers default to DB 0 when this var is missing.\n */\n REDIS_DATABASE = 'REDIS_DATABASE',\n REDIS_ADMIN_USER = 'REDIS_ADMIN_USER',\n REDIS_ADMIN_PASSWORD = 'REDIS_ADMIN_PASSWORD',\n RABBITMQ_HOST = 'RABBITMQ_HOST',\n RABBITMQ_PORT = 'RABBITMQ_PORT',\n RABBITMQ_MANAGEMENT_PORT = 'RABBITMQ_MANAGEMENT_PORT',\n /**\n * Optional RabbitMQ virtual host. Emitted only when the author sets\n * `backingServices.rabbitmq.vhost` in `wildo.infra.<env>.config.ts`.\n * Consumers default to `/` (the RabbitMQ root vhost) when missing.\n */\n RABBITMQ_VHOST = 'RABBITMQ_VHOST',\n RABBITMQ_ADMIN_USERNAME = 'RABBITMQ_ADMIN_USERNAME',\n RABBITMQ_ADMIN_PASSWORD = 'RABBITMQ_ADMIN_PASSWORD',\n STORAGE_PROVIDER = 'STORAGE_PROVIDER',\n /**\n * S3-compatible endpoint **hostname** (NOT a URL); see the matching\n * JSDoc on `ApplicationBackendDataEnvKey.STORAGE_ENDPOINT` for the\n * full contract (Slice 3.2 audit L-4). Kept here for the\n * platform-runtime side (apps-manager) — same\n * host:port-only invariant.\n */\n STORAGE_ENDPOINT = 'STORAGE_ENDPOINT',\n STORAGE_PORT = 'STORAGE_PORT',\n STORAGE_USE_SSL = 'STORAGE_USE_SSL',\n STORAGE_BUCKET = 'STORAGE_BUCKET',\n STORAGE_ACCESS_KEY = 'STORAGE_ACCESS_KEY',\n STORAGE_SECRET_KEY = 'STORAGE_SECRET_KEY',\n PG_HOST = 'PG_HOST',\n PG_PORT = 'PG_PORT',\n PG_ADMIN_USER = 'PG_ADMIN_USER',\n PG_ADMIN_PASSWORD = 'PG_ADMIN_PASSWORD',\n /**\n * The MAINTENANCE database the admin pool connects to in order to provision others — NOT the\n * application's database and NOT the container's initdb database (that is\n * `POSTGRES_ADMIN_DATABASE`, a different key on a different transport). Emitted from\n * `PLATFORM_POSTGRES_MAINTENANCE_DATABASE`, whose JSDoc carries the three-way distinction and\n * the silent outage that conflating the first two produced.\n */\n PG_ADMIN_DATABASE = 'PG_ADMIN_DATABASE',\n PG_SSL_MODE = 'PG_SSL_MODE',\n /**\n * The platform's OWN PostgreSQL database — a full connection URL, the exact mirror of\n * `MONGO_CONNECT_URL` for a PostgreSQL-engined platform (D7 of the incremental-migrations plan).\n *\n * Distinct from the `PG_ADMIN_*` family above, which is PROVISIONING material (the admin\n * connection apps-manager uses to create per-application databases/roles). This key is the\n * database apps-manager's own resources live in. One URL rather than an address/credential\n * split on purpose: the platform pre-connects from env BEFORE any config document can be read\n * (the same chicken-and-egg `MONGO_CONNECT_URL` solves — the config documents live in the very\n * database this key addresses), so the whole answer must arrive in one env-delivered value.\n *\n * Emitted by the CLI's platform env builder only when the environment's\n * `database.engine === POSTGRESQL`. Absent on a Mongo-engined platform.\n */\n PG_CONNECT_URL = 'PG_CONNECT_URL',\n /**\n * The self-hosted immudb server apps-manager provisions each application's audit database and user on (#1696):\n * host and gRPC port as apps-manager reaches it, and the server's built-in `immudb` SYSADMIN password — a\n * framework-managed PLATFORM secret (`immudb.adminPassword`), written into apps-manager's environment only.\n * No application receives it: each application writes with the confined user apps-manager minted for it.\n * Absent on a platform that self-hosts no immudb; an application declaring `immudb: { source: SELF }` is then\n * refused at registration (`NOT_HELD_BY_PLATFORM`), like every minting kind whose admin client is missing.\n */\n IMMUDB_ADMIN_HOST = 'IMMUDB_ADMIN_HOST',\n IMMUDB_ADMIN_PORT = 'IMMUDB_ADMIN_PORT',\n IMMUDB_ADMIN_PASSWORD = 'IMMUDB_ADMIN_PASSWORD',\n}\n\nexport enum PlatformSecurityEnvKey {\n PLATFORM_APPS_MANAGER_PRIVATE_KEY = 'PLATFORM_APPS_MANAGER_PRIVATE_KEY',\n PLATFORM_APPS_MANAGER_PUBLIC_KEY = 'PLATFORM_APPS_MANAGER_PUBLIC_KEY',\n /**\n * apps-manager's RESPONSE key (#2921): the private half that signs every successful answer on the routes application\n * runtimes read (configuration, secrets, worker bootstrap, storage session, runtime-principal token). Its own key,\n * never the {@link PLATFORM_APPS_MANAGER_PRIVATE_KEY} that signs runtime-principal tokens and crontabs requests: one key\n * per purpose (NIST SP 800-57 Part 1 Rev 5 §5.2). Runtimes verify against the public halves carried in\n * `PLATFORM_APPS_MANAGER_RESPONSE_VERIFICATION_KEYS`. Required: apps-manager refuses to start without it, because a\n * response it cannot sign must not be sent (`runtime-response-integrity.ts`).\n */\n PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY = 'PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY',\n /**\n * The platform's key-encryption ROOT (#2891): 32 random bytes, base64url, held by apps-manager alone. Every private\n * key the engine's LOCAL key provider makes (the approval-seal keys among them) is sealed under it with AES-256-GCM\n * before it is stored, so a platform database dump yields no usable private key.\n *\n * Losing it loses every LOCAL private key, and nothing else: the public halves are stored in each application, so\n * every seal already made still verifies. The keys it sealed cannot sign again, and the keyring does not replace them on\n * its own: apps-manager reports them at startup, and an operator who knows the root is gone for good runs\n * `wildo keys rotate --root-lost --reason \"<why>\"` per application, which destroys them and makes fresh ones. A new\n * root never opens the old keys, so restore it from backup before minting another. Back it up with the platform's other\n * secrets. Every lane provides it (`wildo local doctor` reports it missing). apps-manager starts without it, so a stack\n * predating it keeps running, and the keyring refuses its first operation (`PROVIDER_UNAVAILABLE`); a MALFORMED value is\n * refused at startup.\n */\n PLATFORM_KEY_ENCRYPTION_ROOT = 'PLATFORM_KEY_ENCRYPTION_ROOT',\n /**\n * The root a rotation replaced (#2891), kept only until every sealed key has been re-sealed under the current one.\n * apps-manager opens a key under whichever root sealed it and re-seals it under the current root. Optional.\n */\n PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT = 'PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT',\n /**\n * The platform's HashiCorp Vault or OpenBao (#2933), where apps-manager runs the `vault-transit` (REMOTE) and\n * `vault-kv` (RETRIEVED) key providers. apps-manager alone holds these: no application runtime ever reaches the Vault.\n * All optional; a platform without a Vault leaves them unset, and a binding to a Vault provider is refused\n * (`PROVIDER_UNAVAILABLE`). The address and BOTH tokens are needed together; a partial set registers nothing and is\n * reported at apps-manager's boot, while the LOCAL provider keeps serving.\n *\n * Two tokens, for least privilege, under the policies `vault-custody.contracts` states (`vaultSignerPolicy`,\n * `vaultOperatorPolicy`): the SIGNER token may sign (`transit/sign/<prefix>*`) and read keys and key metadata; the\n * OPERATOR token performs lifecycle acts (create, rotate, config, delete, KV write and destroy) and is denied signing\n * and reading key material. Neither can make a key leave Vault: the signer is denied `/config`, `transit/export/*` and\n * `transit/backup/*`, and the operator may not send `exportable` or `allow_plaintext_backup` at all.\n * Not `VAULT_ADDR` / `VAULT_TOKEN`: those are read by Vault's own CLI and SDKs, and a stray one would be picked up.\n */\n PLATFORM_KEY_VAULT_ADDRESS = 'PLATFORM_KEY_VAULT_ADDRESS',\n PLATFORM_KEY_VAULT_SIGNER_TOKEN = 'PLATFORM_KEY_VAULT_SIGNER_TOKEN',\n PLATFORM_KEY_VAULT_OPERATOR_TOKEN = 'PLATFORM_KEY_VAULT_OPERATOR_TOKEN',\n /** Vault Enterprise namespace (`ns1/ns2/`). Optional. */\n PLATFORM_KEY_VAULT_NAMESPACE = 'PLATFORM_KEY_VAULT_NAMESPACE',\n /** The Transit mount (`transit` when unset). */\n PLATFORM_KEY_VAULT_TRANSIT_MOUNT = 'PLATFORM_KEY_VAULT_TRANSIT_MOUNT',\n /** The KV v2 mount (`secret` when unset). */\n PLATFORM_KEY_VAULT_KV_MOUNT = 'PLATFORM_KEY_VAULT_KV_MOUNT',\n /** What every key and path apps-manager makes is named with, so the Vault policies can be scoped to it (`wildo-`). */\n PLATFORM_KEY_VAULT_KEY_NAME_PREFIX = 'PLATFORM_KEY_VAULT_KEY_NAME_PREFIX',\n /**\n * The platform's cloud KMS providers (#2896): `aws-kms`, `google-cloud-kms`, `azure-key-vault`. apps-manager alone\n * holds them, and authenticates by its WORKLOAD identity (IAM role for service accounts, GKE workload identity, an\n * Azure managed identity), so none of these is a secret. Each provider acts as TWO identities, as the Vault providers\n * do with two tokens: a SIGNER that may only read keys and sign, and an OPERATOR that creates, disables and destroys\n * them and may never sign. Every key of one provider is needed together; a partial set registers nothing and is\n * reported at apps-manager's boot.\n *\n * AWS: apps-manager's own identity may only `sts:AssumeRole` the two roles named here.\n */\n PLATFORM_KEY_AWS_KMS_REGION = 'PLATFORM_KEY_AWS_KMS_REGION',\n PLATFORM_KEY_AWS_KMS_SIGNER_ROLE_ARN = 'PLATFORM_KEY_AWS_KMS_SIGNER_ROLE_ARN',\n PLATFORM_KEY_AWS_KMS_OPERATOR_ROLE_ARN = 'PLATFORM_KEY_AWS_KMS_OPERATOR_ROLE_ARN',\n /** A KMS endpoint other than the region's public one (a VPC interface endpoint). Optional. */\n PLATFORM_KEY_AWS_KMS_ENDPOINT = 'PLATFORM_KEY_AWS_KMS_ENDPOINT',\n /** Google: the key ring (`projects/<p>/locations/<l>/keyRings/<r>`) and the two service accounts apps-manager impersonates. */\n PLATFORM_KEY_GOOGLE_KMS_KEY_RING = 'PLATFORM_KEY_GOOGLE_KMS_KEY_RING',\n PLATFORM_KEY_GOOGLE_KMS_SIGNER_SERVICE_ACCOUNT = 'PLATFORM_KEY_GOOGLE_KMS_SIGNER_SERVICE_ACCOUNT',\n PLATFORM_KEY_GOOGLE_KMS_OPERATOR_SERVICE_ACCOUNT = 'PLATFORM_KEY_GOOGLE_KMS_OPERATOR_SERVICE_ACCOUNT',\n /** `HSM` (the default) or `SOFTWARE`: the protection level new keys are created at. */\n PLATFORM_KEY_GOOGLE_KMS_PROTECTION_LEVEL = 'PLATFORM_KEY_GOOGLE_KMS_PROTECTION_LEVEL',\n /** Azure: the vault (or Managed HSM) URL and the client ids of the two user-assigned managed identities. */\n PLATFORM_KEY_AZURE_KEY_VAULT_URL = 'PLATFORM_KEY_AZURE_KEY_VAULT_URL',\n PLATFORM_KEY_AZURE_KEY_VAULT_SIGNER_CLIENT_ID = 'PLATFORM_KEY_AZURE_KEY_VAULT_SIGNER_CLIENT_ID',\n PLATFORM_KEY_AZURE_KEY_VAULT_OPERATOR_CLIENT_ID = 'PLATFORM_KEY_AZURE_KEY_VAULT_OPERATOR_CLIENT_ID',\n /** `true` (the default) makes new keys `EC-HSM` (a Premium vault or Managed HSM); `false` makes them software `EC` keys. */\n PLATFORM_KEY_AZURE_KEY_VAULT_HSM = 'PLATFORM_KEY_AZURE_KEY_VAULT_HSM',\n /**\n * The Log Analytics workspace the vault's diagnostic setting sends its `AuditEvent` logs to, read hourly to corroborate\n * the custodian's signatures (#2896). Optional: without it, no Azure hour is compared, and apps-manager says so at boot.\n */\n PLATFORM_KEY_AZURE_KEY_VAULT_LOG_ANALYTICS_WORKSPACE_ID = 'PLATFORM_KEY_AZURE_KEY_VAULT_LOG_ANALYTICS_WORKSPACE_ID',\n /**\n * The platform's dedicated HSM over PKCS#11 (#2934): the vendor's module (a shared library in apps-manager's image or\n * mounted into it), the token's label, and the user PIN. The module path and label come from\n * `platformKeyManagement.pkcs11`; the PIN from `secrets.json` (`platformKeyPkcs11.pin`), operator-typed, and it is the\n * only secret here. All three or none; a partial set registers nothing and is reported at apps-manager's boot.\n */\n PLATFORM_KEY_PKCS11_MODULE_PATH = 'PLATFORM_KEY_PKCS11_MODULE_PATH',\n PLATFORM_KEY_PKCS11_TOKEN_LABEL = 'PLATFORM_KEY_PKCS11_TOKEN_LABEL',\n PLATFORM_KEY_PKCS11_PIN = 'PLATFORM_KEY_PKCS11_PIN',\n /** Comma-separated token models the operator states are hardware (`CK_TOKEN_INFO.model`); none: every key is SOFTWARE. */\n PLATFORM_KEY_PKCS11_HARDWARE_TOKEN_MODELS = 'PLATFORM_KEY_PKCS11_HARDWARE_TOKEN_MODELS',\n /**\n * The crontabs-batches-manager's dedicated P2P signing keypair. The design is\n * per-service (mirrors apps-manager): the crontabs scheduler signs each SCHEDULED_CRON /\n * MINION_TICK job token with the PRIVATE half, and every app + minion verifies it against\n * the PUBLIC half (distributed to each app's `PLATFORM_CRONTABS_BATCHES_MANAGER` verify\n * slot by apps-manager). These were previously absent from the whole minting/emission\n * chain — so crontabs silently fell back to another key and apps handed out an EMPTY verify\n * key, dead-lettering every scheduled tick. Minted by `buildCredentials`, emitted here.\n */\n PLATFORM_CRONTABS_BATCHES_MANAGER_PRIVATE_KEY = 'PLATFORM_CRONTABS_BATCHES_MANAGER_PRIVATE_KEY',\n PLATFORM_CRONTABS_BATCHES_MANAGER_PUBLIC_KEY = 'PLATFORM_CRONTABS_BATCHES_MANAGER_PUBLIC_KEY',\n PLATFORM_APPLICATION_PRIMARY_SECRET = 'PLATFORM_APPLICATION_PRIMARY_SECRET',\n PLATFORM_ADMIN_SECRET = 'PLATFORM_ADMIN_SECRET',\n}\n\nexport enum PlatformAdminEnvKey {\n ADMIN_EMAIL = 'ADMIN_EMAIL',\n ADMIN_PASSWORD = 'ADMIN_PASSWORD',\n ADMIN_FIRST_NAME = 'ADMIN_FIRST_NAME',\n ADMIN_LAST_NAME = 'ADMIN_LAST_NAME',\n /*\n * The SECOND platform administrator — the one who APPROVES an application-wide access grant.\n *\n * `applicationAccessGrantApproverIsDistinct` refuses an approver who is the requester, and refuses\n * an absent approver, and the application-scoped grant has deliberately no auto-approval branch.\n * So a platform seeded with one administrator cannot read ANY application-wide surface — the\n * refusal shipped and the party who discharges it did not (#575).\n *\n * Four keys rather than a serialized payload, mirroring the administrator's own four: each is a\n * scalar read once at INIT, and a JSON blob would make a partially-stated identity a parse error\n * instead of the four named refusals INIT already gives for the first administrator.\n */\n APPROVER_EMAIL = 'APPROVER_EMAIL',\n APPROVER_PASSWORD = 'APPROVER_PASSWORD',\n APPROVER_FIRST_NAME = 'APPROVER_FIRST_NAME',\n APPROVER_LAST_NAME = 'APPROVER_LAST_NAME',\n GITHUB_WILDO_APPS_DEFAULT_ORG_URL = 'GITHUB_WILDO_APPS_DEFAULT_ORG_URL',\n GITHUB_WILDO_APPS_ADMIN_USER = 'GITHUB_WILDO_APPS_ADMIN_USER',\n GITHUB_WILDO_APPS_ADMIN_TOKEN = 'GITHUB_WILDO_APPS_ADMIN_TOKEN',\n}\n\nexport enum PlatformKubernetesEnvKey {\n K8S_NAMESPACE = 'K8S_NAMESPACE',\n}\n\n/**\n * Ingress / reverse-proxy env keys.\n *\n * `WILDO_PUBLIC_DOMAIN` is the runtime-agnostic public hostname that\n * apps-manager uses to compose ingress URLs and that backend services\n * use to derive cookie `Domain` and CORS allowlist entries. It applies\n * to BOTH Kubernetes and Docker Compose deployments — naming it\n * `K8S_*` (as in the previous `K8S_EXTERNAL_BASE_DOMAIN`) was a\n * conflation; see `external-public-domain-rename.md`.\n */\nexport enum PlatformIngressEnvKey {\n WILDO_PUBLIC_DOMAIN = 'WILDO_PUBLIC_DOMAIN',\n /**\n * JSON-serialized `WildoInfraEnvConfig.serviceHosts` map (`<serviceKey> →\n * subdomain chain`, `''` = apex). Projected by `env-vars-builder` so\n * apps-manager can resolve each customer-app service's public host via\n * `buildServicePublicHost` (serviceHosts-driven ingress, no fan-out). Absent\n * / empty ⇒ every key falls back to `<serviceKey>.<publicDomain>`.\n */\n WILDO_SERVICE_HOSTS = 'WILDO_SERVICE_HOSTS',\n}\n\n/**\n * Logging env-var contract (Slice 3.5).\n *\n * Both keys are projected from `WildoInfraEnvConfig.logging.*` by\n * `env-vars-builder` for every long-running platform/application\n * process, and consumed by `LoggerService.loadConfiguration` in\n * `saas-backend-lib`. Missing values fall back to the LoggerService\n * defaults (level `debug`, pino-pretty auto-detect by environment),\n * matching the optional shape on `WildoLoggingConfigSchema`.\n *\n * `LOG_LEVEL` accepts the lowercase pino levels\n * (`debug | info | warn | error`); the `WildoLoggingConfigSchema` enum\n * is the authoritative validation surface upstream so an invalid\n * value can never reach `process.env`.\n *\n * `LOG_FORMATTED_CONSOLE_ERRORS` is a stringified boolean\n * (`'true' | 'false'`) that overrides the LoggerService's\n * environment-derived pino-pretty / JSON branch. When unset,\n * LoggerService keeps its existing auto-detect behavior (pino-pretty\n * iff `APPLICATION_ENV === 'development'`).\n */\nexport enum PlatformLoggingEnvKey {\n LOG_LEVEL = 'LOG_LEVEL',\n LOG_FORMATTED_CONSOLE_ERRORS = 'LOG_FORMATTED_CONSOLE_ERRORS',\n}\n\n/**\n * OTLP telemetry env-var contract (Slice 2 Phase 5).\n *\n * Projected from `WildoInfraEnvConfig.observability.*` + the selected\n * `OBSERVABILITY_TELEMETRY` provider by `env-vars-builder`, and read by the\n * `otel-preload.ts` OTel SDK in `saas-backend-lib` BEFORE app code. These are the\n * STANDARD OpenTelemetry env vars — the preload + OTLP exporters consume them\n * directly, so the engine stays provider-agnostic.\n *\n * `OTEL_ENABLED` is the master gate (`'true'`). `OTEL_EXPORTER_OTLP_ENDPOINT` is the\n * OTLP/HTTP collector/ingest URL. `OTEL_EXPORTER_OTLP_HEADERS` carries the provider auth\n * (e.g. `Authorization=Bearer <source-token>`) — SENSITIVE, routed to the K8s Secret.\n * `OTEL_SERVICE_NAME` + `OTEL_RESOURCE_ATTRIBUTES` carry the resource identity\n * (`service.name`, `service.version`, `deployment.environment`).\n */\nexport enum PlatformObservabilityEnvKey {\n OTEL_ENABLED = 'OTEL_ENABLED',\n OTEL_EXPORTER_OTLP_ENDPOINT = 'OTEL_EXPORTER_OTLP_ENDPOINT',\n OTEL_EXPORTER_OTLP_HEADERS = 'OTEL_EXPORTER_OTLP_HEADERS',\n OTEL_SERVICE_NAME = 'OTEL_SERVICE_NAME',\n OTEL_RESOURCE_ATTRIBUTES = 'OTEL_RESOURCE_ATTRIBUTES',\n /**\n * LLM-call observability (a SEPARATE signal from OTLP telemetry — PostHog\n * `$ai_generation` via the engine's `AgentCallTraceSink`): opt-in forwarding\n * of prompt + completion content (`$ai_input` / `$ai_output_choices`). PII\n * shipped to a third party, hence opt-in per environment. Read by the\n * engine's lazy LLM-obs sink resolution, NOT the OTLP preload.\n */\n WILDO_LLM_OBS_CAPTURE_CONTENT = 'WILDO_LLM_OBS_CAPTURE_CONTENT',\n /** LLM-call observability sampling fraction (0..1); omitted = capture all. */\n WILDO_LLM_OBS_SAMPLE_RATE = 'WILDO_LLM_OBS_SAMPLE_RATE',\n}\n\n/**\n * Per-environment external-provider SELECTION override env-var contract\n * (2026-07-10).\n *\n * Projected from `WildoInfraEnvConfig.providerSelection` by `env-vars-builder`\n * as a single serialized JSON payload (mirrors how `APPLICATION_RUNTIME_ENDPOINTS`\n * carries a structured payload in one var). Read by\n * `ExternalProvidersRegistryBackendService` at capability-resolution time to\n * override the app-wide `providers.scopes.backend.selection[capability]`\n * primary/substitutes for THIS environment only. Absent => the SaaS-config\n * selection applies unchanged.\n *\n * Shape: `{ \"<EngineCapability>\": { \"primary\": \"<ref>\", \"whenUnavailable\"?: [\"<ref>\"] } }`.\n */\nexport enum PlatformProviderSelectionEnvKey {\n WILDO_PROVIDER_SELECTION_OVERRIDES = 'WILDO_PROVIDER_SELECTION_OVERRIDES',\n}\n\n/**\n * Per-environment email env-var contract.\n *\n * Projected from `WildoInfraEnvConfig.email` by `env-vars-builder`, one scalar per value (the documentation-site shape:\n * a single string needs no serialized payload). Read by the backend's inbound email services through\n * `resolveInboundEmailConfig`, where it wins over `email.inbound.sharedDomain` in the backend configuration. Absent =>\n * the authored value applies unchanged.\n */\nexport enum PlatformEmailEnvKey {\n WILDO_INBOUND_EMAIL_SHARED_DOMAIN = 'WILDO_INBOUND_EMAIL_SHARED_DOMAIN',\n}\n\n/**\n * The ownership-DNS stand-in env-var contract (#2519).\n *\n * Projected from `WildoInfraEnvConfig.ownershipDnsStandIn.baseUrl` (local-only) by `env-vars-builder`. Read by the\n * backend's `DnsTxtLookupBackendService` — the one door every domain-ownership challenge asks DNS through — which\n * honours it only in a declared development or test runtime, and refuses to start with it set anywhere else. Absent =>\n * every ownership challenge asks public DNS.\n */\nexport enum PlatformOwnershipDnsEnvKey {\n WILDO_OWNERSHIP_DNS_STAND_IN_URL = 'WILDO_OWNERSHIP_DNS_STAND_IN_URL',\n}\n\n/**\n * Documentation-site BUILD env-var contract.\n *\n * Projected from `WildoInfraEnvConfig.documentationSite` by `env-vars-builder`. Unlike the\n * other families here these are consumed by a BUILD rather than a running service: a\n * Docusaurus bundle compiles its origins in, so the values must be present when the site is\n * built, and a bundle built with the wrong ones silently points every reader at the wrong\n * host instead of failing.\n *\n * The application's `docusaurus.config.ts` refuses to complete a production build when they\n * are unset, and falls back to local defaults otherwise. Before this contract existed the\n * only way to satisfy that guard was to remember three variables on a build command line,\n * so they appeared in no environment definition anywhere.\n *\n * Emitted individually rather than as one serialized payload (the `providerSelection`\n * shape): each is a single scalar read directly by the config, and a JSON blob would force\n * the docs config to parse a payload to recover three strings.\n */\nexport enum PlatformDocumentationSiteEnvKey {\n WILDO_DOCS_API_BASE_URL = 'WILDO_DOCS_API_BASE_URL',\n WILDO_DOCS_APP_URL = 'WILDO_DOCS_APP_URL',\n WILDO_DOCS_FRONTEND_SERVICE_NAME = 'WILDO_DOCS_FRONTEND_SERVICE_NAME',\n}\n\nexport const PlatformDocumentationSiteEnvKeys = PlatformDocumentationSiteEnvKey;\nexport const PlatformProcessEnvKeys = PlatformProcessEnvKey;\nexport const PlatformServiceUrlEnvKeys = PlatformServiceUrlEnvKey;\nexport const PlatformInfrastructureEnvKeys = PlatformInfrastructureEnvKey;\nexport const PlatformSecurityEnvKeys = PlatformSecurityEnvKey;\nexport const PlatformAdminEnvKeys = PlatformAdminEnvKey;\nexport const PlatformKubernetesEnvKeys = PlatformKubernetesEnvKey;\nexport const PlatformIngressEnvKeys = PlatformIngressEnvKey;\nexport const PlatformLoggingEnvKeys = PlatformLoggingEnvKey;\nexport const PlatformObservabilityEnvKeys = PlatformObservabilityEnvKey;\nexport const PlatformProviderSelectionEnvKeys = PlatformProviderSelectionEnvKey;\nexport const PlatformEmailEnvKeys = PlatformEmailEnvKey;\nexport const PlatformOwnershipDnsEnvKeys = PlatformOwnershipDnsEnvKey;\n\n/**\n * Resolve a required environment variable value or throw a clear,\n * actionable error.\n *\n * This is the canonical fail-closed reader for platform runtime env vars.\n * It exists to replace silent string-fallback patterns like\n * `process.env.X || 'localhost'` / `process.env.Y || 'local'` /\n * `process.env.Z || 'http://localhost:NNNN'` in apps-manager and any\n * other platform service. Those patterns let production processes start\n * silently mis-wired (e.g. talking to `localhost` instead of the real\n * cluster service) and surface as opaque downstream errors much later.\n *\n * Contract:\n * - Empty strings are treated as missing (a `KEY=` line in `.env` is a\n * misconfiguration, not an \"intentional empty value\").\n * - The thrown error names both the env var and the consuming context\n * (e.g. `\"Missing required env var REDIS_HOST (consumer:\n * PlatformInfrastructureManagerService.provisionAllPlatformConfigs)\"`).\n * - This helper does NOT decide whether a key is sensitive — that lives\n * in `PLATFORM_RUNTIME_SENSITIVE_ENV_KEYS`. Callers are responsible\n * for not logging the resolved value when sensitive.\n *\n * Usage:\n * const host = requireEnv(\n * PlatformInfrastructureEnvKey.REDIS_HOST,\n * 'PlatformInfrastructureManagerService.provisionAllPlatformConfigs',\n * );\n *\n * Local-development defaults must live in `secrets.json` /\n * `infrastructure/<env>/secrets/` and be loaded into `process.env` by\n * the CLI / K8s wiring, NOT in production code paths.\n */\nexport function requireEnv(envName: string, consumerContext: string): string {\n const raw = process.env[envName];\n if (raw === undefined || raw === '') {\n throw new Error(\n `Missing required environment variable ${envName} (consumer: ${consumerContext}). ` +\n `Local development defaults belong in secrets.json / infrastructure/<env>/secrets/, ` +\n `not in production code fallbacks.`,\n );\n }\n return raw;\n}\n\nexport const PLATFORM_RUNTIME_SENSITIVE_ENV_KEYS = new Set<string>([\n PlatformInfrastructureEnvKey.MONGO_CONNECT_URL,\n PlatformInfrastructureEnvKey.MONGO_PLATFORM_URL,\n PlatformInfrastructureEnvKey.REDIS_ADMIN_PASSWORD,\n PlatformInfrastructureEnvKey.RABBITMQ_ADMIN_PASSWORD,\n PlatformInfrastructureEnvKey.STORAGE_ACCESS_KEY,\n PlatformInfrastructureEnvKey.STORAGE_SECRET_KEY,\n PlatformInfrastructureEnvKey.PG_ADMIN_PASSWORD,\n PlatformInfrastructureEnvKey.PG_CONNECT_URL,\n PlatformInfrastructureEnvKey.IMMUDB_ADMIN_PASSWORD,\n PlatformSecurityEnvKey.PLATFORM_APPS_MANAGER_PRIVATE_KEY,\n PlatformSecurityEnvKey.PLATFORM_APPS_MANAGER_PUBLIC_KEY,\n PlatformSecurityEnvKey.PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY,\n PlatformSecurityEnvKey.PLATFORM_KEY_ENCRYPTION_ROOT,\n PlatformSecurityEnvKey.PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT,\n PlatformSecurityEnvKey.PLATFORM_KEY_VAULT_SIGNER_TOKEN,\n PlatformSecurityEnvKey.PLATFORM_KEY_VAULT_OPERATOR_TOKEN,\n PlatformSecurityEnvKey.PLATFORM_KEY_PKCS11_PIN,\n PlatformSecurityEnvKey.PLATFORM_CRONTABS_BATCHES_MANAGER_PRIVATE_KEY,\n PlatformSecurityEnvKey.PLATFORM_CRONTABS_BATCHES_MANAGER_PUBLIC_KEY,\n PlatformSecurityEnvKey.PLATFORM_APPLICATION_PRIMARY_SECRET,\n PlatformSecurityEnvKey.PLATFORM_ADMIN_SECRET,\n PlatformAdminEnvKey.ADMIN_PASSWORD,\n PlatformAdminEnvKey.GITHUB_WILDO_APPS_ADMIN_TOKEN,\n // OTLP auth header carries the provider source token (e.g. a BetterStack Bearer token) →\n // secret (K8s Secret, docker env_file). The sibling OTEL_ENABLED / OTEL_EXPORTER_OTLP_ENDPOINT /\n // OTEL_SERVICE_NAME / OTEL_RESOURCE_ATTRIBUTES are non-secret config and deliberately stay out.\n PlatformObservabilityEnvKey.OTEL_EXPORTER_OTLP_HEADERS,\n]);\n"]}
1
+ {"version":3,"file":"platform-runtime-env.contracts.js","sourceRoot":"","sources":["../../../src/bootstrap/platform-runtime-env.contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAN,IAAY,qBAmBX;AAnBD,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,sCAAa,CAAA;IACb,sDAA6B,CAAA;IAC7B;;;;;;;;;;OAUG;IACH,8DAAqC,CAAA;IACrC,4EAAmD,CAAA;IACnD,4DAAmC,CAAA;IACnC,gEAAuC,CAAA;AACzC,CAAC,EA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ACnF,qFAAqF;YACrF,mCAAmC,CACpC,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,IAAI,GAAG,CAAS;IACjE,4BAA4B,CAAC,iBAAiB;IAC9C,4BAA4B,CAAC,kBAAkB;IAC/C,4BAA4B,CAAC,oBAAoB;IACjD,4BAA4B,CAAC,uBAAuB;IACpD,4BAA4B,CAAC,kBAAkB;IAC/C,4BAA4B,CAAC,kBAAkB;IAC/C,4BAA4B,CAAC,iBAAiB;IAC9C,4BAA4B,CAAC,cAAc;IAC3C,4BAA4B,CAAC,qBAAqB;IAClD,sBAAsB,CAAC,iCAAiC;IACxD,sBAAsB,CAAC,gCAAgC;IACvD,sBAAsB,CAAC,kDAAkD;IACzE,sBAAsB,CAAC,4BAA4B;IACnD,sBAAsB,CAAC,qCAAqC;IAC5D,sBAAsB,CAAC,+BAA+B;IACtD,sBAAsB,CAAC,iCAAiC;IACxD,sBAAsB,CAAC,uBAAuB;IAC9C,sBAAsB,CAAC,6CAA6C;IACpE,sBAAsB,CAAC,4CAA4C;IACnE,sBAAsB,CAAC,mCAAmC;IAC1D,sBAAsB,CAAC,qBAAqB;IAC5C,mBAAmB,CAAC,cAAc;IAClC,mBAAmB,CAAC,6BAA6B;IACjD,yFAAyF;IACzF,iGAAiG;IACjG,gGAAgG;IAChG,2BAA2B,CAAC,0BAA0B;CACvD,CAAC,CAAC","sourcesContent":["/**\n * Shared environment contract for platform runtime processes.\n *\n * This captures the canonical env-var vocabulary used by CLI-generated platform\n * `.env` material and by platform services such as apps-manager at runtime.\n * Keep these keys declarative and cross-executor: the contract owns names and\n * sensitivity classification, while writers/readers own behavior.\n */\n\nexport enum PlatformProcessEnvKey {\n HOST = 'HOST',\n PORT = 'PORT',\n SERVICE_NAME = 'SERVICE_NAME',\n /**\n * The APPLICATION this process belongs to, as its slug (#1177).\n *\n * Distinct from {@link SERVICE_NAME}, which names the PROCESS — `wonder-todos-backend-api`,\n * `marketing-scrapper`, `my-node-worker`. Only the first of those contains the application's name,\n * which is why the logger cannot derive the application from it: a minion and a worker are named\n * after themselves.\n *\n * Emitted for APPLICATION runtimes only (backend, minion, worker, companion). The platform's own\n * services belong to no application and deliberately do not carry it.\n */\n APPLICATION_SLUG = 'APPLICATION_SLUG',\n PLATFORM_ENVIRONMENT_ID = 'PLATFORM_ENVIRONMENT_ID',\n APPLICATION_ENV = 'APPLICATION_ENV',\n APPS_MANAGER_MODE = 'APPS_MANAGER_MODE',\n}\n\nexport enum PlatformServiceUrlEnvKey {\n PLATFORM_APPS_MANAGER_URL = 'PLATFORM_APPS_MANAGER_URL',\n PLATFORM_CRONTABS_BATCHES_MANAGER_URL = 'PLATFORM_CRONTABS_BATCHES_MANAGER_URL',\n PLATFORM_MODULE_REGISTRY_URL = 'PLATFORM_MODULE_REGISTRY_URL',\n}\n\nexport enum PlatformInfrastructureEnvKey {\n MONGO_CONNECT_URL = 'MONGO_CONNECT_URL',\n MONGO_PLATFORM_URL = 'MONGO_PLATFORM_URL',\n BASE_MONGO_SERVER_URL = 'BASE_MONGO_SERVER_URL',\n REDIS_HOST = 'REDIS_HOST',\n REDIS_PORT = 'REDIS_PORT',\n /**\n * Optional Redis logical database index (0–15). Emitted only when the\n * author sets `backingServices.redis.database` in `wildo.infra.<env>.config.ts`.\n * Consumers default to DB 0 when this var is missing.\n */\n REDIS_DATABASE = 'REDIS_DATABASE',\n REDIS_ADMIN_USER = 'REDIS_ADMIN_USER',\n REDIS_ADMIN_PASSWORD = 'REDIS_ADMIN_PASSWORD',\n RABBITMQ_HOST = 'RABBITMQ_HOST',\n RABBITMQ_PORT = 'RABBITMQ_PORT',\n RABBITMQ_MANAGEMENT_PORT = 'RABBITMQ_MANAGEMENT_PORT',\n /**\n * Optional RabbitMQ virtual host. Emitted only when the author sets\n * `backingServices.rabbitmq.vhost` in `wildo.infra.<env>.config.ts`.\n * Consumers default to `/` (the RabbitMQ root vhost) when missing.\n */\n RABBITMQ_VHOST = 'RABBITMQ_VHOST',\n RABBITMQ_ADMIN_USERNAME = 'RABBITMQ_ADMIN_USERNAME',\n RABBITMQ_ADMIN_PASSWORD = 'RABBITMQ_ADMIN_PASSWORD',\n STORAGE_PROVIDER = 'STORAGE_PROVIDER',\n /**\n * S3-compatible endpoint **hostname** (NOT a URL); see the matching\n * JSDoc on `ApplicationBackendDataEnvKey.STORAGE_ENDPOINT` for the\n * full contract (Slice 3.2 audit L-4). Kept here for the\n * platform-runtime side (apps-manager) — same\n * host:port-only invariant.\n */\n STORAGE_ENDPOINT = 'STORAGE_ENDPOINT',\n STORAGE_PORT = 'STORAGE_PORT',\n STORAGE_USE_SSL = 'STORAGE_USE_SSL',\n STORAGE_BUCKET = 'STORAGE_BUCKET',\n STORAGE_ACCESS_KEY = 'STORAGE_ACCESS_KEY',\n STORAGE_SECRET_KEY = 'STORAGE_SECRET_KEY',\n /**\n * The role apps-manager's object-storage broker names when it calls STS `AssumeRole` (#2172), as an ARN.\n * apps-manager only. Optional: a MinIO-compatible store issues a session for the CALLING key and names no role,\n * while AWS STS (and SeaweedFS, Ceph RGW) require one, and the broker refuses issuance against such a store when\n * this is absent. Rendered from `platformStorage.stsRoleArn` in the environment's infra file.\n */\n STORAGE_STS_ROLE_ARN = 'STORAGE_STS_ROLE_ARN',\n PG_HOST = 'PG_HOST',\n PG_PORT = 'PG_PORT',\n PG_ADMIN_USER = 'PG_ADMIN_USER',\n PG_ADMIN_PASSWORD = 'PG_ADMIN_PASSWORD',\n /**\n * The MAINTENANCE database the admin pool connects to in order to provision others — NOT the\n * application's database and NOT the container's initdb database (that is\n * `POSTGRES_ADMIN_DATABASE`, a different key on a different transport). Emitted from\n * `PLATFORM_POSTGRES_MAINTENANCE_DATABASE`, whose JSDoc carries the three-way distinction and\n * the silent outage that conflating the first two produced.\n */\n PG_ADMIN_DATABASE = 'PG_ADMIN_DATABASE',\n PG_SSL_MODE = 'PG_SSL_MODE',\n /**\n * The platform's OWN PostgreSQL database — a full connection URL, the exact mirror of\n * `MONGO_CONNECT_URL` for a PostgreSQL-engined platform (D7 of the incremental-migrations plan).\n *\n * Distinct from the `PG_ADMIN_*` family above, which is PROVISIONING material (the admin\n * connection apps-manager uses to create per-application databases/roles). This key is the\n * database apps-manager's own resources live in. One URL rather than an address/credential\n * split on purpose: the platform pre-connects from env BEFORE any config document can be read\n * (the same chicken-and-egg `MONGO_CONNECT_URL` solves — the config documents live in the very\n * database this key addresses), so the whole answer must arrive in one env-delivered value.\n *\n * Emitted by the CLI's platform env builder only when the environment's\n * `database.engine === POSTGRESQL`. Absent on a Mongo-engined platform.\n */\n PG_CONNECT_URL = 'PG_CONNECT_URL',\n /**\n * The self-hosted immudb server apps-manager provisions each application's audit database and user on (#1696):\n * host and gRPC port as apps-manager reaches it, and the server's built-in `immudb` SYSADMIN password — a\n * framework-managed PLATFORM secret (`immudb.adminPassword`), written into apps-manager's environment only.\n * No application receives it: each application writes with the confined user apps-manager minted for it.\n * Absent on a platform that self-hosts no immudb; an application declaring `immudb: { source: SELF }` is then\n * refused at registration (`NOT_HELD_BY_PLATFORM`), like every minting kind whose admin client is missing.\n */\n IMMUDB_ADMIN_HOST = 'IMMUDB_ADMIN_HOST',\n IMMUDB_ADMIN_PORT = 'IMMUDB_ADMIN_PORT',\n IMMUDB_ADMIN_PASSWORD = 'IMMUDB_ADMIN_PASSWORD',\n}\n\nexport enum PlatformSecurityEnvKey {\n PLATFORM_APPS_MANAGER_PRIVATE_KEY = 'PLATFORM_APPS_MANAGER_PRIVATE_KEY',\n PLATFORM_APPS_MANAGER_PUBLIC_KEY = 'PLATFORM_APPS_MANAGER_PUBLIC_KEY',\n /**\n * apps-manager's RESPONSE key (#2921): the private half that signs every successful answer on the routes application\n * runtimes read (configuration, secrets, worker bootstrap, storage session, runtime-principal token). Its own key,\n * never the {@link PLATFORM_APPS_MANAGER_PRIVATE_KEY} that signs runtime-principal tokens and crontabs requests: one key\n * per purpose (NIST SP 800-57 Part 1 Rev 5 §5.2). Runtimes verify against the public halves carried in\n * `PLATFORM_APPS_MANAGER_RESPONSE_VERIFICATION_KEYS`. Required: apps-manager refuses to start without it, because a\n * response it cannot sign must not be sent (`runtime-response-integrity.ts`).\n */\n PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY = 'PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY',\n /**\n * The platform's key-encryption ROOT (#2891): 32 random bytes, base64url, held by apps-manager alone. Every private\n * key the engine's LOCAL key provider makes (the approval-seal keys among them) is sealed under it with AES-256-GCM\n * before it is stored, so a platform database dump yields no usable private key.\n *\n * Losing it loses every LOCAL private key, and nothing else: the public halves are stored in each application, so\n * every seal already made still verifies. The keys it sealed cannot sign again, and the keyring does not replace them on\n * its own: apps-manager reports them at startup, and an operator who knows the root is gone for good runs\n * `wildo keys rotate --root-lost --reason \"<why>\"` per application, which destroys them and makes fresh ones. A new\n * root never opens the old keys, so restore it from backup before minting another. Back it up with the platform's other\n * secrets. Every lane provides it (`wildo local doctor` reports it missing). apps-manager starts without it, so a stack\n * predating it keeps running, and the keyring refuses its first operation (`PROVIDER_UNAVAILABLE`); a MALFORMED value is\n * refused at startup.\n */\n PLATFORM_KEY_ENCRYPTION_ROOT = 'PLATFORM_KEY_ENCRYPTION_ROOT',\n /**\n * The root a rotation replaced (#2891), kept only until every sealed key has been re-sealed under the current one.\n * apps-manager opens a key under whichever root sealed it and re-seals it under the current root. Optional.\n */\n PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT = 'PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT',\n /**\n * The platform's HashiCorp Vault or OpenBao (#2933), where apps-manager runs the `vault-transit` (REMOTE) and\n * `vault-kv` (RETRIEVED) key providers. apps-manager alone holds these: no application runtime ever reaches the Vault.\n * All optional; a platform without a Vault leaves them unset, and a binding to a Vault provider is refused\n * (`PROVIDER_UNAVAILABLE`). The address and BOTH tokens are needed together; a partial set registers nothing and is\n * reported at apps-manager's boot, while the LOCAL provider keeps serving.\n *\n * Two tokens, for least privilege, under the policies `vault-custody.contracts` states (`vaultSignerPolicy`,\n * `vaultOperatorPolicy`): the SIGNER token may sign (`transit/sign/<prefix>*`) and read keys and key metadata; the\n * OPERATOR token performs lifecycle acts (create, rotate, config, delete, KV write and destroy) and is denied signing\n * and reading key material. Neither can make a key leave Vault: the signer is denied `/config`, `transit/export/*` and\n * `transit/backup/*`, and the operator may not send `exportable` or `allow_plaintext_backup` at all.\n * Not `VAULT_ADDR` / `VAULT_TOKEN`: those are read by Vault's own CLI and SDKs, and a stray one would be picked up.\n */\n PLATFORM_KEY_VAULT_ADDRESS = 'PLATFORM_KEY_VAULT_ADDRESS',\n PLATFORM_KEY_VAULT_SIGNER_TOKEN = 'PLATFORM_KEY_VAULT_SIGNER_TOKEN',\n PLATFORM_KEY_VAULT_OPERATOR_TOKEN = 'PLATFORM_KEY_VAULT_OPERATOR_TOKEN',\n /** Vault Enterprise namespace (`ns1/ns2/`). Optional. */\n PLATFORM_KEY_VAULT_NAMESPACE = 'PLATFORM_KEY_VAULT_NAMESPACE',\n /** The Transit mount (`transit` when unset). */\n PLATFORM_KEY_VAULT_TRANSIT_MOUNT = 'PLATFORM_KEY_VAULT_TRANSIT_MOUNT',\n /** The KV v2 mount (`secret` when unset). */\n PLATFORM_KEY_VAULT_KV_MOUNT = 'PLATFORM_KEY_VAULT_KV_MOUNT',\n /** What every key and path apps-manager makes is named with, so the Vault policies can be scoped to it (`wildo-`). */\n PLATFORM_KEY_VAULT_KEY_NAME_PREFIX = 'PLATFORM_KEY_VAULT_KEY_NAME_PREFIX',\n /**\n * The platform's cloud KMS providers (#2896): `aws-kms`, `google-cloud-kms`, `azure-key-vault`. apps-manager alone\n * holds them, and authenticates by its WORKLOAD identity (IAM role for service accounts, GKE workload identity, an\n * Azure managed identity), so none of these is a secret. Each provider acts as TWO identities, as the Vault providers\n * do with two tokens: a SIGNER that may only read keys and sign, and an OPERATOR that creates, disables and destroys\n * them and may never sign. Every key of one provider is needed together; a partial set registers nothing and is\n * reported at apps-manager's boot.\n *\n * AWS: apps-manager's own identity may only `sts:AssumeRole` the two roles named here.\n */\n PLATFORM_KEY_AWS_KMS_REGION = 'PLATFORM_KEY_AWS_KMS_REGION',\n PLATFORM_KEY_AWS_KMS_SIGNER_ROLE_ARN = 'PLATFORM_KEY_AWS_KMS_SIGNER_ROLE_ARN',\n PLATFORM_KEY_AWS_KMS_OPERATOR_ROLE_ARN = 'PLATFORM_KEY_AWS_KMS_OPERATOR_ROLE_ARN',\n /** A KMS endpoint other than the region's public one (a VPC interface endpoint). Optional. */\n PLATFORM_KEY_AWS_KMS_ENDPOINT = 'PLATFORM_KEY_AWS_KMS_ENDPOINT',\n /** Google: the key ring (`projects/<p>/locations/<l>/keyRings/<r>`) and the two service accounts apps-manager impersonates. */\n PLATFORM_KEY_GOOGLE_KMS_KEY_RING = 'PLATFORM_KEY_GOOGLE_KMS_KEY_RING',\n PLATFORM_KEY_GOOGLE_KMS_SIGNER_SERVICE_ACCOUNT = 'PLATFORM_KEY_GOOGLE_KMS_SIGNER_SERVICE_ACCOUNT',\n PLATFORM_KEY_GOOGLE_KMS_OPERATOR_SERVICE_ACCOUNT = 'PLATFORM_KEY_GOOGLE_KMS_OPERATOR_SERVICE_ACCOUNT',\n /** `HSM` (the default) or `SOFTWARE`: the protection level new keys are created at. */\n PLATFORM_KEY_GOOGLE_KMS_PROTECTION_LEVEL = 'PLATFORM_KEY_GOOGLE_KMS_PROTECTION_LEVEL',\n /** Azure: the vault (or Managed HSM) URL and the client ids of the two user-assigned managed identities. */\n PLATFORM_KEY_AZURE_KEY_VAULT_URL = 'PLATFORM_KEY_AZURE_KEY_VAULT_URL',\n PLATFORM_KEY_AZURE_KEY_VAULT_SIGNER_CLIENT_ID = 'PLATFORM_KEY_AZURE_KEY_VAULT_SIGNER_CLIENT_ID',\n PLATFORM_KEY_AZURE_KEY_VAULT_OPERATOR_CLIENT_ID = 'PLATFORM_KEY_AZURE_KEY_VAULT_OPERATOR_CLIENT_ID',\n /** `true` (the default) makes new keys `EC-HSM` (a Premium vault or Managed HSM); `false` makes them software `EC` keys. */\n PLATFORM_KEY_AZURE_KEY_VAULT_HSM = 'PLATFORM_KEY_AZURE_KEY_VAULT_HSM',\n /**\n * The Log Analytics workspace the vault's diagnostic setting sends its `AuditEvent` logs to, read hourly to corroborate\n * the custodian's signatures (#2896). Optional: without it, no Azure hour is compared, and apps-manager says so at boot.\n */\n PLATFORM_KEY_AZURE_KEY_VAULT_LOG_ANALYTICS_WORKSPACE_ID = 'PLATFORM_KEY_AZURE_KEY_VAULT_LOG_ANALYTICS_WORKSPACE_ID',\n /**\n * The platform's dedicated HSM over PKCS#11 (#2934): the vendor's module (a shared library in apps-manager's image or\n * mounted into it), the token's label, and the user PIN. The module path and label come from\n * `platformKeyManagement.pkcs11`; the PIN from `secrets.json` (`platformKeyPkcs11.pin`), operator-typed, and it is the\n * only secret here. All three or none; a partial set registers nothing and is reported at apps-manager's boot.\n */\n PLATFORM_KEY_PKCS11_MODULE_PATH = 'PLATFORM_KEY_PKCS11_MODULE_PATH',\n PLATFORM_KEY_PKCS11_TOKEN_LABEL = 'PLATFORM_KEY_PKCS11_TOKEN_LABEL',\n PLATFORM_KEY_PKCS11_PIN = 'PLATFORM_KEY_PKCS11_PIN',\n /** Comma-separated token models the operator states are hardware (`CK_TOKEN_INFO.model`); none: every key is SOFTWARE. */\n PLATFORM_KEY_PKCS11_HARDWARE_TOKEN_MODELS = 'PLATFORM_KEY_PKCS11_HARDWARE_TOKEN_MODELS',\n /**\n * The crontabs-batches-manager's dedicated P2P signing keypair. The design is\n * per-service (mirrors apps-manager): the crontabs scheduler signs each SCHEDULED_CRON /\n * MINION_TICK job token with the PRIVATE half, and every app + minion verifies it against\n * the PUBLIC half (distributed to each app's `PLATFORM_CRONTABS_BATCHES_MANAGER` verify\n * slot by apps-manager). These were previously absent from the whole minting/emission\n * chain — so crontabs silently fell back to another key and apps handed out an EMPTY verify\n * key, dead-lettering every scheduled tick. Minted by `buildCredentials`, emitted here.\n */\n PLATFORM_CRONTABS_BATCHES_MANAGER_PRIVATE_KEY = 'PLATFORM_CRONTABS_BATCHES_MANAGER_PRIVATE_KEY',\n PLATFORM_CRONTABS_BATCHES_MANAGER_PUBLIC_KEY = 'PLATFORM_CRONTABS_BATCHES_MANAGER_PUBLIC_KEY',\n PLATFORM_APPLICATION_PRIMARY_SECRET = 'PLATFORM_APPLICATION_PRIMARY_SECRET',\n PLATFORM_ADMIN_SECRET = 'PLATFORM_ADMIN_SECRET',\n}\n\nexport enum PlatformAdminEnvKey {\n ADMIN_EMAIL = 'ADMIN_EMAIL',\n ADMIN_PASSWORD = 'ADMIN_PASSWORD',\n ADMIN_FIRST_NAME = 'ADMIN_FIRST_NAME',\n ADMIN_LAST_NAME = 'ADMIN_LAST_NAME',\n /*\n * The SECOND platform administrator — the one who APPROVES an application-wide access grant.\n *\n * `applicationAccessGrantApproverIsDistinct` refuses an approver who is the requester, and refuses\n * an absent approver, and the application-scoped grant has deliberately no auto-approval branch.\n * So a platform seeded with one administrator cannot read ANY application-wide surface — the\n * refusal shipped and the party who discharges it did not (#575).\n *\n * Four keys rather than a serialized payload, mirroring the administrator's own four: each is a\n * scalar read once at INIT, and a JSON blob would make a partially-stated identity a parse error\n * instead of the four named refusals INIT already gives for the first administrator.\n */\n APPROVER_EMAIL = 'APPROVER_EMAIL',\n APPROVER_PASSWORD = 'APPROVER_PASSWORD',\n APPROVER_FIRST_NAME = 'APPROVER_FIRST_NAME',\n APPROVER_LAST_NAME = 'APPROVER_LAST_NAME',\n GITHUB_WILDO_APPS_DEFAULT_ORG_URL = 'GITHUB_WILDO_APPS_DEFAULT_ORG_URL',\n GITHUB_WILDO_APPS_ADMIN_USER = 'GITHUB_WILDO_APPS_ADMIN_USER',\n GITHUB_WILDO_APPS_ADMIN_TOKEN = 'GITHUB_WILDO_APPS_ADMIN_TOKEN',\n}\n\nexport enum PlatformKubernetesEnvKey {\n K8S_NAMESPACE = 'K8S_NAMESPACE',\n}\n\n/**\n * Ingress / reverse-proxy env keys.\n *\n * `WILDO_PUBLIC_DOMAIN` is the runtime-agnostic public hostname that\n * apps-manager uses to compose ingress URLs and that backend services\n * use to derive cookie `Domain` and CORS allowlist entries. It applies\n * to BOTH Kubernetes and Docker Compose deployments — naming it\n * `K8S_*` (as in the previous `K8S_EXTERNAL_BASE_DOMAIN`) was a\n * conflation.\n */\nexport enum PlatformIngressEnvKey {\n WILDO_PUBLIC_DOMAIN = 'WILDO_PUBLIC_DOMAIN',\n /**\n * JSON-serialized `WildoInfraEnvConfig.serviceHosts` map (`<serviceKey> →\n * subdomain chain`, `''` = apex). Projected by `env-vars-builder` so\n * apps-manager can resolve each customer-app service's public host via\n * `buildServicePublicHost` (serviceHosts-driven ingress, no fan-out). Absent\n * / empty ⇒ every key falls back to `<serviceKey>.<publicDomain>`.\n */\n WILDO_SERVICE_HOSTS = 'WILDO_SERVICE_HOSTS',\n}\n\n/**\n * Logging env-var contract (Slice 3.5).\n *\n * Both keys are projected from `WildoInfraEnvConfig.logging.*` by\n * `env-vars-builder` for every long-running platform/application\n * process, and consumed by `LoggerService.loadConfiguration` in\n * `saas-backend-lib`. Missing values fall back to the LoggerService\n * defaults (level `debug`, pino-pretty auto-detect by environment),\n * matching the optional shape on `WildoLoggingConfigSchema`.\n *\n * `LOG_LEVEL` accepts the lowercase pino levels\n * (`debug | info | warn | error`); the `WildoLoggingConfigSchema` enum\n * is the authoritative validation surface upstream so an invalid\n * value can never reach `process.env`.\n *\n * `LOG_FORMATTED_CONSOLE_ERRORS` is a stringified boolean\n * (`'true' | 'false'`) that overrides the LoggerService's\n * environment-derived pino-pretty / JSON branch. When unset,\n * LoggerService keeps its existing auto-detect behavior (pino-pretty\n * iff `APPLICATION_ENV === 'development'`).\n */\nexport enum PlatformLoggingEnvKey {\n LOG_LEVEL = 'LOG_LEVEL',\n LOG_FORMATTED_CONSOLE_ERRORS = 'LOG_FORMATTED_CONSOLE_ERRORS',\n}\n\n/**\n * OTLP telemetry env-var contract (Slice 2 Phase 5).\n *\n * Projected from `WildoInfraEnvConfig.observability.*` + the selected\n * `OBSERVABILITY_TELEMETRY` provider by `env-vars-builder`, and read by the\n * `otel-preload.ts` OTel SDK in `saas-backend-lib` BEFORE app code. These are the\n * STANDARD OpenTelemetry env vars — the preload + OTLP exporters consume them\n * directly, so the engine stays provider-agnostic.\n *\n * `OTEL_ENABLED` is the master gate (`'true'`). `OTEL_EXPORTER_OTLP_ENDPOINT` is the\n * OTLP/HTTP collector/ingest URL. `OTEL_EXPORTER_OTLP_HEADERS` carries the provider auth\n * (e.g. `Authorization=Bearer <source-token>`) — SENSITIVE, routed to the K8s Secret.\n * `OTEL_SERVICE_NAME` + `OTEL_RESOURCE_ATTRIBUTES` carry the resource identity\n * (`service.name`, `service.version`, `deployment.environment`).\n */\nexport enum PlatformObservabilityEnvKey {\n OTEL_ENABLED = 'OTEL_ENABLED',\n OTEL_EXPORTER_OTLP_ENDPOINT = 'OTEL_EXPORTER_OTLP_ENDPOINT',\n OTEL_EXPORTER_OTLP_HEADERS = 'OTEL_EXPORTER_OTLP_HEADERS',\n OTEL_SERVICE_NAME = 'OTEL_SERVICE_NAME',\n OTEL_RESOURCE_ATTRIBUTES = 'OTEL_RESOURCE_ATTRIBUTES',\n /**\n * LLM-call observability (a SEPARATE signal from OTLP telemetry — PostHog\n * `$ai_generation` via the engine's `AgentCallTraceSink`): opt-in forwarding\n * of prompt + completion content (`$ai_input` / `$ai_output_choices`). PII\n * shipped to a third party, hence opt-in per environment. Read by the\n * engine's lazy LLM-obs sink resolution, NOT the OTLP preload.\n */\n WILDO_LLM_OBS_CAPTURE_CONTENT = 'WILDO_LLM_OBS_CAPTURE_CONTENT',\n /** LLM-call observability sampling fraction (0..1); omitted = capture all. */\n WILDO_LLM_OBS_SAMPLE_RATE = 'WILDO_LLM_OBS_SAMPLE_RATE',\n}\n\n/**\n * Per-environment external-provider SELECTION override env-var contract\n * (2026-07-10).\n *\n * Projected from `WildoInfraEnvConfig.providerSelection` by `env-vars-builder`\n * as a single serialized JSON payload (mirrors how `APPLICATION_RUNTIME_ENDPOINTS`\n * carries a structured payload in one var). Read by\n * `ExternalProvidersRegistryBackendService` at capability-resolution time to\n * override the app-wide `providers.scopes.backend.selection[capability]`\n * primary/substitutes for THIS environment only. Absent => the SaaS-config\n * selection applies unchanged.\n *\n * Shape: `{ \"<EngineCapability>\": { \"primary\": \"<ref>\", \"whenUnavailable\"?: [\"<ref>\"] } }`.\n */\nexport enum PlatformProviderSelectionEnvKey {\n WILDO_PROVIDER_SELECTION_OVERRIDES = 'WILDO_PROVIDER_SELECTION_OVERRIDES',\n}\n\n/**\n * Per-environment email env-var contract.\n *\n * Projected from `WildoInfraEnvConfig.email` by `env-vars-builder`, one scalar per value (the documentation-site shape:\n * a single string needs no serialized payload). Read by the backend's inbound email services through\n * `resolveInboundEmailConfig`, where it wins over `email.inbound.sharedDomain` in the backend configuration. Absent =>\n * the authored value applies unchanged.\n */\nexport enum PlatformEmailEnvKey {\n WILDO_INBOUND_EMAIL_SHARED_DOMAIN = 'WILDO_INBOUND_EMAIL_SHARED_DOMAIN',\n}\n\n/**\n * The ownership-DNS stand-in env-var contract (#2519).\n *\n * Projected from `WildoInfraEnvConfig.ownershipDnsStandIn.baseUrl` (local-only) by `env-vars-builder`. Read by the\n * backend's `DnsTxtLookupBackendService` — the one door every domain-ownership challenge asks DNS through — which\n * honours it only in a declared development or test runtime, and refuses to start with it set anywhere else. Absent =>\n * every ownership challenge asks public DNS.\n */\nexport enum PlatformOwnershipDnsEnvKey {\n WILDO_OWNERSHIP_DNS_STAND_IN_URL = 'WILDO_OWNERSHIP_DNS_STAND_IN_URL',\n}\n\n/**\n * Documentation-site BUILD env-var contract.\n *\n * Read from `WildoInfraEnvConfig.documentationSite`, in the loaded descriptor, by the documentation image's build\n * arguments and the CI workflow (`wildo config sync`); no runtime environment carries them (#2310). Unlike the\n * other families here these are consumed by a BUILD rather than a running service: a\n * Docusaurus bundle compiles its origins in, so the values must be present when the site is\n * built, and a bundle built with the wrong ones silently points every reader at the wrong\n * host instead of failing.\n *\n * The application's `docusaurus.config.ts` refuses to complete a production build when they\n * are unset, and falls back to local defaults otherwise. Before this contract existed the\n * only way to satisfy that guard was to remember three variables on a build command line,\n * so they appeared in no environment definition anywhere.\n *\n * Emitted individually rather than as one serialized payload (the `providerSelection`\n * shape): each is a single scalar read directly by the config, and a JSON blob would force\n * the docs config to parse a payload to recover three strings.\n */\nexport enum PlatformDocumentationSiteEnvKey {\n WILDO_DOCS_API_BASE_URL = 'WILDO_DOCS_API_BASE_URL',\n WILDO_DOCS_APP_URL = 'WILDO_DOCS_APP_URL',\n WILDO_DOCS_FRONTEND_SERVICE_NAME = 'WILDO_DOCS_FRONTEND_SERVICE_NAME',\n}\n\nexport const PlatformDocumentationSiteEnvKeys = PlatformDocumentationSiteEnvKey;\nexport const PlatformProcessEnvKeys = PlatformProcessEnvKey;\nexport const PlatformServiceUrlEnvKeys = PlatformServiceUrlEnvKey;\nexport const PlatformInfrastructureEnvKeys = PlatformInfrastructureEnvKey;\nexport const PlatformSecurityEnvKeys = PlatformSecurityEnvKey;\nexport const PlatformAdminEnvKeys = PlatformAdminEnvKey;\nexport const PlatformKubernetesEnvKeys = PlatformKubernetesEnvKey;\nexport const PlatformIngressEnvKeys = PlatformIngressEnvKey;\nexport const PlatformLoggingEnvKeys = PlatformLoggingEnvKey;\nexport const PlatformObservabilityEnvKeys = PlatformObservabilityEnvKey;\nexport const PlatformProviderSelectionEnvKeys = PlatformProviderSelectionEnvKey;\nexport const PlatformEmailEnvKeys = PlatformEmailEnvKey;\nexport const PlatformOwnershipDnsEnvKeys = PlatformOwnershipDnsEnvKey;\n\n/**\n * Resolve a required environment variable value or throw a clear,\n * actionable error.\n *\n * This is the canonical fail-closed reader for platform runtime env vars.\n * It exists to replace silent string-fallback patterns like\n * `process.env.X || 'localhost'` / `process.env.Y || 'local'` /\n * `process.env.Z || 'http://localhost:NNNN'` in apps-manager and any\n * other platform service. Those patterns let production processes start\n * silently mis-wired (e.g. talking to `localhost` instead of the real\n * cluster service) and surface as opaque downstream errors much later.\n *\n * Contract:\n * - Empty strings are treated as missing (a `KEY=` line in `.env` is a\n * misconfiguration, not an \"intentional empty value\").\n * - The thrown error names both the env var and the consuming context\n * (e.g. `\"Missing required env var REDIS_HOST (consumer:\n * PlatformInfrastructureManagerService.provisionAllPlatformConfigs)\"`).\n * - This helper does NOT decide whether a key is sensitive — that lives\n * in `PLATFORM_RUNTIME_SENSITIVE_ENV_KEYS`. Callers are responsible\n * for not logging the resolved value when sensitive.\n *\n * Usage:\n * const host = requireEnv(\n * PlatformInfrastructureEnvKey.REDIS_HOST,\n * 'PlatformInfrastructureManagerService.provisionAllPlatformConfigs',\n * );\n *\n * Local-development defaults must live in `secrets.json` /\n * `infrastructure/<env>/secrets/` and be loaded into `process.env` by\n * the CLI / K8s wiring, NOT in production code paths.\n */\nexport function requireEnv(envName: string, consumerContext: string): string {\n const raw = process.env[envName];\n if (raw === undefined || raw === '') {\n throw new Error(\n `Missing required environment variable ${envName} (consumer: ${consumerContext}). ` +\n `Local development defaults belong in secrets.json / infrastructure/<env>/secrets/, ` +\n `not in production code fallbacks.`,\n );\n }\n return raw;\n}\n\nexport const PLATFORM_RUNTIME_SENSITIVE_ENV_KEYS = new Set<string>([\n PlatformInfrastructureEnvKey.MONGO_CONNECT_URL,\n PlatformInfrastructureEnvKey.MONGO_PLATFORM_URL,\n PlatformInfrastructureEnvKey.REDIS_ADMIN_PASSWORD,\n PlatformInfrastructureEnvKey.RABBITMQ_ADMIN_PASSWORD,\n PlatformInfrastructureEnvKey.STORAGE_ACCESS_KEY,\n PlatformInfrastructureEnvKey.STORAGE_SECRET_KEY,\n PlatformInfrastructureEnvKey.PG_ADMIN_PASSWORD,\n PlatformInfrastructureEnvKey.PG_CONNECT_URL,\n PlatformInfrastructureEnvKey.IMMUDB_ADMIN_PASSWORD,\n PlatformSecurityEnvKey.PLATFORM_APPS_MANAGER_PRIVATE_KEY,\n PlatformSecurityEnvKey.PLATFORM_APPS_MANAGER_PUBLIC_KEY,\n PlatformSecurityEnvKey.PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY,\n PlatformSecurityEnvKey.PLATFORM_KEY_ENCRYPTION_ROOT,\n PlatformSecurityEnvKey.PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT,\n PlatformSecurityEnvKey.PLATFORM_KEY_VAULT_SIGNER_TOKEN,\n PlatformSecurityEnvKey.PLATFORM_KEY_VAULT_OPERATOR_TOKEN,\n PlatformSecurityEnvKey.PLATFORM_KEY_PKCS11_PIN,\n PlatformSecurityEnvKey.PLATFORM_CRONTABS_BATCHES_MANAGER_PRIVATE_KEY,\n PlatformSecurityEnvKey.PLATFORM_CRONTABS_BATCHES_MANAGER_PUBLIC_KEY,\n PlatformSecurityEnvKey.PLATFORM_APPLICATION_PRIMARY_SECRET,\n PlatformSecurityEnvKey.PLATFORM_ADMIN_SECRET,\n PlatformAdminEnvKey.ADMIN_PASSWORD,\n PlatformAdminEnvKey.GITHUB_WILDO_APPS_ADMIN_TOKEN,\n // OTLP auth header carries the provider source token (e.g. a BetterStack Bearer token) →\n // secret (K8s Secret, docker env_file). The sibling OTEL_ENABLED / OTEL_EXPORTER_OTLP_ENDPOINT /\n // OTEL_SERVICE_NAME / OTEL_RESOURCE_ATTRIBUTES are non-secret config and deliberately stay out.\n PlatformObservabilityEnvKey.OTEL_EXPORTER_OTLP_HEADERS,\n]);\n"]}