@wildo-ai/platform-config-lib 1.1.10 → 1.1.12

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 (396) 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 +83 -0
  6. package/dist/esm/blueprint/anchored-region.d.ts.map +1 -0
  7. package/dist/esm/blueprint/anchored-region.js +263 -0
  8. package/dist/esm/blueprint/anchored-region.js.map +1 -0
  9. package/dist/esm/blueprint/blueprint.schemas.d.ts +600 -0
  10. package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -0
  11. package/dist/esm/blueprint/blueprint.schemas.js +638 -0
  12. package/dist/esm/blueprint/blueprint.schemas.js.map +1 -0
  13. package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
  14. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -1
  15. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -1
  16. package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
  17. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +13 -1
  18. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  19. package/dist/esm/bootstrap/bootstrap.contracts.js +6 -0
  20. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  21. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +29 -4
  22. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  23. package/dist/esm/bootstrap/bootstrap.schemas.js +29 -4
  24. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  25. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +131 -2
  26. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  27. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +139 -2
  28. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  29. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +21 -0
  30. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
  31. package/dist/esm/bootstrap/platform-store-preconnect.js +25 -0
  32. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -1
  33. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts +80 -0
  34. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts.map +1 -0
  35. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js +81 -0
  36. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js.map +1 -0
  37. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +41 -9
  38. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  39. package/dist/esm/bootstrap/runtime-backing-service-access.js +77 -28
  40. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  41. package/dist/esm/bootstrap/runtime-network-policy.d.ts +117 -12
  42. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  43. package/dist/esm/bootstrap/runtime-network-policy.js +222 -23
  44. package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -1
  45. package/dist/esm/bootstrap/runtime-network-topology.d.ts +31 -4
  46. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  47. package/dist/esm/bootstrap/runtime-network-topology.js +43 -2
  48. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  49. package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -1
  50. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +40 -2
  51. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  52. package/dist/esm/bootstrap/runtime-principal.contracts.js +66 -3
  53. package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -1
  54. package/dist/esm/bootstrap/runtime-response-integrity.d.ts +249 -0
  55. package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -0
  56. package/dist/esm/bootstrap/runtime-response-integrity.js +353 -0
  57. package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -0
  58. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts +32 -0
  59. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -0
  60. package/dist/esm/bootstrap/runtime-secret-env.contracts.js +43 -0
  61. package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -0
  62. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  63. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  64. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts +51 -0
  65. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -0
  66. package/dist/esm/canonical-json/rfc8785-canonical-json.js +231 -0
  67. package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -0
  68. package/dist/esm/config-authoring.entry.js.map +1 -1
  69. package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
  70. package/dist/esm/credentials/credential-generator.service.js.map +1 -1
  71. package/dist/esm/index.d.ts +20 -1
  72. package/dist/esm/index.d.ts.map +1 -1
  73. package/dist/esm/index.js +20 -1
  74. package/dist/esm/index.js.map +1 -1
  75. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts +119 -0
  76. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts.map +1 -0
  77. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js +109 -0
  78. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js.map +1 -0
  79. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts +182 -0
  80. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts.map +1 -0
  81. package/dist/esm/key-management/application-signing-key-rotation.contracts.js +145 -0
  82. package/dist/esm/key-management/application-signing-key-rotation.contracts.js.map +1 -0
  83. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts +156 -0
  84. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts.map +1 -0
  85. package/dist/esm/key-management/approval-seal-manifested-copy.js +617 -0
  86. package/dist/esm/key-management/approval-seal-manifested-copy.js.map +1 -0
  87. package/dist/esm/key-management/approval-seal-verifier.d.ts +278 -0
  88. package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -0
  89. package/dist/esm/key-management/approval-seal-verifier.js +355 -0
  90. package/dist/esm/key-management/approval-seal-verifier.js.map +1 -0
  91. package/dist/esm/key-management/approval-seal.contracts.d.ts +128 -0
  92. package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -0
  93. package/dist/esm/key-management/approval-seal.contracts.js +135 -0
  94. package/dist/esm/key-management/approval-seal.contracts.js.map +1 -0
  95. package/dist/esm/key-management/data-key.contracts.d.ts +106 -0
  96. package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -0
  97. package/dist/esm/key-management/data-key.contracts.js +54 -0
  98. package/dist/esm/key-management/data-key.contracts.js.map +1 -0
  99. package/dist/esm/key-management/es256-jws.d.ts +60 -0
  100. package/dist/esm/key-management/es256-jws.d.ts.map +1 -0
  101. package/dist/esm/key-management/es256-jws.js +135 -0
  102. package/dist/esm/key-management/es256-jws.js.map +1 -0
  103. package/dist/esm/key-management/key-provider.spi.d.ts +158 -0
  104. package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -0
  105. package/dist/esm/key-management/key-provider.spi.js +38 -0
  106. package/dist/esm/key-management/key-provider.spi.js.map +1 -0
  107. package/dist/esm/key-management/keyring-rotation.contracts.d.ts +83 -0
  108. package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -0
  109. package/dist/esm/key-management/keyring-rotation.contracts.js +101 -0
  110. package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -0
  111. package/dist/esm/key-management/keyring-status.contracts.d.ts +59 -0
  112. package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -0
  113. package/dist/esm/key-management/keyring-status.contracts.js +45 -0
  114. package/dist/esm/key-management/keyring-status.contracts.js.map +1 -0
  115. package/dist/esm/key-management/pdf-incremental-update.d.ts +158 -0
  116. package/dist/esm/key-management/pdf-incremental-update.d.ts.map +1 -0
  117. package/dist/esm/key-management/pdf-incremental-update.js +730 -0
  118. package/dist/esm/key-management/pdf-incremental-update.js.map +1 -0
  119. package/dist/esm/key-management/pdf-truetype-font.d.ts +35 -0
  120. package/dist/esm/key-management/pdf-truetype-font.d.ts.map +1 -0
  121. package/dist/esm/key-management/pdf-truetype-font.js +152 -0
  122. package/dist/esm/key-management/pdf-truetype-font.js.map +1 -0
  123. package/dist/esm/key-management/qr-code.d.ts +38 -0
  124. package/dist/esm/key-management/qr-code.d.ts.map +1 -0
  125. package/dist/esm/key-management/qr-code.js +325 -0
  126. package/dist/esm/key-management/qr-code.js.map +1 -0
  127. package/dist/esm/key-management/signature-request.contracts.d.ts +91 -0
  128. package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -0
  129. package/dist/esm/key-management/signature-request.contracts.js +96 -0
  130. package/dist/esm/key-management/signature-request.contracts.js.map +1 -0
  131. package/dist/esm/key-management/signing-log-export.contracts.d.ts +215 -0
  132. package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -0
  133. package/dist/esm/key-management/signing-log-export.contracts.js +268 -0
  134. package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -0
  135. package/dist/esm/key-management/vault-custody.contracts.d.ts +98 -0
  136. package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -0
  137. package/dist/esm/key-management/vault-custody.contracts.js +154 -0
  138. package/dist/esm/key-management/vault-custody.contracts.js.map +1 -0
  139. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -1
  140. package/dist/esm/lockfile/build-parallelism.js.map +1 -1
  141. package/dist/esm/lockfile/canonical-json.d.ts +1 -1
  142. package/dist/esm/lockfile/canonical-json.d.ts.map +1 -1
  143. package/dist/esm/lockfile/canonical-json.js +1 -1
  144. package/dist/esm/lockfile/canonical-json.js.map +1 -1
  145. package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
  146. package/dist/esm/lockfile/file-lock-hold.js +2 -1
  147. package/dist/esm/lockfile/file-lock-hold.js.map +1 -1
  148. package/dist/esm/lockfile/lockfile-io.d.ts +13 -17
  149. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  150. package/dist/esm/lockfile/lockfile-io.js +29 -30
  151. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  152. package/dist/esm/lockfile/materialize-infra-section.d.ts +22 -20
  153. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  154. package/dist/esm/lockfile/materialize-infra-section.js +13 -14
  155. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  156. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +27 -249
  157. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  158. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +28 -3
  159. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  160. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts +146 -0
  161. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts.map +1 -0
  162. package/dist/esm/pnpm-settings/application-pnpm-settings.js +573 -0
  163. package/dist/esm/pnpm-settings/application-pnpm-settings.js.map +1 -0
  164. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
  165. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +22 -3
  166. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
  167. package/dist/esm/project-config/application-served-public-documents.loader.d.ts +26 -0
  168. package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -0
  169. package/dist/esm/project-config/application-served-public-documents.loader.js +86 -0
  170. package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -0
  171. package/dist/esm/project-config/backend-compliance-section.reader.d.ts +35 -0
  172. package/dist/esm/project-config/backend-compliance-section.reader.d.ts.map +1 -0
  173. package/dist/esm/project-config/backend-compliance-section.reader.js +123 -0
  174. package/dist/esm/project-config/backend-compliance-section.reader.js.map +1 -0
  175. package/dist/esm/project-config/backend-compliance-section.worker.d.ts +20 -0
  176. package/dist/esm/project-config/backend-compliance-section.worker.d.ts.map +1 -0
  177. package/dist/esm/project-config/backend-compliance-section.worker.js +78 -0
  178. package/dist/esm/project-config/backend-compliance-section.worker.js.map +1 -0
  179. package/dist/esm/project-config/config-module-resolution.d.ts +32 -0
  180. package/dist/esm/project-config/config-module-resolution.d.ts.map +1 -0
  181. package/dist/esm/project-config/config-module-resolution.js +33 -0
  182. package/dist/esm/project-config/config-module-resolution.js.map +1 -0
  183. package/dist/esm/project-config/define-framework-config.js.map +1 -1
  184. package/dist/esm/project-config/define-infra-env-config.d.ts +344 -69
  185. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  186. package/dist/esm/project-config/define-infra-env-config.js +194 -143
  187. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  188. package/dist/esm/project-config/define-minion-config.d.ts +26 -36
  189. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  190. package/dist/esm/project-config/define-minion-config.js +64 -25
  191. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  192. package/dist/esm/project-config/define-saas-config.d.ts +82 -348
  193. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  194. package/dist/esm/project-config/define-saas-config.js +262 -103
  195. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  196. package/dist/esm/project-config/define-worker-config.d.ts +10 -20
  197. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  198. package/dist/esm/project-config/define-worker-config.js +10 -12
  199. package/dist/esm/project-config/define-worker-config.js.map +1 -1
  200. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
  201. package/dist/esm/project-config/hosted-infra-env-config.js +4 -1
  202. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
  203. package/dist/esm/project-config/index.d.ts +5 -0
  204. package/dist/esm/project-config/index.d.ts.map +1 -1
  205. package/dist/esm/project-config/index.js +5 -0
  206. package/dist/esm/project-config/index.js.map +1 -1
  207. package/dist/esm/project-config/loader-instances-zod.d.ts +19 -0
  208. package/dist/esm/project-config/loader-instances-zod.d.ts.map +1 -0
  209. package/dist/esm/project-config/loader-instances-zod.js +40 -0
  210. package/dist/esm/project-config/loader-instances-zod.js.map +1 -0
  211. package/dist/esm/project-config/loader.d.ts +131 -14
  212. package/dist/esm/project-config/loader.d.ts.map +1 -1
  213. package/dist/esm/project-config/loader.js +226 -12
  214. package/dist/esm/project-config/loader.js.map +1 -1
  215. package/dist/esm/project-config/minion-liveness.contracts.d.ts +131 -0
  216. package/dist/esm/project-config/minion-liveness.contracts.d.ts.map +1 -0
  217. package/dist/esm/project-config/minion-liveness.contracts.js +167 -0
  218. package/dist/esm/project-config/minion-liveness.contracts.js.map +1 -0
  219. package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -1
  220. package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -1
  221. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
  222. package/dist/esm/project-config/npm-version-range.js +39 -16
  223. package/dist/esm/project-config/npm-version-range.js.map +1 -1
  224. package/dist/esm/project-config/owning-package-tsconfig.d.ts +15 -0
  225. package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -0
  226. package/dist/esm/project-config/owning-package-tsconfig.js +29 -0
  227. package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -0
  228. package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
  229. package/dist/esm/project-config/provider-companion-discovery.d.ts +4 -4
  230. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  231. package/dist/esm/project-config/provider-companion-discovery.js +16 -10
  232. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  233. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +103 -49
  234. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  235. package/dist/esm/project-config/provider-runtime-artifacts.js +216 -16
  236. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  237. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +0 -2
  238. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  239. package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -1
  240. package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
  241. package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
  242. package/dist/esm/project-config/shared/auth.schemas.d.ts +0 -17
  243. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  244. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  245. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -1
  246. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +9 -10
  247. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  248. package/dist/esm/project-config/shared/backing-services.schemas.js +13 -15
  249. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  250. package/dist/esm/project-config/shared/cdn.schemas.d.ts +0 -51
  251. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  252. package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -1
  253. package/dist/esm/project-config/shared/csp-defaults.d.ts +36 -9
  254. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  255. package/dist/esm/project-config/shared/csp-defaults.js +54 -11
  256. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
  257. package/dist/esm/project-config/shared/csp-emit.d.ts +60 -13
  258. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  259. package/dist/esm/project-config/shared/csp-emit.js +77 -24
  260. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  261. package/dist/esm/project-config/shared/csp.schemas.d.ts +72 -85
  262. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  263. package/dist/esm/project-config/shared/csp.schemas.js +40 -13
  264. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  265. package/dist/esm/project-config/shared/data-services.schemas.d.ts +0 -8
  266. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  267. package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
  268. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  269. package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
  270. package/dist/esm/project-config/shared/environment.schemas.d.ts +101 -8
  271. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  272. package/dist/esm/project-config/shared/environment.schemas.js +128 -9
  273. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  274. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +10 -4
  275. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  276. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  277. package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -1
  278. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +2 -1
  279. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  280. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +4 -1
  281. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  282. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  283. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  284. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  285. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  286. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +24 -0
  287. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  288. package/dist/esm/project-config/shared/minion-resource-access.validation.js +25 -2
  289. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  290. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -1
  291. package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -1
  292. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +276 -0
  293. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -0
  294. package/dist/esm/project-config/shared/platform-key-management.schemas.js +296 -0
  295. package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -0
  296. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  297. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +2 -2
  298. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
  299. package/dist/esm/project-config/shared/platform-storage.schemas.js +16 -2
  300. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -1
  301. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +21 -23
  302. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  303. package/dist/esm/project-config/shared/service-definitions.schemas.js +4 -5
  304. package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
  305. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +0 -18
  306. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
  307. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -1
  308. package/dist/esm/project-config/static-asset-import-noop.d.ts +20 -3
  309. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -1
  310. package/dist/esm/project-config/static-asset-import-noop.js +36 -20
  311. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -1
  312. package/dist/esm/registry/artifact-domain.schemas.d.ts +0 -5
  313. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  314. package/dist/esm/registry/artifact-domain.schemas.js.map +1 -1
  315. package/dist/esm/registry/digest.schemas.js.map +1 -1
  316. package/dist/esm/registry/index.d.ts +3 -3
  317. package/dist/esm/registry/index.d.ts.map +1 -1
  318. package/dist/esm/registry/index.js +3 -3
  319. package/dist/esm/registry/index.js.map +1 -1
  320. package/dist/esm/registry/local-checkout-source.d.ts +22 -2
  321. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
  322. package/dist/esm/registry/local-checkout-source.js +66 -3
  323. package/dist/esm/registry/local-checkout-source.js.map +1 -1
  324. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +11 -98
  325. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  326. package/dist/esm/registry/lockfile-modules-section.schemas.js +1 -2
  327. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  328. package/dist/esm/registry/module-artifact.schemas.d.ts +40 -17
  329. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  330. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  331. package/dist/esm/registry/module-manifest.schemas.d.ts +324 -74
  332. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  333. package/dist/esm/registry/module-manifest.schemas.js +377 -19
  334. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  335. package/dist/esm/registry/module-search.schemas.d.ts +2 -0
  336. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
  337. package/dist/esm/registry/module-search.schemas.js +14 -1
  338. package/dist/esm/registry/module-search.schemas.js.map +1 -1
  339. package/dist/esm/registry/registry-config.schemas.d.ts +0 -18
  340. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  341. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  342. package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -1
  343. package/dist/esm/registry/registry-defaults.constants.js.map +1 -1
  344. package/dist/esm/registry/registry-errors.d.ts +103 -5
  345. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  346. package/dist/esm/registry/registry-errors.js +213 -6
  347. package/dist/esm/registry/registry-errors.js.map +1 -1
  348. package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
  349. package/dist/esm/registry/registry-section-schemas.constants.d.ts +5 -0
  350. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  351. package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -1
  352. package/dist/esm/registry/registry-url-resolution.d.ts +72 -0
  353. package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -0
  354. package/dist/esm/registry/registry-url-resolution.js +157 -0
  355. package/dist/esm/registry/registry-url-resolution.js.map +1 -0
  356. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  357. package/dist/esm/release/framework-release.constants.js.map +1 -1
  358. package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
  359. package/dist/esm/schemas/framework-secrets.schemas.d.ts +48 -0
  360. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  361. package/dist/esm/schemas/framework-secrets.schemas.js +53 -0
  362. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  363. package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
  364. package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
  365. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +1 -1
  366. package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
  367. package/dist/esm/schemas/platform-config.schemas.d.ts +2 -2
  368. package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
  369. package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -1
  370. package/dist/esm/workspace-scope/index.js.map +1 -1
  371. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  372. package/dist/esm/workspace-scope/resolve-homes.js.map +1 -1
  373. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  374. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  375. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
  376. package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
  377. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  378. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  379. package/dist/tsconfig.build.tsbuildinfo +1 -1
  380. package/package.json +12 -12
  381. package/dist/esm/_unimplemented/index.d.ts +0 -3
  382. package/dist/esm/_unimplemented/index.d.ts.map +0 -1
  383. package/dist/esm/_unimplemented/index.js +0 -3
  384. package/dist/esm/_unimplemented/index.js.map +0 -1
  385. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +0 -137
  386. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +0 -1
  387. package/dist/esm/_unimplemented/unimplemented-field-warning.js +0 -153
  388. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +0 -1
  389. package/dist/esm/project-config/shared/cdn.example.d.ts +0 -14
  390. package/dist/esm/project-config/shared/cdn.example.d.ts.map +0 -1
  391. package/dist/esm/project-config/shared/cdn.example.js +0 -38
  392. package/dist/esm/project-config/shared/cdn.example.js.map +0 -1
  393. package/dist/esm/project-config/shared/schema-version.schemas.d.ts +0 -15
  394. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +0 -1
  395. package/dist/esm/project-config/shared/schema-version.schemas.js +0 -40
  396. package/dist/esm/project-config/shared/schema-version.schemas.js.map +0 -1
@@ -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";
@@ -117,6 +124,103 @@ export var PlatformSecurityEnvKey;
117
124
  (function (PlatformSecurityEnvKey) {
118
125
  PlatformSecurityEnvKey["PLATFORM_APPS_MANAGER_PRIVATE_KEY"] = "PLATFORM_APPS_MANAGER_PRIVATE_KEY";
119
126
  PlatformSecurityEnvKey["PLATFORM_APPS_MANAGER_PUBLIC_KEY"] = "PLATFORM_APPS_MANAGER_PUBLIC_KEY";
127
+ /**
128
+ * apps-manager's RESPONSE key (#2921): the private half that signs every successful answer on the routes application
129
+ * runtimes read (configuration, secrets, worker bootstrap, storage session, runtime-principal token). Its own key,
130
+ * never the {@link PLATFORM_APPS_MANAGER_PRIVATE_KEY} that signs runtime-principal tokens and crontabs requests: one key
131
+ * per purpose (NIST SP 800-57 Part 1 Rev 5 §5.2). Runtimes verify against the public halves carried in
132
+ * `PLATFORM_APPS_MANAGER_RESPONSE_VERIFICATION_KEYS`. Required: apps-manager refuses to start without it, because a
133
+ * response it cannot sign must not be sent (`runtime-response-integrity.ts`).
134
+ */
135
+ PlatformSecurityEnvKey["PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY"] = "PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY";
136
+ /**
137
+ * The platform's key-encryption ROOT (#2891): 32 random bytes, base64url, held by apps-manager alone. Every private
138
+ * key the engine's LOCAL key provider makes (the approval-seal keys among them) is sealed under it with AES-256-GCM
139
+ * before it is stored, so a platform database dump yields no usable private key.
140
+ *
141
+ * Losing it loses every LOCAL private key, and nothing else: the public halves are stored in each application, so
142
+ * every seal already made still verifies. The keys it sealed cannot sign again, and the keyring does not replace them on
143
+ * its own: apps-manager reports them at startup, and an operator who knows the root is gone for good runs
144
+ * `wildo keys rotate --root-lost --reason "<why>"` per application, which destroys them and makes fresh ones. A new
145
+ * root never opens the old keys, so restore it from backup before minting another. Back it up with the platform's other
146
+ * secrets. Every lane provides it (`wildo local doctor` reports it missing). apps-manager starts without it, so a stack
147
+ * predating it keeps running, and the keyring refuses its first operation (`PROVIDER_UNAVAILABLE`); a MALFORMED value is
148
+ * refused at startup.
149
+ */
150
+ PlatformSecurityEnvKey["PLATFORM_KEY_ENCRYPTION_ROOT"] = "PLATFORM_KEY_ENCRYPTION_ROOT";
151
+ /**
152
+ * The root a rotation replaced (#2891), kept only until every sealed key has been re-sealed under the current one.
153
+ * apps-manager opens a key under whichever root sealed it and re-seals it under the current root. Optional.
154
+ */
155
+ PlatformSecurityEnvKey["PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT"] = "PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT";
156
+ /**
157
+ * The platform's HashiCorp Vault or OpenBao (#2933), where apps-manager runs the `vault-transit` (REMOTE) and
158
+ * `vault-kv` (RETRIEVED) key providers. apps-manager alone holds these: no application runtime ever reaches the Vault.
159
+ * All optional; a platform without a Vault leaves them unset, and a binding to a Vault provider is refused
160
+ * (`PROVIDER_UNAVAILABLE`). The address and BOTH tokens are needed together; a partial set registers nothing and is
161
+ * reported at apps-manager's boot, while the LOCAL provider keeps serving.
162
+ *
163
+ * Two tokens, for least privilege, under the policies `vault-custody.contracts` states (`vaultSignerPolicy`,
164
+ * `vaultOperatorPolicy`): the SIGNER token may sign (`transit/sign/<prefix>*`) and read keys and key metadata; the
165
+ * OPERATOR token performs lifecycle acts (create, rotate, config, delete, KV write and destroy) and is denied signing
166
+ * and reading key material. Neither can make a key leave Vault: the signer is denied `/config`, `transit/export/*` and
167
+ * `transit/backup/*`, and the operator may not send `exportable` or `allow_plaintext_backup` at all.
168
+ * Not `VAULT_ADDR` / `VAULT_TOKEN`: those are read by Vault's own CLI and SDKs, and a stray one would be picked up.
169
+ */
170
+ PlatformSecurityEnvKey["PLATFORM_KEY_VAULT_ADDRESS"] = "PLATFORM_KEY_VAULT_ADDRESS";
171
+ PlatformSecurityEnvKey["PLATFORM_KEY_VAULT_SIGNER_TOKEN"] = "PLATFORM_KEY_VAULT_SIGNER_TOKEN";
172
+ PlatformSecurityEnvKey["PLATFORM_KEY_VAULT_OPERATOR_TOKEN"] = "PLATFORM_KEY_VAULT_OPERATOR_TOKEN";
173
+ /** Vault Enterprise namespace (`ns1/ns2/`). Optional. */
174
+ PlatformSecurityEnvKey["PLATFORM_KEY_VAULT_NAMESPACE"] = "PLATFORM_KEY_VAULT_NAMESPACE";
175
+ /** The Transit mount (`transit` when unset). */
176
+ PlatformSecurityEnvKey["PLATFORM_KEY_VAULT_TRANSIT_MOUNT"] = "PLATFORM_KEY_VAULT_TRANSIT_MOUNT";
177
+ /** The KV v2 mount (`secret` when unset). */
178
+ PlatformSecurityEnvKey["PLATFORM_KEY_VAULT_KV_MOUNT"] = "PLATFORM_KEY_VAULT_KV_MOUNT";
179
+ /** What every key and path apps-manager makes is named with, so the Vault policies can be scoped to it (`wildo-`). */
180
+ PlatformSecurityEnvKey["PLATFORM_KEY_VAULT_KEY_NAME_PREFIX"] = "PLATFORM_KEY_VAULT_KEY_NAME_PREFIX";
181
+ /**
182
+ * The platform's cloud KMS providers (#2896): `aws-kms`, `google-cloud-kms`, `azure-key-vault`. apps-manager alone
183
+ * holds them, and authenticates by its WORKLOAD identity (IAM role for service accounts, GKE workload identity, an
184
+ * Azure managed identity), so none of these is a secret. Each provider acts as TWO identities, as the Vault providers
185
+ * do with two tokens: a SIGNER that may only read keys and sign, and an OPERATOR that creates, disables and destroys
186
+ * them and may never sign. Every key of one provider is needed together; a partial set registers nothing and is
187
+ * reported at apps-manager's boot.
188
+ *
189
+ * AWS: apps-manager's own identity may only `sts:AssumeRole` the two roles named here.
190
+ */
191
+ PlatformSecurityEnvKey["PLATFORM_KEY_AWS_KMS_REGION"] = "PLATFORM_KEY_AWS_KMS_REGION";
192
+ PlatformSecurityEnvKey["PLATFORM_KEY_AWS_KMS_SIGNER_ROLE_ARN"] = "PLATFORM_KEY_AWS_KMS_SIGNER_ROLE_ARN";
193
+ PlatformSecurityEnvKey["PLATFORM_KEY_AWS_KMS_OPERATOR_ROLE_ARN"] = "PLATFORM_KEY_AWS_KMS_OPERATOR_ROLE_ARN";
194
+ /** A KMS endpoint other than the region's public one (a VPC interface endpoint). Optional. */
195
+ PlatformSecurityEnvKey["PLATFORM_KEY_AWS_KMS_ENDPOINT"] = "PLATFORM_KEY_AWS_KMS_ENDPOINT";
196
+ /** Google: the key ring (`projects/<p>/locations/<l>/keyRings/<r>`) and the two service accounts apps-manager impersonates. */
197
+ PlatformSecurityEnvKey["PLATFORM_KEY_GOOGLE_KMS_KEY_RING"] = "PLATFORM_KEY_GOOGLE_KMS_KEY_RING";
198
+ PlatformSecurityEnvKey["PLATFORM_KEY_GOOGLE_KMS_SIGNER_SERVICE_ACCOUNT"] = "PLATFORM_KEY_GOOGLE_KMS_SIGNER_SERVICE_ACCOUNT";
199
+ PlatformSecurityEnvKey["PLATFORM_KEY_GOOGLE_KMS_OPERATOR_SERVICE_ACCOUNT"] = "PLATFORM_KEY_GOOGLE_KMS_OPERATOR_SERVICE_ACCOUNT";
200
+ /** `HSM` (the default) or `SOFTWARE`: the protection level new keys are created at. */
201
+ PlatformSecurityEnvKey["PLATFORM_KEY_GOOGLE_KMS_PROTECTION_LEVEL"] = "PLATFORM_KEY_GOOGLE_KMS_PROTECTION_LEVEL";
202
+ /** Azure: the vault (or Managed HSM) URL and the client ids of the two user-assigned managed identities. */
203
+ PlatformSecurityEnvKey["PLATFORM_KEY_AZURE_KEY_VAULT_URL"] = "PLATFORM_KEY_AZURE_KEY_VAULT_URL";
204
+ PlatformSecurityEnvKey["PLATFORM_KEY_AZURE_KEY_VAULT_SIGNER_CLIENT_ID"] = "PLATFORM_KEY_AZURE_KEY_VAULT_SIGNER_CLIENT_ID";
205
+ PlatformSecurityEnvKey["PLATFORM_KEY_AZURE_KEY_VAULT_OPERATOR_CLIENT_ID"] = "PLATFORM_KEY_AZURE_KEY_VAULT_OPERATOR_CLIENT_ID";
206
+ /** `true` (the default) makes new keys `EC-HSM` (a Premium vault or Managed HSM); `false` makes them software `EC` keys. */
207
+ PlatformSecurityEnvKey["PLATFORM_KEY_AZURE_KEY_VAULT_HSM"] = "PLATFORM_KEY_AZURE_KEY_VAULT_HSM";
208
+ /**
209
+ * The Log Analytics workspace the vault's diagnostic setting sends its `AuditEvent` logs to, read hourly to corroborate
210
+ * the custodian's signatures (#2896). Optional: without it, no Azure hour is compared, and apps-manager says so at boot.
211
+ */
212
+ PlatformSecurityEnvKey["PLATFORM_KEY_AZURE_KEY_VAULT_LOG_ANALYTICS_WORKSPACE_ID"] = "PLATFORM_KEY_AZURE_KEY_VAULT_LOG_ANALYTICS_WORKSPACE_ID";
213
+ /**
214
+ * The platform's dedicated HSM over PKCS#11 (#2934): the vendor's module (a shared library in apps-manager's image or
215
+ * mounted into it), the token's label, and the user PIN. The module path and label come from
216
+ * `platformKeyManagement.pkcs11`; the PIN from `secrets.json` (`platformKeyPkcs11.pin`), operator-typed, and it is the
217
+ * only secret here. All three or none; a partial set registers nothing and is reported at apps-manager's boot.
218
+ */
219
+ PlatformSecurityEnvKey["PLATFORM_KEY_PKCS11_MODULE_PATH"] = "PLATFORM_KEY_PKCS11_MODULE_PATH";
220
+ PlatformSecurityEnvKey["PLATFORM_KEY_PKCS11_TOKEN_LABEL"] = "PLATFORM_KEY_PKCS11_TOKEN_LABEL";
221
+ PlatformSecurityEnvKey["PLATFORM_KEY_PKCS11_PIN"] = "PLATFORM_KEY_PKCS11_PIN";
222
+ /** Comma-separated token models the operator states are hardware (`CK_TOKEN_INFO.model`); none: every key is SOFTWARE. */
223
+ PlatformSecurityEnvKey["PLATFORM_KEY_PKCS11_HARDWARE_TOKEN_MODELS"] = "PLATFORM_KEY_PKCS11_HARDWARE_TOKEN_MODELS";
120
224
  /**
121
225
  * The crontabs-batches-manager's dedicated P2P signing keypair. The design is
122
226
  * per-service (mirrors apps-manager): the crontabs scheduler signs each SCHEDULED_CRON /
@@ -169,7 +273,7 @@ export var PlatformKubernetesEnvKey;
169
273
  * use to derive cookie `Domain` and CORS allowlist entries. It applies
170
274
  * to BOTH Kubernetes and Docker Compose deployments — naming it
171
275
  * `K8S_*` (as in the previous `K8S_EXTERNAL_BASE_DOMAIN`) was a
172
- * conflation; see `external-public-domain-rename.md`.
276
+ * conflation.
173
277
  */
174
278
  export var PlatformIngressEnvKey;
175
279
  (function (PlatformIngressEnvKey) {
@@ -260,10 +364,35 @@ export var PlatformProviderSelectionEnvKey;
260
364
  (function (PlatformProviderSelectionEnvKey) {
261
365
  PlatformProviderSelectionEnvKey["WILDO_PROVIDER_SELECTION_OVERRIDES"] = "WILDO_PROVIDER_SELECTION_OVERRIDES";
262
366
  })(PlatformProviderSelectionEnvKey || (PlatformProviderSelectionEnvKey = {}));
367
+ /**
368
+ * Per-environment email env-var contract.
369
+ *
370
+ * Projected from `WildoInfraEnvConfig.email` by `env-vars-builder`, one scalar per value (the documentation-site shape:
371
+ * a single string needs no serialized payload). Read by the backend's inbound email services through
372
+ * `resolveInboundEmailConfig`, where it wins over `email.inbound.sharedDomain` in the backend configuration. Absent =>
373
+ * the authored value applies unchanged.
374
+ */
375
+ export var PlatformEmailEnvKey;
376
+ (function (PlatformEmailEnvKey) {
377
+ PlatformEmailEnvKey["WILDO_INBOUND_EMAIL_SHARED_DOMAIN"] = "WILDO_INBOUND_EMAIL_SHARED_DOMAIN";
378
+ })(PlatformEmailEnvKey || (PlatformEmailEnvKey = {}));
379
+ /**
380
+ * The ownership-DNS stand-in env-var contract (#2519).
381
+ *
382
+ * Projected from `WildoInfraEnvConfig.ownershipDnsStandIn.baseUrl` (local-only) by `env-vars-builder`. Read by the
383
+ * backend's `DnsTxtLookupBackendService` — the one door every domain-ownership challenge asks DNS through — which
384
+ * honours it only in a declared development or test runtime, and refuses to start with it set anywhere else. Absent =>
385
+ * every ownership challenge asks public DNS.
386
+ */
387
+ export var PlatformOwnershipDnsEnvKey;
388
+ (function (PlatformOwnershipDnsEnvKey) {
389
+ PlatformOwnershipDnsEnvKey["WILDO_OWNERSHIP_DNS_STAND_IN_URL"] = "WILDO_OWNERSHIP_DNS_STAND_IN_URL";
390
+ })(PlatformOwnershipDnsEnvKey || (PlatformOwnershipDnsEnvKey = {}));
263
391
  /**
264
392
  * Documentation-site BUILD env-var contract.
265
393
  *
266
- * 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
267
396
  * other families here these are consumed by a BUILD rather than a running service: a
268
397
  * Docusaurus bundle compiles its origins in, so the values must be present when the site is
269
398
  * built, and a bundle built with the wrong ones silently points every reader at the wrong
@@ -295,6 +424,8 @@ export const PlatformIngressEnvKeys = PlatformIngressEnvKey;
295
424
  export const PlatformLoggingEnvKeys = PlatformLoggingEnvKey;
296
425
  export const PlatformObservabilityEnvKeys = PlatformObservabilityEnvKey;
297
426
  export const PlatformProviderSelectionEnvKeys = PlatformProviderSelectionEnvKey;
427
+ export const PlatformEmailEnvKeys = PlatformEmailEnvKey;
428
+ export const PlatformOwnershipDnsEnvKeys = PlatformOwnershipDnsEnvKey;
298
429
  /**
299
430
  * Resolve a required environment variable value or throw a clear,
300
431
  * actionable error.
@@ -348,6 +479,12 @@ export const PLATFORM_RUNTIME_SENSITIVE_ENV_KEYS = new Set([
348
479
  PlatformInfrastructureEnvKey.IMMUDB_ADMIN_PASSWORD,
349
480
  PlatformSecurityEnvKey.PLATFORM_APPS_MANAGER_PRIVATE_KEY,
350
481
  PlatformSecurityEnvKey.PLATFORM_APPS_MANAGER_PUBLIC_KEY,
482
+ PlatformSecurityEnvKey.PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY,
483
+ PlatformSecurityEnvKey.PLATFORM_KEY_ENCRYPTION_ROOT,
484
+ PlatformSecurityEnvKey.PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT,
485
+ PlatformSecurityEnvKey.PLATFORM_KEY_VAULT_SIGNER_TOKEN,
486
+ PlatformSecurityEnvKey.PLATFORM_KEY_VAULT_OPERATOR_TOKEN,
487
+ PlatformSecurityEnvKey.PLATFORM_KEY_PKCS11_PIN,
351
488
  PlatformSecurityEnvKey.PLATFORM_CRONTABS_BATCHES_MANAGER_PRIVATE_KEY,
352
489
  PlatformSecurityEnvKey.PLATFORM_CRONTABS_BATCHES_MANAGER_PUBLIC_KEY,
353
490
  PlatformSecurityEnvKey.PLATFORM_APPLICATION_PRIMARY_SECRET,
@@ -1 +1 @@
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,EAnBW,qBAAqB,KAArB,qBAAqB,QAmBhC;AAED,MAAM,CAAN,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,mFAAuD,CAAA;IACvD,2GAA+E,CAAA;IAC/E,yFAA6D,CAAA;AAC/D,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB,QAInC;AAED,MAAM,CAAN,IAAY,4BA8EX;AA9ED,WAAY,4BAA4B;IACtC,uEAAuC,CAAA;IACvC,yEAAyC,CAAA;IACzC,+EAA+C,CAAA;IAC/C,yDAAyB,CAAA;IACzB,yDAAyB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C3C,4BAA4B,CAAC,qBAAqB;IAClD,sBAAsB,CAAC,iCAAiC;IACxD,sBAAsB,CAAC,gCAAgC;IACvD,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 * 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 * 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;\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_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,EAnBW,qBAAqB,KAArB,qBAAqB,QAmBhC;AAED,MAAM,CAAN,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,mFAAuD,CAAA;IACvD,2GAA+E,CAAA;IAC/E,yFAA6D,CAAA;AAC/D,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB,QAInC;AAED,MAAM,CAAN,IAAY,4BAqFX;AArFD,WAAY,4BAA4B;IACtC,uEAAuC,CAAA;IACvC,yEAAyC,CAAA;IACzC,+EAA+C,CAAA;IAC/C,yDAAyB,CAAA;IACzB,yDAAyB,CAAA;IACzB;;;;OAIG;IACH,iEAAiC,CAAA;IACjC,qEAAqC,CAAA;IACrC,6EAA6C,CAAA;IAC7C,+DAA+B,CAAA;IAC/B,+DAA+B,CAAA;IAC/B,qFAAqD,CAAA;IACrD;;;;OAIG;IACH,iEAAiC,CA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,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"]}
@@ -1,3 +1,4 @@
1
+ import { PlatformInfrastructureEnvKey } from './platform-runtime-env.contracts';
1
2
  /**
2
3
  * The MongoDB URL a platform service must pre-connect at boot, or `undefined` when it must not.
3
4
  *
@@ -34,4 +35,24 @@ export declare function resolvePlatformMongoPreconnectUrl(input: {
34
35
  readonly mongoConnectUrl: string | undefined;
35
36
  readonly declaredDefaultAdapter: string | undefined;
36
37
  }): string | undefined;
38
+ /**
39
+ * The env key of the platform's SELECTED store when its URL is absent, or `undefined` when the selected store has its URL
40
+ * (#1117). ONE decision for every boot door that refuses such an environment: the apps-manager env schema, its NORMAL
41
+ * and INIT pre-connects (both run before that schema is parsed), the module registry, and the dev companion's env schema.
42
+ *
43
+ * Both pairs, because the platform's configuration documents are READ THROUGH its selected store, so the store has to be
44
+ * opened from env before anything else: a PostgreSQL platform without `PG_CONNECT_URL`, and a MongoDB platform (the
45
+ * declaration absent or `mongodb`) without `MONGO_CONNECT_URL`. The MongoDB half was missing. Such a platform skipped
46
+ * the pre-connect (and said its store was PostgreSQL), then died at hydration on a configuration that cannot be
47
+ * satisfied at that phase, or, if it came up, waited on a MongoDB readiness check nothing would ever connect: the shape
48
+ * #1117 recorded, a service up and not ready until someone restarted it.
49
+ *
50
+ * A URL WITHOUT the declaration stays legal (the dual-store transition), and a store other than these two is not a
51
+ * platform store, so it owes no URL here.
52
+ */
53
+ export declare function missingSelectedPlatformStoreUrlKey(input: {
54
+ readonly mongoConnectUrl: string | undefined;
55
+ readonly pgConnectUrl: string | undefined;
56
+ readonly declaredDefaultAdapter: string | undefined;
57
+ }): PlatformInfrastructureEnvKey.MONGO_CONNECT_URL | PlatformInfrastructureEnvKey.PG_CONNECT_URL | undefined;
37
58
  //# sourceMappingURL=platform-store-preconnect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-store-preconnect.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/platform-store-preconnect.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE;IACvD,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;CACrD,GAAG,MAAM,GAAG,SAAS,CAOrB"}
1
+ {"version":3,"file":"platform-store-preconnect.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/platform-store-preconnect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE;IACvD,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;CACrD,GAAG,MAAM,GAAG,SAAS,CAOrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kCAAkC,CAAC,KAAK,EAAE;IACxD,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;CACrD,GAAG,4BAA4B,CAAC,iBAAiB,GAAG,4BAA4B,CAAC,cAAc,GAAG,SAAS,CAM3G"}
@@ -1,4 +1,5 @@
1
1
  import { parseDeclaredPersistenceAdapter, PersistenceAdapter } from '@wildo-ai/saas-models';
2
+ import { PlatformInfrastructureEnvKey } from './platform-runtime-env.contracts.js';
2
3
  /**
3
4
  * The MongoDB URL a platform service must pre-connect at boot, or `undefined` when it must not.
4
5
  *
@@ -40,4 +41,28 @@ export function resolvePlatformMongoPreconnectUrl(input) {
40
41
  ? undefined
41
42
  : mongoConnectUrl;
42
43
  }
44
+ /**
45
+ * The env key of the platform's SELECTED store when its URL is absent, or `undefined` when the selected store has its URL
46
+ * (#1117). ONE decision for every boot door that refuses such an environment: the apps-manager env schema, its NORMAL
47
+ * and INIT pre-connects (both run before that schema is parsed), the module registry, and the dev companion's env schema.
48
+ *
49
+ * Both pairs, because the platform's configuration documents are READ THROUGH its selected store, so the store has to be
50
+ * opened from env before anything else: a PostgreSQL platform without `PG_CONNECT_URL`, and a MongoDB platform (the
51
+ * declaration absent or `mongodb`) without `MONGO_CONNECT_URL`. The MongoDB half was missing. Such a platform skipped
52
+ * the pre-connect (and said its store was PostgreSQL), then died at hydration on a configuration that cannot be
53
+ * satisfied at that phase, or, if it came up, waited on a MongoDB readiness check nothing would ever connect: the shape
54
+ * #1117 recorded, a service up and not ready until someone restarted it.
55
+ *
56
+ * A URL WITHOUT the declaration stays legal (the dual-store transition), and a store other than these two is not a
57
+ * platform store, so it owes no URL here.
58
+ */
59
+ export function missingSelectedPlatformStoreUrlKey(input) {
60
+ // An absent declaration is the framework default (MongoDB), the reading `resolvePlatformMongoPreconnectUrl` applies too.
61
+ const selected = parseDeclaredPersistenceAdapter(input.declaredDefaultAdapter);
62
+ if (selected === PersistenceAdapter.POSTGRESQL)
63
+ return input.pgConnectUrl ? undefined : PlatformInfrastructureEnvKey.PG_CONNECT_URL;
64
+ if (selected === PersistenceAdapter.MONGODB)
65
+ return input.mongoConnectUrl ? undefined : PlatformInfrastructureEnvKey.MONGO_CONNECT_URL;
66
+ return undefined;
67
+ }
43
68
  //# sourceMappingURL=platform-store-preconnect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-store-preconnect.js","sourceRoot":"","sources":["../../../../src/bootstrap/platform-store-preconnect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,iCAAiC,CAAC,KAGjD;IACC,+FAA+F;IAC/F,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,SAAS,CAAC;IAC3D,IAAI,eAAe,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACpD,OAAO,+BAA+B,CAAC,KAAK,CAAC,sBAAsB,CAAC,KAAK,kBAAkB,CAAC,UAAU;QACpG,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,eAAe,CAAC;AACtB,CAAC","sourcesContent":["import { parseDeclaredPersistenceAdapter, PersistenceAdapter } from '@wildo-ai/saas-models';\n\n/**\n * The MongoDB URL a platform service must pre-connect at boot, or `undefined` when it must not.\n *\n * ONE decision for every platform process that opens its own store from env before any config\n * document is readable: apps-manager (NORMAL and INIT mode), module-registry and the development\n * companion. Each used to spell it inline, and the spelling drifted: all four connected whenever\n * `MONGO_CONNECT_URL` was PRESENT.\n *\n * ## The gate is the SELECTED store, never the address\n *\n * The CLI emits `MONGO_CONNECT_URL` whenever the ENVIRONMENT hosts a mongod, and on a PostgreSQL\n * platform that mongod exists only for hosted Mongo-backed applications (apps-manager mints their\n * database users over a separate admin connection, which is why the URL is still delivered). So\n * presence says \"a mongod is reachable\", not \"the platform lives there\". Awaiting it anyway made an\n * application-side outage fatal to the platform: on 2026-09-24 mongod segfaulted, left an\n * unrecoverable journal record, crash-looped 243 times, and apps-manager, module-registry and the\n * companion all died on `ECONNRESET` while every platform row sat in PostgreSQL.\n *\n * The application boot connect asks the same question through `mongoDbIsSelectedStore`\n * (saas-backend-lib, 2026-09-19); this is its platform-side twin.\n *\n * ## Absent adapter still means MongoDB\n *\n * `DATABASE_DEFAULT_ADAPTER` absent or empty is the framework default, MongoDB, so a Mongo-engined\n * platform and the mid-flip dual-store state (both URLs, no declaration) keep connecting exactly as\n * before. A present-but-unknown declaration THROWS through the shared parser rather than collapsing\n * into the Mongo lane.\n *\n * Takes the two values rather than reading `process.env`, because the adapter key is owned by\n * `platform-core-shared` (`ApplicationBackendDataEnvKey`), which this package does not depend on;\n * callers read both keys through their own vocabulary.\n */\nexport function resolvePlatformMongoPreconnectUrl(input: {\n readonly mongoConnectUrl: string | undefined;\n readonly declaredDefaultAdapter: string | undefined;\n}): string | undefined {\n // Empty string is absent: the compose interpolation contract every platform env reader shares.\n const mongoConnectUrl = input.mongoConnectUrl || undefined;\n if (mongoConnectUrl === undefined) return undefined;\n return parseDeclaredPersistenceAdapter(input.declaredDefaultAdapter) === PersistenceAdapter.POSTGRESQL\n ? undefined\n : mongoConnectUrl;\n}\n"]}
1
+ {"version":3,"file":"platform-store-preconnect.js","sourceRoot":"","sources":["../../../src/bootstrap/platform-store-preconnect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,iCAAiC,CAAC,KAGjD;IACC,+FAA+F;IAC/F,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,SAAS,CAAC;IAC3D,IAAI,eAAe,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACpD,OAAO,+BAA+B,CAAC,KAAK,CAAC,sBAAsB,CAAC,KAAK,kBAAkB,CAAC,UAAU;QACpG,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,eAAe,CAAC;AACtB,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,kCAAkC,CAAC,KAIlD;IACC,yHAAyH;IACzH,MAAM,QAAQ,GAAG,+BAA+B,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC/E,IAAI,QAAQ,KAAK,kBAAkB,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,cAAc,CAAC;IACpI,IAAI,QAAQ,KAAK,kBAAkB,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,iBAAiB,CAAC;IACvI,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { parseDeclaredPersistenceAdapter, PersistenceAdapter } from '@wildo-ai/saas-models';\nimport { PlatformInfrastructureEnvKey } from './platform-runtime-env.contracts';\n\n/**\n * The MongoDB URL a platform service must pre-connect at boot, or `undefined` when it must not.\n *\n * ONE decision for every platform process that opens its own store from env before any config\n * document is readable: apps-manager (NORMAL and INIT mode), module-registry and the development\n * companion. Each used to spell it inline, and the spelling drifted: all four connected whenever\n * `MONGO_CONNECT_URL` was PRESENT.\n *\n * ## The gate is the SELECTED store, never the address\n *\n * The CLI emits `MONGO_CONNECT_URL` whenever the ENVIRONMENT hosts a mongod, and on a PostgreSQL\n * platform that mongod exists only for hosted Mongo-backed applications (apps-manager mints their\n * database users over a separate admin connection, which is why the URL is still delivered). So\n * presence says \"a mongod is reachable\", not \"the platform lives there\". Awaiting it anyway made an\n * application-side outage fatal to the platform: on 2026-09-24 mongod segfaulted, left an\n * unrecoverable journal record, crash-looped 243 times, and apps-manager, module-registry and the\n * companion all died on `ECONNRESET` while every platform row sat in PostgreSQL.\n *\n * The application boot connect asks the same question through `mongoDbIsSelectedStore`\n * (saas-backend-lib, 2026-09-19); this is its platform-side twin.\n *\n * ## Absent adapter still means MongoDB\n *\n * `DATABASE_DEFAULT_ADAPTER` absent or empty is the framework default, MongoDB, so a Mongo-engined\n * platform and the mid-flip dual-store state (both URLs, no declaration) keep connecting exactly as\n * before. A present-but-unknown declaration THROWS through the shared parser rather than collapsing\n * into the Mongo lane.\n *\n * Takes the two values rather than reading `process.env`, because the adapter key is owned by\n * `platform-core-shared` (`ApplicationBackendDataEnvKey`), which this package does not depend on;\n * callers read both keys through their own vocabulary.\n */\nexport function resolvePlatformMongoPreconnectUrl(input: {\n readonly mongoConnectUrl: string | undefined;\n readonly declaredDefaultAdapter: string | undefined;\n}): string | undefined {\n // Empty string is absent: the compose interpolation contract every platform env reader shares.\n const mongoConnectUrl = input.mongoConnectUrl || undefined;\n if (mongoConnectUrl === undefined) return undefined;\n return parseDeclaredPersistenceAdapter(input.declaredDefaultAdapter) === PersistenceAdapter.POSTGRESQL\n ? undefined\n : mongoConnectUrl;\n}\n\n/**\n * The env key of the platform's SELECTED store when its URL is absent, or `undefined` when the selected store has its URL\n * (#1117). ONE decision for every boot door that refuses such an environment: the apps-manager env schema, its NORMAL\n * and INIT pre-connects (both run before that schema is parsed), the module registry, and the dev companion's env schema.\n *\n * Both pairs, because the platform's configuration documents are READ THROUGH its selected store, so the store has to be\n * opened from env before anything else: a PostgreSQL platform without `PG_CONNECT_URL`, and a MongoDB platform (the\n * declaration absent or `mongodb`) without `MONGO_CONNECT_URL`. The MongoDB half was missing. Such a platform skipped\n * the pre-connect (and said its store was PostgreSQL), then died at hydration on a configuration that cannot be\n * satisfied at that phase, or, if it came up, waited on a MongoDB readiness check nothing would ever connect: the shape\n * #1117 recorded, a service up and not ready until someone restarted it.\n *\n * A URL WITHOUT the declaration stays legal (the dual-store transition), and a store other than these two is not a\n * platform store, so it owes no URL here.\n */\nexport function missingSelectedPlatformStoreUrlKey(input: {\n readonly mongoConnectUrl: string | undefined;\n readonly pgConnectUrl: string | undefined;\n readonly declaredDefaultAdapter: string | undefined;\n}): PlatformInfrastructureEnvKey.MONGO_CONNECT_URL | PlatformInfrastructureEnvKey.PG_CONNECT_URL | undefined {\n // An absent declaration is the framework default (MongoDB), the reading `resolvePlatformMongoPreconnectUrl` applies too.\n const selected = parseDeclaredPersistenceAdapter(input.declaredDefaultAdapter);\n if (selected === PersistenceAdapter.POSTGRESQL) return input.pgConnectUrl ? undefined : PlatformInfrastructureEnvKey.PG_CONNECT_URL;\n if (selected === PersistenceAdapter.MONGODB) return input.mongoConnectUrl ? undefined : PlatformInfrastructureEnvKey.MONGO_CONNECT_URL;\n return undefined;\n}\n"]}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * The in-database contract by which an application's PostgreSQL migrations grant a named runtime
3
+ * principal (a minion) the tables those migrations create (#3027).
4
+ *
5
+ * ## The gap it closes
6
+ *
7
+ * A minion's role is TABLE-SCOPED, and PostgreSQL can only grant a table that exists. apps-manager
8
+ * provisions the role BEFORE the application backend boots, and the backend's migrations create the
9
+ * tables WHEN it boots, so every table a migration creates was skipped by the grant pass and stayed
10
+ * out of reach until a later provisioning pass that nothing triggered. With #2894 that reached an
11
+ * engine floor table every minion needs (`applicationDataKeys`): a minion could not open the secrets
12
+ * the backend seals, from the moment the backend ran the migration.
13
+ *
14
+ * ## The contract
15
+ *
16
+ * apps-manager stays the ONLY party that decides what a principal may touch. Inside the grant
17
+ * transaction it records every grant it derived, existing table or not, in
18
+ * {@link POSTGRES_OWED_TABLE_GRANTS_SCHEMA}.{@link POSTGRES_OWED_TABLE_GRANTS_TABLE}, and installs
19
+ * {@link POSTGRES_APPLY_OWED_TABLE_GRANTS_FUNCTION}: a `SECURITY DEFINER` function that issues the
20
+ * recorded grants whose table now exists. EXECUTE is granted to the database OWNER (the application
21
+ * backend) and to nobody else. The backend calls it once its migrations are applied. So the grant a
22
+ * migration made possible lands in the same boot, and the backend executes a decision it cannot
23
+ * change: the record and the function belong to the admin role, and the backend holds no privilege
24
+ * on the record.
25
+ *
26
+ * Both sides LOCK the record table (`SHARE ROW EXCLUSIVE`, self-conflicting), so a backend applying the
27
+ * record and apps-manager replacing it never interleave: the backend applies either the old record before
28
+ * apps-manager's authoritative revoke-and-regrant, or the new one after. A table lock rather than an
29
+ * advisory key, because any connected role can take an advisory key and hold it; a table lock needs a
30
+ * privilege on the record, which only the admin holds. Every wait is bounded by
31
+ * {@link POSTGRES_OWED_TABLE_GRANTS_LOCK_TIMEOUT}.
32
+ *
33
+ * The function reads the record after its lock, which is a fresh read under `READ COMMITTED`. A caller
34
+ * running it under `REPEATABLE READ` reads the snapshot its transaction began with and may apply a record
35
+ * apps-manager has just replaced. That caller is the database owner, which can grant its own tables to
36
+ * anyone anyway, so it gains nothing; apps-manager's next pass corrects the grants.
37
+ *
38
+ * ## Rejected
39
+ *
40
+ * - apps-manager re-provisioning on a post-migration signal from the backend: the apps-to-manager
41
+ * channel has no write route by design (#2921), and an application able to trigger platform
42
+ * provisioning is a door it does not need. The signal here travels through the database, and all it
43
+ * can cause is the grants apps-manager already recorded.
44
+ * - The backend deriving the grants itself (`deriveMinionDatabaseGrants` is shared): a second
45
+ * derivation of who may touch what, beside role names and declarations that only apps-manager holds.
46
+ * Two authorities for one grant drift.
47
+ * - `ALTER DEFAULT PRIVILEGES`: schema-wide, so it would grant every future table, which is the
48
+ * over-grant table scoping exists to prevent.
49
+ * - An event trigger on `CREATE TABLE`: event triggers need superuser to create and are not available
50
+ * to every managed provider's admin role, and they fire inside every DDL statement.
51
+ */
52
+ /** The schema holding the owed-grant record and the function. Owned by the platform admin role; not the application's. */
53
+ export declare const POSTGRES_OWED_TABLE_GRANTS_SCHEMA = "wildo_access";
54
+ /** One row per (principal role, schema, table, privilege) apps-manager derived for that principal. */
55
+ export declare const POSTGRES_OWED_TABLE_GRANTS_TABLE = "owed_table_grants";
56
+ /**
57
+ * `wildo_access.apply_owed_table_grants()`: issues every recorded grant whose table and role exist,
58
+ * returns how many it issued. Idempotent (`GRANT` is), so it is safe on every backend boot.
59
+ */
60
+ export declare const POSTGRES_APPLY_OWED_TABLE_GRANTS_FUNCTION = "apply_owed_table_grants";
61
+ /** The name of the record's CHECK constraint on `privilege`, re-created from {@link PostgresOwedTablePrivilege} on every pass. */
62
+ export declare const POSTGRES_OWED_TABLE_GRANTS_PRIVILEGE_CHECK = "owed_table_grants_privilege_check";
63
+ /**
64
+ * How long either side waits for the other's lock on the record before failing (a PostgreSQL interval).
65
+ * A pass that waits longer is stuck, and failing names it; the backend's boot reports FAILED and continues.
66
+ */
67
+ export declare const POSTGRES_OWED_TABLE_GRANTS_LOCK_TIMEOUT = "30s";
68
+ /**
69
+ * The privileges a record row may carry. Closed because the function interpolates it into `GRANT`
70
+ * (a privilege is a keyword, not a bindable value): the function maps a stored value through literals
71
+ * generated from this set, so a value outside it is never spliced into SQL, and the record's CHECK
72
+ * constraint, built from the same set, refuses to store one.
73
+ */
74
+ export declare enum PostgresOwedTablePrivilege {
75
+ SELECT = "SELECT",
76
+ INSERT = "INSERT",
77
+ UPDATE = "UPDATE",
78
+ DELETE = "DELETE"
79
+ }
80
+ //# sourceMappingURL=postgresql-owed-grants.contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgresql-owed-grants.contracts.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/postgresql-owed-grants.contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,0HAA0H;AAC1H,eAAO,MAAM,iCAAiC,iBAAiB,CAAC;AAEhE,sGAAsG;AACtG,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,yCAAyC,4BAA4B,CAAC;AAEnF,kIAAkI;AAClI,eAAO,MAAM,0CAA0C,sCAAsC,CAAC;AAE9F;;;GAGG;AACH,eAAO,MAAM,uCAAuC,QAAQ,CAAC;AAE7D;;;;;GAKG;AACH,oBAAY,0BAA0B;IACpC,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * The in-database contract by which an application's PostgreSQL migrations grant a named runtime
3
+ * principal (a minion) the tables those migrations create (#3027).
4
+ *
5
+ * ## The gap it closes
6
+ *
7
+ * A minion's role is TABLE-SCOPED, and PostgreSQL can only grant a table that exists. apps-manager
8
+ * provisions the role BEFORE the application backend boots, and the backend's migrations create the
9
+ * tables WHEN it boots, so every table a migration creates was skipped by the grant pass and stayed
10
+ * out of reach until a later provisioning pass that nothing triggered. With #2894 that reached an
11
+ * engine floor table every minion needs (`applicationDataKeys`): a minion could not open the secrets
12
+ * the backend seals, from the moment the backend ran the migration.
13
+ *
14
+ * ## The contract
15
+ *
16
+ * apps-manager stays the ONLY party that decides what a principal may touch. Inside the grant
17
+ * transaction it records every grant it derived, existing table or not, in
18
+ * {@link POSTGRES_OWED_TABLE_GRANTS_SCHEMA}.{@link POSTGRES_OWED_TABLE_GRANTS_TABLE}, and installs
19
+ * {@link POSTGRES_APPLY_OWED_TABLE_GRANTS_FUNCTION}: a `SECURITY DEFINER` function that issues the
20
+ * recorded grants whose table now exists. EXECUTE is granted to the database OWNER (the application
21
+ * backend) and to nobody else. The backend calls it once its migrations are applied. So the grant a
22
+ * migration made possible lands in the same boot, and the backend executes a decision it cannot
23
+ * change: the record and the function belong to the admin role, and the backend holds no privilege
24
+ * on the record.
25
+ *
26
+ * Both sides LOCK the record table (`SHARE ROW EXCLUSIVE`, self-conflicting), so a backend applying the
27
+ * record and apps-manager replacing it never interleave: the backend applies either the old record before
28
+ * apps-manager's authoritative revoke-and-regrant, or the new one after. A table lock rather than an
29
+ * advisory key, because any connected role can take an advisory key and hold it; a table lock needs a
30
+ * privilege on the record, which only the admin holds. Every wait is bounded by
31
+ * {@link POSTGRES_OWED_TABLE_GRANTS_LOCK_TIMEOUT}.
32
+ *
33
+ * The function reads the record after its lock, which is a fresh read under `READ COMMITTED`. A caller
34
+ * running it under `REPEATABLE READ` reads the snapshot its transaction began with and may apply a record
35
+ * apps-manager has just replaced. That caller is the database owner, which can grant its own tables to
36
+ * anyone anyway, so it gains nothing; apps-manager's next pass corrects the grants.
37
+ *
38
+ * ## Rejected
39
+ *
40
+ * - apps-manager re-provisioning on a post-migration signal from the backend: the apps-to-manager
41
+ * channel has no write route by design (#2921), and an application able to trigger platform
42
+ * provisioning is a door it does not need. The signal here travels through the database, and all it
43
+ * can cause is the grants apps-manager already recorded.
44
+ * - The backend deriving the grants itself (`deriveMinionDatabaseGrants` is shared): a second
45
+ * derivation of who may touch what, beside role names and declarations that only apps-manager holds.
46
+ * Two authorities for one grant drift.
47
+ * - `ALTER DEFAULT PRIVILEGES`: schema-wide, so it would grant every future table, which is the
48
+ * over-grant table scoping exists to prevent.
49
+ * - An event trigger on `CREATE TABLE`: event triggers need superuser to create and are not available
50
+ * to every managed provider's admin role, and they fire inside every DDL statement.
51
+ */
52
+ /** The schema holding the owed-grant record and the function. Owned by the platform admin role; not the application's. */
53
+ export const POSTGRES_OWED_TABLE_GRANTS_SCHEMA = 'wildo_access';
54
+ /** One row per (principal role, schema, table, privilege) apps-manager derived for that principal. */
55
+ export const POSTGRES_OWED_TABLE_GRANTS_TABLE = 'owed_table_grants';
56
+ /**
57
+ * `wildo_access.apply_owed_table_grants()`: issues every recorded grant whose table and role exist,
58
+ * returns how many it issued. Idempotent (`GRANT` is), so it is safe on every backend boot.
59
+ */
60
+ export const POSTGRES_APPLY_OWED_TABLE_GRANTS_FUNCTION = 'apply_owed_table_grants';
61
+ /** The name of the record's CHECK constraint on `privilege`, re-created from {@link PostgresOwedTablePrivilege} on every pass. */
62
+ export const POSTGRES_OWED_TABLE_GRANTS_PRIVILEGE_CHECK = 'owed_table_grants_privilege_check';
63
+ /**
64
+ * How long either side waits for the other's lock on the record before failing (a PostgreSQL interval).
65
+ * A pass that waits longer is stuck, and failing names it; the backend's boot reports FAILED and continues.
66
+ */
67
+ export const POSTGRES_OWED_TABLE_GRANTS_LOCK_TIMEOUT = '30s';
68
+ /**
69
+ * The privileges a record row may carry. Closed because the function interpolates it into `GRANT`
70
+ * (a privilege is a keyword, not a bindable value): the function maps a stored value through literals
71
+ * generated from this set, so a value outside it is never spliced into SQL, and the record's CHECK
72
+ * constraint, built from the same set, refuses to store one.
73
+ */
74
+ export var PostgresOwedTablePrivilege;
75
+ (function (PostgresOwedTablePrivilege) {
76
+ PostgresOwedTablePrivilege["SELECT"] = "SELECT";
77
+ PostgresOwedTablePrivilege["INSERT"] = "INSERT";
78
+ PostgresOwedTablePrivilege["UPDATE"] = "UPDATE";
79
+ PostgresOwedTablePrivilege["DELETE"] = "DELETE";
80
+ })(PostgresOwedTablePrivilege || (PostgresOwedTablePrivilege = {}));
81
+ //# sourceMappingURL=postgresql-owed-grants.contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgresql-owed-grants.contracts.js","sourceRoot":"","sources":["../../../src/bootstrap/postgresql-owed-grants.contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,0HAA0H;AAC1H,MAAM,CAAC,MAAM,iCAAiC,GAAG,cAAc,CAAC;AAEhE,sGAAsG;AACtG,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;AAEpE;;;GAGG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,yBAAyB,CAAC;AAEnF,kIAAkI;AAClI,MAAM,CAAC,MAAM,0CAA0C,GAAG,mCAAmC,CAAC;AAE9F;;;GAGG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,KAAK,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAN,IAAY,0BAKX;AALD,WAAY,0BAA0B;IACpC,+CAAiB,CAAA;IACjB,+CAAiB,CAAA;IACjB,+CAAiB,CAAA;IACjB,+CAAiB,CAAA;AACnB,CAAC,EALW,0BAA0B,KAA1B,0BAA0B,QAKrC","sourcesContent":["/**\n * The in-database contract by which an application's PostgreSQL migrations grant a named runtime\n * principal (a minion) the tables those migrations create (#3027).\n *\n * ## The gap it closes\n *\n * A minion's role is TABLE-SCOPED, and PostgreSQL can only grant a table that exists. apps-manager\n * provisions the role BEFORE the application backend boots, and the backend's migrations create the\n * tables WHEN it boots, so every table a migration creates was skipped by the grant pass and stayed\n * out of reach until a later provisioning pass that nothing triggered. With #2894 that reached an\n * engine floor table every minion needs (`applicationDataKeys`): a minion could not open the secrets\n * the backend seals, from the moment the backend ran the migration.\n *\n * ## The contract\n *\n * apps-manager stays the ONLY party that decides what a principal may touch. Inside the grant\n * transaction it records every grant it derived, existing table or not, in\n * {@link POSTGRES_OWED_TABLE_GRANTS_SCHEMA}.{@link POSTGRES_OWED_TABLE_GRANTS_TABLE}, and installs\n * {@link POSTGRES_APPLY_OWED_TABLE_GRANTS_FUNCTION}: a `SECURITY DEFINER` function that issues the\n * recorded grants whose table now exists. EXECUTE is granted to the database OWNER (the application\n * backend) and to nobody else. The backend calls it once its migrations are applied. So the grant a\n * migration made possible lands in the same boot, and the backend executes a decision it cannot\n * change: the record and the function belong to the admin role, and the backend holds no privilege\n * on the record.\n *\n * Both sides LOCK the record table (`SHARE ROW EXCLUSIVE`, self-conflicting), so a backend applying the\n * record and apps-manager replacing it never interleave: the backend applies either the old record before\n * apps-manager's authoritative revoke-and-regrant, or the new one after. A table lock rather than an\n * advisory key, because any connected role can take an advisory key and hold it; a table lock needs a\n * privilege on the record, which only the admin holds. Every wait is bounded by\n * {@link POSTGRES_OWED_TABLE_GRANTS_LOCK_TIMEOUT}.\n *\n * The function reads the record after its lock, which is a fresh read under `READ COMMITTED`. A caller\n * running it under `REPEATABLE READ` reads the snapshot its transaction began with and may apply a record\n * apps-manager has just replaced. That caller is the database owner, which can grant its own tables to\n * anyone anyway, so it gains nothing; apps-manager's next pass corrects the grants.\n *\n * ## Rejected\n *\n * - apps-manager re-provisioning on a post-migration signal from the backend: the apps-to-manager\n * channel has no write route by design (#2921), and an application able to trigger platform\n * provisioning is a door it does not need. The signal here travels through the database, and all it\n * can cause is the grants apps-manager already recorded.\n * - The backend deriving the grants itself (`deriveMinionDatabaseGrants` is shared): a second\n * derivation of who may touch what, beside role names and declarations that only apps-manager holds.\n * Two authorities for one grant drift.\n * - `ALTER DEFAULT PRIVILEGES`: schema-wide, so it would grant every future table, which is the\n * over-grant table scoping exists to prevent.\n * - An event trigger on `CREATE TABLE`: event triggers need superuser to create and are not available\n * to every managed provider's admin role, and they fire inside every DDL statement.\n */\n\n/** The schema holding the owed-grant record and the function. Owned by the platform admin role; not the application's. */\nexport const POSTGRES_OWED_TABLE_GRANTS_SCHEMA = 'wildo_access';\n\n/** One row per (principal role, schema, table, privilege) apps-manager derived for that principal. */\nexport const POSTGRES_OWED_TABLE_GRANTS_TABLE = 'owed_table_grants';\n\n/**\n * `wildo_access.apply_owed_table_grants()`: issues every recorded grant whose table and role exist,\n * returns how many it issued. Idempotent (`GRANT` is), so it is safe on every backend boot.\n */\nexport const POSTGRES_APPLY_OWED_TABLE_GRANTS_FUNCTION = 'apply_owed_table_grants';\n\n/** The name of the record's CHECK constraint on `privilege`, re-created from {@link PostgresOwedTablePrivilege} on every pass. */\nexport const POSTGRES_OWED_TABLE_GRANTS_PRIVILEGE_CHECK = 'owed_table_grants_privilege_check';\n\n/**\n * How long either side waits for the other's lock on the record before failing (a PostgreSQL interval).\n * A pass that waits longer is stuck, and failing names it; the backend's boot reports FAILED and continues.\n */\nexport const POSTGRES_OWED_TABLE_GRANTS_LOCK_TIMEOUT = '30s';\n\n/**\n * The privileges a record row may carry. Closed because the function interpolates it into `GRANT`\n * (a privilege is a keyword, not a bindable value): the function maps a stored value through literals\n * generated from this set, so a value outside it is never spliced into SQL, and the record's CHECK\n * constraint, built from the same set, refuses to store one.\n */\nexport enum PostgresOwedTablePrivilege {\n SELECT = 'SELECT',\n INSERT = 'INSERT',\n UPDATE = 'UPDATE',\n DELETE = 'DELETE',\n}\n"]}