@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
@@ -1,13 +1,92 @@
1
1
  import { RuntimeEnvironment } from '@wildo-ai/saas-models';
2
2
  import { z } from 'zod';
3
3
  import { BackingServiceSource } from './shared/backing-services.schemas';
4
- import { DatabaseEngine, WildoDeploymentRuntime, WildoLocationType } from './shared/environment.schemas';
5
- export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
4
+ import { DatabaseEngine, WildoDeploymentRuntime, WildoLocationType, WildoLocalDataStorage, WildoImageTagStrategy } from './shared/environment.schemas';
5
+ /**
6
+ * The shape of a STANDALONE environment descriptor — one that owns its infrastructure.
7
+ *
8
+ * Kept as a plain object rather than inlined into `z.object(...)` because the HOSTED descriptor
9
+ * ({@link WildoHostedInfraEnvConfigSchema}) is built from a subset of these same members. Zod 4 refuses
10
+ * `.pick()` on an object that carries refinements, so sharing the members is the only way the two
11
+ * descriptors can agree on what an application-owned field IS without restating it.
12
+ */
13
+ declare const WILDO_INFRA_ENV_CONFIG_SHAPE: {
14
+ /**
15
+ * Authored schema-format version for this `wildo.infra.<env>.config.ts`,
16
+ * expressed as a **SemVer 2.0.0 string** (e.g. `'1.0.0'`,
17
+ * `'2.3.1-rc.1'`, `'1.0.0+build.42'`).
18
+ *
19
+ * @unimplemented Slice 3.5 wires a parse-time warning when this is
20
+ * authored. The full schema-evolution / migration tooling story is
21
+ * tracked under deferred-backlog **D-5**
22
+ * (`.cursor/plans/post-flattening-completion-fixes.md`). Symmetrical
23
+ * with `WildoSaasConfig.version` — both reservations land/retire
24
+ * together so the migration tooling, when it ships, can target both
25
+ * authored configs through a single mechanism. SemVer (not a bare
26
+ * integer) was chosen for the same reason as on the SaaS-config side
27
+ * — see the JSDoc on `WildoSaasConfig.version`. Field is `.optional()`
28
+ * (no Zod default) so unauthored configs stay silent.
29
+ */
6
30
  version: z.ZodOptional<z.ZodString>;
7
31
  environment: z.ZodString;
8
32
  locationType: z.ZodOptional<z.ZodEnum<typeof WildoLocationType>>;
9
33
  runtimeEnvironment: z.ZodOptional<z.ZodEnum<typeof RuntimeEnvironment>>;
10
34
  runtime: z.ZodEnum<typeof WildoDeploymentRuntime>;
35
+ /**
36
+ * Where the self-hosted backing services of a DOCKER_COMPOSE environment keep their data —
37
+ * a Docker named volume, or a bind mount onto `<saas-root>/.wildo-saas/local_data/<service>/`.
38
+ *
39
+ * Omit it and the environment takes {@link resolveDefaultLocalDataStorage}: a named volume
40
+ * locally (the host-filesystem crossing costs ~4 CPU cores on macOS and Windows, and a named
41
+ * volume costs a Linux developer nothing), a host path remotely (the operator chooses the disk
42
+ * the database lands on). Author it to say otherwise — a remote deployment happy with Docker's
43
+ * own storage, or a local developer who wants to read the files directly.
44
+ *
45
+ * Ignored by KUBERNETES environments, which take their storage from PVs rather than from here.
46
+ */
47
+ localDataStorage: z.ZodOptional<z.ZodEnum<typeof WildoLocalDataStorage>>;
48
+ /**
49
+ * The store the PLATFORM's own data lives in (apps-manager + module-registry:
50
+ * users, organizations, applications, sessions, API keys).
51
+ *
52
+ * **This is a DECLARED property of the environment, and that is the whole point.** It used to
53
+ * exist only as an answer to an interactive prompt, persisted to the machine-local
54
+ * `environments.json` — so it could not be committed, reviewed, or reproduced on a second
55
+ * machine, and a value inferred from which backing services happened to be declared filled the
56
+ * gap. Authoring it here makes it travel with the repository like every other environment
57
+ * property.
58
+ *
59
+ * OPTIONAL. When omitted, the engine is INFERRED from the declared backing services
60
+ * (`inferDatabaseChoiceFromInfraConfig`), which is what every pre-existing environment relies
61
+ * on — so omitting this field preserves today's behaviour exactly. When authored, it is the
62
+ * AUTHORITY and the inference is not consulted.
63
+ *
64
+ * Authoring it is REQUIRED to express a PostgreSQL platform that ALSO runs a mongod, because the
65
+ * inference resolves `postgresql && mongodb` to MongoDB — so that dual-store combination is
66
+ * unreachable by inference, by construction. Since 2026-08-28 a PostgreSQL platform no longer has
67
+ * to declare `backingServices.mongodb` at all (see the refinement below), so the single-store case
68
+ * is now expressible too.
69
+ *
70
+ * @example A PostgreSQL platform, no mongod.
71
+ * ```ts
72
+ * database: { engine: DatabaseEngine.POSTGRESQL, source: BackingServiceSource.SELF },
73
+ * backingServices: { postgresql: { source: BackingServiceSource.SELF } },
74
+ * ```
75
+ *
76
+ * @example A DUAL-STORE platform — PostgreSQL for itself, a mongod beside it for the Mongo-backed
77
+ * applications it hosts. This is the shape that needs `database` authored.
78
+ * ```ts
79
+ * database: { engine: DatabaseEngine.POSTGRESQL, source: BackingServiceSource.SELF },
80
+ * backingServices: {
81
+ * mongodb: { source: BackingServiceSource.SELF },
82
+ * postgresql: { source: BackingServiceSource.SELF },
83
+ * },
84
+ * ```
85
+ *
86
+ * NOTE this is the PLATFORM's engine. An APPLICATION's own store is chosen separately by that
87
+ * application's `DATABASE_DEFAULT_ADAPTER`; declaring `backingServices.postgresql` alone gives an
88
+ * application a PostgreSQL substrate without moving the platform.
89
+ */
11
90
  database: z.ZodOptional<z.ZodObject<{
12
91
  engine: z.ZodEnum<typeof DatabaseEngine>;
13
92
  source: z.ZodEnum<typeof BackingServiceSource>;
@@ -19,17 +98,137 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
19
98
  */
20
99
  provider: z.ZodOptional<z.ZodString>;
21
100
  }, z.core.$strict>>;
101
+ /** @wildo_source:part:start platform.config.application-database facet:layer:platform facet:family:bootstrap facet:audience:app-developer */
102
+ /**
103
+ * Which declared backing store the APPLICATION's own resources persist to.
104
+ *
105
+ * ## Why this is a SEPARATE field from `database`
106
+ *
107
+ * `database` above is the PLATFORM's engine — where apps-manager's own tables live. This one is the
108
+ * application's, and the two move independently: a PostgreSQL platform can host a MongoDB
109
+ * application and vice versa. Collapsing them would make one decision imply the other, which is
110
+ * exactly the conflation the emitter's own contract warns against.
111
+ *
112
+ * ## Why it carries only `engine`
113
+ *
114
+ * The SUBSTRATE is already declared: `backingServices.postgresql` says where the database is and
115
+ * who provisions it, and `env-vars-builder` already emits `POSTGRESQL_HOST/PORT/DATABASE` to the
116
+ * application backend whenever the environment self-hosts one. What was missing is the SELECTION,
117
+ * and only the selection belongs here.
118
+ *
119
+ * ## Why an authored field rather than an env variable
120
+ *
121
+ * The emitter states the rule this field exists to satisfy: *"which store an application persists to
122
+ * is a deployment decision that must be legible in one place, not an emergent property of which
123
+ * variables happen to be set"*. Before this, the only way to select PostgreSQL for an application
124
+ * was to hand-edit `backend-api/.env` — machine-local, ungitted, and not reproducible on another
125
+ * developer's machine. That is the same defect the platform `database` field above was added to
126
+ * remove, and the reason both live in the authored, committed config.
127
+ *
128
+ * Absent means POSTGRESQL (`DEFAULT_APPLICATION_DATABASE_ENGINE`, decided 2026-09-24, #1571), and
129
+ * every reader resolves it through `resolveApplicationDatabaseEngine` rather than re-deriving it —
130
+ * two readers answering silence differently is what stranded an application on 2026-09-15. So an
131
+ * environment that authors nothing here must still declare `backingServices.postgresql`; the
132
+ * refinement below refuses it otherwise.
133
+ *
134
+ * @example An application on PostgreSQL, on a platform that is also on PostgreSQL.
135
+ * ```ts
136
+ * database: { engine: DatabaseEngine.POSTGRESQL, source: BackingServiceSource.SELF },
137
+ * applicationDatabase: { engine: DatabaseEngine.POSTGRESQL },
138
+ * backingServices: {
139
+ * postgresql: { source: BackingServiceSource.SELF, database: 'my-app-db' },
140
+ * },
141
+ * ```
142
+ */
22
143
  applicationDatabase: z.ZodOptional<z.ZodObject<{
23
144
  engine: z.ZodEnum<typeof DatabaseEngine>;
24
145
  }, z.core.$strict>>;
146
+ /**
147
+ * ## Choosing PostgreSQL creates a standing obligation — MIGRATIONS
148
+ *
149
+ * This is the part that is easy to miss, and it is not a detail of deployment: on MongoDB a
150
+ * collection exists the moment something writes to it, so a new resource needs nothing. On
151
+ * PostgreSQL a resource's TABLE is built by a MIGRATION, and nothing creates it implicitly. So on
152
+ * this engine, adding or reshaping a resource owes an artifact:
153
+ *
154
+ * - `wildo db diff` — what separates the model from the accepted plan;
155
+ * - `wildo db generate --name <label>` — writes `backend-api/migrations/<timestamp>_<name>/`
156
+ * AND advances `backend-api/migrations/schema-plan.lock.json`, in one step. Commit them
157
+ * TOGETHER; either one alone is the two-artifact drift the design exists to prevent;
158
+ * - `wildo db migrate` — applies pending migrations by hand. Usually unnecessary: the application
159
+ * backend applies them at BOOT, and `wildo local dev` reconciles drift before the app starts.
160
+ *
161
+ * Skip it and nothing warns until the backend refuses to start with
162
+ * `postgresql_table_schema_mismatch` — an accurate message that names neither the migration nor
163
+ * the command. See the `application-database-migrations` skill.
164
+ */
165
+ /** @wildo_source:part:end platform.config.application-database */
166
+ /**
167
+ * Public domain that browsers and external clients use to reach this
168
+ * deployment. Ingress / reverse proxy / DNS terminate here; every
169
+ * service-level subdomain is mounted under it via {@link serviceHosts}
170
+ * (`https://<serviceHost>.<publicDomain>`, e.g. `app.example.com`; a
171
+ * `serviceHosts` value of `''` mounts the service at the apex). Greenfield,
172
+ * single-app, mono-env — there is NO `<service>-<appSlug>-<env>` fan-out.
173
+ *
174
+ * Applies to BOTH `WildoDeploymentRuntime.KUBERNETES` and
175
+ * `WildoDeploymentRuntime.DOCKER_COMPOSE`. For compose envs without a
176
+ * reverse proxy, author `'localhost'` explicitly. For K8s local,
177
+ * author `'local.wildo.ai'` (or your `*.local` apex). For remote,
178
+ * author your apex (e.g. `'wonder-todos.com'`).
179
+ *
180
+ * NOT to be confused with the K8s-internal service-mesh hostname
181
+ * (`<service>.<namespace>.svc.cluster.local`), which stays implicit
182
+ * and is derived from `kubernetes.namespace` at composition time.
183
+ *
184
+ * REQUIRED — there is no read-time fallback. The default that
185
+ * `wildo init` writes into the generated config file lives in
186
+ * `PUBLIC_DOMAIN_DEFAULTS` (`infrastructure-defaults.schemas.ts`),
187
+ * but the schema enforces explicit authoring so a hand-edited
188
+ * config that drops the field fails Zod parse with a clear error
189
+ * instead of silently falling back.
190
+ */
25
191
  publicDomain: z.ZodString;
192
+ /**
193
+ * Per-service public hostname authoring for this environment.
194
+ *
195
+ * The app developer maps each publicly-exposed service (by its
196
+ * `services.<key>` in `wildo.saas.config.ts`) to the subdomain
197
+ * chain under `publicDomain` where it is reachable in this
198
+ * environment. An empty string value mounts the service at the
199
+ * apex of `publicDomain`.
200
+ *
201
+ * An UNMAPPED service falls back to its own key, lowercased, as its
202
+ * subdomain (`buildServicePublicHost`) — a defined path, not an error;
203
+ * nothing is derived from `frontendType`. Author an entry whenever the
204
+ * key is not the host you want, or is not a valid DNS label. Two
205
+ * services resolving to one host are refused when a REMOTE
206
+ * environment's ingress routes are built (`buildK8sApplicationIngressRoutes`);
207
+ * a local environment builds none and a CDN-served frontend is excluded
208
+ * from them, so neither is checked. (Corrected
209
+ * 2026-09-13: this comment said there was NO derivation from the key,
210
+ * which the resolver has not matched.) An app-dev who wants the
211
+ * docs service to live at `dev.example.com` (rather than the more
212
+ * conventional `docs.example.com`) writes
213
+ * `serviceHosts: { docs: 'dev' }` here; an app-dev who splits
214
+ * marketing across `example.com` and `landing.example.com` can
215
+ * author `serviceHosts: { www: '', landing: 'landing' }` without
216
+ * the framework second-guessing the intent.
217
+ *
218
+ * Field is `.optional()` because many projects (local dev,
219
+ * Docker Compose collapsed to `localhost`, single-frontend SaaS
220
+ * apps) do not need per-service hostname authoring. Downstream
221
+ * consumers (URL composers, ingress manifest generators) MUST
222
+ * handle both "no mapping authored" and "service key not
223
+ * mapped" as defined fallback paths — never as silent errors.
224
+ */
26
225
  serviceHosts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
27
226
  kubernetes: z.ZodOptional<z.ZodObject<{
28
227
  namespace: z.ZodString;
29
- ingressClass: z.ZodOptional<z.ZodString>;
30
228
  services: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
31
229
  replicas: z.ZodOptional<z.ZodNumber>;
32
230
  }, z.core.$strict>>>;
231
+ ingressClass: z.ZodOptional<z.ZodLiteral<"traefik">>;
33
232
  }, z.core.$strict>>;
34
233
  remoteProvider: z.ZodOptional<z.ZodObject<{
35
234
  provider: z.ZodString;
@@ -41,14 +240,13 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
41
240
  deployment: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
42
241
  branch: z.ZodString;
43
242
  runtime: z.ZodLiteral<WildoDeploymentRuntime.DOCKER_COMPOSE>;
44
- imageTagStrategy: z.ZodDefault<z.ZodEnum<typeof import(".").WildoImageTagStrategy>>;
45
- }, z.core.$strip>, z.ZodObject<{
243
+ imageTagStrategy: z.ZodDefault<z.ZodEnum<typeof WildoImageTagStrategy>>;
244
+ }, z.core.$strict>, z.ZodObject<{
46
245
  branch: z.ZodString;
47
246
  runtime: z.ZodLiteral<WildoDeploymentRuntime.KUBERNETES>;
48
- registry: z.ZodOptional<z.ZodString>;
49
247
  namespace: z.ZodOptional<z.ZodString>;
50
- imageTagStrategy: z.ZodDefault<z.ZodEnum<typeof import(".").WildoImageTagStrategy>>;
51
- }, z.core.$strip>], "runtime">>;
248
+ imageTagStrategy: z.ZodDefault<z.ZodEnum<typeof WildoImageTagStrategy>>;
249
+ }, z.core.$strict>], "runtime">>;
52
250
  backingServices: z.ZodObject<{
53
251
  mongodb: z.ZodOptional<z.ZodObject<{
54
252
  source: z.ZodEnum<typeof BackingServiceSource>;
@@ -99,11 +297,349 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
99
297
  port: z.ZodOptional<z.ZodNumber>;
100
298
  database: z.ZodOptional<z.ZodString>;
101
299
  }, z.core.$strict>>;
102
- backup: z.ZodOptional<z.ZodObject<{
300
+ }, z.core.$strict>;
301
+ /**
302
+ * Per-environment logging posture. `level` is projected to `LOG_LEVEL`
303
+ * by `env-vars-builder` for every long-running platform/application
304
+ * process (`LoggerService.loadConfiguration` reads it at boot);
305
+ * `formattedConsoleErrors` is projected to `LOG_FORMATTED_CONSOLE_ERRORS`
306
+ * and overrides the auto-detected pino-pretty / JSON branch for
307
+ * environments that want explicit control. Persisted into
308
+ * `PlatformEnvConfigJson.logging` and hydrated back by
309
+ * `hydrateEnvironmentFromConfig` so the runtime contract survives a
310
+ * `wildo config sync` cycle.
311
+ */
312
+ logging: z.ZodOptional<z.ZodObject<{
313
+ level: z.ZodDefault<z.ZodEnum<{
314
+ error: "error";
315
+ debug: "debug";
316
+ info: "info";
317
+ warn: "warn";
318
+ }>>;
319
+ formattedConsoleErrors: z.ZodOptional<z.ZodBoolean>;
320
+ }, z.core.$strip>>;
321
+ /**
322
+ * Per-environment OTLP telemetry posture (Slice 2 Phase 5). `enabled` is projected to
323
+ * `OTEL_ENABLED` and drives the `--import @wildo-ai/saas-backend-lib/otel-preload` wiring;
324
+ * `endpoint` is projected to `OTEL_EXPORTER_OTLP_ENDPOINT`. The provider auth header
325
+ * (`OTEL_EXPORTER_OTLP_HEADERS`) is derived from the selected `OBSERVABILITY_TELEMETRY`
326
+ * provider's secret by `env-vars-builder`, not authored here. Persisted into
327
+ * `PlatformEnvConfigJson.observability` and hydrated by `hydrateEnvironmentFromConfig`.
328
+ */
329
+ observability: z.ZodOptional<z.ZodObject<{
330
+ enabled: z.ZodDefault<z.ZodBoolean>;
331
+ endpoint: z.ZodOptional<z.ZodString>;
332
+ llmObservability: z.ZodOptional<z.ZodObject<{
333
+ captureContent: z.ZodDefault<z.ZodBoolean>;
334
+ sampleRate: z.ZodOptional<z.ZodNumber>;
335
+ providerEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
336
+ }, z.core.$strip>>;
337
+ }, z.core.$strip>>;
338
+ /**
339
+ * Per-environment external-provider SELECTION override. Overrides the
340
+ * app-wide `providers.scopes.backend.selection[capability]` primary/whenUnavailable
341
+ * from `wildo.saas.config.ts` for THIS environment only — e.g. author
342
+ * `providerSelection: { EMAIL_TRANSACTIONAL: { primary: 'email-preview' } }`
343
+ * in `wildo.infra.local.config.ts` so local uses the non-sending
344
+ * `email-preview` provider while remote envs keep the SaaS-config default
345
+ * (`resend`). Projected to `WILDO_PROVIDER_SELECTION_OVERRIDES` by
346
+ * `env-vars-builder` and applied by `ExternalProvidersRegistryBackendService`.
347
+ * See {@link WildoProviderSelectionOverridesSchema}.
348
+ */
349
+ providerSelection: z.ZodOptional<z.ZodRecord<z.ZodEnum<typeof import("@wildo-ai/saas-models").EngineCapability> & z.core.$partial, z.ZodObject<{
350
+ primary: z.ZodString;
351
+ whenUnavailable: z.ZodOptional<z.ZodArray<z.ZodString>>;
352
+ }, z.core.$strict>>>;
353
+ /**
354
+ * Per-environment provider configuration values — an OAuth client ID, a frontend SDK DSN or site key — laid over
355
+ * `wildo.saas.config.ts > providerConfigurations` key by key for THIS environment. Author here every value a vendor
356
+ * issued against one deployment; keep application policy (an agent execution profile) in the SaaS config.
357
+ * Never a secret: those stay in `secrets.json → providerEnv`. See
358
+ * {@link WildoEnvironmentProviderConfigurationsSchema}.
359
+ */
360
+ providerConfigurations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
361
+ /**
362
+ * Per-environment origins the documentation site is BUILT against.
363
+ *
364
+ * A docs bundle is static, so the origins are compiled in: a bundle built with the
365
+ * wrong ones points every reader at the wrong host rather than failing. Authoring them
366
+ * per environment is what lets `wildo config sync` carry them, instead of an operator
367
+ * remembering three env vars on a build command.
368
+ *
369
+ * Projected to `WILDO_DOCS_API_BASE_URL` / `WILDO_DOCS_APP_URL` /
370
+ * `WILDO_DOCS_FRONTEND_SERVICE_NAME` by `env-vars-builder`.
371
+ * See {@link WildoDocumentationSiteConfigSchema}.
372
+ */
373
+ documentationSite: z.ZodOptional<z.ZodObject<{
374
+ apiBaseUrl: z.ZodOptional<z.ZodString>;
375
+ appUrl: z.ZodOptional<z.ZodString>;
376
+ frontendServiceName: z.ZodOptional<z.ZodString>;
377
+ }, z.core.$strip>>;
378
+ /**
379
+ * Local-only operator configuration for application-creation verification.
380
+ * The authored value is snapshotted into generated `config.json` and then
381
+ * projected into the app-root `.env`; `.env` is never the authoring source.
382
+ */
383
+ applicationCreationVerification: z.ZodOptional<z.ZodObject<{
384
+ evidenceDirectory: z.ZodString;
385
+ silent: z.ZodDefault<z.ZodBoolean>;
386
+ }, z.core.$strict>>;
387
+ serviceAuth: z.ZodOptional<z.ZodObject<{
388
+ accessTokenExpirationMinutes: z.ZodDefault<z.ZodNumber>;
389
+ refreshTokenExpirationDays: z.ZodDefault<z.ZodNumber>;
390
+ }, z.core.$strict>>;
391
+ /**
392
+ * Per-environment Content-Security-Policy overrides, keyed by SaaS-config
393
+ * service key (parallel to the `serviceHosts` keying convention).
394
+ *
395
+ * # Consumer wiring
396
+ *
397
+ * The generic resolver in `platform-config-lib` accepts this layer,
398
+ * and `wildo dev sync-csp` is the first build-time consumer that
399
+ * threads `parsed.csp[serviceKey]` into generated frontend CSP
400
+ * artifacts and nginx marker rewrites. `defineInfraEnvConfig` still
401
+ * emits a one-line stderr warning for authored service keys that are
402
+ * not explicitly declared as consumed by the current loader; known
403
+ * CSP-capable frontend keys are suppressed by the CLI while it loads
404
+ * the shared infra config.
405
+ *
406
+ * Cross-validation against SaaS-config service keys is not enforceable
407
+ * inside this schema alone because the infra config file is parsed
408
+ * independently. Consumers that load both files together must validate
409
+ * their own seam; `wildo dev sync-csp` rejects unknown `csp.<key>`
410
+ * entries before emitting generated artifacts.
411
+ *
412
+ * # Where this fits in the layered CSP cake
413
+ *
414
+ * 1. Platform default (per-`AppFrontendType` baseline) — `csp-defaults.ts`.
415
+ * 2. App-static (per-frontend `csp?` block) — authored on each
416
+ * service-definition (today: `wildo.tech-doc.config.ts.csp?` per
417
+ * `saas-technical-doc.md` Step 7.5).
418
+ * 3. **THIS FIELD** — env-specific overrides authored under
419
+ * `wildo.infra.<env>.config.ts.csp?[serviceKey]`. The
420
+ * `resolveCspPolicy({ envOverride, environmentId })` resolver
421
+ * in `platform-config-lib/src/project-config/shared/csp-emit.ts`
422
+ * accepts this shape, the schema's `superRefine` enforces the
423
+ * LOCAL-only `viteDevLoosening` rule, and `wildo dev sync-csp`
424
+ * reads `parsed.csp[serviceKey]` when generating service-local
425
+ * artifacts.
426
+ *
427
+ * # Why per-env overrides exist
428
+ *
429
+ * - Sentry / DataDog ingest origins differ per deployment (staging
430
+ * vs production violation collectors).
431
+ * - Vite dev mode needs `'unsafe-inline'` + `'unsafe-eval'` in
432
+ * `script-src` (HMR client bootstrap injects an inline `<script>`,
433
+ * module/sourcemap transforms run through `eval()`). The
434
+ * framework auto-applies this for `local` + `SAAS_APP` via the
435
+ * resolver's auto-default; the `viteDevLoosening` field exists
436
+ * only for explicit opt-out (debugging real CSP issues) or for
437
+ * non-canonical envs that also run Vite dev.
438
+ * - Per-env `reportOnly` ramping: ship `reportOnly: true` in
439
+ * staging while the violation collector ramps up, flip to
440
+ * enforcing in prod once the directive overrides settle.
441
+ *
442
+ * # Always additive (resolver contract)
443
+ *
444
+ * Env-layer entries can only LOOSEN policy (`extraDirectives` is
445
+ * APPEND-only over the app-static layer; `reportOnly` / `reportUri`
446
+ * scalars override the app-static value when present;
447
+ * `viteDevLoosening: true` appends `'unsafe-inline'` and
448
+ * `'unsafe-eval'` to `script-src`). There is no `'replace-baseline'`
449
+ * equivalent at this layer — env config exists to LOOSEN per-
450
+ * deployment, not to replace an app's chosen posture. If an env
451
+ * genuinely needs a different posture, the right answer is to fix
452
+ * the app-static layer.
453
+ *
454
+ * # `.optional()` rationale
455
+ *
456
+ * Most environments (local dev, single-frontend SaaS apps that
457
+ * accept the baseline policy verbatim) do not author per-service
458
+ * CSP overrides. Downstream consumers MUST handle both "no overrides
459
+ * authored" and "service key not mapped" as defined no-op fallbacks
460
+ * — never as silent errors.
461
+ *
462
+ * `EnvCspOverrideSchema` is itself `z.strictObject` (csp.schemas.ts),
463
+ * so unknown keys inside an authored override are rejected at the
464
+ * inner-record level — no need to re-apply `.strict()` at the
465
+ * `z.record` value position.
466
+ */
467
+ csp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
468
+ extraDirectives: z.ZodDefault<z.ZodObject<Record<"default-src" | "script-src" | "style-src" | "img-src" | "connect-src" | "font-src" | "frame-src" | "frame-ancestors" | "object-src" | "form-action" | "base-uri" | "manifest-src" | "media-src" | "worker-src", z.ZodOptional<z.ZodArray<z.ZodString>>>, z.core.$strict>>;
469
+ viteDevLoosening: z.ZodOptional<z.ZodBoolean>;
470
+ reportOnly: z.ZodOptional<z.ZodBoolean>;
471
+ reportUri: z.ZodOptional<z.ZodString>;
472
+ }, z.core.$strict>>>;
473
+ /**
474
+ * Per-service OPT-IN to CDN serving, keyed by SaaS-config service key
475
+ * (same keyspace as `serviceHosts` / `csp`). Authoring an `enabled` entry
476
+ * makes the deploy render skip the service's nginx Deployment/Service AND
477
+ * its ingress / compose route — its public host is served off-cluster by a
478
+ * CDN fronting an object-storage bucket, while `runtime.endPoints.publicUrl`
479
+ * stays `<serviceHost>.<publicDomain>` (coherence preserved). See
480
+ * {@link WildoCdnConfigSchema}. `wildo frontend publish` uploads the built
481
+ * `dist/` + re-homes CSP to the edge for these services.
482
+ *
483
+ * `.optional()` — most apps serve every frontend from an nginx pod (no CDN);
484
+ * consumers MUST treat "no cdn authored" and "service key not mapped" as the
485
+ * defined no-op (nginx-served) fallback. `WildoCdnConfigSchema` is itself
486
+ * `z.strictObject`, so unknown keys inside an authored entry are rejected at
487
+ * the inner level — no `.strict()` needed at the `z.record` value position.
488
+ */
489
+ cdn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
490
+ enabled: z.ZodDefault<z.ZodBoolean>;
491
+ bucket: z.ZodOptional<z.ZodString>;
492
+ bucketPrefix: z.ZodOptional<z.ZodString>;
493
+ vendor: z.ZodDiscriminatedUnion<[z.ZodObject<{
494
+ kind: z.ZodLiteral<import(".").CdnVendor.GENERIC>;
495
+ }, z.core.$strict>, z.ZodObject<{
496
+ kind: z.ZodLiteral<import(".").CdnVendor.CLOUDFLARE>;
497
+ zoneId: z.ZodString;
498
+ apiTokenEnvVar: z.ZodDefault<z.ZodString>;
499
+ }, z.core.$strict>], "kind">;
500
+ }, z.core.$strict>>>;
501
+ /**
502
+ * WHERE each declared system of record lives in THIS environment, keyed by the instance name the
503
+ * saas config declares (#1055). See {@link WildoSystemsOfRecordEnvConfigSchema}: either an address,
504
+ * or `{ enabled: false }` for an environment that has no access to the instance at all.
505
+ *
506
+ * `.optional()` — an application that reads nothing out of another system authors none. An instance
507
+ * the saas config DOES declare and this block omits is refused at `wildo config sync` and at boot,
508
+ * because silence is not a declaration of absence; `{ enabled: false }` is.
509
+ */
510
+ systemsOfRecord: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
511
+ enabled: z.ZodLiteral<false>;
512
+ }, z.core.$strict>, z.ZodObject<{
513
+ address: z.ZodRecord<z.ZodString, z.ZodString>;
514
+ }, z.core.$strict>]>>>;
515
+ /**
516
+ * The PLATFORM tier's own object-storage bucket, REMOTE environments only (#1112). See
517
+ * {@link WildoPlatformStorageConfigSchema}: not this application's bucket (that is `backingServices.s3.bucket`),
518
+ * and refused in a local environment, whose platform bucket is a constant shared by every application.
519
+ */
520
+ platformStorage: z.ZodOptional<z.ZodObject<{
521
+ bucket: z.ZodString;
522
+ }, z.core.$strict>>;
523
+ devCompanion: z.ZodOptional<z.ZodObject<{
524
+ host: z.ZodOptional<z.ZodString>;
525
+ port: z.ZodOptional<z.ZodNumber>;
526
+ url: z.ZodOptional<z.ZodString>;
527
+ }, z.core.$strict>>;
528
+ /**
529
+ * Present only on an environment RESOLVED from a hosted descriptor: this application runs on the
530
+ * infrastructure of another application, whose root and descriptor are named here as absolute paths.
531
+ *
532
+ * Never authored in this form. An application declares its host with a RELATIVE
533
+ * `infrastructureHost.applicationRoot` in a hosted descriptor (`defineHostedInfraEnvConfig`, {@link WildoHostedInfraEnvConfigSchema}),
534
+ * and `loadInfraEnvConfig` produces this value while merging the host's platform-level fields in. The
535
+ * absolute-path requirement is what keeps the two apart: a committed descriptor cannot carry a
536
+ * machine-local path, so it cannot pass itself off as already resolved.
537
+ *
538
+ * Every consumer that would otherwise act on SHARED infrastructure — render the platform compose file,
539
+ * converge containers, start or initialize the platform, write platform-service env files, bootstrap a
540
+ * cluster — reads this field and leaves that action to the host.
541
+ */
542
+ infrastructureHost: z.ZodOptional<z.ZodObject<{
543
+ applicationRoot: z.ZodString;
544
+ infraConfigPath: z.ZodString;
545
+ }, z.core.$strict>>;
546
+ };
547
+ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
548
+ version: z.ZodOptional<z.ZodString>;
549
+ environment: z.ZodString;
550
+ locationType: z.ZodOptional<z.ZodEnum<typeof WildoLocationType>>;
551
+ runtimeEnvironment: z.ZodOptional<z.ZodEnum<typeof RuntimeEnvironment>>;
552
+ runtime: z.ZodEnum<typeof WildoDeploymentRuntime>;
553
+ localDataStorage: z.ZodOptional<z.ZodEnum<typeof WildoLocalDataStorage>>;
554
+ database: z.ZodOptional<z.ZodObject<{
555
+ engine: z.ZodEnum<typeof DatabaseEngine>;
556
+ source: z.ZodEnum<typeof BackingServiceSource>;
557
+ /**
558
+ * Managed-brand identifier when `source === MANAGED` — `'atlas'` for Mongo; one of
559
+ * `'aws-rds' | 'gcp-cloud-sql' | 'azure-database' | 'supabase' | 'neon' | 'render'` for
560
+ * Postgres. Mirrors `PlatformEnvConfigJson['database'].provider` exactly; this field is
561
+ * deliberately the same vocabulary rather than a parallel one.
562
+ */
563
+ provider: z.ZodOptional<z.ZodString>;
564
+ }, z.core.$strict>>;
565
+ applicationDatabase: z.ZodOptional<z.ZodObject<{
566
+ engine: z.ZodEnum<typeof DatabaseEngine>;
567
+ }, z.core.$strict>>;
568
+ publicDomain: z.ZodString;
569
+ serviceHosts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
570
+ kubernetes: z.ZodOptional<z.ZodObject<{
571
+ namespace: z.ZodString;
572
+ services: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
573
+ replicas: z.ZodOptional<z.ZodNumber>;
574
+ }, z.core.$strict>>>;
575
+ ingressClass: z.ZodOptional<z.ZodLiteral<"traefik">>;
576
+ }, z.core.$strict>>;
577
+ remoteProvider: z.ZodOptional<z.ZodObject<{
578
+ provider: z.ZodString;
579
+ registryEndpoint: z.ZodString;
580
+ region: z.ZodOptional<z.ZodString>;
581
+ acmeEmail: z.ZodOptional<z.ZodEmail>;
582
+ tlsIssuer: z.ZodOptional<z.ZodEnum<typeof import(".").WildoTlsIssuer>>;
583
+ }, z.core.$strict>>;
584
+ deployment: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
585
+ branch: z.ZodString;
586
+ runtime: z.ZodLiteral<WildoDeploymentRuntime.DOCKER_COMPOSE>;
587
+ imageTagStrategy: z.ZodDefault<z.ZodEnum<typeof WildoImageTagStrategy>>;
588
+ }, z.core.$strict>, z.ZodObject<{
589
+ branch: z.ZodString;
590
+ runtime: z.ZodLiteral<WildoDeploymentRuntime.KUBERNETES>;
591
+ namespace: z.ZodOptional<z.ZodString>;
592
+ imageTagStrategy: z.ZodDefault<z.ZodEnum<typeof WildoImageTagStrategy>>;
593
+ }, z.core.$strict>], "runtime">>;
594
+ backingServices: z.ZodObject<{
595
+ mongodb: z.ZodOptional<z.ZodObject<{
596
+ source: z.ZodEnum<typeof BackingServiceSource>;
597
+ provider: z.ZodOptional<z.ZodString>;
598
+ host: z.ZodOptional<z.ZodString>;
599
+ port: z.ZodOptional<z.ZodNumber>;
600
+ database: z.ZodOptional<z.ZodString>;
601
+ }, z.core.$strict>>;
602
+ redis: z.ZodOptional<z.ZodObject<{
103
603
  source: z.ZodEnum<typeof BackingServiceSource>;
104
604
  provider: z.ZodOptional<z.ZodString>;
105
605
  host: z.ZodOptional<z.ZodString>;
106
606
  port: z.ZodOptional<z.ZodNumber>;
607
+ database: z.ZodOptional<z.ZodNumber>;
608
+ }, z.core.$strict>>;
609
+ rabbitmq: z.ZodOptional<z.ZodObject<{
610
+ source: z.ZodEnum<typeof BackingServiceSource>;
611
+ provider: z.ZodOptional<z.ZodString>;
612
+ host: z.ZodOptional<z.ZodString>;
613
+ port: z.ZodOptional<z.ZodNumber>;
614
+ vhost: z.ZodOptional<z.ZodString>;
615
+ }, z.core.$strict>>;
616
+ s3: z.ZodOptional<z.ZodObject<{
617
+ source: z.ZodEnum<typeof BackingServiceSource>;
618
+ provider: z.ZodOptional<z.ZodString>;
619
+ host: z.ZodOptional<z.ZodString>;
620
+ port: z.ZodOptional<z.ZodNumber>;
621
+ endpoint: z.ZodOptional<z.ZodString>;
622
+ bucket: z.ZodOptional<z.ZodString>;
623
+ }, z.core.$strict>>;
624
+ postgresql: z.ZodOptional<z.ZodObject<{
625
+ source: z.ZodEnum<typeof BackingServiceSource>;
626
+ provider: z.ZodOptional<z.ZodString>;
627
+ host: z.ZodOptional<z.ZodString>;
628
+ port: z.ZodOptional<z.ZodNumber>;
629
+ database: z.ZodOptional<z.ZodString>;
630
+ }, z.core.$strict>>;
631
+ clamav: z.ZodOptional<z.ZodObject<{
632
+ source: z.ZodEnum<typeof BackingServiceSource>;
633
+ provider: z.ZodOptional<z.ZodString>;
634
+ host: z.ZodOptional<z.ZodString>;
635
+ port: z.ZodOptional<z.ZodNumber>;
636
+ }, z.core.$strict>>;
637
+ immudb: z.ZodOptional<z.ZodObject<{
638
+ source: z.ZodEnum<typeof BackingServiceSource>;
639
+ provider: z.ZodOptional<z.ZodString>;
640
+ host: z.ZodOptional<z.ZodString>;
641
+ port: z.ZodOptional<z.ZodNumber>;
642
+ database: z.ZodOptional<z.ZodString>;
107
643
  }, z.core.$strict>>;
108
644
  }, z.core.$strict>;
109
645
  logging: z.ZodOptional<z.ZodObject<{
@@ -128,6 +664,7 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
128
664
  primary: z.ZodString;
129
665
  whenUnavailable: z.ZodOptional<z.ZodArray<z.ZodString>>;
130
666
  }, z.core.$strict>>>;
667
+ providerConfigurations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
131
668
  documentationSite: z.ZodOptional<z.ZodObject<{
132
669
  apiBaseUrl: z.ZodOptional<z.ZodString>;
133
670
  appUrl: z.ZodOptional<z.ZodString>;
@@ -159,17 +696,34 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
159
696
  apiTokenEnvVar: z.ZodDefault<z.ZodString>;
160
697
  }, z.core.$strict>], "kind">;
161
698
  }, z.core.$strict>>>;
699
+ systemsOfRecord: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
700
+ enabled: z.ZodLiteral<false>;
701
+ }, z.core.$strict>, z.ZodObject<{
702
+ address: z.ZodRecord<z.ZodString, z.ZodString>;
703
+ }, z.core.$strict>]>>>;
704
+ platformStorage: z.ZodOptional<z.ZodObject<{
705
+ bucket: z.ZodString;
706
+ }, z.core.$strict>>;
162
707
  devCompanion: z.ZodOptional<z.ZodObject<{
163
708
  host: z.ZodOptional<z.ZodString>;
164
709
  port: z.ZodOptional<z.ZodNumber>;
165
710
  url: z.ZodOptional<z.ZodString>;
166
711
  }, z.core.$strict>>;
712
+ infrastructureHost: z.ZodOptional<z.ZodObject<{
713
+ applicationRoot: z.ZodString;
714
+ infraConfigPath: z.ZodString;
715
+ }, z.core.$strict>>;
167
716
  }, z.core.$strict>, z.ZodTransform<{
168
717
  version: string;
169
718
  environment: string;
170
719
  locationType: WildoLocationType;
171
720
  runtimeEnvironment: RuntimeEnvironment;
172
721
  runtime: WildoDeploymentRuntime;
722
+ /**
723
+ * Resolved here rather than left `undefined` for a downstream consumer to default, so every
724
+ * reader sees one answer. The derivation is total over `WildoLocationType`.
725
+ */
726
+ localDataStorage: WildoLocalDataStorage;
173
727
  /**
174
728
  * Projected EXPLICITLY, like every field here — this list IS the contract, and a field omitted
175
729
  * from it is silently dropped no matter what the input schema accepted. `undefined` when the
@@ -188,10 +742,10 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
188
742
  serviceHosts: Record<string, string>;
189
743
  kubernetes: {
190
744
  namespace: string;
191
- ingressClass?: string;
192
745
  services?: Record<string, {
193
746
  replicas?: number;
194
747
  }>;
748
+ ingressClass?: "traefik";
195
749
  };
196
750
  remoteProvider: {
197
751
  provider: string;
@@ -203,12 +757,11 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
203
757
  deployment: {
204
758
  branch: string;
205
759
  runtime: WildoDeploymentRuntime.DOCKER_COMPOSE;
206
- imageTagStrategy: import(".").WildoImageTagStrategy;
760
+ imageTagStrategy: WildoImageTagStrategy;
207
761
  } | {
208
762
  branch: string;
209
763
  runtime: WildoDeploymentRuntime.KUBERNETES;
210
- imageTagStrategy: import(".").WildoImageTagStrategy;
211
- registry?: string;
764
+ imageTagStrategy: WildoImageTagStrategy;
212
765
  namespace?: string;
213
766
  };
214
767
  backingServices: {
@@ -261,12 +814,6 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
261
814
  port?: number;
262
815
  database?: string;
263
816
  };
264
- backup?: {
265
- source: BackingServiceSource;
266
- provider?: string;
267
- host?: string;
268
- port?: number;
269
- };
270
817
  };
271
818
  logging: {
272
819
  level: "error" | "debug" | "info" | "warn";
@@ -285,6 +832,7 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
285
832
  primary: string;
286
833
  whenUnavailable?: string[];
287
834
  }>>;
835
+ providerConfigurations: Record<string, Record<string, Record<string, unknown>>>;
288
836
  applicationCreationVerification: {
289
837
  evidenceDirectory: string;
290
838
  silent: boolean;
@@ -326,6 +874,14 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
326
874
  apiTokenEnvVar: string;
327
875
  };
328
876
  }>;
877
+ systemsOfRecord: Record<string, {
878
+ enabled: false;
879
+ } | {
880
+ address: Record<string, string>;
881
+ }>;
882
+ platformStorage: {
883
+ bucket: string;
884
+ };
329
885
  documentationSite: {
330
886
  apiBaseUrl?: string;
331
887
  appUrl?: string;
@@ -336,6 +892,10 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
336
892
  port?: number;
337
893
  url?: string;
338
894
  };
895
+ infrastructureHost: {
896
+ applicationRoot: string;
897
+ infraConfigPath: string;
898
+ };
339
899
  }, {
340
900
  environment: string;
341
901
  runtime: WildoDeploymentRuntime;
@@ -390,16 +950,11 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
390
950
  port?: number;
391
951
  database?: string;
392
952
  };
393
- backup?: {
394
- source: BackingServiceSource;
395
- provider?: string;
396
- host?: string;
397
- port?: number;
398
- };
399
953
  };
400
954
  version?: string;
401
955
  locationType?: WildoLocationType;
402
956
  runtimeEnvironment?: RuntimeEnvironment;
957
+ localDataStorage?: WildoLocalDataStorage;
403
958
  database?: {
404
959
  engine: DatabaseEngine;
405
960
  source: BackingServiceSource;
@@ -411,10 +966,10 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
411
966
  serviceHosts?: Record<string, string>;
412
967
  kubernetes?: {
413
968
  namespace: string;
414
- ingressClass?: string;
415
969
  services?: Record<string, {
416
970
  replicas?: number;
417
971
  }>;
972
+ ingressClass?: "traefik";
418
973
  };
419
974
  remoteProvider?: {
420
975
  provider: string;
@@ -426,12 +981,11 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
426
981
  deployment?: {
427
982
  branch: string;
428
983
  runtime: WildoDeploymentRuntime.DOCKER_COMPOSE;
429
- imageTagStrategy: import(".").WildoImageTagStrategy;
984
+ imageTagStrategy: WildoImageTagStrategy;
430
985
  } | {
431
986
  branch: string;
432
987
  runtime: WildoDeploymentRuntime.KUBERNETES;
433
- imageTagStrategy: import(".").WildoImageTagStrategy;
434
- registry?: string;
988
+ imageTagStrategy: WildoImageTagStrategy;
435
989
  namespace?: string;
436
990
  };
437
991
  logging?: {
@@ -451,6 +1005,7 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
451
1005
  primary: string;
452
1006
  whenUnavailable?: string[];
453
1007
  }>>;
1008
+ providerConfigurations?: Record<string, Record<string, Record<string, unknown>>>;
454
1009
  documentationSite?: {
455
1010
  apiBaseUrl?: string;
456
1011
  appUrl?: string;
@@ -497,14 +1052,302 @@ export declare const WildoInfraEnvConfigSchema: z.ZodPipe<z.ZodObject<{
497
1052
  apiTokenEnvVar: string;
498
1053
  };
499
1054
  }>;
1055
+ systemsOfRecord?: Record<string, {
1056
+ enabled: false;
1057
+ } | {
1058
+ address: Record<string, string>;
1059
+ }>;
1060
+ platformStorage?: {
1061
+ bucket: string;
1062
+ };
500
1063
  devCompanion?: {
501
1064
  host?: string;
502
1065
  port?: number;
503
1066
  url?: string;
504
1067
  };
1068
+ infrastructureHost?: {
1069
+ applicationRoot: string;
1070
+ infraConfigPath: string;
1071
+ };
505
1072
  }>>;
506
1073
  export type WildoInfraEnvConfig = z.output<typeof WildoInfraEnvConfigSchema>;
507
1074
  export type WildoInfraEnvConfigInput = z.input<typeof WildoInfraEnvConfigSchema>;
1075
+ /**
1076
+ * Who decides one member of an environment descriptor when the application is HOSTED.
1077
+ *
1078
+ * Several applications share one platform per environment: one application OWNS the infrastructure
1079
+ * (the platform services and every backing service), and the others reference it through
1080
+ * `infrastructureHost`. Each member of the descriptor belongs to exactly one side, and this vocabulary is
1081
+ * how that is stated — per member, in {@link INFRA_ENV_FIELD_OWNERSHIP}, so a member added tomorrow cannot
1082
+ * compile until somebody decides whose it is.
1083
+ */
1084
+ export declare enum InfraEnvFieldOwner {
1085
+ /**
1086
+ * The hosted application authors it, and it may differ from the host's: its public domain, its CSP,
1087
+ * its provider choices, its companion port. Taken verbatim from the hosted descriptor.
1088
+ */
1089
+ APPLICATION = "application",
1090
+ /**
1091
+ * The host decides it, and a hosted descriptor may not author it: the runtime, the platform database,
1092
+ * the cluster, the remote provider, the platform bucket. Authoring one in a hosted descriptor is
1093
+ * refused — two applications on one platform cannot disagree about what that platform is.
1094
+ */
1095
+ HOST = "host",
1096
+ /**
1097
+ * Split inside the member. Backing services: the host owns each SERVER (`source`, `host`, `port`,
1098
+ * `provider`, `endpoint`), the application owns its NAME on that server (database, vhost, bucket).
1099
+ * Kubernetes: the host owns the namespace and ingress class, the application its replica counts.
1100
+ * Deployment: the host owns the runtime, the application its branch and image tagging.
1101
+ */
1102
+ PARTITIONED = "partitioned",
1103
+ /**
1104
+ * Produced by resolution and never authored in its resolved form (`infrastructureHost`).
1105
+ */
1106
+ RESOLUTION = "resolution"
1107
+ }
1108
+ /**
1109
+ * Whose decision each member of a standalone descriptor is, when the application is hosted.
1110
+ *
1111
+ * Total over {@link WILDO_INFRA_ENV_CONFIG_SHAPE} by type, which is the point: `providerConfigurations`
1112
+ * landed on the shape while this feature was being written, and a hosted descriptor built from a
1113
+ * hand-kept list would have dropped it silently. `hosted-infra-env-config.test.ts` pins that the hosted
1114
+ * schema accepts exactly the APPLICATION and PARTITIONED members.
1115
+ */
1116
+ export declare const INFRA_ENV_FIELD_OWNERSHIP: Readonly<Record<keyof typeof WILDO_INFRA_ENV_CONFIG_SHAPE, InfraEnvFieldOwner>>;
1117
+ /**
1118
+ * Which field of a backing-service entry names the APPLICATION'S OWN slice of a shared server.
1119
+ *
1120
+ * `mustDifferFromHost` is true where the framework's fallback for an unnamed slice is a SHARED constant —
1121
+ * `'wildo_app'` for a Mongo or PostgreSQL database, the default vhost `/`, the fixed platform bucket. On
1122
+ * those servers two applications that name the same slice are one application's data, silently, so a
1123
+ * hosted application must name its own and it must not be the host's. Redis is exempt: every application
1124
+ * already shares index 0, isolated by its own ACL principal and key prefix. Immudb's `database` has no
1125
+ * consumer today, so it is stripped from the host's entry and not authored by the hosted one.
1126
+ */
1127
+ export declare const BACKING_SERVICE_APPLICATION_NAME_FIELDS: {
1128
+ readonly mongodb: {
1129
+ readonly field: "database";
1130
+ readonly mustDifferFromHost: true;
1131
+ };
1132
+ readonly redis: {
1133
+ readonly field: "database";
1134
+ readonly mustDifferFromHost: false;
1135
+ };
1136
+ readonly rabbitmq: {
1137
+ readonly field: "vhost";
1138
+ readonly mustDifferFromHost: true;
1139
+ };
1140
+ readonly s3: {
1141
+ readonly field: "bucket";
1142
+ readonly mustDifferFromHost: true;
1143
+ };
1144
+ readonly postgresql: {
1145
+ readonly field: "database";
1146
+ readonly mustDifferFromHost: true;
1147
+ };
1148
+ readonly clamav: any;
1149
+ readonly immudb: {
1150
+ readonly field: "database";
1151
+ readonly mustDifferFromHost: false;
1152
+ };
1153
+ };
1154
+ /**
1155
+ * The backing services a HOSTED application uses — each one a store its host must declare.
1156
+ *
1157
+ * Listing a kind is how the application states it NEEDS that store; the entry carries only the
1158
+ * application's own name on the host's server. Every name field is REQUIRED where
1159
+ * {@link BACKING_SERVICE_APPLICATION_NAME_FIELDS} says the unnamed fallback is shared.
1160
+ */
1161
+ export declare const HostedBackingServicesEnvConfigSchema: z.ZodObject<{
1162
+ mongodb: z.ZodOptional<z.ZodObject<{
1163
+ database: z.ZodString;
1164
+ }, z.core.$strict>>;
1165
+ redis: z.ZodOptional<z.ZodObject<{
1166
+ database: z.ZodOptional<z.ZodNumber>;
1167
+ }, z.core.$strict>>;
1168
+ rabbitmq: z.ZodOptional<z.ZodObject<{
1169
+ vhost: z.ZodString;
1170
+ }, z.core.$strict>>;
1171
+ s3: z.ZodOptional<z.ZodObject<{
1172
+ bucket: z.ZodString;
1173
+ }, z.core.$strict>>;
1174
+ postgresql: z.ZodOptional<z.ZodObject<{
1175
+ database: z.ZodString;
1176
+ }, z.core.$strict>>;
1177
+ clamav: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
1178
+ immudb: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
1179
+ }, z.core.$strict>;
1180
+ export type HostedBackingServicesEnvConfig = z.output<typeof HostedBackingServicesEnvConfigSchema>;
1181
+ /** @wildo_source:part:start platform.config.infrastructure-host facet:layer:platform facet:family:bootstrap facet:audience:app-developer */
1182
+ /**
1183
+ * An environment descriptor for an application that runs on ANOTHER application's infrastructure.
1184
+ *
1185
+ * One application per environment owns the infrastructure — its platform services (apps-manager,
1186
+ * module-registry, crontabs) and every backing service. Other applications declare that owner as their
1187
+ * `infrastructureHost` and author only what is theirs: domain, CSP, provider choices, companion address,
1188
+ * and their own database/vhost/bucket names on the host's servers. Everything else comes from the host's
1189
+ * descriptor for the SAME environment when the descriptor is loaded, so the two cannot diverge — not in
1190
+ * which stores exist, not in how they are reached, not between Docker Compose and Kubernetes.
1191
+ *
1192
+ * The link is per environment: author it in `wildo.infra.local.config.ts` to share a local platform while
1193
+ * `staging` stays standalone, or in both.
1194
+ *
1195
+ * Refusals, all at load time, all naming both descriptors:
1196
+ * - the host root holds no `wildo.saas.config.ts` — a hosted application needs its host's SOURCE checked
1197
+ * out at that path;
1198
+ * - the host has no descriptor for this environment, or is itself hosted;
1199
+ * - a store this application lists is not declared by the host;
1200
+ * - a database, vhost or bucket name equals the host's.
1201
+ *
1202
+ * @example Wonder CRM on Wonder Todos' local platform.
1203
+ * ```ts
1204
+ * export default defineHostedInfraEnvConfig({
1205
+ * environment: WildoEnvironment.LOCAL,
1206
+ * infrastructureHost: { applicationRoot: '../wonder-todos' },
1207
+ * publicDomain: 'localhost',
1208
+ * applicationDatabase: { engine: DatabaseEngine.POSTGRESQL },
1209
+ * backingServices: {
1210
+ * postgresql: { database: 'wonder-crm-db' },
1211
+ * redis: { database: 0 },
1212
+ * rabbitmq: { vhost: 'wonder-crm' },
1213
+ * s3: { bucket: 'wonder-crm-local' },
1214
+ * },
1215
+ * devCompanion: { host: 'localhost', port: 4351 },
1216
+ * });
1217
+ * ```
1218
+ */
1219
+ export declare const WildoHostedInfraEnvConfigSchema: z.ZodObject<{
1220
+ infrastructureHost: z.ZodObject<{
1221
+ /**
1222
+ * The host application's root — the directory holding its `wildo.saas.config.ts` — RELATIVE to this
1223
+ * application's root. Relative because the descriptor is committed: an absolute path is one machine's
1224
+ * checkout layout, and would break on every other.
1225
+ */
1226
+ applicationRoot: z.ZodString;
1227
+ }, z.core.$strict>;
1228
+ version: z.ZodOptional<z.ZodString>;
1229
+ environment: z.ZodString;
1230
+ applicationDatabase: z.ZodOptional<z.ZodObject<{
1231
+ engine: z.ZodEnum<typeof DatabaseEngine>;
1232
+ }, z.core.$strict>>;
1233
+ publicDomain: z.ZodString;
1234
+ serviceHosts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1235
+ kubernetes: z.ZodOptional<z.ZodObject<{
1236
+ services: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1237
+ replicas: z.ZodOptional<z.ZodNumber>;
1238
+ }, z.core.$strict>>>;
1239
+ }, z.core.$strict>>;
1240
+ deployment: z.ZodOptional<z.ZodObject<{
1241
+ branch: z.ZodString;
1242
+ imageTagStrategy: z.ZodOptional<z.ZodEnum<typeof WildoImageTagStrategy>>;
1243
+ }, z.core.$strict>>;
1244
+ backingServices: z.ZodOptional<z.ZodObject<{
1245
+ mongodb: z.ZodOptional<z.ZodObject<{
1246
+ database: z.ZodString;
1247
+ }, z.core.$strict>>;
1248
+ redis: z.ZodOptional<z.ZodObject<{
1249
+ database: z.ZodOptional<z.ZodNumber>;
1250
+ }, z.core.$strict>>;
1251
+ rabbitmq: z.ZodOptional<z.ZodObject<{
1252
+ vhost: z.ZodString;
1253
+ }, z.core.$strict>>;
1254
+ s3: z.ZodOptional<z.ZodObject<{
1255
+ bucket: z.ZodString;
1256
+ }, z.core.$strict>>;
1257
+ postgresql: z.ZodOptional<z.ZodObject<{
1258
+ database: z.ZodString;
1259
+ }, z.core.$strict>>;
1260
+ clamav: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
1261
+ immudb: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
1262
+ }, z.core.$strict>>;
1263
+ logging: z.ZodOptional<z.ZodObject<{
1264
+ level: z.ZodDefault<z.ZodEnum<{
1265
+ error: "error";
1266
+ debug: "debug";
1267
+ info: "info";
1268
+ warn: "warn";
1269
+ }>>;
1270
+ formattedConsoleErrors: z.ZodOptional<z.ZodBoolean>;
1271
+ }, z.core.$strip>>;
1272
+ observability: z.ZodOptional<z.ZodObject<{
1273
+ enabled: z.ZodDefault<z.ZodBoolean>;
1274
+ endpoint: z.ZodOptional<z.ZodString>;
1275
+ llmObservability: z.ZodOptional<z.ZodObject<{
1276
+ captureContent: z.ZodDefault<z.ZodBoolean>;
1277
+ sampleRate: z.ZodOptional<z.ZodNumber>;
1278
+ providerEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1279
+ }, z.core.$strip>>;
1280
+ }, z.core.$strip>>;
1281
+ providerSelection: z.ZodOptional<z.ZodRecord<z.ZodEnum<typeof import("@wildo-ai/saas-models").EngineCapability> & z.core.$partial, z.ZodObject<{
1282
+ primary: z.ZodString;
1283
+ whenUnavailable: z.ZodOptional<z.ZodArray<z.ZodString>>;
1284
+ }, z.core.$strict>>>;
1285
+ providerConfigurations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
1286
+ systemsOfRecord: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
1287
+ enabled: z.ZodLiteral<false>;
1288
+ }, z.core.$strict>, z.ZodObject<{
1289
+ address: z.ZodRecord<z.ZodString, z.ZodString>;
1290
+ }, z.core.$strict>]>>>;
1291
+ documentationSite: z.ZodOptional<z.ZodObject<{
1292
+ apiBaseUrl: z.ZodOptional<z.ZodString>;
1293
+ appUrl: z.ZodOptional<z.ZodString>;
1294
+ frontendServiceName: z.ZodOptional<z.ZodString>;
1295
+ }, z.core.$strip>>;
1296
+ applicationCreationVerification: z.ZodOptional<z.ZodObject<{
1297
+ evidenceDirectory: z.ZodString;
1298
+ silent: z.ZodDefault<z.ZodBoolean>;
1299
+ }, z.core.$strict>>;
1300
+ serviceAuth: z.ZodOptional<z.ZodObject<{
1301
+ accessTokenExpirationMinutes: z.ZodDefault<z.ZodNumber>;
1302
+ refreshTokenExpirationDays: z.ZodDefault<z.ZodNumber>;
1303
+ }, z.core.$strict>>;
1304
+ csp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1305
+ extraDirectives: z.ZodDefault<z.ZodObject<Record<"default-src" | "script-src" | "style-src" | "img-src" | "connect-src" | "font-src" | "frame-src" | "frame-ancestors" | "object-src" | "form-action" | "base-uri" | "manifest-src" | "media-src" | "worker-src", z.ZodOptional<z.ZodArray<z.ZodString>>>, z.core.$strict>>;
1306
+ viteDevLoosening: z.ZodOptional<z.ZodBoolean>;
1307
+ reportOnly: z.ZodOptional<z.ZodBoolean>;
1308
+ reportUri: z.ZodOptional<z.ZodString>;
1309
+ }, z.core.$strict>>>;
1310
+ cdn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1311
+ enabled: z.ZodDefault<z.ZodBoolean>;
1312
+ bucket: z.ZodOptional<z.ZodString>;
1313
+ bucketPrefix: z.ZodOptional<z.ZodString>;
1314
+ vendor: z.ZodDiscriminatedUnion<[z.ZodObject<{
1315
+ kind: z.ZodLiteral<import(".").CdnVendor.GENERIC>;
1316
+ }, z.core.$strict>, z.ZodObject<{
1317
+ kind: z.ZodLiteral<import(".").CdnVendor.CLOUDFLARE>;
1318
+ zoneId: z.ZodString;
1319
+ apiTokenEnvVar: z.ZodDefault<z.ZodString>;
1320
+ }, z.core.$strict>], "kind">;
1321
+ }, z.core.$strict>>>;
1322
+ devCompanion: z.ZodOptional<z.ZodObject<{
1323
+ host: z.ZodOptional<z.ZodString>;
1324
+ port: z.ZodOptional<z.ZodNumber>;
1325
+ url: z.ZodOptional<z.ZodString>;
1326
+ }, z.core.$strict>>;
1327
+ }, z.core.$strict>;
1328
+ /** @wildo_source:part:end platform.config.infrastructure-host */
1329
+ export type WildoHostedInfraEnvConfig = z.output<typeof WildoHostedInfraEnvConfigSchema>;
1330
+ export type WildoHostedInfraEnvConfigInput = z.input<typeof WildoHostedInfraEnvConfigSchema>;
1331
+ /**
1332
+ * What an authored `wildo.infra.<env>.config.ts` evaluates to: a standalone descriptor, or a hosted one
1333
+ * that is NOT usable until `loadInfraEnvConfig` resolves it against its host.
1334
+ */
1335
+ export type WildoAuthoredInfraEnvConfig = WildoInfraEnvConfig | WildoHostedInfraEnvConfig;
1336
+ /**
1337
+ * Whether an evaluated descriptor is a hosted one still awaiting resolution.
1338
+ *
1339
+ * Keyed on the AUTHORED key, exactly as {@link defineInfraEnvConfig} dispatches: an `infrastructureHost`
1340
+ * in its authored form, which names a relative root and no `infraConfigPath`. A RESOLVED hosted
1341
+ * environment carries `infraConfigPath` and is a {@link WildoInfraEnvConfig} — consumers ask
1342
+ * `config.infrastructureHost !== undefined` for that.
1343
+ *
1344
+ * An earlier revision keyed on the absence of `runtime`, reasoning that every standalone descriptor
1345
+ * requires it. That holds for a descriptor built through `defineInfraEnvConfig` and not for a plain
1346
+ * `export default {…}` object, which the loader also evaluates: a partial standalone descriptor with no
1347
+ * `runtime` was read as hosted and crashed on its missing host. Discriminate on what the author wrote,
1348
+ * never on what a schema happens to require.
1349
+ */
1350
+ export declare function isHostedInfraEnvConfig(config: WildoAuthoredInfraEnvConfig): config is WildoHostedInfraEnvConfig;
508
1351
  /**
509
1352
  * Scope `csp.<serviceKey>` warning suppression to the current async load path.
510
1353
  *
@@ -531,4 +1374,18 @@ export declare function withConsumedInfraCspServiceKeys<T>(serviceKeys: Iterable
531
1374
  * format = single-line with backlog ID).
532
1375
  */
533
1376
  export declare function defineInfraEnvConfig(config: WildoInfraEnvConfigInput): WildoInfraEnvConfig;
1377
+ /**
1378
+ * Define an environment descriptor for an application that runs on ANOTHER application's infrastructure.
1379
+ * See {@link WildoHostedInfraEnvConfigSchema} for what it may author and what comes from the host.
1380
+ *
1381
+ * A separate entry point rather than a variant of {@link defineInfraEnvConfig}, deliberately. "This
1382
+ * environment owns its platform" and "this environment runs on someone else's" are different decisions
1383
+ * with different fields, and one function accepting both made a type error in either shape report as "No
1384
+ * overload matches this call" at the call instead of at the offending property — worse feedback for every
1385
+ * author of every descriptor, standalone ones included.
1386
+ *
1387
+ * The result is NOT an environment yet: `loadInfraEnvConfig` resolves it against the host.
1388
+ */
1389
+ export declare function defineHostedInfraEnvConfig(config: WildoHostedInfraEnvConfigInput): WildoHostedInfraEnvConfig;
1390
+ export {};
534
1391
  //# sourceMappingURL=define-infra-env-config.d.ts.map