@wildo-ai/platform-config-lib 1.0.1 → 1.1.0

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 (414) hide show
  1. package/LICENSE +34 -0
  2. package/dist/esm/.builder.pid +9 -0
  3. package/dist/esm/_unimplemented/index.d.ts +3 -0
  4. package/dist/esm/_unimplemented/index.d.ts.map +1 -0
  5. package/dist/esm/_unimplemented/index.js +3 -0
  6. package/dist/esm/_unimplemented/index.js.map +1 -0
  7. package/dist/esm/_unimplemented/soft-warn.d.ts +124 -0
  8. package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -0
  9. package/dist/esm/_unimplemented/soft-warn.js +170 -0
  10. package/dist/esm/_unimplemented/soft-warn.js.map +1 -0
  11. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +137 -0
  12. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +1 -0
  13. package/dist/esm/_unimplemented/unimplemented-field-warning.js +153 -0
  14. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +1 -0
  15. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  16. package/dist/esm/bootstrap/application-backend-env.contracts.js +1 -1
  17. package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
  18. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts +13 -0
  19. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -0
  20. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js +14 -0
  21. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -0
  22. package/dist/esm/bootstrap/bootstrap-planner.d.ts +1 -1
  23. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/bootstrap-planner.js +1 -1
  25. package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
  26. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +141 -37
  27. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  28. package/dist/esm/bootstrap/bootstrap.contracts.js +104 -18
  29. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  30. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +430 -421
  31. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  32. package/dist/esm/bootstrap/bootstrap.schemas.js +383 -21
  33. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  34. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +213 -8
  35. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  36. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +230 -5
  37. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  38. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +79 -0
  39. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -0
  40. package/dist/esm/bootstrap/runtime-backing-service-access.js +83 -0
  41. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -0
  42. package/dist/esm/bootstrap/runtime-network-policy.d.ts +63 -0
  43. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -0
  44. package/dist/esm/bootstrap/runtime-network-policy.js +104 -0
  45. package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -0
  46. package/dist/esm/bootstrap/runtime-network-topology.d.ts +78 -0
  47. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -0
  48. package/dist/esm/bootstrap/runtime-network-topology.js +134 -0
  49. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -0
  50. package/dist/esm/bootstrap/runtime-platform-access.d.ts +67 -0
  51. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -0
  52. package/dist/esm/bootstrap/runtime-platform-access.js +57 -0
  53. package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -0
  54. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +173 -0
  55. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -0
  56. package/dist/esm/bootstrap/runtime-principal.contracts.js +218 -0
  57. package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -0
  58. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts +112 -1
  59. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  60. package/dist/esm/bootstrap/runtime-topology.contracts.js +141 -8
  61. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  62. package/dist/esm/config-authoring.entry.d.ts +3 -0
  63. package/dist/esm/config-authoring.entry.d.ts.map +1 -0
  64. package/dist/esm/config-authoring.entry.js +5 -0
  65. package/dist/esm/config-authoring.entry.js.map +1 -0
  66. package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
  67. package/dist/esm/credentials/credential-generator.service.js +1 -1
  68. package/dist/esm/credentials/credential-generator.service.js.map +1 -1
  69. package/dist/esm/index.d.ts +30 -15
  70. package/dist/esm/index.d.ts.map +1 -1
  71. package/dist/esm/index.js +16 -1
  72. package/dist/esm/index.js.map +1 -1
  73. package/dist/esm/lockfile/canonical-json.d.ts +41 -0
  74. package/dist/esm/lockfile/canonical-json.d.ts.map +1 -0
  75. package/dist/esm/lockfile/canonical-json.js +56 -0
  76. package/dist/esm/lockfile/canonical-json.js.map +1 -0
  77. package/dist/esm/lockfile/lockfile-io.d.ts +231 -0
  78. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -0
  79. package/dist/esm/lockfile/lockfile-io.js +303 -0
  80. package/dist/esm/lockfile/lockfile-io.js.map +1 -0
  81. package/dist/esm/lockfile/materialize-infra-section.d.ts +99 -0
  82. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -0
  83. package/dist/esm/lockfile/materialize-infra-section.js +153 -0
  84. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -0
  85. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +522 -0
  86. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -0
  87. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +116 -0
  88. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -0
  89. package/dist/esm/project-config/define-framework-config.d.ts +36 -10
  90. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  91. package/dist/esm/project-config/define-framework-config.js +67 -3
  92. package/dist/esm/project-config/define-framework-config.js.map +1 -1
  93. package/dist/esm/project-config/define-infra-env-config.d.ts +570 -0
  94. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -0
  95. package/dist/esm/project-config/define-infra-env-config.js +726 -0
  96. package/dist/esm/project-config/define-infra-env-config.js.map +1 -0
  97. package/dist/esm/project-config/define-minion-config.d.ts +221 -23
  98. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  99. package/dist/esm/project-config/define-minion-config.js +228 -11
  100. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  101. package/dist/esm/project-config/define-saas-config.d.ts +427 -218
  102. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  103. package/dist/esm/project-config/define-saas-config.js +704 -75
  104. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  105. package/dist/esm/project-config/define-worker-config.d.ts +106 -10
  106. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  107. package/dist/esm/project-config/define-worker-config.js +99 -9
  108. package/dist/esm/project-config/define-worker-config.js.map +1 -1
  109. package/dist/esm/project-config/index.d.ts +28 -21
  110. package/dist/esm/project-config/index.d.ts.map +1 -1
  111. package/dist/esm/project-config/index.js +14 -7
  112. package/dist/esm/project-config/index.js.map +1 -1
  113. package/dist/esm/project-config/loader.d.ts +120 -10
  114. package/dist/esm/project-config/loader.d.ts.map +1 -1
  115. package/dist/esm/project-config/loader.js +290 -38
  116. package/dist/esm/project-config/loader.js.map +1 -1
  117. package/dist/esm/project-config/minion-local-provider-registration.d.ts +69 -0
  118. package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -0
  119. package/dist/esm/project-config/minion-local-provider-registration.js +72 -0
  120. package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -0
  121. package/dist/esm/project-config/provider-catalog-types.d.ts +12 -0
  122. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -0
  123. package/dist/esm/project-config/provider-catalog-types.js +49 -0
  124. package/dist/esm/project-config/provider-catalog-types.js.map +1 -0
  125. package/dist/esm/project-config/provider-companion-discovery.d.ts +24 -0
  126. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -0
  127. package/dist/esm/project-config/provider-companion-discovery.js +244 -0
  128. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -0
  129. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +297 -0
  130. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -0
  131. package/dist/esm/project-config/provider-runtime-artifacts.js +860 -0
  132. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -0
  133. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +18 -0
  134. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -0
  135. package/dist/esm/project-config/shared/application-creation-verification.schemas.js +25 -0
  136. package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -0
  137. package/dist/esm/project-config/shared/application-modules.schemas.d.ts +10 -2
  138. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  139. package/dist/esm/project-config/shared/application-modules.schemas.js +12 -1
  140. package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
  141. package/dist/esm/project-config/shared/application-modules.utils.d.ts +2 -1
  142. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  143. package/dist/esm/project-config/shared/application-modules.utils.js +6 -1
  144. package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
  145. package/dist/esm/project-config/shared/auth.schemas.d.ts +102 -0
  146. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -0
  147. package/dist/esm/project-config/shared/auth.schemas.js +100 -0
  148. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -0
  149. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +316 -39
  150. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  151. package/dist/esm/project-config/shared/backing-services.schemas.js +359 -24
  152. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  153. package/dist/esm/project-config/shared/cdn.example.d.ts +14 -0
  154. package/dist/esm/project-config/shared/cdn.example.d.ts.map +1 -0
  155. package/dist/esm/project-config/shared/cdn.example.js +38 -0
  156. package/dist/esm/project-config/shared/cdn.example.js.map +1 -0
  157. package/dist/esm/project-config/shared/cdn.schemas.d.ts +182 -0
  158. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -0
  159. package/dist/esm/project-config/shared/cdn.schemas.js +151 -0
  160. package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -0
  161. package/dist/esm/project-config/shared/csp-defaults.d.ts +92 -0
  162. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -0
  163. package/dist/esm/project-config/shared/csp-defaults.js +195 -0
  164. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -0
  165. package/dist/esm/project-config/shared/csp-emit.d.ts +106 -0
  166. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -0
  167. package/dist/esm/project-config/shared/csp-emit.js +305 -0
  168. package/dist/esm/project-config/shared/csp-emit.js.map +1 -0
  169. package/dist/esm/project-config/shared/csp.schemas.d.ts +266 -0
  170. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -0
  171. package/dist/esm/project-config/shared/csp.schemas.js +281 -0
  172. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -0
  173. package/dist/esm/project-config/shared/data-services.schemas.d.ts +45 -9
  174. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  175. package/dist/esm/project-config/shared/data-services.schemas.js +45 -9
  176. package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
  177. package/dist/esm/project-config/shared/env-example-defaults.d.ts +0 -1
  178. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  179. package/dist/esm/project-config/shared/env-example-defaults.js +1 -2
  180. package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
  181. package/dist/esm/project-config/shared/environment.schemas.d.ts +134 -8
  182. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  183. package/dist/esm/project-config/shared/environment.schemas.js +185 -2
  184. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  185. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +779 -0
  186. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -0
  187. package/dist/esm/project-config/shared/infra-providers.schemas.js +210 -0
  188. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -0
  189. package/dist/esm/project-config/shared/infra-service.schemas.d.ts +18 -0
  190. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -0
  191. package/dist/esm/project-config/shared/infra-service.schemas.js +16 -0
  192. package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -0
  193. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +83 -1
  194. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  195. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +99 -2
  196. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  197. package/dist/esm/project-config/shared/k8s-utils.d.ts +51 -7
  198. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  199. package/dist/esm/project-config/shared/k8s-utils.js +59 -12
  200. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  201. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts +31 -0
  202. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -0
  203. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js +32 -0
  204. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -0
  205. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +142 -0
  206. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -0
  207. package/dist/esm/project-config/shared/minion-resource-access.validation.js +159 -0
  208. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -0
  209. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts +100 -0
  210. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -0
  211. package/dist/esm/project-config/shared/object-storage-session-policy.js +130 -0
  212. package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -0
  213. package/dist/esm/project-config/shared/platform-services.schemas.d.ts +9 -14
  214. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  215. package/dist/esm/project-config/shared/platform-services.schemas.js +13 -9
  216. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  217. package/dist/esm/project-config/shared/schema-version.schemas.d.ts +15 -0
  218. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +1 -0
  219. package/dist/esm/project-config/shared/schema-version.schemas.js +40 -0
  220. package/dist/esm/project-config/shared/schema-version.schemas.js.map +1 -0
  221. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +283 -8
  222. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  223. package/dist/esm/project-config/shared/service-definitions.schemas.js +325 -8
  224. package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
  225. package/dist/esm/registry/artifact-domain.schemas.d.ts +54 -0
  226. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -0
  227. package/dist/esm/registry/artifact-domain.schemas.js +40 -0
  228. package/dist/esm/registry/artifact-domain.schemas.js.map +1 -0
  229. package/dist/esm/registry/companion-api.schemas.d.ts +176 -0
  230. package/dist/esm/registry/companion-api.schemas.d.ts.map +1 -0
  231. package/dist/esm/registry/companion-api.schemas.js +165 -0
  232. package/dist/esm/registry/companion-api.schemas.js.map +1 -0
  233. package/dist/esm/registry/digest.schemas.d.ts +20 -0
  234. package/dist/esm/registry/digest.schemas.d.ts.map +1 -0
  235. package/dist/esm/registry/digest.schemas.js +21 -0
  236. package/dist/esm/registry/digest.schemas.js.map +1 -0
  237. package/dist/esm/registry/index.d.ts +33 -0
  238. package/dist/esm/registry/index.d.ts.map +1 -0
  239. package/dist/esm/registry/index.js +33 -0
  240. package/dist/esm/registry/index.js.map +1 -0
  241. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +107 -0
  242. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -0
  243. package/dist/esm/registry/lockfile-modules-section.schemas.js +67 -0
  244. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -0
  245. package/dist/esm/registry/module-artifact.schemas.d.ts +94 -0
  246. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -0
  247. package/dist/esm/registry/module-artifact.schemas.js +69 -0
  248. package/dist/esm/registry/module-artifact.schemas.js.map +1 -0
  249. package/dist/esm/registry/module-manifest.schemas.d.ts +134 -0
  250. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -0
  251. package/dist/esm/registry/module-manifest.schemas.js +155 -0
  252. package/dist/esm/registry/module-manifest.schemas.js.map +1 -0
  253. package/dist/esm/registry/registry-config.schemas.d.ts +31 -0
  254. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -0
  255. package/dist/esm/registry/registry-config.schemas.js +24 -0
  256. package/dist/esm/registry/registry-config.schemas.js.map +1 -0
  257. package/dist/esm/registry/registry-defaults.constants.d.ts +37 -0
  258. package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -0
  259. package/dist/esm/registry/registry-defaults.constants.js +37 -0
  260. package/dist/esm/registry/registry-defaults.constants.js.map +1 -0
  261. package/dist/esm/registry/registry-errors.d.ts +109 -0
  262. package/dist/esm/registry/registry-errors.d.ts.map +1 -0
  263. package/dist/esm/registry/registry-errors.js +185 -0
  264. package/dist/esm/registry/registry-errors.js.map +1 -0
  265. package/dist/esm/registry/registry-section-schemas.constants.d.ts +39 -0
  266. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -0
  267. package/dist/esm/registry/registry-section-schemas.constants.js +22 -0
  268. package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -0
  269. package/dist/esm/release/framework-release.constants.d.ts +26 -1
  270. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  271. package/dist/esm/release/framework-release.constants.js +27 -2
  272. package/dist/esm/release/framework-release.constants.js.map +1 -1
  273. package/dist/esm/schemas/framework-info.schemas.d.ts +1 -1
  274. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  275. package/dist/esm/schemas/framework-info.schemas.js +1 -1
  276. package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
  277. package/dist/esm/schemas/framework-secrets.schemas.d.ts +5 -5
  278. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  279. package/dist/esm/schemas/framework-secrets.schemas.js +1 -1
  280. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  281. package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
  282. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  283. package/dist/esm/schemas/platform-application-config.schemas.js +11 -2
  284. package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
  285. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +7 -7
  286. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  287. package/dist/esm/schemas/platform-application-secrets.schemas.js +17 -2
  288. package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
  289. package/dist/esm/schemas/platform-config.schemas.d.ts +12 -13
  290. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  291. package/dist/esm/schemas/platform-config.schemas.js +15 -3
  292. package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
  293. package/dist/esm/workspace-scope/application-subject-manifest.d.ts +26 -0
  294. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -0
  295. package/dist/esm/workspace-scope/application-subject-manifest.js +43 -0
  296. package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -0
  297. package/dist/esm/workspace-scope/index.d.ts +5 -2
  298. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  299. package/dist/esm/workspace-scope/index.js +4 -1
  300. package/dist/esm/workspace-scope/index.js.map +1 -1
  301. package/dist/esm/workspace-scope/resolve-homes.d.ts +20 -0
  302. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -0
  303. package/dist/esm/workspace-scope/resolve-homes.js +62 -0
  304. package/dist/esm/workspace-scope/resolve-homes.js.map +1 -0
  305. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts +211 -0
  306. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -0
  307. package/dist/esm/workspace-scope/workspace-homes.schemas.js +113 -0
  308. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -0
  309. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts +10 -5
  310. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
  311. package/dist/esm/workspace-scope/workspace-scope-detector.js +22 -36
  312. package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
  313. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts +147 -58
  314. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  315. package/dist/esm/workspace-scope/workspace-scope.schemas.js +174 -78
  316. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  317. package/dist/tsconfig.build.tsbuildinfo +1 -1
  318. package/package.json +31 -17
  319. package/dist/esm/credentials/credentials-provisioner.service.d.ts +0 -190
  320. package/dist/esm/credentials/credentials-provisioner.service.d.ts.map +0 -1
  321. package/dist/esm/credentials/credentials-provisioner.service.js +0 -278
  322. package/dist/esm/credentials/credentials-provisioner.service.js.map +0 -1
  323. package/dist/esm/infra-managers/infra-manager.models.d.ts +0 -146
  324. package/dist/esm/infra-managers/infra-manager.models.d.ts.map +0 -1
  325. package/dist/esm/infra-managers/infra-manager.models.js +0 -2
  326. package/dist/esm/infra-managers/infra-manager.models.js.map +0 -1
  327. package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts +0 -64
  328. package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts.map +0 -1
  329. package/dist/esm/infra-managers/mongo-atlas-manager.service.js +0 -307
  330. package/dist/esm/infra-managers/mongo-atlas-manager.service.js.map +0 -1
  331. package/dist/esm/infra-managers/postgresql-manager.service.d.ts +0 -115
  332. package/dist/esm/infra-managers/postgresql-manager.service.d.ts.map +0 -1
  333. package/dist/esm/infra-managers/postgresql-manager.service.js +0 -403
  334. package/dist/esm/infra-managers/postgresql-manager.service.js.map +0 -1
  335. package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts +0 -64
  336. package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts.map +0 -1
  337. package/dist/esm/infra-managers/rabbitmq-manager.service.js +0 -288
  338. package/dist/esm/infra-managers/rabbitmq-manager.service.js.map +0 -1
  339. package/dist/esm/infra-managers/redis-manager.service.d.ts +0 -78
  340. package/dist/esm/infra-managers/redis-manager.service.d.ts.map +0 -1
  341. package/dist/esm/infra-managers/redis-manager.service.js +0 -326
  342. package/dist/esm/infra-managers/redis-manager.service.js.map +0 -1
  343. package/dist/esm/project-config/define-infra-config.d.ts +0 -128
  344. package/dist/esm/project-config/define-infra-config.d.ts.map +0 -1
  345. package/dist/esm/project-config/define-infra-config.js +0 -87
  346. package/dist/esm/project-config/define-infra-config.js.map +0 -1
  347. package/dist/esm/project-config/define-platform-config.d.ts +0 -65
  348. package/dist/esm/project-config/define-platform-config.d.ts.map +0 -1
  349. package/dist/esm/project-config/define-platform-config.js +0 -22
  350. package/dist/esm/project-config/define-platform-config.js.map +0 -1
  351. package/dist/esm/project-config/define-platform-env-config.d.ts +0 -41
  352. package/dist/esm/project-config/define-platform-env-config.d.ts.map +0 -1
  353. package/dist/esm/project-config/define-platform-env-config.js +0 -45
  354. package/dist/esm/project-config/define-platform-env-config.js.map +0 -1
  355. package/dist/esm/project-config/define-project-config.d.ts +0 -38
  356. package/dist/esm/project-config/define-project-config.d.ts.map +0 -1
  357. package/dist/esm/project-config/define-project-config.js +0 -57
  358. package/dist/esm/project-config/define-project-config.js.map +0 -1
  359. package/dist/esm/project-config/define-sharing-policy.d.ts +0 -35
  360. package/dist/esm/project-config/define-sharing-policy.d.ts.map +0 -1
  361. package/dist/esm/project-config/define-sharing-policy.js +0 -30
  362. package/dist/esm/project-config/define-sharing-policy.js.map +0 -1
  363. package/dist/esm/project-config/sharing-policy-validation.d.ts +0 -40
  364. package/dist/esm/project-config/sharing-policy-validation.d.ts.map +0 -1
  365. package/dist/esm/project-config/sharing-policy-validation.js +0 -143
  366. package/dist/esm/project-config/sharing-policy-validation.js.map +0 -1
  367. package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts +0 -23
  368. package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts.map +0 -1
  369. package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js +0 -13
  370. package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js.map +0 -1
  371. package/src/bootstrap/application-backend-env.contracts.ts +0 -17
  372. package/src/bootstrap/bootstrap-planner.ts +0 -46
  373. package/src/bootstrap/bootstrap.contracts.ts +0 -251
  374. package/src/bootstrap/bootstrap.schemas.ts +0 -164
  375. package/src/bootstrap/platform-runtime-env.contracts.ts +0 -99
  376. package/src/bootstrap/runtime-topology.contracts.ts +0 -102
  377. package/src/credentials/credential-generator.service.ts +0 -39
  378. package/src/index.ts +0 -16
  379. package/src/project-config/__tests__/application-modules.utils.test.ts +0 -53
  380. package/src/project-config/__tests__/define-framework-config.test.ts +0 -43
  381. package/src/project-config/__tests__/define-saas-config.test.ts +0 -210
  382. package/src/project-config/__tests__/loader.test.ts +0 -100
  383. package/src/project-config/define-framework-config.ts +0 -44
  384. package/src/project-config/define-infra-config.ts +0 -168
  385. package/src/project-config/define-minion-config.ts +0 -27
  386. package/src/project-config/define-platform-config.ts +0 -28
  387. package/src/project-config/define-platform-env-config.ts +0 -59
  388. package/src/project-config/define-project-config.ts +0 -63
  389. package/src/project-config/define-saas-config.ts +0 -171
  390. package/src/project-config/define-sharing-policy.ts +0 -36
  391. package/src/project-config/define-worker-config.ts +0 -27
  392. package/src/project-config/index.ts +0 -23
  393. package/src/project-config/loader.ts +0 -220
  394. package/src/project-config/shared/application-modules.schemas.ts +0 -12
  395. package/src/project-config/shared/application-modules.utils.ts +0 -65
  396. package/src/project-config/shared/backing-services.schemas.ts +0 -59
  397. package/src/project-config/shared/data-services.schemas.ts +0 -58
  398. package/src/project-config/shared/env-example-defaults.ts +0 -50
  399. package/src/project-config/shared/environment.schemas.ts +0 -136
  400. package/src/project-config/shared/infrastructure-defaults.schemas.ts +0 -47
  401. package/src/project-config/shared/k8s-utils.ts +0 -56
  402. package/src/project-config/shared/platform-services.schemas.ts +0 -33
  403. package/src/project-config/shared/service-definitions.schemas.ts +0 -38
  404. package/src/project-config/sharing-policy-validation.ts +0 -159
  405. package/src/release/framework-release.constants.ts +0 -2
  406. package/src/schemas/__tests__/platform-config.schemas.test.ts +0 -90
  407. package/src/schemas/framework-info.schemas.ts +0 -13
  408. package/src/schemas/framework-secrets.schemas.ts +0 -19
  409. package/src/schemas/platform-application-config.schemas.ts +0 -25
  410. package/src/schemas/platform-application-secrets.schemas.ts +0 -78
  411. package/src/schemas/platform-config.schemas.ts +0 -45
  412. package/src/workspace-scope/index.ts +0 -2
  413. package/src/workspace-scope/workspace-scope-detector.ts +0 -98
  414. package/src/workspace-scope/workspace-scope.schemas.ts +0 -224
@@ -0,0 +1,726 @@
1
+ import { AsyncLocalStorage } from 'node:async_hooks';
2
+ import { RuntimeEnvironment } from '@wildo-ai/saas-models';
3
+ import { z } from 'zod';
4
+ import { UnimplementedFieldSource, createUnimplementedFieldWarner, } from '../_unimplemented/unimplemented-field-warning.js';
5
+ import { WildoAuthConfigSchema } from './shared/auth.schemas.js';
6
+ import { ApplicationCreationVerificationConfigSchema } from './shared/application-creation-verification.schemas.js';
7
+ import { BackingServiceKind, BackingServiceSource, BackingServicesEnvConfigSchema } from './shared/backing-services.schemas.js';
8
+ import { WildoCdnConfigSchema } from './shared/cdn.schemas.js';
9
+ import { EnvCspOverrideSchema } from './shared/csp.schemas.js';
10
+ import { WildoSchemaVersionSchema } from './shared/schema-version.schemas.js';
11
+ import { InfraServiceAddressingSchema, InfraServiceK8sSchema, } from './shared/infra-service.schemas.js';
12
+ import { DatabaseEngine, WildoDeploymentConfigSchema, WildoDeploymentRuntime, WildoEnvironment, WildoEnvironmentIdSchema, WildoKubernetesConfigSchema, WildoLocationType, WildoLoggingConfigSchema, WildoObservabilityConfigSchema, WildoDocumentationSiteConfigSchema, WildoProviderSelectionOverridesSchema, WildoRemoteProviderSchema, isLocalEnvironmentId, } from './shared/environment.schemas.js';
13
+ const InfraEnvKubernetesSchema = WildoKubernetesConfigSchema.extend({
14
+ services: z.record(z.string(), InfraServiceK8sSchema).optional(),
15
+ }).strict();
16
+ /**
17
+ * DNS subdomain chain regex: one or more lowercase RFC 1123 labels
18
+ * joined by dots. Empty string is allowed separately via the union
19
+ * below — it means "this service lives at the apex of `publicDomain`".
20
+ *
21
+ * Examples accepted: `'app'`, `'docs'`, `'dev'`, `'www2'`, `'admin.ops'`.
22
+ * Examples rejected: `'App'` (uppercase), `'-app'` / `'app-'`
23
+ * (dash at boundary), `'app..docs'` / `'.app'` / `'app.'` (malformed
24
+ * dots), `'a/b'` (non-DNS character).
25
+ */
26
+ const SERVICE_HOST_LABEL = /^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*$/;
27
+ /**
28
+ * Per-service public hostname mapping, authored per-environment.
29
+ *
30
+ * - **Keys** are service keys from `wildo.saas.config.ts`
31
+ * (`config.services.<key>`). The mapping is NOT validated against
32
+ * the SaaS config at the Zod level (the two configs live in
33
+ * separate files and are parsed independently). Cross-file
34
+ * validation against the SaaS-config service registry is the
35
+ * responsibility of consumers that wire the two parsed configs
36
+ * together (URL composers, ingress manifest generators) — each
37
+ * consumer enforces it at the seam where both configs are in
38
+ * scope. This schema cannot enforce it standalone.
39
+ * - **Values** are the subdomain chain prefixed to `publicDomain`, OR
40
+ * the empty string for apex. Composed as
41
+ * `https://${value ? `${value}.` : ''}${publicDomain}`.
42
+ *
43
+ * The mapping is intentionally per-environment (living inside
44
+ * `wildo.infra.<env>.config.ts`) because local / staging / production
45
+ * routinely have different topologies — e.g., local collapses
46
+ * everything to `localhost`, staging mounts everything under
47
+ * `*.staging.example.com`, production uses bespoke subdomains like
48
+ * `app.example.com` + `dev.example.com` for docs. Binding the
49
+ * hostname to a frontend kind or to the service key would force a
50
+ * single topology on every environment; the per-env map keeps those
51
+ * decisions explicit and author-driven.
52
+ *
53
+ * See `cross-app-jwt-propagation.md` Step 1 for the motivating
54
+ * decision and the Step 2 URL composer that consumes this mapping
55
+ * when building cross-frontend handoff URLs.
56
+ */
57
+ const ServiceHostValueSchema = z.string()
58
+ .refine((value) => value === '' || SERVICE_HOST_LABEL.test(value), 'serviceHosts value must be a lowercase DNS subdomain chain (e.g. "app", "docs", "dev.admin") or "" (empty string, meaning apex).');
59
+ const ServiceHostsMapSchema = z.record(z.string().min(1), ServiceHostValueSchema);
60
+ const consumedInfraCspServiceKeysContext = new AsyncLocalStorage();
61
+ function parseConsumedInfraCspServiceKeysFromEnv() {
62
+ return new Set((process.env.WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS ?? '')
63
+ .split(',')
64
+ .map((value) => value.trim())
65
+ .filter((value) => value.length > 0));
66
+ }
67
+ function getConsumedInfraCspServiceKeys() {
68
+ const contextKeys = consumedInfraCspServiceKeysContext.getStore();
69
+ const envKeys = parseConsumedInfraCspServiceKeysFromEnv();
70
+ if (contextKeys === undefined || contextKeys.size === 0) {
71
+ return envKeys;
72
+ }
73
+ if (envKeys.size === 0) {
74
+ return contextKeys;
75
+ }
76
+ return new Set([...contextKeys, ...envKeys]);
77
+ }
78
+ const WildoInfraEnvConfigInputSchema = z.object({
79
+ /**
80
+ * Authored schema-format version for this `wildo.infra.<env>.config.ts`,
81
+ * expressed as a **SemVer 2.0.0 string** (e.g. `'1.0.0'`,
82
+ * `'2.3.1-rc.1'`, `'1.0.0+build.42'`).
83
+ *
84
+ * @unimplemented Slice 3.5 wires a parse-time warning when this is
85
+ * authored. The full schema-evolution / migration tooling story is
86
+ * tracked under deferred-backlog **D-5**
87
+ * (`.cursor/plans/post-flattening-completion-fixes.md`). Symmetrical
88
+ * with `WildoSaasConfig.version` — both reservations land/retire
89
+ * together so the migration tooling, when it ships, can target both
90
+ * authored configs through a single mechanism. SemVer (not a bare
91
+ * integer) was chosen for the same reason as on the SaaS-config side
92
+ * — see the JSDoc on `WildoSaasConfig.version`. Field is `.optional()`
93
+ * (no Zod default) so unauthored configs stay silent.
94
+ */
95
+ version: WildoSchemaVersionSchema.optional(),
96
+ environment: WildoEnvironmentIdSchema,
97
+ locationType: z.enum(WildoLocationType).optional(),
98
+ runtimeEnvironment: z.enum(RuntimeEnvironment).optional(),
99
+ runtime: z.enum(WildoDeploymentRuntime),
100
+ /**
101
+ * The store the PLATFORM's own data lives in (apps-manager + module-registry:
102
+ * users, organizations, applications, sessions, API keys).
103
+ *
104
+ * **This is a DECLARED property of the environment, and that is the whole point.** It used to
105
+ * exist only as an answer to an interactive prompt, persisted to the machine-local
106
+ * `environments.json` — so it could not be committed, reviewed, or reproduced on a second
107
+ * machine, and a value inferred from which backing services happened to be declared filled the
108
+ * gap. Authoring it here makes it travel with the repository like every other environment
109
+ * property.
110
+ *
111
+ * OPTIONAL. When omitted, the engine is INFERRED from the declared backing services
112
+ * (`inferDatabaseChoiceFromInfraConfig`), which is what every pre-existing environment relies
113
+ * on — so omitting this field preserves today's behaviour exactly. When authored, it is the
114
+ * AUTHORITY and the inference is not consulted.
115
+ *
116
+ * Authoring it is REQUIRED to express a PostgreSQL platform that ALSO runs a mongod, because the
117
+ * inference resolves `postgresql && mongodb` to MongoDB — so that dual-store combination is
118
+ * unreachable by inference, by construction. Since 2026-08-28 a PostgreSQL platform no longer has
119
+ * to declare `backingServices.mongodb` at all (see the refinement below), so the single-store case
120
+ * is now expressible too.
121
+ *
122
+ * @example A PostgreSQL platform, no mongod.
123
+ * ```ts
124
+ * database: { engine: DatabaseEngine.POSTGRESQL, source: BackingServiceSource.SELF },
125
+ * backingServices: { postgresql: { source: BackingServiceSource.SELF } },
126
+ * ```
127
+ *
128
+ * @example A DUAL-STORE platform — PostgreSQL for itself, a mongod beside it for the Mongo-backed
129
+ * applications it hosts. This is the shape that needs `database` authored.
130
+ * ```ts
131
+ * database: { engine: DatabaseEngine.POSTGRESQL, source: BackingServiceSource.SELF },
132
+ * backingServices: {
133
+ * mongodb: { source: BackingServiceSource.SELF },
134
+ * postgresql: { source: BackingServiceSource.SELF },
135
+ * },
136
+ * ```
137
+ *
138
+ * NOTE this is the PLATFORM's engine. An APPLICATION's own store is chosen separately by that
139
+ * application's `DATABASE_DEFAULT_ADAPTER`; declaring `backingServices.postgresql` alone gives an
140
+ * application a PostgreSQL substrate without moving the platform.
141
+ */
142
+ database: z
143
+ .strictObject({
144
+ engine: z.enum(DatabaseEngine),
145
+ source: z.enum(BackingServiceSource),
146
+ /**
147
+ * Managed-brand identifier when `source === MANAGED` — `'atlas'` for Mongo; one of
148
+ * `'aws-rds' | 'gcp-cloud-sql' | 'azure-database' | 'supabase' | 'neon' | 'render'` for
149
+ * Postgres. Mirrors `PlatformEnvConfigJson['database'].provider` exactly; this field is
150
+ * deliberately the same vocabulary rather than a parallel one.
151
+ */
152
+ provider: z.string().min(1).optional(),
153
+ })
154
+ .optional(),
155
+ /** @wildo_source:part:start platform.config.application-database facet:layer:platform facet:family:bootstrap facet:audience:app-developer */
156
+ /**
157
+ * Which declared backing store the APPLICATION's own resources persist to.
158
+ *
159
+ * ## Why this is a SEPARATE field from `database`
160
+ *
161
+ * `database` above is the PLATFORM's engine — where apps-manager's own tables live. This one is the
162
+ * application's, and the two move independently: a PostgreSQL platform can host a MongoDB
163
+ * application and vice versa. Collapsing them would make one decision imply the other, which is
164
+ * exactly the conflation the emitter's own contract warns against.
165
+ *
166
+ * ## Why it carries only `engine`
167
+ *
168
+ * The SUBSTRATE is already declared: `backingServices.postgresql` says where the database is and
169
+ * who provisions it, and `env-vars-builder` already emits `POSTGRESQL_HOST/PORT/DATABASE` to the
170
+ * application backend whenever the environment self-hosts one. What was missing is the SELECTION,
171
+ * and only the selection belongs here.
172
+ *
173
+ * ## Why an authored field rather than an env variable
174
+ *
175
+ * The emitter states the rule this field exists to satisfy: *"which store an application persists to
176
+ * is a deployment decision that must be legible in one place, not an emergent property of which
177
+ * variables happen to be set"*. Before this, the only way to select PostgreSQL for an application
178
+ * was to hand-edit `backend-api/.env` — machine-local, ungitted, and not reproducible on another
179
+ * developer's machine. That is the same defect the platform `database` field above was added to
180
+ * remove, and the reason both live in the authored, committed config.
181
+ *
182
+ * Absent means MongoDB, matching `ApplicationBackendDataEnvKeys.DATABASE_DEFAULT_ADAPTER`'s own
183
+ * default — so every existing deployment is unaffected by this field existing.
184
+ *
185
+ * @example An application on PostgreSQL, on a platform that is also on PostgreSQL.
186
+ * ```ts
187
+ * database: { engine: DatabaseEngine.POSTGRESQL, source: BackingServiceSource.SELF },
188
+ * applicationDatabase: { engine: DatabaseEngine.POSTGRESQL },
189
+ * backingServices: {
190
+ * postgresql: { source: BackingServiceSource.SELF, database: 'my-app-db' },
191
+ * },
192
+ * ```
193
+ */
194
+ applicationDatabase: z
195
+ .strictObject({
196
+ engine: z.enum(DatabaseEngine),
197
+ })
198
+ .optional(),
199
+ /**
200
+ * ## Choosing PostgreSQL creates a standing obligation — MIGRATIONS
201
+ *
202
+ * This is the part that is easy to miss, and it is not a detail of deployment: on MongoDB a
203
+ * collection exists the moment something writes to it, so a new resource needs nothing. On
204
+ * PostgreSQL a resource's TABLE is built by a MIGRATION, and nothing creates it implicitly. So on
205
+ * this engine, adding or reshaping a resource owes an artifact:
206
+ *
207
+ * - `wildo db diff` — what separates the model from the accepted plan;
208
+ * - `wildo db generate --name <label>` — writes `backend-api/migrations/<timestamp>_<name>/`
209
+ * AND advances `backend-api/migrations/schema-plan.lock.json`, in one step. Commit them
210
+ * TOGETHER; either one alone is the two-artifact drift the design exists to prevent;
211
+ * - `wildo db migrate` — applies pending migrations by hand. Usually unnecessary: the application
212
+ * backend applies them at BOOT, and `wildo local dev` reconciles drift before the app starts.
213
+ *
214
+ * Skip it and nothing warns until the backend refuses to start with
215
+ * `postgresql_table_schema_mismatch` — an accurate message that names neither the migration nor
216
+ * the command. See the `application-database-migrations` skill.
217
+ */
218
+ /** @wildo_source:part:end platform.config.application-database */
219
+ /**
220
+ * Public domain that browsers and external clients use to reach this
221
+ * deployment. Ingress / reverse proxy / DNS terminate here; every
222
+ * service-level subdomain is mounted under it via {@link serviceHosts}
223
+ * (`https://<serviceHost>.<publicDomain>`, e.g. `app.example.com`; a
224
+ * `serviceHosts` value of `''` mounts the service at the apex). Greenfield,
225
+ * single-app, mono-env — there is NO `<service>-<appSlug>-<env>` fan-out.
226
+ *
227
+ * Applies to BOTH `WildoDeploymentRuntime.KUBERNETES` and
228
+ * `WildoDeploymentRuntime.DOCKER_COMPOSE`. For compose envs without a
229
+ * reverse proxy, author `'localhost'` explicitly. For K8s local,
230
+ * author `'local.wildo.ai'` (or your `*.local` apex). For remote,
231
+ * author your apex (e.g. `'wonder-todos.com'`).
232
+ *
233
+ * NOT to be confused with the K8s-internal service-mesh hostname
234
+ * (`<service>.<namespace>.svc.cluster.local`), which stays implicit
235
+ * and is derived from `kubernetes.namespace` at composition time.
236
+ *
237
+ * REQUIRED — there is no read-time fallback. The default that
238
+ * `wildo init` writes into the generated config file lives in
239
+ * `PUBLIC_DOMAIN_DEFAULTS` (`infrastructure-defaults.schemas.ts`),
240
+ * but the schema enforces explicit authoring so a hand-edited
241
+ * config that drops the field fails Zod parse with a clear error
242
+ * instead of silently falling back.
243
+ */
244
+ publicDomain: z.string().min(1),
245
+ /**
246
+ * Per-service public hostname authoring for this environment.
247
+ *
248
+ * The app developer maps each publicly-exposed service (by its
249
+ * `services.<key>` in `wildo.saas.config.ts`) to the subdomain
250
+ * chain under `publicDomain` where it is reachable in this
251
+ * environment. An empty string value mounts the service at the
252
+ * apex of `publicDomain`.
253
+ *
254
+ * Explicit authoring only — there is NO auto-derivation from the
255
+ * service key or from `frontendType`. An app-dev who wants the
256
+ * docs service to live at `dev.example.com` (rather than the more
257
+ * conventional `docs.example.com`) writes
258
+ * `serviceHosts: { docs: 'dev' }` here; an app-dev who splits
259
+ * marketing across `example.com` and `landing.example.com` can
260
+ * author `serviceHosts: { www: '', landing: 'landing' }` without
261
+ * the framework second-guessing the intent.
262
+ *
263
+ * Field is `.optional()` because many projects (local dev,
264
+ * Docker Compose collapsed to `localhost`, single-frontend SaaS
265
+ * apps) do not need per-service hostname authoring. Downstream
266
+ * consumers (URL composers, ingress manifest generators) MUST
267
+ * handle both "no mapping authored" and "service key not
268
+ * mapped" as defined fallback paths — never as silent errors.
269
+ */
270
+ serviceHosts: ServiceHostsMapSchema.optional(),
271
+ kubernetes: InfraEnvKubernetesSchema.optional(),
272
+ remoteProvider: WildoRemoteProviderSchema.strict().optional(),
273
+ deployment: WildoDeploymentConfigSchema.optional(),
274
+ backingServices: BackingServicesEnvConfigSchema,
275
+ /**
276
+ * Per-environment logging posture. `level` is projected to `LOG_LEVEL`
277
+ * by `env-vars-builder` for every long-running platform/application
278
+ * process (`LoggerService.loadConfiguration` reads it at boot);
279
+ * `formattedConsoleErrors` is projected to `LOG_FORMATTED_CONSOLE_ERRORS`
280
+ * and overrides the auto-detected pino-pretty / JSON branch for
281
+ * environments that want explicit control. Persisted into
282
+ * `PlatformEnvConfigJson.logging` and hydrated back by
283
+ * `hydrateEnvironmentFromConfig` so the runtime contract survives a
284
+ * `wildo config sync` cycle.
285
+ */
286
+ logging: WildoLoggingConfigSchema.optional(),
287
+ /**
288
+ * Per-environment OTLP telemetry posture (Slice 2 Phase 5). `enabled` is projected to
289
+ * `OTEL_ENABLED` and drives the `--import @wildo-ai/saas-backend-lib/otel-preload` wiring;
290
+ * `endpoint` is projected to `OTEL_EXPORTER_OTLP_ENDPOINT`. The provider auth header
291
+ * (`OTEL_EXPORTER_OTLP_HEADERS`) is derived from the selected `OBSERVABILITY_TELEMETRY`
292
+ * provider's secret by `env-vars-builder`, not authored here. Persisted into
293
+ * `PlatformEnvConfigJson.observability` and hydrated by `hydrateEnvironmentFromConfig`.
294
+ */
295
+ observability: WildoObservabilityConfigSchema.optional(),
296
+ /**
297
+ * Per-environment external-provider SELECTION override. Overrides the
298
+ * app-wide `providers.scopes.backend.selection[capability]` primary/fallbacks
299
+ * from `wildo.saas.config.ts` for THIS environment only — e.g. author
300
+ * `providerSelection: { EMAIL_TRANSACTIONAL: { primary: 'email-preview' } }`
301
+ * in `wildo.infra.local.config.ts` so local uses the non-sending
302
+ * `email-preview` provider while remote envs keep the SaaS-config default
303
+ * (`resend`). Projected to `WILDO_PROVIDER_SELECTION_OVERRIDES` by
304
+ * `env-vars-builder` and applied by `ExternalProvidersRegistryBackendService`.
305
+ * See {@link WildoProviderSelectionOverridesSchema}.
306
+ */
307
+ providerSelection: WildoProviderSelectionOverridesSchema.optional(),
308
+ /**
309
+ * Per-environment origins the documentation site is BUILT against.
310
+ *
311
+ * A docs bundle is static, so the origins are compiled in: a bundle built with the
312
+ * wrong ones points every reader at the wrong host rather than failing. Authoring them
313
+ * per environment is what lets `wildo config sync` carry them, instead of an operator
314
+ * remembering three env vars on a build command.
315
+ *
316
+ * Projected to `WILDO_DOCS_API_BASE_URL` / `WILDO_DOCS_APP_URL` /
317
+ * `WILDO_DOCS_FRONTEND_SERVICE_NAME` by `env-vars-builder`.
318
+ * See {@link WildoDocumentationSiteConfigSchema}.
319
+ */
320
+ documentationSite: WildoDocumentationSiteConfigSchema.optional(),
321
+ /**
322
+ * Local-only operator configuration for application-creation verification.
323
+ * The authored value is snapshotted into generated `config.json` and then
324
+ * projected into the app-root `.env`; `.env` is never the authoring source.
325
+ */
326
+ applicationCreationVerification: ApplicationCreationVerificationConfigSchema.optional(),
327
+ serviceAuth: WildoAuthConfigSchema.strict().optional(),
328
+ /**
329
+ * Per-environment Content-Security-Policy overrides, keyed by SaaS-config
330
+ * service key (parallel to the `serviceHosts` keying convention).
331
+ *
332
+ * # Consumer wiring
333
+ *
334
+ * The generic resolver in `platform-config-lib` accepts this layer,
335
+ * and `wildo dev sync-csp` is the first build-time consumer that
336
+ * threads `parsed.csp[serviceKey]` into generated frontend CSP
337
+ * artifacts and nginx marker rewrites. `defineInfraEnvConfig` still
338
+ * emits a one-line stderr warning for authored service keys that are
339
+ * not explicitly declared as consumed by the current loader; known
340
+ * CSP-capable frontend keys are suppressed by the CLI while it loads
341
+ * the shared infra config.
342
+ *
343
+ * Cross-validation against SaaS-config service keys is not enforceable
344
+ * inside this schema alone because the infra config file is parsed
345
+ * independently. Consumers that load both files together must validate
346
+ * their own seam; `wildo dev sync-csp` rejects unknown `csp.<key>`
347
+ * entries before emitting generated artifacts.
348
+ *
349
+ * # Where this fits in the three-layer CSP cake
350
+ *
351
+ * 1. Platform default (per-`AppFrontendType` baseline) — `csp-defaults.ts`.
352
+ * 2. App-static (per-frontend `csp?` block) — authored on each
353
+ * service-definition (today: `wildo.tech-doc.config.ts.csp?` per
354
+ * `saas-technical-doc.md` Step 7.5).
355
+ * 3. **THIS FIELD** — env-specific overrides authored under
356
+ * `wildo.infra.<env>.config.ts.csp?[serviceKey]`. The
357
+ * `resolveCspPolicy({ envOverride, environmentId })` resolver
358
+ * in `platform-config-lib/src/project-config/shared/csp-emit.ts`
359
+ * accepts this shape, the schema's `superRefine` enforces the
360
+ * LOCAL-only `viteDevLoosening` rule, and `wildo dev sync-csp`
361
+ * reads `parsed.csp[serviceKey]` when generating service-local
362
+ * artifacts.
363
+ *
364
+ * # Why per-env overrides exist
365
+ *
366
+ * - Sentry / DataDog ingest origins differ per deployment (staging
367
+ * vs production violation collectors).
368
+ * - Vite dev mode needs `'unsafe-inline'` + `'unsafe-eval'` in
369
+ * `script-src` (HMR client bootstrap injects an inline `<script>`,
370
+ * module/sourcemap transforms run through `eval()`). The
371
+ * framework auto-applies this for `local` + `SAAS_APP` via the
372
+ * resolver's auto-default; the `viteDevLoosening` field exists
373
+ * only for explicit opt-out (debugging real CSP issues) or for
374
+ * non-canonical envs that also run Vite dev.
375
+ * - Per-env `reportOnly` ramping: ship `reportOnly: true` in
376
+ * staging while the violation collector ramps up, flip to
377
+ * enforcing in prod once the directive overrides settle.
378
+ *
379
+ * # Always additive (resolver contract)
380
+ *
381
+ * Env-layer entries can only LOOSEN policy (`extraDirectives` is
382
+ * APPEND-only over the app-static layer; `reportOnly` / `reportUri`
383
+ * scalars override the app-static value when present;
384
+ * `viteDevLoosening: true` appends `'unsafe-inline'` and
385
+ * `'unsafe-eval'` to `script-src`). There is no `'replace-baseline'`
386
+ * equivalent at this layer — env config exists to LOOSEN per-
387
+ * deployment, not to replace an app's chosen posture. If an env
388
+ * genuinely needs a different posture, the right answer is to fix
389
+ * the app-static layer.
390
+ *
391
+ * # `.optional()` rationale
392
+ *
393
+ * Most environments (local dev, single-frontend SaaS apps that
394
+ * accept the baseline policy verbatim) do not author per-service
395
+ * CSP overrides. Downstream consumers MUST handle both "no overrides
396
+ * authored" and "service key not mapped" as defined no-op fallbacks
397
+ * — never as silent errors.
398
+ *
399
+ * `EnvCspOverrideSchema` is itself `z.strictObject` (csp.schemas.ts),
400
+ * so unknown keys inside an authored override are rejected at the
401
+ * inner-record level — no need to re-apply `.strict()` at the
402
+ * `z.record` value position.
403
+ */
404
+ csp: z
405
+ .record(z.string().min(1), EnvCspOverrideSchema)
406
+ .optional(),
407
+ /**
408
+ * Per-service OPT-IN to CDN serving, keyed by SaaS-config service key
409
+ * (same keyspace as `serviceHosts` / `csp`). Authoring an `enabled` entry
410
+ * makes the deploy render skip the service's nginx Deployment/Service AND
411
+ * its ingress / compose route — its public host is served off-cluster by a
412
+ * CDN fronting an object-storage bucket, while `runtime.endPoints.publicUrl`
413
+ * stays `<serviceHost>.<publicDomain>` (coherence preserved). See
414
+ * {@link WildoCdnConfigSchema}. `wildo frontend publish` uploads the built
415
+ * `dist/` + re-homes CSP to the edge for these services.
416
+ *
417
+ * `.optional()` — most apps serve every frontend from an nginx pod (no CDN);
418
+ * consumers MUST treat "no cdn authored" and "service key not mapped" as the
419
+ * defined no-op (nginx-served) fallback. `WildoCdnConfigSchema` is itself
420
+ * `z.strictObject`, so unknown keys inside an authored entry are rejected at
421
+ * the inner level — no `.strict()` needed at the `z.record` value position.
422
+ */
423
+ cdn: z
424
+ .record(z.string().min(1), WildoCdnConfigSchema)
425
+ .optional(),
426
+ devCompanion: InfraServiceAddressingSchema.optional(),
427
+ }).strict().superRefine((config, ctx) => {
428
+ const resolvedEnvironment = config.environment;
429
+ const resolvedLocationType = config.locationType
430
+ ?? (isLocalEnvironmentId(resolvedEnvironment) ? WildoLocationType.LOCAL : WildoLocationType.REMOTE);
431
+ if (isLocalEnvironmentId(resolvedEnvironment) && resolvedLocationType === WildoLocationType.REMOTE) {
432
+ ctx.addIssue({
433
+ code: 'custom',
434
+ path: ['locationType'],
435
+ message: `"${resolvedEnvironment}" environment cannot use remote locationType`,
436
+ });
437
+ }
438
+ if (!isLocalEnvironmentId(resolvedEnvironment) && resolvedLocationType === WildoLocationType.LOCAL) {
439
+ ctx.addIssue({
440
+ code: 'custom',
441
+ path: ['locationType'],
442
+ message: 'Only the "local" environment id can use local locationType',
443
+ });
444
+ }
445
+ if (!isLocalEnvironmentId(resolvedEnvironment) && !config.runtimeEnvironment) {
446
+ ctx.addIssue({
447
+ code: 'custom',
448
+ path: ['runtimeEnvironment'],
449
+ message: 'runtimeEnvironment is required for remote environments',
450
+ });
451
+ }
452
+ /**
453
+ * A declared PostgreSQL platform must declare the stores it actually needs — checked HERE, at
454
+ * author time, rather than only at env generation.
455
+ *
456
+ * `env-vars-builder` already throws on both of these, but it throws during
457
+ * `wildo config sync`, i.e. after the operator has committed the config and moved on. The same
458
+ * refusal at parse time names the problem while the file is still open. The runtime throws
459
+ * REMAIN as the backstop — they also guard generated/non-authored paths this schema never sees
460
+ * (see `.claude/rules/invariant-call-site-enumeration.md`: an invariant enforced at one of its
461
+ * sites is enforced at none of the others).
462
+ */
463
+ if (config.database?.engine === DatabaseEngine.POSTGRESQL) {
464
+ if (!config.backingServices[BackingServiceKind.POSTGRESQL]) {
465
+ ctx.addIssue({
466
+ code: z.ZodIssueCode.custom,
467
+ path: ['backingServices', BackingServiceKind.POSTGRESQL],
468
+ message: 'database.engine is POSTGRESQL but no `backingServices.postgresql` is declared: the platform '
469
+ + 'would be pointed at a PostgreSQL that nothing provisions. Declare it, or drop `database` '
470
+ + 'to let the engine be inferred.',
471
+ });
472
+ }
473
+ /**
474
+ * RETIRED 2026-08-28. A PostgreSQL-engined platform no longer requires a mongod.
475
+ *
476
+ * This used to refuse a PostgreSQL platform that did not also declare
477
+ * `backingServices.mongodb: { source: SELF }`, on two stated grounds — and BOTH had since been
478
+ * met, which is exactly why it needed retiring rather than keeping:
479
+ *
480
+ * 1. "six resources declare `persistenceAdapter: MONGODB`" — retired 2026-08-22 (item C).
481
+ * `bootstrap-plane-persistence-adapter.test.ts` now asserts the INVERSE, that none of the
482
+ * six declares an adapter, so re-pinning any one of them fails that suite.
483
+ * 2. "`crontabs-batches-manager` … with zero PostgreSQL awareness" — ported (item D). On a
484
+ * PostgreSQL platform it takes `connectWithUrl(postgresUrl)` and never opens a Mongo
485
+ * connection at all.
486
+ *
487
+ * The guard's own instruction was "retire this together with those pins and the crontabs port —
488
+ * NOT before". Both landed; nobody came back. What kept a mongod alive after that was a THIRD
489
+ * reason neither the guard nor its message ever named: apps-manager's env schema declared
490
+ * `MONGO_CONNECT_URL` and `BASE_MONGO_SERVER_URL` as unconditionally REQUIRED, and its INIT
491
+ * threw without them. That is the shape worth remembering — a transitional guard whose recorded
492
+ * checklist is fully ticked while the real blocker sits somewhere it does not mention. Those
493
+ * env keys are now engine-conditional, so nothing forces a mongod any more.
494
+ *
495
+ * A mongod remains perfectly legal to declare, and is still REQUIRED in practice for a platform
496
+ * that hosts Mongo-backed applications — but that is an operator's judgment about the
497
+ * applications they run, exactly as the `applicationDatabase` rule below already argues, and not
498
+ * something this schema can decide for them.
499
+ */
500
+ }
501
+ /**
502
+ * An application cannot persist to a store the environment does not declare.
503
+ *
504
+ * Deliberately NOT symmetric with the platform rule above: that one also requires MongoDB to stay
505
+ * declared, because the platform's own BOOTSTRAP plane is Mongo-wired. An application has no such
506
+ * plane — once its resources are on PostgreSQL, nothing of the application's needs a mongod — so
507
+ * requiring one here would forbid the very end-state this field exists to reach.
508
+ */
509
+ if (config.applicationDatabase?.engine === DatabaseEngine.POSTGRESQL
510
+ && config.backingServices[BackingServiceKind.POSTGRESQL] === undefined) {
511
+ ctx.addIssue({
512
+ code: z.ZodIssueCode.custom,
513
+ path: ['backingServices', BackingServiceKind.POSTGRESQL],
514
+ message: 'applicationDatabase.engine is POSTGRESQL but no `backingServices.postgresql` is declared: the '
515
+ + 'application would be pointed at a PostgreSQL that nothing provisions. Declare it alongside.',
516
+ });
517
+ }
518
+ if (!isLocalEnvironmentId(resolvedEnvironment) && config.applicationCreationVerification !== undefined) {
519
+ ctx.addIssue({
520
+ code: 'custom',
521
+ path: ['applicationCreationVerification'],
522
+ message: 'applicationCreationVerification is local-only and must be authored in wildo.infra.local.config.ts.',
523
+ });
524
+ }
525
+ if (!isLocalEnvironmentId(resolvedEnvironment)
526
+ && resolvedLocationType === WildoLocationType.REMOTE
527
+ && config.runtime === WildoDeploymentRuntime.KUBERNETES) {
528
+ if (!config.remoteProvider) {
529
+ ctx.addIssue({
530
+ code: 'custom',
531
+ path: ['remoteProvider'],
532
+ message: 'remoteProvider is required for remote Kubernetes environments',
533
+ });
534
+ }
535
+ if (!config.kubernetes) {
536
+ ctx.addIssue({
537
+ code: 'custom',
538
+ path: ['kubernetes'],
539
+ message: 'kubernetes is required for remote Kubernetes environments',
540
+ });
541
+ }
542
+ }
543
+ // CSP env-layer dev-only escape hatch — `viteDevLoosening: true`
544
+ // injects BOTH `'unsafe-inline'` and `'unsafe-eval'` into `script-src`
545
+ // (Vite's HMR client bootstrap is an inline `<script>` and its module
546
+ // / sourcemap transforms run through `eval()`). The auto-default
547
+ // already handles the canonical case (`local` + `SAAS_APP` →
548
+ // auto-true). Explicit `viteDevLoosening: true` is REJECTED outside
549
+ // the LOCAL environment because shipping `'unsafe-inline'` +
550
+ // `'unsafe-eval'` to staging / production would punch a hole through
551
+ // the entire CSP posture (every XSS payload becomes scriptable via
552
+ // `eval()`-style sinks the baseline specifically denies, and inline
553
+ // `<script>` injection escapes nonce-/hash-based mitigation). Failing
554
+ // fast at parse time prevents an authored `csp.app.viteDevLoosening:
555
+ // true` entry from silently shipping to production via a copy-paste
556
+ // from the local config.
557
+ if (config.csp && !isLocalEnvironmentId(resolvedEnvironment)) {
558
+ for (const [serviceKey, override] of Object.entries(config.csp)) {
559
+ if (override?.viteDevLoosening === true) {
560
+ ctx.addIssue({
561
+ code: 'custom',
562
+ path: ['csp', serviceKey, 'viteDevLoosening'],
563
+ message: `csp.${serviceKey}.viteDevLoosening cannot be true in environment "${resolvedEnvironment}" — `
564
+ + `the dev-only escape hatch is restricted to "${WildoEnvironment.LOCAL}". `
565
+ + `Author this flag ONLY in wildo.infra.local.config.ts; remote envs MUST reject `
566
+ + `'unsafe-inline'/'unsafe-eval' so XSS payloads can't reach eval-style sinks or `
567
+ + `inline-script injection. Production Vite builds emit <script type="module"> with `
568
+ + `no inline scripts and no eval(), so production envs never NEED this flag.`,
569
+ });
570
+ }
571
+ }
572
+ }
573
+ // CDN serving is a REMOTE-only concern: it replaces a frontend's nginx pod
574
+ // (Deployment + Service + ingress route), which exists ONLY in a remote
575
+ // k8s/compose deploy. Local dev runs native frontend dev servers — there is
576
+ // no nginx pod to skip and nowhere to publish to. Reject an authored `cdn`
577
+ // block outside a remote env at parse time so a config copy-pasted from a
578
+ // remote env can't silently make `wildo frontend publish --env local`
579
+ // attempt an S3 upload (and so the semantic stays enforced, not implicit).
580
+ if (config.cdn && resolvedLocationType !== WildoLocationType.REMOTE) {
581
+ for (const serviceKey of Object.keys(config.cdn)) {
582
+ ctx.addIssue({
583
+ code: 'custom',
584
+ path: ['cdn', serviceKey],
585
+ message: `cdn.${serviceKey} is only valid in a REMOTE environment — CDN serving replaces the `
586
+ + `frontend's nginx pod, which local dev does not have. Author cdn blocks only in `
587
+ + `wildo.infra.remote.config.ts (staging / production).`,
588
+ });
589
+ }
590
+ }
591
+ });
592
+ export const WildoInfraEnvConfigSchema = WildoInfraEnvConfigInputSchema.transform((config) => {
593
+ const environment = config.environment;
594
+ const locationType = config.locationType
595
+ ?? (isLocalEnvironmentId(environment) ? WildoLocationType.LOCAL : WildoLocationType.REMOTE);
596
+ return {
597
+ version: config.version,
598
+ environment,
599
+ locationType,
600
+ runtimeEnvironment: config.runtimeEnvironment,
601
+ runtime: config.runtime,
602
+ /**
603
+ * Projected EXPLICITLY, like every field here — this list IS the contract, and a field omitted
604
+ * from it is silently dropped no matter what the input schema accepted. `undefined` when the
605
+ * environment does not author one, which is the signal downstream consumers use to fall back to
606
+ * `inferDatabaseChoiceFromInfraConfig`.
607
+ */
608
+ database: config.database,
609
+ applicationDatabase: config.applicationDatabase,
610
+ publicDomain: config.publicDomain,
611
+ serviceHosts: config.serviceHosts,
612
+ kubernetes: config.kubernetes,
613
+ remoteProvider: config.remoteProvider,
614
+ deployment: config.deployment,
615
+ backingServices: config.backingServices,
616
+ logging: config.logging,
617
+ observability: config.observability,
618
+ providerSelection: config.providerSelection,
619
+ applicationCreationVerification: config.applicationCreationVerification,
620
+ serviceAuth: config.serviceAuth,
621
+ csp: config.csp,
622
+ cdn: config.cdn,
623
+ documentationSite: config.documentationSite,
624
+ devCompanion: config.devCompanion,
625
+ };
626
+ });
627
+ /**
628
+ * Scope `csp.<serviceKey>` warning suppression to the current async load path.
629
+ *
630
+ * The docs CSP generator loads authored infra config through `loadConfig()`,
631
+ * which evaluates `defineInfraEnvConfig(...)` inside the same process. Using
632
+ * an async-local context lets that loader declare which keys are actively
633
+ * consumed without mutating `process.env` across concurrent config loads.
634
+ *
635
+ * `WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS` remains supported as a coarse global
636
+ * fallback (tests / external callers), but in-process loaders SHOULD prefer
637
+ * this helper so suppression cannot leak between unrelated async work.
638
+ */
639
+ export async function withConsumedInfraCspServiceKeys(serviceKeys, callback) {
640
+ const normalizedKeys = new Set([...serviceKeys]
641
+ .map((value) => value.trim())
642
+ .filter((value) => value.length > 0));
643
+ if (normalizedKeys.size === 0) {
644
+ return await callback();
645
+ }
646
+ const parentKeys = consumedInfraCspServiceKeysContext.getStore();
647
+ const mergedKeys = new Set(parentKeys ?? []);
648
+ for (const serviceKey of normalizedKeys) {
649
+ mergedKeys.add(serviceKey);
650
+ }
651
+ return await consumedInfraCspServiceKeysContext.run(mergedKeys, callback);
652
+ }
653
+ /**
654
+ * Define an app-owned environment descriptor under `infrastructure/<env>`.
655
+ *
656
+ * This is the canonical authored env contract for the flattened targeted-app
657
+ * layout.
658
+ *
659
+ * After successful parsing, emits Slice 3.5 `@unimplemented` warnings for
660
+ * authored fields that remain reserved or are not declared as consumed by
661
+ * the current loader — see `_unimplemented/unimplemented-field-warning.ts`
662
+ * for the design rationale (channel = stderr, dedupe = once-per-call,
663
+ * format = single-line with backlog ID).
664
+ */
665
+ export function defineInfraEnvConfig(config) {
666
+ const parsed = WildoInfraEnvConfigSchema.parse(config);
667
+ emitInfraUnimplementedRuntimeWarnings(parsed);
668
+ return parsed;
669
+ }
670
+ /**
671
+ * Emit `@unimplemented` parse-time warnings for every authored
672
+ * `WildoInfraEnvConfig` field that remains reserved or is not declared as
673
+ * consumed by the current loader (Slice 3.5 contract — see
674
+ * `_unimplemented/unimplemented-field-warning.ts`).
675
+ *
676
+ * Surfaces today (2 field families):
677
+ *
678
+ * - `version` (!== undefined) → `D-5`
679
+ * - `csp.<serviceKey>` (each authored entry) → `B-2C` (auth-hardening
680
+ * Slice B Step 2 closeout — the schema reservation shipped, the
681
+ * superRefine guard against `viteDevLoosening: true` outside LOCAL
682
+ * is live, and `wildo dev sync-csp` declares the CSP-capable
683
+ * frontend service keys it consumes while loading authored infra
684
+ * config, so warnings remain reserved for genuinely unconsumed keys.)
685
+ *
686
+ * `logging.{level, formattedConsoleErrors}` is intentionally NOT in this
687
+ * list: Slice 3.5 wires both fields end-to-end (persistence,
688
+ * `env-vars-builder` → `LOG_LEVEL` / `LOG_FORMATTED_CONSOLE_ERRORS`,
689
+ * `LoggerService.loadConfiguration`), so they have a real runtime
690
+ * consumer and silence is the honest behavior.
691
+ *
692
+ * `domain` is intentionally NOT in this list either: Slice 3.5 deleted
693
+ * the field outright as a wrong-seam, and the post-Slice-3.5
694
+ * `external-public-domain-rename.md` follow-up renamed the canonical
695
+ * hostname seam to top-level `publicDomain` (replacing the misnamed
696
+ * `kubernetes.baseDomain` of Slice 3.5). Both `domain` and
697
+ * `kubernetes.baseDomain` are now strict-rejected by the schema —
698
+ * the canonical seam is `publicDomain` at the top level. See the
699
+ * strict-pin tests in `__tests__/define-infra-env-config.unimplemented.test.ts`.
700
+ *
701
+ * When the deferred backlog item lands, the matching `if` branch below
702
+ * MUST be removed in the same commit as the runtime wiring — leaving a
703
+ * stale warning is worse than silence.
704
+ */
705
+ function emitInfraUnimplementedRuntimeWarnings(config) {
706
+ const warn = createUnimplementedFieldWarner(UnimplementedFieldSource.INFRA_ENV_CONFIG);
707
+ const AUTH_HARDENING_PLAN_PATH = '.cursor/plans/auth-hardening.md';
708
+ const consumedCspServiceKeys = getConsumedInfraCspServiceKeys();
709
+ if (config.version !== undefined) {
710
+ warn('version', 'D-5');
711
+ }
712
+ if (config.csp !== undefined) {
713
+ // Walk every authored service key so a multi-service author
714
+ // (e.g. csp: { docs: {…}, app: {…} }) sees one warning per
715
+ // service — the dedupe key is the field path, so per-key
716
+ // emission is what matches the createUnimplementedFieldWarner
717
+ // contract.
718
+ for (const serviceKey of Object.keys(config.csp)) {
719
+ if (consumedCspServiceKeys.has(serviceKey)) {
720
+ continue;
721
+ }
722
+ warn(`csp.${serviceKey}`, 'B-2C', AUTH_HARDENING_PLAN_PATH);
723
+ }
724
+ }
725
+ }
726
+ //# sourceMappingURL=define-infra-env-config.js.map