@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
@@ -9,9 +9,7 @@ import { z } from 'zod';
9
9
  * diagnostic path or console preference from becoming deployment policy.
10
10
  */
11
11
  export declare const ApplicationCreationVerificationConfigSchema: z.ZodObject<{
12
- /** App-root-relative destination for persistent verification evidence. */
13
12
  evidenceDirectory: z.ZodString;
14
- /** Suppress successful child/receipt presentation without weakening evidence. */
15
13
  silent: z.ZodDefault<z.ZodBoolean>;
16
14
  }, z.core.$strict>;
17
15
  export type ApplicationCreationVerificationConfig = z.infer<typeof ApplicationCreationVerificationConfigSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"application-creation-verification.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/application-creation-verification.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,2CAA2C;IACtD,0EAA0E;;IAU1E,iFAAiF;;kBAEjF,CAAC;AAEH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC"}
1
+ {"version":3,"file":"application-creation-verification.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/application-creation-verification.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,2CAA2C;;;kBAatD,CAAC;AAEH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"application-creation-verification.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/application-creation-verification.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG,CAAC,CAAC,YAAY,CAAC;IACxE,0EAA0E;IAC1E,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACzE,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;YAC7F,OAAO,CAAC,QAAQ,CAAC;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iGAAiG;aAC3G,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;IACF,iFAAiF;IACjF,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACnC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * Local operator posture for application-creation workflow verification.\n *\n * This is authored in `wildo.infra.local.config.ts`. It is never read directly\n * by the verification command: config sync first snapshots it into generated\n * `config.json`, then projects it into the ephemeral app-root `.env` consumed\n * by the operator command. Keeping this block local-only prevents a developer\n * diagnostic path or console preference from becoming deployment policy.\n */\nexport const ApplicationCreationVerificationConfigSchema = z.strictObject({\n /** App-root-relative destination for persistent verification evidence. */\n evidenceDirectory: z.string().trim().min(1).superRefine((value, context) => {\n const pathSegments = value.split(/[\\\\/]/u);\n if (/^(?:[A-Za-z]:[\\\\/]|[\\\\/])/u.test(value) || pathSegments.includes('..') || value === '.') {\n context.addIssue({\n code: 'custom',\n message: 'applicationCreationVerification.evidenceDirectory must be an app-root-relative descendant path.',\n });\n }\n }),\n /** Suppress successful child/receipt presentation without weakening evidence. */\n silent: z.boolean().default(false),\n});\n\nexport type ApplicationCreationVerificationConfig = z.infer<typeof ApplicationCreationVerificationConfigSchema>;\n"]}
1
+ {"version":3,"file":"application-creation-verification.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/application-creation-verification.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG,CAAC,CAAC,YAAY,CAAC;IACxE,0EAA0E;IAC1E,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACzE,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;YAC7F,OAAO,CAAC,QAAQ,CAAC;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iGAAiG;aAC3G,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;IACF,iFAAiF;IACjF,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACnC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * Local operator posture for application-creation workflow verification.\n *\n * This is authored in `wildo.infra.local.config.ts`. It is never read directly\n * by the verification command: config sync first snapshots it into generated\n * `config.json`, then projects it into the ephemeral app-root `.env` consumed\n * by the operator command. Keeping this block local-only prevents a developer\n * diagnostic path or console preference from becoming deployment policy.\n */\nexport const ApplicationCreationVerificationConfigSchema = z.strictObject({\n /** App-root-relative destination for persistent verification evidence. */\n evidenceDirectory: z.string().trim().min(1).superRefine((value, context) => {\n const pathSegments = value.split(/[\\\\/]/u);\n if (/^(?:[A-Za-z]:[\\\\/]|[\\\\/])/u.test(value) || pathSegments.includes('..') || value === '.') {\n context.addIssue({\n code: 'custom',\n message: 'applicationCreationVerification.evidenceDirectory must be an app-root-relative descendant path.',\n });\n }\n }),\n /** Suppress successful child/receipt presentation without weakening evidence. */\n silent: z.boolean().default(false),\n});\n\nexport type ApplicationCreationVerificationConfig = z.infer<typeof ApplicationCreationVerificationConfigSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-modules.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/application-modules.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3C;;;OAGG;IACH,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAC9C,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EACjB,8BAA8B,CAC/B,CAAC,QAAQ,EAAE,CAAC;AAEb,iEAAiE","sourcesContent":["import { z } from 'zod';\n\n/**\n * @wildo_source:part:start platform.config.application-modules facet:layer:platform facet:family:bootstrap\n *\n * SaaS root `modules` map: each module id binds to the service keys it consumes (`ApplicationModulesSchema`).\n */\nexport const ApplicationModuleBindingSchema = z.object({\n services: z.array(z.string().min(1)).min(1),\n /**\n * When true, at least one backend workload for this module requires the\n * Java-enabled framework backend base image (for example SAML/XSD flows).\n */\n haveSamlIntegration: z.boolean().optional(),\n});\nexport type ApplicationModuleBinding = z.infer<typeof ApplicationModuleBindingSchema>;\n\nexport const ApplicationModulesSchema = z.record(\n z.string().min(1),\n ApplicationModuleBindingSchema,\n).optional();\nexport type ApplicationModules = z.infer<typeof ApplicationModulesSchema>;\n/** @wildo_source:part:end platform.config.application-modules */\n"]}
1
+ {"version":3,"file":"application-modules.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/application-modules.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3C;;;OAGG;IACH,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAC9C,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EACjB,8BAA8B,CAC/B,CAAC,QAAQ,EAAE,CAAC;AAEb,iEAAiE","sourcesContent":["import { z } from 'zod';\n\n/**\n * @wildo_source:part:start platform.config.application-modules facet:layer:platform facet:family:bootstrap\n *\n * SaaS root `modules` map: each module id binds to the service keys it consumes (`ApplicationModulesSchema`).\n */\nexport const ApplicationModuleBindingSchema = z.object({\n services: z.array(z.string().min(1)).min(1),\n /**\n * When true, at least one backend workload for this module requires the\n * Java-enabled framework backend base image (for example SAML/XSD flows).\n */\n haveSamlIntegration: z.boolean().optional(),\n});\nexport type ApplicationModuleBinding = z.infer<typeof ApplicationModuleBindingSchema>;\n\nexport const ApplicationModulesSchema = z.record(\n z.string().min(1),\n ApplicationModuleBindingSchema,\n).optional();\nexport type ApplicationModules = z.infer<typeof ApplicationModulesSchema>;\n/** @wildo_source:part:end platform.config.application-modules */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-modules.utils.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/application-modules.utils.ts"],"names":[],"mappings":"AAEA,SAAS,gBAAgB,CACvB,OAAuC,EACvC,SAA6C;IAE7C,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;SACjC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;SACpD,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,sBAAsB,CAC7B,SAAmB,EACnB,mBAAsC,EACtC,aAAqB;IAErB,MAAM,gBAAgB,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,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AsC,EACtC,aAAqB;IAErB,OAAO,sBAAsB,CAC3B,+BAA+B,CAAC,OAAO,CAAC,EACxC,mBAAmB,EACnB,aAAa,CACd,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qCAAqC,CACnD,OAAuC,EACvC,UAAkB,EAClB,mBAAsC,EACtC,aAAa,GAAG,YAAY,UAAU,GAAG;IAEzC,OAAO,sBAAsB,CAC3B,mCAAmC,CAAC,OAAO,EAAE,UAAU,CAAC,EACxD,mBAAmB,EACnB,aAAa,CACd,CAAC;AACJ,CAAC","sourcesContent":["import type { ApplicationModules } from './application-modules.schemas';\n\nfunction resolveModuleIds(\n modules: ApplicationModules | undefined,\n predicate: (serviceKeys: string[]) => boolean,\n): string[] {\n return Object.entries(modules ?? {})\n .filter(([, binding]) => predicate(binding.services))\n .map(([moduleId]) => moduleId);\n}\n\nfunction pickApplicationModules<T>(\n moduleIds: string[],\n declaredModulesById: Record<string, T>,\n consumerLabel: string,\n): T[] {\n const missingModuleIds = moduleIds.filter((moduleId) => !(moduleId in declaredModulesById));\n\n if (missingModuleIds.length > 0) {\n throw new Error(\n `Application modules [${missingModuleIds.join(', ')}] are declared for ${consumerLabel} ` +\n 'in wildo.saas.config.ts but no matching implementation was registered.',\n );\n }\n\n return moduleIds.map((moduleId) => declaredModulesById[moduleId]!);\n}\n\nexport function getDeclaredApplicationModuleIds(\n modules: ApplicationModules | undefined,\n): string[] {\n return resolveModuleIds(modules, () => true);\n}\n\nexport function getServiceBoundApplicationModuleIds(\n modules: ApplicationModules | undefined,\n serviceKey: string,\n): string[] {\n return resolveModuleIds(modules, (serviceKeys) => serviceKeys.includes(serviceKey));\n}\n\nexport function hasServiceBoundModuleWithSamlIntegration(\n modules: ApplicationModules | undefined,\n serviceKeys: string | string[],\n): boolean {\n const serviceKeySet = new Set(Array.isArray(serviceKeys) ? serviceKeys : [serviceKeys]);\n\n return Object.values(modules ?? {}).some(\n (binding) => binding.haveSamlIntegration === true &&\n binding.services.some((serviceKey) => serviceKeySet.has(serviceKey)),\n );\n}\n\nexport function resolveDeclaredApplicationModules<T>(\n modules: ApplicationModules | undefined,\n declaredModulesById: Record<string, T>,\n consumerLabel: string,\n): T[] {\n return pickApplicationModules(\n getDeclaredApplicationModuleIds(modules),\n declaredModulesById,\n consumerLabel,\n );\n}\n\nexport function resolveServiceBoundApplicationModules<T>(\n modules: ApplicationModules | undefined,\n serviceKey: string,\n declaredModulesById: Record<string, T>,\n consumerLabel = `service \"${serviceKey}\"`,\n): T[] {\n return pickApplicationModules(\n getServiceBoundApplicationModuleIds(modules, serviceKey),\n declaredModulesById,\n consumerLabel,\n );\n}\n"]}
1
+ {"version":3,"file":"application-modules.utils.js","sourceRoot":"","sources":["../../../../src/project-config/shared/application-modules.utils.ts"],"names":[],"mappings":"AAEA,SAAS,gBAAgB,CACvB,OAAuC,EACvC,SAA6C;IAE7C,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;SACjC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;SACpD,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,sBAAsB,CAC7B,SAAmB,EACnB,mBAAsC,EACtC,aAAqB;IAErB,MAAM,gBAAgB,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,mBAAmB,CAAC,CAAC,CAAC;IAE5F,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,wBAAwB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,aAAa,GAAG;YACzF,wEAAwE,CACzE,CAAC;IACJ,CAAC;IAED,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,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CACd,CAAC;AACJ,CAAC","sourcesContent":["import type { ApplicationModules } from './application-modules.schemas';\n\nfunction resolveModuleIds(\n modules: ApplicationModules | undefined,\n predicate: (serviceKeys: string[]) => boolean,\n): string[] {\n return Object.entries(modules ?? {})\n .filter(([, binding]) => predicate(binding.services))\n .map(([moduleId]) => moduleId);\n}\n\nfunction pickApplicationModules<T>(\n moduleIds: string[],\n declaredModulesById: Record<string, T>,\n consumerLabel: string,\n): T[] {\n const missingModuleIds = moduleIds.filter((moduleId) => !(moduleId in declaredModulesById));\n\n if (missingModuleIds.length > 0) {\n throw new Error(\n `Application modules [${missingModuleIds.join(', ')}] are declared for ${consumerLabel} ` +\n 'in wildo.saas.config.ts but no matching implementation was registered.',\n );\n }\n\n return moduleIds.map((moduleId) => declaredModulesById[moduleId]!);\n}\n\nexport function getDeclaredApplicationModuleIds(\n modules: ApplicationModules | undefined,\n): string[] {\n return resolveModuleIds(modules, () => true);\n}\n\nexport function getServiceBoundApplicationModuleIds(\n modules: ApplicationModules | undefined,\n serviceKey: string,\n): string[] {\n return resolveModuleIds(modules, (serviceKeys) => serviceKeys.includes(serviceKey));\n}\n\nexport function hasServiceBoundModuleWithSamlIntegration(\n modules: ApplicationModules | undefined,\n serviceKeys: string | string[],\n): boolean {\n const serviceKeySet = new Set(Array.isArray(serviceKeys) ? serviceKeys : [serviceKeys]);\n\n return Object.values(modules ?? {}).some(\n (binding) => binding.haveSamlIntegration === true &&\n binding.services.some((serviceKey) => serviceKeySet.has(serviceKey)),\n );\n}\n\nexport function resolveDeclaredApplicationModules<T>(\n modules: ApplicationModules | undefined,\n declaredModulesById: Record<string, T>,\n consumerLabel: string,\n): T[] {\n return pickApplicationModules(\n getDeclaredApplicationModuleIds(modules),\n declaredModulesById,\n consumerLabel,\n );\n}\n\nexport function resolveServiceBoundApplicationModules<T>(\n modules: ApplicationModules | undefined,\n serviceKey: string,\n declaredModulesById: Record<string, T>,\n consumerLabel = `service \"${serviceKey}\"`,\n): T[] {\n return pickApplicationModules(\n getServiceBoundApplicationModuleIds(modules, serviceKey),\n declaredModulesById,\n consumerLabel,\n );\n}\n"]}
@@ -56,24 +56,7 @@ import { z } from 'zod';
56
56
  * authored knob" rule documented in the file-level JSDoc above.
57
57
  */
58
58
  export declare const WildoAuthConfigSchema: z.ZodObject<{
59
- /**
60
- * Access-token TTL in minutes. Authored value > schema default (15).
61
- * Threaded into `Wildo_Application_Config.jwt.accessTokenExpiration
62
- * Minutes` at apps-manager init time; consumed at token-sign time by
63
- * `AuthTokenIssuerBackendService.issueAccessToken`.
64
- *
65
- * Default = 15 (Auth-hardening Slice A Step 5, 2026-04-13). Pre-Slice-A
66
- * the default was 60 \u2014 the file-level JSDoc above documents the
67
- * threat-model rationale for the tightening.
68
- */
69
59
  accessTokenExpirationMinutes: z.ZodDefault<z.ZodNumber>;
70
- /**
71
- * Refresh-token TTL in days. Authored value > schema default (30).
72
- * Threaded into `Wildo_Application_Config.jwt.refreshTokenExpiration
73
- * Days` at apps-manager init time; consumed at token-sign time by
74
- * `JwtBackendService.createRefreshToken` and at session-bookkeeping
75
- * time by `AuthTokenIssuerBackendService.invalidateAllTokensForUser`.
76
- */
77
60
  refreshTokenExpirationDays: z.ZodDefault<z.ZodNumber>;
78
61
  }, z.core.$strict>;
79
62
  export type WildoAuthConfig = z.infer<typeof WildoAuthConfigSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/auth.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;IAChC;;;;;;;;;OASG;;IAEH;;;;;;OAMG;;kBAEH,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"auth.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/auth.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;kBAoBhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"auth.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/auth.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,YAAY,CAAC;IAClD;;;;;;;;;OASG;IACH,4BAA4B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IACrE;;;;;;OAMG;IACH,0BAA0B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACpE,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * Authored JWT TTL policy block for `wildo.infra.<env>.config.ts`.\n *\n * Source-of-truth contract (Slice 3.3, F-24):\n * - `accessTokenExpirationMinutes` and `refreshTokenExpirationDays` are\n * threaded by the CLI through the apps-manager init endpoint\n * (`AdminAppInitializeRequest.serviceAuth`) into\n * `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,\n * refreshTokenExpirationDays}`. The runtime backend reads them at\n * token-sign time (`auth-token-issuer.backend.service.ts`,\n * `jwt.backend.service.ts`).\n * - First registration uses the schema defaults when `serviceAuth` is absent. Ordinary\n * re-registration preserves the stored policy when the whole block is omitted. A present\n * block resolves omitted members through these defaults and reconciles both lifetimes.\n *\n * Default tightening (Auth-hardening Slice A Step 5, 2026-04-13):\n * - `accessTokenExpirationMinutes` default was lowered from 60 \\u2192 15 in\n * conjunction with the cookie migration (Slice A Steps 2 + 3). With the\n * refresh token now confined to an `HttpOnly` cookie, an XSS bug only\n * exposes the SHORT-lived access token; the smaller the access-token\n * window, the smaller the residual XSS-stolen-token blast radius.\n * Operator overrides via `serviceAuth.accessTokenExpirationMinutes` in\n * `wildo.infra.<env>.config.ts` are untouched \\u2014 author a value to\n * deviate from the framework recommendation. The refresh-token TTL\n * (`refreshTokenExpirationDays`) is unchanged at 30 days because the\n * cookie-confined refresh token does not benefit from an additional\n * TTL squeeze (rotation + JTI blacklist + reuse detection already bound\n * the steal window per use).\n *\n * Algorithm selection is intentionally NOT authored here: the application\n * JWT signing path (`jwt.backend.service.ts`) selects per the per-service\n * key convention, and the apps-manager response-signer pins ES256 for the\n * config-handshake envelope (anti-replay, see F-55 JSDoc on\n * `platform-services-to-manager.apps-manager.platform.controller.ts`).\n * Authoring an algorithm here would add a knob with no honest consumer.\n *\n * Publication lifecycle:\n * - The CLI forwards `env.serviceAuth` through the admin initialization request. Existing\n * applications reconcile an explicitly supplied policy even when no other settings changed;\n * no broad initialization override is required for a token-lifetime-only change.\n * - Ordinary initialization with an omitted block preserves existing lifetimes, including\n * incidental public-key/database repairs. Explicit `override:true` retains its wider reset\n * semantics: absent `serviceAuth` resets lifetimes to the schema defaults below.\n * - Applications retrieve the persisted policy at startup. Running processes do not receive\n * live policy updates, and existing tokens retain the expiration already encoded in them.\n *\n * Pinned by `managed-token-policy-convergence.apps-manager.platform.test.ts` and the lifecycle\n * default derivation tests; the former exercises persistence and the bootstrap consumer offline.\n */\n/**\n * `z.strictObject` (Zod 4) is intentional: any unknown key (e.g. a\n * re-introduced `jwtAlgorithm`, or a typo'd `accessTokenExpirationMinute`)\n * must surface as a parse error instead of being silently stripped. This\n * is the framework-mindset enforcement of the \"no honest consumer => no\n * authored knob\" rule documented in the file-level JSDoc above.\n */\nexport const WildoAuthConfigSchema = z.strictObject({\n /**\n * Access-token TTL in minutes. Authored value > schema default (15).\n * Threaded into `Wildo_Application_Config.jwt.accessTokenExpiration\n * Minutes` at apps-manager init time; consumed at token-sign time by\n * `AuthTokenIssuerBackendService.issueAccessToken`.\n *\n * Default = 15 (Auth-hardening Slice A Step 5, 2026-04-13). Pre-Slice-A\n * the default was 60 \\u2014 the file-level JSDoc above documents the\n * threat-model rationale for the tightening.\n */\n accessTokenExpirationMinutes: z.number().int().positive().default(15),\n /**\n * Refresh-token TTL in days. Authored value > schema default (30).\n * Threaded into `Wildo_Application_Config.jwt.refreshTokenExpiration\n * Days` at apps-manager init time; consumed at token-sign time by\n * `JwtBackendService.createRefreshToken` and at session-bookkeeping\n * time by `AuthTokenIssuerBackendService.invalidateAllTokensForUser`.\n */\n refreshTokenExpirationDays: z.number().int().positive().default(30),\n});\nexport type WildoAuthConfig = z.infer<typeof WildoAuthConfigSchema>;\nexport type WildoAuthConfigInput = z.input<typeof WildoAuthConfigSchema>;\n"]}
1
+ {"version":3,"file":"auth.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/auth.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,YAAY,CAAC;IAClD;;;;;;;;;OASG;IACH,4BAA4B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IACrE;;;;;;OAMG;IACH,0BAA0B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACpE,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * Authored JWT TTL policy block for `wildo.infra.<env>.config.ts`.\n *\n * Source-of-truth contract (Slice 3.3, F-24):\n * - `accessTokenExpirationMinutes` and `refreshTokenExpirationDays` are\n * threaded by the CLI through the apps-manager init endpoint\n * (`AdminAppInitializeRequest.serviceAuth`) into\n * `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,\n * refreshTokenExpirationDays}`. The runtime backend reads them at\n * token-sign time (`auth-token-issuer.backend.service.ts`,\n * `jwt.backend.service.ts`).\n * - First registration uses the schema defaults when `serviceAuth` is absent. Ordinary\n * re-registration preserves the stored policy when the whole block is omitted. A present\n * block resolves omitted members through these defaults and reconciles both lifetimes.\n *\n * Default tightening (Auth-hardening Slice A Step 5, 2026-04-13):\n * - `accessTokenExpirationMinutes` default was lowered from 60 \\u2192 15 in\n * conjunction with the cookie migration (Slice A Steps 2 + 3). With the\n * refresh token now confined to an `HttpOnly` cookie, an XSS bug only\n * exposes the SHORT-lived access token; the smaller the access-token\n * window, the smaller the residual XSS-stolen-token blast radius.\n * Operator overrides via `serviceAuth.accessTokenExpirationMinutes` in\n * `wildo.infra.<env>.config.ts` are untouched \\u2014 author a value to\n * deviate from the framework recommendation. The refresh-token TTL\n * (`refreshTokenExpirationDays`) is unchanged at 30 days because the\n * cookie-confined refresh token does not benefit from an additional\n * TTL squeeze (rotation + JTI blacklist + reuse detection already bound\n * the steal window per use).\n *\n * Algorithm selection is intentionally NOT authored here: the application\n * JWT signing path (`jwt.backend.service.ts`) selects per the per-service\n * key convention, and the apps-manager response-signer pins ES256 for the\n * config-handshake envelope (anti-replay, see F-55 JSDoc on\n * `platform-services-to-manager.apps-manager.platform.controller.ts`).\n * Authoring an algorithm here would add a knob with no honest consumer.\n *\n * Publication lifecycle:\n * - The CLI forwards `env.serviceAuth` through the admin initialization request. Existing\n * applications reconcile an explicitly supplied policy even when no other settings changed;\n * no broad initialization override is required for a token-lifetime-only change.\n * - Ordinary initialization with an omitted block preserves existing lifetimes, including\n * incidental public-key/database repairs. Explicit `override:true` retains its wider reset\n * semantics: absent `serviceAuth` resets lifetimes to the schema defaults below.\n * - Applications retrieve the persisted policy at startup. Running processes do not receive\n * live policy updates, and existing tokens retain the expiration already encoded in them.\n *\n * Pinned by `managed-token-policy-convergence.apps-manager.platform.test.ts` and the lifecycle\n * default derivation tests; the former exercises persistence and the bootstrap consumer offline.\n */\n/**\n * `z.strictObject` (Zod 4) is intentional: any unknown key (e.g. a\n * re-introduced `jwtAlgorithm`, or a typo'd `accessTokenExpirationMinute`)\n * must surface as a parse error instead of being silently stripped. This\n * is the framework-mindset enforcement of the \"no honest consumer => no\n * authored knob\" rule documented in the file-level JSDoc above.\n */\nexport const WildoAuthConfigSchema = z.strictObject({\n /**\n * Access-token TTL in minutes. Authored value > schema default (15).\n * Threaded into `Wildo_Application_Config.jwt.accessTokenExpiration\n * Minutes` at apps-manager init time; consumed at token-sign time by\n * `AuthTokenIssuerBackendService.issueAccessToken`.\n *\n * Default = 15 (Auth-hardening Slice A Step 5, 2026-04-13). Pre-Slice-A\n * the default was 60 \\u2014 the file-level JSDoc above documents the\n * threat-model rationale for the tightening.\n */\n accessTokenExpirationMinutes: z.number().int().positive().default(15),\n /**\n * Refresh-token TTL in days. Authored value > schema default (30).\n * Threaded into `Wildo_Application_Config.jwt.refreshTokenExpiration\n * Days` at apps-manager init time; consumed at token-sign time by\n * `JwtBackendService.createRefreshToken` and at session-bookkeeping\n * time by `AuthTokenIssuerBackendService.invalidateAllTokensForUser`.\n */\n refreshTokenExpirationDays: z.number().int().positive().default(30),\n});\nexport type WildoAuthConfig = z.infer<typeof WildoAuthConfigSchema>;\nexport type WildoAuthConfigInput = z.input<typeof WildoAuthConfigSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"backing-service-servability.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/backing-service-servability.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,0CAA0C;AAC1C,MAAM,CAAN,IAAY,8BAmBX;AAnBD,WAAY,8BAA8B;IACxC,4FAA4F;IAC5F,6DAA2B,CAAA;IAC3B;;;OAGG;IACH,yEAAuC,CAAA;IACvC;;;;;;;;;OASG;IACH,+EAA6C,CAAA;AAC/C,CAAC,EAnBW,8BAA8B,KAA9B,8BAA8B,QAmBzC;AAcD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAuE;IACvH,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,oBAAoB,CAAC,IAAI,EAAE;IACrG,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,oBAAoB,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE;IAC5H,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,oBAAoB,CAAC,IAAI,EAAE;IACzG,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,oBAAoB,CAAC,OAAO,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,CAAC,EAAE,CAAC;IACpH,OAAO,gBAAgB,OAAO,CAAC,OAAO,sBAAsB,OAAO,CAAC,IAAI,IAAI,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,GAAG,KAAK,OAAO,GAAG,CAAC;AACtI,CAAC;AAED,yFAAyF;AACzF,MAAM,OAAO,wCAAyC,SAAQ,KAAK;IACxD,QAAQ,CAAqD;IAEtE,YAAY,QAA4D;QACtE,KAAK,CACH,kGAAkG;cAChG,mDAAmD;cACnD,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,2CAA2C,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACtG,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,0CAA0C,CAAC;QACvD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AAED,oFAAoF;AACpF,MAAM,UAAU,wCAAwC,CAAC,KAGxD;IACC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,wCAAwC,CAAC;QACpF,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,eAAe,EAAE,GAAG,CAAC,eAAe;QACpC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;KAC3C,CAAC,CAAC,CAAC;IACJ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,wCAAwC,CAAC,QAAQ,CAAC,CAAC;AACxF,CAAC","sourcesContent":["import {\n BackingServiceKind,\n BackingServiceSource,\n resolveInfraProvider,\n type BackingServicesEnvConfig,\n} from './backing-services.schemas';\nimport { InfraProvider } from './infra-providers.schemas';\n\n/**\n * Is a `backingServices` declaration one the platform can actually SERVE?\n *\n * ## The defect this closes (#1693)\n *\n * A declaration used to be accepted when it merely parsed. Two classes of parseable declaration serve\n * nothing, and both passed `wildo config sync` and `wildo lock check` in silence:\n *\n * 1. **It resolves to no provider** — `redis: { source: MANAGED }`, a managed MongoDB brand other\n * than `'atlas'`. The lockfile materializer skipped the kind without a word.\n * 2. **It resolves to a provider no module can serve** — the seven managed PostgreSQL entries have no\n * module, and `AWS_S3` has one whose credential broker does not exist yet (#14). The materializer\n * fell back to hashing the authored entry, so the lockfile recorded a selection nothing executes.\n *\n * Neither \"provisions nothing\". The generators honour `source`, so a MANAGED cache gets no\n * self-hosted workload — while apps-manager, which named its modules and was never told the\n * declaration, minted the application's credential on the PLATFORM's own server. The application\n * received a credential for a server it never connects to. Since #1692 apps-manager is told, dispatches\n * on the declared provider and refuses one it cannot serve\n * ({@link findBackingServiceDeclarationsThePlatformCannotServe}); this offline check stops the same\n * declarations before they reach it.\n *\n * ## Why the servable set is an INPUT here, not computed here\n *\n * Servability is a property of the provider-module CATALOGUE (`@wildo-ai/platform-infra-providers`),\n * and that package depends on this one — never the reverse. So the catalogue derives the set\n * (`collectServableInfraProviders()`) and every caller hands it in. The check itself lives here, once,\n * so `wildo config validate`, `wildo config sync` and `wildo lock check` cannot disagree about which\n * declarations they refuse: the two lockfile projections reach it through `materializeInfraSection`,\n * which REQUIRES the set, and `config validate` calls {@link findUnservableBackingServiceDeclarations}\n * directly.\n *\n * ## No opt-out, deliberately\n *\n * An earlier design offered `acceptUnresolved: true`. It was dropped: it makes a known-broken\n * configuration representable, which is exactly a setting that looks like a control and does\n * nothing. A kind becomes declarable as `MANAGED` in the same change that adds the module serving it.\n */\n\n/** Why a declaration cannot be served. */\nexport enum BackingServiceUnservableReason {\n /** The `(kind, source, provider)` tuple names no `InfraProvider` catalogue entry at all. */\n NO_PROVIDER = 'no-provider',\n /**\n * It names a catalogue entry, but no provider module serves that entry — either none exists, or the\n * one that exists declares `unservableReason`.\n */\n NO_SERVING_MODULE = 'no-serving-module',\n /**\n * A module serves the entry, but THIS platform holds no administrative credentials for it — an Atlas\n * declaration on a platform with no Atlas API key, a self-hosted PostgreSQL declaration on a platform with\n * no PostgreSQL admin (#1692).\n *\n * Only apps-manager can know this: which admin clients a platform holds is platform configuration, and one\n * platform hosts many applications. The offline checks (`config validate` / `config sync` / `lock check`)\n * never produce it. apps-manager refuses the registration rather than minting on another provider — a\n * substitution would hand the application a credential for a server it does not connect to.\n */\n NOT_HELD_BY_PLATFORM = 'not-held-by-platform',\n}\n\n/** The authored half of a backing-service entry that decides which provider it names. */\nexport interface BackingServiceProviderSelection {\n source: BackingServiceSource;\n /** The brand, when the kind distinguishes several. See `resolveInfraProvider` for the vocabulary. */\n provider?: string;\n}\n\n/** The simplest authored declaration that selects one catalogue entry. */\nexport interface InfraProviderCanonicalDeclaration extends BackingServiceProviderSelection {\n kind: BackingServiceKind;\n}\n\n/**\n * For every `InfraProvider`, the SIMPLEST declaration that selects it — the inverse of\n * `resolveInfraProvider`, used to tell an author what they may write instead.\n *\n * Total over `InfraProvider` (a `Record`), so a provider added to the catalogue is a compile error\n * here until someone states how it is declared. That the inverse is truthful is pinned by a test that\n * resolves every row back through `resolveInfraProvider`; it is never trusted by construction.\n */\nexport const INFRA_PROVIDER_CANONICAL_DECLARATIONS: Readonly<Record<InfraProvider, InfraProviderCanonicalDeclaration>> = {\n [InfraProvider.MONGODB_SELF]: { kind: BackingServiceKind.MONGODB, source: BackingServiceSource.SELF },\n [InfraProvider.MONGODB_ATLAS]: { kind: BackingServiceKind.MONGODB, source: BackingServiceSource.MANAGED, provider: 'atlas' },\n [InfraProvider.POSTGRES_SELF]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.SELF },\n [InfraProvider.POSTGRES_MANAGED]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED },\n [InfraProvider.POSTGRES_AWS_RDS]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'aws-rds' },\n [InfraProvider.POSTGRES_GCP_CLOUD_SQL]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'gcp-cloud-sql' },\n [InfraProvider.POSTGRES_AZURE_DATABASE]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'azure-database' },\n [InfraProvider.POSTGRES_SUPABASE]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'supabase' },\n [InfraProvider.POSTGRES_NEON]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'neon' },\n [InfraProvider.POSTGRES_RENDER]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'render' },\n [InfraProvider.REDIS_SELF]: { kind: BackingServiceKind.REDIS, source: BackingServiceSource.SELF },\n [InfraProvider.RABBITMQ_SELF]: { kind: BackingServiceKind.RABBITMQ, source: BackingServiceSource.SELF },\n [InfraProvider.MINIO_SELF]: { kind: BackingServiceKind.S3, source: BackingServiceSource.SELF },\n [InfraProvider.AWS_S3]: { kind: BackingServiceKind.S3, source: BackingServiceSource.MANAGED },\n [InfraProvider.CLAMAV_SELF]: { kind: BackingServiceKind.CLAMAV, source: BackingServiceSource.SELF },\n [InfraProvider.IMMUDB_SELF]: { kind: BackingServiceKind.IMMUDB, source: BackingServiceSource.SELF },\n};\n\n/** One declaration the platform cannot serve, with everything the refusal message needs. */\nexport interface UnservableBackingServiceDeclaration {\n envName: string;\n kind: BackingServiceKind;\n declared: BackingServiceProviderSelection;\n reason: BackingServiceUnservableReason;\n /** The catalogue entry it names, when it names one (`NO_SERVING_MODULE`). */\n resolvedProvider?: InfraProvider;\n /** The simplest servable declarations for the same kind — what the author may write instead. */\n servableAlternatives: ReadonlyArray<BackingServiceProviderSelection>;\n}\n\n/**\n * The servable declarations for one kind, one per servable provider, in catalogue order.\n *\n * Empty when nothing can serve the kind — then the only servable choice is not to declare it.\n */\nexport function servableBackingServiceDeclarations(\n kind: BackingServiceKind,\n servableProviders: ReadonlySet<InfraProvider>,\n): ReadonlyArray<BackingServiceProviderSelection> {\n const alternatives: BackingServiceProviderSelection[] = [];\n for (const provider of Object.values(InfraProvider)) {\n if (!servableProviders.has(provider)) continue;\n const declaration = INFRA_PROVIDER_CANONICAL_DECLARATIONS[provider];\n if (declaration.kind !== kind) continue;\n alternatives.push({\n source: declaration.source,\n ...(declaration.provider === undefined ? {} : { provider: declaration.provider }),\n });\n }\n return alternatives;\n}\n\n/**\n * Every declaration in one environment that the platform cannot serve. Empty means every declared\n * kind resolves to a provider in `servableProviders`.\n *\n * Pure. `servableProviders` comes from `collectServableInfraProviders()` in\n * `@wildo-ai/platform-infra-providers`; see the file header for why it is an input.\n */\nexport function findUnservableBackingServiceDeclarations(input: {\n envName: string;\n backingServices: BackingServicesEnvConfig | undefined;\n servableProviders: ReadonlySet<InfraProvider>;\n}): UnservableBackingServiceDeclaration[] {\n const findings: UnservableBackingServiceDeclaration[] = [];\n if (!input.backingServices) return findings;\n\n for (const kind of Object.values(BackingServiceKind)) {\n const entry = input.backingServices[kind];\n if (!entry) continue;\n const finding = classifyBackingServiceDeclaration({\n envName: input.envName,\n kind,\n declared: entry,\n servableProviders: input.servableProviders,\n });\n if (finding) findings.push(finding);\n }\n return findings;\n}\n\n/**\n * One kind's declaration against a servable set: `undefined` when it resolves to a provider in the set,\n * otherwise the finding. The single place the resolve-then-check rule lives, so the offline checks above and\n * apps-manager's registration check below cannot disagree about what a declaration names.\n */\nfunction classifyBackingServiceDeclaration(input: {\n envName: string;\n kind: BackingServiceKind;\n declared: BackingServiceProviderSelection;\n servableProviders: ReadonlySet<InfraProvider>;\n}): UnservableBackingServiceDeclaration | undefined {\n const declared: BackingServiceProviderSelection = {\n source: input.declared.source,\n ...(input.declared.provider === undefined ? {} : { provider: input.declared.provider }),\n };\n const resolvedProvider = resolveInfraProvider(input.kind, declared.source, declared.provider);\n if (resolvedProvider !== undefined && input.servableProviders.has(resolvedProvider)) return undefined;\n return {\n envName: input.envName,\n kind: input.kind,\n declared,\n reason: resolvedProvider === undefined\n ? BackingServiceUnservableReason.NO_PROVIDER\n : BackingServiceUnservableReason.NO_SERVING_MODULE,\n ...(resolvedProvider === undefined ? {} : { resolvedProvider }),\n servableAlternatives: servableBackingServiceDeclarations(input.kind, input.servableProviders),\n };\n}\n\n/**\n * The declarations an application REGISTERS with that THIS platform cannot serve — apps-manager's half of\n * the servability check (#1692; the offline half is {@link findUnservableBackingServiceDeclarations}, #1693).\n *\n * Two sets, because they answer different questions:\n *\n * - `catalogueServableProviders` — what the provider-module catalogue can serve at all\n * (`collectServableInfraProviders()`). Every DECLARED kind is checked against it: a declaration the\n * catalogue refuses is refused here too, even if an older CLI let it through.\n * - `platformServableProviders` — the subset this platform holds what it needs for (an admin client for a\n * provider apps-manager mints on, nothing for one it does not). Checked only for `mintedKinds`, the kinds\n * apps-manager mints a credential on for THIS application: an environment's declaration also names stores\n * only the platform uses, and refusing an application over an admin client it would never use would be a\n * refusal with nothing behind it.\n *\n * A catalogue finding keeps its catalogue reason; a provider the catalogue serves and this platform does not\n * is {@link BackingServiceUnservableReason.NOT_HELD_BY_PLATFORM}. Alternatives are always what THIS platform\n * can serve, because that is what the author can actually switch to here.\n *\n * Pure; apps-manager supplies both sets. An absent `declaredProviders` yields nothing — the previous\n * behaviour for every kind (see `ApplicationBackingServiceProviderDeclarations`).\n */\nexport function findBackingServiceDeclarationsThePlatformCannotServe(input: {\n envName: string;\n declaredProviders: Partial<Record<BackingServiceKind, BackingServiceProviderSelection>> | undefined;\n mintedKinds: ReadonlySet<BackingServiceKind>;\n catalogueServableProviders: ReadonlySet<InfraProvider>;\n platformServableProviders: ReadonlySet<InfraProvider>;\n}): UnservableBackingServiceDeclaration[] {\n const findings: UnservableBackingServiceDeclaration[] = [];\n if (!input.declaredProviders) return findings;\n const platformServable = new Set(\n [...input.platformServableProviders].filter((provider) => input.catalogueServableProviders.has(provider)),\n );\n\n for (const kind of Object.values(BackingServiceKind)) {\n const declared = input.declaredProviders[kind];\n if (!declared) continue;\n const catalogueFinding = classifyBackingServiceDeclaration({\n envName: input.envName,\n kind,\n declared,\n servableProviders: input.catalogueServableProviders,\n });\n if (catalogueFinding) {\n findings.push({ ...catalogueFinding, servableAlternatives: servableBackingServiceDeclarations(kind, platformServable) });\n continue;\n }\n if (!input.mintedKinds.has(kind)) continue;\n const platformFinding = classifyBackingServiceDeclaration({ envName: input.envName, kind, declared, servableProviders: platformServable });\n if (platformFinding) findings.push({ ...platformFinding, reason: BackingServiceUnservableReason.NOT_HELD_BY_PLATFORM });\n }\n return findings;\n}\n\nfunction describeUnservableReason(finding: UnservableBackingServiceDeclaration): string {\n switch (finding.reason) {\n case BackingServiceUnservableReason.NO_PROVIDER:\n return 'names no infrastructure provider';\n case BackingServiceUnservableReason.NO_SERVING_MODULE:\n return `names provider '${finding.resolvedProvider}', which no provider module can serve yet`;\n case BackingServiceUnservableReason.NOT_HELD_BY_PLATFORM:\n return `names provider '${finding.resolvedProvider}', for which this platform holds no administrative credentials, `\n + 'so apps-manager cannot mint on it (which admin clients a platform holds is platform configuration)';\n }\n}\n\nfunction renderSelection(selection: BackingServiceProviderSelection): string {\n return selection.provider === undefined\n ? `{ source: '${selection.source}' }`\n : `{ source: '${selection.source}', provider: '${selection.provider}' }`;\n}\n\n/**\n * One line per finding: the environment, the kind, what was declared, why it cannot be served, and\n * the declarations that ARE servable for that kind. Shared by every caller so the wording is one.\n */\nexport function describeUnservableBackingServiceDeclaration(finding: UnservableBackingServiceDeclaration): string {\n const why = describeUnservableReason(finding);\n const instead = finding.servableAlternatives.length === 0\n ? 'nothing can serve this kind today, so do not declare it'\n : `servable declarations for '${finding.kind}': ${finding.servableAlternatives.map(renderSelection).join(' | ')}`;\n return `environment '${finding.envName}': backingServices.${finding.kind} ${renderSelection(finding.declared)} ${why}; ${instead}.`;\n}\n\n/** Thrown when a declaration the platform cannot serve reaches a lockfile projection. */\nexport class UnservableBackingServiceDeclarationError extends Error {\n readonly findings: ReadonlyArray<UnservableBackingServiceDeclaration>;\n\n constructor(findings: ReadonlyArray<UnservableBackingServiceDeclaration>) {\n super(\n 'These backing-service declarations cannot be served, so the platform would hand the application '\n + 'a credential for a server it never connects to:\\n'\n + findings.map((finding) => ` - ${describeUnservableBackingServiceDeclaration(finding)}`).join('\\n'),\n );\n this.name = 'UnservableBackingServiceDeclarationError';\n this.findings = findings;\n }\n}\n\n/** Refuse, naming every unservable declaration across every environment at once. */\nexport function assertBackingServiceDeclarationsServable(input: {\n envs: ReadonlyArray<{ envName: string; backingServices: BackingServicesEnvConfig | undefined }>;\n servableProviders: ReadonlySet<InfraProvider>;\n}): void {\n const findings = input.envs.flatMap((env) => findUnservableBackingServiceDeclarations({\n envName: env.envName,\n backingServices: env.backingServices,\n servableProviders: input.servableProviders,\n }));\n if (findings.length > 0) throw new UnservableBackingServiceDeclarationError(findings);\n}\n"]}
1
+ {"version":3,"file":"backing-service-servability.js","sourceRoot":"","sources":["../../../../src/project-config/shared/backing-service-servability.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,0CAA0C;AAC1C,MAAM,CAAN,IAAY,8BAmBX;AAnBD,WAAY,8BAA8B;IACxC,4FAA4F;IAC5F,6DAA2B,CAAA;IAC3B;;;OAGG;IACH,yEAAuC,CAAA;IACvC;;;;;;;;;OASG;IACH,+EAA6C,CAAA;AAC/C,CAAC,EAnBW,8BAA8B,KAA9B,8BAA8B,QAmBzC;AAcD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAuE;IACvH,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,oBAAoB,CAAC,IAAI,EAAE;IACrG,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,OAA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M,IAAI,wCAAwC,CAAC,QAAQ,CAAC,CAAC;AACxF,CAAC","sourcesContent":["import {\n BackingServiceKind,\n BackingServiceSource,\n resolveInfraProvider,\n type BackingServicesEnvConfig,\n} from './backing-services.schemas';\nimport { InfraProvider } from './infra-providers.schemas';\n\n/**\n * Is a `backingServices` declaration one the platform can actually SERVE?\n *\n * ## The defect this closes (#1693)\n *\n * A declaration used to be accepted when it merely parsed. Two classes of parseable declaration serve\n * nothing, and both passed `wildo config sync` and `wildo lock check` in silence:\n *\n * 1. **It resolves to no provider** — `redis: { source: MANAGED }`, a managed MongoDB brand other\n * than `'atlas'`. The lockfile materializer skipped the kind without a word.\n * 2. **It resolves to a provider no module can serve** — the seven managed PostgreSQL entries have no\n * module, and `AWS_S3` has one whose credential broker does not exist yet (#14). The materializer\n * fell back to hashing the authored entry, so the lockfile recorded a selection nothing executes.\n *\n * Neither \"provisions nothing\". The generators honour `source`, so a MANAGED cache gets no\n * self-hosted workload — while apps-manager, which named its modules and was never told the\n * declaration, minted the application's credential on the PLATFORM's own server. The application\n * received a credential for a server it never connects to. Since #1692 apps-manager is told, dispatches\n * on the declared provider and refuses one it cannot serve\n * ({@link findBackingServiceDeclarationsThePlatformCannotServe}); this offline check stops the same\n * declarations before they reach it.\n *\n * ## Why the servable set is an INPUT here, not computed here\n *\n * Servability is a property of the provider-module CATALOGUE (`@wildo-ai/platform-infra-providers`),\n * and that package depends on this one — never the reverse. So the catalogue derives the set\n * (`collectServableInfraProviders()`) and every caller hands it in. The check itself lives here, once,\n * so `wildo config validate`, `wildo config sync` and `wildo lock check` cannot disagree about which\n * declarations they refuse: the two lockfile projections reach it through `materializeInfraSection`,\n * which REQUIRES the set, and `config validate` calls {@link findUnservableBackingServiceDeclarations}\n * directly.\n *\n * ## No opt-out, deliberately\n *\n * An earlier design offered `acceptUnresolved: true`. It was dropped: it makes a known-broken\n * configuration representable, which is exactly a setting that looks like a control and does\n * nothing. A kind becomes declarable as `MANAGED` in the same change that adds the module serving it.\n */\n\n/** Why a declaration cannot be served. */\nexport enum BackingServiceUnservableReason {\n /** The `(kind, source, provider)` tuple names no `InfraProvider` catalogue entry at all. */\n NO_PROVIDER = 'no-provider',\n /**\n * It names a catalogue entry, but no provider module serves that entry — either none exists, or the\n * one that exists declares `unservableReason`.\n */\n NO_SERVING_MODULE = 'no-serving-module',\n /**\n * A module serves the entry, but THIS platform holds no administrative credentials for it — an Atlas\n * declaration on a platform with no Atlas API key, a self-hosted PostgreSQL declaration on a platform with\n * no PostgreSQL admin (#1692).\n *\n * Only apps-manager can know this: which admin clients a platform holds is platform configuration, and one\n * platform hosts many applications. The offline checks (`config validate` / `config sync` / `lock check`)\n * never produce it. apps-manager refuses the registration rather than minting on another provider — a\n * substitution would hand the application a credential for a server it does not connect to.\n */\n NOT_HELD_BY_PLATFORM = 'not-held-by-platform',\n}\n\n/** The authored half of a backing-service entry that decides which provider it names. */\nexport interface BackingServiceProviderSelection {\n source: BackingServiceSource;\n /** The brand, when the kind distinguishes several. See `resolveInfraProvider` for the vocabulary. */\n provider?: string;\n}\n\n/** The simplest authored declaration that selects one catalogue entry. */\nexport interface InfraProviderCanonicalDeclaration extends BackingServiceProviderSelection {\n kind: BackingServiceKind;\n}\n\n/**\n * For every `InfraProvider`, the SIMPLEST declaration that selects it — the inverse of\n * `resolveInfraProvider`, used to tell an author what they may write instead.\n *\n * Total over `InfraProvider` (a `Record`), so a provider added to the catalogue is a compile error\n * here until someone states how it is declared. That the inverse is truthful is pinned by a test that\n * resolves every row back through `resolveInfraProvider`; it is never trusted by construction.\n */\nexport const INFRA_PROVIDER_CANONICAL_DECLARATIONS: Readonly<Record<InfraProvider, InfraProviderCanonicalDeclaration>> = {\n [InfraProvider.MONGODB_SELF]: { kind: BackingServiceKind.MONGODB, source: BackingServiceSource.SELF },\n [InfraProvider.MONGODB_ATLAS]: { kind: BackingServiceKind.MONGODB, source: BackingServiceSource.MANAGED, provider: 'atlas' },\n [InfraProvider.POSTGRES_SELF]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.SELF },\n [InfraProvider.POSTGRES_MANAGED]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED },\n [InfraProvider.POSTGRES_AWS_RDS]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'aws-rds' },\n [InfraProvider.POSTGRES_GCP_CLOUD_SQL]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'gcp-cloud-sql' },\n [InfraProvider.POSTGRES_AZURE_DATABASE]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'azure-database' },\n [InfraProvider.POSTGRES_SUPABASE]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'supabase' },\n [InfraProvider.POSTGRES_NEON]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'neon' },\n [InfraProvider.POSTGRES_RENDER]: { kind: BackingServiceKind.POSTGRESQL, source: BackingServiceSource.MANAGED, provider: 'render' },\n [InfraProvider.REDIS_SELF]: { kind: BackingServiceKind.REDIS, source: BackingServiceSource.SELF },\n [InfraProvider.RABBITMQ_SELF]: { kind: BackingServiceKind.RABBITMQ, source: BackingServiceSource.SELF },\n [InfraProvider.MINIO_SELF]: { kind: BackingServiceKind.S3, source: BackingServiceSource.SELF },\n [InfraProvider.AWS_S3]: { kind: BackingServiceKind.S3, source: BackingServiceSource.MANAGED },\n [InfraProvider.CLAMAV_SELF]: { kind: BackingServiceKind.CLAMAV, source: BackingServiceSource.SELF },\n [InfraProvider.IMMUDB_SELF]: { kind: BackingServiceKind.IMMUDB, source: BackingServiceSource.SELF },\n};\n\n/** One declaration the platform cannot serve, with everything the refusal message needs. */\nexport interface UnservableBackingServiceDeclaration {\n envName: string;\n kind: BackingServiceKind;\n declared: BackingServiceProviderSelection;\n reason: BackingServiceUnservableReason;\n /** The catalogue entry it names, when it names one (`NO_SERVING_MODULE`). */\n resolvedProvider?: InfraProvider;\n /** The simplest servable declarations for the same kind — what the author may write instead. */\n servableAlternatives: ReadonlyArray<BackingServiceProviderSelection>;\n}\n\n/**\n * The servable declarations for one kind, one per servable provider, in catalogue order.\n *\n * Empty when nothing can serve the kind — then the only servable choice is not to declare it.\n */\nexport function servableBackingServiceDeclarations(\n kind: BackingServiceKind,\n servableProviders: ReadonlySet<InfraProvider>,\n): ReadonlyArray<BackingServiceProviderSelection> {\n const alternatives: BackingServiceProviderSelection[] = [];\n for (const provider of Object.values(InfraProvider)) {\n if (!servableProviders.has(provider)) continue;\n const declaration = INFRA_PROVIDER_CANONICAL_DECLARATIONS[provider];\n if (declaration.kind !== kind) continue;\n alternatives.push({\n source: declaration.source,\n ...(declaration.provider === undefined ? {} : { provider: declaration.provider }),\n });\n }\n return alternatives;\n}\n\n/**\n * Every declaration in one environment that the platform cannot serve. Empty means every declared\n * kind resolves to a provider in `servableProviders`.\n *\n * Pure. `servableProviders` comes from `collectServableInfraProviders()` in\n * `@wildo-ai/platform-infra-providers`; see the file header for why it is an input.\n */\nexport function findUnservableBackingServiceDeclarations(input: {\n envName: string;\n backingServices: BackingServicesEnvConfig | undefined;\n servableProviders: ReadonlySet<InfraProvider>;\n}): UnservableBackingServiceDeclaration[] {\n const findings: UnservableBackingServiceDeclaration[] = [];\n if (!input.backingServices) return findings;\n\n for (const kind of Object.values(BackingServiceKind)) {\n const entry = input.backingServices[kind];\n if (!entry) continue;\n const finding = classifyBackingServiceDeclaration({\n envName: input.envName,\n kind,\n declared: entry,\n servableProviders: input.servableProviders,\n });\n if (finding) findings.push(finding);\n }\n return findings;\n}\n\n/**\n * One kind's declaration against a servable set: `undefined` when it resolves to a provider in the set,\n * otherwise the finding. The single place the resolve-then-check rule lives, so the offline checks above and\n * apps-manager's registration check below cannot disagree about what a declaration names.\n */\nfunction classifyBackingServiceDeclaration(input: {\n envName: string;\n kind: BackingServiceKind;\n declared: BackingServiceProviderSelection;\n servableProviders: ReadonlySet<InfraProvider>;\n}): UnservableBackingServiceDeclaration | undefined {\n const declared: BackingServiceProviderSelection = {\n source: input.declared.source,\n ...(input.declared.provider === undefined ? {} : { provider: input.declared.provider }),\n };\n const resolvedProvider = resolveInfraProvider(input.kind, declared.source, declared.provider);\n if (resolvedProvider !== undefined && input.servableProviders.has(resolvedProvider)) return undefined;\n return {\n envName: input.envName,\n kind: input.kind,\n declared,\n reason: resolvedProvider === undefined\n ? BackingServiceUnservableReason.NO_PROVIDER\n : BackingServiceUnservableReason.NO_SERVING_MODULE,\n ...(resolvedProvider === undefined ? {} : { resolvedProvider }),\n servableAlternatives: servableBackingServiceDeclarations(input.kind, input.servableProviders),\n };\n}\n\n/**\n * The declarations an application REGISTERS with that THIS platform cannot serve — apps-manager's half of\n * the servability check (#1692; the offline half is {@link findUnservableBackingServiceDeclarations}, #1693).\n *\n * Two sets, because they answer different questions:\n *\n * - `catalogueServableProviders` — what the provider-module catalogue can serve at all\n * (`collectServableInfraProviders()`). Every DECLARED kind is checked against it: a declaration the\n * catalogue refuses is refused here too, even if an older CLI let it through.\n * - `platformServableProviders` — the subset this platform holds what it needs for (an admin client for a\n * provider apps-manager mints on, nothing for one it does not). Checked only for `mintedKinds`, the kinds\n * apps-manager mints a credential on for THIS application: an environment's declaration also names stores\n * only the platform uses, and refusing an application over an admin client it would never use would be a\n * refusal with nothing behind it.\n *\n * A catalogue finding keeps its catalogue reason; a provider the catalogue serves and this platform does not\n * is {@link BackingServiceUnservableReason.NOT_HELD_BY_PLATFORM}. Alternatives are always what THIS platform\n * can serve, because that is what the author can actually switch to here.\n *\n * Pure; apps-manager supplies both sets. An absent `declaredProviders` yields nothing — the previous\n * behaviour for every kind (see `ApplicationBackingServiceProviderDeclarations`).\n */\nexport function findBackingServiceDeclarationsThePlatformCannotServe(input: {\n envName: string;\n declaredProviders: Partial<Record<BackingServiceKind, BackingServiceProviderSelection>> | undefined;\n mintedKinds: ReadonlySet<BackingServiceKind>;\n catalogueServableProviders: ReadonlySet<InfraProvider>;\n platformServableProviders: ReadonlySet<InfraProvider>;\n}): UnservableBackingServiceDeclaration[] {\n const findings: UnservableBackingServiceDeclaration[] = [];\n if (!input.declaredProviders) return findings;\n const platformServable = new Set(\n [...input.platformServableProviders].filter((provider) => input.catalogueServableProviders.has(provider)),\n );\n\n for (const kind of Object.values(BackingServiceKind)) {\n const declared = input.declaredProviders[kind];\n if (!declared) continue;\n const catalogueFinding = classifyBackingServiceDeclaration({\n envName: input.envName,\n kind,\n declared,\n servableProviders: input.catalogueServableProviders,\n });\n if (catalogueFinding) {\n findings.push({ ...catalogueFinding, servableAlternatives: servableBackingServiceDeclarations(kind, platformServable) });\n continue;\n }\n if (!input.mintedKinds.has(kind)) continue;\n const platformFinding = classifyBackingServiceDeclaration({ envName: input.envName, kind, declared, servableProviders: platformServable });\n if (platformFinding) findings.push({ ...platformFinding, reason: BackingServiceUnservableReason.NOT_HELD_BY_PLATFORM });\n }\n return findings;\n}\n\nfunction describeUnservableReason(finding: UnservableBackingServiceDeclaration): string {\n switch (finding.reason) {\n case BackingServiceUnservableReason.NO_PROVIDER:\n return 'names no infrastructure provider';\n case BackingServiceUnservableReason.NO_SERVING_MODULE:\n return `names provider '${finding.resolvedProvider}', which no provider module can serve yet`;\n case BackingServiceUnservableReason.NOT_HELD_BY_PLATFORM:\n return `names provider '${finding.resolvedProvider}', for which this platform holds no administrative credentials, `\n + 'so apps-manager cannot mint on it (which admin clients a platform holds is platform configuration)';\n }\n}\n\nfunction renderSelection(selection: BackingServiceProviderSelection): string {\n return selection.provider === undefined\n ? `{ source: '${selection.source}' }`\n : `{ source: '${selection.source}', provider: '${selection.provider}' }`;\n}\n\n/**\n * One line per finding: the environment, the kind, what was declared, why it cannot be served, and\n * the declarations that ARE servable for that kind. Shared by every caller so the wording is one.\n */\nexport function describeUnservableBackingServiceDeclaration(finding: UnservableBackingServiceDeclaration): string {\n const why = describeUnservableReason(finding);\n const instead = finding.servableAlternatives.length === 0\n ? 'nothing can serve this kind today, so do not declare it'\n : `servable declarations for '${finding.kind}': ${finding.servableAlternatives.map(renderSelection).join(' | ')}`;\n return `environment '${finding.envName}': backingServices.${finding.kind} ${renderSelection(finding.declared)} ${why}; ${instead}.`;\n}\n\n/** Thrown when a declaration the platform cannot serve reaches a lockfile projection. */\nexport class UnservableBackingServiceDeclarationError extends Error {\n readonly findings: ReadonlyArray<UnservableBackingServiceDeclaration>;\n\n constructor(findings: ReadonlyArray<UnservableBackingServiceDeclaration>) {\n super(\n 'These backing-service declarations cannot be served, so the platform would hand the application '\n + 'a credential for a server it never connects to:\\n'\n + findings.map((finding) => ` - ${describeUnservableBackingServiceDeclaration(finding)}`).join('\\n'),\n );\n this.name = 'UnservableBackingServiceDeclarationError';\n this.findings = findings;\n }\n}\n\n/** Refuse, naming every unservable declaration across every environment at once. */\nexport function assertBackingServiceDeclarationsServable(input: {\n envs: ReadonlyArray<{ envName: string; backingServices: BackingServicesEnvConfig | undefined }>;\n servableProviders: ReadonlySet<InfraProvider>;\n}): void {\n const findings = input.envs.flatMap((env) => findUnservableBackingServiceDeclarations({\n envName: env.envName,\n backingServices: env.backingServices,\n servableProviders: input.servableProviders,\n }));\n if (findings.length > 0) throw new UnservableBackingServiceDeclarationError(findings);\n}\n"]}
@@ -28,7 +28,8 @@ export declare enum BackingServiceKind {
28
28
  /**
29
29
  * immudb — an immutable, cryptographically-verifiable database used as a
30
30
  * tamper-evident audit-log store (fills the `AUDIT_LOG_STORAGE` capability).
31
- * A stateful DB: a data volume in dev, self-hosted or immudb Vault in prod.
31
+ * A stateful DB: a data volume in dev, self-hosted in prod. (Codenotary no longer offers its hosted
32
+ * immudb Vault, so there is no managed form to choose.)
32
33
  */
33
34
  IMMUDB = "immudb"
34
35
  }
@@ -43,11 +44,9 @@ export declare enum BackingServiceKind {
43
44
  * vendor names (e.g. `'atlas'` for MongoDB Atlas, `'aws-rds'` for
44
45
  * AWS RDS, `'supabase'` for Supabase Postgres, `'aws'` for AWS S3).
45
46
  *
46
- * **Slice 4.B.0 reshape (2026-05-07)**: the `ATLAS` value was removed.
47
- * Pre-reshape `source: ATLAS` becomes `source: MANAGED, provider:
48
- * 'atlas'`. The reshape generalizes from "Mongo + S3 are the only
49
- * brand-aware kinds" to "every kind can be brand-aware when the
50
- * managed market has multiple vendors" — Postgres in particular
47
+ * There is no `ATLAS` source (removed 2026-05-07): MongoDB Atlas is
48
+ * `source: MANAGED, provider: 'atlas'`. Any kind can be brand-aware
49
+ * when the managed market has multiple vendors — Postgres in particular
51
50
  * (RDS / GCP Cloud SQL / Supabase / Neon / Render / Azure).
52
51
  */
53
52
  export declare enum BackingServiceSource {
@@ -58,8 +57,8 @@ export declare enum BackingServiceSource {
58
57
  * MongoDB backing service. `database` is the database NAME (string).
59
58
  *
60
59
  * Mongo's connection URL has the shape `mongodb://host:port/<database>`
61
- * — this string corresponds to the path segment. Pre-3 the field was
62
- * `name`; renamed to `database` in Slice 3 closeout (L-5) so all
60
+ * — this string corresponds to the path segment. The field was once
61
+ * `name`; it is `database` so all
63
62
  * data-store kinds use the same property name for the same concept
64
63
  * (vs. Postgres which already used `database`).
65
64
  */
@@ -259,8 +258,8 @@ export declare const BackingServiceKindToInfraCapability: Record<BackingServiceK
259
258
  * Project `(BackingServiceKind, source, provider?)` → `InfraProvider`.
260
259
  *
261
260
  * The three-axis dispatch (kind × hosting-model × brand) generalizes
262
- * the source/brand split across all kinds (Slice 4.B.0, 2026-05-07
263
- * — was source-only with Atlas as a special source value before).
261
+ * the source/brand split across all kinds (since 2026-05-07;
262
+ * before that it was source-only, with Atlas as a special source value).
264
263
  *
265
264
  * **Brand vocabulary** per kind (`provider` field on the authored
266
265
  * `BackingService<X>Schema`):
@@ -1 +1 @@
1
- {"version":3,"file":"backing-services.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/backing-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,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;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,0BAA0B;;;;;;kBAE5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,MAAM,uBAAuB,GAC/B,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,gBAAgB,GAChB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,8DAA8D;AAe9D,2HAA2H;AAC3H;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAQ3F,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,oBAAoB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,aAAa,GAAG,SAAS,CA6D3B;AACD,uEAAuE"}
1
+ {"version":3,"file":"backing-services.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/backing-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,aAAa,EACd,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,EAAE,OAAO;IACT,UAA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AMG;AACH,MAAM,MAAM,uBAAuB,GAC/B,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,gBAAgB,GAChB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,8DAA8D;AAe9D,2HAA2H;AAC3H;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAQ3F,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,oBAAoB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,aAAa,GAAG,SAAS,CA6D3B;AACD,uEAAuE"}
@@ -29,7 +29,8 @@ export var BackingServiceKind;
29
29
  /**
30
30
  * immudb — an immutable, cryptographically-verifiable database used as a
31
31
  * tamper-evident audit-log store (fills the `AUDIT_LOG_STORAGE` capability).
32
- * A stateful DB: a data volume in dev, self-hosted or immudb Vault in prod.
32
+ * A stateful DB: a data volume in dev, self-hosted in prod. (Codenotary no longer offers its hosted
33
+ * immudb Vault, so there is no managed form to choose.)
33
34
  */
34
35
  BackingServiceKind["IMMUDB"] = "immudb";
35
36
  /*
@@ -51,11 +52,9 @@ export var BackingServiceKind;
51
52
  * vendor names (e.g. `'atlas'` for MongoDB Atlas, `'aws-rds'` for
52
53
  * AWS RDS, `'supabase'` for Supabase Postgres, `'aws'` for AWS S3).
53
54
  *
54
- * **Slice 4.B.0 reshape (2026-05-07)**: the `ATLAS` value was removed.
55
- * Pre-reshape `source: ATLAS` becomes `source: MANAGED, provider:
56
- * 'atlas'`. The reshape generalizes from "Mongo + S3 are the only
57
- * brand-aware kinds" to "every kind can be brand-aware when the
58
- * managed market has multiple vendors" — Postgres in particular
55
+ * There is no `ATLAS` source (removed 2026-05-07): MongoDB Atlas is
56
+ * `source: MANAGED, provider: 'atlas'`. Any kind can be brand-aware
57
+ * when the managed market has multiple vendors — Postgres in particular
59
58
  * (RDS / GCP Cloud SQL / Supabase / Neon / Render / Azure).
60
59
  */
61
60
  export var BackingServiceSource;
@@ -67,7 +66,7 @@ export var BackingServiceSource;
67
66
  * Common fields every backing-service entry shares.
68
67
  *
69
68
  * Per-kind extensions add the fields that are SEMANTICALLY meaningful
70
- * for that kind only. Slice 3 closeout (M-4 + L-5): the previous shared
69
+ * for that kind only. The previous shared
71
70
  * `BackingServiceEnvConfigSchema` collapsed `database` into a
72
71
  * `union(int, string)` and put `name` only on Mongo; both compromised
73
72
  * the framework-mindset rule that "every field must carry its semantic
@@ -96,8 +95,7 @@ const BackingServiceBaseSchema = z.object({
96
95
  * `<KIND>_SELF` entry where one exists, otherwise return
97
96
  * `undefined`).
98
97
  *
99
- * Slice 4.B.0 (2026-05-07) generalized this from "S3-only" to
100
- * every brand-aware kind.
98
+ * Since 2026-05-07 this applies to every brand-aware kind, not only S3.
101
99
  */
102
100
  provider: z.string().min(1).optional(),
103
101
  /**
@@ -119,8 +117,8 @@ const BackingServiceBaseSchema = z.object({
119
117
  * MongoDB backing service. `database` is the database NAME (string).
120
118
  *
121
119
  * Mongo's connection URL has the shape `mongodb://host:port/<database>`
122
- * — this string corresponds to the path segment. Pre-3 the field was
123
- * `name`; renamed to `database` in Slice 3 closeout (L-5) so all
120
+ * — this string corresponds to the path segment. The field was once
121
+ * `name`; it is `database` so all
124
122
  * data-store kinds use the same property name for the same concept
125
123
  * (vs. Postgres which already used `database`).
126
124
  */
@@ -223,7 +221,7 @@ export const BackingServicesEnvConfigSchema = z.object({
223
221
  // BackingServiceKind ↔ InfraCapability / InfraProvider projections
224
222
  // =============================================================================
225
223
  //
226
- // Per `infra-provider-planner.md` R-B (locked 2026-05-06): `BackingServicesEnvConfig`
224
+ // Decided 2026-05-06: `BackingServicesEnvConfig`
227
225
  // IS the canonical per-env infra-selection authoring surface. The
228
226
  // `InfraCapability` / `InfraProvider` enums are the planner's projection
229
227
  // vocabulary (used by `InfraProviderModule.supportedCapabilities`,
@@ -253,8 +251,8 @@ export const BackingServiceKindToInfraCapability = {
253
251
  * Project `(BackingServiceKind, source, provider?)` → `InfraProvider`.
254
252
  *
255
253
  * The three-axis dispatch (kind × hosting-model × brand) generalizes
256
- * the source/brand split across all kinds (Slice 4.B.0, 2026-05-07
257
- * — was source-only with Atlas as a special source value before).
254
+ * the source/brand split across all kinds (since 2026-05-07;
255
+ * before that it was source-only, with Atlas as a special source value).
258
256
  *
259
257
  * **Brand vocabulary** per kind (`provider` field on the authored
260
258
  * `BackingService<X>Schema`):
@@ -392,7 +390,7 @@ export function resolveInfraProvider(kind, source, provider) {
392
390
  case BackingServiceKind.IMMUDB:
393
391
  if (source === BackingServiceSource.SELF)
394
392
  return InfraProvider.IMMUDB_SELF;
395
- // Managed immudb (immudb Vault) — not catalogued yet; future expansion.
393
+ // No managed immudb: Codenotary no longer offers its hosted immudb Vault (re-researched 2026-11-06, #2518).
396
394
  return undefined;
397
395
  }
398
396
  }
@@ -1 +1 @@
1
- {"version":3,"file":"backing-services.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/backing-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,aAAa,GACd,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAN,IAAY,kBAoBX;AApBD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,qCAAe,CAAA;IACf,2CAAqB,CAAA;IACrB,+BA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od';\nimport {\n InfraCapability,\n InfraProvider,\n} from './infra-providers.schemas';\n\n/**\n * The backing-service authoring surface of `wildo.infra.<env>.config.ts`.\n *\n * Import from `@wildo-ai/platform-config-lib`. Everything below is what an\n * environment file may declare under `backingServices: { ... }` — the closed kind\n * vocabulary, the hosting-model axis, and the per-kind entry shape. The\n * `InfraCapability` / `InfraProvider` projections further down this file are\n * planner-internal and deliberately outside the anchor: an app author never writes\n * them.\n *\n * Declare a kind ONLY when the environment actually runs it — keys are optional so a\n * flattened app declaration stays truthful about what it enables. Omitting a kind an\n * enabled engine capability depends on is the classic silent-degradation bug: e.g.\n * `COMPLIANCE_AUDIT_TRAIL` without `immudb` leaves the tamper-evident audit store\n * unbacked, which `wildo config sync` reports as a warning per environment.\n *\n * @wildo_source:part:start platform.config.backing-services facet:layer:platform facet:family:infra\n */\nexport enum BackingServiceKind {\n MONGODB = 'mongodb',\n REDIS = 'redis',\n RABBITMQ = 'rabbitmq',\n S3 = 's3',\n POSTGRESQL = 'postgresql',\n CLAMAV = 'clamav',\n /**\n * immudb — an immutable, cryptographically-verifiable database used as a\n * tamper-evident audit-log store (fills the `AUDIT_LOG_STORAGE` capability).\n * A stateful DB: a data volume in dev, self-hosted or immudb Vault in prod.\n */\n IMMUDB = 'immudb',\n /*\n * `backup` was WITHDRAWN 2026-09-26 (#1693), on the #476 precedent that withdrew\n * `metrics-telemetry`: it was declarable, resolved to no provider, rendered no workload, and\n * nothing anywhere read it — a field an author could fill in that did nothing. Backup itself is\n * designed in #8, which decides what an environment declares for it. Do not re-add a kind here\n * before something can serve it: `wildo config sync` refuses a declaration no provider serves.\n */\n}\n\n/**\n * Hosting model of a backing service instance — the orthogonal axis to\n * the **brand** (which is captured by the per-kind `provider` field).\n *\n * - `self`: self-hosted (Docker/K8s container managed by the platform,\n * or operator-managed on-prem). Brands here are open-source\n * software names (e.g. MinIO for S3, vanilla Postgres / MongoDB).\n * - `managed`: external vendor-managed service. Brands here are\n * vendor names (e.g. `'atlas'` for MongoDB Atlas, `'aws-rds'` for\n * AWS RDS, `'supabase'` for Supabase Postgres, `'aws'` for AWS S3).\n *\n * **Slice 4.B.0 reshape (2026-05-07)**: the `ATLAS` value was removed.\n * Pre-reshape `source: ATLAS` becomes `source: MANAGED, provider:\n * 'atlas'`. The reshape generalizes from \"Mongo + S3 are the only\n * brand-aware kinds\" to \"every kind can be brand-aware when the\n * managed market has multiple vendors\" — Postgres in particular\n * (RDS / GCP Cloud SQL / Supabase / Neon / Render / Azure).\n */\nexport enum BackingServiceSource {\n SELF = 'self',\n MANAGED = 'managed',\n}\n\n/**\n * Common fields every backing-service entry shares.\n *\n * Per-kind extensions add the fields that are SEMANTICALLY meaningful\n * for that kind only. Slice 3 closeout (M-4 + L-5): the previous shared\n * `BackingServiceEnvConfigSchema` collapsed `database` into a\n * `union(int, string)` and put `name` only on Mongo; both compromised\n * the framework-mindset rule that \"every field must carry its semantic\n * weight\". The split below means a typo like `redis: { database:\n * 'staging' }` (string on a kind that needs an integer DB index) is\n * rejected at parse time instead of crashing the runtime client at\n * connect time.\n */\nconst BackingServiceBaseSchema = z.object({\n source: z.enum(BackingServiceSource),\n /**\n * Brand of the backing service. Orthogonal to `source` (hosting\n * model). Required-in-spirit when `source === MANAGED` and the\n * managed market has multiple vendors (Mongo: `'atlas'` /\n * `'aws-documentdb'` / …; Postgres: `'aws-rds'` / `'gcp-cloud-sql'`\n * / `'supabase'` / `'neon'` / `'render'` / `'azure-database'`;\n * S3: `'aws'` / `'cloudflare-r2'` / …); optional when `source ===\n * SELF` (e.g. S3-self-hosted defaults to MinIO; `provider:\n * 'minio'` is allowed but redundant).\n *\n * Modeled as `z.string().optional()` rather than per-kind enum\n * unions to keep this base schema simple — the canonical brand\n * vocabulary lives in `resolveInfraProvider`'s dispatch table\n * (each kind documents which brand strings it recognizes; unknown\n * brands fall back to the kind's generic `<KIND>_MANAGED` /\n * `<KIND>_SELF` entry where one exists, otherwise return\n * `undefined`).\n *\n * Slice 4.B.0 (2026-05-07) generalized this from \"S3-only\" to\n * every brand-aware kind.\n */\n provider: z.string().min(1).optional(),\n /**\n * Override the catalog-derived hostname for this kind. Honored at\n * `HOST_FACING` perspective (always) and at `CONTAINER_INTERNAL` for\n * `MANAGED` sources. SELF + `CONTAINER_INTERNAL` keeps the catalog\n * container name because that is the only DNS the container network\n * can resolve.\n */\n host: z.string().min(1).optional(),\n /**\n * Override the catalog-derived listen port. Threaded into both\n * docker-compose `<authored>:<authored>` publish and the per-app\n * env-vars (`<KIND>_PORT`).\n */\n port: z.number().int().positive().optional(),\n}).strict();\n\n/**\n * MongoDB backing service. `database` is the database NAME (string).\n *\n * Mongo's connection URL has the shape `mongodb://host:port/<database>`\n * — this string corresponds to the path segment. Pre-3 the field was\n * `name`; renamed to `database` in Slice 3 closeout (L-5) so all\n * data-store kinds use the same property name for the same concept\n * (vs. Postgres which already used `database`).\n */\nexport const MongoBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type MongoBackingService = z.infer<typeof MongoBackingServiceSchema>;\n\n/**\n * Redis backing service. `database` is the LOGICAL DB INDEX (integer).\n *\n * Redis exposes 16 logical databases (0–15) on a single connection.\n * Authoring a string here (e.g. `'staging'`) would silently parse on\n * the pre-3 union schema and crash ioredis at connect; the integer\n * constraint with `max(15)` fails loud at parse time.\n */\nexport const RedisBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.number().int().min(0).max(15).optional(),\n}).strict();\nexport type RedisBackingService = z.infer<typeof RedisBackingServiceSchema>;\n\n/**\n * PostgreSQL backing service. `database` is the database NAME (string).\n *\n * Symmetric with `MongoBackingService.database` — both are the\n * database identifier in their respective connection URLs.\n */\nexport const PostgresBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type PostgresBackingService = z.infer<typeof PostgresBackingServiceSchema>;\n\n/**\n * RabbitMQ backing service. `vhost` is the RabbitMQ virtual host.\n *\n * AMQP virtual hosts isolate exchange/queue namespaces inside a single\n * broker. NOT a database — RabbitMQ has no DB concept — so the field\n * is intentionally NOT named `database`.\n */\nexport const RabbitBackingServiceSchema = BackingServiceBaseSchema.extend({\n vhost: z.string().min(1).optional(),\n}).strict();\nexport type RabbitBackingService = z.infer<typeof RabbitBackingServiceSchema>;\n\n/**\n * S3-compatible backing service (MinIO, Scaleway Object Storage, AWS).\n *\n * `endpoint` is a URL (`http://localhost:9000`, `https://s3.eu-west.amazonaws.com`)\n * — the resolver parses it into host/port. `bucket` is the S3 bucket\n * name. NOT a database — S3 has no DB concept.\n */\nexport const S3BackingServiceSchema = BackingServiceBaseSchema.extend({\n endpoint: z.string().min(1).optional(),\n bucket: z.string().min(1).optional(),\n}).strict();\nexport type S3BackingService = z.infer<typeof S3BackingServiceSchema>;\n\n/** ClamAV anti-virus daemon. Stateless, no database/vhost/bucket. */\nexport const ClamAvBackingServiceSchema = BackingServiceBaseSchema;\nexport type ClamAvBackingService = z.infer<typeof ClamAvBackingServiceSchema>;\n\n/**\n * immudb backing service (tamper-evident audit-log store). A stateful DB.\n *\n * On `source: SELF` the credentials are MINTED, never authored (#1696): the platform\n * gives each application its OWN immudb database and its OWN user, which can write that\n * database and nothing else, and delivers both with the application's platform secrets.\n * The name is derived from the application and kept across re-registrations, so\n * `database` is not read for a self-hosted store; it names the database of a MANAGED\n * one.\n *\n * Declare this in EVERY environment where the `COMPLIANCE_AUDIT_TRAIL` engine\n * capability is enabled. `wildo config sync` warns per environment when the audit\n * capability is on but no environment declares an audit store, and the audit client\n * then has nowhere tamper-evident to write.\n *\n * You do NOT author the state-signing keypair that makes the store's\n * whole-server-substitution defense work. The framework provisions it (private half\n * mounted into a `source: SELF` immudb via `--signingKey`, public half pinned by the\n * audit client as `IMMUDB_STATE_PUBLIC_KEY`) — declaring the service is the whole job.\n *\n * @example\n * ```ts\n * backingServices: {\n * immudb: { source: BackingServiceSource.SELF },\n * }\n * ```\n */\nexport const ImmudbBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type ImmudbBackingService = z.infer<typeof ImmudbBackingServiceSchema>;\n\n/**\n * Discriminated UNION over all backing-service kinds. Used by the\n * `ServiceAddressResolver` and helpers that accept any kind and read\n * only base fields (`source`, `host`, `port`). Consumers that need\n * kind-specific fields MUST narrow first (e.g. via the per-kind type\n * exports above).\n */\nexport type BackingServiceEnvConfig =\n | MongoBackingService\n | RedisBackingService\n | PostgresBackingService\n | RabbitBackingService\n | S3BackingService\n | ClamAvBackingService\n | ImmudbBackingService;\n\n/**\n * Per-environment backing services config (source for each service).\n * Used in environment-specific infra descriptors.\n *\n * Keys stay optional because an app-owned environment only needs to declare the\n * backing services it actually enables. Requiring the full enum-keyed record\n * would force disabled services (for example `postgresql`) into every env file\n * and breaks truthful flattened targeted-app declarations.\n */\nexport const BackingServicesEnvConfigSchema = z.object({\n [BackingServiceKind.MONGODB]: MongoBackingServiceSchema.optional(),\n [BackingServiceKind.REDIS]: RedisBackingServiceSchema.optional(),\n [BackingServiceKind.RABBITMQ]: RabbitBackingServiceSchema.optional(),\n [BackingServiceKind.S3]: S3BackingServiceSchema.optional(),\n [BackingServiceKind.POSTGRESQL]: PostgresBackingServiceSchema.optional(),\n [BackingServiceKind.CLAMAV]: ClamAvBackingServiceSchema.optional(),\n [BackingServiceKind.IMMUDB]: ImmudbBackingServiceSchema.optional(),\n}).strict();\nexport type BackingServicesEnvConfig = z.infer<typeof BackingServicesEnvConfigSchema>;\n/** @wildo_source:part:end platform.config.backing-services */\n\n// =============================================================================\n// BackingServiceKind ↔ InfraCapability / InfraProvider projections\n// =============================================================================\n//\n// Per `infra-provider-planner.md` R-B (locked 2026-05-06): `BackingServicesEnvConfig`\n// IS the canonical per-env infra-selection authoring surface. The\n// `InfraCapability` / `InfraProvider` enums are the planner's projection\n// vocabulary (used by `InfraProviderModule.supportedCapabilities`,\n// `wildo-saas.lock.json sections.infra` keying, and any tooling that\n// walks \"what infra is selected per env\"). The mappings below are the\n// single source of truth for that projection — no other code may\n// reconstruct them locally.\n\n/** @wildo_source:part:start platform.config.infra-provider-resolution facet:layer:platform facet:audience:app-developer */\n/**\n * `BackingServiceKind` → `InfraCapability`. Every extension to `BackingServiceKind` MUST extend this\n * map in the same commit, otherwise the planner cannot project the new kind to its capability slot.\n *\n * INJECTIVE, not bijective — and the difference is a real property of the model rather than a gap.\n * A capability may be granted to a runtime without any environment declaring a backing service for\n * it; see {@link RUNTIME_GRANTED_INFRA_CAPABILITIES} for the ones that are, and why.\n */\nexport const BackingServiceKindToInfraCapability: Record<BackingServiceKind, InfraCapability> = {\n [BackingServiceKind.MONGODB]: InfraCapability.DOCUMENT_DATABASE,\n [BackingServiceKind.POSTGRESQL]: InfraCapability.RELATIONAL_DATABASE,\n [BackingServiceKind.RABBITMQ]: InfraCapability.QUEUING_SYSTEM,\n [BackingServiceKind.REDIS]: InfraCapability.CACHE_MANAGER,\n [BackingServiceKind.S3]: InfraCapability.OBJECT_STORAGE,\n [BackingServiceKind.CLAMAV]: InfraCapability.ANTIVIRUS_SCANNING,\n [BackingServiceKind.IMMUDB]: InfraCapability.AUDIT_LOG_STORAGE,\n};\n\n/**\n * Project `(BackingServiceKind, source, provider?)` → `InfraProvider`.\n *\n * The three-axis dispatch (kind × hosting-model × brand) generalizes\n * the source/brand split across all kinds (Slice 4.B.0, 2026-05-07\n * — was source-only with Atlas as a special source value before).\n *\n * **Brand vocabulary** per kind (`provider` field on the authored\n * `BackingService<X>Schema`):\n *\n * | Kind | source | provider | InfraProvider | Servable today |\n * |---|---|---|---|---|\n * | `MONGODB` | `SELF` | (any) | `MONGODB_SELF` | yes |\n * | `MONGODB` | `MANAGED` | `'atlas'` | `MONGODB_ATLAS` | yes |\n * | `POSTGRESQL` | `SELF` | (any) | `POSTGRES_SELF` | yes |\n * | `POSTGRESQL` | `MANAGED` | `'aws-rds'` | `POSTGRES_AWS_RDS` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'gcp-cloud-sql'` | `POSTGRES_GCP_CLOUD_SQL` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'azure-database'` | `POSTGRES_AZURE_DATABASE` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'supabase'` | `POSTGRES_SUPABASE` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'neon'` | `POSTGRES_NEON` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'render'` | `POSTGRES_RENDER` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | unset or unrecognized | `POSTGRES_MANAGED` (generic fallback) | no — no module |\n * | `REDIS` | `SELF` | (any) | `REDIS_SELF` | yes |\n * | `RABBITMQ` | `SELF` | (any) | `RABBITMQ_SELF` | yes |\n * | `S3` | (either) | `'minio'` | `MINIO_SELF` | yes |\n * | `S3` | (either) | `'aws'` | `AWS_S3` | no — no credential broker for AWS yet |\n * | `S3` | `SELF` | unset or unrecognized | `MINIO_SELF` | yes |\n * | `S3` | `MANAGED` | unset or unrecognized | `AWS_S3` | no — no credential broker for AWS yet |\n * | `CLAMAV` | `SELF` | (any) | `CLAMAV_SELF` | yes |\n * | `IMMUDB` | `SELF` | (any) | `IMMUDB_SELF` | yes — one database and one confined user minted per application (#1696) |\n *\n * Returns `undefined` for combinations not in the table: a managed cache, broker, antivirus scanner\n * or audit store, and a managed MongoDB under any brand other than `'atlas'`. PostgreSQL has a\n * generic managed fallback; S3 uses brand-first resolution, then source-based defaults.\n *\n * ## Resolving is not the same as being servable\n *\n * This function answers only \"which catalogue entry does this declaration NAME\". Whether the\n * platform can actually deliver that entry — mint the application's credential on the server the\n * application connects to — is a separate question, answered by {@link findUnservableBackingServiceDeclarations}\n * against the provider-module catalogue. A declaration that resolves to nothing, OR to an entry no\n * module can serve (the seven managed PostgreSQL entries, and `AWS_S3` until its credential broker\n * exists), is REFUSED by `wildo config validate`, `wildo config sync` and `wildo lock check`, with a\n * message naming the declarations that ARE servable for that kind.\n *\n * The same `(source, provider)` pair travels to apps-manager at every registration, and apps-manager\n * resolves it with THIS function and mints the application's credentials on the result — so the provider\n * the lockfile records and the provider a credential is minted on are one answer. It also refuses a\n * provider the platform itself holds no administrative credentials for (an Atlas declaration on a\n * platform with no Atlas API key); which providers a platform can serve is platform configuration.\n *\n * ## What this means when you author an environment\n *\n * **`MANAGED` reaches almost nothing today.** Of the managed rows in the table above, the only one\n * the platform serves is MongoDB Atlas (`{ source: MANAGED, provider: 'atlas' }`). Every other kind\n * is declared `{ source: SELF }`. The managed PostgreSQL brands and AWS S3 are catalogue entries a\n * module will serve later, not choices you can make now — a kind becomes declarable as `MANAGED` in\n * the same change that adds the module serving it, and there is deliberately no opt-out: a\n * configuration the platform cannot serve would receive a credential for a server the application\n * never connects to.\n *\n * **An unrecognised brand is not the same failure on every kind.** On the relational database it\n * falls back to the generic managed entry (which is not servable, so it is refused all the same). On\n * the document database, an unknown managed brand resolves to nothing. Object storage recognizes\n * minio/aws first, then falls back by source: SELF to MinIO, MANAGED to AWS S3, including\n * unrecognized brands.\n *\n * **Provider resolution and workload inclusion answer different questions.** Compose and Kubernetes\n * both use the same per-kind inclusion policy, separately from catalogue resolution. Cache, broker\n * and S3 default to self-hosted unless explicitly MANAGED; ClamAV and immudb require explicit SELF.\n * MongoDB and PostgreSQL also include the platform database requirement: an application-level\n * managed choice does not remove a self-hosted database still needed by the platform. Do not infer\n * workload inclusion from this provider resolver.\n */\nexport function resolveInfraProvider(\n kind: BackingServiceKind,\n source: BackingServiceSource,\n provider?: string,\n): InfraProvider | undefined {\n switch (kind) {\n case BackingServiceKind.MONGODB:\n if (source === BackingServiceSource.SELF) return InfraProvider.MONGODB_SELF;\n if (source === BackingServiceSource.MANAGED && provider === 'atlas') return InfraProvider.MONGODB_ATLAS;\n // Other Mongo managed brands (e.g., AWS DocumentDB) — extend\n // the `InfraProvider` enum + this branch in the same slice\n // that adds the first concrete consumer.\n return undefined;\n case BackingServiceKind.POSTGRESQL:\n if (source === BackingServiceSource.SELF) return InfraProvider.POSTGRES_SELF;\n if (source === BackingServiceSource.MANAGED) {\n switch (provider) {\n case 'aws-rds': return InfraProvider.POSTGRES_AWS_RDS;\n case 'gcp-cloud-sql': return InfraProvider.POSTGRES_GCP_CLOUD_SQL;\n case 'azure-database': return InfraProvider.POSTGRES_AZURE_DATABASE;\n case 'supabase': return InfraProvider.POSTGRES_SUPABASE;\n case 'neon': return InfraProvider.POSTGRES_NEON;\n case 'render': return InfraProvider.POSTGRES_RENDER;\n // Generic fallback when the operator has authored\n // `source: MANAGED` without naming a brand (or with an\n // unrecognized brand). Resolving it NAMES the generic\n // catalogue entry; it does not make it servable. No module\n // serves any managed PostgreSQL entry yet, so every one of\n // these is refused by the servability check (#1693) rather\n // than recorded in the lockfile as a selection nothing runs.\n default: return InfraProvider.POSTGRES_MANAGED;\n }\n }\n return undefined;\n case BackingServiceKind.REDIS:\n if (source === BackingServiceSource.SELF) return InfraProvider.REDIS_SELF;\n // Managed Redis brands (ElastiCache, Upstash, Redis Cloud, …)\n // — not catalogued yet; future expansion.\n return undefined;\n case BackingServiceKind.RABBITMQ:\n if (source === BackingServiceSource.SELF) return InfraProvider.RABBITMQ_SELF;\n // Managed RabbitMQ brands (CloudAMQP, AWS MQ, …) —\n // not catalogued yet; future expansion.\n return undefined;\n case BackingServiceKind.S3:\n // S3 dispatch is brand-first because the protocol is\n // standardized (S3-compatible) and the same `source` can host\n // multiple software stacks — `source: SELF` could be MinIO or\n // a self-managed AWS S3 cluster (theoretically). The brand is\n // the canonical disambiguator.\n if (provider === 'minio') return InfraProvider.MINIO_SELF;\n if (provider === 'aws') return InfraProvider.AWS_S3;\n // Default source-based mapping for unbranded S3 — MinIO is\n // the canonical self-hosted; AWS is the canonical managed.\n if (source === BackingServiceSource.SELF) return InfraProvider.MINIO_SELF;\n if (source === BackingServiceSource.MANAGED) return InfraProvider.AWS_S3;\n return undefined;\n case BackingServiceKind.CLAMAV:\n if (source === BackingServiceSource.SELF) return InfraProvider.CLAMAV_SELF;\n return undefined;\n case BackingServiceKind.IMMUDB:\n if (source === BackingServiceSource.SELF) return InfraProvider.IMMUDB_SELF;\n // Managed immudb (immudb Vault) — not catalogued yet; future expansion.\n return undefined;\n }\n}\n/** @wildo_source:part:end platform.config.infra-provider-resolution */\n"]}
1
+ {"version":3,"file":"backing-services.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/backing-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,aAAa,GACd,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAN,IAAY,kBAqBX;AArBD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,qCAAe,CAAA;IACf,2CAAqB,CAAA;IACrB,+BAAS,CAAA;IACT,+CAAyB,CAAA;IACzB,uCAAiB,CAAA;IACjB;;;;;OAKG;IACH,uCAAiB,CAAA;IACjB;;;;;;OAMG;AACL,CAAC,EArBW,kBAAkB,KAAlB,kBAAkB,QAqB7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,2CAAmB,CAAA;AACrB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC;IACpC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtC;;;;;;OAMG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClC;;;;OAIG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM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gBAAE,OAAO,aAAa,CAAC,UAAU,CAAC;YAC1E,IAAI,MAAM,KAAK,oBAAoB,CAAC,OAAO;gBAAE,OAAO,aAAa,CAAC,MAAM,CAAC;YACzE,OAAO,SAAS,CAAC;QACnB,KAAK,kBAAkB,CAAC,MAAM;YAC5B,IAAI,MAAM,KAAK,oBAAoB,CAAC,IAAI;gBAAE,OAAO,aAAa,CAAC,WAAW,CAAC;YAC3E,OAAO,SAAS,CAAC;QACnB,KAAK,kBAAkB,CAAC,MAAM;YAC5B,IAAI,MAAM,KAAK,oBAAoB,CAAC,IAAI;gBAAE,OAAO,aAAa,CAAC,WAAW,CAAC;YAC3E,4GAA4G;YAC5G,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AACD,uEAAuE","sourcesContent":["import { z } from 'zod';\nimport {\n InfraCapability,\n InfraProvider,\n} from './infra-providers.schemas';\n\n/**\n * The backing-service authoring surface of `wildo.infra.<env>.config.ts`.\n *\n * Import from `@wildo-ai/platform-config-lib`. Everything below is what an\n * environment file may declare under `backingServices: { ... }` — the closed kind\n * vocabulary, the hosting-model axis, and the per-kind entry shape. The\n * `InfraCapability` / `InfraProvider` projections further down this file are\n * planner-internal and deliberately outside the anchor: an app author never writes\n * them.\n *\n * Declare a kind ONLY when the environment actually runs it — keys are optional so a\n * flattened app declaration stays truthful about what it enables. Omitting a kind an\n * enabled engine capability depends on is the classic silent-degradation bug: e.g.\n * `COMPLIANCE_AUDIT_TRAIL` without `immudb` leaves the tamper-evident audit store\n * unbacked, which `wildo config sync` reports as a warning per environment.\n *\n * @wildo_source:part:start platform.config.backing-services facet:layer:platform facet:family:infra\n */\nexport enum BackingServiceKind {\n MONGODB = 'mongodb',\n REDIS = 'redis',\n RABBITMQ = 'rabbitmq',\n S3 = 's3',\n POSTGRESQL = 'postgresql',\n CLAMAV = 'clamav',\n /**\n * immudb — an immutable, cryptographically-verifiable database used as a\n * tamper-evident audit-log store (fills the `AUDIT_LOG_STORAGE` capability).\n * A stateful DB: a data volume in dev, self-hosted in prod. (Codenotary no longer offers its hosted\n * immudb Vault, so there is no managed form to choose.)\n */\n IMMUDB = 'immudb',\n /*\n * `backup` was WITHDRAWN 2026-09-26 (#1693), on the #476 precedent that withdrew\n * `metrics-telemetry`: it was declarable, resolved to no provider, rendered no workload, and\n * nothing anywhere read it — a field an author could fill in that did nothing. Backup itself is\n * designed in #8, which decides what an environment declares for it. Do not re-add a kind here\n * before something can serve it: `wildo config sync` refuses a declaration no provider serves.\n */\n}\n\n/**\n * Hosting model of a backing service instance — the orthogonal axis to\n * the **brand** (which is captured by the per-kind `provider` field).\n *\n * - `self`: self-hosted (Docker/K8s container managed by the platform,\n * or operator-managed on-prem). Brands here are open-source\n * software names (e.g. MinIO for S3, vanilla Postgres / MongoDB).\n * - `managed`: external vendor-managed service. Brands here are\n * vendor names (e.g. `'atlas'` for MongoDB Atlas, `'aws-rds'` for\n * AWS RDS, `'supabase'` for Supabase Postgres, `'aws'` for AWS S3).\n *\n * There is no `ATLAS` source (removed 2026-05-07): MongoDB Atlas is\n * `source: MANAGED, provider: 'atlas'`. Any kind can be brand-aware\n * when the managed market has multiple vendors — Postgres in particular\n * (RDS / GCP Cloud SQL / Supabase / Neon / Render / Azure).\n */\nexport enum BackingServiceSource {\n SELF = 'self',\n MANAGED = 'managed',\n}\n\n/**\n * Common fields every backing-service entry shares.\n *\n * Per-kind extensions add the fields that are SEMANTICALLY meaningful\n * for that kind only. The previous shared\n * `BackingServiceEnvConfigSchema` collapsed `database` into a\n * `union(int, string)` and put `name` only on Mongo; both compromised\n * the framework-mindset rule that \"every field must carry its semantic\n * weight\". The split below means a typo like `redis: { database:\n * 'staging' }` (string on a kind that needs an integer DB index) is\n * rejected at parse time instead of crashing the runtime client at\n * connect time.\n */\nconst BackingServiceBaseSchema = z.object({\n source: z.enum(BackingServiceSource),\n /**\n * Brand of the backing service. Orthogonal to `source` (hosting\n * model). Required-in-spirit when `source === MANAGED` and the\n * managed market has multiple vendors (Mongo: `'atlas'` /\n * `'aws-documentdb'` / …; Postgres: `'aws-rds'` / `'gcp-cloud-sql'`\n * / `'supabase'` / `'neon'` / `'render'` / `'azure-database'`;\n * S3: `'aws'` / `'cloudflare-r2'` / …); optional when `source ===\n * SELF` (e.g. S3-self-hosted defaults to MinIO; `provider:\n * 'minio'` is allowed but redundant).\n *\n * Modeled as `z.string().optional()` rather than per-kind enum\n * unions to keep this base schema simple — the canonical brand\n * vocabulary lives in `resolveInfraProvider`'s dispatch table\n * (each kind documents which brand strings it recognizes; unknown\n * brands fall back to the kind's generic `<KIND>_MANAGED` /\n * `<KIND>_SELF` entry where one exists, otherwise return\n * `undefined`).\n *\n * Since 2026-05-07 this applies to every brand-aware kind, not only S3.\n */\n provider: z.string().min(1).optional(),\n /**\n * Override the catalog-derived hostname for this kind. Honored at\n * `HOST_FACING` perspective (always) and at `CONTAINER_INTERNAL` for\n * `MANAGED` sources. SELF + `CONTAINER_INTERNAL` keeps the catalog\n * container name because that is the only DNS the container network\n * can resolve.\n */\n host: z.string().min(1).optional(),\n /**\n * Override the catalog-derived listen port. Threaded into both\n * docker-compose `<authored>:<authored>` publish and the per-app\n * env-vars (`<KIND>_PORT`).\n */\n port: z.number().int().positive().optional(),\n}).strict();\n\n/**\n * MongoDB backing service. `database` is the database NAME (string).\n *\n * Mongo's connection URL has the shape `mongodb://host:port/<database>`\n * — this string corresponds to the path segment. The field was once\n * `name`; it is `database` so all\n * data-store kinds use the same property name for the same concept\n * (vs. Postgres which already used `database`).\n */\nexport const MongoBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type MongoBackingService = z.infer<typeof MongoBackingServiceSchema>;\n\n/**\n * Redis backing service. `database` is the LOGICAL DB INDEX (integer).\n *\n * Redis exposes 16 logical databases (0–15) on a single connection.\n * Authoring a string here (e.g. `'staging'`) would silently parse on\n * the pre-3 union schema and crash ioredis at connect; the integer\n * constraint with `max(15)` fails loud at parse time.\n */\nexport const RedisBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.number().int().min(0).max(15).optional(),\n}).strict();\nexport type RedisBackingService = z.infer<typeof RedisBackingServiceSchema>;\n\n/**\n * PostgreSQL backing service. `database` is the database NAME (string).\n *\n * Symmetric with `MongoBackingService.database` — both are the\n * database identifier in their respective connection URLs.\n */\nexport const PostgresBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type PostgresBackingService = z.infer<typeof PostgresBackingServiceSchema>;\n\n/**\n * RabbitMQ backing service. `vhost` is the RabbitMQ virtual host.\n *\n * AMQP virtual hosts isolate exchange/queue namespaces inside a single\n * broker. NOT a database — RabbitMQ has no DB concept — so the field\n * is intentionally NOT named `database`.\n */\nexport const RabbitBackingServiceSchema = BackingServiceBaseSchema.extend({\n vhost: z.string().min(1).optional(),\n}).strict();\nexport type RabbitBackingService = z.infer<typeof RabbitBackingServiceSchema>;\n\n/**\n * S3-compatible backing service (MinIO, Scaleway Object Storage, AWS).\n *\n * `endpoint` is a URL (`http://localhost:9000`, `https://s3.eu-west.amazonaws.com`)\n * — the resolver parses it into host/port. `bucket` is the S3 bucket\n * name. NOT a database — S3 has no DB concept.\n */\nexport const S3BackingServiceSchema = BackingServiceBaseSchema.extend({\n endpoint: z.string().min(1).optional(),\n bucket: z.string().min(1).optional(),\n}).strict();\nexport type S3BackingService = z.infer<typeof S3BackingServiceSchema>;\n\n/** ClamAV anti-virus daemon. Stateless, no database/vhost/bucket. */\nexport const ClamAvBackingServiceSchema = BackingServiceBaseSchema;\nexport type ClamAvBackingService = z.infer<typeof ClamAvBackingServiceSchema>;\n\n/**\n * immudb backing service (tamper-evident audit-log store). A stateful DB.\n *\n * On `source: SELF` the credentials are MINTED, never authored (#1696): the platform\n * gives each application its OWN immudb database and its OWN user, which can write that\n * database and nothing else, and delivers both with the application's platform secrets.\n * The name is derived from the application and kept across re-registrations, so\n * `database` is not read for a self-hosted store; it names the database of a MANAGED\n * one.\n *\n * Declare this in EVERY environment where the `COMPLIANCE_AUDIT_TRAIL` engine\n * capability is enabled. `wildo config sync` warns per environment when the audit\n * capability is on but no environment declares an audit store, and the audit client\n * then has nowhere tamper-evident to write.\n *\n * You do NOT author the state-signing keypair that makes the store's\n * whole-server-substitution defense work. The framework provisions it (private half\n * mounted into a `source: SELF` immudb via `--signingKey`, public half pinned by the\n * audit client as `IMMUDB_STATE_PUBLIC_KEY`) — declaring the service is the whole job.\n *\n * @example\n * ```ts\n * backingServices: {\n * immudb: { source: BackingServiceSource.SELF },\n * }\n * ```\n */\nexport const ImmudbBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type ImmudbBackingService = z.infer<typeof ImmudbBackingServiceSchema>;\n\n/**\n * Discriminated UNION over all backing-service kinds. Used by the\n * `ServiceAddressResolver` and helpers that accept any kind and read\n * only base fields (`source`, `host`, `port`). Consumers that need\n * kind-specific fields MUST narrow first (e.g. via the per-kind type\n * exports above).\n */\nexport type BackingServiceEnvConfig =\n | MongoBackingService\n | RedisBackingService\n | PostgresBackingService\n | RabbitBackingService\n | S3BackingService\n | ClamAvBackingService\n | ImmudbBackingService;\n\n/**\n * Per-environment backing services config (source for each service).\n * Used in environment-specific infra descriptors.\n *\n * Keys stay optional because an app-owned environment only needs to declare the\n * backing services it actually enables. Requiring the full enum-keyed record\n * would force disabled services (for example `postgresql`) into every env file\n * and breaks truthful flattened targeted-app declarations.\n */\nexport const BackingServicesEnvConfigSchema = z.object({\n [BackingServiceKind.MONGODB]: MongoBackingServiceSchema.optional(),\n [BackingServiceKind.REDIS]: RedisBackingServiceSchema.optional(),\n [BackingServiceKind.RABBITMQ]: RabbitBackingServiceSchema.optional(),\n [BackingServiceKind.S3]: S3BackingServiceSchema.optional(),\n [BackingServiceKind.POSTGRESQL]: PostgresBackingServiceSchema.optional(),\n [BackingServiceKind.CLAMAV]: ClamAvBackingServiceSchema.optional(),\n [BackingServiceKind.IMMUDB]: ImmudbBackingServiceSchema.optional(),\n}).strict();\nexport type BackingServicesEnvConfig = z.infer<typeof BackingServicesEnvConfigSchema>;\n/** @wildo_source:part:end platform.config.backing-services */\n\n// =============================================================================\n// BackingServiceKind ↔ InfraCapability / InfraProvider projections\n// =============================================================================\n//\n// Decided 2026-05-06: `BackingServicesEnvConfig`\n// IS the canonical per-env infra-selection authoring surface. The\n// `InfraCapability` / `InfraProvider` enums are the planner's projection\n// vocabulary (used by `InfraProviderModule.supportedCapabilities`,\n// `wildo-saas.lock.json sections.infra` keying, and any tooling that\n// walks \"what infra is selected per env\"). The mappings below are the\n// single source of truth for that projection — no other code may\n// reconstruct them locally.\n\n/** @wildo_source:part:start platform.config.infra-provider-resolution facet:layer:platform facet:audience:app-developer */\n/**\n * `BackingServiceKind` → `InfraCapability`. Every extension to `BackingServiceKind` MUST extend this\n * map in the same commit, otherwise the planner cannot project the new kind to its capability slot.\n *\n * INJECTIVE, not bijective — and the difference is a real property of the model rather than a gap.\n * A capability may be granted to a runtime without any environment declaring a backing service for\n * it; see {@link RUNTIME_GRANTED_INFRA_CAPABILITIES} for the ones that are, and why.\n */\nexport const BackingServiceKindToInfraCapability: Record<BackingServiceKind, InfraCapability> = {\n [BackingServiceKind.MONGODB]: InfraCapability.DOCUMENT_DATABASE,\n [BackingServiceKind.POSTGRESQL]: InfraCapability.RELATIONAL_DATABASE,\n [BackingServiceKind.RABBITMQ]: InfraCapability.QUEUING_SYSTEM,\n [BackingServiceKind.REDIS]: InfraCapability.CACHE_MANAGER,\n [BackingServiceKind.S3]: InfraCapability.OBJECT_STORAGE,\n [BackingServiceKind.CLAMAV]: InfraCapability.ANTIVIRUS_SCANNING,\n [BackingServiceKind.IMMUDB]: InfraCapability.AUDIT_LOG_STORAGE,\n};\n\n/**\n * Project `(BackingServiceKind, source, provider?)` → `InfraProvider`.\n *\n * The three-axis dispatch (kind × hosting-model × brand) generalizes\n * the source/brand split across all kinds (since 2026-05-07;\n * before that it was source-only, with Atlas as a special source value).\n *\n * **Brand vocabulary** per kind (`provider` field on the authored\n * `BackingService<X>Schema`):\n *\n * | Kind | source | provider | InfraProvider | Servable today |\n * |---|---|---|---|---|\n * | `MONGODB` | `SELF` | (any) | `MONGODB_SELF` | yes |\n * | `MONGODB` | `MANAGED` | `'atlas'` | `MONGODB_ATLAS` | yes |\n * | `POSTGRESQL` | `SELF` | (any) | `POSTGRES_SELF` | yes |\n * | `POSTGRESQL` | `MANAGED` | `'aws-rds'` | `POSTGRES_AWS_RDS` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'gcp-cloud-sql'` | `POSTGRES_GCP_CLOUD_SQL` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'azure-database'` | `POSTGRES_AZURE_DATABASE` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'supabase'` | `POSTGRES_SUPABASE` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'neon'` | `POSTGRES_NEON` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'render'` | `POSTGRES_RENDER` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | unset or unrecognized | `POSTGRES_MANAGED` (generic fallback) | no — no module |\n * | `REDIS` | `SELF` | (any) | `REDIS_SELF` | yes |\n * | `RABBITMQ` | `SELF` | (any) | `RABBITMQ_SELF` | yes |\n * | `S3` | (either) | `'minio'` | `MINIO_SELF` | yes |\n * | `S3` | (either) | `'aws'` | `AWS_S3` | no — no credential broker for AWS yet |\n * | `S3` | `SELF` | unset or unrecognized | `MINIO_SELF` | yes |\n * | `S3` | `MANAGED` | unset or unrecognized | `AWS_S3` | no — no credential broker for AWS yet |\n * | `CLAMAV` | `SELF` | (any) | `CLAMAV_SELF` | yes |\n * | `IMMUDB` | `SELF` | (any) | `IMMUDB_SELF` | yes — one database and one confined user minted per application (#1696) |\n *\n * Returns `undefined` for combinations not in the table: a managed cache, broker, antivirus scanner\n * or audit store, and a managed MongoDB under any brand other than `'atlas'`. PostgreSQL has a\n * generic managed fallback; S3 uses brand-first resolution, then source-based defaults.\n *\n * ## Resolving is not the same as being servable\n *\n * This function answers only \"which catalogue entry does this declaration NAME\". Whether the\n * platform can actually deliver that entry — mint the application's credential on the server the\n * application connects to — is a separate question, answered by {@link findUnservableBackingServiceDeclarations}\n * against the provider-module catalogue. A declaration that resolves to nothing, OR to an entry no\n * module can serve (the seven managed PostgreSQL entries, and `AWS_S3` until its credential broker\n * exists), is REFUSED by `wildo config validate`, `wildo config sync` and `wildo lock check`, with a\n * message naming the declarations that ARE servable for that kind.\n *\n * The same `(source, provider)` pair travels to apps-manager at every registration, and apps-manager\n * resolves it with THIS function and mints the application's credentials on the result — so the provider\n * the lockfile records and the provider a credential is minted on are one answer. It also refuses a\n * provider the platform itself holds no administrative credentials for (an Atlas declaration on a\n * platform with no Atlas API key); which providers a platform can serve is platform configuration.\n *\n * ## What this means when you author an environment\n *\n * **`MANAGED` reaches almost nothing today.** Of the managed rows in the table above, the only one\n * the platform serves is MongoDB Atlas (`{ source: MANAGED, provider: 'atlas' }`). Every other kind\n * is declared `{ source: SELF }`. The managed PostgreSQL brands and AWS S3 are catalogue entries a\n * module will serve later, not choices you can make now — a kind becomes declarable as `MANAGED` in\n * the same change that adds the module serving it, and there is deliberately no opt-out: a\n * configuration the platform cannot serve would receive a credential for a server the application\n * never connects to.\n *\n * **An unrecognised brand is not the same failure on every kind.** On the relational database it\n * falls back to the generic managed entry (which is not servable, so it is refused all the same). On\n * the document database, an unknown managed brand resolves to nothing. Object storage recognizes\n * minio/aws first, then falls back by source: SELF to MinIO, MANAGED to AWS S3, including\n * unrecognized brands.\n *\n * **Provider resolution and workload inclusion answer different questions.** Compose and Kubernetes\n * both use the same per-kind inclusion policy, separately from catalogue resolution. Cache, broker\n * and S3 default to self-hosted unless explicitly MANAGED; ClamAV and immudb require explicit SELF.\n * MongoDB and PostgreSQL also include the platform database requirement: an application-level\n * managed choice does not remove a self-hosted database still needed by the platform. Do not infer\n * workload inclusion from this provider resolver.\n */\nexport function resolveInfraProvider(\n kind: BackingServiceKind,\n source: BackingServiceSource,\n provider?: string,\n): InfraProvider | undefined {\n switch (kind) {\n case BackingServiceKind.MONGODB:\n if (source === BackingServiceSource.SELF) return InfraProvider.MONGODB_SELF;\n if (source === BackingServiceSource.MANAGED && provider === 'atlas') return InfraProvider.MONGODB_ATLAS;\n // Other Mongo managed brands (e.g., AWS DocumentDB) — extend\n // the `InfraProvider` enum + this branch in the same slice\n // that adds the first concrete consumer.\n return undefined;\n case BackingServiceKind.POSTGRESQL:\n if (source === BackingServiceSource.SELF) return InfraProvider.POSTGRES_SELF;\n if (source === BackingServiceSource.MANAGED) {\n switch (provider) {\n case 'aws-rds': return InfraProvider.POSTGRES_AWS_RDS;\n case 'gcp-cloud-sql': return InfraProvider.POSTGRES_GCP_CLOUD_SQL;\n case 'azure-database': return InfraProvider.POSTGRES_AZURE_DATABASE;\n case 'supabase': return InfraProvider.POSTGRES_SUPABASE;\n case 'neon': return InfraProvider.POSTGRES_NEON;\n case 'render': return InfraProvider.POSTGRES_RENDER;\n // Generic fallback when the operator has authored\n // `source: MANAGED` without naming a brand (or with an\n // unrecognized brand). Resolving it NAMES the generic\n // catalogue entry; it does not make it servable. No module\n // serves any managed PostgreSQL entry yet, so every one of\n // these is refused by the servability check (#1693) rather\n // than recorded in the lockfile as a selection nothing runs.\n default: return InfraProvider.POSTGRES_MANAGED;\n }\n }\n return undefined;\n case BackingServiceKind.REDIS:\n if (source === BackingServiceSource.SELF) return InfraProvider.REDIS_SELF;\n // Managed Redis brands (ElastiCache, Upstash, Redis Cloud, …)\n // — not catalogued yet; future expansion.\n return undefined;\n case BackingServiceKind.RABBITMQ:\n if (source === BackingServiceSource.SELF) return InfraProvider.RABBITMQ_SELF;\n // Managed RabbitMQ brands (CloudAMQP, AWS MQ, …) —\n // not catalogued yet; future expansion.\n return undefined;\n case BackingServiceKind.S3:\n // S3 dispatch is brand-first because the protocol is\n // standardized (S3-compatible) and the same `source` can host\n // multiple software stacks — `source: SELF` could be MinIO or\n // a self-managed AWS S3 cluster (theoretically). The brand is\n // the canonical disambiguator.\n if (provider === 'minio') return InfraProvider.MINIO_SELF;\n if (provider === 'aws') return InfraProvider.AWS_S3;\n // Default source-based mapping for unbranded S3 — MinIO is\n // the canonical self-hosted; AWS is the canonical managed.\n if (source === BackingServiceSource.SELF) return InfraProvider.MINIO_SELF;\n if (source === BackingServiceSource.MANAGED) return InfraProvider.AWS_S3;\n return undefined;\n case BackingServiceKind.CLAMAV:\n if (source === BackingServiceSource.SELF) return InfraProvider.CLAMAV_SELF;\n return undefined;\n case BackingServiceKind.IMMUDB:\n if (source === BackingServiceSource.SELF) return InfraProvider.IMMUDB_SELF;\n // No managed immudb: Codenotary no longer offers its hosted immudb Vault (re-researched 2026-11-06, #2518).\n return undefined;\n }\n}\n/** @wildo_source:part:end platform.config.infra-provider-resolution */\n"]}