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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/dist/esm/_unimplemented/soft-warn.d.ts +24 -49
  2. package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -1
  3. package/dist/esm/_unimplemented/soft-warn.js +24 -49
  4. package/dist/esm/_unimplemented/soft-warn.js.map +1 -1
  5. package/dist/esm/blueprint/anchored-region.d.ts.map +1 -1
  6. package/dist/esm/blueprint/anchored-region.js.map +1 -1
  7. package/dist/esm/blueprint/blueprint.schemas.d.ts +0 -89
  8. package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -1
  9. package/dist/esm/blueprint/blueprint.schemas.js.map +1 -1
  10. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  11. package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
  12. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -1
  13. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -1
  14. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  15. package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
  16. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  17. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  18. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +8 -1
  19. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  20. package/dist/esm/bootstrap/bootstrap.schemas.js +15 -1
  21. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  22. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +10 -2
  23. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +10 -2
  25. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  26. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +21 -0
  27. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
  28. package/dist/esm/bootstrap/platform-store-preconnect.js +25 -0
  29. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -1
  30. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts +80 -0
  31. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts.map +1 -0
  32. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js +81 -0
  33. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js.map +1 -0
  34. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +41 -9
  35. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  36. package/dist/esm/bootstrap/runtime-backing-service-access.js +77 -28
  37. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  38. package/dist/esm/bootstrap/runtime-network-policy.d.ts +117 -12
  39. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  40. package/dist/esm/bootstrap/runtime-network-policy.js +222 -23
  41. package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -1
  42. package/dist/esm/bootstrap/runtime-network-topology.d.ts +31 -4
  43. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  44. package/dist/esm/bootstrap/runtime-network-topology.js +43 -2
  45. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  46. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -1
  47. package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -1
  48. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +40 -2
  49. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  50. package/dist/esm/bootstrap/runtime-principal.contracts.js +66 -3
  51. package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -1
  52. package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -1
  53. package/dist/esm/bootstrap/runtime-response-integrity.js +3 -3
  54. package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -1
  55. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -1
  56. package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -1
  57. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  58. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  59. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts.map +1 -1
  60. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  61. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -1
  62. package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -1
  63. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  64. package/dist/esm/config-authoring.entry.js.map +1 -1
  65. package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
  66. package/dist/esm/credentials/credential-generator.service.js.map +1 -1
  67. package/dist/esm/index.d.ts +5 -1
  68. package/dist/esm/index.d.ts.map +1 -1
  69. package/dist/esm/index.js +5 -1
  70. package/dist/esm/index.js.map +1 -1
  71. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts +119 -0
  72. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts.map +1 -0
  73. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js +109 -0
  74. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js.map +1 -0
  75. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts +182 -0
  76. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts.map +1 -0
  77. package/dist/esm/key-management/application-signing-key-rotation.contracts.js +145 -0
  78. package/dist/esm/key-management/application-signing-key-rotation.contracts.js.map +1 -0
  79. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts +156 -0
  80. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts.map +1 -0
  81. package/dist/esm/key-management/approval-seal-manifested-copy.js +617 -0
  82. package/dist/esm/key-management/approval-seal-manifested-copy.js.map +1 -0
  83. package/dist/esm/key-management/approval-seal-verifier.d.ts +114 -40
  84. package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -1
  85. package/dist/esm/key-management/approval-seal-verifier.js +143 -12
  86. package/dist/esm/key-management/approval-seal-verifier.js.map +1 -1
  87. package/dist/esm/key-management/approval-seal.contracts.d.ts +12 -15
  88. package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -1
  89. package/dist/esm/key-management/approval-seal.contracts.js +20 -0
  90. package/dist/esm/key-management/approval-seal.contracts.js.map +1 -1
  91. package/dist/esm/key-management/data-key.contracts.d.ts +0 -2
  92. package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -1
  93. package/dist/esm/key-management/data-key.contracts.js.map +1 -1
  94. package/dist/esm/key-management/es256-jws.d.ts.map +1 -1
  95. package/dist/esm/key-management/es256-jws.js.map +1 -1
  96. package/dist/esm/key-management/key-provider.spi.d.ts +8 -1
  97. package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -1
  98. package/dist/esm/key-management/key-provider.spi.js.map +1 -1
  99. package/dist/esm/key-management/keyring-rotation.contracts.d.ts +2 -12
  100. package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -1
  101. package/dist/esm/key-management/keyring-rotation.contracts.js +3 -3
  102. package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -1
  103. package/dist/esm/key-management/keyring-status.contracts.d.ts +0 -7
  104. package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -1
  105. package/dist/esm/key-management/keyring-status.contracts.js.map +1 -1
  106. package/dist/esm/key-management/pdf-incremental-update.d.ts +158 -0
  107. package/dist/esm/key-management/pdf-incremental-update.d.ts.map +1 -0
  108. package/dist/esm/key-management/pdf-incremental-update.js +730 -0
  109. package/dist/esm/key-management/pdf-incremental-update.js.map +1 -0
  110. package/dist/esm/key-management/pdf-truetype-font.d.ts +35 -0
  111. package/dist/esm/key-management/pdf-truetype-font.d.ts.map +1 -0
  112. package/dist/esm/key-management/pdf-truetype-font.js +152 -0
  113. package/dist/esm/key-management/pdf-truetype-font.js.map +1 -0
  114. package/dist/esm/key-management/qr-code.d.ts +38 -0
  115. package/dist/esm/key-management/qr-code.d.ts.map +1 -0
  116. package/dist/esm/key-management/qr-code.js +325 -0
  117. package/dist/esm/key-management/qr-code.js.map +1 -0
  118. package/dist/esm/key-management/signature-request.contracts.d.ts +0 -4
  119. package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -1
  120. package/dist/esm/key-management/signature-request.contracts.js.map +1 -1
  121. package/dist/esm/key-management/signing-log-export.contracts.d.ts +0 -1
  122. package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -1
  123. package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -1
  124. package/dist/esm/key-management/vault-custody.contracts.d.ts +43 -0
  125. package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -1
  126. package/dist/esm/key-management/vault-custody.contracts.js +66 -0
  127. package/dist/esm/key-management/vault-custody.contracts.js.map +1 -1
  128. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -1
  129. package/dist/esm/lockfile/build-parallelism.js.map +1 -1
  130. package/dist/esm/lockfile/canonical-json.d.ts +1 -1
  131. package/dist/esm/lockfile/canonical-json.d.ts.map +1 -1
  132. package/dist/esm/lockfile/canonical-json.js +1 -1
  133. package/dist/esm/lockfile/canonical-json.js.map +1 -1
  134. package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
  135. package/dist/esm/lockfile/file-lock-hold.js +2 -1
  136. package/dist/esm/lockfile/file-lock-hold.js.map +1 -1
  137. package/dist/esm/lockfile/lockfile-io.d.ts +6 -8
  138. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  139. package/dist/esm/lockfile/lockfile-io.js +6 -8
  140. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  141. package/dist/esm/lockfile/materialize-infra-section.d.ts +5 -6
  142. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  143. package/dist/esm/lockfile/materialize-infra-section.js +4 -5
  144. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  145. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +1 -247
  146. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  147. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +1 -1
  148. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  149. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts +146 -0
  150. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts.map +1 -0
  151. package/dist/esm/pnpm-settings/application-pnpm-settings.js +573 -0
  152. package/dist/esm/pnpm-settings/application-pnpm-settings.js.map +1 -0
  153. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
  154. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +15 -3
  155. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
  156. package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -1
  157. package/dist/esm/project-config/application-served-public-documents.loader.js +16 -8
  158. package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -1
  159. package/dist/esm/project-config/backend-compliance-section.reader.d.ts +35 -0
  160. package/dist/esm/project-config/backend-compliance-section.reader.d.ts.map +1 -0
  161. package/dist/esm/project-config/backend-compliance-section.reader.js +123 -0
  162. package/dist/esm/project-config/backend-compliance-section.reader.js.map +1 -0
  163. package/dist/esm/project-config/backend-compliance-section.worker.d.ts +20 -0
  164. package/dist/esm/project-config/backend-compliance-section.worker.d.ts.map +1 -0
  165. package/dist/esm/project-config/backend-compliance-section.worker.js +78 -0
  166. package/dist/esm/project-config/backend-compliance-section.worker.js.map +1 -0
  167. package/dist/esm/project-config/config-module-resolution.d.ts +32 -0
  168. package/dist/esm/project-config/config-module-resolution.d.ts.map +1 -0
  169. package/dist/esm/project-config/config-module-resolution.js +33 -0
  170. package/dist/esm/project-config/config-module-resolution.js.map +1 -0
  171. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  172. package/dist/esm/project-config/define-framework-config.js.map +1 -1
  173. package/dist/esm/project-config/define-infra-env-config.d.ts +146 -55
  174. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  175. package/dist/esm/project-config/define-infra-env-config.js +124 -71
  176. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  177. package/dist/esm/project-config/define-minion-config.d.ts +26 -36
  178. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  179. package/dist/esm/project-config/define-minion-config.js +64 -25
  180. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  181. package/dist/esm/project-config/define-saas-config.d.ts +41 -437
  182. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  183. package/dist/esm/project-config/define-saas-config.js +102 -94
  184. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  185. package/dist/esm/project-config/define-worker-config.d.ts +10 -20
  186. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  187. package/dist/esm/project-config/define-worker-config.js +10 -12
  188. package/dist/esm/project-config/define-worker-config.js.map +1 -1
  189. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
  190. package/dist/esm/project-config/hosted-infra-env-config.js +2 -1
  191. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
  192. package/dist/esm/project-config/index.d.ts +2 -0
  193. package/dist/esm/project-config/index.d.ts.map +1 -1
  194. package/dist/esm/project-config/index.js +2 -0
  195. package/dist/esm/project-config/index.js.map +1 -1
  196. package/dist/esm/project-config/loader-instances-zod.d.ts +19 -0
  197. package/dist/esm/project-config/loader-instances-zod.d.ts.map +1 -0
  198. package/dist/esm/project-config/loader-instances-zod.js +40 -0
  199. package/dist/esm/project-config/loader-instances-zod.js.map +1 -0
  200. package/dist/esm/project-config/loader.d.ts +131 -14
  201. package/dist/esm/project-config/loader.d.ts.map +1 -1
  202. package/dist/esm/project-config/loader.js +226 -12
  203. package/dist/esm/project-config/loader.js.map +1 -1
  204. package/dist/esm/project-config/minion-liveness.contracts.d.ts +131 -0
  205. package/dist/esm/project-config/minion-liveness.contracts.d.ts.map +1 -0
  206. package/dist/esm/project-config/minion-liveness.contracts.js +167 -0
  207. package/dist/esm/project-config/minion-liveness.contracts.js.map +1 -0
  208. package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -1
  209. package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -1
  210. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
  211. package/dist/esm/project-config/npm-version-range.js.map +1 -1
  212. package/dist/esm/project-config/owning-package-tsconfig.d.ts +7 -7
  213. package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -1
  214. package/dist/esm/project-config/owning-package-tsconfig.js +7 -7
  215. package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -1
  216. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -1
  217. package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
  218. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  219. package/dist/esm/project-config/provider-companion-discovery.js +3 -1
  220. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  221. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +71 -46
  222. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  223. package/dist/esm/project-config/provider-runtime-artifacts.js +150 -4
  224. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  225. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +0 -2
  226. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  227. package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -1
  228. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  229. package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
  230. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  231. package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
  232. package/dist/esm/project-config/shared/auth.schemas.d.ts +0 -17
  233. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  234. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  235. package/dist/esm/project-config/shared/backing-service-servability.d.ts.map +1 -1
  236. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -1
  237. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +9 -10
  238. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  239. package/dist/esm/project-config/shared/backing-services.schemas.js +13 -15
  240. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  241. package/dist/esm/project-config/shared/cdn.schemas.d.ts +0 -51
  242. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  243. package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -1
  244. package/dist/esm/project-config/shared/csp-defaults.d.ts +34 -6
  245. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  246. package/dist/esm/project-config/shared/csp-defaults.js +52 -8
  247. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
  248. package/dist/esm/project-config/shared/csp-emit.d.ts +60 -13
  249. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  250. package/dist/esm/project-config/shared/csp-emit.js +77 -24
  251. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  252. package/dist/esm/project-config/shared/csp.schemas.d.ts +72 -84
  253. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  254. package/dist/esm/project-config/shared/csp.schemas.js +40 -12
  255. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  256. package/dist/esm/project-config/shared/data-services.schemas.d.ts +0 -8
  257. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  258. package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
  259. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  260. package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
  261. package/dist/esm/project-config/shared/environment.schemas.d.ts +95 -8
  262. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  263. package/dist/esm/project-config/shared/environment.schemas.js +122 -10
  264. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  265. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +10 -4
  266. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  267. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  268. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -1
  269. package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -1
  270. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +1 -1
  271. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  272. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +1 -1
  273. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  274. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  275. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  276. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  277. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  278. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +20 -0
  279. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  280. package/dist/esm/project-config/shared/minion-resource-access.validation.js +21 -2
  281. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  282. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -1
  283. package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -1
  284. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +67 -38
  285. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -1
  286. package/dist/esm/project-config/shared/platform-key-management.schemas.js +113 -5
  287. package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -1
  288. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  289. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  290. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +2 -2
  291. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
  292. package/dist/esm/project-config/shared/platform-storage.schemas.js +16 -2
  293. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -1
  294. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +21 -23
  295. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  296. package/dist/esm/project-config/shared/service-definitions.schemas.js +4 -5
  297. package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
  298. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +0 -18
  299. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
  300. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -1
  301. package/dist/esm/project-config/static-asset-import-noop.d.ts +20 -3
  302. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -1
  303. package/dist/esm/project-config/static-asset-import-noop.js +36 -20
  304. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -1
  305. package/dist/esm/registry/artifact-domain.schemas.d.ts +0 -5
  306. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  307. package/dist/esm/registry/artifact-domain.schemas.js.map +1 -1
  308. package/dist/esm/registry/digest.schemas.d.ts.map +1 -1
  309. package/dist/esm/registry/digest.schemas.js.map +1 -1
  310. package/dist/esm/registry/index.d.ts +2 -3
  311. package/dist/esm/registry/index.d.ts.map +1 -1
  312. package/dist/esm/registry/index.js +2 -3
  313. package/dist/esm/registry/index.js.map +1 -1
  314. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
  315. package/dist/esm/registry/local-checkout-source.js.map +1 -1
  316. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +1 -98
  317. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  318. package/dist/esm/registry/lockfile-modules-section.schemas.js +1 -2
  319. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  320. package/dist/esm/registry/module-artifact.schemas.d.ts +17 -17
  321. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  322. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  323. package/dist/esm/registry/module-manifest.schemas.d.ts +151 -219
  324. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  325. package/dist/esm/registry/module-manifest.schemas.js +145 -13
  326. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  327. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
  328. package/dist/esm/registry/module-search.schemas.js.map +1 -1
  329. package/dist/esm/registry/registry-config.schemas.d.ts +0 -18
  330. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  331. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  332. package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -1
  333. package/dist/esm/registry/registry-defaults.constants.js.map +1 -1
  334. package/dist/esm/registry/registry-errors.d.ts +81 -3
  335. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  336. package/dist/esm/registry/registry-errors.js +185 -4
  337. package/dist/esm/registry/registry-errors.js.map +1 -1
  338. package/dist/esm/registry/registry-keys.schemas.d.ts.map +1 -1
  339. package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
  340. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  341. package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -1
  342. package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -1
  343. package/dist/esm/registry/registry-url-resolution.js.map +1 -1
  344. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  345. package/dist/esm/release/framework-release.constants.js.map +1 -1
  346. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  347. package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
  348. package/dist/esm/schemas/framework-secrets.schemas.d.ts +0 -7
  349. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  350. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  351. package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
  352. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  353. package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
  354. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +1 -1
  355. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  356. package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
  357. package/dist/esm/schemas/platform-config.schemas.d.ts +2 -2
  358. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  359. package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
  360. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -1
  361. package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -1
  362. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  363. package/dist/esm/workspace-scope/index.js.map +1 -1
  364. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  365. package/dist/esm/workspace-scope/resolve-homes.js.map +1 -1
  366. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  367. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  368. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
  369. package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
  370. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  371. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  372. package/dist/tsconfig.build.tsbuildinfo +1 -1
  373. package/package.json +12 -12
  374. package/dist/esm/_unimplemented/index.d.ts +0 -3
  375. package/dist/esm/_unimplemented/index.d.ts.map +0 -1
  376. package/dist/esm/_unimplemented/index.js +0 -3
  377. package/dist/esm/_unimplemented/index.js.map +0 -1
  378. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +0 -137
  379. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +0 -1
  380. package/dist/esm/_unimplemented/unimplemented-field-warning.js +0 -153
  381. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +0 -1
  382. package/dist/esm/project-config/shared/cdn.example.d.ts +0 -14
  383. package/dist/esm/project-config/shared/cdn.example.d.ts.map +0 -1
  384. package/dist/esm/project-config/shared/cdn.example.js +0 -38
  385. package/dist/esm/project-config/shared/cdn.example.js.map +0 -1
  386. package/dist/esm/project-config/shared/schema-version.schemas.d.ts +0 -15
  387. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +0 -1
  388. package/dist/esm/project-config/shared/schema-version.schemas.js +0 -40
  389. package/dist/esm/project-config/shared/schema-version.schemas.js.map +0 -1
@@ -57,8 +57,15 @@
57
57
  * pilot triages clean) emits the enforcing header AND the meta
58
58
  * tag (with header-only directives stripped from the meta tag —
59
59
  * see `META_INVALID_DIRECTIVES` in `csp-emit.ts`).
60
- * - `reportUri` => header-only directive value (the meta tag would
61
- * ignore it). The resolver feeds it to the nginx channel only.
60
+ * - `reportUri` / `reportTo` => where the browser reports violations
61
+ * (#2867). Header-only (the meta tag would ignore them); the resolver
62
+ * feeds them to the header channels only. When NEITHER is authored at
63
+ * any layer, the policy names the platform collector every application
64
+ * backend serves (`CSP_PLATFORM_VIOLATION_COLLECTOR` in
65
+ * `./csp-defaults.ts`) through both. Authoring either one replaces the
66
+ * platform collector on both mechanisms, because a browser that sees
67
+ * `report-to` ignores `report-uri` (CSP Level 3 §5.5) and a split
68
+ * destination would send each browser's reports to a different place.
62
69
  *
63
70
  * # Why the `directives` keys are an explicit closed set vs a free-form `Record<string, ...>`
64
71
  *
@@ -182,10 +189,19 @@ export const CspDirectivesOverrideSchema = z.strictObject(Object.fromEntries(CSP
182
189
  * ## `reportOnly` is a posture, not a formality
183
190
  *
184
191
  * `reportOnly: true` emits the report-only header: the browser reports violations and BLOCKS
185
- * NOTHING. Flipping it is one field. Note also that a `report-uri` is supported by the schema and the
186
- * emitter and no baseline ships a collector, so with nothing authored there the reports a browser
187
- * generates have nowhere to go — report-only plus no collector is a policy that neither blocks nor
188
- * tells you anything.
192
+ * NOTHING. Flipping it is one field.
193
+ *
194
+ * ## Where violations are reported
195
+ *
196
+ * Every application backend serves a violation collector, and with nothing authored here the policy
197
+ * names it: `report-uri` (one request per violation) and `report-to` with a `Reporting-Endpoints`
198
+ * header (batched reports, the mechanism current browsers prefer). The collector counts each report
199
+ * by directive in the backend's metrics and logs a sample — it is observability, not an audit trail.
200
+ * Read those before flipping `reportOnly`: a report-only policy that reports nothing has not been
201
+ * shown to be safe to enforce.
202
+ *
203
+ * Author `reportUri` and/or `reportTo` only to send reports to a collector of your own. Either one
204
+ * replaces the platform collector on BOTH mechanisms, so name both when your collector accepts both.
189
205
  *
190
206
  * Nonces and hashes are not generated per request or at build time. A source list may name one by
191
207
  * hand, but there is no generation, which is why a baseline that must admit inline script still does.
@@ -239,13 +255,21 @@ export const WildoCspConfigSchema = z.strictObject({
239
255
  */
240
256
  directives: CspDirectivesOverrideSchema.default({}),
241
257
  /**
242
- * Optional `report-uri` directive value (header-only — meta tag
243
- * ignores it; the resolver feeds it to the nginx channel only).
244
- * No `report-to` field today — `report-to` requires the parallel
245
- * Reporting API endpoint config which the platform doesn't ship; add
246
- * when the violation collector lands (#2867).
258
+ * Your own collector for the `report-uri` mechanism: one POST per violation, as
259
+ * `application/csp-report`. Header-only (the meta tag ignores it). Omit both this and
260
+ * `reportTo` to use the platform collector the application backend serves.
247
261
  */
248
262
  reportUri: z.string().min(1).optional(),
263
+ /**
264
+ * Your own collector for the Reporting API mechanism: batched reports as
265
+ * `application/reports+json`, sent with CORS from the page's origin. The policy names it
266
+ * through `report-to` and a `Reporting-Endpoints` header. An absolute URL that browsers treat
267
+ * as trustworthy: `https://…`, or `http://localhost…` in development; any other URL is ignored
268
+ * by the browser. Omit both this and `reportUri` to use the platform collector.
269
+ *
270
+ * spec-cite: Reporting API (W3C Working Draft, 11 June 2025) §3.2 (an endpoint URL that is not potentially trustworthy is ignored) — https://www.w3.org/TR/reporting-1/
271
+ */
272
+ reportTo: z.url().optional(),
249
273
  });
250
274
  /**
251
275
  * Env-specific overrides — authored under
@@ -307,8 +331,12 @@ export const EnvCspOverrideSchema = z.strictObject({
307
331
  reportOnly: z.boolean().optional(),
308
332
  /**
309
333
  * Env-layer override of the app-static `reportUri` (e.g., per-env
310
- * collector endpoint).
334
+ * collector endpoint). Like the app-static field, authoring it (or
335
+ * `reportTo`) at any layer replaces the platform collector on both
336
+ * mechanisms.
311
337
  */
312
338
  reportUri: z.string().min(1).optional(),
339
+ /** Env-layer override of the app-static `reportTo` (a per-env Reporting API collector). */
340
+ reportTo: z.url().optional(),
313
341
  });
314
342
  //# sourceMappingURL=csp.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"csp.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/csp.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,aAAa;IACb,YAAY;IACZ,WAAW;IACX,SAAS;IACT,aAAa;IACb,UAAU;IACV,WAAW;IACX,iBAAiB;IACjB,YAAY;IACZ,aAAa;IACb,UAAU;IACV,cAAc;IACd,WAAW;IACX,YAAY;CACJ,CAAC;AAIX;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,uDAAmC,C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,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACxC;;;;;;OAMG;IACH,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC;;;OAGG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC","sourcesContent":["/**\n * Content-Security-Policy authoring schema for per-frontend opt-in.\n *\n * # Where this fits in the layered CSP cake\n *\n * 1. Platform default — `./csp-defaults.ts` ships per-`AppFrontendType`\n * baselines (`SAAS_APP`, `STATIC_WEBSITE`, `TECH_DOC`). The baseline\n * is opinionated but conservative: `default-src 'self'` plus the\n * narrowest set of relaxations each frontend kind genuinely needs\n * to render (e.g., Docusaurus 3.x's `'unsafe-inline'` script /\n * style requirement for `TECH_DOC`).\n * 2. App-static — this `WildoCspConfigSchema`, authored on each\n * service-definition's `csp?` field. `SAAS_APP` authors this on\n * `wildo.saas.config.ts > services.<key>.csp`; `STATIC_WEBSITE` authors\n * it on `wildo.website.config.ts`; `TECH_DOC` authors it on\n * `wildo.tech-doc.config.ts`.\n * 3. Env-specific — `EnvCspOverrideSchema` below, authored under\n * `wildo.infra.<env>.config.ts.csp?[serviceKey]`. `WildoInfraEnvConfigSchema`\n * declares that field, so the layer is live. Its build-time consumer is\n * `wildo dev sync-csp`, which reads `parsed.csp[serviceKey]` when emitting\n * generated frontend CSP artifacts.\n * 4. Declared providers — NOT authored here at all (#332). Each frontend\n * provider declares the origins it needs to reach on its own module, that\n * footprint travels as data into the materialized frontend-services\n * artifact, and `resolveCspPolicy` merges the footprints of the providers\n * declared FOR THIS SERVICE. Layers 1–3 say what the application decided;\n * layer 4 says what the things it declared actually need in order to work,\n * which is why it is additive even under `replace-baseline`.\n *\n * # Resolution semantics (consumed by `platform-config-lib/src/project-config/shared/csp-emit.ts`)\n *\n * - `enabled: false` (default) => no policy emitted; the resolver\n * returns `null` and both nginx + meta channels stay silent. The\n * opt-in shape (vs opt-out) is deliberate — frontends that have not\n * audited their third-party surface should not ship a half-baked\n * CSP that breaks features without protecting anything.\n * - `enabled: true` with no `directives` override => baseline emitted\n * verbatim (see `./csp-defaults.ts`).\n * - `enabled: true` with `directives` AND `mergeStrategy: 'extend-baseline'`\n * (default) => per-directive ADDITIVE merge: each authored source\n * list is concatenated to the baseline's source list for that\n * directive (de-duplicated, baseline order preserved, app sources\n * appended in author order). Directives the baseline doesn't ship\n * are added wholesale.\n * - `enabled: true` with `mergeStrategy: 'replace-baseline'` =>\n * authored `directives` map REPLACES the baseline entirely; missing\n * directives are simply absent from the policy. Use only when the\n * baseline is fundamentally wrong for the surface (e.g., a\n * `STATIC_WEBSITE` that actually serves an embedded SaaS app and\n * wants the tighter `SAAS_APP`-style policy from scratch). The\n * escape hatch exists; the merge default exists for the common\n * case (additive tightening / loosening).\n * - `reportOnly: true` => header name flips to\n * `Content-Security-Policy-Report-Only` AND the `<meta http-equiv>`\n * channel goes silent (browsers reject the report-only header via\n * meta — W3C CSP3 §4.2.1). `reportOnly: false` (default once the\n * pilot triages clean) emits the enforcing header AND the meta\n * tag (with header-only directives stripped from the meta tag —\n * see `META_INVALID_DIRECTIVES` in `csp-emit.ts`).\n * - `reportUri` => header-only directive value (the meta tag would\n * ignore it). The resolver feeds it to the nginx channel only.\n *\n * # Why the `directives` keys are an explicit closed set vs a free-form `Record<string, ...>`\n *\n * CSP grew organically over a decade and a half. The closed set below\n * (`default-src` / `script-src` / `style-src` / `img-src` / `connect-src`\n * / `font-src` / `frame-src` / `frame-ancestors` / `object-src` /\n * `form-action` / `base-uri` / `manifest-src` / `media-src` / `worker-src`)\n * covers every directive the platform's three frontend kinds genuinely\n * use today. Forcing authors to spell directive names through the schema\n * surface (vs `Record<string, string[]>`) catches typos at parse time\n * (`script-source` !== `script-src`) and gives IDE autocompletion. Adding\n * a new directive is a one-line schema edit when a real consumer asks\n * for it; meanwhile the default-deny stance prevents authors from\n * accidentally shipping a directive name the browser silently ignores.\n *\n * # Author-friendly source lists\n *\n * Each directive's value is `string[]`. The resolver does NOT validate\n * the contents of the source list (that would require importing a CSP\n * grammar — out of scope for this commit). Common shapes:\n *\n * - `\"'self'\"` — single-quoted keyword, MUST keep the quotes.\n * - `'data:'`, `'blob:'` — scheme sources.\n * - `'https://api.example.com'` — origin source.\n * - `\"'unsafe-inline'\"`, `\"'unsafe-eval'\"` — single-quoted keywords.\n * - `\"'nonce-<base64>'\"` — nonce keyword (rendered per-request).\n * - `\"'sha256-<hash>'\"` — hash keyword.\n *\n * The `csp-emit.ts` serializer joins source lists with single spaces\n * and separates directives with `; ` (no leading/trailing semicolon —\n * matches Mozilla / OWASP recommended whitespace).\n */\n\nimport { z } from 'zod';\n\n/**\n * Closed set of directive names we accept on the `csp.directives`\n * authoring map. Adding a new directive name requires:\n *\n * 1. Adding the literal here.\n * 2. Updating any per-`AppFrontendType` baseline that should ship the\n * directive by default in `./csp-defaults.ts`.\n * 3. Verifying the `csp-emit.ts` serializer handles the directive\n * (it does — the serializer is generic over directive names — so\n * step 3 is usually a no-op).\n *\n * The `META_INVALID_DIRECTIVES` set in `csp-emit.ts` lists the\n * directives the browser ignores when emitted via `<meta http-equiv>`\n * (`frame-ancestors`, `report-uri`, `report-to`, `sandbox`); they're\n * stripped from the meta-channel output but remain on the nginx\n * channel. Keep that set in sync if a new header-only directive lands\n * here.\n */\nexport const CSP_DIRECTIVE_NAMES = [\n 'default-src',\n 'script-src',\n 'style-src',\n 'img-src',\n 'connect-src',\n 'font-src',\n 'frame-src',\n 'frame-ancestors',\n 'object-src',\n 'form-action',\n 'base-uri',\n 'manifest-src',\n 'media-src',\n 'worker-src',\n] as const;\n\nexport type CspDirectiveName = (typeof CSP_DIRECTIVE_NAMES)[number];\n\n/**\n * Author-side merge strategy for the app-static layer over the baseline.\n *\n * - `'extend-baseline'` (default) — per-directive ADDITIVE merge:\n * each authored source list is APPENDED to the baseline source\n * list for that directive. Directives the baseline doesn't ship\n * are added wholesale. Common case: an app needs to add ONE extra\n * `connect-src` origin without re-authoring the rest of the policy.\n * - `'replace-baseline'` — authored `directives` map REPLACES the\n * baseline entirely. Use when the baseline is fundamentally wrong\n * for the surface (e.g., a tighter or fundamentally different\n * posture). Escape hatch — the merge default is the right answer\n * in 95% of cases.\n */\nexport enum CspMergeStrategy {\n EXTEND_BASELINE = 'extend-baseline',\n REPLACE_BASELINE = 'replace-baseline',\n}\n\n/**\n * Author-side directive overrides — partial map keyed by the closed\n * directive-name set above. Each value is a source list of strings\n * (joined with single spaces by the serializer).\n *\n * Authoring `directives: { 'connect-src': ['https://api.example.com'] }`\n * with the default `'extend-baseline'` strategy APPENDS that origin to\n * the baseline `connect-src` source list (which already contains\n * `'self'` for every baseline) — it does NOT replace the baseline's\n * `connect-src`. Use `mergeStrategy: 'replace-baseline'` to opt out of\n * additive merging.\n */\nexport const CspDirectivesOverrideSchema = z.strictObject(\n Object.fromEntries(\n CSP_DIRECTIVE_NAMES.map((name) => [\n name,\n z.array(z.string().min(1)).optional(),\n ]),\n ) as Record<CspDirectiveName, z.ZodOptional<z.ZodArray<z.ZodString>>>,\n);\nexport type CspDirectivesOverride = z.infer<typeof CspDirectivesOverrideSchema>;\n\n/**\n * @wildo_source:part:start saas.config.content-security-policy facet:layer:shared facet:audience:app-developer\n *\n * Declaring a Content-Security-Policy for one of the application's frontends.\n *\n * ⚠️ **Every browser surface ships a policy; what differs is what happens when you author none.** On\n * the application (`services.<key>.csp`) an omitted block resolves at sync to `enabled: true,\n * reportOnly: true` — a policy that reports violations and blocks nothing. A website or technical-doc\n * config with no block is refused at sync, naming the file. A policy that resolves DISABLED is refused\n * on every surface, so `enabled: false` cannot switch the header off.\n *\n * ## The generated file is the only one read\n *\n * Author the static posture here, add per-environment entries under `csp.<serviceKey>` in that\n * environment's infrastructure configuration, then run `wildo dev sync-csp --env <env>` (starting\n * development runs it for you). Each surface reads ONLY the generated artifact — hand-editing a\n * surface's own policy file changes nothing and is overwritten on the next sync.\n *\n * ## `reportOnly` is a posture, not a formality\n *\n * `reportOnly: true` emits the report-only header: the browser reports violations and BLOCKS\n * NOTHING. Flipping it is one field. Note also that a `report-uri` is supported by the schema and the\n * emitter and no baseline ships a collector, so with nothing authored there the reports a browser\n * generates have nowhere to go — report-only plus no collector is a policy that neither blocks nor\n * tells you anything.\n *\n * Nonces and hashes are not generated per request or at build time. A source list may name one by\n * hand, but there is no generation, which is why a baseline that must admit inline script still does.\n *\n * Per-frontend CSP block. Authored on each service-definition's `csp?`\n * field. All three surfaces carry it: `wildo.tech-doc.config.ts.csp?`,\n * `wildo.website.config.ts.csp?`, and `services.<key>.csp` on the\n * `SAAS_APP` service definition.\n *\n * An AUTHORED block that omits `enabled` parses as `enabled: false`, which the resolver turns into no\n * policy and the sync then refuses — so author `enabled: true` explicitly whenever you write a block.\n *\n * `z.strictObject` (Zod 4) is intentional — typos like `enable: true`\n * (no `d`) or `directive: { … }` (no plural) MUST surface as parse\n * errors, not silently strip to `enabled: false` (i.e. CSP off, the\n * worst possible default). Same framework-mindset enforcement as\n * `WildoAuthConfigSchema`.\n */\nexport const WildoCspConfigSchema = z.strictObject({\n /**\n * `true` => baseline (+ overrides) emitted on both channels per `reportOnly`.\n * `false` — also the parse default for an authored block — makes the resolver return `null`, and\n * `wildo dev sync-csp` refuses that for every CSP-capable surface. It is not a way to turn the\n * header off.\n */\n enabled: z.boolean().default(false),\n /**\n * `true` => header name flips to `Content-Security-Policy-Report-Only`\n * AND the `<meta http-equiv>` channel goes silent (browsers reject the\n * report-only header via meta — W3C CSP3 §4.2.1). Use during the\n * pilot to triage console-surfaced violations without breaking real\n * traffic. Flip to `false` once the directive overrides settle.\n *\n * Default: `false` (enforcing). Authors opting into CSP for the first\n * time SHOULD set `reportOnly: true` for the first PR; the schema\n * default is intentionally enforcing so the steady state (post-pilot)\n * doesn't require a per-app authored `reportOnly: false`.\n */\n reportOnly: z.boolean().default(false),\n /**\n * Merge strategy for authored `directives` over the baseline. Default:\n * `'extend-baseline'` (per-directive additive merge — see\n * `CspMergeStrategy`).\n */\n mergeStrategy: z\n .enum(CspMergeStrategy)\n .default(CspMergeStrategy.EXTEND_BASELINE),\n /**\n * Per-directive overrides, keyed by directive name. Default: empty\n * map (baseline emitted verbatim).\n */\n directives: CspDirectivesOverrideSchema.default({}),\n /**\n * Optional `report-uri` directive value (header-only — meta tag\n * ignores it; the resolver feeds it to the nginx channel only).\n * No `report-to` field today — `report-to` requires the parallel\n * Reporting API endpoint config which the platform doesn't ship; add\n * when the violation collector lands (#2867).\n */\n reportUri: z.string().min(1).optional(),\n});\n/** @wildo_source:part:end saas.config.content-security-policy */\nexport type WildoCspConfig = z.infer<typeof WildoCspConfigSchema>;\nexport type WildoCspConfigInput = z.input<typeof WildoCspConfigSchema>;\n\n/**\n * Env-specific overrides — authored under\n * `wildo.infra.<env>.config.ts.csp?[serviceKey]`. The loader merges\n * these on top of the app-static layer (which itself is on top of the\n * baseline).\n *\n * `WildoInfraEnvConfigSchema` declares `csp` as a record of these,\n * keyed by service key, and the resolver in `csp-emit.ts` consumes it.\n *\n * `extraDirectives` is ADDITIVE only — env-layer entries are APPENDED\n * to whatever the app-static layer produced for that directive. There\n * is no `'replace-baseline'`-equivalent at the env layer because env\n * config exists to LOOSEN policies for specific deployments (Sentry\n * origin in staging, dev hot-reload `'unsafe-eval'`), not to replace\n * an app's chosen posture. If an env genuinely needs a different\n * posture the right answer is to fix the app-static layer.\n */\nexport const EnvCspOverrideSchema = z.strictObject({\n /**\n * Per-directive ADDITIVE merge. Each entry's source list is\n * APPENDED to the app-static layer's source list for that directive\n * (de-duplicated, app order preserved, env sources appended in\n * author order). No replace semantics at this layer.\n */\n extraDirectives: CspDirectivesOverrideSchema.default({}),\n /**\n * Vite dev-mode CSP loosening: adds BOTH `'unsafe-inline'` and\n * `'unsafe-eval'` to `script-src`. Vite's dev server injects an\n * inline `<script>` for the HMR client bootstrap AND uses `eval()`\n * for lazy module / sourcemap transforms — both block under a strict\n * `script-src 'self'` policy and produce ~120+ CSP violations per\n * page load. Production Vite builds emit `<script type=\"module\">`\n * only and use no `eval()`, so this loosening is dev-only by design.\n *\n * AUTO-DEFAULT: `true` when the resolved env id is `'local'` AND the\n * frontend type is `SAAS_APP` (the only Vite-bundled frontend kind in\n * the framework). The framework applies the loosening automatically so\n * every Wildo app gets a clean dev console without per-app\n * configuration; opting in app-by-app would scatter the same\n * framework-shipped Vite knowledge across N infrastructure files.\n *\n * EXPLICIT OPT-OUT: set to `false` to keep tight `script-src` in\n * local dev. Useful only when actively debugging a real CSP issue\n * and willing to accept Vite-induced noise. Production envs ignore\n * this flag's auto-default and require explicit opt-in (extremely\n * unusual — a production app that needs `'unsafe-inline'` /\n * `'unsafe-eval'` is almost always a sign of a misconfigured asset\n * pipeline).\n */\n viteDevLoosening: z.boolean().optional(),\n /**\n * Env-layer override of the app-static `reportOnly` flag. When\n * present (not `undefined`), takes precedence over the app-static\n * value. Common shape: app-static ships `reportOnly: false`\n * (enforcing in prod), env-layer flips to `reportOnly: true` for\n * staging while the violation collector ramps up.\n */\n reportOnly: z.boolean().optional(),\n /**\n * Env-layer override of the app-static `reportUri` (e.g., per-env\n * collector endpoint).\n */\n reportUri: z.string().min(1).optional(),\n});\nexport type EnvCspOverride = z.infer<typeof EnvCspOverrideSchema>;\nexport type EnvCspOverrideInput = z.input<typeof EnvCspOverrideSchema>;\n"]}
1
+ {"version":3,"file":"csp.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/csp.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,aAAa;IACb,YAAY;IACZ,WAAW;IAC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;;;;;;;;OAQG;IACH,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAKH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IACjD;;;;;OAKG;IACH,eAAe,EAAE,2BAA2B,CAAC,OAAO,CAAC,EAAE,CAAC;IACxD;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACxC;;;;;;OAMG;IACH,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC;;;;;OAKG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACvC,2FAA2F;IAC3F,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC","sourcesContent":["/**\n * Content-Security-Policy authoring schema for per-frontend opt-in.\n *\n * # Where this fits in the layered CSP cake\n *\n * 1. Platform default — `./csp-defaults.ts` ships per-`AppFrontendType`\n * baselines (`SAAS_APP`, `STATIC_WEBSITE`, `TECH_DOC`). The baseline\n * is opinionated but conservative: `default-src 'self'` plus the\n * narrowest set of relaxations each frontend kind genuinely needs\n * to render (e.g., Docusaurus 3.x's `'unsafe-inline'` script /\n * style requirement for `TECH_DOC`).\n * 2. App-static — this `WildoCspConfigSchema`, authored on each\n * service-definition's `csp?` field. `SAAS_APP` authors this on\n * `wildo.saas.config.ts > services.<key>.csp`; `STATIC_WEBSITE` authors\n * it on `wildo.website.config.ts`; `TECH_DOC` authors it on\n * `wildo.tech-doc.config.ts`.\n * 3. Env-specific — `EnvCspOverrideSchema` below, authored under\n * `wildo.infra.<env>.config.ts.csp?[serviceKey]`. `WildoInfraEnvConfigSchema`\n * declares that field, so the layer is live. Its build-time consumer is\n * `wildo dev sync-csp`, which reads `parsed.csp[serviceKey]` when emitting\n * generated frontend CSP artifacts.\n * 4. Declared providers — NOT authored here at all (#332). Each frontend\n * provider declares the origins it needs to reach on its own module, that\n * footprint travels as data into the materialized frontend-services\n * artifact, and `resolveCspPolicy` merges the footprints of the providers\n * declared FOR THIS SERVICE. Layers 1–3 say what the application decided;\n * layer 4 says what the things it declared actually need in order to work,\n * which is why it is additive even under `replace-baseline`.\n *\n * # Resolution semantics (consumed by `platform-config-lib/src/project-config/shared/csp-emit.ts`)\n *\n * - `enabled: false` (default) => no policy emitted; the resolver\n * returns `null` and both nginx + meta channels stay silent. The\n * opt-in shape (vs opt-out) is deliberate — frontends that have not\n * audited their third-party surface should not ship a half-baked\n * CSP that breaks features without protecting anything.\n * - `enabled: true` with no `directives` override => baseline emitted\n * verbatim (see `./csp-defaults.ts`).\n * - `enabled: true` with `directives` AND `mergeStrategy: 'extend-baseline'`\n * (default) => per-directive ADDITIVE merge: each authored source\n * list is concatenated to the baseline's source list for that\n * directive (de-duplicated, baseline order preserved, app sources\n * appended in author order). Directives the baseline doesn't ship\n * are added wholesale.\n * - `enabled: true` with `mergeStrategy: 'replace-baseline'` =>\n * authored `directives` map REPLACES the baseline entirely; missing\n * directives are simply absent from the policy. Use only when the\n * baseline is fundamentally wrong for the surface (e.g., a\n * `STATIC_WEBSITE` that actually serves an embedded SaaS app and\n * wants the tighter `SAAS_APP`-style policy from scratch). The\n * escape hatch exists; the merge default exists for the common\n * case (additive tightening / loosening).\n * - `reportOnly: true` => header name flips to\n * `Content-Security-Policy-Report-Only` AND the `<meta http-equiv>`\n * channel goes silent (browsers reject the report-only header via\n * meta — W3C CSP3 §4.2.1). `reportOnly: false` (default once the\n * pilot triages clean) emits the enforcing header AND the meta\n * tag (with header-only directives stripped from the meta tag —\n * see `META_INVALID_DIRECTIVES` in `csp-emit.ts`).\n * - `reportUri` / `reportTo` => where the browser reports violations\n * (#2867). Header-only (the meta tag would ignore them); the resolver\n * feeds them to the header channels only. When NEITHER is authored at\n * any layer, the policy names the platform collector every application\n * backend serves (`CSP_PLATFORM_VIOLATION_COLLECTOR` in\n * `./csp-defaults.ts`) through both. Authoring either one replaces the\n * platform collector on both mechanisms, because a browser that sees\n * `report-to` ignores `report-uri` (CSP Level 3 §5.5) and a split\n * destination would send each browser's reports to a different place.\n *\n * # Why the `directives` keys are an explicit closed set vs a free-form `Record<string, ...>`\n *\n * CSP grew organically over a decade and a half. The closed set below\n * (`default-src` / `script-src` / `style-src` / `img-src` / `connect-src`\n * / `font-src` / `frame-src` / `frame-ancestors` / `object-src` /\n * `form-action` / `base-uri` / `manifest-src` / `media-src` / `worker-src`)\n * covers every directive the platform's three frontend kinds genuinely\n * use today. Forcing authors to spell directive names through the schema\n * surface (vs `Record<string, string[]>`) catches typos at parse time\n * (`script-source` !== `script-src`) and gives IDE autocompletion. Adding\n * a new directive is a one-line schema edit when a real consumer asks\n * for it; meanwhile the default-deny stance prevents authors from\n * accidentally shipping a directive name the browser silently ignores.\n *\n * # Author-friendly source lists\n *\n * Each directive's value is `string[]`. The resolver does NOT validate\n * the contents of the source list (that would require importing a CSP\n * grammar — out of scope for this commit). Common shapes:\n *\n * - `\"'self'\"` — single-quoted keyword, MUST keep the quotes.\n * - `'data:'`, `'blob:'` — scheme sources.\n * - `'https://api.example.com'` — origin source.\n * - `\"'unsafe-inline'\"`, `\"'unsafe-eval'\"` — single-quoted keywords.\n * - `\"'nonce-<base64>'\"` — nonce keyword (rendered per-request).\n * - `\"'sha256-<hash>'\"` — hash keyword.\n *\n * The `csp-emit.ts` serializer joins source lists with single spaces\n * and separates directives with `; ` (no leading/trailing semicolon —\n * matches Mozilla / OWASP recommended whitespace).\n */\n\nimport { z } from 'zod';\n\n/**\n * Closed set of directive names we accept on the `csp.directives`\n * authoring map. Adding a new directive name requires:\n *\n * 1. Adding the literal here.\n * 2. Updating any per-`AppFrontendType` baseline that should ship the\n * directive by default in `./csp-defaults.ts`.\n * 3. Verifying the `csp-emit.ts` serializer handles the directive\n * (it does — the serializer is generic over directive names — so\n * step 3 is usually a no-op).\n *\n * The `META_INVALID_DIRECTIVES` set in `csp-emit.ts` lists the\n * directives the browser ignores when emitted via `<meta http-equiv>`\n * (`frame-ancestors`, `report-uri`, `report-to`, `sandbox`); they're\n * stripped from the meta-channel output but remain on the nginx\n * channel. Keep that set in sync if a new header-only directive lands\n * here.\n */\nexport const CSP_DIRECTIVE_NAMES = [\n 'default-src',\n 'script-src',\n 'style-src',\n 'img-src',\n 'connect-src',\n 'font-src',\n 'frame-src',\n 'frame-ancestors',\n 'object-src',\n 'form-action',\n 'base-uri',\n 'manifest-src',\n 'media-src',\n 'worker-src',\n] as const;\n\nexport type CspDirectiveName = (typeof CSP_DIRECTIVE_NAMES)[number];\n\n/**\n * Author-side merge strategy for the app-static layer over the baseline.\n *\n * - `'extend-baseline'` (default) — per-directive ADDITIVE merge:\n * each authored source list is APPENDED to the baseline source\n * list for that directive. Directives the baseline doesn't ship\n * are added wholesale. Common case: an app needs to add ONE extra\n * `connect-src` origin without re-authoring the rest of the policy.\n * - `'replace-baseline'` — authored `directives` map REPLACES the\n * baseline entirely. Use when the baseline is fundamentally wrong\n * for the surface (e.g., a tighter or fundamentally different\n * posture). Escape hatch — the merge default is the right answer\n * in 95% of cases.\n */\nexport enum CspMergeStrategy {\n EXTEND_BASELINE = 'extend-baseline',\n REPLACE_BASELINE = 'replace-baseline',\n}\n\n/**\n * Author-side directive overrides — partial map keyed by the closed\n * directive-name set above. Each value is a source list of strings\n * (joined with single spaces by the serializer).\n *\n * Authoring `directives: { 'connect-src': ['https://api.example.com'] }`\n * with the default `'extend-baseline'` strategy APPENDS that origin to\n * the baseline `connect-src` source list (which already contains\n * `'self'` for every baseline) — it does NOT replace the baseline's\n * `connect-src`. Use `mergeStrategy: 'replace-baseline'` to opt out of\n * additive merging.\n */\nexport const CspDirectivesOverrideSchema = z.strictObject(\n Object.fromEntries(\n CSP_DIRECTIVE_NAMES.map((name) => [\n name,\n z.array(z.string().min(1)).optional(),\n ]),\n ) as Record<CspDirectiveName, z.ZodOptional<z.ZodArray<z.ZodString>>>,\n);\nexport type CspDirectivesOverride = z.infer<typeof CspDirectivesOverrideSchema>;\n\n/**\n * @wildo_source:part:start saas.config.content-security-policy facet:layer:shared facet:audience:app-developer\n *\n * Declaring a Content-Security-Policy for one of the application's frontends.\n *\n * ⚠️ **Every browser surface ships a policy; what differs is what happens when you author none.** On\n * the application (`services.<key>.csp`) an omitted block resolves at sync to `enabled: true,\n * reportOnly: true` — a policy that reports violations and blocks nothing. A website or technical-doc\n * config with no block is refused at sync, naming the file. A policy that resolves DISABLED is refused\n * on every surface, so `enabled: false` cannot switch the header off.\n *\n * ## The generated file is the only one read\n *\n * Author the static posture here, add per-environment entries under `csp.<serviceKey>` in that\n * environment's infrastructure configuration, then run `wildo dev sync-csp --env <env>` (starting\n * development runs it for you). Each surface reads ONLY the generated artifact — hand-editing a\n * surface's own policy file changes nothing and is overwritten on the next sync.\n *\n * ## `reportOnly` is a posture, not a formality\n *\n * `reportOnly: true` emits the report-only header: the browser reports violations and BLOCKS\n * NOTHING. Flipping it is one field.\n *\n * ## Where violations are reported\n *\n * Every application backend serves a violation collector, and with nothing authored here the policy\n * names it: `report-uri` (one request per violation) and `report-to` with a `Reporting-Endpoints`\n * header (batched reports, the mechanism current browsers prefer). The collector counts each report\n * by directive in the backend's metrics and logs a sample — it is observability, not an audit trail.\n * Read those before flipping `reportOnly`: a report-only policy that reports nothing has not been\n * shown to be safe to enforce.\n *\n * Author `reportUri` and/or `reportTo` only to send reports to a collector of your own. Either one\n * replaces the platform collector on BOTH mechanisms, so name both when your collector accepts both.\n *\n * Nonces and hashes are not generated per request or at build time. A source list may name one by\n * hand, but there is no generation, which is why a baseline that must admit inline script still does.\n *\n * Per-frontend CSP block. Authored on each service-definition's `csp?`\n * field. All three surfaces carry it: `wildo.tech-doc.config.ts.csp?`,\n * `wildo.website.config.ts.csp?`, and `services.<key>.csp` on the\n * `SAAS_APP` service definition.\n *\n * An AUTHORED block that omits `enabled` parses as `enabled: false`, which the resolver turns into no\n * policy and the sync then refuses — so author `enabled: true` explicitly whenever you write a block.\n *\n * `z.strictObject` (Zod 4) is intentional — typos like `enable: true`\n * (no `d`) or `directive: { … }` (no plural) MUST surface as parse\n * errors, not silently strip to `enabled: false` (i.e. CSP off, the\n * worst possible default). Same framework-mindset enforcement as\n * `WildoAuthConfigSchema`.\n */\nexport const WildoCspConfigSchema = z.strictObject({\n /**\n * `true` => baseline (+ overrides) emitted on both channels per `reportOnly`.\n * `false` — also the parse default for an authored block — makes the resolver return `null`, and\n * `wildo dev sync-csp` refuses that for every CSP-capable surface. It is not a way to turn the\n * header off.\n */\n enabled: z.boolean().default(false),\n /**\n * `true` => header name flips to `Content-Security-Policy-Report-Only`\n * AND the `<meta http-equiv>` channel goes silent (browsers reject the\n * report-only header via meta — W3C CSP3 §4.2.1). Use during the\n * pilot to triage console-surfaced violations without breaking real\n * traffic. Flip to `false` once the directive overrides settle.\n *\n * Default: `false` (enforcing). Authors opting into CSP for the first\n * time SHOULD set `reportOnly: true` for the first PR; the schema\n * default is intentionally enforcing so the steady state (post-pilot)\n * doesn't require a per-app authored `reportOnly: false`.\n */\n reportOnly: z.boolean().default(false),\n /**\n * Merge strategy for authored `directives` over the baseline. Default:\n * `'extend-baseline'` (per-directive additive merge — see\n * `CspMergeStrategy`).\n */\n mergeStrategy: z\n .enum(CspMergeStrategy)\n .default(CspMergeStrategy.EXTEND_BASELINE),\n /**\n * Per-directive overrides, keyed by directive name. Default: empty\n * map (baseline emitted verbatim).\n */\n directives: CspDirectivesOverrideSchema.default({}),\n /**\n * Your own collector for the `report-uri` mechanism: one POST per violation, as\n * `application/csp-report`. Header-only (the meta tag ignores it). Omit both this and\n * `reportTo` to use the platform collector the application backend serves.\n */\n reportUri: z.string().min(1).optional(),\n /**\n * Your own collector for the Reporting API mechanism: batched reports as\n * `application/reports+json`, sent with CORS from the page's origin. The policy names it\n * through `report-to` and a `Reporting-Endpoints` header. An absolute URL that browsers treat\n * as trustworthy: `https://…`, or `http://localhost…` in development; any other URL is ignored\n * by the browser. Omit both this and `reportUri` to use the platform collector.\n *\n * spec-cite: Reporting API (W3C Working Draft, 11 June 2025) §3.2 (an endpoint URL that is not potentially trustworthy is ignored) — https://www.w3.org/TR/reporting-1/\n */\n reportTo: z.url().optional(),\n});\n/** @wildo_source:part:end saas.config.content-security-policy */\nexport type WildoCspConfig = z.infer<typeof WildoCspConfigSchema>;\nexport type WildoCspConfigInput = z.input<typeof WildoCspConfigSchema>;\n\n/**\n * Env-specific overrides — authored under\n * `wildo.infra.<env>.config.ts.csp?[serviceKey]`. The loader merges\n * these on top of the app-static layer (which itself is on top of the\n * baseline).\n *\n * `WildoInfraEnvConfigSchema` declares `csp` as a record of these,\n * keyed by service key, and the resolver in `csp-emit.ts` consumes it.\n *\n * `extraDirectives` is ADDITIVE only — env-layer entries are APPENDED\n * to whatever the app-static layer produced for that directive. There\n * is no `'replace-baseline'`-equivalent at the env layer because env\n * config exists to LOOSEN policies for specific deployments (Sentry\n * origin in staging, dev hot-reload `'unsafe-eval'`), not to replace\n * an app's chosen posture. If an env genuinely needs a different\n * posture the right answer is to fix the app-static layer.\n */\nexport const EnvCspOverrideSchema = z.strictObject({\n /**\n * Per-directive ADDITIVE merge. Each entry's source list is\n * APPENDED to the app-static layer's source list for that directive\n * (de-duplicated, app order preserved, env sources appended in\n * author order). No replace semantics at this layer.\n */\n extraDirectives: CspDirectivesOverrideSchema.default({}),\n /**\n * Vite dev-mode CSP loosening: adds BOTH `'unsafe-inline'` and\n * `'unsafe-eval'` to `script-src`. Vite's dev server injects an\n * inline `<script>` for the HMR client bootstrap AND uses `eval()`\n * for lazy module / sourcemap transforms — both block under a strict\n * `script-src 'self'` policy and produce ~120+ CSP violations per\n * page load. Production Vite builds emit `<script type=\"module\">`\n * only and use no `eval()`, so this loosening is dev-only by design.\n *\n * AUTO-DEFAULT: `true` when the resolved env id is `'local'` AND the\n * frontend type is `SAAS_APP` (the only Vite-bundled frontend kind in\n * the framework). The framework applies the loosening automatically so\n * every Wildo app gets a clean dev console without per-app\n * configuration; opting in app-by-app would scatter the same\n * framework-shipped Vite knowledge across N infrastructure files.\n *\n * EXPLICIT OPT-OUT: set to `false` to keep tight `script-src` in\n * local dev. Useful only when actively debugging a real CSP issue\n * and willing to accept Vite-induced noise. Production envs ignore\n * this flag's auto-default and require explicit opt-in (extremely\n * unusual — a production app that needs `'unsafe-inline'` /\n * `'unsafe-eval'` is almost always a sign of a misconfigured asset\n * pipeline).\n */\n viteDevLoosening: z.boolean().optional(),\n /**\n * Env-layer override of the app-static `reportOnly` flag. When\n * present (not `undefined`), takes precedence over the app-static\n * value. Common shape: app-static ships `reportOnly: false`\n * (enforcing in prod), env-layer flips to `reportOnly: true` for\n * staging while the violation collector ramps up.\n */\n reportOnly: z.boolean().optional(),\n /**\n * Env-layer override of the app-static `reportUri` (e.g., per-env\n * collector endpoint). Like the app-static field, authoring it (or\n * `reportTo`) at any layer replaces the platform collector on both\n * mechanisms.\n */\n reportUri: z.string().min(1).optional(),\n /** Env-layer override of the app-static `reportTo` (a per-env Reporting API collector). */\n reportTo: z.url().optional(),\n});\nexport type EnvCspOverride = z.infer<typeof EnvCspOverrideSchema>;\nexport type EnvCspOverrideInput = z.input<typeof EnvCspOverrideSchema>;\n"]}
@@ -39,14 +39,6 @@ export declare const AppDataServicesSchema: z.ZodObject<{
39
39
  mongodb: z.ZodOptional<z.ZodObject<{
40
40
  databasePrefix: z.ZodString;
41
41
  }, z.core.$strict>>;
42
- /**
43
- * Slice 3 deep-review M-7 (2026-04-13): per-service inner blocks are
44
- * `z.strictObject` so a typoed authoring (e.g. `redis: { keyPrefxi: ... }`,
45
- * `s3: { bucektPrefix: ... }`) is rejected at parse time rather than
46
- * silently stripped — which would otherwise produce an app `.env` with no
47
- * `REDIS_KEY_PREFIX` / `STORAGE_BUCKET_PREFIX` and downstream consumers
48
- * falling back to defaults without warning.
49
- */
50
42
  redis: z.ZodOptional<z.ZodObject<{
51
43
  keyPrefix: z.ZodString;
52
44
  }, z.core.$strict>>;
@@ -1 +1 @@
1
- {"version":3,"file":"data-services.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/data-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,qBAAqB;;;;IAEhC;;;;;;;OAOG;;;;;;;;;;kBAQH,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,eAAe,GAAG,SAAS,GACxC,MAAM,GAAG,SAAS,CAsBpB"}
1
+ {"version":3,"file":"data-services.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/data-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;kBAiBhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,eAAe,GAAG,SAAS,GACxC,MAAM,GAAG,SAAS,CAsBpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"data-services.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/data-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,8BAA8B,GAAG,CAAC,CAAC,YAAY,CAAC;IACpD,cAAc,EAAE,CA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;IACJ,CAAC;IAED,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["import { z } from 'zod';\n\nconst AppDatabaseBackedServiceSchema = z.strictObject({\n databasePrefix: z.string().min(1),\n});\n\n/**\n * App-level data service configuration.\n *\n * Declares how the app uses each backing service. Each block is OPTIONAL and\n * carries a single semantic responsibility:\n *\n * - `mongodb.databasePrefix` / `postgresql.databasePrefix` — feed\n * `deriveAppDatabaseName(...)` to compute the canonical app database name\n * surfaced as `MONGODB_DATABASE` in the per-app `.env`.\n * - `redis.keyPrefix` — emitted as `REDIS_KEY_PREFIX` in the app `.env` and\n * consumed by `RedisService` as the canonical app-level key namespace\n * (replaces the legacy username-derived `appPrefix`). All keys written by\n * the app become `${keyPrefix}org:${orgId}:${key}` or `${keyPrefix}global:${key}`.\n * - `s3.bucketPrefix` — emitted as `STORAGE_BUCKET_PREFIX` in the app `.env`\n * and consumed by `WildoManagedStorageProvider`, prepended to every\n * application object key (extra layer above the existing `applicationId`\n * namespace). The actual MinIO bucket name remains infra-controlled via\n * `STORAGE_BUCKET`.\n *\n * Slice 3.6 audit decisions (2026-04-13):\n * - DELETED the (formerly authored) `rabbitmq.vhost` field. Vhost is an\n * infra/topology concern already authored on the infra side via\n * `wildo.infra.<env>.config.ts > backingServices.rabbitmq.vhost` (Slice\n * 3.2). Authoring it on both seams would silently desync (last writer\n * wins) and would conflict with the framework-mindset rule of one source\n * of truth per concept. A strict-rejection test pins this deletion so any\n * re-introduction surfaces as a parse error rather than a silent strip.\n * - REPLACE semantics for `redis.keyPrefix`: the new env-driven prefix\n * becomes the canonical app namespace; the legacy\n * `secrets.database.redis.username`-derived prefix is retired.\n * - PREPEND semantics for `s3.bucketPrefix`: object keys become\n * `${bucketPrefix}/${applicationId}/...` rather than modifying the bucket\n * name itself (which would be an infra concern, not an app concern).\n *\n * Used in `wildo.saas.config.ts`.\n */\nexport const AppDataServicesSchema = z.strictObject({\n mongodb: AppDatabaseBackedServiceSchema.optional(),\n /**\n * Slice 3 deep-review M-7 (2026-04-13): per-service inner blocks are\n * `z.strictObject` so a typoed authoring (e.g. `redis: { keyPrefxi: ... }`,\n * `s3: { bucektPrefix: ... }`) is rejected at parse time rather than\n * silently stripped — which would otherwise produce an app `.env` with no\n * `REDIS_KEY_PREFIX` / `STORAGE_BUCKET_PREFIX` and downstream consumers\n * falling back to defaults without warning.\n */\n redis: z.strictObject({\n keyPrefix: z.string().min(1),\n }).optional(),\n s3: z.strictObject({\n bucketPrefix: z.string().min(1),\n }).optional(),\n postgresql: AppDatabaseBackedServiceSchema.optional(),\n});\nexport type AppDataServices = z.infer<typeof AppDataServicesSchema>;\n\n/**\n * Resolve the canonical application database name across supported database engines.\n *\n * Framework semantics treat the application database name as a cross-engine concept,\n * not a MongoDB-only field. When multiple database engines are configured, they must\n * agree on the same prefix or the runtime target would become ambiguous.\n */\nexport function deriveAppDatabaseName(\n dataServices: AppDataServices | undefined,\n): string | undefined {\n if (!dataServices) {\n return undefined;\n }\n\n const configuredPrefixes = [\n dataServices.mongodb?.databasePrefix,\n dataServices.postgresql?.databasePrefix,\n ].filter((value): value is string => value !== undefined);\n\n const uniquePrefixes = [...new Set(configuredPrefixes)];\n if (uniquePrefixes.length === 0) {\n return undefined;\n }\n\n if (uniquePrefixes.length > 1) {\n throw new Error(\n `Application database prefixes must match across configured database engines. Received: ${uniquePrefixes.join(', ')}`,\n );\n }\n\n return uniquePrefixes[0];\n}\n"]}
1
+ {"version":3,"file":"data-services.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/data-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,8BAA8B,GAAG,CAAC,CAAC,YAAY,CAAC;IACpD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAClC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G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.strictObject({\n databasePrefix: z.string().min(1),\n});\n\n/**\n * App-level data service configuration.\n *\n * Declares how the app uses each backing service. Each block is OPTIONAL and\n * carries a single semantic responsibility:\n *\n * - `mongodb.databasePrefix` / `postgresql.databasePrefix` — feed\n * `deriveAppDatabaseName(...)` to compute the canonical app database name\n * surfaced as `MONGODB_DATABASE` in the per-app `.env`.\n * - `redis.keyPrefix` — emitted as `REDIS_KEY_PREFIX` in the app `.env` and\n * consumed by `RedisService` as the canonical app-level key namespace\n * (replaces the legacy username-derived `appPrefix`). All keys written by\n * the app become `${keyPrefix}org:${orgId}:${key}` or `${keyPrefix}global:${key}`.\n * - `s3.bucketPrefix` — emitted as `STORAGE_BUCKET_PREFIX` in the app `.env`\n * and consumed by `WildoManagedStorageProvider`, prepended to every\n * application object key (extra layer above the existing `applicationId`\n * namespace). The actual MinIO bucket name remains infra-controlled via\n * `STORAGE_BUCKET`.\n *\n * Slice 3.6 audit decisions (2026-04-13):\n * - DELETED the (formerly authored) `rabbitmq.vhost` field. Vhost is an\n * infra/topology concern already authored on the infra side via\n * `wildo.infra.<env>.config.ts > backingServices.rabbitmq.vhost` (Slice\n * 3.2). Authoring it on both seams would silently desync (last writer\n * wins) and would conflict with the framework-mindset rule of one source\n * of truth per concept. A strict-rejection test pins this deletion so any\n * re-introduction surfaces as a parse error rather than a silent strip.\n * - REPLACE semantics for `redis.keyPrefix`: the new env-driven prefix\n * becomes the canonical app namespace; the legacy\n * `secrets.database.redis.username`-derived prefix is retired.\n * - PREPEND semantics for `s3.bucketPrefix`: object keys become\n * `${bucketPrefix}/${applicationId}/...` rather than modifying the bucket\n * name itself (which would be an infra concern, not an app concern).\n *\n * Used in `wildo.saas.config.ts`.\n */\nexport const AppDataServicesSchema = z.strictObject({\n mongodb: AppDatabaseBackedServiceSchema.optional(),\n /**\n * Slice 3 deep-review M-7 (2026-04-13): per-service inner blocks are\n * `z.strictObject` so a typoed authoring (e.g. `redis: { keyPrefxi: ... }`,\n * `s3: { bucektPrefix: ... }`) is rejected at parse time rather than\n * silently stripped — which would otherwise produce an app `.env` with no\n * `REDIS_KEY_PREFIX` / `STORAGE_BUCKET_PREFIX` and downstream consumers\n * falling back to defaults without warning.\n */\n redis: z.strictObject({\n keyPrefix: z.string().min(1),\n }).optional(),\n s3: z.strictObject({\n bucketPrefix: z.string().min(1),\n }).optional(),\n postgresql: AppDatabaseBackedServiceSchema.optional(),\n});\nexport type AppDataServices = z.infer<typeof AppDataServicesSchema>;\n\n/**\n * Resolve the canonical application database name across supported database engines.\n *\n * Framework semantics treat the application database name as a cross-engine concept,\n * not a MongoDB-only field. When multiple database engines are configured, they must\n * agree on the same prefix or the runtime target would become ambiguous.\n */\nexport function deriveAppDatabaseName(\n dataServices: AppDataServices | undefined,\n): string | undefined {\n if (!dataServices) {\n return undefined;\n }\n\n const configuredPrefixes = [\n dataServices.mongodb?.databasePrefix,\n dataServices.postgresql?.databasePrefix,\n ].filter((value): value is string => value !== undefined);\n\n const uniquePrefixes = [...new Set(configuredPrefixes)];\n if (uniquePrefixes.length === 0) {\n return undefined;\n }\n\n if (uniquePrefixes.length > 1) {\n throw new Error(\n `Application database prefixes must match across configured database engines. Received: ${uniquePrefixes.join(', ')}`,\n );\n }\n\n return uniquePrefixes[0];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"env-example-defaults.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/env-example-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,2BAA2B;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,mCAAmC,EAAE,MAAM,CAAC;IAC5C,yBAAyB,EAAE,MAAM,CAAC;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,qCAAqC,EAAE,MAAM,CAAC;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,GAC/C,2BAA2B,CAiB7B"}
1
+ {"version":3,"file":"env-example-defaults.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/env-example-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,2BAA2B;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,mCAAmC,EAAE,MAAM,CAAC;IAC5C,yBAAyB,EAAE,MAAM,CAAC;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,qCAAqC,EAAE,MAAM,CAAC;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,GAC/C,2BAA2B,CAiB7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"env-example-defaults.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/env-example-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAkBhG;;;;GAIG;AACH,MAAM,UAAU,iCAAiC,CAC/C,SAAgD;IAEhD,OAAO;QACL,cAAc,EAAE,2BAA2B;QAC3C,mCAAmC,EAAE,+DAA+D;QACpG,yBAAyB,EAAE,oBAAoB,sBAAsB,CAAC,YAAY,EAAE;QACpF,eAAe,EAAE,aAAa;QAC9B,YAAY,EAAE,mBAAmB;QACjC,qCAAqC,EAAE,oBAAoB,sBAAsB,CAAC,wBAAwB,EAAE;QAC5G,YAAY,EAAE,aAAa,mBAAmB,CAAC,OAAO,EAAE;QACxD,gBAAgB,EAAE,WAAW;QAC7B,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,WAAW;QACvB,UAAU,EAAE,mBAAmB,CAAC,MAAM;QACtC,aAAa,EAAE,WAAW;QAC1B,aAAa,EAAE,mBAAmB,CAAC,QAAQ;QAC3C,GAAG,SAAS;KACb,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Default context values for the app-backend-env.example.hbs template.\n * Provides fake/placeholder data derived from infrastructure defaults.\n */\n\nimport { INFRA_DEFAULT_PORTS, PLATFORM_DEFAULT_PORTS } from './infrastructure-defaults.schemas';\n\nexport interface AppBackendEnvExampleContext {\n APPLICATION_ID: string;\n PLATFORM_APPLICATION_PRIMARY_SECRET: string;\n PLATFORM_APPS_MANAGER_URL: string;\n APPLICATION_ENV: string;\n SERVICE_NAME: string;\n PLATFORM_CRONTABS_BATCHES_MANAGER_URL: string;\n MONGODB_HOST: string;\n MONGODB_DATABASE: string;\n MONGODB_PROTOCOL: string;\n REDIS_HOST: string;\n REDIS_PORT: number;\n RABBITMQ_HOST: string;\n RABBITMQ_PORT: number;\n}\n\n/**\n * Build the default template context for the app backend .env example.\n * All values are placeholder/local defaults — real values come from\n * secrets.json + config.json via `wildo config sync`.\n */\nexport function buildAppBackendEnvExampleDefaults(\n overrides?: Partial<AppBackendEnvExampleContext>,\n): AppBackendEnvExampleContext {\n return {\n APPLICATION_ID: 'your-app-id-from-platform',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'your-super-secure-platform-secret-at-least-32-characters-long',\n PLATFORM_APPS_MANAGER_URL: `http://localhost:${PLATFORM_DEFAULT_PORTS.APPS_MANAGER}`,\n APPLICATION_ENV: 'development',\n SERVICE_NAME: 'your-service-name',\n PLATFORM_CRONTABS_BATCHES_MANAGER_URL: `http://localhost:${PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER}`,\n MONGODB_HOST: `localhost:${INFRA_DEFAULT_PORTS.MONGODB}`,\n MONGODB_DATABASE: 'wildo_app',\n MONGODB_PROTOCOL: 'mongodb',\n REDIS_HOST: 'localhost',\n REDIS_PORT: INFRA_DEFAULT_PORTS.VALKEY,\n RABBITMQ_HOST: 'localhost',\n RABBITMQ_PORT: INFRA_DEFAULT_PORTS.RABBITMQ,\n ...overrides,\n };\n}\n"]}
1
+ {"version":3,"file":"env-example-defaults.js","sourceRoot":"","sources":["../../../../src/project-config/shared/env-example-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAkBhG;;;;GAIG;AACH,MAAM,UAAU,iCAAiC,CAC/C,SAAgD;IAEhD,OAAO;QACL,cAAc,EAAE,2BAA2B;QAC3C,mCAAmC,EAAE,+DAA+D;QACpG,yBAAyB,EAAE,oBAAoB,sBAAsB,CAAC,YAAY,EAAE;QACpF,eAAe,EAAE,aAAa;QAC9B,YAAY,EAAE,mBAAmB;QACjC,qCAAqC,EAAE,oBAAoB,sBAAsB,CAAC,wBAAwB,EAAE;QAC5G,YAAY,EAAE,aAAa,mBAAmB,CAAC,OAAO,EAAE;QACxD,gBAAgB,EAAE,WAAW;QAC7B,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,WAAW;QACvB,UAAU,EAAE,mBAAmB,CAAC,MAAM;QACtC,aAAa,EAAE,WAAW;QAC1B,aAAa,EAAE,mBAAmB,CAAC,QAAQ;QAC3C,GAAG,SAAS;KACb,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Default context values for the app-backend-env.example.hbs template.\n * Provides fake/placeholder data derived from infrastructure defaults.\n */\n\nimport { INFRA_DEFAULT_PORTS, PLATFORM_DEFAULT_PORTS } from './infrastructure-defaults.schemas';\n\nexport interface AppBackendEnvExampleContext {\n APPLICATION_ID: string;\n PLATFORM_APPLICATION_PRIMARY_SECRET: string;\n PLATFORM_APPS_MANAGER_URL: string;\n APPLICATION_ENV: string;\n SERVICE_NAME: string;\n PLATFORM_CRONTABS_BATCHES_MANAGER_URL: string;\n MONGODB_HOST: string;\n MONGODB_DATABASE: string;\n MONGODB_PROTOCOL: string;\n REDIS_HOST: string;\n REDIS_PORT: number;\n RABBITMQ_HOST: string;\n RABBITMQ_PORT: number;\n}\n\n/**\n * Build the default template context for the app backend .env example.\n * All values are placeholder/local defaults — real values come from\n * secrets.json + config.json via `wildo config sync`.\n */\nexport function buildAppBackendEnvExampleDefaults(\n overrides?: Partial<AppBackendEnvExampleContext>,\n): AppBackendEnvExampleContext {\n return {\n APPLICATION_ID: 'your-app-id-from-platform',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'your-super-secure-platform-secret-at-least-32-characters-long',\n PLATFORM_APPS_MANAGER_URL: `http://localhost:${PLATFORM_DEFAULT_PORTS.APPS_MANAGER}`,\n APPLICATION_ENV: 'development',\n SERVICE_NAME: 'your-service-name',\n PLATFORM_CRONTABS_BATCHES_MANAGER_URL: `http://localhost:${PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER}`,\n MONGODB_HOST: `localhost:${INFRA_DEFAULT_PORTS.MONGODB}`,\n MONGODB_DATABASE: 'wildo_app',\n MONGODB_PROTOCOL: 'mongodb',\n REDIS_HOST: 'localhost',\n REDIS_PORT: INFRA_DEFAULT_PORTS.VALKEY,\n RABBITMQ_HOST: 'localhost',\n RABBITMQ_PORT: INFRA_DEFAULT_PORTS.RABBITMQ,\n ...overrides,\n };\n}\n"]}
@@ -87,6 +87,91 @@ export declare enum WildoLocalDataStorage {
87
87
  * branch happened to be the `else`.
88
88
  */
89
89
  export declare function resolveDefaultLocalDataStorage(locationType: WildoLocationType): WildoLocalDataStorage;
90
+ /**
91
+ * Which set of OPTIONAL backing services an environment runs — the deployment footprint (#2303).
92
+ *
93
+ * An environment always runs the services the platform cannot live without (a database, a cache, a
94
+ * broker, an object store). On top of those, the full platform runs three services that each back ONE
95
+ * engine capability: ClamAV (antivirus scanning of uploaded files), immudb (the tamper-evident audit
96
+ * store) and mongot (MongoDB Search / Vector Search). A small internal tool for one team rarely needs any
97
+ * of them, and they are the heaviest containers in the stack (mongot alone is a JVM holding Lucene
98
+ * indexes). A profile states, per environment, whether they run at all.
99
+ *
100
+ * ## Named "service profile", not "runtime profile"
101
+ *
102
+ * `ApplicationRuntimeProfile` (`@wildo-ai/saas-backend-lib`) already names WHICH RUNTIME boots the
103
+ * application lifecycle (the backend or a minion). This vocabulary answers a different question, about
104
+ * the ENVIRONMENT's footprint, and must not be confused with it.
105
+ *
106
+ * ## What a profile does NOT do
107
+ *
108
+ * It never degrades a capability in silence. Each capability that depends on a service the profile omits
109
+ * is REFUSED at the application's boot when the application declares it, by a message naming the profile
110
+ * and the remedy (`describeServiceOmittedByEnvironmentServiceProfile`). And a declaration that would run
111
+ * an omitted service (`backingServices.clamav: { source: SELF }` under `SMALL`) is refused when the
112
+ * environment descriptor is parsed: the two statements contradict each other.
113
+ *
114
+ * ## One database family
115
+ *
116
+ * `SMALL` also runs ONE database family (`environmentServiceProfileRunsOneDatabaseFamily`): the platform's store and
117
+ * the application's are the same engine, and only that store is declared. Which engine is the author's choice (both a
118
+ * MongoDB and a PostgreSQL environment run in one family); the descriptor derives the families it runs from what it
119
+ * declares and refuses two, naming the declarations that bring each.
120
+ *
121
+ * ## Lanes
122
+ *
123
+ * Both lanes render a profile: the Docker Compose generator, and the Kubernetes manifests (workloads, the mongod
124
+ * routing parameters, secrets, persistent volumes and readiness) since #2303's second slice.
125
+ *
126
+ * ## What it does not change yet
127
+ *
128
+ * The broker. RabbitMQ stays a platform dependency under every profile: the platform scheduler publishes onto the
129
+ * application's queue from another process, and no durable queue runs on the cache or the database
130
+ * (`QueueAdapterType.MEMORY` is in-process only). Tracked by #2303.
131
+ */
132
+ export declare enum EnvironmentServiceProfile {
133
+ /** Every service the environment's declarations ask for. The default when nothing is authored. */
134
+ FULL = "full",
135
+ /**
136
+ * The footprint for a small deployment: no ClamAV, no immudb, no mongot
137
+ * ({@link servicesOmittedByEnvironmentServiceProfile}). Vector search remains available on PostgreSQL
138
+ * (pgvector is part of the PostgreSQL image, not a separate service).
139
+ */
140
+ SMALL = "small"
141
+ }
142
+ /** The profile an environment gets when it authors none. */
143
+ export declare const DEFAULT_ENVIRONMENT_SERVICE_PROFILE: EnvironmentServiceProfile;
144
+ /**
145
+ * The optional services a {@link EnvironmentServiceProfile} can omit. A closed vocabulary of its own rather
146
+ * than `BackingServiceKind`, because mongot is not a backing-service kind an environment declares: it is a
147
+ * sidecar of a self-hosted MongoDB. Values are the compose service names.
148
+ */
149
+ export declare enum EnvironmentServiceProfileOptionalService {
150
+ /** The ClamAV daemon that scans uploaded files (`z_file({ scanPolicy: 'required' })`). */
151
+ ANTIVIRUS_SCANNER = "clamav",
152
+ /** immudb, the tamper-evident store of the `COMPLIANCE_AUDIT_TRAIL` capability's Layer-2 fan-out. */
153
+ IMMUTABLE_AUDIT_STORE = "immudb",
154
+ /** mongot, which serves `$search` / `$vectorSearch` for MongoDB-persisted `.ragSource()` fields. */
155
+ MONGODB_SEARCH = "mongot"
156
+ }
157
+ /**
158
+ * The services a profile omits. Total over {@link EnvironmentServiceProfile} (a member added tomorrow fails
159
+ * the build here until somebody decides what it omits), and the ONE place the answer lives: the compose
160
+ * generator, the descriptor refinement and the application's boot refusals all read it.
161
+ */
162
+ export declare function servicesOmittedByEnvironmentServiceProfile(profile: EnvironmentServiceProfile): readonly EnvironmentServiceProfileOptionalService[];
163
+ /**
164
+ * Whether `profile` requires the environment to run ONE database family (#2303). Total over
165
+ * {@link EnvironmentServiceProfile}: a member added tomorrow fails the build until somebody decides.
166
+ */
167
+ export declare function environmentServiceProfileRunsOneDatabaseFamily(profile: EnvironmentServiceProfile): boolean;
168
+ /** Whether `profile` omits `service`. Absent profile ⇒ {@link DEFAULT_ENVIRONMENT_SERVICE_PROFILE}. */
169
+ export declare function environmentServiceProfileOmits(profile: EnvironmentServiceProfile | undefined, service: EnvironmentServiceProfileOptionalService): boolean;
170
+ /**
171
+ * The sentence every refusal caused by a profile starts with, so the CLI and the application's boot name
172
+ * the profile and the omitted service the same way. Callers append the capability-specific remedy.
173
+ */
174
+ export declare function describeServiceOmittedByEnvironmentServiceProfile(profile: EnvironmentServiceProfile, service: EnvironmentServiceProfileOptionalService): string;
90
175
  /**
91
176
  * Ingress controller installed by Wildo's local and remote Kubernetes workflows.
92
177
  * Import from `@wildo-ai/platform-config-lib`. Traefik owns both application
@@ -104,9 +189,8 @@ export declare enum WildoKubernetesIngressClass {
104
189
  * The external/public hostname (where browsers and reverse proxies hit
105
190
  * us) is NOT here — it lives at the top level of `WildoInfraEnvConfig`
106
191
  * as `publicDomain` because it applies to BOTH `KUBERNETES` and
107
- * `DOCKER_COMPOSE` runtimes. See `external-public-domain-rename.md`
108
- * for the rationale (the previous `baseDomain` field on this object
109
- * conflated K8s-internal and reverse-proxy concerns).
192
+ * `DOCKER_COMPOSE` runtimes. It replaced a `baseDomain` field on this
193
+ * object, which conflated K8s-internal and reverse-proxy concerns.
110
194
  */
111
195
  export declare const WildoKubernetesConfigSchema: z.ZodObject<{
112
196
  namespace: z.ZodString;
@@ -155,7 +239,7 @@ export declare const WildoLoggingConfigSchema: z.ZodObject<{
155
239
  }, z.core.$strip>;
156
240
  export type WildoLoggingConfig = z.infer<typeof WildoLoggingConfigSchema>;
157
241
  /**
158
- * Per-environment OTLP telemetry (traces + metrics + logs) posture (Slice 2 Phase 5).
242
+ * Per-environment OTLP telemetry (traces + metrics + logs) posture.
159
243
  *
160
244
  * `env-vars-builder` projects this block onto the standard `OTEL_*` env vars that the
161
245
  * `otel-preload.ts` SDK (in `saas-backend-lib`) reads BEFORE app code:
@@ -189,8 +273,10 @@ export type WildoObservabilityConfig = z.infer<typeof WildoObservabilityConfigSc
189
273
  * Semantics (mirrors the SaaS-side selection policy):
190
274
  * - `primary` — the ref that wins for this capability in this environment.
191
275
  * - `whenUnavailable` — ordered substitutes, used when a preceding ref is not AVAILABLE at
192
- * resolution time (undeclared, disabled, unconfigured). NOT failover: nothing retries a
193
- * second provider when a call to the first one fails.
276
+ * resolution time (undeclared, disabled, unconfigured). NOT failover: a substitute is never
277
+ * asked because a call to the provider before it failed. Call-time failover is the SaaS-side
278
+ * selection's own `failover` list (#2301), which this override does not carry and does not
279
+ * replace: the application's declared failover providers stay in force under it.
194
280
  *
195
281
  * The referenced provider must still be DECLARED in
196
282
  * `providers.scopes.backend.providers` and available for the capability — the
@@ -364,8 +450,9 @@ export declare function buildApplicationDatabaseUsername(appSlug: string, enviro
364
450
  * therefore absent from every environment definition. Authoring them here puts them where
365
451
  * every other per-environment posture already lives, and `wildo config sync` carries them.
366
452
  *
367
- * Projected onto `WILDO_DOCS_API_BASE_URL`, `WILDO_DOCS_APP_URL` and
368
- * `WILDO_DOCS_FRONTEND_SERVICE_NAME` by `env-vars-builder`, mirroring `providerSelection`.
453
+ * Passed as `WILDO_DOCS_API_BASE_URL`, `WILDO_DOCS_APP_URL` and `WILDO_DOCS_FRONTEND_SERVICE_NAME` to the
454
+ * documentation image's build and to the CI workflow, read from the loaded descriptor (#2310). They are build
455
+ * inputs: no runtime environment carries them.
369
456
  *
370
457
  * Every member is optional: an application with no documentation site authors nothing, and
371
458
  * a local environment relies on the config's own dev defaults rather than restating ports
@@ -1 +1 @@
1
- {"version":3,"file":"environment.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/environment.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD;;;;;;;;GAQG;AACH,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,UAAU,eA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AEG;AACH,eAAO,MAAM,6BAA6B;;;;kBAIxC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;;;kBAKrC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;+BAGtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,oEAAoE;AAEpE;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB,MAAM,CAYR;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB,MAAM,CAER;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,kCAAkC;;;;iBAgB7C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
1
+ {"version":3,"file":"environment.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/environment.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD;;;;;;;;GAQG;AACH,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,eAAO,MAAM,wBAAwB,aAMlC,CAAC;AACJ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;GAKG;AACH,oBAAY,sBAAsB;IAChC,cAAc,mBAAmB;IACjC,UAAU,eAAe;CAC1B;AAED,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,wBAAgB,oBAAoB,CAAC,aAAa,EAA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,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAoBrD;AAED,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mCAAmC,EAAE,cAA0C,CAAC;AAE7F;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAAC,mBAAmB,EAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAA;CAAE,GAAG,SAAS,GAAG,cAAc,CAEtI;AAED,oBAAY,qBAAqB;IAC/B,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;kBAIxC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;;;kBAKrC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;+BAGtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,oEAAoE;AAEpE;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB,MAAM,CAYR;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB,MAAM,CAER;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,kCAAkC;;;;iBAgB7C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { EngineCapability } from '@wildo-ai/saas-models';
3
- import { refuseModuleOwnedProviderConfigurationKeys } from '@wildo-ai/external-connectors-models';
3
+ import { refuseUnreadProviderConfigurationValues } from '@wildo-ai/external-connectors-models';
4
4
  import { InfraServiceK8sSchema } from './infra-service.schemas.js';
5
5
  /**
6
6
  * @wildo_source:part:start platform.config.environment.deployment facet:layer:platform facet:family:infra
@@ -104,6 +104,116 @@ export function resolveDefaultLocalDataStorage(locationType) {
104
104
  return WildoLocalDataStorage.HOST_PATH;
105
105
  }
106
106
  }
107
+ /**
108
+ * Which set of OPTIONAL backing services an environment runs — the deployment footprint (#2303).
109
+ *
110
+ * An environment always runs the services the platform cannot live without (a database, a cache, a
111
+ * broker, an object store). On top of those, the full platform runs three services that each back ONE
112
+ * engine capability: ClamAV (antivirus scanning of uploaded files), immudb (the tamper-evident audit
113
+ * store) and mongot (MongoDB Search / Vector Search). A small internal tool for one team rarely needs any
114
+ * of them, and they are the heaviest containers in the stack (mongot alone is a JVM holding Lucene
115
+ * indexes). A profile states, per environment, whether they run at all.
116
+ *
117
+ * ## Named "service profile", not "runtime profile"
118
+ *
119
+ * `ApplicationRuntimeProfile` (`@wildo-ai/saas-backend-lib`) already names WHICH RUNTIME boots the
120
+ * application lifecycle (the backend or a minion). This vocabulary answers a different question, about
121
+ * the ENVIRONMENT's footprint, and must not be confused with it.
122
+ *
123
+ * ## What a profile does NOT do
124
+ *
125
+ * It never degrades a capability in silence. Each capability that depends on a service the profile omits
126
+ * is REFUSED at the application's boot when the application declares it, by a message naming the profile
127
+ * and the remedy (`describeServiceOmittedByEnvironmentServiceProfile`). And a declaration that would run
128
+ * an omitted service (`backingServices.clamav: { source: SELF }` under `SMALL`) is refused when the
129
+ * environment descriptor is parsed: the two statements contradict each other.
130
+ *
131
+ * ## One database family
132
+ *
133
+ * `SMALL` also runs ONE database family (`environmentServiceProfileRunsOneDatabaseFamily`): the platform's store and
134
+ * the application's are the same engine, and only that store is declared. Which engine is the author's choice (both a
135
+ * MongoDB and a PostgreSQL environment run in one family); the descriptor derives the families it runs from what it
136
+ * declares and refuses two, naming the declarations that bring each.
137
+ *
138
+ * ## Lanes
139
+ *
140
+ * Both lanes render a profile: the Docker Compose generator, and the Kubernetes manifests (workloads, the mongod
141
+ * routing parameters, secrets, persistent volumes and readiness) since #2303's second slice.
142
+ *
143
+ * ## What it does not change yet
144
+ *
145
+ * The broker. RabbitMQ stays a platform dependency under every profile: the platform scheduler publishes onto the
146
+ * application's queue from another process, and no durable queue runs on the cache or the database
147
+ * (`QueueAdapterType.MEMORY` is in-process only). Tracked by #2303.
148
+ */
149
+ export var EnvironmentServiceProfile;
150
+ (function (EnvironmentServiceProfile) {
151
+ /** Every service the environment's declarations ask for. The default when nothing is authored. */
152
+ EnvironmentServiceProfile["FULL"] = "full";
153
+ /**
154
+ * The footprint for a small deployment: no ClamAV, no immudb, no mongot
155
+ * ({@link servicesOmittedByEnvironmentServiceProfile}). Vector search remains available on PostgreSQL
156
+ * (pgvector is part of the PostgreSQL image, not a separate service).
157
+ */
158
+ EnvironmentServiceProfile["SMALL"] = "small";
159
+ })(EnvironmentServiceProfile || (EnvironmentServiceProfile = {}));
160
+ /** The profile an environment gets when it authors none. */
161
+ export const DEFAULT_ENVIRONMENT_SERVICE_PROFILE = EnvironmentServiceProfile.FULL;
162
+ /**
163
+ * The optional services a {@link EnvironmentServiceProfile} can omit. A closed vocabulary of its own rather
164
+ * than `BackingServiceKind`, because mongot is not a backing-service kind an environment declares: it is a
165
+ * sidecar of a self-hosted MongoDB. Values are the compose service names.
166
+ */
167
+ export var EnvironmentServiceProfileOptionalService;
168
+ (function (EnvironmentServiceProfileOptionalService) {
169
+ /** The ClamAV daemon that scans uploaded files (`z_file({ scanPolicy: 'required' })`). */
170
+ EnvironmentServiceProfileOptionalService["ANTIVIRUS_SCANNER"] = "clamav";
171
+ /** immudb, the tamper-evident store of the `COMPLIANCE_AUDIT_TRAIL` capability's Layer-2 fan-out. */
172
+ EnvironmentServiceProfileOptionalService["IMMUTABLE_AUDIT_STORE"] = "immudb";
173
+ /** mongot, which serves `$search` / `$vectorSearch` for MongoDB-persisted `.ragSource()` fields. */
174
+ EnvironmentServiceProfileOptionalService["MONGODB_SEARCH"] = "mongot";
175
+ })(EnvironmentServiceProfileOptionalService || (EnvironmentServiceProfileOptionalService = {}));
176
+ /**
177
+ * The services a profile omits. Total over {@link EnvironmentServiceProfile} (a member added tomorrow fails
178
+ * the build here until somebody decides what it omits), and the ONE place the answer lives: the compose
179
+ * generator, the descriptor refinement and the application's boot refusals all read it.
180
+ */
181
+ export function servicesOmittedByEnvironmentServiceProfile(profile) {
182
+ switch (profile) {
183
+ case EnvironmentServiceProfile.FULL:
184
+ return [];
185
+ case EnvironmentServiceProfile.SMALL:
186
+ return [
187
+ EnvironmentServiceProfileOptionalService.ANTIVIRUS_SCANNER,
188
+ EnvironmentServiceProfileOptionalService.IMMUTABLE_AUDIT_STORE,
189
+ EnvironmentServiceProfileOptionalService.MONGODB_SEARCH,
190
+ ];
191
+ }
192
+ }
193
+ /**
194
+ * Whether `profile` requires the environment to run ONE database family (#2303). Total over
195
+ * {@link EnvironmentServiceProfile}: a member added tomorrow fails the build until somebody decides.
196
+ */
197
+ export function environmentServiceProfileRunsOneDatabaseFamily(profile) {
198
+ switch (profile) {
199
+ case EnvironmentServiceProfile.FULL:
200
+ return false;
201
+ case EnvironmentServiceProfile.SMALL:
202
+ return true;
203
+ }
204
+ }
205
+ /** Whether `profile` omits `service`. Absent profile ⇒ {@link DEFAULT_ENVIRONMENT_SERVICE_PROFILE}. */
206
+ export function environmentServiceProfileOmits(profile, service) {
207
+ return servicesOmittedByEnvironmentServiceProfile(profile ?? DEFAULT_ENVIRONMENT_SERVICE_PROFILE).includes(service);
208
+ }
209
+ /**
210
+ * The sentence every refusal caused by a profile starts with, so the CLI and the application's boot name
211
+ * the profile and the omitted service the same way. Callers append the capability-specific remedy.
212
+ */
213
+ export function describeServiceOmittedByEnvironmentServiceProfile(profile, service) {
214
+ return `This environment runs the '${profile}' service profile (\`serviceProfile\` in wildo.infra.<env>.config.ts), `
215
+ + `which does not run ${service}.`;
216
+ }
107
217
  /**
108
218
  * Ingress controller installed by Wildo's local and remote Kubernetes workflows.
109
219
  * Import from `@wildo-ai/platform-config-lib`. Traefik owns both application
@@ -122,9 +232,8 @@ export var WildoKubernetesIngressClass;
122
232
  * The external/public hostname (where browsers and reverse proxies hit
123
233
  * us) is NOT here — it lives at the top level of `WildoInfraEnvConfig`
124
234
  * as `publicDomain` because it applies to BOTH `KUBERNETES` and
125
- * `DOCKER_COMPOSE` runtimes. See `external-public-domain-rename.md`
126
- * for the rationale (the previous `baseDomain` field on this object
127
- * conflated K8s-internal and reverse-proxy concerns).
235
+ * `DOCKER_COMPOSE` runtimes. It replaced a `baseDomain` field on this
236
+ * object, which conflated K8s-internal and reverse-proxy concerns.
128
237
  */
129
238
  export const WildoKubernetesConfigSchema = z.object({
130
239
  namespace: z.string().min(1),
@@ -185,7 +294,7 @@ export const WildoLoggingConfigSchema = z.object({
185
294
  formattedConsoleErrors: z.boolean().optional(),
186
295
  });
187
296
  /**
188
- * Per-environment OTLP telemetry (traces + metrics + logs) posture (Slice 2 Phase 5).
297
+ * Per-environment OTLP telemetry (traces + metrics + logs) posture.
189
298
  *
190
299
  * `env-vars-builder` projects this block onto the standard `OTEL_*` env vars that the
191
300
  * `otel-preload.ts` SDK (in `saas-backend-lib`) reads BEFORE app code:
@@ -259,8 +368,10 @@ export const WildoObservabilityConfigSchema = z.object({
259
368
  * Semantics (mirrors the SaaS-side selection policy):
260
369
  * - `primary` — the ref that wins for this capability in this environment.
261
370
  * - `whenUnavailable` — ordered substitutes, used when a preceding ref is not AVAILABLE at
262
- * resolution time (undeclared, disabled, unconfigured). NOT failover: nothing retries a
263
- * second provider when a call to the first one fails.
371
+ * resolution time (undeclared, disabled, unconfigured). NOT failover: a substitute is never
372
+ * asked because a call to the provider before it failed. Call-time failover is the SaaS-side
373
+ * selection's own `failover` list (#2301), which this override does not carry and does not
374
+ * replace: the application's declared failover providers stay in force under it.
264
375
  *
265
376
  * The referenced provider must still be DECLARED in
266
377
  * `providers.scopes.backend.providers` and available for the capability — the
@@ -311,7 +422,7 @@ export const WildoProviderSelectionOverridesSchema = z.partialRecord(z.enum(Engi
311
422
  * NOT for secrets. This file is committed; a client secret, API key or signing secret stays in
312
423
  * `secrets.json → providerEnv`. The CLI refuses a key named like one of the provider's declared secrets.
313
424
  */
314
- export const WildoEnvironmentProviderConfigurationsSchema = z.record(z.string().min(1), z.record(z.string().min(1), z.record(z.string().min(1), z.unknown()))).superRefine(refuseModuleOwnedProviderConfigurationKeys);
425
+ export const WildoEnvironmentProviderConfigurationsSchema = z.record(z.string().min(1), z.record(z.string().min(1), z.record(z.string().min(1), z.unknown()))).superRefine(refuseUnreadProviderConfigurationValues);
315
426
  /**
316
427
  * The provider configuration ONE environment runs with: the application-level `providerConfigurations`, with the
317
428
  * environment's {@link WildoEnvironmentProviderConfigurationsSchema} values laid over it key by key.
@@ -453,8 +564,9 @@ export function buildApplicationDatabaseUsername(appSlug, environmentId) {
453
564
  * therefore absent from every environment definition. Authoring them here puts them where
454
565
  * every other per-environment posture already lives, and `wildo config sync` carries them.
455
566
  *
456
- * Projected onto `WILDO_DOCS_API_BASE_URL`, `WILDO_DOCS_APP_URL` and
457
- * `WILDO_DOCS_FRONTEND_SERVICE_NAME` by `env-vars-builder`, mirroring `providerSelection`.
567
+ * Passed as `WILDO_DOCS_API_BASE_URL`, `WILDO_DOCS_APP_URL` and `WILDO_DOCS_FRONTEND_SERVICE_NAME` to the
568
+ * documentation image's build and to the CI workflow, read from the loaded descriptor (#2310). They are build
569
+ * inputs: no runtime environment carries them.
458
570
  *
459
571
  * Every member is optional: an application with no documentation site authors nothing, and
460
572
  * a local environment relies on the config's own dev defaults rather than restating ports