@wildo-ai/platform-config-lib 1.1.4 → 1.1.6

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 (230) hide show
  1. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  2. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  3. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +24 -1
  4. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  5. package/dist/esm/bootstrap/bootstrap.contracts.js +25 -0
  6. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  7. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +117 -1
  8. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  9. package/dist/esm/bootstrap/bootstrap.schemas.js +63 -4
  10. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  11. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +24 -1
  12. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  13. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +24 -0
  14. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  15. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +37 -0
  16. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -0
  17. package/dist/esm/bootstrap/platform-store-preconnect.js +43 -0
  18. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -0
  19. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  20. package/dist/esm/bootstrap/runtime-backing-service-access.js +8 -4
  21. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  22. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  23. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  25. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -1
  26. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  27. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts +36 -3
  28. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  29. package/dist/esm/bootstrap/runtime-topology.contracts.js +36 -13
  30. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  31. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts +29 -0
  32. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts.map +1 -1
  33. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js +39 -0
  34. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  35. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  36. package/dist/esm/config-authoring.entry.js.map +1 -1
  37. package/dist/esm/index.d.ts +2 -0
  38. package/dist/esm/index.d.ts.map +1 -1
  39. package/dist/esm/index.js +2 -0
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/lockfile/build-parallelism.d.ts +40 -0
  42. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -0
  43. package/dist/esm/lockfile/build-parallelism.js +64 -0
  44. package/dist/esm/lockfile/build-parallelism.js.map +1 -0
  45. package/dist/esm/lockfile/lockfile-io.d.ts +7 -1
  46. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  47. package/dist/esm/lockfile/lockfile-io.js +17 -3
  48. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  49. package/dist/esm/lockfile/materialize-infra-section.d.ts +28 -7
  50. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  51. package/dist/esm/lockfile/materialize-infra-section.js +24 -11
  52. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  53. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +455 -6
  54. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  55. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +27 -0
  56. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  57. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts +13 -0
  58. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -0
  59. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +56 -0
  60. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -0
  61. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  62. package/dist/esm/project-config/define-infra-env-config.d.ts +886 -29
  63. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  64. package/dist/esm/project-config/define-infra-env-config.js +395 -16
  65. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  66. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  67. package/dist/esm/project-config/define-minion-config.js +1 -2
  68. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  69. package/dist/esm/project-config/define-saas-config.d.ts +142 -25
  70. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  71. package/dist/esm/project-config/define-saas-config.js +229 -26
  72. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  73. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  74. package/dist/esm/project-config/hosted-infra-env-config.d.ts +59 -0
  75. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -0
  76. package/dist/esm/project-config/hosted-infra-env-config.js +187 -0
  77. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -0
  78. package/dist/esm/project-config/index.d.ts +6 -0
  79. package/dist/esm/project-config/index.d.ts.map +1 -1
  80. package/dist/esm/project-config/index.js +6 -0
  81. package/dist/esm/project-config/index.js.map +1 -1
  82. package/dist/esm/project-config/loader.d.ts +35 -0
  83. package/dist/esm/project-config/loader.d.ts.map +1 -1
  84. package/dist/esm/project-config/loader.js +148 -8
  85. package/dist/esm/project-config/loader.js.map +1 -1
  86. package/dist/esm/project-config/npm-version-range.d.ts +23 -0
  87. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -0
  88. package/dist/esm/project-config/npm-version-range.js +175 -0
  89. package/dist/esm/project-config/npm-version-range.js.map +1 -0
  90. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -1
  91. package/dist/esm/project-config/provider-companion-discovery.d.ts +288 -30
  92. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  93. package/dist/esm/project-config/provider-companion-discovery.js +795 -46
  94. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  95. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +192 -20
  96. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  97. package/dist/esm/project-config/provider-runtime-artifacts.js +381 -42
  98. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  99. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  100. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  101. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  102. package/dist/esm/project-config/shared/auth.schemas.d.ts +14 -35
  103. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  104. package/dist/esm/project-config/shared/auth.schemas.js +14 -35
  105. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  106. package/dist/esm/project-config/shared/backing-service-servability.d.ts +157 -0
  107. package/dist/esm/project-config/shared/backing-service-servability.d.ts.map +1 -0
  108. package/dist/esm/project-config/shared/backing-service-servability.js +256 -0
  109. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -0
  110. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +66 -66
  111. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  112. package/dist/esm/project-config/shared/backing-services.schemas.js +75 -67
  113. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  114. package/dist/esm/project-config/shared/cdn.example.d.ts.map +1 -1
  115. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  116. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  117. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  118. package/dist/esm/project-config/shared/csp-emit.js +41 -2
  119. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  120. package/dist/esm/project-config/shared/csp.schemas.d.ts +11 -12
  121. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  122. package/dist/esm/project-config/shared/csp.schemas.js +11 -12
  123. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  124. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  125. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  126. package/dist/esm/project-config/shared/environment.schemas.d.ts +152 -12
  127. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  128. package/dist/esm/project-config/shared/environment.schemas.js +186 -9
  129. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  130. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +185 -10
  131. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  132. package/dist/esm/project-config/shared/infra-providers.schemas.js +40 -3
  133. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  134. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -1
  135. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  136. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  137. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  138. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  139. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  140. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  141. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +77 -47
  142. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  143. package/dist/esm/project-config/shared/minion-resource-access.validation.js +114 -52
  144. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  145. package/dist/esm/project-config/shared/platform-services.schemas.d.ts +50 -0
  146. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  147. package/dist/esm/project-config/shared/platform-services.schemas.js +57 -0
  148. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  149. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +35 -0
  150. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -0
  151. package/dist/esm/project-config/shared/platform-storage.schemas.js +37 -0
  152. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -0
  153. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +1 -1
  154. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  155. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +81 -0
  156. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -0
  157. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js +74 -0
  158. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -0
  159. package/dist/esm/project-config/static-asset-import-noop.d.ts +26 -0
  160. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -0
  161. package/dist/esm/project-config/static-asset-import-noop.js +49 -0
  162. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -0
  163. package/dist/esm/registry/artifact-domain.schemas.d.ts +1 -1
  164. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  165. package/dist/esm/registry/companion-api.schemas.d.ts +0 -176
  166. package/dist/esm/registry/companion-api.schemas.d.ts.map +0 -1
  167. package/dist/esm/registry/companion-api.schemas.js.map +0 -1
  168. package/dist/esm/registry/digest.schemas.d.ts.map +1 -1
  169. package/dist/esm/registry/index.d.ts +3 -1
  170. package/dist/esm/registry/index.d.ts.map +1 -1
  171. package/dist/esm/registry/index.js +3 -1
  172. package/dist/esm/registry/index.js.map +1 -1
  173. package/dist/esm/registry/local-checkout-source.d.ts +31 -0
  174. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -0
  175. package/dist/esm/registry/local-checkout-source.js +45 -0
  176. package/dist/esm/registry/local-checkout-source.js.map +1 -0
  177. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +174 -14
  178. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  179. package/dist/esm/registry/lockfile-modules-section.schemas.js +120 -11
  180. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  181. package/dist/esm/registry/module-artifact.schemas.d.ts +79 -0
  182. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  183. package/dist/esm/registry/module-artifact.schemas.js +36 -0
  184. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  185. package/dist/esm/registry/module-manifest.schemas.d.ts +403 -23
  186. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  187. package/dist/esm/registry/module-manifest.schemas.js +502 -60
  188. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  189. package/dist/esm/registry/module-search.schemas.d.ts +80 -0
  190. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -0
  191. package/dist/esm/registry/module-search.schemas.js +112 -0
  192. package/dist/esm/registry/module-search.schemas.js.map +1 -0
  193. package/dist/esm/registry/registry-config.schemas.d.ts +16 -0
  194. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  195. package/dist/esm/registry/registry-config.schemas.js +8 -0
  196. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  197. package/dist/esm/registry/registry-errors.d.ts +126 -2
  198. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  199. package/dist/esm/registry/registry-errors.js +183 -14
  200. package/dist/esm/registry/registry-errors.js.map +1 -1
  201. package/dist/esm/registry/registry-keys.schemas.d.ts +80 -0
  202. package/dist/esm/registry/registry-keys.schemas.d.ts.map +1 -0
  203. package/dist/esm/registry/registry-keys.schemas.js +68 -0
  204. package/dist/esm/registry/registry-keys.schemas.js.map +1 -0
  205. package/dist/esm/registry/registry-section-schemas.constants.d.ts +25 -3
  206. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  207. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  208. package/dist/esm/release/framework-release.constants.js.map +1 -1
  209. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  210. package/dist/esm/schemas/framework-secrets.schemas.d.ts +12 -1
  211. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  212. package/dist/esm/schemas/framework-secrets.schemas.js +14 -1
  213. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  214. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  215. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  216. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  217. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -1
  218. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  219. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  220. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts +17 -14
  221. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  222. package/dist/esm/workspace-scope/workspace-homes.schemas.js +8 -7
  223. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  224. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts +15 -6
  225. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  226. package/dist/esm/workspace-scope/workspace-scope.schemas.js +23 -9
  227. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  228. package/package.json +7 -7
  229. package/dist/esm/registry/companion-api.schemas.js +0 -165
  230. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -30,11 +30,7 @@ export declare enum BackingServiceKind {
30
30
  * tamper-evident audit-log store (fills the `AUDIT_LOG_STORAGE` capability).
31
31
  * A stateful DB: a data volume in dev, self-hosted or immudb Vault in prod.
32
32
  */
33
- IMMUDB = "immudb",
34
- /**
35
- * Backup orchestration target. Stateless base for now.
36
- */
37
- BACKUP = "backup"
33
+ IMMUDB = "immudb"
38
34
  }
39
35
  /**
40
36
  * Hosting model of a backing service instance — the orthogonal axis to
@@ -145,9 +141,14 @@ export declare const ClamAvBackingServiceSchema: z.ZodObject<{
145
141
  }, z.core.$strict>;
146
142
  export type ClamAvBackingService = z.infer<typeof ClamAvBackingServiceSchema>;
147
143
  /**
148
- * immudb backing service (tamper-evident audit-log store). A stateful DB —
149
- * `database` names the immudb database (defaults to `defaultdb` at runtime);
150
- * credentials come from the secrets pipeline like every other backing service.
144
+ * immudb backing service (tamper-evident audit-log store). A stateful DB.
145
+ *
146
+ * On `source: SELF` the credentials are MINTED, never authored (#1696): the platform
147
+ * gives each application its OWN immudb database and its OWN user, which can write that
148
+ * database and nothing else, and delivers both with the application's platform secrets.
149
+ * The name is derived from the application and kept across re-registrations, so
150
+ * `database` is not read for a self-hosted store; it names the database of a MANAGED
151
+ * one.
151
152
  *
152
153
  * Declare this in EVERY environment where the `COMPLIANCE_AUDIT_TRAIL` engine
153
154
  * capability is enabled. `wildo config sync` warns per environment when the audit
@@ -174,16 +175,6 @@ export declare const ImmudbBackingServiceSchema: z.ZodObject<{
174
175
  database: z.ZodOptional<z.ZodString>;
175
176
  }, z.core.$strict>;
176
177
  export type ImmudbBackingService = z.infer<typeof ImmudbBackingServiceSchema>;
177
- /**
178
- * Backup orchestration target. Stateless base for now.
179
- */
180
- export declare const BackupBackingServiceSchema: z.ZodObject<{
181
- source: z.ZodEnum<typeof BackingServiceSource>;
182
- provider: z.ZodOptional<z.ZodString>;
183
- host: z.ZodOptional<z.ZodString>;
184
- port: z.ZodOptional<z.ZodNumber>;
185
- }, z.core.$strict>;
186
- export type BackupBackingService = z.infer<typeof BackupBackingServiceSchema>;
187
178
  /**
188
179
  * Discriminated UNION over all backing-service kinds. Used by the
189
180
  * `ServiceAddressResolver` and helpers that accept any kind and read
@@ -191,7 +182,7 @@ export type BackupBackingService = z.infer<typeof BackupBackingServiceSchema>;
191
182
  * kind-specific fields MUST narrow first (e.g. via the per-kind type
192
183
  * exports above).
193
184
  */
194
- export type BackingServiceEnvConfig = MongoBackingService | RedisBackingService | PostgresBackingService | RabbitBackingService | S3BackingService | ClamAvBackingService | ImmudbBackingService | BackupBackingService;
185
+ export type BackingServiceEnvConfig = MongoBackingService | RedisBackingService | PostgresBackingService | RabbitBackingService | S3BackingService | ClamAvBackingService | ImmudbBackingService;
195
186
  /**
196
187
  * Per-environment backing services config (source for each service).
197
188
  * Used in environment-specific infra descriptors.
@@ -251,12 +242,6 @@ export declare const BackingServicesEnvConfigSchema: z.ZodObject<{
251
242
  port: z.ZodOptional<z.ZodNumber>;
252
243
  database: z.ZodOptional<z.ZodString>;
253
244
  }, z.core.$strict>>;
254
- backup: z.ZodOptional<z.ZodObject<{
255
- source: z.ZodEnum<typeof BackingServiceSource>;
256
- provider: z.ZodOptional<z.ZodString>;
257
- host: z.ZodOptional<z.ZodString>;
258
- port: z.ZodOptional<z.ZodNumber>;
259
- }, z.core.$strict>>;
260
245
  }, z.core.$strict>;
261
246
  export type BackingServicesEnvConfig = z.infer<typeof BackingServicesEnvConfigSchema>;
262
247
  /** @wildo_source:part:end platform.config.backing-services */
@@ -280,54 +265,69 @@ export declare const BackingServiceKindToInfraCapability: Record<BackingServiceK
280
265
  * **Brand vocabulary** per kind (`provider` field on the authored
281
266
  * `BackingService<X>Schema`):
282
267
  *
283
- * | Kind | source | provider | InfraProvider |
284
- * |---|---|---|---|
285
- * | `MONGODB` | `SELF` | (any) | `MONGODB_SELF` |
286
- * | `MONGODB` | `MANAGED` | `'atlas'` | `MONGODB_ATLAS` |
287
- * | `POSTGRESQL` | `SELF` | (any) | `POSTGRES_SELF` |
288
- * | `POSTGRESQL` | `MANAGED` | `'aws-rds'` | `POSTGRES_AWS_RDS` |
289
- * | `POSTGRESQL` | `MANAGED` | `'gcp-cloud-sql'` | `POSTGRES_GCP_CLOUD_SQL` |
290
- * | `POSTGRESQL` | `MANAGED` | `'azure-database'` | `POSTGRES_AZURE_DATABASE` |
291
- * | `POSTGRESQL` | `MANAGED` | `'supabase'` | `POSTGRES_SUPABASE` |
292
- * | `POSTGRESQL` | `MANAGED` | `'neon'` | `POSTGRES_NEON` |
293
- * | `POSTGRESQL` | `MANAGED` | `'render'` | `POSTGRES_RENDER` |
294
- * | `POSTGRESQL` | `MANAGED` | (unset) | `POSTGRES_MANAGED` (generic fallback) |
295
- * | `REDIS` | `SELF` | (any) | `REDIS_SELF` |
296
- * | `RABBITMQ` | `SELF` | (any) | `RABBITMQ_SELF` |
297
- * | `S3` | `SELF` | (`'minio'` or unset) | `MINIO_SELF` |
298
- * | `S3` | `MANAGED` | `'aws'` | `AWS_S3` |
299
- * | `CLAMAV` | `SELF` | (any) | `CLAMAV_SELF` |
300
- * | `IMMUDB` | `SELF` | (any) | `IMMUDB_SELF` |
268
+ * | Kind | source | provider | InfraProvider | Servable today |
269
+ * |---|---|---|---|---|
270
+ * | `MONGODB` | `SELF` | (any) | `MONGODB_SELF` | yes |
271
+ * | `MONGODB` | `MANAGED` | `'atlas'` | `MONGODB_ATLAS` | yes |
272
+ * | `POSTGRESQL` | `SELF` | (any) | `POSTGRES_SELF` | yes |
273
+ * | `POSTGRESQL` | `MANAGED` | `'aws-rds'` | `POSTGRES_AWS_RDS` | no — no module |
274
+ * | `POSTGRESQL` | `MANAGED` | `'gcp-cloud-sql'` | `POSTGRES_GCP_CLOUD_SQL` | no — no module |
275
+ * | `POSTGRESQL` | `MANAGED` | `'azure-database'` | `POSTGRES_AZURE_DATABASE` | no — no module |
276
+ * | `POSTGRESQL` | `MANAGED` | `'supabase'` | `POSTGRES_SUPABASE` | no — no module |
277
+ * | `POSTGRESQL` | `MANAGED` | `'neon'` | `POSTGRES_NEON` | no — no module |
278
+ * | `POSTGRESQL` | `MANAGED` | `'render'` | `POSTGRES_RENDER` | no — no module |
279
+ * | `POSTGRESQL` | `MANAGED` | unset or unrecognized | `POSTGRES_MANAGED` (generic fallback) | no — no module |
280
+ * | `REDIS` | `SELF` | (any) | `REDIS_SELF` | yes |
281
+ * | `RABBITMQ` | `SELF` | (any) | `RABBITMQ_SELF` | yes |
282
+ * | `S3` | (either) | `'minio'` | `MINIO_SELF` | yes |
283
+ * | `S3` | (either) | `'aws'` | `AWS_S3` | no — no credential broker for AWS yet |
284
+ * | `S3` | `SELF` | unset or unrecognized | `MINIO_SELF` | yes |
285
+ * | `S3` | `MANAGED` | unset or unrecognized | `AWS_S3` | no — no credential broker for AWS yet |
286
+ * | `CLAMAV` | `SELF` | (any) | `CLAMAV_SELF` | yes |
287
+ * | `IMMUDB` | `SELF` | (any) | `IMMUDB_SELF` | yes — one database and one confined user minted per application (#1696) |
301
288
  *
302
- * Returns `undefined` for combinations not in the table — for kinds
303
- * whose `InfraProvider` catalog has no concrete entry yet (METRICS,
304
- * BACKUP) and for unrecognized brand strings on managed
305
- * Mongo / S3 (they don't have a generic `<KIND>_MANAGED` fallback,
306
- * unlike Postgres). Callers decide whether `undefined` is fail-closed
307
- * (planner running with unknown infra catalog) or accepted (lockfile
308
- * pre-declaration).
289
+ * Returns `undefined` for combinations not in the table: a managed cache, broker, antivirus scanner
290
+ * or audit store, and a managed MongoDB under any brand other than `'atlas'`. PostgreSQL has a
291
+ * generic managed fallback; S3 uses brand-first resolution, then source-based defaults.
309
292
  *
310
- * ## What this means when you author an environment
293
+ * ## Resolving is not the same as being servable
294
+ *
295
+ * This function answers only "which catalogue entry does this declaration NAME". Whether the
296
+ * platform can actually deliver that entry — mint the application's credential on the server the
297
+ * application connects to — is a separate question, answered by {@link findUnservableBackingServiceDeclarations}
298
+ * against the provider-module catalogue. A declaration that resolves to nothing, OR to an entry no
299
+ * module can serve (the seven managed PostgreSQL entries, and `AWS_S3` until its credential broker
300
+ * exists), is REFUSED by `wildo config validate`, `wildo config sync` and `wildo lock check`, with a
301
+ * message naming the declarations that ARE servable for that kind.
311
302
  *
312
- * **`MANAGED` does not reach every kind.** The table above is the whole of it: a managed vendor
313
- * resolves for the relational database (six named brands plus a generic fallback), the document
314
- * database (`'atlas'` only) and object storage. Declaring `{ source: MANAGED }` on the cache, the
315
- * broker, the antivirus scanner, the audit store or the backup target resolves to NOTHING — those
316
- * kinds are self-hosted only until their vendor catalogue is built.
303
+ * The same `(source, provider)` pair travels to apps-manager at every registration, and apps-manager
304
+ * resolves it with THIS function and mints the application's credentials on the result — so the provider
305
+ * the lockfile records and the provider a credential is minted on are one answer. It also refuses a
306
+ * provider the platform itself holds no administrative credentials for (an Atlas declaration on a
307
+ * platform with no Atlas API key); which providers a platform can serve is platform configuration.
308
+ *
309
+ * ## What this means when you author an environment
317
310
  *
318
- * **And nothing tells you.** A kind that resolves to no provider is SKIPPED when the lockfile's infra
319
- * section is materialised, silently, because recording an entry with no provider would lie. So a
320
- * managed declaration the catalogue cannot serve looks exactly like a correct one: `wildo config
321
- * sync` succeeds, the file says `MANAGED`, and the environment has no managed anything. Read the
322
- * lockfile's infra section to see which of your declarations were actually resolved.
311
+ * **`MANAGED` reaches almost nothing today.** Of the managed rows in the table above, the only one
312
+ * the platform serves is MongoDB Atlas (`{ source: MANAGED, provider: 'atlas' }`). Every other kind
313
+ * is declared `{ source: SELF }`. The managed PostgreSQL brands and AWS S3 are catalogue entries a
314
+ * module will serve later, not choices you can make now — a kind becomes declarable as `MANAGED` in
315
+ * the same change that adds the module serving it, and there is deliberately no opt-out: a
316
+ * configuration the platform cannot serve would receive a credential for a server the application
317
+ * never connects to.
323
318
  *
324
319
  * **An unrecognised brand is not the same failure on every kind.** On the relational database it
325
- * falls back to the generic managed entry, so a typo still resolves. On the document database and on
326
- * object storage there is no generic fallback, so a typo resolves to nothing and is skipped.
320
+ * falls back to the generic managed entry (which is not servable, so it is refused all the same). On
321
+ * the document database, an unknown managed brand resolves to nothing. Object storage recognizes
322
+ * minio/aws first, then falls back by source: SELF to MinIO, MANAGED to AWS S3, including
323
+ * unrecognized brands.
327
324
  *
328
- * **Declaring a service managed does not always stop the local one being rendered.** The inclusion
329
- * gates in the Compose and Kubernetes lanes are separate from this resolution and cover different
330
- * kinds, so a managed declaration can leave a local container in the rendered stack beside it.
325
+ * **Provider resolution and workload inclusion answer different questions.** Compose and Kubernetes
326
+ * both use the same per-kind inclusion policy, separately from catalogue resolution. Cache, broker
327
+ * and S3 default to self-hosted unless explicitly MANAGED; ClamAV and immudb require explicit SELF.
328
+ * MongoDB and PostgreSQL also include the platform database requirement: an application-level
329
+ * managed choice does not remove a self-hosted database still needed by the platform. Do not infer
330
+ * workload inclusion from this provider resolver.
331
331
  */
332
332
  export declare function resolveInfraProvider(kind: BackingServiceKind, source: BackingServiceSource, provider?: string): InfraProvider | undefined;
333
333
  /** @wildo_source:part:end platform.config.infra-provider-resolution */
@@ -1 +1 @@
1
- {"version":3,"file":"backing-services.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/backing-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,aAAa,EACd,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,EAAE,OAAO;IACT,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB;;;;OAIG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,MAAM,WAAW;CAClB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAuDD;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB;;;;;;kBAE3B,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK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oBAAoB,CAAC;AAEzB;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAShC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,8DAA8D;AAe9D,2HAA2H;AAC3H;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAS3F,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,oBAAoB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,aAAa,GAAG,SAAS,CAsE3B;AACD,uEAAuE"}
1
+ {"version":3,"file":"backing-services.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/backing-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,aAAa,EACd,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,EAAE,OAAO;IACT,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB;;;;OAIG;IACH,MAAM,WAAW;CAQlB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAuDD;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB;;;;;;kBAE3B,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,C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KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,8DAA8D;AAe9D,2HAA2H;AAC3H;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAQ3F,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,oBAAoB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,aAAa,GAAG,SAAS,CA6D3B;AACD,uEAAuE"}
@@ -32,10 +32,13 @@ export var BackingServiceKind;
32
32
  * A stateful DB: a data volume in dev, self-hosted or immudb Vault in prod.
33
33
  */
34
34
  BackingServiceKind["IMMUDB"] = "immudb";
35
- /**
36
- * Backup orchestration target. Stateless base for now.
35
+ /*
36
+ * `backup` was WITHDRAWN 2026-09-26 (#1693), on the #476 precedent that withdrew
37
+ * `metrics-telemetry`: it was declarable, resolved to no provider, rendered no workload, and
38
+ * nothing anywhere read it — a field an author could fill in that did nothing. Backup itself is
39
+ * designed in #8, which decides what an environment declares for it. Do not re-add a kind here
40
+ * before something can serve it: `wildo config sync` refuses a declaration no provider serves.
37
41
  */
38
- BackingServiceKind["BACKUP"] = "backup";
39
42
  })(BackingServiceKind || (BackingServiceKind = {}));
40
43
  /**
41
44
  * Hosting model of a backing service instance — the orthogonal axis to
@@ -168,9 +171,14 @@ export const S3BackingServiceSchema = BackingServiceBaseSchema.extend({
168
171
  /** ClamAV anti-virus daemon. Stateless, no database/vhost/bucket. */
169
172
  export const ClamAvBackingServiceSchema = BackingServiceBaseSchema;
170
173
  /**
171
- * immudb backing service (tamper-evident audit-log store). A stateful DB —
172
- * `database` names the immudb database (defaults to `defaultdb` at runtime);
173
- * credentials come from the secrets pipeline like every other backing service.
174
+ * immudb backing service (tamper-evident audit-log store). A stateful DB.
175
+ *
176
+ * On `source: SELF` the credentials are MINTED, never authored (#1696): the platform
177
+ * gives each application its OWN immudb database and its OWN user, which can write that
178
+ * database and nothing else, and delivers both with the application's platform secrets.
179
+ * The name is derived from the application and kept across re-registrations, so
180
+ * `database` is not read for a self-hosted store; it names the database of a MANAGED
181
+ * one.
174
182
  *
175
183
  * Declare this in EVERY environment where the `COMPLIANCE_AUDIT_TRAIL` engine
176
184
  * capability is enabled. `wildo config sync` warns per environment when the audit
@@ -192,10 +200,6 @@ export const ClamAvBackingServiceSchema = BackingServiceBaseSchema;
192
200
  export const ImmudbBackingServiceSchema = BackingServiceBaseSchema.extend({
193
201
  database: z.string().min(1).optional(),
194
202
  }).strict();
195
- /**
196
- * Backup orchestration target. Stateless base for now.
197
- */
198
- export const BackupBackingServiceSchema = BackingServiceBaseSchema;
199
203
  /**
200
204
  * Per-environment backing services config (source for each service).
201
205
  * Used in environment-specific infra descriptors.
@@ -213,7 +217,6 @@ export const BackingServicesEnvConfigSchema = z.object({
213
217
  [BackingServiceKind.POSTGRESQL]: PostgresBackingServiceSchema.optional(),
214
218
  [BackingServiceKind.CLAMAV]: ClamAvBackingServiceSchema.optional(),
215
219
  [BackingServiceKind.IMMUDB]: ImmudbBackingServiceSchema.optional(),
216
- [BackingServiceKind.BACKUP]: BackupBackingServiceSchema.optional(),
217
220
  }).strict();
218
221
  /** @wildo_source:part:end platform.config.backing-services */
219
222
  // =============================================================================
@@ -245,7 +248,6 @@ export const BackingServiceKindToInfraCapability = {
245
248
  [BackingServiceKind.S3]: InfraCapability.OBJECT_STORAGE,
246
249
  [BackingServiceKind.CLAMAV]: InfraCapability.ANTIVIRUS_SCANNING,
247
250
  [BackingServiceKind.IMMUDB]: InfraCapability.AUDIT_LOG_STORAGE,
248
- [BackingServiceKind.BACKUP]: InfraCapability.BACKUP_MANAGER,
249
251
  };
250
252
  /**
251
253
  * Project `(BackingServiceKind, source, provider?)` → `InfraProvider`.
@@ -257,54 +259,69 @@ export const BackingServiceKindToInfraCapability = {
257
259
  * **Brand vocabulary** per kind (`provider` field on the authored
258
260
  * `BackingService<X>Schema`):
259
261
  *
260
- * | Kind | source | provider | InfraProvider |
261
- * |---|---|---|---|
262
- * | `MONGODB` | `SELF` | (any) | `MONGODB_SELF` |
263
- * | `MONGODB` | `MANAGED` | `'atlas'` | `MONGODB_ATLAS` |
264
- * | `POSTGRESQL` | `SELF` | (any) | `POSTGRES_SELF` |
265
- * | `POSTGRESQL` | `MANAGED` | `'aws-rds'` | `POSTGRES_AWS_RDS` |
266
- * | `POSTGRESQL` | `MANAGED` | `'gcp-cloud-sql'` | `POSTGRES_GCP_CLOUD_SQL` |
267
- * | `POSTGRESQL` | `MANAGED` | `'azure-database'` | `POSTGRES_AZURE_DATABASE` |
268
- * | `POSTGRESQL` | `MANAGED` | `'supabase'` | `POSTGRES_SUPABASE` |
269
- * | `POSTGRESQL` | `MANAGED` | `'neon'` | `POSTGRES_NEON` |
270
- * | `POSTGRESQL` | `MANAGED` | `'render'` | `POSTGRES_RENDER` |
271
- * | `POSTGRESQL` | `MANAGED` | (unset) | `POSTGRES_MANAGED` (generic fallback) |
272
- * | `REDIS` | `SELF` | (any) | `REDIS_SELF` |
273
- * | `RABBITMQ` | `SELF` | (any) | `RABBITMQ_SELF` |
274
- * | `S3` | `SELF` | (`'minio'` or unset) | `MINIO_SELF` |
275
- * | `S3` | `MANAGED` | `'aws'` | `AWS_S3` |
276
- * | `CLAMAV` | `SELF` | (any) | `CLAMAV_SELF` |
277
- * | `IMMUDB` | `SELF` | (any) | `IMMUDB_SELF` |
262
+ * | Kind | source | provider | InfraProvider | Servable today |
263
+ * |---|---|---|---|---|
264
+ * | `MONGODB` | `SELF` | (any) | `MONGODB_SELF` | yes |
265
+ * | `MONGODB` | `MANAGED` | `'atlas'` | `MONGODB_ATLAS` | yes |
266
+ * | `POSTGRESQL` | `SELF` | (any) | `POSTGRES_SELF` | yes |
267
+ * | `POSTGRESQL` | `MANAGED` | `'aws-rds'` | `POSTGRES_AWS_RDS` | no — no module |
268
+ * | `POSTGRESQL` | `MANAGED` | `'gcp-cloud-sql'` | `POSTGRES_GCP_CLOUD_SQL` | no — no module |
269
+ * | `POSTGRESQL` | `MANAGED` | `'azure-database'` | `POSTGRES_AZURE_DATABASE` | no — no module |
270
+ * | `POSTGRESQL` | `MANAGED` | `'supabase'` | `POSTGRES_SUPABASE` | no — no module |
271
+ * | `POSTGRESQL` | `MANAGED` | `'neon'` | `POSTGRES_NEON` | no — no module |
272
+ * | `POSTGRESQL` | `MANAGED` | `'render'` | `POSTGRES_RENDER` | no — no module |
273
+ * | `POSTGRESQL` | `MANAGED` | unset or unrecognized | `POSTGRES_MANAGED` (generic fallback) | no — no module |
274
+ * | `REDIS` | `SELF` | (any) | `REDIS_SELF` | yes |
275
+ * | `RABBITMQ` | `SELF` | (any) | `RABBITMQ_SELF` | yes |
276
+ * | `S3` | (either) | `'minio'` | `MINIO_SELF` | yes |
277
+ * | `S3` | (either) | `'aws'` | `AWS_S3` | no — no credential broker for AWS yet |
278
+ * | `S3` | `SELF` | unset or unrecognized | `MINIO_SELF` | yes |
279
+ * | `S3` | `MANAGED` | unset or unrecognized | `AWS_S3` | no — no credential broker for AWS yet |
280
+ * | `CLAMAV` | `SELF` | (any) | `CLAMAV_SELF` | yes |
281
+ * | `IMMUDB` | `SELF` | (any) | `IMMUDB_SELF` | yes — one database and one confined user minted per application (#1696) |
278
282
  *
279
- * Returns `undefined` for combinations not in the table — for kinds
280
- * whose `InfraProvider` catalog has no concrete entry yet (METRICS,
281
- * BACKUP) and for unrecognized brand strings on managed
282
- * Mongo / S3 (they don't have a generic `<KIND>_MANAGED` fallback,
283
- * unlike Postgres). Callers decide whether `undefined` is fail-closed
284
- * (planner running with unknown infra catalog) or accepted (lockfile
285
- * pre-declaration).
283
+ * Returns `undefined` for combinations not in the table: a managed cache, broker, antivirus scanner
284
+ * or audit store, and a managed MongoDB under any brand other than `'atlas'`. PostgreSQL has a
285
+ * generic managed fallback; S3 uses brand-first resolution, then source-based defaults.
286
286
  *
287
- * ## What this means when you author an environment
287
+ * ## Resolving is not the same as being servable
288
288
  *
289
- * **`MANAGED` does not reach every kind.** The table above is the whole of it: a managed vendor
290
- * resolves for the relational database (six named brands plus a generic fallback), the document
291
- * database (`'atlas'` only) and object storage. Declaring `{ source: MANAGED }` on the cache, the
292
- * broker, the antivirus scanner, the audit store or the backup target resolves to NOTHING — those
293
- * kinds are self-hosted only until their vendor catalogue is built.
289
+ * This function answers only "which catalogue entry does this declaration NAME". Whether the
290
+ * platform can actually deliver that entry — mint the application's credential on the server the
291
+ * application connects to — is a separate question, answered by {@link findUnservableBackingServiceDeclarations}
292
+ * against the provider-module catalogue. A declaration that resolves to nothing, OR to an entry no
293
+ * module can serve (the seven managed PostgreSQL entries, and `AWS_S3` until its credential broker
294
+ * exists), is REFUSED by `wildo config validate`, `wildo config sync` and `wildo lock check`, with a
295
+ * message naming the declarations that ARE servable for that kind.
294
296
  *
295
- * **And nothing tells you.** A kind that resolves to no provider is SKIPPED when the lockfile's infra
296
- * section is materialised, silently, because recording an entry with no provider would lie. So a
297
- * managed declaration the catalogue cannot serve looks exactly like a correct one: `wildo config
298
- * sync` succeeds, the file says `MANAGED`, and the environment has no managed anything. Read the
299
- * lockfile's infra section to see which of your declarations were actually resolved.
297
+ * The same `(source, provider)` pair travels to apps-manager at every registration, and apps-manager
298
+ * resolves it with THIS function and mints the application's credentials on the result — so the provider
299
+ * the lockfile records and the provider a credential is minted on are one answer. It also refuses a
300
+ * provider the platform itself holds no administrative credentials for (an Atlas declaration on a
301
+ * platform with no Atlas API key); which providers a platform can serve is platform configuration.
302
+ *
303
+ * ## What this means when you author an environment
304
+ *
305
+ * **`MANAGED` reaches almost nothing today.** Of the managed rows in the table above, the only one
306
+ * the platform serves is MongoDB Atlas (`{ source: MANAGED, provider: 'atlas' }`). Every other kind
307
+ * is declared `{ source: SELF }`. The managed PostgreSQL brands and AWS S3 are catalogue entries a
308
+ * module will serve later, not choices you can make now — a kind becomes declarable as `MANAGED` in
309
+ * the same change that adds the module serving it, and there is deliberately no opt-out: a
310
+ * configuration the platform cannot serve would receive a credential for a server the application
311
+ * never connects to.
300
312
  *
301
313
  * **An unrecognised brand is not the same failure on every kind.** On the relational database it
302
- * falls back to the generic managed entry, so a typo still resolves. On the document database and on
303
- * object storage there is no generic fallback, so a typo resolves to nothing and is skipped.
314
+ * falls back to the generic managed entry (which is not servable, so it is refused all the same). On
315
+ * the document database, an unknown managed brand resolves to nothing. Object storage recognizes
316
+ * minio/aws first, then falls back by source: SELF to MinIO, MANAGED to AWS S3, including
317
+ * unrecognized brands.
304
318
  *
305
- * **Declaring a service managed does not always stop the local one being rendered.** The inclusion
306
- * gates in the Compose and Kubernetes lanes are separate from this resolution and cover different
307
- * kinds, so a managed declaration can leave a local container in the rendered stack beside it.
319
+ * **Provider resolution and workload inclusion answer different questions.** Compose and Kubernetes
320
+ * both use the same per-kind inclusion policy, separately from catalogue resolution. Cache, broker
321
+ * and S3 default to self-hosted unless explicitly MANAGED; ClamAV and immudb require explicit SELF.
322
+ * MongoDB and PostgreSQL also include the platform database requirement: an application-level
323
+ * managed choice does not remove a self-hosted database still needed by the platform. Do not infer
324
+ * workload inclusion from this provider resolver.
308
325
  */
309
326
  export function resolveInfraProvider(kind, source, provider) {
310
327
  switch (kind) {
@@ -330,11 +347,11 @@ export function resolveInfraProvider(kind, source, provider) {
330
347
  case 'render': return InfraProvider.POSTGRES_RENDER;
331
348
  // Generic fallback when the operator has authored
332
349
  // `source: MANAGED` without naming a brand (or with an
333
- // unrecognized brand). Acceptable while the brand catalog
334
- // is incomplete — the lockfile records `POSTGRES_MANAGED`
335
- // and the planner can still emit env vars + compose
336
- // contributions; brand-specific runtime behavior is what
337
- // the named-brand modules (Slice 4.B+) layer on top.
350
+ // unrecognized brand). Resolving it NAMES the generic
351
+ // catalogue entry; it does not make it servable. No module
352
+ // serves any managed PostgreSQL entry yet, so every one of
353
+ // these is refused by the servability check (#1693) rather
354
+ // than recorded in the lockfile as a selection nothing runs.
338
355
  default: return InfraProvider.POSTGRES_MANAGED;
339
356
  }
340
357
  }
@@ -377,15 +394,6 @@ export function resolveInfraProvider(kind, source, provider) {
377
394
  return InfraProvider.IMMUDB_SELF;
378
395
  // Managed immudb (immudb Vault) — not catalogued yet; future expansion.
379
396
  return undefined;
380
- case BackingServiceKind.BACKUP:
381
- // No concrete `InfraProvider` declared yet for this kind. Extend the `InfraProvider` enum +
382
- // this branch in the same slice that introduces the first concrete provider for it.
383
- //
384
- // `METRICS` was the other kind here and was WITHDRAWN 2026-09-09: telemetry is authored at
385
- // `observability.telemetry` and its auth header derived from the selected
386
- // `OBSERVABILITY_TELEMETRY` provider, so a backing-service kind was a third declaration
387
- // surface that nothing read. See `RUNTIME_GRANTED_INFRA_CAPABILITIES`.
388
- return undefined;
389
397
  }
390
398
  }
391
399
  /** @wildo_source:part:end platform.config.infra-provider-resolution */
@@ -1 +1 @@
1
- {"version":3,"file":"backing-services.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/backing-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,aAAa,GACd,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAN,IAAY,kBAiBX;AAjBD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,qCAAe,CAAA;IACf,2CAAqB,CAAA;IACrB,+BAAS,CAAA;IACT,+CAAyB,CAAA;IACzB,uCAAiB,CAAA;IACjB;;;;OAIG;IACH,uCAAiB,CAAA;IACjB;;OAEG;IACH,uCAAiB,CAAA;AACnB,CAAC,EAjBW,kBAAkB,KAAlB,kBAAkB,QAiB7B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,2CAAmB,CAAA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,CAAC;IACrB,CAAC;AACH,CAAC;AACD,uEAAuE","sourcesContent":["import { z } from 'zod';\nimport {\n InfraCapability,\n InfraProvider,\n} from './infra-providers.schemas';\n\n/**\n * The backing-service authoring surface of `wildo.infra.<env>.config.ts`.\n *\n * Import from `@wildo-ai/platform-config-lib`. Everything below is what an\n * environment file may declare under `backingServices: { ... }` — the closed kind\n * vocabulary, the hosting-model axis, and the per-kind entry shape. The\n * `InfraCapability` / `InfraProvider` projections further down this file are\n * planner-internal and deliberately outside the anchor: an app author never writes\n * them.\n *\n * Declare a kind ONLY when the environment actually runs it — keys are optional so a\n * flattened app declaration stays truthful about what it enables. Omitting a kind an\n * enabled engine capability depends on is the classic silent-degradation bug: e.g.\n * `COMPLIANCE_AUDIT_TRAIL` without `immudb` leaves the tamper-evident audit store\n * unbacked, which `wildo config sync` reports as a warning per environment.\n *\n * @wildo_source:part:start platform.config.backing-services facet:layer:platform facet:family:infra\n */\nexport enum BackingServiceKind {\n MONGODB = 'mongodb',\n REDIS = 'redis',\n RABBITMQ = 'rabbitmq',\n S3 = 's3',\n POSTGRESQL = 'postgresql',\n CLAMAV = 'clamav',\n /**\n * immudb — an immutable, cryptographically-verifiable database used as a\n * tamper-evident audit-log store (fills the `AUDIT_LOG_STORAGE` capability).\n * A stateful DB: a data volume in dev, self-hosted or immudb Vault in prod.\n */\n IMMUDB = 'immudb',\n /**\n * Backup orchestration target. Stateless base for now.\n */\n BACKUP = 'backup',\n}\n\n/**\n * Hosting model of a backing service instance — the orthogonal axis to\n * the **brand** (which is captured by the per-kind `provider` field).\n *\n * - `self`: self-hosted (Docker/K8s container managed by the platform,\n * or operator-managed on-prem). Brands here are open-source\n * software names (e.g. MinIO for S3, vanilla Postgres / MongoDB).\n * - `managed`: external vendor-managed service. Brands here are\n * vendor names (e.g. `'atlas'` for MongoDB Atlas, `'aws-rds'` for\n * AWS RDS, `'supabase'` for Supabase Postgres, `'aws'` for AWS S3).\n *\n * **Slice 4.B.0 reshape (2026-05-07)**: the `ATLAS` value was removed.\n * Pre-reshape `source: ATLAS` becomes `source: MANAGED, provider:\n * 'atlas'`. The reshape generalizes from \"Mongo + S3 are the only\n * brand-aware kinds\" to \"every kind can be brand-aware when the\n * managed market has multiple vendors\" — Postgres in particular\n * (RDS / GCP Cloud SQL / Supabase / Neon / Render / Azure).\n */\nexport enum BackingServiceSource {\n SELF = 'self',\n MANAGED = 'managed',\n}\n\n/**\n * Common fields every backing-service entry shares.\n *\n * Per-kind extensions add the fields that are SEMANTICALLY meaningful\n * for that kind only. Slice 3 closeout (M-4 + L-5): the previous shared\n * `BackingServiceEnvConfigSchema` collapsed `database` into a\n * `union(int, string)` and put `name` only on Mongo; both compromised\n * the framework-mindset rule that \"every field must carry its semantic\n * weight\". The split below means a typo like `redis: { database:\n * 'staging' }` (string on a kind that needs an integer DB index) is\n * rejected at parse time instead of crashing the runtime client at\n * connect time.\n */\nconst BackingServiceBaseSchema = z.object({\n source: z.enum(BackingServiceSource),\n /**\n * Brand of the backing service. Orthogonal to `source` (hosting\n * model). Required-in-spirit when `source === MANAGED` and the\n * managed market has multiple vendors (Mongo: `'atlas'` /\n * `'aws-documentdb'` / …; Postgres: `'aws-rds'` / `'gcp-cloud-sql'`\n * / `'supabase'` / `'neon'` / `'render'` / `'azure-database'`;\n * S3: `'aws'` / `'cloudflare-r2'` / …); optional when `source ===\n * SELF` (e.g. S3-self-hosted defaults to MinIO; `provider:\n * 'minio'` is allowed but redundant).\n *\n * Modeled as `z.string().optional()` rather than per-kind enum\n * unions to keep this base schema simple — the canonical brand\n * vocabulary lives in `resolveInfraProvider`'s dispatch table\n * (each kind documents which brand strings it recognizes; unknown\n * brands fall back to the kind's generic `<KIND>_MANAGED` /\n * `<KIND>_SELF` entry where one exists, otherwise return\n * `undefined`).\n *\n * Slice 4.B.0 (2026-05-07) generalized this from \"S3-only\" to\n * every brand-aware kind.\n */\n provider: z.string().min(1).optional(),\n /**\n * Override the catalog-derived hostname for this kind. Honored at\n * `HOST_FACING` perspective (always) and at `CONTAINER_INTERNAL` for\n * `MANAGED` sources. SELF + `CONTAINER_INTERNAL` keeps the catalog\n * container name because that is the only DNS the container network\n * can resolve.\n */\n host: z.string().min(1).optional(),\n /**\n * Override the catalog-derived listen port. Threaded into both\n * docker-compose `<authored>:<authored>` publish and the per-app\n * env-vars (`<KIND>_PORT`).\n */\n port: z.number().int().positive().optional(),\n}).strict();\n\n/**\n * MongoDB backing service. `database` is the database NAME (string).\n *\n * Mongo's connection URL has the shape `mongodb://host:port/<database>`\n * — this string corresponds to the path segment. Pre-3 the field was\n * `name`; renamed to `database` in Slice 3 closeout (L-5) so all\n * data-store kinds use the same property name for the same concept\n * (vs. Postgres which already used `database`).\n */\nexport const MongoBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type MongoBackingService = z.infer<typeof MongoBackingServiceSchema>;\n\n/**\n * Redis backing service. `database` is the LOGICAL DB INDEX (integer).\n *\n * Redis exposes 16 logical databases (0–15) on a single connection.\n * Authoring a string here (e.g. `'staging'`) would silently parse on\n * the pre-3 union schema and crash ioredis at connect; the integer\n * constraint with `max(15)` fails loud at parse time.\n */\nexport const RedisBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.number().int().min(0).max(15).optional(),\n}).strict();\nexport type RedisBackingService = z.infer<typeof RedisBackingServiceSchema>;\n\n/**\n * PostgreSQL backing service. `database` is the database NAME (string).\n *\n * Symmetric with `MongoBackingService.database` — both are the\n * database identifier in their respective connection URLs.\n */\nexport const PostgresBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type PostgresBackingService = z.infer<typeof PostgresBackingServiceSchema>;\n\n/**\n * RabbitMQ backing service. `vhost` is the RabbitMQ virtual host.\n *\n * AMQP virtual hosts isolate exchange/queue namespaces inside a single\n * broker. NOT a database — RabbitMQ has no DB concept — so the field\n * is intentionally NOT named `database`.\n */\nexport const RabbitBackingServiceSchema = BackingServiceBaseSchema.extend({\n vhost: z.string().min(1).optional(),\n}).strict();\nexport type RabbitBackingService = z.infer<typeof RabbitBackingServiceSchema>;\n\n/**\n * S3-compatible backing service (MinIO, Scaleway Object Storage, AWS).\n *\n * `endpoint` is a URL (`http://localhost:9000`, `https://s3.eu-west.amazonaws.com`)\n * — the resolver parses it into host/port. `bucket` is the S3 bucket\n * name. NOT a database — S3 has no DB concept.\n */\nexport const S3BackingServiceSchema = BackingServiceBaseSchema.extend({\n endpoint: z.string().min(1).optional(),\n bucket: z.string().min(1).optional(),\n}).strict();\nexport type S3BackingService = z.infer<typeof S3BackingServiceSchema>;\n\n/** ClamAV anti-virus daemon. Stateless, no database/vhost/bucket. */\nexport const ClamAvBackingServiceSchema = BackingServiceBaseSchema;\nexport type ClamAvBackingService = z.infer<typeof ClamAvBackingServiceSchema>;\n\n/**\n * immudb backing service (tamper-evident audit-log store). A stateful DB —\n * `database` names the immudb database (defaults to `defaultdb` at runtime);\n * credentials come from the secrets pipeline like every other backing service.\n *\n * Declare this in EVERY environment where the `COMPLIANCE_AUDIT_TRAIL` engine\n * capability is enabled. `wildo config sync` warns per environment when the audit\n * capability is on but no environment declares an audit store, and the audit client\n * then has nowhere tamper-evident to write.\n *\n * You do NOT author the state-signing keypair that makes the store's\n * whole-server-substitution defense work. The framework provisions it (private half\n * mounted into a `source: SELF` immudb via `--signingKey`, public half pinned by the\n * audit client as `IMMUDB_STATE_PUBLIC_KEY`) — declaring the service is the whole job.\n *\n * @example\n * ```ts\n * backingServices: {\n * immudb: { source: BackingServiceSource.SELF },\n * }\n * ```\n */\nexport const ImmudbBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type ImmudbBackingService = z.infer<typeof ImmudbBackingServiceSchema>;\n\n/**\n * Backup orchestration target. Stateless base for now.\n */\nexport const BackupBackingServiceSchema = BackingServiceBaseSchema;\nexport type BackupBackingService = z.infer<typeof BackupBackingServiceSchema>;\n\n/**\n * Discriminated UNION over all backing-service kinds. Used by the\n * `ServiceAddressResolver` and helpers that accept any kind and read\n * only base fields (`source`, `host`, `port`). Consumers that need\n * kind-specific fields MUST narrow first (e.g. via the per-kind type\n * exports above).\n */\nexport type BackingServiceEnvConfig =\n | MongoBackingService\n | RedisBackingService\n | PostgresBackingService\n | RabbitBackingService\n | S3BackingService\n | ClamAvBackingService\n | ImmudbBackingService\n | BackupBackingService;\n\n/**\n * Per-environment backing services config (source for each service).\n * Used in environment-specific infra descriptors.\n *\n * Keys stay optional because an app-owned environment only needs to declare the\n * backing services it actually enables. Requiring the full enum-keyed record\n * would force disabled services (for example `postgresql`) into every env file\n * and breaks truthful flattened targeted-app declarations.\n */\nexport const BackingServicesEnvConfigSchema = z.object({\n [BackingServiceKind.MONGODB]: MongoBackingServiceSchema.optional(),\n [BackingServiceKind.REDIS]: RedisBackingServiceSchema.optional(),\n [BackingServiceKind.RABBITMQ]: RabbitBackingServiceSchema.optional(),\n [BackingServiceKind.S3]: S3BackingServiceSchema.optional(),\n [BackingServiceKind.POSTGRESQL]: PostgresBackingServiceSchema.optional(),\n [BackingServiceKind.CLAMAV]: ClamAvBackingServiceSchema.optional(),\n [BackingServiceKind.IMMUDB]: ImmudbBackingServiceSchema.optional(),\n [BackingServiceKind.BACKUP]: BackupBackingServiceSchema.optional(),\n}).strict();\nexport type BackingServicesEnvConfig = z.infer<typeof BackingServicesEnvConfigSchema>;\n/** @wildo_source:part:end platform.config.backing-services */\n\n// =============================================================================\n// BackingServiceKind ↔ InfraCapability / InfraProvider projections\n// =============================================================================\n//\n// Per `infra-provider-planner.md` R-B (locked 2026-05-06): `BackingServicesEnvConfig`\n// IS the canonical per-env infra-selection authoring surface. The\n// `InfraCapability` / `InfraProvider` enums are the planner's projection\n// vocabulary (used by `InfraProviderModule.supportedCapabilities`,\n// `wildo-saas.lock.json sections.infra` keying, and any tooling that\n// walks \"what infra is selected per env\"). The mappings below are the\n// single source of truth for that projection — no other code may\n// reconstruct them locally.\n\n/** @wildo_source:part:start platform.config.infra-provider-resolution facet:layer:platform facet:audience:app-developer */\n/**\n * `BackingServiceKind` → `InfraCapability`. Every extension to `BackingServiceKind` MUST extend this\n * map in the same commit, otherwise the planner cannot project the new kind to its capability slot.\n *\n * INJECTIVE, not bijective — and the difference is a real property of the model rather than a gap.\n * A capability may be granted to a runtime without any environment declaring a backing service for\n * it; see {@link RUNTIME_GRANTED_INFRA_CAPABILITIES} for the ones that are, and why.\n */\nexport const BackingServiceKindToInfraCapability: Record<BackingServiceKind, InfraCapability> = {\n [BackingServiceKind.MONGODB]: InfraCapability.DOCUMENT_DATABASE,\n [BackingServiceKind.POSTGRESQL]: InfraCapability.RELATIONAL_DATABASE,\n [BackingServiceKind.RABBITMQ]: InfraCapability.QUEUING_SYSTEM,\n [BackingServiceKind.REDIS]: InfraCapability.CACHE_MANAGER,\n [BackingServiceKind.S3]: InfraCapability.OBJECT_STORAGE,\n [BackingServiceKind.CLAMAV]: InfraCapability.ANTIVIRUS_SCANNING,\n [BackingServiceKind.IMMUDB]: InfraCapability.AUDIT_LOG_STORAGE,\n [BackingServiceKind.BACKUP]: InfraCapability.BACKUP_MANAGER,\n};\n\n/**\n * Project `(BackingServiceKind, source, provider?)` → `InfraProvider`.\n *\n * The three-axis dispatch (kind × hosting-model × brand) generalizes\n * the source/brand split across all kinds (Slice 4.B.0, 2026-05-07\n * — was source-only with Atlas as a special source value before).\n *\n * **Brand vocabulary** per kind (`provider` field on the authored\n * `BackingService<X>Schema`):\n *\n * | Kind | source | provider | InfraProvider |\n * |---|---|---|---|\n * | `MONGODB` | `SELF` | (any) | `MONGODB_SELF` |\n * | `MONGODB` | `MANAGED` | `'atlas'` | `MONGODB_ATLAS` |\n * | `POSTGRESQL` | `SELF` | (any) | `POSTGRES_SELF` |\n * | `POSTGRESQL` | `MANAGED` | `'aws-rds'` | `POSTGRES_AWS_RDS` |\n * | `POSTGRESQL` | `MANAGED` | `'gcp-cloud-sql'` | `POSTGRES_GCP_CLOUD_SQL` |\n * | `POSTGRESQL` | `MANAGED` | `'azure-database'` | `POSTGRES_AZURE_DATABASE` |\n * | `POSTGRESQL` | `MANAGED` | `'supabase'` | `POSTGRES_SUPABASE` |\n * | `POSTGRESQL` | `MANAGED` | `'neon'` | `POSTGRES_NEON` |\n * | `POSTGRESQL` | `MANAGED` | `'render'` | `POSTGRES_RENDER` |\n * | `POSTGRESQL` | `MANAGED` | (unset) | `POSTGRES_MANAGED` (generic fallback) |\n * | `REDIS` | `SELF` | (any) | `REDIS_SELF` |\n * | `RABBITMQ` | `SELF` | (any) | `RABBITMQ_SELF` |\n * | `S3` | `SELF` | (`'minio'` or unset) | `MINIO_SELF` |\n * | `S3` | `MANAGED` | `'aws'` | `AWS_S3` |\n * | `CLAMAV` | `SELF` | (any) | `CLAMAV_SELF` |\n * | `IMMUDB` | `SELF` | (any) | `IMMUDB_SELF` |\n *\n * Returns `undefined` for combinations not in the table — for kinds\n * whose `InfraProvider` catalog has no concrete entry yet (METRICS,\n * BACKUP) and for unrecognized brand strings on managed\n * Mongo / S3 (they don't have a generic `<KIND>_MANAGED` fallback,\n * unlike Postgres). Callers decide whether `undefined` is fail-closed\n * (planner running with unknown infra catalog) or accepted (lockfile\n * pre-declaration).\n *\n * ## What this means when you author an environment\n *\n * **`MANAGED` does not reach every kind.** The table above is the whole of it: a managed vendor\n * resolves for the relational database (six named brands plus a generic fallback), the document\n * database (`'atlas'` only) and object storage. Declaring `{ source: MANAGED }` on the cache, the\n * broker, the antivirus scanner, the audit store or the backup target resolves to NOTHING — those\n * kinds are self-hosted only until their vendor catalogue is built.\n *\n * **And nothing tells you.** A kind that resolves to no provider is SKIPPED when the lockfile's infra\n * section is materialised, silently, because recording an entry with no provider would lie. So a\n * managed declaration the catalogue cannot serve looks exactly like a correct one: `wildo config\n * sync` succeeds, the file says `MANAGED`, and the environment has no managed anything. Read the\n * lockfile's infra section to see which of your declarations were actually resolved.\n *\n * **An unrecognised brand is not the same failure on every kind.** On the relational database it\n * falls back to the generic managed entry, so a typo still resolves. On the document database and on\n * object storage there is no generic fallback, so a typo resolves to nothing and is skipped.\n *\n * **Declaring a service managed does not always stop the local one being rendered.** The inclusion\n * gates in the Compose and Kubernetes lanes are separate from this resolution and cover different\n * kinds, so a managed declaration can leave a local container in the rendered stack beside it.\n */\nexport function resolveInfraProvider(\n kind: BackingServiceKind,\n source: BackingServiceSource,\n provider?: string,\n): InfraProvider | undefined {\n switch (kind) {\n case BackingServiceKind.MONGODB:\n if (source === BackingServiceSource.SELF) return InfraProvider.MONGODB_SELF;\n if (source === BackingServiceSource.MANAGED && provider === 'atlas') return InfraProvider.MONGODB_ATLAS;\n // Other Mongo managed brands (e.g., AWS DocumentDB) — extend\n // the `InfraProvider` enum + this branch in the same slice\n // that adds the first concrete consumer.\n return undefined;\n case BackingServiceKind.POSTGRESQL:\n if (source === BackingServiceSource.SELF) return InfraProvider.POSTGRES_SELF;\n if (source === BackingServiceSource.MANAGED) {\n switch (provider) {\n case 'aws-rds': return InfraProvider.POSTGRES_AWS_RDS;\n case 'gcp-cloud-sql': return InfraProvider.POSTGRES_GCP_CLOUD_SQL;\n case 'azure-database': return InfraProvider.POSTGRES_AZURE_DATABASE;\n case 'supabase': return InfraProvider.POSTGRES_SUPABASE;\n case 'neon': return InfraProvider.POSTGRES_NEON;\n case 'render': return InfraProvider.POSTGRES_RENDER;\n // Generic fallback when the operator has authored\n // `source: MANAGED` without naming a brand (or with an\n // unrecognized brand). Acceptable while the brand catalog\n // is incomplete — the lockfile records `POSTGRES_MANAGED`\n // and the planner can still emit env vars + compose\n // contributions; brand-specific runtime behavior is what\n // the named-brand modules (Slice 4.B+) layer on top.\n default: return InfraProvider.POSTGRES_MANAGED;\n }\n }\n return undefined;\n case BackingServiceKind.REDIS:\n if (source === BackingServiceSource.SELF) return InfraProvider.REDIS_SELF;\n // Managed Redis brands (ElastiCache, Upstash, Redis Cloud, …)\n // — not catalogued yet; future expansion.\n return undefined;\n case BackingServiceKind.RABBITMQ:\n if (source === BackingServiceSource.SELF) return InfraProvider.RABBITMQ_SELF;\n // Managed RabbitMQ brands (CloudAMQP, AWS MQ, …) —\n // not catalogued yet; future expansion.\n return undefined;\n case BackingServiceKind.S3:\n // S3 dispatch is brand-first because the protocol is\n // standardized (S3-compatible) and the same `source` can host\n // multiple software stacks — `source: SELF` could be MinIO or\n // a self-managed AWS S3 cluster (theoretically). The brand is\n // the canonical disambiguator.\n if (provider === 'minio') return InfraProvider.MINIO_SELF;\n if (provider === 'aws') return InfraProvider.AWS_S3;\n // Default source-based mapping for unbranded S3 — MinIO is\n // the canonical self-hosted; AWS is the canonical managed.\n if (source === BackingServiceSource.SELF) return InfraProvider.MINIO_SELF;\n if (source === BackingServiceSource.MANAGED) return InfraProvider.AWS_S3;\n return undefined;\n case BackingServiceKind.CLAMAV:\n if (source === BackingServiceSource.SELF) return InfraProvider.CLAMAV_SELF;\n return undefined;\n case BackingServiceKind.IMMUDB:\n if (source === BackingServiceSource.SELF) return InfraProvider.IMMUDB_SELF;\n // Managed immudb (immudb Vault) — not catalogued yet; future expansion.\n return undefined;\n case BackingServiceKind.BACKUP:\n // No concrete `InfraProvider` declared yet for this kind. Extend the `InfraProvider` enum +\n // this branch in the same slice that introduces the first concrete provider for it.\n //\n // `METRICS` was the other kind here and was WITHDRAWN 2026-09-09: telemetry is authored at\n // `observability.telemetry` and its auth header derived from the selected\n // `OBSERVABILITY_TELEMETRY` provider, so a backing-service kind was a third declaration\n // surface that nothing read. See `RUNTIME_GRANTED_INFRA_CAPABILITIES`.\n return undefined;\n }\n}\n/** @wildo_source:part:end platform.config.infra-provider-resolution */\n"]}
1
+ {"version":3,"file":"backing-services.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/backing-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,aAAa,GACd,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG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AO,aAAa,CAAC,WAAW,CAAC;YAC3E,wEAAwE;YACxE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AACD,uEAAuE","sourcesContent":["import { z } from 'zod';\nimport {\n InfraCapability,\n InfraProvider,\n} from './infra-providers.schemas';\n\n/**\n * The backing-service authoring surface of `wildo.infra.<env>.config.ts`.\n *\n * Import from `@wildo-ai/platform-config-lib`. Everything below is what an\n * environment file may declare under `backingServices: { ... }` — the closed kind\n * vocabulary, the hosting-model axis, and the per-kind entry shape. The\n * `InfraCapability` / `InfraProvider` projections further down this file are\n * planner-internal and deliberately outside the anchor: an app author never writes\n * them.\n *\n * Declare a kind ONLY when the environment actually runs it — keys are optional so a\n * flattened app declaration stays truthful about what it enables. Omitting a kind an\n * enabled engine capability depends on is the classic silent-degradation bug: e.g.\n * `COMPLIANCE_AUDIT_TRAIL` without `immudb` leaves the tamper-evident audit store\n * unbacked, which `wildo config sync` reports as a warning per environment.\n *\n * @wildo_source:part:start platform.config.backing-services facet:layer:platform facet:family:infra\n */\nexport enum BackingServiceKind {\n MONGODB = 'mongodb',\n REDIS = 'redis',\n RABBITMQ = 'rabbitmq',\n S3 = 's3',\n POSTGRESQL = 'postgresql',\n CLAMAV = 'clamav',\n /**\n * immudb — an immutable, cryptographically-verifiable database used as a\n * tamper-evident audit-log store (fills the `AUDIT_LOG_STORAGE` capability).\n * A stateful DB: a data volume in dev, self-hosted or immudb Vault in prod.\n */\n IMMUDB = 'immudb',\n /*\n * `backup` was WITHDRAWN 2026-09-26 (#1693), on the #476 precedent that withdrew\n * `metrics-telemetry`: it was declarable, resolved to no provider, rendered no workload, and\n * nothing anywhere read it — a field an author could fill in that did nothing. Backup itself is\n * designed in #8, which decides what an environment declares for it. Do not re-add a kind here\n * before something can serve it: `wildo config sync` refuses a declaration no provider serves.\n */\n}\n\n/**\n * Hosting model of a backing service instance — the orthogonal axis to\n * the **brand** (which is captured by the per-kind `provider` field).\n *\n * - `self`: self-hosted (Docker/K8s container managed by the platform,\n * or operator-managed on-prem). Brands here are open-source\n * software names (e.g. MinIO for S3, vanilla Postgres / MongoDB).\n * - `managed`: external vendor-managed service. Brands here are\n * vendor names (e.g. `'atlas'` for MongoDB Atlas, `'aws-rds'` for\n * AWS RDS, `'supabase'` for Supabase Postgres, `'aws'` for AWS S3).\n *\n * **Slice 4.B.0 reshape (2026-05-07)**: the `ATLAS` value was removed.\n * Pre-reshape `source: ATLAS` becomes `source: MANAGED, provider:\n * 'atlas'`. The reshape generalizes from \"Mongo + S3 are the only\n * brand-aware kinds\" to \"every kind can be brand-aware when the\n * managed market has multiple vendors\" — Postgres in particular\n * (RDS / GCP Cloud SQL / Supabase / Neon / Render / Azure).\n */\nexport enum BackingServiceSource {\n SELF = 'self',\n MANAGED = 'managed',\n}\n\n/**\n * Common fields every backing-service entry shares.\n *\n * Per-kind extensions add the fields that are SEMANTICALLY meaningful\n * for that kind only. Slice 3 closeout (M-4 + L-5): the previous shared\n * `BackingServiceEnvConfigSchema` collapsed `database` into a\n * `union(int, string)` and put `name` only on Mongo; both compromised\n * the framework-mindset rule that \"every field must carry its semantic\n * weight\". The split below means a typo like `redis: { database:\n * 'staging' }` (string on a kind that needs an integer DB index) is\n * rejected at parse time instead of crashing the runtime client at\n * connect time.\n */\nconst BackingServiceBaseSchema = z.object({\n source: z.enum(BackingServiceSource),\n /**\n * Brand of the backing service. Orthogonal to `source` (hosting\n * model). Required-in-spirit when `source === MANAGED` and the\n * managed market has multiple vendors (Mongo: `'atlas'` /\n * `'aws-documentdb'` / …; Postgres: `'aws-rds'` / `'gcp-cloud-sql'`\n * / `'supabase'` / `'neon'` / `'render'` / `'azure-database'`;\n * S3: `'aws'` / `'cloudflare-r2'` / …); optional when `source ===\n * SELF` (e.g. S3-self-hosted defaults to MinIO; `provider:\n * 'minio'` is allowed but redundant).\n *\n * Modeled as `z.string().optional()` rather than per-kind enum\n * unions to keep this base schema simple — the canonical brand\n * vocabulary lives in `resolveInfraProvider`'s dispatch table\n * (each kind documents which brand strings it recognizes; unknown\n * brands fall back to the kind's generic `<KIND>_MANAGED` /\n * `<KIND>_SELF` entry where one exists, otherwise return\n * `undefined`).\n *\n * Slice 4.B.0 (2026-05-07) generalized this from \"S3-only\" to\n * every brand-aware kind.\n */\n provider: z.string().min(1).optional(),\n /**\n * Override the catalog-derived hostname for this kind. Honored at\n * `HOST_FACING` perspective (always) and at `CONTAINER_INTERNAL` for\n * `MANAGED` sources. SELF + `CONTAINER_INTERNAL` keeps the catalog\n * container name because that is the only DNS the container network\n * can resolve.\n */\n host: z.string().min(1).optional(),\n /**\n * Override the catalog-derived listen port. Threaded into both\n * docker-compose `<authored>:<authored>` publish and the per-app\n * env-vars (`<KIND>_PORT`).\n */\n port: z.number().int().positive().optional(),\n}).strict();\n\n/**\n * MongoDB backing service. `database` is the database NAME (string).\n *\n * Mongo's connection URL has the shape `mongodb://host:port/<database>`\n * — this string corresponds to the path segment. Pre-3 the field was\n * `name`; renamed to `database` in Slice 3 closeout (L-5) so all\n * data-store kinds use the same property name for the same concept\n * (vs. Postgres which already used `database`).\n */\nexport const MongoBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type MongoBackingService = z.infer<typeof MongoBackingServiceSchema>;\n\n/**\n * Redis backing service. `database` is the LOGICAL DB INDEX (integer).\n *\n * Redis exposes 16 logical databases (0–15) on a single connection.\n * Authoring a string here (e.g. `'staging'`) would silently parse on\n * the pre-3 union schema and crash ioredis at connect; the integer\n * constraint with `max(15)` fails loud at parse time.\n */\nexport const RedisBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.number().int().min(0).max(15).optional(),\n}).strict();\nexport type RedisBackingService = z.infer<typeof RedisBackingServiceSchema>;\n\n/**\n * PostgreSQL backing service. `database` is the database NAME (string).\n *\n * Symmetric with `MongoBackingService.database` — both are the\n * database identifier in their respective connection URLs.\n */\nexport const PostgresBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type PostgresBackingService = z.infer<typeof PostgresBackingServiceSchema>;\n\n/**\n * RabbitMQ backing service. `vhost` is the RabbitMQ virtual host.\n *\n * AMQP virtual hosts isolate exchange/queue namespaces inside a single\n * broker. NOT a database — RabbitMQ has no DB concept — so the field\n * is intentionally NOT named `database`.\n */\nexport const RabbitBackingServiceSchema = BackingServiceBaseSchema.extend({\n vhost: z.string().min(1).optional(),\n}).strict();\nexport type RabbitBackingService = z.infer<typeof RabbitBackingServiceSchema>;\n\n/**\n * S3-compatible backing service (MinIO, Scaleway Object Storage, AWS).\n *\n * `endpoint` is a URL (`http://localhost:9000`, `https://s3.eu-west.amazonaws.com`)\n * — the resolver parses it into host/port. `bucket` is the S3 bucket\n * name. NOT a database — S3 has no DB concept.\n */\nexport const S3BackingServiceSchema = BackingServiceBaseSchema.extend({\n endpoint: z.string().min(1).optional(),\n bucket: z.string().min(1).optional(),\n}).strict();\nexport type S3BackingService = z.infer<typeof S3BackingServiceSchema>;\n\n/** ClamAV anti-virus daemon. Stateless, no database/vhost/bucket. */\nexport const ClamAvBackingServiceSchema = BackingServiceBaseSchema;\nexport type ClamAvBackingService = z.infer<typeof ClamAvBackingServiceSchema>;\n\n/**\n * immudb backing service (tamper-evident audit-log store). A stateful DB.\n *\n * On `source: SELF` the credentials are MINTED, never authored (#1696): the platform\n * gives each application its OWN immudb database and its OWN user, which can write that\n * database and nothing else, and delivers both with the application's platform secrets.\n * The name is derived from the application and kept across re-registrations, so\n * `database` is not read for a self-hosted store; it names the database of a MANAGED\n * one.\n *\n * Declare this in EVERY environment where the `COMPLIANCE_AUDIT_TRAIL` engine\n * capability is enabled. `wildo config sync` warns per environment when the audit\n * capability is on but no environment declares an audit store, and the audit client\n * then has nowhere tamper-evident to write.\n *\n * You do NOT author the state-signing keypair that makes the store's\n * whole-server-substitution defense work. The framework provisions it (private half\n * mounted into a `source: SELF` immudb via `--signingKey`, public half pinned by the\n * audit client as `IMMUDB_STATE_PUBLIC_KEY`) — declaring the service is the whole job.\n *\n * @example\n * ```ts\n * backingServices: {\n * immudb: { source: BackingServiceSource.SELF },\n * }\n * ```\n */\nexport const ImmudbBackingServiceSchema = BackingServiceBaseSchema.extend({\n database: z.string().min(1).optional(),\n}).strict();\nexport type ImmudbBackingService = z.infer<typeof ImmudbBackingServiceSchema>;\n\n/**\n * Discriminated UNION over all backing-service kinds. Used by the\n * `ServiceAddressResolver` and helpers that accept any kind and read\n * only base fields (`source`, `host`, `port`). Consumers that need\n * kind-specific fields MUST narrow first (e.g. via the per-kind type\n * exports above).\n */\nexport type BackingServiceEnvConfig =\n | MongoBackingService\n | RedisBackingService\n | PostgresBackingService\n | RabbitBackingService\n | S3BackingService\n | ClamAvBackingService\n | ImmudbBackingService;\n\n/**\n * Per-environment backing services config (source for each service).\n * Used in environment-specific infra descriptors.\n *\n * Keys stay optional because an app-owned environment only needs to declare the\n * backing services it actually enables. Requiring the full enum-keyed record\n * would force disabled services (for example `postgresql`) into every env file\n * and breaks truthful flattened targeted-app declarations.\n */\nexport const BackingServicesEnvConfigSchema = z.object({\n [BackingServiceKind.MONGODB]: MongoBackingServiceSchema.optional(),\n [BackingServiceKind.REDIS]: RedisBackingServiceSchema.optional(),\n [BackingServiceKind.RABBITMQ]: RabbitBackingServiceSchema.optional(),\n [BackingServiceKind.S3]: S3BackingServiceSchema.optional(),\n [BackingServiceKind.POSTGRESQL]: PostgresBackingServiceSchema.optional(),\n [BackingServiceKind.CLAMAV]: ClamAvBackingServiceSchema.optional(),\n [BackingServiceKind.IMMUDB]: ImmudbBackingServiceSchema.optional(),\n}).strict();\nexport type BackingServicesEnvConfig = z.infer<typeof BackingServicesEnvConfigSchema>;\n/** @wildo_source:part:end platform.config.backing-services */\n\n// =============================================================================\n// BackingServiceKind ↔ InfraCapability / InfraProvider projections\n// =============================================================================\n//\n// Per `infra-provider-planner.md` R-B (locked 2026-05-06): `BackingServicesEnvConfig`\n// IS the canonical per-env infra-selection authoring surface. The\n// `InfraCapability` / `InfraProvider` enums are the planner's projection\n// vocabulary (used by `InfraProviderModule.supportedCapabilities`,\n// `wildo-saas.lock.json sections.infra` keying, and any tooling that\n// walks \"what infra is selected per env\"). The mappings below are the\n// single source of truth for that projection — no other code may\n// reconstruct them locally.\n\n/** @wildo_source:part:start platform.config.infra-provider-resolution facet:layer:platform facet:audience:app-developer */\n/**\n * `BackingServiceKind` → `InfraCapability`. Every extension to `BackingServiceKind` MUST extend this\n * map in the same commit, otherwise the planner cannot project the new kind to its capability slot.\n *\n * INJECTIVE, not bijective — and the difference is a real property of the model rather than a gap.\n * A capability may be granted to a runtime without any environment declaring a backing service for\n * it; see {@link RUNTIME_GRANTED_INFRA_CAPABILITIES} for the ones that are, and why.\n */\nexport const BackingServiceKindToInfraCapability: Record<BackingServiceKind, InfraCapability> = {\n [BackingServiceKind.MONGODB]: InfraCapability.DOCUMENT_DATABASE,\n [BackingServiceKind.POSTGRESQL]: InfraCapability.RELATIONAL_DATABASE,\n [BackingServiceKind.RABBITMQ]: InfraCapability.QUEUING_SYSTEM,\n [BackingServiceKind.REDIS]: InfraCapability.CACHE_MANAGER,\n [BackingServiceKind.S3]: InfraCapability.OBJECT_STORAGE,\n [BackingServiceKind.CLAMAV]: InfraCapability.ANTIVIRUS_SCANNING,\n [BackingServiceKind.IMMUDB]: InfraCapability.AUDIT_LOG_STORAGE,\n};\n\n/**\n * Project `(BackingServiceKind, source, provider?)` → `InfraProvider`.\n *\n * The three-axis dispatch (kind × hosting-model × brand) generalizes\n * the source/brand split across all kinds (Slice 4.B.0, 2026-05-07\n * — was source-only with Atlas as a special source value before).\n *\n * **Brand vocabulary** per kind (`provider` field on the authored\n * `BackingService<X>Schema`):\n *\n * | Kind | source | provider | InfraProvider | Servable today |\n * |---|---|---|---|---|\n * | `MONGODB` | `SELF` | (any) | `MONGODB_SELF` | yes |\n * | `MONGODB` | `MANAGED` | `'atlas'` | `MONGODB_ATLAS` | yes |\n * | `POSTGRESQL` | `SELF` | (any) | `POSTGRES_SELF` | yes |\n * | `POSTGRESQL` | `MANAGED` | `'aws-rds'` | `POSTGRES_AWS_RDS` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'gcp-cloud-sql'` | `POSTGRES_GCP_CLOUD_SQL` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'azure-database'` | `POSTGRES_AZURE_DATABASE` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'supabase'` | `POSTGRES_SUPABASE` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'neon'` | `POSTGRES_NEON` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | `'render'` | `POSTGRES_RENDER` | no — no module |\n * | `POSTGRESQL` | `MANAGED` | unset or unrecognized | `POSTGRES_MANAGED` (generic fallback) | no — no module |\n * | `REDIS` | `SELF` | (any) | `REDIS_SELF` | yes |\n * | `RABBITMQ` | `SELF` | (any) | `RABBITMQ_SELF` | yes |\n * | `S3` | (either) | `'minio'` | `MINIO_SELF` | yes |\n * | `S3` | (either) | `'aws'` | `AWS_S3` | no — no credential broker for AWS yet |\n * | `S3` | `SELF` | unset or unrecognized | `MINIO_SELF` | yes |\n * | `S3` | `MANAGED` | unset or unrecognized | `AWS_S3` | no — no credential broker for AWS yet |\n * | `CLAMAV` | `SELF` | (any) | `CLAMAV_SELF` | yes |\n * | `IMMUDB` | `SELF` | (any) | `IMMUDB_SELF` | yes — one database and one confined user minted per application (#1696) |\n *\n * Returns `undefined` for combinations not in the table: a managed cache, broker, antivirus scanner\n * or audit store, and a managed MongoDB under any brand other than `'atlas'`. PostgreSQL has a\n * generic managed fallback; S3 uses brand-first resolution, then source-based defaults.\n *\n * ## Resolving is not the same as being servable\n *\n * This function answers only \"which catalogue entry does this declaration NAME\". Whether the\n * platform can actually deliver that entry — mint the application's credential on the server the\n * application connects to — is a separate question, answered by {@link findUnservableBackingServiceDeclarations}\n * against the provider-module catalogue. A declaration that resolves to nothing, OR to an entry no\n * module can serve (the seven managed PostgreSQL entries, and `AWS_S3` until its credential broker\n * exists), is REFUSED by `wildo config validate`, `wildo config sync` and `wildo lock check`, with a\n * message naming the declarations that ARE servable for that kind.\n *\n * The same `(source, provider)` pair travels to apps-manager at every registration, and apps-manager\n * resolves it with THIS function and mints the application's credentials on the result — so the provider\n * the lockfile records and the provider a credential is minted on are one answer. It also refuses a\n * provider the platform itself holds no administrative credentials for (an Atlas declaration on a\n * platform with no Atlas API key); which providers a platform can serve is platform configuration.\n *\n * ## What this means when you author an environment\n *\n * **`MANAGED` reaches almost nothing today.** Of the managed rows in the table above, the only one\n * the platform serves is MongoDB Atlas (`{ source: MANAGED, provider: 'atlas' }`). Every other kind\n * is declared `{ source: SELF }`. The managed PostgreSQL brands and AWS S3 are catalogue entries a\n * module will serve later, not choices you can make now — a kind becomes declarable as `MANAGED` in\n * the same change that adds the module serving it, and there is deliberately no opt-out: a\n * configuration the platform cannot serve would receive a credential for a server the application\n * never connects to.\n *\n * **An unrecognised brand is not the same failure on every kind.** On the relational database it\n * falls back to the generic managed entry (which is not servable, so it is refused all the same). On\n * the document database, an unknown managed brand resolves to nothing. Object storage recognizes\n * minio/aws first, then falls back by source: SELF to MinIO, MANAGED to AWS S3, including\n * unrecognized brands.\n *\n * **Provider resolution and workload inclusion answer different questions.** Compose and Kubernetes\n * both use the same per-kind inclusion policy, separately from catalogue resolution. Cache, broker\n * and S3 default to self-hosted unless explicitly MANAGED; ClamAV and immudb require explicit SELF.\n * MongoDB and PostgreSQL also include the platform database requirement: an application-level\n * managed choice does not remove a self-hosted database still needed by the platform. Do not infer\n * workload inclusion from this provider resolver.\n */\nexport function resolveInfraProvider(\n kind: BackingServiceKind,\n source: BackingServiceSource,\n provider?: string,\n): InfraProvider | undefined {\n switch (kind) {\n case BackingServiceKind.MONGODB:\n if (source === BackingServiceSource.SELF) return InfraProvider.MONGODB_SELF;\n if (source === BackingServiceSource.MANAGED && provider === 'atlas') return InfraProvider.MONGODB_ATLAS;\n // Other Mongo managed brands (e.g., AWS DocumentDB) — extend\n // the `InfraProvider` enum + this branch in the same slice\n // that adds the first concrete consumer.\n return undefined;\n case BackingServiceKind.POSTGRESQL:\n if (source === BackingServiceSource.SELF) return InfraProvider.POSTGRES_SELF;\n if (source === BackingServiceSource.MANAGED) {\n switch (provider) {\n case 'aws-rds': return InfraProvider.POSTGRES_AWS_RDS;\n case 'gcp-cloud-sql': return InfraProvider.POSTGRES_GCP_CLOUD_SQL;\n case 'azure-database': return InfraProvider.POSTGRES_AZURE_DATABASE;\n case 'supabase': return InfraProvider.POSTGRES_SUPABASE;\n case 'neon': return InfraProvider.POSTGRES_NEON;\n case 'render': return InfraProvider.POSTGRES_RENDER;\n // Generic fallback when the operator has authored\n // `source: MANAGED` without naming a brand (or with an\n // unrecognized brand). Resolving it NAMES the generic\n // catalogue entry; it does not make it servable. No module\n // serves any managed PostgreSQL entry yet, so every one of\n // these is refused by the servability check (#1693) rather\n // than recorded in the lockfile as a selection nothing runs.\n default: return InfraProvider.POSTGRES_MANAGED;\n }\n }\n return undefined;\n case BackingServiceKind.REDIS:\n if (source === BackingServiceSource.SELF) return InfraProvider.REDIS_SELF;\n // Managed Redis brands (ElastiCache, Upstash, Redis Cloud, …)\n // — not catalogued yet; future expansion.\n return undefined;\n case BackingServiceKind.RABBITMQ:\n if (source === BackingServiceSource.SELF) return InfraProvider.RABBITMQ_SELF;\n // Managed RabbitMQ brands (CloudAMQP, AWS MQ, …) —\n // not catalogued yet; future expansion.\n return undefined;\n case BackingServiceKind.S3:\n // S3 dispatch is brand-first because the protocol is\n // standardized (S3-compatible) and the same `source` can host\n // multiple software stacks — `source: SELF` could be MinIO or\n // a self-managed AWS S3 cluster (theoretically). The brand is\n // the canonical disambiguator.\n if (provider === 'minio') return InfraProvider.MINIO_SELF;\n if (provider === 'aws') return InfraProvider.AWS_S3;\n // Default source-based mapping for unbranded S3 — MinIO is\n // the canonical self-hosted; AWS is the canonical managed.\n if (source === BackingServiceSource.SELF) return InfraProvider.MINIO_SELF;\n if (source === BackingServiceSource.MANAGED) return InfraProvider.AWS_S3;\n return undefined;\n case BackingServiceKind.CLAMAV:\n if (source === BackingServiceSource.SELF) return InfraProvider.CLAMAV_SELF;\n return undefined;\n case BackingServiceKind.IMMUDB:\n if (source === BackingServiceSource.SELF) return InfraProvider.IMMUDB_SELF;\n // Managed immudb (immudb Vault) — not catalogued yet; future expansion.\n return undefined;\n }\n}\n/** @wildo_source:part:end platform.config.infra-provider-resolution */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"cdn.example.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/cdn.example.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpE;;;;;GAKG;AAEH,kHAAkH;AAIlH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAY1E,CAAC;AACF,0DAA0D;AAE1D,+GAA+G;AAK/G,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAKvE,CAAC;AACF,uDAAuD"}
1
+ {"version":3,"file":"cdn.example.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/cdn.example.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpE;;;;;GAKG;AAEH,kHAAkH;AAIlH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAY1E,CAAC;AACF,0DAA0D;AAE1D,+GAA+G;AAK/G,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAKvE,CAAC;AACF,uDAAuD"}
@@ -1 +1 @@
1
- {"version":3,"file":"cdn.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/cdn.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AAEH;;;;;;;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MAAM,uBAAuB,GAAG,QAAQ,CAC5C,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CACrD,CAAC;AAgHF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAClC,MAAM,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAKjD,CAAC"}
1
+ {"version":3,"file":"csp-defaults.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/csp-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CACrD,CAAC;AAgHF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAClC,MAAM,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAKjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"csp-emit.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/csp-emit.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,KAAK,4BAA4B,EAClC,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CACrD,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,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