@wildo-ai/platform-config-lib 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/_unimplemented/soft-warn.d.ts +24 -49
- package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -1
- package/dist/esm/_unimplemented/soft-warn.js +24 -49
- package/dist/esm/_unimplemented/soft-warn.js.map +1 -1
- package/dist/esm/blueprint/anchored-region.d.ts +83 -0
- package/dist/esm/blueprint/anchored-region.d.ts.map +1 -0
- package/dist/esm/blueprint/anchored-region.js +263 -0
- package/dist/esm/blueprint/anchored-region.js.map +1 -0
- package/dist/esm/blueprint/blueprint.schemas.d.ts +600 -0
- package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -0
- package/dist/esm/blueprint/blueprint.schemas.js +638 -0
- package/dist/esm/blueprint/blueprint.schemas.js.map +1 -0
- package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts +13 -1
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.js +6 -0
- package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts +29 -4
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.js +29 -4
- package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +131 -2
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js +139 -2
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/platform-store-preconnect.d.ts +21 -0
- package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
- package/dist/esm/bootstrap/platform-store-preconnect.js +25 -0
- package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -1
- package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts +80 -0
- package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js +81 -0
- package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js.map +1 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +41 -9
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-backing-service-access.js +77 -28
- package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
- package/dist/esm/bootstrap/runtime-network-policy.d.ts +117 -12
- package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-network-policy.js +222 -23
- package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -1
- package/dist/esm/bootstrap/runtime-network-topology.d.ts +31 -4
- package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-network-topology.js +43 -2
- package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
- package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -1
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +40 -2
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-principal.contracts.js +66 -3
- package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -1
- package/dist/esm/bootstrap/runtime-response-integrity.d.ts +249 -0
- package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-response-integrity.js +353 -0
- package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts +32 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.js +43 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -0
- package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
- package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
- package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts +51 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.js +231 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -0
- package/dist/esm/config-authoring.entry.js.map +1 -1
- package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
- package/dist/esm/credentials/credential-generator.service.js.map +1 -1
- package/dist/esm/index.d.ts +20 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +20 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts +119 -0
- package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/application-legacy-envelope-key.contracts.js +109 -0
- package/dist/esm/key-management/application-legacy-envelope-key.contracts.js.map +1 -0
- package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts +182 -0
- package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/application-signing-key-rotation.contracts.js +145 -0
- package/dist/esm/key-management/application-signing-key-rotation.contracts.js.map +1 -0
- package/dist/esm/key-management/approval-seal-manifested-copy.d.ts +156 -0
- package/dist/esm/key-management/approval-seal-manifested-copy.d.ts.map +1 -0
- package/dist/esm/key-management/approval-seal-manifested-copy.js +617 -0
- package/dist/esm/key-management/approval-seal-manifested-copy.js.map +1 -0
- package/dist/esm/key-management/approval-seal-verifier.d.ts +278 -0
- package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -0
- package/dist/esm/key-management/approval-seal-verifier.js +355 -0
- package/dist/esm/key-management/approval-seal-verifier.js.map +1 -0
- package/dist/esm/key-management/approval-seal.contracts.d.ts +128 -0
- package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/approval-seal.contracts.js +135 -0
- package/dist/esm/key-management/approval-seal.contracts.js.map +1 -0
- package/dist/esm/key-management/data-key.contracts.d.ts +106 -0
- package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/data-key.contracts.js +54 -0
- package/dist/esm/key-management/data-key.contracts.js.map +1 -0
- package/dist/esm/key-management/es256-jws.d.ts +60 -0
- package/dist/esm/key-management/es256-jws.d.ts.map +1 -0
- package/dist/esm/key-management/es256-jws.js +135 -0
- package/dist/esm/key-management/es256-jws.js.map +1 -0
- package/dist/esm/key-management/key-provider.spi.d.ts +158 -0
- package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -0
- package/dist/esm/key-management/key-provider.spi.js +38 -0
- package/dist/esm/key-management/key-provider.spi.js.map +1 -0
- package/dist/esm/key-management/keyring-rotation.contracts.d.ts +83 -0
- package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/keyring-rotation.contracts.js +101 -0
- package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -0
- package/dist/esm/key-management/keyring-status.contracts.d.ts +59 -0
- package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/keyring-status.contracts.js +45 -0
- package/dist/esm/key-management/keyring-status.contracts.js.map +1 -0
- package/dist/esm/key-management/pdf-incremental-update.d.ts +158 -0
- package/dist/esm/key-management/pdf-incremental-update.d.ts.map +1 -0
- package/dist/esm/key-management/pdf-incremental-update.js +730 -0
- package/dist/esm/key-management/pdf-incremental-update.js.map +1 -0
- package/dist/esm/key-management/pdf-truetype-font.d.ts +35 -0
- package/dist/esm/key-management/pdf-truetype-font.d.ts.map +1 -0
- package/dist/esm/key-management/pdf-truetype-font.js +152 -0
- package/dist/esm/key-management/pdf-truetype-font.js.map +1 -0
- package/dist/esm/key-management/qr-code.d.ts +38 -0
- package/dist/esm/key-management/qr-code.d.ts.map +1 -0
- package/dist/esm/key-management/qr-code.js +325 -0
- package/dist/esm/key-management/qr-code.js.map +1 -0
- package/dist/esm/key-management/signature-request.contracts.d.ts +91 -0
- package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/signature-request.contracts.js +96 -0
- package/dist/esm/key-management/signature-request.contracts.js.map +1 -0
- package/dist/esm/key-management/signing-log-export.contracts.d.ts +215 -0
- package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/signing-log-export.contracts.js +268 -0
- package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -0
- package/dist/esm/key-management/vault-custody.contracts.d.ts +98 -0
- package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/vault-custody.contracts.js +154 -0
- package/dist/esm/key-management/vault-custody.contracts.js.map +1 -0
- package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -1
- package/dist/esm/lockfile/build-parallelism.js.map +1 -1
- package/dist/esm/lockfile/canonical-json.d.ts +1 -1
- package/dist/esm/lockfile/canonical-json.d.ts.map +1 -1
- package/dist/esm/lockfile/canonical-json.js +1 -1
- package/dist/esm/lockfile/canonical-json.js.map +1 -1
- package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
- package/dist/esm/lockfile/file-lock-hold.js +2 -1
- package/dist/esm/lockfile/file-lock-hold.js.map +1 -1
- package/dist/esm/lockfile/lockfile-io.d.ts +13 -17
- package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
- package/dist/esm/lockfile/lockfile-io.js +29 -30
- package/dist/esm/lockfile/lockfile-io.js.map +1 -1
- package/dist/esm/lockfile/materialize-infra-section.d.ts +22 -20
- package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
- package/dist/esm/lockfile/materialize-infra-section.js +13 -14
- package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +27 -249
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +28 -3
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
- package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts +146 -0
- package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts.map +1 -0
- package/dist/esm/pnpm-settings/application-pnpm-settings.js +573 -0
- package/dist/esm/pnpm-settings/application-pnpm-settings.js.map +1 -0
- package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
- package/dist/esm/project-config/application-public-pricing-catalog.loader.js +22 -3
- package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
- package/dist/esm/project-config/application-served-public-documents.loader.d.ts +26 -0
- package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -0
- package/dist/esm/project-config/application-served-public-documents.loader.js +86 -0
- package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -0
- package/dist/esm/project-config/backend-compliance-section.reader.d.ts +35 -0
- package/dist/esm/project-config/backend-compliance-section.reader.d.ts.map +1 -0
- package/dist/esm/project-config/backend-compliance-section.reader.js +123 -0
- package/dist/esm/project-config/backend-compliance-section.reader.js.map +1 -0
- package/dist/esm/project-config/backend-compliance-section.worker.d.ts +20 -0
- package/dist/esm/project-config/backend-compliance-section.worker.d.ts.map +1 -0
- package/dist/esm/project-config/backend-compliance-section.worker.js +78 -0
- package/dist/esm/project-config/backend-compliance-section.worker.js.map +1 -0
- package/dist/esm/project-config/config-module-resolution.d.ts +32 -0
- package/dist/esm/project-config/config-module-resolution.d.ts.map +1 -0
- package/dist/esm/project-config/config-module-resolution.js +33 -0
- package/dist/esm/project-config/config-module-resolution.js.map +1 -0
- package/dist/esm/project-config/define-framework-config.js.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.d.ts +344 -69
- package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.js +194 -143
- package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
- package/dist/esm/project-config/define-minion-config.d.ts +26 -36
- package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-minion-config.js +64 -25
- package/dist/esm/project-config/define-minion-config.js.map +1 -1
- package/dist/esm/project-config/define-saas-config.d.ts +82 -348
- package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-saas-config.js +262 -103
- package/dist/esm/project-config/define-saas-config.js.map +1 -1
- package/dist/esm/project-config/define-worker-config.d.ts +10 -20
- package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-worker-config.js +10 -12
- package/dist/esm/project-config/define-worker-config.js.map +1 -1
- package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
- package/dist/esm/project-config/hosted-infra-env-config.js +4 -1
- package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
- package/dist/esm/project-config/index.d.ts +5 -0
- package/dist/esm/project-config/index.d.ts.map +1 -1
- package/dist/esm/project-config/index.js +5 -0
- package/dist/esm/project-config/index.js.map +1 -1
- package/dist/esm/project-config/loader-instances-zod.d.ts +19 -0
- package/dist/esm/project-config/loader-instances-zod.d.ts.map +1 -0
- package/dist/esm/project-config/loader-instances-zod.js +40 -0
- package/dist/esm/project-config/loader-instances-zod.js.map +1 -0
- package/dist/esm/project-config/loader.d.ts +131 -14
- package/dist/esm/project-config/loader.d.ts.map +1 -1
- package/dist/esm/project-config/loader.js +226 -12
- package/dist/esm/project-config/loader.js.map +1 -1
- package/dist/esm/project-config/minion-liveness.contracts.d.ts +131 -0
- package/dist/esm/project-config/minion-liveness.contracts.d.ts.map +1 -0
- package/dist/esm/project-config/minion-liveness.contracts.js +167 -0
- package/dist/esm/project-config/minion-liveness.contracts.js.map +1 -0
- package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -1
- package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -1
- package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
- package/dist/esm/project-config/npm-version-range.js +39 -16
- package/dist/esm/project-config/npm-version-range.js.map +1 -1
- package/dist/esm/project-config/owning-package-tsconfig.d.ts +15 -0
- package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -0
- package/dist/esm/project-config/owning-package-tsconfig.js +29 -0
- package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -0
- package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
- package/dist/esm/project-config/provider-companion-discovery.d.ts +4 -4
- package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
- package/dist/esm/project-config/provider-companion-discovery.js +16 -10
- package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts +103 -49
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
- package/dist/esm/project-config/provider-runtime-artifacts.js +216 -16
- package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +0 -2
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
- package/dist/esm/project-config/shared/auth.schemas.d.ts +0 -17
- package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -1
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts +9 -10
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/backing-services.schemas.js +13 -15
- package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/cdn.schemas.d.ts +0 -51
- package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/csp-defaults.d.ts +36 -9
- package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp-defaults.js +54 -11
- package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
- package/dist/esm/project-config/shared/csp-emit.d.ts +60 -13
- package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp-emit.js +77 -24
- package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
- package/dist/esm/project-config/shared/csp.schemas.d.ts +72 -85
- package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp.schemas.js +40 -13
- package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/data-services.schemas.d.ts +0 -8
- package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
- package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.d.ts +101 -8
- package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.js +128 -9
- package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +10 -4
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +2 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +4 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +24 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
- package/dist/esm/project-config/shared/minion-resource-access.validation.js +25 -2
- package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
- package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -1
- package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -1
- package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +276 -0
- package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/platform-key-management.schemas.js +296 -0
- package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +2 -2
- package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/platform-storage.schemas.js +16 -2
- package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +21 -23
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/service-definitions.schemas.js +4 -5
- package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +0 -18
- package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -1
- package/dist/esm/project-config/static-asset-import-noop.d.ts +20 -3
- package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -1
- package/dist/esm/project-config/static-asset-import-noop.js +36 -20
- package/dist/esm/project-config/static-asset-import-noop.js.map +1 -1
- package/dist/esm/registry/artifact-domain.schemas.d.ts +0 -5
- package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
- package/dist/esm/registry/artifact-domain.schemas.js.map +1 -1
- package/dist/esm/registry/digest.schemas.js.map +1 -1
- package/dist/esm/registry/index.d.ts +3 -3
- package/dist/esm/registry/index.d.ts.map +1 -1
- package/dist/esm/registry/index.js +3 -3
- package/dist/esm/registry/index.js.map +1 -1
- package/dist/esm/registry/local-checkout-source.d.ts +22 -2
- package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
- package/dist/esm/registry/local-checkout-source.js +66 -3
- package/dist/esm/registry/local-checkout-source.js.map +1 -1
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +11 -98
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
- package/dist/esm/registry/lockfile-modules-section.schemas.js +1 -2
- package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
- package/dist/esm/registry/module-artifact.schemas.d.ts +40 -17
- package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
- package/dist/esm/registry/module-manifest.schemas.d.ts +324 -74
- package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-manifest.schemas.js +377 -19
- package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
- package/dist/esm/registry/module-search.schemas.d.ts +2 -0
- package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-search.schemas.js +14 -1
- package/dist/esm/registry/module-search.schemas.js.map +1 -1
- package/dist/esm/registry/registry-config.schemas.d.ts +0 -18
- package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
- package/dist/esm/registry/registry-config.schemas.js.map +1 -1
- package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -1
- package/dist/esm/registry/registry-defaults.constants.js.map +1 -1
- package/dist/esm/registry/registry-errors.d.ts +103 -5
- package/dist/esm/registry/registry-errors.d.ts.map +1 -1
- package/dist/esm/registry/registry-errors.js +213 -6
- package/dist/esm/registry/registry-errors.js.map +1 -1
- package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
- package/dist/esm/registry/registry-section-schemas.constants.d.ts +5 -0
- package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
- package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -1
- package/dist/esm/registry/registry-url-resolution.d.ts +72 -0
- package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -0
- package/dist/esm/registry/registry-url-resolution.js +157 -0
- package/dist/esm/registry/registry-url-resolution.js.map +1 -0
- package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
- package/dist/esm/release/framework-release.constants.js.map +1 -1
- package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.d.ts +48 -0
- package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.js +53 -0
- package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
- package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-config.schemas.d.ts +2 -2
- package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
- package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -1
- package/dist/esm/workspace-scope/index.js.map +1 -1
- package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
- package/dist/esm/workspace-scope/resolve-homes.js.map +1 -1
- package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/dist/esm/_unimplemented/index.d.ts +0 -3
- package/dist/esm/_unimplemented/index.d.ts.map +0 -1
- package/dist/esm/_unimplemented/index.js +0 -3
- package/dist/esm/_unimplemented/index.js.map +0 -1
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +0 -137
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +0 -1
- package/dist/esm/_unimplemented/unimplemented-field-warning.js +0 -153
- package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +0 -1
- package/dist/esm/project-config/shared/cdn.example.d.ts +0 -14
- package/dist/esm/project-config/shared/cdn.example.d.ts.map +0 -1
- package/dist/esm/project-config/shared/cdn.example.js +0 -38
- package/dist/esm/project-config/shared/cdn.example.js.map +0 -1
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts +0 -15
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +0 -1
- package/dist/esm/project-config/shared/schema-version.schemas.js +0 -40
- package/dist/esm/project-config/shared/schema-version.schemas.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/environment.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAA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AAC;IAED,OAAO,GAAG,iBAAiB,IAAI,uBAAuB,EAAE,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,OAAe,EACf,aAAqB;IAErB,OAAO,GAAG,yBAAyB,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC;AACrE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD;;;OAGG;IACH,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC/C;;;OAGG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3C;;;OAGG;IACH,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { EngineCapability } from '@wildo-ai/saas-models';\nimport { InfraServiceK8sSchema } from './infra-service.schemas';\n\n/**\n * @wildo_source:part:start platform.config.environment.deployment facet:layer:platform facet:family:infra\n *\n * Convenience environment ids kept for common local/staging/production setups.\n *\n * The project model is no longer limited to a fixed environment set: remote\n * environment ids can be any slug-like value. Use `WildoEnvironmentIdSchema`\n * for authoritative validation.\n */\nexport enum WildoEnvironment {\n LOCAL = 'local',\n STAGING = 'staging',\n PRODUCTION = 'production',\n}\n\nexport const WildoEnvironmentIdSchema = z\n .string()\n .min(1)\n .regex(\n /^[a-z0-9]+(?:-[a-z0-9]+)*$/,\n 'environment ids must be lowercase alphanumeric with optional hyphen-separated segments',\n );\nexport type WildoEnvironmentId = z.infer<typeof WildoEnvironmentIdSchema>;\n\n/**\n * Deployment runtime targets for CI/CD workflows and infra config.\n *\n * Single source of truth for deployment runtime targets, used by both\n * platform-config-lib (developer-facing config) and wildo-cli (operational).\n */\nexport enum WildoDeploymentRuntime {\n DOCKER_COMPOSE = 'docker-compose',\n KUBERNETES = 'kubernetes',\n}\n\nexport enum WildoLocationType {\n LOCAL = 'local',\n REMOTE = 'remote',\n}\n\nexport function isLocalEnvironmentId(environmentId: string): boolean {\n return environmentId === WildoEnvironment.LOCAL;\n}\n\n/**\n * Where a docker-compose backing service keeps its DATA.\n *\n * The two members are not a performance knob with a fast and a slow setting — they answer a\n * question about ownership, and the cost follows from the answer:\n *\n * - `HOST_PATH` — the data lives at an explicit path on the host\n * (`<saas-root>/.wildo-saas/local_data/<service>/`), bind-mounted into the container. The\n * operator chooses the disk, backups target a known directory, and the tree is the same one the\n * Kind k8s lane hostPath-mounts at `/mnt/local-data/<service>/`. That control is why it is the\n * REMOTE default: a production operator who has provisioned a dedicated data volume must be able\n * to put the database on it, and a named volume would silently land it under\n * `/var/lib/docker/volumes/` on the root disk.\n * - `DOCKER_VOLUME` — the data lives in a Docker named volume, inside the container runtime's own\n * storage. Nobody outside Docker addresses it, which is exactly what makes it right for a\n * disposable development stack.\n *\n * ## Why LOCAL defaults to `DOCKER_VOLUME`\n *\n * On Linux a bind mount is a native path and costs nothing. On macOS and Windows the container\n * runtime is a VM, and a host bind mount crosses a filesystem bridge — VirtioFS on macOS, 9p/\n * VirtioFS through WSL2 on Windows. Databases do small fsync'd random writes, so every one of them\n * becomes a round trip out of the VM.\n *\n * Measured on macOS (Apple Virtualization, 6 vCPU) on 2026-09-22 with the eight self-hosted backing\n * services bind-mounted: the VM process held **13,786 host file descriptors** open across 14,168\n * files and burned **383% CPU** in Docker Desktop's file-sharing process — sustained, a 321%\n * average over 2 days 5 hours — while the containers themselves used 0.7 of a core and container\n * block-IO accounting stayed flat, because none of that traffic reaches the VM's own block device.\n * Roughly four cores of pure filesystem translation for 0.7 of a core of database work.\n *\n * The default is uniform across all three development operating systems rather than \"volumes on\n * macOS and Windows, host paths on Linux\", so every developer and CI run exercise the same stack\n * and a bug reproduces the same way everywhere. It costs a Linux developer nothing: a named volume\n * is a native directory there too.\n *\n * Both members are authorable per environment (`localDataStorage`), so a remote operator who wants\n * volumes and a local developer who wants to read the files from their file manager each say so.\n *\n * NOTE this governs DATA directories only. The two small secret FILES compose mounts read-only —\n * immudb's state-signing key and mongot's sync-source password — are materialized from\n * `secrets.json` onto the host and stay host mounts under every mode. They are read once at\n * startup, so they carry none of the cost above, and they have nowhere else to come from.\n */\nexport enum WildoLocalDataStorage {\n DOCKER_VOLUME = 'docker-volume',\n HOST_PATH = 'host-path',\n}\n\n/**\n * The `localDataStorage` an environment gets when it authors none.\n *\n * Total over {@link WildoLocationType} rather than a conditional on one member, so a location type\n * added to the vocabulary tomorrow is a compile error here instead of silently inheriting whichever\n * branch happened to be the `else`.\n */\nexport function resolveDefaultLocalDataStorage(locationType: WildoLocationType): WildoLocalDataStorage {\n switch (locationType) {\n case WildoLocationType.LOCAL:\n return WildoLocalDataStorage.DOCKER_VOLUME;\n case WildoLocationType.REMOTE:\n return WildoLocalDataStorage.HOST_PATH;\n }\n}\n\n/**\n * Ingress controller installed by Wildo's local and remote Kubernetes workflows.\n * Import from `@wildo-ai/platform-config-lib`. Traefik owns both application\n * routing and HTTP-01 challenge routing; selecting another controller is not\n * supported by the generated installation contract.\n */\nexport enum WildoKubernetesIngressClass {\n TRAEFIK = 'traefik',\n}\n\n/**\n * K8s-internal cluster topology. Holds ONLY values that are genuinely\n * specific to a Kubernetes deployment: namespace, ingress class and\n * per-service workload replica counts.\n *\n * The external/public hostname (where browsers and reverse proxies hit\n * us) is NOT here — it lives at the top level of `WildoInfraEnvConfig`\n * as `publicDomain` because it applies to BOTH `KUBERNETES` and\n * `DOCKER_COMPOSE` runtimes. See `external-public-domain-rename.md`\n * for the rationale (the previous `baseDomain` field on this object\n * conflated K8s-internal and reverse-proxy concerns).\n */\nexport const WildoKubernetesConfigSchema = z.object({\n namespace: z.string().min(1),\n /**\n * Workload replica overrides keyed by authored SaaS service key (for example\n * backendApi, app or website), never by generated image/deployment name.\n * Platform service keys have their own renderer. Worker replicas remain in\n * the worker declaration; a key without a generated application target is\n * reported by application deployment generation rather than guessed.\n */\n services: z.record(z.string(), InfraServiceK8sSchema).optional(),\n // Derive the literal from the named runtime vocabulary while accepting the\n // natural authored spelling `ingressClass: 'traefik'` without an enum import.\n ingressClass: z.literal(`${WildoKubernetesIngressClass.TRAEFIK}`, {\n error: 'Wildo Kubernetes deployments support ingressClass traefik only; omit the field or select traefik.',\n }).optional(),\n});\nexport type WildoKubernetesConfig = z.infer<typeof WildoKubernetesConfigSchema>;\n\n/**\n * cert-manager `ClusterIssuer` selection for remote TLS. Both issuers are\n * always provisioned in the cluster (see `cluster-issuer.yaml.hbs`); this\n * picks which one an application's ingress annotation\n * (`cert-manager.io/cluster-issuer`) points at — i.e. which ACME endpoint\n * issues its per-ingress certificate.\n *\n * - `LETSENCRYPT_PROD` — real, browser-trusted certificates. The default,\n * because a remote deployment implies a real domain that browsers must\n * trust. Subject to Let's Encrypt production rate limits\n * (50 certs / registered domain / week).\n * - `LETSENCRYPT_STAGING` — untrusted test certificates with far higher\n * rate limits. Opt into this **while validating DNS + ingress on a new\n * cluster** so a misconfigured first deploy cannot exhaust the prod\n * quota, then flip to prod once issuance succeeds.\n */\nexport enum WildoTlsIssuer {\n LETSENCRYPT_PROD = 'letsencrypt-prod',\n LETSENCRYPT_STAGING = 'letsencrypt-staging',\n}\n\nexport const WildoRemoteProviderSchema = z.object({\n provider: z.string().min(1),\n registryEndpoint: z.string().min(1),\n region: z.string().min(1).optional(),\n /**\n * ACME registration email for Let's Encrypt (`ClusterIssuer.spec.acme.email`).\n * Optional at the schema level so non-TLS remote configs parse, but a\n * remote Kubernetes environment that terminates TLS should author it —\n * Let's Encrypt uses it for expiry warnings and account recovery.\n */\n acmeEmail: z.email().optional(),\n /**\n * Which cert-manager `ClusterIssuer` this environment's ingresses use.\n * Defaults to `LETSENCRYPT_PROD` downstream when unset. See {@link WildoTlsIssuer}.\n */\n tlsIssuer: z.enum(WildoTlsIssuer).optional(),\n});\nexport type WildoRemoteProvider = z.infer<typeof WildoRemoteProviderSchema>;\n\nexport const WildoLoggingConfigSchema = z.object({\n level: z.enum(['debug', 'info', 'warn', 'error']).default('info'),\n formattedConsoleErrors: z.boolean().optional(),\n});\nexport type WildoLoggingConfig = z.infer<typeof WildoLoggingConfigSchema>;\n\n/**\n * Per-environment OTLP telemetry (traces + metrics + logs) posture (Slice 2 Phase 5).\n *\n * `env-vars-builder` projects this block onto the standard `OTEL_*` env vars that the\n * `otel-preload.ts` SDK (in `saas-backend-lib`) reads BEFORE app code:\n * - `enabled` → `OTEL_ENABLED` (the master gate) + drives the `--import` preload wiring.\n * - `endpoint` → `OTEL_EXPORTER_OTLP_ENDPOINT` (the OTLP/HTTP collector/ingest URL).\n * The provider auth header (`OTEL_EXPORTER_OTLP_HEADERS`) is NOT authored here — it is\n * derived by `env-vars-builder` from the selected `OBSERVABILITY_TELEMETRY` provider's\n * secret (e.g. a BetterStack source token). Persisted into `PlatformEnvConfigJson.observability`\n * and hydrated back by `hydrateEnvironmentFromConfig`, mirroring `logging`.\n */\nexport const WildoObservabilityConfigSchema = z.object({\n /**\n * Master switch for OTLP telemetry. `true` → emit `OTEL_ENABLED=true` + wire the\n * `--import @wildo-ai/saas-backend-lib/otel-preload` preload; the preload starts the SDK.\n * `false`/omitted → a complete no-op (the preload self-gates).\n */\n enabled: z.boolean().default(false),\n /**\n * OTLP/HTTP endpoint (`OTEL_EXPORTER_OTLP_ENDPOINT`). Local dev: the local `otel-collector`\n * (`http://localhost:4318`). Remote: the selected provider's ingesting host (e.g. a BetterStack\n * source URL). When omitted, the OTLP exporters fall back to their own default\n * (`http://localhost:4318`), which is the local collector — convenient for local dev.\n */\n endpoint: z.string().optional(),\n /**\n * LLM-call observability env-layer posture — a SEPARATE signal from OTLP\n * telemetry (fed by the engine `AgentCallTraceSink` into the selected\n * `LLM_OBSERVABILITY` provider, e.g. PostHog `$ai_generation`), colocated\n * here because both are per-environment observability posture. Projected\n * onto the `WILDO_LLM_OBS_*` env vars INDEPENDENTLY of the OTLP `enabled`\n * gate — LLM-obs activation is provider-selection-driven, not\n * `OTEL_ENABLED`-driven.\n */\n llmObservability: z.object({\n /**\n * Forward prompt + completion content (`$ai_input` / `$ai_output_choices`)\n * to the LLM-observability provider (→ `WILDO_LLM_OBS_CAPTURE_CONTENT`).\n * Default FALSE: content is user/app data (PII) shipped to a third party —\n * opt in per environment (local dev typically true; production a\n * deliberate decision).\n */\n captureContent: z.boolean().default(false),\n /**\n * Fraction (0..1) of agent calls forwarded (→ `WILDO_LLM_OBS_SAMPLE_RATE`).\n * Omitted = capture every call.\n */\n sampleRate: z.number().min(0).max(1).optional(),\n /**\n * NON-SECRET env for the selected LLM-observability provider — connection\n * details the provider module reads from the runtime env (e.g. PostHog's\n * `POSTHOG_HOST` ingestion host and `POSTHOG_PROJECT_ID`). Projected\n * verbatim into the runtime env; the env-key names are provider-owned,\n * same vocabulary as `secrets.json → providerEnv`. Secrets (API keys)\n * do NOT belong here — they stay in `secrets.json → providerEnv`, which\n * also WINS on a key collision (secrets are the more specific layer).\n * This is the checked-in home for provider config that is not sensitive.\n */\n providerEnv: z.record(z.string(), z.string()).optional(),\n }).optional(),\n});\nexport type WildoObservabilityConfig = z.infer<typeof WildoObservabilityConfigSchema>;\n\n/**\n * Per-environment external-provider SELECTION override (2026-07-10).\n *\n * The app-wide primary/substitute selection for an `EngineCapability` lives in\n * `wildo.saas.config.ts` (`providers.scopes.backend.selection[capability]`) —\n * a single value shared by every environment. This block lets an environment\n * OVERRIDE that primary (and its substitutes) without touching the shared SaaS\n * config, so e.g. LOCAL can select the non-sending `email-preview` provider\n * for `EMAIL_TRANSACTIONAL` while staging/production keep `resend`.\n *\n * Semantics (mirrors the SaaS-side selection policy):\n * - `primary` — the ref that wins for this capability in this environment.\n * - `whenUnavailable` — ordered substitutes, used when a preceding ref is not AVAILABLE at\n * resolution time (undeclared, disabled, unconfigured). NOT failover: nothing retries a\n * second provider when a call to the first one fails.\n *\n * The referenced provider must still be DECLARED in\n * `providers.scopes.backend.providers` and available for the capability — the\n * backend's availability/enabled filtering is unchanged, so an override that\n * names an undeclared or capability-disabled provider resolves to nothing\n * (same fail-closed behaviour as an equivalent SaaS-side selection). FAN_OUT\n * capabilities ignore the override (every declared provider is active — a\n * primary/substitute is meaningless), matching the SaaS-side rule.\n *\n * `env-vars-builder` serializes this block to the `WILDO_PROVIDER_SELECTION_OVERRIDES`\n * backend env var (JSON); `ExternalProvidersRegistryBackendService` reads it and\n * applies it over the SaaS-config selection at capability-resolution time.\n * Persisted into `PlatformEnvConfigJson.providerSelection` and hydrated back by\n * `hydrateEnvironmentFromConfig`, mirroring `logging` / `observability`.\n */\nexport const WildoProviderSelectionOverrideEntrySchema = z.strictObject({\n primary: z.string().min(1),\n whenUnavailable: z.array(z.string().min(1)).optional(),\n});\nexport type WildoProviderSelectionOverrideEntry = z.infer<typeof WildoProviderSelectionOverrideEntrySchema>;\n\nexport const WildoProviderSelectionOverridesSchema = z.partialRecord(\n z.enum(EngineCapability),\n WildoProviderSelectionOverrideEntrySchema,\n);\nexport type WildoProviderSelectionOverrides = z.infer<typeof WildoProviderSelectionOverridesSchema>;\n\n/**\n * Per-environment provider CONFIGURATION values — the half of `providerConfigurations` that exists once per\n * DEPLOYMENT rather than once per application.\n *\n * `wildo.saas.config.ts > providerConfigurations` is authored once and reaches every environment. That is right for\n * application POLICY a provider reads (an agent execution profile, which environments it may run in). It is wrong\n * for an IDENTITY the vendor issued against one deployment: an OAuth client ID registered with the authorized\n * redirect URIs of one environment, a frontend SDK DSN or site key, a picker `appId`. Authored in the SaaS config, the\n * local development Google client — whose only redirect URI is `localhost` — would be the client staging and\n * production send users to.\n *\n * This block carries those values for ONE environment, in exactly the SaaS block's\n * `providerRef → protocolKind → key` shape, and {@link overlayEnvironmentProviderConfigurations} lays it over the\n * SaaS block KEY BY KEY. An environment therefore states only what differs and inherits the rest, so the policy half\n * is never restated per environment.\n *\n * It reaches both places a provider configuration is read, because the CLI applies the overlay where it knows the\n * environment: the managed declaration each environment's apps-manager stores (backend readers — the OAuth2\n * connection resolver, email/SMS senders, the provider registry) and the provider runtime artifacts a build bakes in\n * (frontend `publicConfig`, the backend's generated provider module).\n *\n * NOT for secrets. This file is committed; a client secret, API key or signing secret stays in\n * `secrets.json → providerEnv`. The CLI refuses a key named like one of the provider's declared secrets.\n */\nexport const WildoEnvironmentProviderConfigurationsSchema = z.record(\n z.string().min(1),\n z.record(z.string().min(1), z.record(z.string().min(1), z.unknown())),\n);\nexport type WildoEnvironmentProviderConfigurations = z.infer<typeof WildoEnvironmentProviderConfigurationsSchema>;\n\n/**\n * The provider configuration ONE environment runs with: the application-level `providerConfigurations`, with the\n * environment's {@link WildoEnvironmentProviderConfigurationsSchema} values laid over it key by key.\n *\n * Precedence is per key inside one `providerRef → protocolKind` bag, and the environment wins — the more specific\n * layer, as `secrets.json → providerEnv` wins over `observability.llmObservability.providerEnv`. A bag the\n * environment does not mention is carried unchanged; a bag only the environment declares is added. Neither input is\n * mutated.\n *\n * Rejected: replacing a whole provider or protocol bag. That would force an environment to restate every\n * environment-invariant key it shares with the application (an agent execution profile beside a client ID), and a\n * restated copy is one that drifts from the original.\n *\n * Throws when the application layer holds a non-object at a protocol key the environment overlays: there is no key\n * to lay a value over, and silently replacing it would discard the application's value without saying so.\n */\nexport function overlayEnvironmentProviderConfigurations(\n applicationProviderConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>> | undefined,\n environmentProviderConfigurations: WildoEnvironmentProviderConfigurations | undefined,\n): Record<string, Record<string, unknown> | undefined> {\n const resolved: Record<string, Record<string, unknown> | undefined> = {};\n for (const [providerRef, protocols] of Object.entries(applicationProviderConfigurations ?? {})) {\n resolved[providerRef] = protocols === undefined ? undefined : { ...protocols };\n }\n for (const [providerRef, environmentProtocols] of Object.entries(environmentProviderConfigurations ?? {})) {\n const merged: Record<string, unknown> = { ...(resolved[providerRef] ?? {}) };\n for (const [protocolKind, environmentValues] of Object.entries(environmentProtocols)) {\n const applicationValues = merged[protocolKind];\n if (applicationValues !== undefined && (applicationValues === null || typeof applicationValues !== 'object' || Array.isArray(applicationValues))) {\n throw new Error(\n `providerConfigurations.${providerRef}.${protocolKind} is not an object in wildo.saas.config.ts, so the `\n + 'environment\\'s values for it cannot be laid over it key by key.',\n );\n }\n merged[protocolKind] = { ...(applicationValues as Record<string, unknown> | undefined), ...environmentValues };\n }\n resolved[providerRef] = merged;\n }\n return resolved;\n}\n\nexport enum DatabaseEngine {\n MONGODB = 'mongodb',\n POSTGRESQL = 'postgresql',\n}\n\n/**\n * The store an APPLICATION persists to when its environment authors no `applicationDatabase`.\n *\n * PostgreSQL — decided by Paul on 2026-09-24 (#1571), reversing 75cd1934f (\"absence means MongoDB\")\n * and restoring the rule of 2e0194c41. This is the ONLY place the answer is written. Every reader of\n * an application's engine goes through {@link resolveApplicationDatabaseEngine}, because the\n * 2026-09-15 incident was two readers answering silence differently: provisioning chose PostgreSQL,\n * the runtime chose MongoDB, Mongo provisioning was skipped, registration reported success, and the\n * application died at boot with `Command update requires authentication`.\n *\n * Distinct from the PLATFORM's own store (`database` in the infra config) and from the engine's\n * `DEFAULT_PERSISTENCE_ADAPTER` / `DATABASE_DEFAULT_ADAPTER` env default, which also governs\n * platform services and is not what this decides. The application never falls through to that env\n * default: the CLI writes the resolved adapter explicitly.\n */\nexport const DEFAULT_APPLICATION_DATABASE_ENGINE: DatabaseEngine = DatabaseEngine.POSTGRESQL;\n\n/**\n * The engine an application persists to: its authored `applicationDatabase.engine`, or\n * {@link DEFAULT_APPLICATION_DATABASE_ENGINE} when the environment authors none.\n *\n * Takes the declaration rather than a whole config so every carrier of it — the parsed infra config,\n * `config.json`, a bootstrap request — answers through the same function.\n */\nexport function resolveApplicationDatabaseEngine(applicationDatabase: { readonly engine?: DatabaseEngine } | undefined): DatabaseEngine {\n return applicationDatabase?.engine ?? DEFAULT_APPLICATION_DATABASE_ENGINE;\n}\n\nexport enum WildoImageTagStrategy {\n COMMIT_SHA = 'commit-sha',\n BRANCH_NAME = 'branch-name',\n SEMVER = 'semver',\n}\n\n/**\n * Docker Compose deployment — no scaling, no K8s-specific fields.\n */\nexport const DockerComposeDeploymentSchema = z.strictObject({\n branch: z.string().min(1),\n runtime: z.literal(WildoDeploymentRuntime.DOCKER_COMPOSE),\n imageTagStrategy: z.enum(WildoImageTagStrategy).default(WildoImageTagStrategy.COMMIT_SHA),\n});\n\n/**\n * Kubernetes deployment — branch, namespace and tagging.\n *\n * No `registry`: an environment's images live at `remoteProvider.registryEndpoint`, the registry every deploy\n * manifest pulls from and the deploy workflow pushes to. A separate field here could only repeat that value or\n * contradict it — and it did contradict it, sending CI pushes to GHCR while the cluster pulled from the endpoint\n * (#1165). Both deployment shapes are strict, so a leftover `registry` is refused rather than silently ignored.\n */\nexport const KubernetesDeploymentSchema = z.strictObject({\n branch: z.string().min(1),\n runtime: z.literal(WildoDeploymentRuntime.KUBERNETES),\n namespace: z.string().min(1).optional(),\n imageTagStrategy: z.enum(WildoImageTagStrategy).default(WildoImageTagStrategy.COMMIT_SHA),\n});\n\n/**\n * Deployment configuration for CI/CD pipeline integration.\n * Discriminated on `runtime`: the K8s-specific field (`namespace`)\n * is only available when `runtime` is `KUBERNETES`.\n */\nexport const WildoDeploymentConfigSchema = z.discriminatedUnion('runtime', [\n DockerComposeDeploymentSchema,\n KubernetesDeploymentSchema,\n]);\nexport type WildoDeploymentConfig = z.infer<typeof WildoDeploymentConfigSchema>;\n/** @wildo_source:part:end platform.config.environment.deployment */\n\n/**\n * Canonical namespace derivation for platform-managed application resources.\n *\n * Environment ids are part of the namespace because local and arbitrary remote\n * deployments must be isolated through generated names instead of hand-authored\n * checked-in values.\n */\nexport function buildApplicationNamespace(\n appSlug: string,\n environmentId: string,\n): string {\n const normalizedAppSlug = appSlug.trim();\n const normalizedEnvironmentId = environmentId.trim();\n\n if (!normalizedAppSlug) {\n throw new Error('appSlug is required to derive an application namespace');\n }\n if (!normalizedEnvironmentId) {\n throw new Error('environmentId is required to derive an application namespace');\n }\n\n return `${normalizedAppSlug}-${normalizedEnvironmentId}`;\n}\n\nexport function buildApplicationDatabaseUsername(\n appSlug: string,\n environmentId: string,\n): string {\n return `${buildApplicationNamespace(appSlug, environmentId)}_user`;\n}\n\n/**\n * Per-environment origins the DOCUMENTATION site must be built against.\n *\n * ## Why these are authored per environment rather than inferred\n *\n * A documentation bundle is STATIC: whatever origin it is built with is compiled into\n * the shipped JavaScript. The docs site deep-links anonymous readers into the SaaS app to\n * sign in, and exchanges a token against the backend, so a bundle built with the wrong\n * origin does not degrade — it silently points every reader at the wrong host.\n *\n * That is why `docusaurus.config.ts` refuses to complete a PRODUCTION build when these are\n * unset, and falls back to local defaults otherwise. The guard is correct; what was missing\n * was a declared source, so the values had to be remembered on a command line and were\n * therefore absent from every environment definition. Authoring them here puts them where\n * every other per-environment posture already lives, and `wildo config sync` carries them.\n *\n * Projected onto `WILDO_DOCS_API_BASE_URL`, `WILDO_DOCS_APP_URL` and\n * `WILDO_DOCS_FRONTEND_SERVICE_NAME` by `env-vars-builder`, mirroring `providerSelection`.\n *\n * Every member is optional: an application with no documentation site authors nothing, and\n * a local environment relies on the config's own dev defaults rather than restating ports\n * that the runtime already knows.\n */\nexport const WildoDocumentationSiteConfigSchema = z.object({\n /**\n * Backend origin the docs bundle calls for `/auth/token/exchange` and\n * `/auth/cross-frontend-handoff` — e.g. `https://api.example.com`.\n */\n apiBaseUrl: z.string().trim().min(1).optional(),\n /**\n * SaaS application origin the docs site deep-links anonymous readers to for sign-in —\n * e.g. `https://app.example.com`.\n */\n appUrl: z.string().trim().min(1).optional(),\n /**\n * Frontend service name the docs site identifies as when resolving its own providers.\n * Must match the service key declared in `wildo.saas.config.ts#frontendServices`.\n */\n frontendServiceName: z.string().trim().min(1).optional(),\n});\n\nexport type WildoDocumentationSiteConfig = z.infer<typeof WildoDocumentationSiteConfigSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"environment.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/environment.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,uCAAuC,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,6CAAyB,CAAA;AAC3B,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,KAAK,CACJ,4BAA4B,EAC5B,wFAAwF,CACzF,CAAC;AAGJ;;;;;GAKG;AACH,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,2DAAiC,CAAA;IACjC,mDAAyB,CAAA;AAC3B,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oCAAe,CAAA;IACf,sCAAiB,CAAA;AACnB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,UAAU,oBAAoB,CAAC,aAAqB;IACxD,OAAO,aAAa,KAAK,gBAAgB,CAAC,KAAK,CAAC;AAClD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,wDAA+B,CAAA;IAC/B,gDAAuB,CAAA;AACzB,C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AAS,EAAE;IACzE,6BAA6B;IAC7B,0BAA0B;CAC3B,CAAC,CAAC;AAEH,oEAAoE;AAEpE;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAe,EACf,aAAqB;IAErB,MAAM,iBAAiB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IACzC,MAAM,uBAAuB,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;IAErD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IACD,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IAED,OAAO,GAAG,iBAAiB,IAAI,uBAAuB,EAAE,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,OAAe,EACf,aAAqB;IAErB,OAAO,GAAG,yBAAyB,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC;AACrE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD;;;OAGG;IACH,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC/C;;;OAGG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3C;;;OAGG;IACH,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { EngineCapability } from '@wildo-ai/saas-models';\nimport { refuseUnreadProviderConfigurationValues } from '@wildo-ai/external-connectors-models';\nimport { InfraServiceK8sSchema } from './infra-service.schemas';\n\n/**\n * @wildo_source:part:start platform.config.environment.deployment facet:layer:platform facet:family:infra\n *\n * Convenience environment ids kept for common local/staging/production setups.\n *\n * The project model is no longer limited to a fixed environment set: remote\n * environment ids can be any slug-like value. Use `WildoEnvironmentIdSchema`\n * for authoritative validation.\n */\nexport enum WildoEnvironment {\n LOCAL = 'local',\n STAGING = 'staging',\n PRODUCTION = 'production',\n}\n\nexport const WildoEnvironmentIdSchema = z\n .string()\n .min(1)\n .regex(\n /^[a-z0-9]+(?:-[a-z0-9]+)*$/,\n 'environment ids must be lowercase alphanumeric with optional hyphen-separated segments',\n );\nexport type WildoEnvironmentId = z.infer<typeof WildoEnvironmentIdSchema>;\n\n/**\n * Deployment runtime targets for CI/CD workflows and infra config.\n *\n * Single source of truth for deployment runtime targets, used by both\n * platform-config-lib (developer-facing config) and wildo-cli (operational).\n */\nexport enum WildoDeploymentRuntime {\n DOCKER_COMPOSE = 'docker-compose',\n KUBERNETES = 'kubernetes',\n}\n\nexport enum WildoLocationType {\n LOCAL = 'local',\n REMOTE = 'remote',\n}\n\nexport function isLocalEnvironmentId(environmentId: string): boolean {\n return environmentId === WildoEnvironment.LOCAL;\n}\n\n/**\n * Where a docker-compose backing service keeps its DATA.\n *\n * The two members are not a performance knob with a fast and a slow setting — they answer a\n * question about ownership, and the cost follows from the answer:\n *\n * - `HOST_PATH` — the data lives at an explicit path on the host\n * (`<saas-root>/.wildo-saas/local_data/<service>/`), bind-mounted into the container. The\n * operator chooses the disk, backups target a known directory, and the tree is the same one the\n * Kind k8s lane hostPath-mounts at `/mnt/local-data/<service>/`. That control is why it is the\n * REMOTE default: a production operator who has provisioned a dedicated data volume must be able\n * to put the database on it, and a named volume would silently land it under\n * `/var/lib/docker/volumes/` on the root disk.\n * - `DOCKER_VOLUME` — the data lives in a Docker named volume, inside the container runtime's own\n * storage. Nobody outside Docker addresses it, which is exactly what makes it right for a\n * disposable development stack.\n *\n * ## Why LOCAL defaults to `DOCKER_VOLUME`\n *\n * On Linux a bind mount is a native path and costs nothing. On macOS and Windows the container\n * runtime is a VM, and a host bind mount crosses a filesystem bridge — VirtioFS on macOS, 9p/\n * VirtioFS through WSL2 on Windows. Databases do small fsync'd random writes, so every one of them\n * becomes a round trip out of the VM.\n *\n * Measured on macOS (Apple Virtualization, 6 vCPU) on 2026-09-22 with the eight self-hosted backing\n * services bind-mounted: the VM process held **13,786 host file descriptors** open across 14,168\n * files and burned **383% CPU** in Docker Desktop's file-sharing process — sustained, a 321%\n * average over 2 days 5 hours — while the containers themselves used 0.7 of a core and container\n * block-IO accounting stayed flat, because none of that traffic reaches the VM's own block device.\n * Roughly four cores of pure filesystem translation for 0.7 of a core of database work.\n *\n * The default is uniform across all three development operating systems rather than \"volumes on\n * macOS and Windows, host paths on Linux\", so every developer and CI run exercise the same stack\n * and a bug reproduces the same way everywhere. It costs a Linux developer nothing: a named volume\n * is a native directory there too.\n *\n * Both members are authorable per environment (`localDataStorage`), so a remote operator who wants\n * volumes and a local developer who wants to read the files from their file manager each say so.\n *\n * NOTE this governs DATA directories only. The two small secret FILES compose mounts read-only —\n * immudb's state-signing key and mongot's sync-source password — are materialized from\n * `secrets.json` onto the host and stay host mounts under every mode. They are read once at\n * startup, so they carry none of the cost above, and they have nowhere else to come from.\n */\nexport enum WildoLocalDataStorage {\n DOCKER_VOLUME = 'docker-volume',\n HOST_PATH = 'host-path',\n}\n\n/**\n * The `localDataStorage` an environment gets when it authors none.\n *\n * Total over {@link WildoLocationType} rather than a conditional on one member, so a location type\n * added to the vocabulary tomorrow is a compile error here instead of silently inheriting whichever\n * branch happened to be the `else`.\n */\nexport function resolveDefaultLocalDataStorage(locationType: WildoLocationType): WildoLocalDataStorage {\n switch (locationType) {\n case WildoLocationType.LOCAL:\n return WildoLocalDataStorage.DOCKER_VOLUME;\n case WildoLocationType.REMOTE:\n return WildoLocalDataStorage.HOST_PATH;\n }\n}\n\n/**\n * Which set of OPTIONAL backing services an environment runs — the deployment footprint (#2303).\n *\n * An environment always runs the services the platform cannot live without (a database, a cache, a\n * broker, an object store). On top of those, the full platform runs three services that each back ONE\n * engine capability: ClamAV (antivirus scanning of uploaded files), immudb (the tamper-evident audit\n * store) and mongot (MongoDB Search / Vector Search). A small internal tool for one team rarely needs any\n * of them, and they are the heaviest containers in the stack (mongot alone is a JVM holding Lucene\n * indexes). A profile states, per environment, whether they run at all.\n *\n * ## Named \"service profile\", not \"runtime profile\"\n *\n * `ApplicationRuntimeProfile` (`@wildo-ai/saas-backend-lib`) already names WHICH RUNTIME boots the\n * application lifecycle (the backend or a minion). This vocabulary answers a different question, about\n * the ENVIRONMENT's footprint, and must not be confused with it.\n *\n * ## What a profile does NOT do\n *\n * It never degrades a capability in silence. Each capability that depends on a service the profile omits\n * is REFUSED at the application's boot when the application declares it, by a message naming the profile\n * and the remedy (`describeServiceOmittedByEnvironmentServiceProfile`). And a declaration that would run\n * an omitted service (`backingServices.clamav: { source: SELF }` under `SMALL`) is refused when the\n * environment descriptor is parsed: the two statements contradict each other.\n *\n * ## One database family\n *\n * `SMALL` also runs ONE database family (`environmentServiceProfileRunsOneDatabaseFamily`): the platform's store and\n * the application's are the same engine, and only that store is declared. Which engine is the author's choice (both a\n * MongoDB and a PostgreSQL environment run in one family); the descriptor derives the families it runs from what it\n * declares and refuses two, naming the declarations that bring each.\n *\n * ## Lanes\n *\n * Both lanes render a profile: the Docker Compose generator, and the Kubernetes manifests (workloads, the mongod\n * routing parameters, secrets, persistent volumes and readiness) since #2303's second slice.\n *\n * ## What it does not change yet\n *\n * The broker. RabbitMQ stays a platform dependency under every profile: the platform scheduler publishes onto the\n * application's queue from another process, and no durable queue runs on the cache or the database\n * (`QueueAdapterType.MEMORY` is in-process only). Tracked by #2303.\n */\nexport enum EnvironmentServiceProfile {\n /** Every service the environment's declarations ask for. The default when nothing is authored. */\n FULL = 'full',\n /**\n * The footprint for a small deployment: no ClamAV, no immudb, no mongot\n * ({@link servicesOmittedByEnvironmentServiceProfile}). Vector search remains available on PostgreSQL\n * (pgvector is part of the PostgreSQL image, not a separate service).\n */\n SMALL = 'small',\n}\n\n/** The profile an environment gets when it authors none. */\nexport const DEFAULT_ENVIRONMENT_SERVICE_PROFILE: EnvironmentServiceProfile = EnvironmentServiceProfile.FULL;\n\n/**\n * The optional services a {@link EnvironmentServiceProfile} can omit. A closed vocabulary of its own rather\n * than `BackingServiceKind`, because mongot is not a backing-service kind an environment declares: it is a\n * sidecar of a self-hosted MongoDB. Values are the compose service names.\n */\nexport enum EnvironmentServiceProfileOptionalService {\n /** The ClamAV daemon that scans uploaded files (`z_file({ scanPolicy: 'required' })`). */\n ANTIVIRUS_SCANNER = 'clamav',\n /** immudb, the tamper-evident store of the `COMPLIANCE_AUDIT_TRAIL` capability's Layer-2 fan-out. */\n IMMUTABLE_AUDIT_STORE = 'immudb',\n /** mongot, which serves `$search` / `$vectorSearch` for MongoDB-persisted `.ragSource()` fields. */\n MONGODB_SEARCH = 'mongot',\n}\n\n/**\n * The services a profile omits. Total over {@link EnvironmentServiceProfile} (a member added tomorrow fails\n * the build here until somebody decides what it omits), and the ONE place the answer lives: the compose\n * generator, the descriptor refinement and the application's boot refusals all read it.\n */\nexport function servicesOmittedByEnvironmentServiceProfile(\n profile: EnvironmentServiceProfile,\n): readonly EnvironmentServiceProfileOptionalService[] {\n switch (profile) {\n case EnvironmentServiceProfile.FULL:\n return [];\n case EnvironmentServiceProfile.SMALL:\n return [\n EnvironmentServiceProfileOptionalService.ANTIVIRUS_SCANNER,\n EnvironmentServiceProfileOptionalService.IMMUTABLE_AUDIT_STORE,\n EnvironmentServiceProfileOptionalService.MONGODB_SEARCH,\n ];\n }\n}\n\n/**\n * Whether `profile` requires the environment to run ONE database family (#2303). Total over\n * {@link EnvironmentServiceProfile}: a member added tomorrow fails the build until somebody decides.\n */\nexport function environmentServiceProfileRunsOneDatabaseFamily(profile: EnvironmentServiceProfile): boolean {\n switch (profile) {\n case EnvironmentServiceProfile.FULL:\n return false;\n case EnvironmentServiceProfile.SMALL:\n return true;\n }\n}\n\n/** Whether `profile` omits `service`. Absent profile ⇒ {@link DEFAULT_ENVIRONMENT_SERVICE_PROFILE}. */\nexport function environmentServiceProfileOmits(\n profile: EnvironmentServiceProfile | undefined,\n service: EnvironmentServiceProfileOptionalService,\n): boolean {\n return servicesOmittedByEnvironmentServiceProfile(profile ?? DEFAULT_ENVIRONMENT_SERVICE_PROFILE).includes(service);\n}\n\n/**\n * The sentence every refusal caused by a profile starts with, so the CLI and the application's boot name\n * the profile and the omitted service the same way. Callers append the capability-specific remedy.\n */\nexport function describeServiceOmittedByEnvironmentServiceProfile(\n profile: EnvironmentServiceProfile,\n service: EnvironmentServiceProfileOptionalService,\n): string {\n return `This environment runs the '${profile}' service profile (\\`serviceProfile\\` in wildo.infra.<env>.config.ts), `\n + `which does not run ${service}.`;\n}\n\n/**\n * Ingress controller installed by Wildo's local and remote Kubernetes workflows.\n * Import from `@wildo-ai/platform-config-lib`. Traefik owns both application\n * routing and HTTP-01 challenge routing; selecting another controller is not\n * supported by the generated installation contract.\n */\nexport enum WildoKubernetesIngressClass {\n TRAEFIK = 'traefik',\n}\n\n/**\n * K8s-internal cluster topology. Holds ONLY values that are genuinely\n * specific to a Kubernetes deployment: namespace, ingress class and\n * per-service workload replica counts.\n *\n * The external/public hostname (where browsers and reverse proxies hit\n * us) is NOT here — it lives at the top level of `WildoInfraEnvConfig`\n * as `publicDomain` because it applies to BOTH `KUBERNETES` and\n * `DOCKER_COMPOSE` runtimes. It replaced a `baseDomain` field on this\n * object, which conflated K8s-internal and reverse-proxy concerns.\n */\nexport const WildoKubernetesConfigSchema = z.object({\n namespace: z.string().min(1),\n /**\n * Workload replica overrides keyed by authored SaaS service key (for example\n * backendApi, app or website), never by generated image/deployment name.\n * Platform service keys have their own renderer. Worker replicas remain in\n * the worker declaration; a key without a generated application target is\n * reported by application deployment generation rather than guessed.\n */\n services: z.record(z.string(), InfraServiceK8sSchema).optional(),\n // Derive the literal from the named runtime vocabulary while accepting the\n // natural authored spelling `ingressClass: 'traefik'` without an enum import.\n ingressClass: z.literal(`${WildoKubernetesIngressClass.TRAEFIK}`, {\n error: 'Wildo Kubernetes deployments support ingressClass traefik only; omit the field or select traefik.',\n }).optional(),\n});\nexport type WildoKubernetesConfig = z.infer<typeof WildoKubernetesConfigSchema>;\n\n/**\n * cert-manager `ClusterIssuer` selection for remote TLS. Both issuers are\n * always provisioned in the cluster (see `cluster-issuer.yaml.hbs`); this\n * picks which one an application's ingress annotation\n * (`cert-manager.io/cluster-issuer`) points at — i.e. which ACME endpoint\n * issues its per-ingress certificate.\n *\n * - `LETSENCRYPT_PROD` — real, browser-trusted certificates. The default,\n * because a remote deployment implies a real domain that browsers must\n * trust. Subject to Let's Encrypt production rate limits\n * (50 certs / registered domain / week).\n * - `LETSENCRYPT_STAGING` — untrusted test certificates with far higher\n * rate limits. Opt into this **while validating DNS + ingress on a new\n * cluster** so a misconfigured first deploy cannot exhaust the prod\n * quota, then flip to prod once issuance succeeds.\n */\nexport enum WildoTlsIssuer {\n LETSENCRYPT_PROD = 'letsencrypt-prod',\n LETSENCRYPT_STAGING = 'letsencrypt-staging',\n}\n\nexport const WildoRemoteProviderSchema = z.object({\n provider: z.string().min(1),\n registryEndpoint: z.string().min(1),\n region: z.string().min(1).optional(),\n /**\n * ACME registration email for Let's Encrypt (`ClusterIssuer.spec.acme.email`).\n * Optional at the schema level so non-TLS remote configs parse, but a\n * remote Kubernetes environment that terminates TLS should author it —\n * Let's Encrypt uses it for expiry warnings and account recovery.\n */\n acmeEmail: z.email().optional(),\n /**\n * Which cert-manager `ClusterIssuer` this environment's ingresses use.\n * Defaults to `LETSENCRYPT_PROD` downstream when unset. See {@link WildoTlsIssuer}.\n */\n tlsIssuer: z.enum(WildoTlsIssuer).optional(),\n});\nexport type WildoRemoteProvider = z.infer<typeof WildoRemoteProviderSchema>;\n\nexport const WildoLoggingConfigSchema = z.object({\n level: z.enum(['debug', 'info', 'warn', 'error']).default('info'),\n formattedConsoleErrors: z.boolean().optional(),\n});\nexport type WildoLoggingConfig = z.infer<typeof WildoLoggingConfigSchema>;\n\n/**\n * Per-environment OTLP telemetry (traces + metrics + logs) posture.\n *\n * `env-vars-builder` projects this block onto the standard `OTEL_*` env vars that the\n * `otel-preload.ts` SDK (in `saas-backend-lib`) reads BEFORE app code:\n * - `enabled` → `OTEL_ENABLED` (the master gate) + drives the `--import` preload wiring.\n * - `endpoint` → `OTEL_EXPORTER_OTLP_ENDPOINT` (the OTLP/HTTP collector/ingest URL).\n * The provider auth header (`OTEL_EXPORTER_OTLP_HEADERS`) is NOT authored here — it is\n * derived by `env-vars-builder` from the selected `OBSERVABILITY_TELEMETRY` provider's\n * secret (e.g. a BetterStack source token). Persisted into `PlatformEnvConfigJson.observability`\n * and hydrated back by `hydrateEnvironmentFromConfig`, mirroring `logging`.\n */\nexport const WildoObservabilityConfigSchema = z.object({\n /**\n * Master switch for OTLP telemetry. `true` → emit `OTEL_ENABLED=true` + wire the\n * `--import @wildo-ai/saas-backend-lib/otel-preload` preload; the preload starts the SDK.\n * `false`/omitted → a complete no-op (the preload self-gates).\n */\n enabled: z.boolean().default(false),\n /**\n * OTLP/HTTP endpoint (`OTEL_EXPORTER_OTLP_ENDPOINT`). Local dev: the local `otel-collector`\n * (`http://localhost:4318`). Remote: the selected provider's ingesting host (e.g. a BetterStack\n * source URL). When omitted, the OTLP exporters fall back to their own default\n * (`http://localhost:4318`), which is the local collector — convenient for local dev.\n */\n endpoint: z.string().optional(),\n /**\n * LLM-call observability env-layer posture — a SEPARATE signal from OTLP\n * telemetry (fed by the engine `AgentCallTraceSink` into the selected\n * `LLM_OBSERVABILITY` provider, e.g. PostHog `$ai_generation`), colocated\n * here because both are per-environment observability posture. Projected\n * onto the `WILDO_LLM_OBS_*` env vars INDEPENDENTLY of the OTLP `enabled`\n * gate — LLM-obs activation is provider-selection-driven, not\n * `OTEL_ENABLED`-driven.\n */\n llmObservability: z.object({\n /**\n * Forward prompt + completion content (`$ai_input` / `$ai_output_choices`)\n * to the LLM-observability provider (→ `WILDO_LLM_OBS_CAPTURE_CONTENT`).\n * Default FALSE: content is user/app data (PII) shipped to a third party —\n * opt in per environment (local dev typically true; production a\n * deliberate decision).\n */\n captureContent: z.boolean().default(false),\n /**\n * Fraction (0..1) of agent calls forwarded (→ `WILDO_LLM_OBS_SAMPLE_RATE`).\n * Omitted = capture every call.\n */\n sampleRate: z.number().min(0).max(1).optional(),\n /**\n * NON-SECRET env for the selected LLM-observability provider — connection\n * details the provider module reads from the runtime env (e.g. PostHog's\n * `POSTHOG_HOST` ingestion host and `POSTHOG_PROJECT_ID`). Projected\n * verbatim into the runtime env; the env-key names are provider-owned,\n * same vocabulary as `secrets.json → providerEnv`. Secrets (API keys)\n * do NOT belong here — they stay in `secrets.json → providerEnv`, which\n * also WINS on a key collision (secrets are the more specific layer).\n * This is the checked-in home for provider config that is not sensitive.\n */\n providerEnv: z.record(z.string(), z.string()).optional(),\n }).optional(),\n});\nexport type WildoObservabilityConfig = z.infer<typeof WildoObservabilityConfigSchema>;\n\n/**\n * Per-environment external-provider SELECTION override (2026-07-10).\n *\n * The app-wide primary/substitute selection for an `EngineCapability` lives in\n * `wildo.saas.config.ts` (`providers.scopes.backend.selection[capability]`) —\n * a single value shared by every environment. This block lets an environment\n * OVERRIDE that primary (and its substitutes) without touching the shared SaaS\n * config, so e.g. LOCAL can select the non-sending `email-preview` provider\n * for `EMAIL_TRANSACTIONAL` while staging/production keep `resend`.\n *\n * Semantics (mirrors the SaaS-side selection policy):\n * - `primary` — the ref that wins for this capability in this environment.\n * - `whenUnavailable` — ordered substitutes, used when a preceding ref is not AVAILABLE at\n * resolution time (undeclared, disabled, unconfigured). NOT failover: a substitute is never\n * asked because a call to the provider before it failed. Call-time failover is the SaaS-side\n * selection's own `failover` list (#2301), which this override does not carry and does not\n * replace: the application's declared failover providers stay in force under it.\n *\n * The referenced provider must still be DECLARED in\n * `providers.scopes.backend.providers` and available for the capability — the\n * backend's availability/enabled filtering is unchanged, so an override that\n * names an undeclared or capability-disabled provider resolves to nothing\n * (same fail-closed behaviour as an equivalent SaaS-side selection). FAN_OUT\n * capabilities ignore the override (every declared provider is active — a\n * primary/substitute is meaningless), matching the SaaS-side rule.\n *\n * `env-vars-builder` serializes this block to the `WILDO_PROVIDER_SELECTION_OVERRIDES`\n * backend env var (JSON); `ExternalProvidersRegistryBackendService` reads it and\n * applies it over the SaaS-config selection at capability-resolution time.\n * Persisted into `PlatformEnvConfigJson.providerSelection` and hydrated back by\n * `hydrateEnvironmentFromConfig`, mirroring `logging` / `observability`.\n */\nexport const WildoProviderSelectionOverrideEntrySchema = z.strictObject({\n primary: z.string().min(1),\n whenUnavailable: z.array(z.string().min(1)).optional(),\n});\nexport type WildoProviderSelectionOverrideEntry = z.infer<typeof WildoProviderSelectionOverrideEntrySchema>;\n\nexport const WildoProviderSelectionOverridesSchema = z.partialRecord(\n z.enum(EngineCapability),\n WildoProviderSelectionOverrideEntrySchema,\n);\nexport type WildoProviderSelectionOverrides = z.infer<typeof WildoProviderSelectionOverridesSchema>;\n\n/**\n * Per-environment provider CONFIGURATION values — the half of `providerConfigurations` that exists once per\n * DEPLOYMENT rather than once per application.\n *\n * `wildo.saas.config.ts > providerConfigurations` is authored once and reaches every environment. That is right for\n * application POLICY a provider reads (an agent execution profile, which environments it may run in). It is wrong\n * for an IDENTITY the vendor issued against one deployment: an OAuth client ID registered with the authorized\n * redirect URIs of one environment, a frontend SDK DSN or site key, a picker `appId`. Authored in the SaaS config, the\n * local development Google client — whose only redirect URI is `localhost` — would be the client staging and\n * production send users to.\n *\n * This block carries those values for ONE environment, in exactly the SaaS block's\n * `providerRef → protocolKind → key` shape, and {@link overlayEnvironmentProviderConfigurations} lays it over the\n * SaaS block KEY BY KEY. An environment therefore states only what differs and inherits the rest, so the policy half\n * is never restated per environment.\n *\n * The second level is a protocol kind for what a RUNTIME reads, and may also be a key the provider MODULE owns and\n * reads itself: `registration`, the vendor-side settings its `vendorRegistration` builds from (a Slack app's slash\n * commands, a Teams package's version), read only by `wildo providers register` (#2661, #2663). No runtime reader\n * looks it up, since each reads its own protocol kind, so it travels unused beside them; it lives here so that an\n * environment can lay its own registration over the application's, like any other value.\n *\n * It reaches both places a provider configuration is read, because the CLI applies the overlay where it knows the\n * environment: the managed declaration each environment's apps-manager stores (backend readers — the OAuth2\n * connection resolver, email/SMS senders, the provider registry) and the provider runtime artifacts a build bakes in\n * (frontend `publicConfig`, the backend's generated provider module).\n *\n * NOT for secrets. This file is committed; a client secret, API key or signing secret stays in\n * `secrets.json → providerEnv`. The CLI refuses a key named like one of the provider's declared secrets.\n */\nexport const WildoEnvironmentProviderConfigurationsSchema = z.record(\n z.string().min(1),\n z.record(z.string().min(1), z.record(z.string().min(1), z.unknown())),\n // Never a provider module's own keys (#2995): an environment cannot rewrite where a provider sends its credential any\n // more than the application can. A local double is reached through the environment-gated loopback host instead. And\n // never a key the protocol's reader does not read (#3003), the same refusal the application's own block gets.\n).superRefine(refuseUnreadProviderConfigurationValues);\nexport type WildoEnvironmentProviderConfigurations = z.infer<typeof WildoEnvironmentProviderConfigurationsSchema>;\n\n/**\n * The provider configuration ONE environment runs with: the application-level `providerConfigurations`, with the\n * environment's {@link WildoEnvironmentProviderConfigurationsSchema} values laid over it key by key.\n *\n * Precedence is per key inside one `providerRef → protocolKind` bag, and the environment wins — the more specific\n * layer, as `secrets.json → providerEnv` wins over `observability.llmObservability.providerEnv`. A bag the\n * environment does not mention is carried unchanged; a bag only the environment declares is added. Neither input is\n * mutated.\n *\n * Rejected: replacing a whole provider or protocol bag. That would force an environment to restate every\n * environment-invariant key it shares with the application (an agent execution profile beside a client ID), and a\n * restated copy is one that drifts from the original.\n *\n * Throws when the application layer holds a non-object at a protocol key the environment overlays: there is no key\n * to lay a value over, and silently replacing it would discard the application's value without saying so.\n */\nexport function overlayEnvironmentProviderConfigurations(\n applicationProviderConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>> | undefined,\n environmentProviderConfigurations: WildoEnvironmentProviderConfigurations | undefined,\n): Record<string, Record<string, unknown> | undefined> {\n const resolved: Record<string, Record<string, unknown> | undefined> = {};\n for (const [providerRef, protocols] of Object.entries(applicationProviderConfigurations ?? {})) {\n resolved[providerRef] = protocols === undefined ? undefined : { ...protocols };\n }\n for (const [providerRef, environmentProtocols] of Object.entries(environmentProviderConfigurations ?? {})) {\n const merged: Record<string, unknown> = { ...(resolved[providerRef] ?? {}) };\n for (const [protocolKind, environmentValues] of Object.entries(environmentProtocols)) {\n const applicationValues = merged[protocolKind];\n if (applicationValues !== undefined && (applicationValues === null || typeof applicationValues !== 'object' || Array.isArray(applicationValues))) {\n throw new Error(\n `providerConfigurations.${providerRef}.${protocolKind} is not an object in wildo.saas.config.ts, so the `\n + 'environment\\'s values for it cannot be laid over it key by key.',\n );\n }\n merged[protocolKind] = { ...(applicationValues as Record<string, unknown> | undefined), ...environmentValues };\n }\n resolved[providerRef] = merged;\n }\n return resolved;\n}\n\nexport enum DatabaseEngine {\n MONGODB = 'mongodb',\n POSTGRESQL = 'postgresql',\n}\n\n/**\n * The store an APPLICATION persists to when its environment authors no `applicationDatabase`.\n *\n * PostgreSQL — decided by Paul on 2026-09-24 (#1571), reversing 75cd1934f (\"absence means MongoDB\")\n * and restoring the rule of 2e0194c41. This is the ONLY place the answer is written. Every reader of\n * an application's engine goes through {@link resolveApplicationDatabaseEngine}, because the\n * 2026-09-15 incident was two readers answering silence differently: provisioning chose PostgreSQL,\n * the runtime chose MongoDB, Mongo provisioning was skipped, registration reported success, and the\n * application died at boot with `Command update requires authentication`.\n *\n * Distinct from the PLATFORM's own store (`database` in the infra config) and from the engine's\n * `DEFAULT_PERSISTENCE_ADAPTER` / `DATABASE_DEFAULT_ADAPTER` env default, which also governs\n * platform services and is not what this decides. The application never falls through to that env\n * default: the CLI writes the resolved adapter explicitly.\n */\nexport const DEFAULT_APPLICATION_DATABASE_ENGINE: DatabaseEngine = DatabaseEngine.POSTGRESQL;\n\n/**\n * The engine an application persists to: its authored `applicationDatabase.engine`, or\n * {@link DEFAULT_APPLICATION_DATABASE_ENGINE} when the environment authors none.\n *\n * Takes the declaration rather than a whole config so every carrier of it — the parsed infra config,\n * `config.json`, a bootstrap request — answers through the same function.\n */\nexport function resolveApplicationDatabaseEngine(applicationDatabase: { readonly engine?: DatabaseEngine } | undefined): DatabaseEngine {\n return applicationDatabase?.engine ?? DEFAULT_APPLICATION_DATABASE_ENGINE;\n}\n\nexport enum WildoImageTagStrategy {\n COMMIT_SHA = 'commit-sha',\n BRANCH_NAME = 'branch-name',\n SEMVER = 'semver',\n}\n\n/**\n * Docker Compose deployment — no scaling, no K8s-specific fields.\n */\nexport const DockerComposeDeploymentSchema = z.strictObject({\n branch: z.string().min(1),\n runtime: z.literal(WildoDeploymentRuntime.DOCKER_COMPOSE),\n imageTagStrategy: z.enum(WildoImageTagStrategy).default(WildoImageTagStrategy.COMMIT_SHA),\n});\n\n/**\n * Kubernetes deployment — branch, namespace and tagging.\n *\n * No `registry`: an environment's images live at `remoteProvider.registryEndpoint`, the registry every deploy\n * manifest pulls from and the deploy workflow pushes to. A separate field here could only repeat that value or\n * contradict it — and it did contradict it, sending CI pushes to GHCR while the cluster pulled from the endpoint\n * (#1165). Both deployment shapes are strict, so a leftover `registry` is refused rather than silently ignored.\n */\nexport const KubernetesDeploymentSchema = z.strictObject({\n branch: z.string().min(1),\n runtime: z.literal(WildoDeploymentRuntime.KUBERNETES),\n namespace: z.string().min(1).optional(),\n imageTagStrategy: z.enum(WildoImageTagStrategy).default(WildoImageTagStrategy.COMMIT_SHA),\n});\n\n/**\n * Deployment configuration for CI/CD pipeline integration.\n * Discriminated on `runtime`: the K8s-specific field (`namespace`)\n * is only available when `runtime` is `KUBERNETES`.\n */\nexport const WildoDeploymentConfigSchema = z.discriminatedUnion('runtime', [\n DockerComposeDeploymentSchema,\n KubernetesDeploymentSchema,\n]);\nexport type WildoDeploymentConfig = z.infer<typeof WildoDeploymentConfigSchema>;\n/** @wildo_source:part:end platform.config.environment.deployment */\n\n/**\n * Canonical namespace derivation for platform-managed application resources.\n *\n * Environment ids are part of the namespace because local and arbitrary remote\n * deployments must be isolated through generated names instead of hand-authored\n * checked-in values.\n */\nexport function buildApplicationNamespace(\n appSlug: string,\n environmentId: string,\n): string {\n const normalizedAppSlug = appSlug.trim();\n const normalizedEnvironmentId = environmentId.trim();\n\n if (!normalizedAppSlug) {\n throw new Error('appSlug is required to derive an application namespace');\n }\n if (!normalizedEnvironmentId) {\n throw new Error('environmentId is required to derive an application namespace');\n }\n\n return `${normalizedAppSlug}-${normalizedEnvironmentId}`;\n}\n\nexport function buildApplicationDatabaseUsername(\n appSlug: string,\n environmentId: string,\n): string {\n return `${buildApplicationNamespace(appSlug, environmentId)}_user`;\n}\n\n/**\n * Per-environment origins the DOCUMENTATION site must be built against.\n *\n * ## Why these are authored per environment rather than inferred\n *\n * A documentation bundle is STATIC: whatever origin it is built with is compiled into\n * the shipped JavaScript. The docs site deep-links anonymous readers into the SaaS app to\n * sign in, and exchanges a token against the backend, so a bundle built with the wrong\n * origin does not degrade — it silently points every reader at the wrong host.\n *\n * That is why `docusaurus.config.ts` refuses to complete a PRODUCTION build when these are\n * unset, and falls back to local defaults otherwise. The guard is correct; what was missing\n * was a declared source, so the values had to be remembered on a command line and were\n * therefore absent from every environment definition. Authoring them here puts them where\n * every other per-environment posture already lives, and `wildo config sync` carries them.\n *\n * Passed as `WILDO_DOCS_API_BASE_URL`, `WILDO_DOCS_APP_URL` and `WILDO_DOCS_FRONTEND_SERVICE_NAME` to the\n * documentation image's build and to the CI workflow, read from the loaded descriptor (#2310). They are build\n * inputs: no runtime environment carries them.\n *\n * Every member is optional: an application with no documentation site authors nothing, and\n * a local environment relies on the config's own dev defaults rather than restating ports\n * that the runtime already knows.\n */\nexport const WildoDocumentationSiteConfigSchema = z.object({\n /**\n * Backend origin the docs bundle calls for `/auth/token/exchange` and\n * `/auth/cross-frontend-handoff` — e.g. `https://api.example.com`.\n */\n apiBaseUrl: z.string().trim().min(1).optional(),\n /**\n * SaaS application origin the docs site deep-links anonymous readers to for sign-in —\n * e.g. `https://app.example.com`.\n */\n appUrl: z.string().trim().min(1).optional(),\n /**\n * Frontend service name the docs site identifies as when resolving its own providers.\n * Must match the service key declared in `wildo.saas.config.ts#frontendServices`.\n */\n frontendServiceName: z.string().trim().min(1).optional(),\n});\n\nexport type WildoDocumentationSiteConfig = z.infer<typeof WildoDocumentationSiteConfigSchema>;\n"]}
|
|
@@ -323,8 +323,9 @@ export interface AppCredentialMintingContext {
|
|
|
323
323
|
* Absent for the application backend, which is granted database-wide by a
|
|
324
324
|
* different path. Absent for a NAMED principal means "no grants derived" —
|
|
325
325
|
* which a module must treat as an ERROR rather than as a reason to fall back
|
|
326
|
-
* to the wide grant
|
|
327
|
-
*
|
|
326
|
+
* to the wide grant. A minion with no declared access is passed an EXPLICIT
|
|
327
|
+
* empty grant by the orchestrator, so it gets the engine-floor role and no
|
|
328
|
+
* business table (#1771); the error is for a caller that forgot to pass one.
|
|
328
329
|
*/
|
|
329
330
|
resourceGrants?: MinionResourceGrants;
|
|
330
331
|
adminClient: unknown;
|
|
@@ -407,8 +408,7 @@ export interface AppCredentialMintingResult {
|
|
|
407
408
|
* channel for values the orchestrator needs at app-init time but
|
|
408
409
|
* deliberately does NOT persist.
|
|
409
410
|
*
|
|
410
|
-
*
|
|
411
|
-
* field for the MongoDB modules: `MongodbAtlasInfraProviderModule`
|
|
411
|
+
* This field was introduced for the MongoDB modules: `MongodbAtlasInfraProviderModule`
|
|
412
412
|
* returns `runtimeArtifacts['connectionString']` (the per-app
|
|
413
413
|
* SRV URL with credentials embedded) so the orchestrator can use
|
|
414
414
|
* it for transient app-database seeding without persisting the
|
|
@@ -609,6 +609,12 @@ export interface IPostgresAdminClient {
|
|
|
609
609
|
* previously held before granting, or a table removed from `resourceAccess`
|
|
610
610
|
* keeps its privilege and revocation becomes a no-op that reports success.
|
|
611
611
|
*
|
|
612
|
+
* A declared table that does not exist yet cannot be granted, and is OWED: the
|
|
613
|
+
* implementation must record every grant it derived, in the same transaction, in
|
|
614
|
+
* the in-database contract of `postgresql-owed-grants.contracts.ts`, so the
|
|
615
|
+
* application's migration run grants each table as it creates it (#3027).
|
|
616
|
+
* `dropTableScopedDatabaseRole` must remove the role's record with its grants.
|
|
617
|
+
*
|
|
612
618
|
* An empty `readTables`/`writeTables` pair is legitimate — a role that can
|
|
613
619
|
* connect and see nothing — and must NOT be read as "unspecified, leave the
|
|
614
620
|
* previous grants alone".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infra-providers.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/infra-providers.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;;;;GAMG;AACH,oBAAY,eAAe;IACzB,iBAAiB,sBAAsB;IACvC,mBAAmB,wBAAwB;IAC3C,iBAAiB,sBAAsB;IACvC,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B;;;OAGG;IACH,iBAAiB,sBAAsB;IACvC;;;OAGG;IACH,cAAc,mBAAmB;CAClC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAkBjG,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC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G,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;OAOG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;;;;;;OASG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,CAAC,EAAE,2BAA2B,CAAC;IACxC
|
|
1
|
+
{"version":3,"file":"infra-providers.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/infra-providers.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;;;;GAMG;AACH,oBAAY,eAAe;IACzB,iBAAiB,sBAAsB;IACvC,mBAAmB,wBAAwB;IAC3C,iBAAiB,sBAAsB;IACvC,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B;;;OAGG;IACH,iBAAiB,sBAAsB;IACvC;;;OAGG;IACH,cAAc,mBAAmB;CAClC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAkBjG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AE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAC;IAE9C;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3E;;;;;;;;;;;;;;OAcG;IACH,8BAA8B,CAAC,CAC7B,OAAO,EAAE,uCAAuC,GAC/C,OAAO,CAAC,sCAAsC,GAAG,IAAI,CAAC,CAAC;CAC3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infra-providers.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/infra-providers.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,eAkBX;AAlBD,WAAY,eAAe;IACzB,0DAAuC,CAAA;IACvC,8DAA2C,CAAA;IAC3C,0DAAuC,CAAA;IACvC,oDAAiC,CAAA;IACjC,4DAAyC,CAAA;IACzC,oDAAiC,CAAA;IACjC,kDAA+B,CAAA;IAC/B;;;OAGG;IACH,0DAAuC,CAAA;IACvC;;;OAGG;IACH,oDAAiC,CAAA;AACnC,CAAC,EAlBW,eAAe,KAAf,eAAe,QAkB1B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAuD;IACpG;;;;;;;;;;;;;OAaG;IACH,CAAC,eAAe,CAAC,iBAAiB,CAAC,EACjC,+FAA+F;UAC7F,+FAA+F;CACpG,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAuD;IAC7F;;;;;OAKG;IACH,CAAC,eAAe,CAAC,cAAc,CAAC,EAC9B,6FAA6F;CAChG,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAN,IAAY,aAwDX;AAxDD,WAAY,aAAa;IACvB,kBAAkB;IAClB;;;oCAGgC;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AC,MAAM,mCAAmC,GAC9C,4CAA4C,CAAC,MAAM,CAAC;IAClD,aAAa,EAAE,4CAA4C,CAAC,QAAQ,EAAE;IACtE,UAAU,EAAE,yCAAyC,CAAC,QAAQ,EAAE;CACjE,CAAC,CAAC,WAAW,EAAE,CAAC;AA2hBnB;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,wBAEX;AAFD,WAAY,wBAAwB;IAClC,mFAAc,CAAA;AAChB,CAAC,EAFW,wBAAwB,KAAxB,wBAAwB,QAEnC","sourcesContent":["import { z } from 'zod';\nimport type { ApplicationRuntimePrincipal } from '../../bootstrap/runtime-principal.contracts';\nimport type { MinionResourceGrants } from './minion-resource-access.validation';\nimport type { PostgreSQLSSLMode } from '@wildo-ai/saas-models';\n\n/**\n * Environment functions an infra environment must fulfill.\n *\n * This vocabulary is intentionally platform/config-owned, not part of\n * `@wildo-ai/saas-models`, because browser/runtime packages must not\n * import infrastructure provider concepts.\n */\nexport enum InfraCapability {\n DOCUMENT_DATABASE = 'DOCUMENT_DATABASE',\n RELATIONAL_DATABASE = 'RELATIONAL_DATABASE',\n AUDIT_LOG_STORAGE = 'AUDIT_LOG_STORAGE',\n OBJECT_STORAGE = 'OBJECT_STORAGE',\n ANTIVIRUS_SCANNING = 'ANTIVIRUS_SCANNING',\n QUEUING_SYSTEM = 'QUEUING_SYSTEM',\n CACHE_MANAGER = 'CACHE_MANAGER',\n /**\n * OTLP telemetry. GRANTED TO EVERY RUNTIME, never declared as a backing service — see\n * {@link RUNTIME_GRANTED_INFRA_CAPABILITIES}.\n */\n METRICS_TELEMETRY = 'METRICS_TELEMETRY',\n /**\n * Backup. RESERVED — no backing-service kind declares it and no module serves it; see\n * {@link RESERVED_INFRA_CAPABILITIES}.\n */\n BACKUP_MANAGER = 'BACKUP_MANAGER',\n}\n\n/**\n * Capabilities NO `BackingServiceKind` projects to — granted to a runtime by the platform rather\n * than declared by an environment.\n *\n * `BackingServiceKindToInfraCapability` used to be described as bijective, and a test asserted the\n * reverse direction: every capability reachable from some kind. That held only while every\n * capability was something an environment points at. It is not a property of the model, and reading\n * it as one is what kept `metrics-telemetry` alive as an authoring surface with no consumer.\n *\n * Membership here is the ANSWER to \"why does this capability have no kind\", so a capability that\n * belongs in neither place is a real gap and stays visible as one.\n */\nexport const RUNTIME_GRANTED_INFRA_CAPABILITIES: Readonly<Partial<Record<InfraCapability, string>>> = {\n /*\n * Telemetry is configured in TWO places, and a backing service is neither of them: the endpoint is\n * authored at `observability.telemetry.endpoint` (projected to `OTEL_EXPORTER_OTLP_ENDPOINT`), and\n * the auth header is derived provider-agnostically from the selected `OBSERVABILITY_TELEMETRY`\n * engine provider. Nothing is left for an environment to declare, and nothing for an\n * infra-provider module to mint — those exist to issue PER-APPLICATION credentials, and a\n * telemetry token is one provider-level secret shared by every runtime.\n *\n * The capability itself is load-bearing and must NOT be withdrawn with the kind: it carries the\n * `DATA_TELEMETRY` network in `NETWORK_FOR_CAPABILITY` and sits in\n * `MINION_UNCONDITIONAL_CAPABILITIES`, so every runtime reaches the collector through it. Setting\n * it to `null` there was corrected on 2026-08-12 precisely because it \"would have cut tracing for\n * every runtime the moment segmentation was enforced, with NO readiness check covering it\".\n */\n [InfraCapability.METRICS_TELEMETRY]:\n 'Authored at observability.telemetry + the OBSERVABILITY_TELEMETRY provider; granted to every '\n + 'runtime for the DATA_TELEMETRY network, so no environment declares it and no module mints it.',\n};\n\n/**\n * Capabilities kept as VOCABULARY with no way to be selected yet — neither declared by an\n * environment (no `BackingServiceKind` projects to them) nor granted to runtimes by the platform.\n *\n * This is the third answer to \"why does this capability have no kind\", beside\n * `BackingServiceKindToInfraCapability` and {@link RUNTIME_GRANTED_INFRA_CAPABILITIES}. It exists so\n * that answer is WRITTEN DOWN: a capability in none of the three is an unexplained gap, and the\n * reachability test still fails on it.\n *\n * Membership is a statement that nothing can reach the capability today. It is not a placeholder\n * an environment may fill in — withdrawing the declarable kind is what stopped it being one.\n */\nexport const RESERVED_INFRA_CAPABILITIES: Readonly<Partial<Record<InfraCapability, string>>> = {\n /*\n * The `backup` backing-service kind was WITHDRAWN 2026-09-26 (#1693): it resolved to no provider,\n * rendered no workload, and nothing read it. The capability stays because whether backup is modelled\n * as a capability at all is the design question #8 owns. Its network is `null` in\n * `NETWORK_FOR_CAPABILITY` for the same reason — no runtime dials a backup target.\n */\n [InfraCapability.BACKUP_MANAGER]:\n 'Reserved for the backup design (#8): no environment can declare it and no module serves it.',\n};\n\n/**\n * Built-in environment-facing provider ids — the (kind × hosting-model\n * × brand) projection vocabulary. Apps SELECT these implicitly via\n * `wildo.infra.<env>.config.ts > backingServices.<kind>.{source,\n * provider?}`; the planner resolves the tuple to one of these\n * `InfraProvider` values via `resolveInfraProvider`.\n *\n * **Naming convention**: `<KIND>_<BRAND>` — `BRAND` is either a\n * vendor (Atlas / AWS_RDS / Supabase / …) for managed services, or\n * an open-source software name (MinIO / vanilla self-hosted) for\n * self-hosted. `<KIND>_MANAGED` exists as a generic fallback when\n * the operator hasn't named a brand (Postgres in particular —\n * acceptable while the brand catalog is incomplete; Mongo's\n * `MONGODB_ATLAS` is the only branded managed option today, so no\n * `MONGODB_MANAGED` generic is needed).\n *\n * Slice 4.B.0 (2026-05-07) added the Postgres brand expansion to\n * generalize the source/brand split that S3 already had.\n */\nexport enum InfraProvider {\n // === MongoDB ===\n /** Self-hosted vanilla MongoDB (in-cluster docker-compose / K8s\n * deployment). Selected via `source: SELF`. No `provider` brand\n * required (Mongo's `provider` axis is reserved for managed\n * variants like `'atlas'`). */\n MONGODB_SELF = 'mongodb-self',\n /** MongoDB Atlas (managed cloud). brand: `'atlas'`. */\n MONGODB_ATLAS = 'mongodb-atlas',\n\n // === PostgreSQL ===\n /** Self-hosted vanilla PostgreSQL (in-cluster docker-compose /\n * K8s deployment). Selected via `source: SELF`. */\n POSTGRES_SELF = 'postgres-self',\n /** Generic managed Postgres — fallback when the operator hasn't\n * named a brand. Concrete brand identifiers below are preferred. */\n POSTGRES_MANAGED = 'postgres-managed',\n /** AWS RDS for PostgreSQL. brand: `'aws-rds'`. */\n POSTGRES_AWS_RDS = 'postgres-aws-rds',\n /** Google Cloud SQL for PostgreSQL. brand: `'gcp-cloud-sql'`. */\n POSTGRES_GCP_CLOUD_SQL = 'postgres-gcp-cloud-sql',\n /** Azure Database for PostgreSQL. brand: `'azure-database'`. */\n POSTGRES_AZURE_DATABASE = 'postgres-azure-database',\n /** Supabase. brand: `'supabase'`. */\n POSTGRES_SUPABASE = 'postgres-supabase',\n /** Neon. brand: `'neon'`. */\n POSTGRES_NEON = 'postgres-neon',\n /** Render. brand: `'render'`. */\n POSTGRES_RENDER = 'postgres-render',\n\n // === Redis / Valkey ===\n /** Self-hosted Redis-compatible cache (today: Valkey under the\n * hood; the engine adapter is wire-protocol compatible with\n * Redis OSS). Selected via `source: SELF`. */\n REDIS_SELF = 'redis-self',\n\n // === RabbitMQ ===\n /** Self-hosted RabbitMQ broker (in-cluster docker-compose / K8s\n * deployment). Selected via `source: SELF`. */\n RABBITMQ_SELF = 'rabbitmq-self',\n\n // === Object storage ===\n /** MinIO (self-hosted S3-compatible). brand: `'minio'` (or unset on\n * source=self — MinIO is the canonical default). */\n MINIO_SELF = 'minio-self',\n /** AWS S3 (managed). brand: `'aws'`. */\n AWS_S3 = 'aws-s3',\n\n // === Stateless infra ===\n /** Self-hosted ClamAV antivirus scanning service. Stateless (no\n * auth, no per-tenant state); apps connect to a shared host:port.\n * Selected via `source: SELF`. */\n CLAMAV_SELF = 'clamav-self',\n /** Self-hosted immudb — immutable, cryptographically-verifiable DB used as a\n * tamper-evident audit-log store. Selected via `source: SELF`. */\n IMMUDB_SELF = 'immudb-self',\n}\n\n/**\n * Platform-side consumers of an `InfraProviderPlanContribution.platformAdmin`\n * block. Each provider declares which platform services receive its\n * admin credentials so the planner can route them to the right pod /\n * compose service / env file.\n *\n * Locked enum (2026-05-05). Extending requires adding the consumer\n * enum value here AND in every `InfraProviderModule.plan()` that\n * legitimately delivers admin credentials to the new consumer.\n *\n * Excluded by design (consume platform-service APIs, not direct infra-admin):\n * - `file-generator`\n * - `sourcecode-provider`\n *\n * Add as real consumers surface, not pre-emptively.\n */\nexport enum InfraPlatformAdminConsumer {\n APPS_MANAGER = 'apps-manager',\n COMPANION = 'companion',\n CRONTABS_BATCHES_MANAGER = 'crontabs-batches-manager',\n MODULE_REGISTRY = 'module-registry',\n}\n\n/**\n * Audience-less contributions: describe the infra resource itself.\n * Same payload regardless of who consumes it (compose definitions,\n * K8s manifests, CI checks).\n */\nconst InfraProviderResourceContributionShapeSchema = z.strictObject({\n dockerComposeServices: z.array(z.string().min(1)).optional(),\n k8sResources: z.array(z.string().min(1)).optional(),\n startupScripts: z.array(z.string().min(1)).optional(),\n ciChecks: z.array(z.string().min(1)).optional(),\n policyChecks: z.array(z.string().min(1)).optional(),\n});\n\n/**\n * Audience: platform services that need **management-API access** to\n * administer the infra resource (create per-app users / vhosts / ACLs\n * / DBs). This is audience-1 in the three-audience model:\n *\n * 1. **Platform-admin** (this contribution slice). Cluster-wide\n * management-API credentials. Consumed by apps-manager (mints\n * per-app users via `mintAppCredentials`), companion (mirrors\n * apps-manager admin role for local dev). `crontabs` /\n * `module-registry` are listed in the enum because they MAY\n * surface admin needs in future slices, but no provider should\n * declare them as consumers in this slice unless evidence\n * surfaces.\n * 2. **Platform-service-scoped** (NOT modeled in `plan()` yet —\n * see LD-8 / Slice 2.5). Per-platform-service publish/consume\n * creds for the platform-services that participate in\n * inter-service messaging (`PLATFORM_SERVICES` enum:\n * apps-manager, crontabs-batches-manager, file-generator).\n * Today provisioned inline by\n * `PlatformInfrastructureManagerService.provisionAllPlatformServices`.\n * 3. **App-scoped** (`appRuntime` slice below). Per-app\n * publish/consume creds, minted by `mintAppCredentials`.\n *\n * `consumers` is the explicit audience declaration: every provider\n * states which platform services receive this block. The planner\n * routes the credentials accordingly.\n */\nconst InfraProviderPlatformAdminContributionSchema = z.strictObject({\n envVars: z.record(z.string(), z.string()).optional(),\n secretEnvVars: z.array(z.string().min(1)).optional(),\n consumers: z.array(z.enum(InfraPlatformAdminConsumer)).optional(),\n});\nexport type InfraProviderPlatformAdminContribution = z.infer<\n typeof InfraProviderPlatformAdminContributionSchema\n>;\n\n/**\n * Audience: customer-app + minion + Node-worker pods. Per-app\n * runtime delivery flows through the persisted\n * `Wildo_Application_Config` and `Wildo_Application_Secrets` blobs in\n * MongoDB (NOT through K8s deployment-Secret env vars; engine\n * consumers like `queue.backend.service.ts:144-149` read from\n * `appConfigService.{config,secrets}` after fetching them at startup\n * via app-config-fetch).\n *\n * - `perAppConfigBlobPaths`: JSON paths into `Wildo_Application_Config`\n * carrying static values (same for every app in this env) — e.g.\n * `'database.rabbitmq.host': 'rabbitmq'`. Merged into the persisted\n * config blob by the planner at sync time.\n * - `perAppSecretBlobPaths`: JSON paths into `Wildo_Application_Secrets`\n * that `mintAppCredentials` will populate at deploy time (e.g.\n * `'database.rabbitmq.username'`). The planner emits only the path\n * list; apps-manager invokes `mintAppCredentials` per app to produce\n * the values, then merges them into the persisted secrets blob via\n * the existing `_merge_WildoApplicationSecrets` machinery.\n *\n * No K8s-Secret-env-var output is intentional: the K8s\n * `{appSlug}-secret` carries only the four-env bootstrap-env-contract\n * (APPLICATION_ID / PLATFORM_APPLICATION_PRIMARY_SECRET /\n * PLATFORM_APPS_MANAGER_URL / APPLICATION_ENV); per-resource creds\n * land in MongoDB, not env. If a future provider genuinely needs\n * env-var injection it can extend this contribution shape via\n * `.passthrough()` — not pre-emptively designed for here.\n */\nconst InfraProviderAppRuntimeContributionSchema = z.strictObject({\n perAppConfigBlobPaths: z.record(z.string().min(1), z.unknown()).optional(),\n perAppSecretBlobPaths: z.array(z.string().min(1)).optional(),\n});\nexport type InfraProviderAppRuntimeContribution = z.infer<\n typeof InfraProviderAppRuntimeContributionSchema\n>;\n\n/**\n * Two-slice contribution shape. The audience-less resource block\n * (compose / K8s / CI) merges with the audience-scoped credential\n * blocks (`platformAdmin`, `appRuntime`).\n *\n * `.passthrough()` is preserved on the merged shape so future\n * contribution kinds (dashboards, alerting rules, autoscaler hints)\n * can be added without breaking existing modules.\n */\nexport const InfraProviderPlanContributionSchema =\n InfraProviderResourceContributionShapeSchema.extend({\n platformAdmin: InfraProviderPlatformAdminContributionSchema.optional(),\n appRuntime: InfraProviderAppRuntimeContributionSchema.optional(),\n }).passthrough();\nexport type InfraProviderPlanContribution = z.infer<typeof InfraProviderPlanContributionSchema>;\n\nexport interface InfraProviderPlanningContext {\n environment: string;\n runtime: string;\n backingServiceKey: string;\n config: unknown;\n}\n\n/**\n * Per-app credential minting context. Called by the orchestrator\n * (apps-manager `wildo-application-lifecycle.service.ts`) at app-init\n * time — not at K8s deploy time. The orchestrator is responsible for\n * **generation policy** (read existing creds from MongoDB; decide\n * rotate-vs-preserve based on `overrideCredentials` flag; generate\n * new password when needed); the module is responsible for the\n * **broker upsert** (install / replace the user on the broker with\n * the supplied password).\n *\n * Inputs:\n * - `appSlug` — the application slug (or its derived namespace\n * `ns`); used by the module to compute the rabbit username,\n * permission regex, etc.\n * - `adminClient` — pre-wired by the orchestrator from the resolved\n * `platformAdmin` env vars; concrete type narrowed per provider at\n * the module's implementation site (e.g., RabbitMQ modules narrow\n * to `RabbitMQManagementClient`).\n * - `secretInputs` — orchestrator-supplied scalars keyed by the JSON\n * path the module declared in `appRuntime.perAppSecretBlobPaths`.\n * For RabbitMQ: `{ 'database.rabbitmq.password': '<orchestrator-generated-password>' }`.\n * The module installs these on the broker; it does NOT generate\n * passwords itself.\n *\n * Note: `applicationEnv` was previously included in this context but\n * removed 2026-05-06 — the integration site (`wildo-application-lifecycle`)\n * does not carry an env field on its options shape.\n */\nexport interface AppCredentialMintingContext {\n /**\n * Raw application slug (e.g., `'wonder-todos'`). Used by modules\n * whose per-app resource names embed the slug directly without\n * env-scoping (e.g., MongoDB database name).\n */\n appSlug: string;\n /**\n * Application namespace = `<appSlug>-<environmentId>`, derived\n * server-side via `buildApplicationNamespace` in platform-config-lib.\n * Used by modules whose per-app resource names scope by namespace\n * (RabbitMQ username, Redis ACL keyPattern, …) — i.e., resources\n * that must remain isolated across env boundaries (`wonder-todos-local`\n * vs `wonder-todos-staging`).\n */\n applicationNamespace: string;\n /**\n * Stable opaque application identifier (Mongo ObjectId-shaped string,\n * matches the convention at\n * `wildo-application-lifecycle.service.ts:552` where the broker\n * permission regex disambiguates per-app queue/reply names by this\n * id, NOT by `appSlug` — the slug is human-readable and could\n * theoretically be reassigned, the id is forever-stable). Required\n * by modules whose per-app resource names embed the application id\n * (RabbitMQ permission regex, …).\n */\n wildoApplicationId: string;\n /**\n * WHICH runtime principal these credentials are for (Step 2 / D17).\n *\n * Optional, and absent means the APPLICATION BACKEND — which keeps every\n * existing module and call site meaning exactly what it meant before, since\n * per-application minting IS the backend principal's case.\n *\n * A module that ignores this field still mints correctly for the backend and\n * simply does not participate in per-principal narrowing; a module that reads\n * it must derive a DISTINCT resource name (ACL username, DB user, queue\n * permission) per principal, or two principals will share one credential and\n * the narrowing will exist only on paper.\n *\n * `buildRuntimePrincipalKey` renders the stable identity to embed in such a\n * name — the same string the stored section is keyed by, so a minted resource\n * and the row that records it cannot drift.\n */\n principal?: ApplicationRuntimePrincipal;\n /**\n * What this principal may touch, in RESOURCE TYPES (Step 3).\n *\n * Deliberately the platform vocabulary, not storage names: a module that\n * grants on tables and a module that grants on collections must receive the\n * same contract, and the translation belongs at each adapter via\n * `resolveGrantStorageNames`.\n *\n * Absent for the application backend, which is granted database-wide by a\n * different path. Absent for a NAMED principal means \"no grants derived\" —\n * which a module must treat as an ERROR rather than as a reason to fall back\n * to the wide grant (D11/R3: a minion with no declared access gets no\n * database user at all, and that is the orchestrator's decision to make).\n */\n resourceGrants?: MinionResourceGrants;\n adminClient: unknown;\n secretInputs: Record<string, string>;\n /**\n * Optional non-secret per-app config inputs supplied by the\n * orchestrator. Distinct from `secretInputs` (passwords) — these\n * are authored topology values that affect HOW the module\n * provisions the per-app resource. Each module documents the keys\n * it consumes in its own JSDoc.\n *\n * Slice 2.5c-3 introduced this field for `RabbitmqSelfInfraProviderModule`\n * to receive the optional per-app vhost (key `'vhost'`); future\n * modules may use it for per-app database suffixes, bucket prefixes,\n * or other authored topology overrides without further extending\n * the context shape.\n *\n * When `undefined` or missing a key the module relies on, the\n * module falls back to its default behavior (e.g., RabbitMQ\n * provisions on the default vhost `/`).\n */\n applicationConfigInputs?: Record<string, string>;\n}\n\n// =============================================================================\n// Platform-service-scoped credential minting (audience-2 / LD-8)\n// =============================================================================\n//\n// `provisionAllPlatformServices` (in apps-manager\n// `PlatformInfrastructureManagerService`) hands each platform service\n// (`apps-manager`, `crontabs-batches-manager`, `file-generator`) a SCOPED\n// (non-admin) broker user for inter-service messaging. Today the policy\n// (per-service permission regex, the broader-permissions special case for\n// crontabs) is hand-rolled inline. Slice 2.5 of `infra-provider-planner.md`\n// moves it onto the `InfraProviderModule` interface so each provider owns\n// its own per-platform-service policy.\n//\n// Distinct from `mintAppCredentials` (audience-3): platform-service creds\n// land in MongoDB `platformApplicationsSecrets` (orchestrator-owned), NOT\n// in `Wildo_Application_Secrets`.\n\n/**\n * Context for `InfraProviderModule.mintPlatformServiceCredentials`.\n * Same orchestrator-pattern as `mintAppCredentials`: orchestrator\n * generates the password, passes it via `secretInputs`; module is\n * upsert-only on the broker.\n */\nexport interface PlatformServiceCredentialMintingContext {\n /**\n * Stable identifier of the platform service this credential is for.\n * Today: members of `PlatformApplicationType` (e.g.,\n * `'platform_apps_manager'`, `'platform_crontabs_batches_manager'`,\n * `'platform_file_generator'`). Module derives the per-service\n * permission regex from this string.\n */\n serviceName: string;\n adminClient: unknown;\n /**\n * Orchestrator-supplied scalars. For RabbitMQ the only required\n * key is `'password'` (no JSON-blob-path conventions because\n * platform-service creds don't go into a per-app blob — they're\n * persisted at the platform-services collection level).\n */\n secretInputs: Record<string, string>;\n}\n\nexport interface PlatformServiceCredentialMintingResult {\n /**\n * Username installed on the broker. Equals `serviceName` today\n * (the legacy convention preserved from the inline ceremony in\n * `PlatformInfrastructureManagerService.provisionServiceCredentials`).\n * Future modules may transform if needed; the orchestrator persists\n * this value alongside the password.\n */\n username: string;\n}\n\n/**\n * Per-app credential minting result. Keys are JSON paths into\n * `Wildo_Application_Secrets` (those declared in\n * `appRuntime.perAppSecretBlobPaths`); values are the canonical\n * persisted form post-broker-upsert. Typically:\n * - **Module-derived** values (e.g., `'database.rabbitmq.username': 'app_<ns>'`).\n * The module computes these from `appSlug`.\n * - **Echoed** values from `secretInputs` (e.g.,\n * `'database.rabbitmq.password': '<the-password-you-passed-in>'`)\n * — the module confirms it installed them on the broker.\n *\n * The orchestrator (apps-manager) merges this map into the persisted\n * secrets blob via `_merge_WildoApplicationSecrets`. The customer\n * pod reads at startup via the standard app-config-fetch path — no\n * K8s Secret involvement for per-app data creds.\n */\nexport interface AppCredentialMintingResult {\n secretBlobValues: Record<string, string>;\n /**\n * Optional non-persisted return values the module produces in the\n * course of upsert. Distinct from `secretBlobValues` (which lands\n * in `Wildo_Application_Secrets`) — `runtimeArtifacts` is a back-\n * channel for values the orchestrator needs at app-init time but\n * deliberately does NOT persist.\n *\n * Slice 4.B.3 of `infra-provider-planner.md` introduced this\n * field for the MongoDB modules: `MongodbAtlasInfraProviderModule`\n * returns `runtimeArtifacts['connectionString']` (the per-app\n * SRV URL with credentials embedded) so the orchestrator can use\n * it for transient app-database seeding without persisting the\n * whole credentialed URL into secrets — the persistence shape is\n * `(username, password)` in secrets + `(host, protocol, options,\n * database)` in config, NOT a single URL string.\n *\n * When `undefined`, the module has no transient artifacts; the\n * orchestrator should rely on `secretBlobValues` only.\n */\n runtimeArtifacts?: Record<string, string>;\n}\n\n// =============================================================================\n// Per-provider admin-client contracts\n// =============================================================================\n//\n// Each `InfraProviderModule.mintAppCredentials` call narrows the\n// `AppCredentialMintingContext.adminClient` field to a per-provider\n// management-client interface. The interfaces live HERE (in\n// platform-config-lib, contracts-only per platform/CLAUDE.md) so the\n// module implementation (in platform-apps-manager) and the manager\n// implementation (also in platform-apps-manager) share one definition\n// — and any future caller (companion, CLI) can implement the same\n// interface without depending on the manager class.\n\n/**\n * Raw RabbitMQ management-API transport (HTTP `PUT/DELETE`). Surface\n * what `RabbitmqSelfInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. The 5C policy/transport\n * split (LD-4) carves *policy* methods (`upsertTenantUserPermissions`\n * etc.) out of the manager into the module; this interface is the\n * pure-transport remainder.\n *\n * **Argument-order convention** (Slice 4.A.2 / L3): for permission\n * methods, the order is `(vhost, username, permissions)` — vhost\n * first. The legacy pre-Slice-2 convention was `(username, vhost, ...)`\n * (positional, username first). The new convention is cleaner but\n * silently swappable since both args are strings. **Do NOT reorder**;\n * stale call sites copying the legacy positional order will produce\n * wrong-vhost permissions without compile-time complaint.\n */\nexport interface IRabbitMQManagementClient {\n /** PUT /api/users/{name} — idempotent upsert. */\n putUser(username: string, password: string, tags: ReadonlyArray<string>): Promise<void>;\n /** PUT /api/permissions/{vhost}/{name} — vhost-first per the\n * argument-order convention noted on the interface JSDoc. */\n setPermissions(\n vhost: string,\n username: string,\n permissions: { configure: string; write: string; read: string },\n ): Promise<void>;\n /** PUT /api/topic-permissions/{vhost}/{name} — vhost-first. */\n setTopicPermissions(\n vhost: string,\n username: string,\n permissions: { exchange: string; write: string; read: string },\n ): Promise<void>;\n /** DELETE /api/users/{name} — idempotent (404 → no-op). */\n deleteUser(username: string): Promise<void>;\n /** PUT /api/vhosts/{name} — ensures vhost exists; idempotent. */\n ensureVhost(vhost: string): Promise<void>;\n /**\n * PUT /api/policies/{vhost}/{name} with `apply-to: queues` — idempotent upsert of a QUEUE policy.\n *\n * A policy, not a queue argument, because RabbitMQ refuses to change the arguments of a queue that\n * already exists, while a policy is re-applied to matching queues whenever it changes. Exactly one\n * policy applies to a queue (the highest priority), so a caller's `pattern` must not overlap\n * another policy at the same priority.\n */\n ensureQueuePolicy(\n vhost: string,\n name: string,\n policy: { pattern: string; definition: Readonly<Record<string, string | number>>; priority: number },\n ): Promise<void>;\n}\n\n/**\n * Raw Redis (Valkey) ACL transport. Surface what\n * `RedisSelfInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. Used over a `redis-cli`-\n * equivalent ACL connection (the apps-manager's\n * `RedisConnectionManagerService` opens it once at boot and reuses).\n *\n * **Channel pattern policy** (Slice 4.B.1, 2026-05-10): the legacy\n * `RedisConnectionManagerService.upsertTenantUserAcl` derived a\n * fixed family of pub/sub channel patterns from `username`\n * (`<u>#*`, `<u>#/#*`, `<u>-request#*`, `<u>-request#/#*`,\n * `<u>-response#*`, `<u>-response#/#*`). That fan-out is module-\n * internal policy, NOT transport. The contract therefore takes\n * only `username`/`password`/`keyPattern` — the channel patterns\n * live inside the manager implementation today (preserves Slice 2\n * behavior parity); when the legacy method is retired the policy\n * moves into `RedisSelfInfraProviderModule` proper. Until then,\n * `upsertUser` is a thin delegator and the contract is the\n * forward-looking shape.\n *\n * **Idempotent persistence** (`persistAcl`): Valkey/Redis ACL\n * changes are in-memory until `ACL SAVE` is called. The legacy\n * code paired every `upsertTenantUserAcl` with `aclSave`; the\n * module mirrors that pairing.\n */\nexport interface IRedisAclClient {\n /**\n * `ACL SETUSER <name> on >password resetkeys ~<keyPattern> ...`\n * — idempotent upsert. The implementation owns the full ACL\n * command shape (channel patterns, allow/deny categories,\n * dangerous-command denials) — the contract surfaces only the\n * orchestrator-supplied identity material. Slice 4.B.1's manager\n * impl preserves the legacy channel-pattern fan-out from\n * `RedisConnectionManagerService.upsertTenantUserAcl`.\n */\n upsertUser(input: {\n username: string;\n password: string;\n keyPattern: string;\n }): Promise<void>;\n /**\n * `ACL DELUSER <name>` — idempotent (no-op when the user is\n * already absent).\n */\n deleteUser(username: string): Promise<void>;\n /**\n * `ACL SAVE` — flushes the in-memory ACL list to disk. MUST be\n * called after every mutation set so Valkey restarts don't lose\n * tenant users.\n */\n persistAcl(): Promise<void>;\n}\n\n/**\n * Raw Postgres admin transport. Surface what\n * `PostgresSelfInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. The legacy\n * `PostgreSQLConnectionManagerService` (apps-manager) implements\n * this contract via its existing `createApplicationDatabase` /\n * `deleteApplicationDatabase` methods (Slice 4.B.2 5C policy/\n * transport split).\n *\n * **Identifier-injection-safe**: implementations MUST validate\n * `databaseName` / `username` shapes (alphanumeric + underscore;\n * 63-char Postgres limit) and quote them safely — module callers\n * pass authored slugs verbatim. `PostgreSQLConnectionManagerService`\n * uses the legacy `validateIdentifier` + `quoteIdentifier` pair.\n *\n * **Idempotent upsert** (`upsertApplicationDatabase`): the legacy\n * `createApplicationDatabase` is upsert-style — `CREATE USER` falls\n * back to `ALTER USER` on conflict; `CREATE DATABASE` skips when the\n * DB exists; ownership + privileges always reapplied. The module\n * surface preserves that contract; \"create\" is renamed to \"upsert\"\n * in the contract to match the orchestrator-pattern vocabulary.\n */\nexport interface IPostgresAdminClient {\n /**\n * Upsert per-app database + role. Returns the resolved\n * `connectionUrl` so the orchestrator can persist it into\n * `Wildo_Application_Secrets.database.postgresql.connectUrl`.\n * Idempotent: safe to call repeatedly with the same input.\n */\n upsertApplicationDatabase(input: {\n databaseName: string;\n username: string;\n password: string;\n sslMode?: PostgreSQLSSLMode;\n }): Promise<{ connectionUrl: string }>;\n /**\n * Drop per-app database + user. Idempotent: missing DB / missing\n * user are non-throws (best-effort cleanup, see legacy\n * `deleteApplicationDatabase` semantics).\n */\n dropApplicationDatabase(input: {\n databaseName: string;\n username: string;\n }): Promise<void>;\n /**\n * Stop the application's OWNER role from authenticating — and destroy nothing (#1307).\n *\n * The application backend's role OWNS its database, so it cannot be dropped without first handing\n * ownership of every object to somebody else (PostgreSQL refuses `DROP ROLE` while objects depend\n * on it). Revocation therefore keeps the role and removes its ability to open a session:\n * `NOLOGIN` (a role without it cannot be \"the initial session authorization name during client\n * connection\") plus `PASSWORD NULL` (\"password authentication will always fail for that user\"),\n * then terminates the sessions it already holds, because a login attribute is checked only when a\n * session starts.\n *\n * spec-cite: PostgreSQL 17 `CREATE ROLE` — `LOGIN`/`NOLOGIN` and `PASSWORD` parameter descriptions\n * (https://www.postgresql.org/docs/17/sql-createrole.html); `pg_terminate_backend`, System\n * Administration Functions (https://www.postgresql.org/docs/17/functions-admin.html).\n *\n * Separate from {@link IPostgresAdminClient.dropApplicationDatabase}, which DROPS the database: a\n * withdrawn application's data is kept (#1562 owns destruction), and a revocation that routed\n * through the drop would erase it while believing it was only retiring a login.\n *\n * Reversible by {@link IPostgresAdminClient.upsertApplicationDatabase}, which re-applies\n * `LOGIN PASSWORD` to an existing role. Idempotent: a role that does not exist is a no-op.\n */\n revokeApplicationDatabaseLogin(input: {\n username: string;\n }): Promise<void>;\n /**\n * Upsert a LOGIN role holding exactly the given per-table privileges inside an\n * existing application database (Step 3 / R1).\n *\n * A SEPARATE method from {@link IPostgresAdminClient.upsertApplicationDatabase},\n * for the same reason the Mongo port is split: that one CREATEs the database\n * and makes its caller the OWNER with `ALL PRIVILEGES`, this one grants named\n * verbs on named tables inside a database somebody else owns. One method with\n * an optional privileges argument would make OWNERSHIP the behaviour you get\n * by forgetting to pass something.\n *\n * The grants are AUTHORITATIVE: the implementation must revoke what the role\n * previously held before granting, or a table removed from `resourceAccess`\n * keeps its privilege and revocation becomes a no-op that reports success.\n *\n * An empty `readTables`/`writeTables` pair is legitimate — a role that can\n * connect and see nothing — and must NOT be read as \"unspecified, leave the\n * previous grants alone\".\n */\n /**\n * Remove a table-scoped LOGIN role and everything it holds — WITHOUT touching\n * the database it was scoped into.\n *\n * Separate from {@link IPostgresAdminClient.dropApplicationDatabase}, which\n * drops the DATABASE and its owner. Reusing that one to retire a minion would\n * destroy the entire application's data while believing it was removing one\n * principal's access. That asymmetry is why revocation gets its own method\n * rather than a flag.\n */\n dropTableScopedDatabaseRole(input: {\n databaseName: string;\n username: string;\n schemaName: string;\n }): Promise<void>;\n upsertTableScopedDatabaseRole(input: {\n databaseName: string;\n username: string;\n password: string;\n schemaName: string;\n readTables: readonly string[];\n writeTables: readonly string[];\n /**\n * Insert-only tables — `GRANT INSERT`, never UPDATE and never DELETE.\n *\n * A third axis rather than a flag on `writeTables`, because the two say\n * different things about the same verb set and a boolean would make the\n * safer one the thing you get by remembering to pass it. Today this carries\n * the engine's mandatory append floor — the audit trail and retained job\n * output (see `deriveMinionDatabaseGrants`): a principal must be able to record\n * what it did, and must never be able to unrecord it.\n */\n appendTables: readonly string[];\n /** Insert/update durable runtime records without granting DELETE. Read is granted separately. */\n maintainTables?: readonly string[];\n sslMode?: PostgreSQLSSLMode;\n }): Promise<{ connectionUrl: string }>;\n}\n\n/**\n * Raw MongoDB Atlas API transport. Surface what\n * `MongodbAtlasInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. The legacy\n * `MongoAtlasManagerService` (apps-manager) implements this\n * contract via its existing `createApplicationDatabase` /\n * `deleteDatabaseUser` methods (Slice 4.B.3 5C policy/transport\n * split).\n *\n * **Idempotent upsert** (`upsertApplicationDatabase`): the legacy\n * `createApplicationDatabase` is upsert-style — `POST /databaseUsers`\n * falls back to `PATCH` on conflict (existing user); cluster scope +\n * roles are reapplied on every call. Returns the SRV connection\n * string with credentials embedded, ready for transient\n * app-database seeding by the orchestrator.\n */\nexport interface IMongoAtlasClient {\n /**\n * Upsert per-app Atlas database user. Returns the SRV connection\n * string (with credentials embedded, `mongodb+srv://user:pass@...`)\n * that the orchestrator uses for transient app-init operations.\n * The string is NOT persisted into `Wildo_Application_Secrets`\n * by today's orchestrator — it's exposed via\n * `AppCredentialMintingResult.runtimeArtifacts.connectionString`.\n */\n upsertApplicationDatabase(input: {\n clusterName: string;\n databaseName: string;\n username: string;\n password: string;\n }): Promise<{ connectionString: string }>;\n /**\n * Delete an Atlas database user. Idempotent: 404 → no-op.\n */\n deleteDatabaseUser(username: string): Promise<void>;\n /**\n * Upsert a database user holding exactly ONE Atlas custom database role, which carries exactly the\n * given collection-scoped privileges and inherits nothing (#1694). The Atlas twin of\n * {@link IMongoSelfAdminClient.upsertCollectionScopedDatabaseUser}, for a runtime principal (a minion).\n *\n * A SEPARATE method from {@link IMongoAtlasClient.upsertApplicationDatabase} for the reason the\n * self-hosted contract gives: that one grants `readWrite` on the whole database, this one grants named\n * actions on named collections, and an optional \"privileges\" argument would make the wide grant the\n * behaviour you get by forgetting to pass something.\n *\n * - `privileges[].actions` are Atlas Admin API privilege-action names (`FIND`, `INSERT`, `UPDATE`,\n * `REMOVE`, …). The caller translates from MongoDB's own vocabulary; this transport never widens it.\n * - `privileges` is AUTHORITATIVE: an existing role's actions are REPLACED, so a resource removed from\n * `resourceAccess` loses its grant on the next sync.\n * - The user is scoped to `clusterName` alone (Atlas grants every cluster in the project when `scopes`\n * is omitted), and holds the custom role and nothing else.\n * - Idempotent: safe when the role and user already exist; the password is re-applied, which is how a\n * rotation lands.\n *\n * Returns the SRV connection string carrying THIS user's credentials, for the same transient use as\n * {@link IMongoAtlasClient.upsertApplicationDatabase}'s.\n */\n upsertCollectionScopedDatabaseUser(input: {\n clusterName: string;\n databaseName: string;\n username: string;\n password: string;\n roleName: string;\n privileges: ReadonlyArray<{\n resource: { db: string; collection: string };\n actions: readonly string[];\n }>;\n }): Promise<{ connectionString: string }>;\n /**\n * Retire a collection-scoped user AND the custom role it holds — and nothing else.\n *\n * Two objects, deleted user FIRST: Atlas refuses to delete a custom role that would leave a database\n * user with no roles, so the reverse order fails while the user exists. Dropping only the user would\n * leave a privileged role behind that the next mint silently adopts. Idempotent in both halves: a\n * missing user or a missing role is a no-op.\n */\n dropCollectionScopedDatabaseUser(input: {\n username: string;\n roleName: string;\n }): Promise<void>;\n}\n\n/**\n * The immudb permission an application's audit user holds on its OWN database (#1696).\n *\n * The values are immudb's own permission bytes, because the admin transport sends them verbatim.\n * spec-cite: immudb v1.11.1 `pkg/auth/permissions.go` — `PermissionNone = iota`, `PermissionR`, `PermissionRW`\n * (0, 1, 2), `PermissionAdmin = 254`, `PermissionSysAdmin = 255`\n * (https://raw.githubusercontent.com/codenotary/immudb/v1.11.1/pkg/auth/permissions.go, fetched 2026-09-29).\n *\n * Only READ_WRITE is named: an audit sink appends and verifies, and nothing in the framework grants an\n * application more. `ADMIN` and `SYSADMIN` are deliberately absent — holding either is the defect #1696 removes.\n */\nexport enum ImmudbDatabasePermission {\n READ_WRITE = 2,\n}\n\n/**\n * Raw immudb admin transport (#1696). Surfaces exactly what `ImmudbSelfInfraProviderModule` needs to give each\n * application ONE database and ONE user confined to it, and to revoke that user — nothing more.\n *\n * Implemented in apps-manager over the gRPC admin API with the PLATFORM's own admin credential (a\n * framework-managed secret no application receives). Every method is idempotent, because registration,\n * withdrawal and restore all retry by re-running.\n *\n * **No method deletes anything.** immudb keeps every database and every user it has created: an append-only\n * store's audit history must outlive the application's credential, and a withdrawn application is restored by\n * RE-ACTIVATING its user onto the same database (#1307).\n */\nexport interface IImmudbAdminClient {\n /** Create the database when it does not exist; a no-op when it does. */\n ensureDatabase(input: { databaseName: string }): Promise<void>;\n /**\n * Create the user, or bring an existing one back to exactly this state: ACTIVE, this password, and `permission`\n * on `databaseName`. Re-applying the password and re-activating are what make a restore after withdrawal work.\n */\n upsertDatabaseUser(input: {\n username: string;\n password: string;\n databaseName: string;\n permission: ImmudbDatabasePermission;\n }): Promise<void>;\n /**\n * Refuse the user's credential from now on: revoke its permission on `databaseName` and DEACTIVATE it.\n * immudb has no user deletion; a deactivated user cannot log in. A user that does not exist is a no-op.\n */\n deactivateDatabaseUser(input: { username: string; databaseName: string }): Promise<void>;\n}\n\n/**\n * Raw self-managed MongoDB admin transport. Surface what\n * `MongodbSelfInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. Implemented by a\n * lightweight admin-side mongoose connection — the legacy inline\n * `ensureSelfManagedMongoApplicationUser` at\n * `wildo-application-lifecycle.service.ts:2710-2745` is the source\n * of behavior.\n *\n * **Why this contract is asymmetric to `IMongoAtlasClient`** (Slice\n * 4.B.3 design note, 2026-05-10): Atlas exposes a stateless REST\n * API for user management; self-managed Mongo requires opening an\n * admin-DB connection and running `createUser` / `updateUser`\n * commands. The contract therefore takes the admin connect URL as\n * an input (not a constructor-time configuration) — implementations\n * open transient connections per call, mirroring the legacy\n * pattern.\n */\nexport interface IMongoSelfAdminClient {\n /**\n * Upsert per-app database user on a self-managed MongoDB\n * instance. Connects to `adminConnectUrl` (admin-scoped),\n * creates or updates the user with `readWrite` + `dbAdmin`\n * roles on `databaseName`, then closes the connection. Idempotent.\n */\n upsertApplicationDatabaseUser(input: {\n adminConnectUrl: string;\n databaseName: string;\n username: string;\n password: string;\n }): Promise<void>;\n /**\n * Delete a per-app database user. Idempotent: missing user is a\n * no-op (best-effort cleanup, mirrors `IPostgresAdminClient`\n * semantics).\n */\n deleteApplicationDatabaseUser(input: {\n adminConnectUrl: string;\n username: string;\n }): Promise<void>;\n /**\n * Upsert a database user holding ONE custom role carrying exactly the given\n * collection-scoped privileges (Step 3 / R1 / D14).\n *\n * Deliberately a SEPARATE method from\n * {@link IMongoSelfAdminClient.upsertApplicationDatabaseUser} rather than an\n * optional parameter on it. The two grant fundamentally different authority —\n * that one grants `readWrite` + `dbAdmin` on the WHOLE database, this one\n * grants named actions on named collections and nothing else — and a single\n * method with an optional \"privileges\" argument would make the wide grant the\n * behaviour you get by forgetting to pass something. Two methods make the\n * caller name which authority it intends.\n *\n * `privileges` is authoritative and REPLACES the role's previous contents, so\n * a resource removed from `resourceAccess` loses its grant on the next sync.\n * An empty list is legitimate — a principal with no data access — and MUST\n * yield a role granting nothing rather than being treated as \"unspecified\".\n *\n * Idempotent: safe to call when the role and user already exist.\n */\n /**\n * Retire a collection-scoped user AND the custom role it holds.\n *\n * Separate from {@link IMongoSelfAdminClient.deleteApplicationDatabaseUser}\n * because a scoped principal owns TWO objects in TWO databases — the user in\n * `admin`, the role in the application database — and dropping only the user\n * leaves a privileged role behind that the next mint silently adopts.\n *\n * Idempotent in both halves: a missing user or a missing role is a no-op.\n */\n dropCollectionScopedDatabaseUser(input: {\n adminConnectUrl: string;\n databaseName: string;\n username: string;\n roleName: string;\n }): Promise<void>;\n upsertCollectionScopedDatabaseUser(input: {\n adminConnectUrl: string;\n databaseName: string;\n username: string;\n password: string;\n roleName: string;\n privileges: ReadonlyArray<{\n resource: { db: string; collection: string };\n actions: readonly string[];\n }>;\n }): Promise<void>;\n}\n\nexport interface InfraProviderModule {\n provider: InfraProvider;\n supportedCapabilities: ReadonlyArray<InfraCapability>;\n\n /**\n * Present when this module EXISTS but the platform cannot yet deliver a working connection for the\n * provider — the module can plan, and an application selecting it would still receive no usable\n * credential. The value says why, and what would change it.\n *\n * ## Why the module stays in the catalogue instead of being removed\n *\n * The module's `plan()` is correct and useful: it formalizes the env contract an operator will set\n * and gives the lockfile a stable digest. What is missing is elsewhere (for `AWS_S3`, the credential\n * broker that speaks only MinIO's AssumeRole, #14). Removing the module would lose the correct half\n * to express the missing one.\n *\n * ## What it does\n *\n * A declaration resolving to a provider whose module carries this is REFUSED at authoring time\n * (`wildo config validate` / `config sync` / `lock check`), exactly like a declaration resolving to\n * a provider with no module. Delete the field in the same change that makes the provider servable.\n */\n unservableReason?: string;\n\n /**\n * Every `Wildo_Application_Secrets` JSON path this module can mint PER RUNTIME PRINCIPAL.\n *\n * ## Why this is static, when `plan()` already reports the same paths\n *\n * `plan()` answers \"what does THIS application get\", so it needs an\n * {@link InfraProviderPlanningContext}. The secret-DELIVERY path in apps-manager asks a different\n * question — \"which paths are per-principal AT ALL\" — and must answer it with no application in\n * hand, because it decides what to STRIP from the application blob before overlaying a\n * principal's own material. A principal must receive a credential only where one was minted for\n * it; anything left un-stripped is delivered with the APPLICATION's value, which for a database\n * means `readWrite` + `dbAdmin` on the whole database.\n *\n * Empty for a provider with no per-app credentials — shared-bucket object storage\n * (`MINIO_SELF`, `AWS_S3`) and stateless infra (`CLAMAV_SELF`). Empty is a\n * real answer, not a missing one, which is why the field is required rather than optional: a\n * module that mints per-principal material must not be able to omit it and be silently read as\n * \"nothing to confine\".\n *\n * **Modules MUST derive `appRuntime.perAppSecretBlobPaths` from this same constant** rather than\n * repeating the literal list. Two spellings of where a credential lives is the defect this exists\n * to prevent, one layer up.\n *\n * **A module declaring paths here MUST derive a distinct resource name per principal**, in its mint\n * AND its revoke, through one function. apps-manager dispatches every minion mint and revocation\n * through the catalogue (#1692), so a module that ignored `principal` and derived the application\n * backend's own name would OVERWRITE the backend's user on a minion mint and DELETE it on a minion\n * revocation — the defect `invariant-call-site-enumeration.md` #18 records. MongoDB Atlas shipped in\n * exactly that shape and was refused at registration until its per-principal path landed (#1694).\n */\n perPrincipalSecretBlobPaths: ReadonlyArray<string>;\n\n plan(context: InfraProviderPlanningContext): InfraProviderPlanContribution;\n\n /**\n * Optional. Called by apps-manager at app-init time (see\n * `wildo-application-lifecycle.service.ts:432-580` — the existing\n * per-resource ceremony this method abstracts). Upserts the per-app\n * user / role / DB on the broker using `secretInputs` for any\n * orchestrator-supplied passwords; returns the canonical form of\n * the persisted secrets blob slice.\n *\n * Returns `null` when the provider has no per-app credentials (e.g.,\n * shared S3 bucket with shared access key).\n *\n * **Idempotent broker upsert** — the module installs / replaces the\n * user with the password from `secretInputs`. It does NOT make\n * generation/rotation decisions; that is the orchestrator's\n * responsibility (driven by the existing `overrideCredentials`\n * flag on `WildoApplicationInitOptions`). The module MUST NOT\n * crash on \"user already exists\" (PUT semantics on the broker\n * management API are sufficient for RabbitMQ; equivalent\n * upsert-on-conflict semantics for other providers).\n */\n mintAppCredentials?(\n context: AppCredentialMintingContext,\n ): Promise<AppCredentialMintingResult | null>;\n\n /**\n * Optional. Symmetric to `mintAppCredentials`: afterwards the principal's credential is REFUSED by the\n * server. Called by apps-manager when a minion leaves the declaration, and for EVERY principal of an\n * application withdrawn from the platform (`deregisterApplication`, #1307).\n *\n * **It revokes and never destroys.** It removes the ability to authenticate — an ACL user, a broker\n * user, a database user, or a login — and leaves the application's DATA where it is: its database,\n * keys, queues and blobs. A withdrawn application is restored by re-minting (`mintAppCredentials` with\n * the recorded material), which only works if nothing it owns was dropped. Destroying data is a\n * different verb with its own protection (#1562); a module must never reach it through this one.\n *\n * Idempotent: safe to call when the per-principal user / role does not exist (no throw on\n * already-absent), because a retry after a partial revocation must converge.\n */\n revokeAppCredentials?(context: AppCredentialMintingContext): Promise<void>;\n\n /**\n * Optional (LD-8 / Slice 2.5). Called by the orchestrator\n * (`PlatformInfrastructureManagerService.provisionServiceCredentials`\n * + `ensureAppsManagerCredentials`) at platform-service-init time.\n * Upserts a SCOPED (non-admin) per-platform-service user on the\n * broker for inter-service messaging — distinct from\n * `mintAppCredentials` (audience-3, customer-app per-app creds).\n *\n * Same orchestrator-pattern as `mintAppCredentials`: orchestrator\n * owns generation, module is upsert-only.\n *\n * Returns `null` when the provider has no per-platform-service\n * credentials concept (e.g., S3 modules — platform services use a\n * shared bucket).\n */\n mintPlatformServiceCredentials?(\n context: PlatformServiceCredentialMintingContext,\n ): Promise<PlatformServiceCredentialMintingResult | null>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"infra-providers.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/infra-providers.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,eAkBX;AAlBD,WAAY,eAAe;IACzB,0DAAuC,CAAA;IACvC,8DAA2C,CAAA;IAC3C,0DAAuC,CAAA;IACvC,oDAAiC,CAAA;IACjC,4DAAyC,CAAA;IACzC,oDAAiC,CAAA;IACjC,kDAA+B,CAAA;IAC/B;;;OAGG;IACH,0DAAuC,CAAA;IACvC;;;OAGG;IACH,oDAAiC,CAAA;AACnC,CAAC,EAlBW,eAAe,KAAf,eAAe,QAkB1B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAuD;IACpG;;;;;;;;;;;;;OAaG;IACH,CAAC,eAAe,CAAC,iBAAiB,CAAC,EACjC,+FAA+F;UAC7F,+FAA+F;CACpG,CAAC;AAEF;;;;;;;;;;;GAWG;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EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC1E,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC7D,CAAC,CAAC;AAKH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAC9C,4CAA4C,CAAC,MAAM,CAAC;IAClD,aAAa,EAAE,4CAA4C,CAAC,QAAQ,EAAE;IACtE,UAAU,EAAE,yCAAyC,CAAC,QAAQ,EAAE;CACjE,CAAC,CAAC,WAAW,EAAE,CAAC;AAgiBnB;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,wBAEX;AAFD,WAAY,wBAAwB;IAClC,mFAAc,CAAA;AAChB,CAAC,EAFW,wBAAwB,KAAxB,wBAAwB,QAEnC","sourcesContent":["import { z } from 'zod';\nimport type { ApplicationRuntimePrincipal } from '../../bootstrap/runtime-principal.contracts';\nimport type { MinionResourceGrants } from './minion-resource-access.validation';\nimport type { PostgreSQLSSLMode } from '@wildo-ai/saas-models';\n\n/**\n * Environment functions an infra environment must fulfill.\n *\n * This vocabulary is intentionally platform/config-owned, not part of\n * `@wildo-ai/saas-models`, because browser/runtime packages must not\n * import infrastructure provider concepts.\n */\nexport enum InfraCapability {\n DOCUMENT_DATABASE = 'DOCUMENT_DATABASE',\n RELATIONAL_DATABASE = 'RELATIONAL_DATABASE',\n AUDIT_LOG_STORAGE = 'AUDIT_LOG_STORAGE',\n OBJECT_STORAGE = 'OBJECT_STORAGE',\n ANTIVIRUS_SCANNING = 'ANTIVIRUS_SCANNING',\n QUEUING_SYSTEM = 'QUEUING_SYSTEM',\n CACHE_MANAGER = 'CACHE_MANAGER',\n /**\n * OTLP telemetry. GRANTED TO EVERY RUNTIME, never declared as a backing service — see\n * {@link RUNTIME_GRANTED_INFRA_CAPABILITIES}.\n */\n METRICS_TELEMETRY = 'METRICS_TELEMETRY',\n /**\n * Backup. RESERVED — no backing-service kind declares it and no module serves it; see\n * {@link RESERVED_INFRA_CAPABILITIES}.\n */\n BACKUP_MANAGER = 'BACKUP_MANAGER',\n}\n\n/**\n * Capabilities NO `BackingServiceKind` projects to — granted to a runtime by the platform rather\n * than declared by an environment.\n *\n * `BackingServiceKindToInfraCapability` used to be described as bijective, and a test asserted the\n * reverse direction: every capability reachable from some kind. That held only while every\n * capability was something an environment points at. It is not a property of the model, and reading\n * it as one is what kept `metrics-telemetry` alive as an authoring surface with no consumer.\n *\n * Membership here is the ANSWER to \"why does this capability have no kind\", so a capability that\n * belongs in neither place is a real gap and stays visible as one.\n */\nexport const RUNTIME_GRANTED_INFRA_CAPABILITIES: Readonly<Partial<Record<InfraCapability, string>>> = {\n /*\n * Telemetry is configured in TWO places, and a backing service is neither of them: the endpoint is\n * authored at `observability.telemetry.endpoint` (projected to `OTEL_EXPORTER_OTLP_ENDPOINT`), and\n * the auth header is derived provider-agnostically from the selected `OBSERVABILITY_TELEMETRY`\n * engine provider. Nothing is left for an environment to declare, and nothing for an\n * infra-provider module to mint — those exist to issue PER-APPLICATION credentials, and a\n * telemetry token is one provider-level secret shared by every runtime.\n *\n * The capability itself is load-bearing and must NOT be withdrawn with the kind: it carries the\n * `DATA_TELEMETRY` network in `NETWORK_FOR_CAPABILITY` and sits in\n * `MINION_UNCONDITIONAL_CAPABILITIES`, so every runtime reaches the collector through it. Setting\n * it to `null` there was corrected on 2026-08-12 precisely because it \"would have cut tracing for\n * every runtime the moment segmentation was enforced, with NO readiness check covering it\".\n */\n [InfraCapability.METRICS_TELEMETRY]:\n 'Authored at observability.telemetry + the OBSERVABILITY_TELEMETRY provider; granted to every '\n + 'runtime for the DATA_TELEMETRY network, so no environment declares it and no module mints it.',\n};\n\n/**\n * Capabilities kept as VOCABULARY with no way to be selected yet — neither declared by an\n * environment (no `BackingServiceKind` projects to them) nor granted to runtimes by the platform.\n *\n * This is the third answer to \"why does this capability have no kind\", beside\n * `BackingServiceKindToInfraCapability` and {@link RUNTIME_GRANTED_INFRA_CAPABILITIES}. It exists so\n * that answer is WRITTEN DOWN: a capability in none of the three is an unexplained gap, and the\n * reachability test still fails on it.\n *\n * Membership is a statement that nothing can reach the capability today. It is not a placeholder\n * an environment may fill in — withdrawing the declarable kind is what stopped it being one.\n */\nexport const RESERVED_INFRA_CAPABILITIES: Readonly<Partial<Record<InfraCapability, string>>> = {\n /*\n * The `backup` backing-service kind was WITHDRAWN 2026-09-26 (#1693): it resolved to no provider,\n * rendered no workload, and nothing read it. The capability stays because whether backup is modelled\n * as a capability at all is the design question #8 owns. Its network is `null` in\n * `NETWORK_FOR_CAPABILITY` for the same reason — no runtime dials a backup target.\n */\n [InfraCapability.BACKUP_MANAGER]:\n 'Reserved for the backup design (#8): no environment can declare it and no module serves it.',\n};\n\n/**\n * Built-in environment-facing provider ids — the (kind × hosting-model\n * × brand) projection vocabulary. Apps SELECT these implicitly via\n * `wildo.infra.<env>.config.ts > backingServices.<kind>.{source,\n * provider?}`; the planner resolves the tuple to one of these\n * `InfraProvider` values via `resolveInfraProvider`.\n *\n * **Naming convention**: `<KIND>_<BRAND>` — `BRAND` is either a\n * vendor (Atlas / AWS_RDS / Supabase / …) for managed services, or\n * an open-source software name (MinIO / vanilla self-hosted) for\n * self-hosted. `<KIND>_MANAGED` exists as a generic fallback when\n * the operator hasn't named a brand (Postgres in particular —\n * acceptable while the brand catalog is incomplete; Mongo's\n * `MONGODB_ATLAS` is the only branded managed option today, so no\n * `MONGODB_MANAGED` generic is needed).\n *\n * Slice 4.B.0 (2026-05-07) added the Postgres brand expansion to\n * generalize the source/brand split that S3 already had.\n */\nexport enum InfraProvider {\n // === MongoDB ===\n /** Self-hosted vanilla MongoDB (in-cluster docker-compose / K8s\n * deployment). Selected via `source: SELF`. No `provider` brand\n * required (Mongo's `provider` axis is reserved for managed\n * variants like `'atlas'`). */\n MONGODB_SELF = 'mongodb-self',\n /** MongoDB Atlas (managed cloud). brand: `'atlas'`. */\n MONGODB_ATLAS = 'mongodb-atlas',\n\n // === PostgreSQL ===\n /** Self-hosted vanilla PostgreSQL (in-cluster docker-compose /\n * K8s deployment). Selected via `source: SELF`. */\n POSTGRES_SELF = 'postgres-self',\n /** Generic managed Postgres — fallback when the operator hasn't\n * named a brand. Concrete brand identifiers below are preferred. */\n POSTGRES_MANAGED = 'postgres-managed',\n /** AWS RDS for PostgreSQL. brand: `'aws-rds'`. */\n POSTGRES_AWS_RDS = 'postgres-aws-rds',\n /** Google Cloud SQL for PostgreSQL. brand: `'gcp-cloud-sql'`. */\n POSTGRES_GCP_CLOUD_SQL = 'postgres-gcp-cloud-sql',\n /** Azure Database for PostgreSQL. brand: `'azure-database'`. */\n POSTGRES_AZURE_DATABASE = 'postgres-azure-database',\n /** Supabase. brand: `'supabase'`. */\n POSTGRES_SUPABASE = 'postgres-supabase',\n /** Neon. brand: `'neon'`. */\n POSTGRES_NEON = 'postgres-neon',\n /** Render. brand: `'render'`. */\n POSTGRES_RENDER = 'postgres-render',\n\n // === Redis / Valkey ===\n /** Self-hosted Redis-compatible cache (today: Valkey under the\n * hood; the engine adapter is wire-protocol compatible with\n * Redis OSS). Selected via `source: SELF`. */\n REDIS_SELF = 'redis-self',\n\n // === RabbitMQ ===\n /** Self-hosted RabbitMQ broker (in-cluster docker-compose / K8s\n * deployment). Selected via `source: SELF`. */\n RABBITMQ_SELF = 'rabbitmq-self',\n\n // === Object storage ===\n /** MinIO (self-hosted S3-compatible). brand: `'minio'` (or unset on\n * source=self — MinIO is the canonical default). */\n MINIO_SELF = 'minio-self',\n /** AWS S3 (managed). brand: `'aws'`. */\n AWS_S3 = 'aws-s3',\n\n // === Stateless infra ===\n /** Self-hosted ClamAV antivirus scanning service. Stateless (no\n * auth, no per-tenant state); apps connect to a shared host:port.\n * Selected via `source: SELF`. */\n CLAMAV_SELF = 'clamav-self',\n /** Self-hosted immudb — immutable, cryptographically-verifiable DB used as a\n * tamper-evident audit-log store. Selected via `source: SELF`. */\n IMMUDB_SELF = 'immudb-self',\n}\n\n/**\n * Platform-side consumers of an `InfraProviderPlanContribution.platformAdmin`\n * block. Each provider declares which platform services receive its\n * admin credentials so the planner can route them to the right pod /\n * compose service / env file.\n *\n * Locked enum (2026-05-05). Extending requires adding the consumer\n * enum value here AND in every `InfraProviderModule.plan()` that\n * legitimately delivers admin credentials to the new consumer.\n *\n * Excluded by design (consume platform-service APIs, not direct infra-admin):\n * - `file-generator`\n * - `sourcecode-provider`\n *\n * Add as real consumers surface, not pre-emptively.\n */\nexport enum InfraPlatformAdminConsumer {\n APPS_MANAGER = 'apps-manager',\n COMPANION = 'companion',\n CRONTABS_BATCHES_MANAGER = 'crontabs-batches-manager',\n MODULE_REGISTRY = 'module-registry',\n}\n\n/**\n * Audience-less contributions: describe the infra resource itself.\n * Same payload regardless of who consumes it (compose definitions,\n * K8s manifests, CI checks).\n */\nconst InfraProviderResourceContributionShapeSchema = z.strictObject({\n dockerComposeServices: z.array(z.string().min(1)).optional(),\n k8sResources: z.array(z.string().min(1)).optional(),\n startupScripts: z.array(z.string().min(1)).optional(),\n ciChecks: z.array(z.string().min(1)).optional(),\n policyChecks: z.array(z.string().min(1)).optional(),\n});\n\n/**\n * Audience: platform services that need **management-API access** to\n * administer the infra resource (create per-app users / vhosts / ACLs\n * / DBs). This is audience-1 in the three-audience model:\n *\n * 1. **Platform-admin** (this contribution slice). Cluster-wide\n * management-API credentials. Consumed by apps-manager (mints\n * per-app users via `mintAppCredentials`), companion (mirrors\n * apps-manager admin role for local dev). `crontabs` /\n * `module-registry` are listed in the enum because they MAY\n * surface admin needs in future slices, but no provider should\n * declare them as consumers in this slice unless evidence\n * surfaces.\n * 2. **Platform-service-scoped** (NOT modeled in `plan()` yet —\n * see LD-8 / Slice 2.5). Per-platform-service publish/consume\n * creds for the platform-services that participate in\n * inter-service messaging (`PLATFORM_SERVICES` enum:\n * apps-manager, crontabs-batches-manager, file-generator).\n * Today provisioned inline by\n * `PlatformInfrastructureManagerService.provisionAllPlatformServices`.\n * 3. **App-scoped** (`appRuntime` slice below). Per-app\n * publish/consume creds, minted by `mintAppCredentials`.\n *\n * `consumers` is the explicit audience declaration: every provider\n * states which platform services receive this block. The planner\n * routes the credentials accordingly.\n */\nconst InfraProviderPlatformAdminContributionSchema = z.strictObject({\n envVars: z.record(z.string(), z.string()).optional(),\n secretEnvVars: z.array(z.string().min(1)).optional(),\n consumers: z.array(z.enum(InfraPlatformAdminConsumer)).optional(),\n});\nexport type InfraProviderPlatformAdminContribution = z.infer<\n typeof InfraProviderPlatformAdminContributionSchema\n>;\n\n/**\n * Audience: customer-app + minion + Node-worker pods. Per-app\n * runtime delivery flows through the persisted\n * `Wildo_Application_Config` and `Wildo_Application_Secrets` blobs in\n * MongoDB (NOT through K8s deployment-Secret env vars; engine\n * consumers like `queue.backend.service.ts:144-149` read from\n * `appConfigService.{config,secrets}` after fetching them at startup\n * via app-config-fetch).\n *\n * - `perAppConfigBlobPaths`: JSON paths into `Wildo_Application_Config`\n * carrying static values (same for every app in this env) — e.g.\n * `'database.rabbitmq.host': 'rabbitmq'`. Merged into the persisted\n * config blob by the planner at sync time.\n * - `perAppSecretBlobPaths`: JSON paths into `Wildo_Application_Secrets`\n * that `mintAppCredentials` will populate at deploy time (e.g.\n * `'database.rabbitmq.username'`). The planner emits only the path\n * list; apps-manager invokes `mintAppCredentials` per app to produce\n * the values, then merges them into the persisted secrets blob via\n * the existing `_merge_WildoApplicationSecrets` machinery.\n *\n * No K8s-Secret-env-var output is intentional: the K8s\n * `{appSlug}-secret` carries only the four-env bootstrap-env-contract\n * (APPLICATION_ID / PLATFORM_APPLICATION_PRIMARY_SECRET /\n * PLATFORM_APPS_MANAGER_URL / APPLICATION_ENV); per-resource creds\n * land in MongoDB, not env. If a future provider genuinely needs\n * env-var injection it can extend this contribution shape via\n * `.passthrough()` — not pre-emptively designed for here.\n */\nconst InfraProviderAppRuntimeContributionSchema = z.strictObject({\n perAppConfigBlobPaths: z.record(z.string().min(1), z.unknown()).optional(),\n perAppSecretBlobPaths: z.array(z.string().min(1)).optional(),\n});\nexport type InfraProviderAppRuntimeContribution = z.infer<\n typeof InfraProviderAppRuntimeContributionSchema\n>;\n\n/**\n * Two-slice contribution shape. The audience-less resource block\n * (compose / K8s / CI) merges with the audience-scoped credential\n * blocks (`platformAdmin`, `appRuntime`).\n *\n * `.passthrough()` is preserved on the merged shape so future\n * contribution kinds (dashboards, alerting rules, autoscaler hints)\n * can be added without breaking existing modules.\n */\nexport const InfraProviderPlanContributionSchema =\n InfraProviderResourceContributionShapeSchema.extend({\n platformAdmin: InfraProviderPlatformAdminContributionSchema.optional(),\n appRuntime: InfraProviderAppRuntimeContributionSchema.optional(),\n }).passthrough();\nexport type InfraProviderPlanContribution = z.infer<typeof InfraProviderPlanContributionSchema>;\n\nexport interface InfraProviderPlanningContext {\n environment: string;\n runtime: string;\n backingServiceKey: string;\n config: unknown;\n}\n\n/**\n * Per-app credential minting context. Called by the orchestrator\n * (apps-manager `wildo-application-lifecycle.service.ts`) at app-init\n * time — not at K8s deploy time. The orchestrator is responsible for\n * **generation policy** (read existing creds from MongoDB; decide\n * rotate-vs-preserve based on `overrideCredentials` flag; generate\n * new password when needed); the module is responsible for the\n * **broker upsert** (install / replace the user on the broker with\n * the supplied password).\n *\n * Inputs:\n * - `appSlug` — the application slug (or its derived namespace\n * `ns`); used by the module to compute the rabbit username,\n * permission regex, etc.\n * - `adminClient` — pre-wired by the orchestrator from the resolved\n * `platformAdmin` env vars; concrete type narrowed per provider at\n * the module's implementation site (e.g., RabbitMQ modules narrow\n * to `RabbitMQManagementClient`).\n * - `secretInputs` — orchestrator-supplied scalars keyed by the JSON\n * path the module declared in `appRuntime.perAppSecretBlobPaths`.\n * For RabbitMQ: `{ 'database.rabbitmq.password': '<orchestrator-generated-password>' }`.\n * The module installs these on the broker; it does NOT generate\n * passwords itself.\n *\n * Note: `applicationEnv` was previously included in this context but\n * removed 2026-05-06 — the integration site (`wildo-application-lifecycle`)\n * does not carry an env field on its options shape.\n */\nexport interface AppCredentialMintingContext {\n /**\n * Raw application slug (e.g., `'wonder-todos'`). Used by modules\n * whose per-app resource names embed the slug directly without\n * env-scoping (e.g., MongoDB database name).\n */\n appSlug: string;\n /**\n * Application namespace = `<appSlug>-<environmentId>`, derived\n * server-side via `buildApplicationNamespace` in platform-config-lib.\n * Used by modules whose per-app resource names scope by namespace\n * (RabbitMQ username, Redis ACL keyPattern, …) — i.e., resources\n * that must remain isolated across env boundaries (`wonder-todos-local`\n * vs `wonder-todos-staging`).\n */\n applicationNamespace: string;\n /**\n * Stable opaque application identifier (Mongo ObjectId-shaped string,\n * matches the convention at\n * `wildo-application-lifecycle.service.ts:552` where the broker\n * permission regex disambiguates per-app queue/reply names by this\n * id, NOT by `appSlug` — the slug is human-readable and could\n * theoretically be reassigned, the id is forever-stable). Required\n * by modules whose per-app resource names embed the application id\n * (RabbitMQ permission regex, …).\n */\n wildoApplicationId: string;\n /**\n * WHICH runtime principal these credentials are for (Step 2 / D17).\n *\n * Optional, and absent means the APPLICATION BACKEND — which keeps every\n * existing module and call site meaning exactly what it meant before, since\n * per-application minting IS the backend principal's case.\n *\n * A module that ignores this field still mints correctly for the backend and\n * simply does not participate in per-principal narrowing; a module that reads\n * it must derive a DISTINCT resource name (ACL username, DB user, queue\n * permission) per principal, or two principals will share one credential and\n * the narrowing will exist only on paper.\n *\n * `buildRuntimePrincipalKey` renders the stable identity to embed in such a\n * name — the same string the stored section is keyed by, so a minted resource\n * and the row that records it cannot drift.\n */\n principal?: ApplicationRuntimePrincipal;\n /**\n * What this principal may touch, in RESOURCE TYPES (Step 3).\n *\n * Deliberately the platform vocabulary, not storage names: a module that\n * grants on tables and a module that grants on collections must receive the\n * same contract, and the translation belongs at each adapter via\n * `resolveGrantStorageNames`.\n *\n * Absent for the application backend, which is granted database-wide by a\n * different path. Absent for a NAMED principal means \"no grants derived\" —\n * which a module must treat as an ERROR rather than as a reason to fall back\n * to the wide grant. A minion with no declared access is passed an EXPLICIT\n * empty grant by the orchestrator, so it gets the engine-floor role and no\n * business table (#1771); the error is for a caller that forgot to pass one.\n */\n resourceGrants?: MinionResourceGrants;\n adminClient: unknown;\n secretInputs: Record<string, string>;\n /**\n * Optional non-secret per-app config inputs supplied by the\n * orchestrator. Distinct from `secretInputs` (passwords) — these\n * are authored topology values that affect HOW the module\n * provisions the per-app resource. Each module documents the keys\n * it consumes in its own JSDoc.\n *\n * Slice 2.5c-3 introduced this field for `RabbitmqSelfInfraProviderModule`\n * to receive the optional per-app vhost (key `'vhost'`); future\n * modules may use it for per-app database suffixes, bucket prefixes,\n * or other authored topology overrides without further extending\n * the context shape.\n *\n * When `undefined` or missing a key the module relies on, the\n * module falls back to its default behavior (e.g., RabbitMQ\n * provisions on the default vhost `/`).\n */\n applicationConfigInputs?: Record<string, string>;\n}\n\n// =============================================================================\n// Platform-service-scoped credential minting (audience-2)\n// =============================================================================\n//\n// `provisionAllPlatformServices` (in apps-manager\n// `PlatformInfrastructureManagerService`) hands each platform service\n// (`apps-manager`, `crontabs-batches-manager`, `file-generator`) a SCOPED\n// (non-admin) broker user for inter-service messaging. The policy\n// (per-service permission regex, the broader-permissions special case for\n// crontabs) lives on the `InfraProviderModule` interface so each provider owns\n// its own per-platform-service policy.\n//\n// Distinct from `mintAppCredentials` (audience-3): platform-service creds\n// land in MongoDB `platformApplicationsSecrets` (orchestrator-owned), NOT\n// in `Wildo_Application_Secrets`.\n\n/**\n * Context for `InfraProviderModule.mintPlatformServiceCredentials`.\n * Same orchestrator-pattern as `mintAppCredentials`: orchestrator\n * generates the password, passes it via `secretInputs`; module is\n * upsert-only on the broker.\n */\nexport interface PlatformServiceCredentialMintingContext {\n /**\n * Stable identifier of the platform service this credential is for.\n * Today: members of `PlatformApplicationType` (e.g.,\n * `'platform_apps_manager'`, `'platform_crontabs_batches_manager'`,\n * `'platform_file_generator'`). Module derives the per-service\n * permission regex from this string.\n */\n serviceName: string;\n adminClient: unknown;\n /**\n * Orchestrator-supplied scalars. For RabbitMQ the only required\n * key is `'password'` (no JSON-blob-path conventions because\n * platform-service creds don't go into a per-app blob — they're\n * persisted at the platform-services collection level).\n */\n secretInputs: Record<string, string>;\n}\n\nexport interface PlatformServiceCredentialMintingResult {\n /**\n * Username installed on the broker. Equals `serviceName` today\n * (the legacy convention preserved from the inline ceremony in\n * `PlatformInfrastructureManagerService.provisionServiceCredentials`).\n * Future modules may transform if needed; the orchestrator persists\n * this value alongside the password.\n */\n username: string;\n}\n\n/**\n * Per-app credential minting result. Keys are JSON paths into\n * `Wildo_Application_Secrets` (those declared in\n * `appRuntime.perAppSecretBlobPaths`); values are the canonical\n * persisted form post-broker-upsert. Typically:\n * - **Module-derived** values (e.g., `'database.rabbitmq.username': 'app_<ns>'`).\n * The module computes these from `appSlug`.\n * - **Echoed** values from `secretInputs` (e.g.,\n * `'database.rabbitmq.password': '<the-password-you-passed-in>'`)\n * — the module confirms it installed them on the broker.\n *\n * The orchestrator (apps-manager) merges this map into the persisted\n * secrets blob via `_merge_WildoApplicationSecrets`. The customer\n * pod reads at startup via the standard app-config-fetch path — no\n * K8s Secret involvement for per-app data creds.\n */\nexport interface AppCredentialMintingResult {\n secretBlobValues: Record<string, string>;\n /**\n * Optional non-persisted return values the module produces in the\n * course of upsert. Distinct from `secretBlobValues` (which lands\n * in `Wildo_Application_Secrets`) — `runtimeArtifacts` is a back-\n * channel for values the orchestrator needs at app-init time but\n * deliberately does NOT persist.\n *\n * This field was introduced for the MongoDB modules: `MongodbAtlasInfraProviderModule`\n * returns `runtimeArtifacts['connectionString']` (the per-app\n * SRV URL with credentials embedded) so the orchestrator can use\n * it for transient app-database seeding without persisting the\n * whole credentialed URL into secrets — the persistence shape is\n * `(username, password)` in secrets + `(host, protocol, options,\n * database)` in config, NOT a single URL string.\n *\n * When `undefined`, the module has no transient artifacts; the\n * orchestrator should rely on `secretBlobValues` only.\n */\n runtimeArtifacts?: Record<string, string>;\n}\n\n// =============================================================================\n// Per-provider admin-client contracts\n// =============================================================================\n//\n// Each `InfraProviderModule.mintAppCredentials` call narrows the\n// `AppCredentialMintingContext.adminClient` field to a per-provider\n// management-client interface. The interfaces live HERE (in\n// platform-config-lib, contracts-only per platform/CLAUDE.md) so the\n// module implementation (in platform-apps-manager) and the manager\n// implementation (also in platform-apps-manager) share one definition\n// — and any future caller (companion, CLI) can implement the same\n// interface without depending on the manager class.\n\n/**\n * Raw RabbitMQ management-API transport (HTTP `PUT/DELETE`). Surface\n * what `RabbitmqSelfInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. The 5C policy/transport\n * split (LD-4) carves *policy* methods (`upsertTenantUserPermissions`\n * etc.) out of the manager into the module; this interface is the\n * pure-transport remainder.\n *\n * **Argument-order convention** (Slice 4.A.2 / L3): for permission\n * methods, the order is `(vhost, username, permissions)` — vhost\n * first. The legacy pre-Slice-2 convention was `(username, vhost, ...)`\n * (positional, username first). The new convention is cleaner but\n * silently swappable since both args are strings. **Do NOT reorder**;\n * stale call sites copying the legacy positional order will produce\n * wrong-vhost permissions without compile-time complaint.\n */\nexport interface IRabbitMQManagementClient {\n /** PUT /api/users/{name} — idempotent upsert. */\n putUser(username: string, password: string, tags: ReadonlyArray<string>): Promise<void>;\n /** PUT /api/permissions/{vhost}/{name} — vhost-first per the\n * argument-order convention noted on the interface JSDoc. */\n setPermissions(\n vhost: string,\n username: string,\n permissions: { configure: string; write: string; read: string },\n ): Promise<void>;\n /** PUT /api/topic-permissions/{vhost}/{name} — vhost-first. */\n setTopicPermissions(\n vhost: string,\n username: string,\n permissions: { exchange: string; write: string; read: string },\n ): Promise<void>;\n /** DELETE /api/users/{name} — idempotent (404 → no-op). */\n deleteUser(username: string): Promise<void>;\n /** PUT /api/vhosts/{name} — ensures vhost exists; idempotent. */\n ensureVhost(vhost: string): Promise<void>;\n /**\n * PUT /api/policies/{vhost}/{name} with `apply-to: queues` — idempotent upsert of a QUEUE policy.\n *\n * A policy, not a queue argument, because RabbitMQ refuses to change the arguments of a queue that\n * already exists, while a policy is re-applied to matching queues whenever it changes. Exactly one\n * policy applies to a queue (the highest priority), so a caller's `pattern` must not overlap\n * another policy at the same priority.\n */\n ensureQueuePolicy(\n vhost: string,\n name: string,\n policy: { pattern: string; definition: Readonly<Record<string, string | number>>; priority: number },\n ): Promise<void>;\n}\n\n/**\n * Raw Redis (Valkey) ACL transport. Surface what\n * `RedisSelfInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. Used over a `redis-cli`-\n * equivalent ACL connection (the apps-manager's\n * `RedisConnectionManagerService` opens it once at boot and reuses).\n *\n * **Channel pattern policy** (Slice 4.B.1, 2026-05-10): the legacy\n * `RedisConnectionManagerService.upsertTenantUserAcl` derived a\n * fixed family of pub/sub channel patterns from `username`\n * (`<u>#*`, `<u>#/#*`, `<u>-request#*`, `<u>-request#/#*`,\n * `<u>-response#*`, `<u>-response#/#*`). That fan-out is module-\n * internal policy, NOT transport. The contract therefore takes\n * only `username`/`password`/`keyPattern` — the channel patterns\n * live inside the manager implementation today (preserves Slice 2\n * behavior parity); when the legacy method is retired the policy\n * moves into `RedisSelfInfraProviderModule` proper. Until then,\n * `upsertUser` is a thin delegator and the contract is the\n * forward-looking shape.\n *\n * **Idempotent persistence** (`persistAcl`): Valkey/Redis ACL\n * changes are in-memory until `ACL SAVE` is called. The legacy\n * code paired every `upsertTenantUserAcl` with `aclSave`; the\n * module mirrors that pairing.\n */\nexport interface IRedisAclClient {\n /**\n * `ACL SETUSER <name> on >password resetkeys ~<keyPattern> ...`\n * — idempotent upsert. The implementation owns the full ACL\n * command shape (channel patterns, allow/deny categories,\n * dangerous-command denials) — the contract surfaces only the\n * orchestrator-supplied identity material. Slice 4.B.1's manager\n * impl preserves the legacy channel-pattern fan-out from\n * `RedisConnectionManagerService.upsertTenantUserAcl`.\n */\n upsertUser(input: {\n username: string;\n password: string;\n keyPattern: string;\n }): Promise<void>;\n /**\n * `ACL DELUSER <name>` — idempotent (no-op when the user is\n * already absent).\n */\n deleteUser(username: string): Promise<void>;\n /**\n * `ACL SAVE` — flushes the in-memory ACL list to disk. MUST be\n * called after every mutation set so Valkey restarts don't lose\n * tenant users.\n */\n persistAcl(): Promise<void>;\n}\n\n/**\n * Raw Postgres admin transport. Surface what\n * `PostgresSelfInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. The legacy\n * `PostgreSQLConnectionManagerService` (apps-manager) implements\n * this contract via its existing `createApplicationDatabase` /\n * `deleteApplicationDatabase` methods (Slice 4.B.2 5C policy/\n * transport split).\n *\n * **Identifier-injection-safe**: implementations MUST validate\n * `databaseName` / `username` shapes (alphanumeric + underscore;\n * 63-char Postgres limit) and quote them safely — module callers\n * pass authored slugs verbatim. `PostgreSQLConnectionManagerService`\n * uses the legacy `validateIdentifier` + `quoteIdentifier` pair.\n *\n * **Idempotent upsert** (`upsertApplicationDatabase`): the legacy\n * `createApplicationDatabase` is upsert-style — `CREATE USER` falls\n * back to `ALTER USER` on conflict; `CREATE DATABASE` skips when the\n * DB exists; ownership + privileges always reapplied. The module\n * surface preserves that contract; \"create\" is renamed to \"upsert\"\n * in the contract to match the orchestrator-pattern vocabulary.\n */\nexport interface IPostgresAdminClient {\n /**\n * Upsert per-app database + role. Returns the resolved\n * `connectionUrl` so the orchestrator can persist it into\n * `Wildo_Application_Secrets.database.postgresql.connectUrl`.\n * Idempotent: safe to call repeatedly with the same input.\n */\n upsertApplicationDatabase(input: {\n databaseName: string;\n username: string;\n password: string;\n sslMode?: PostgreSQLSSLMode;\n }): Promise<{ connectionUrl: string }>;\n /**\n * Drop per-app database + user. Idempotent: missing DB / missing\n * user are non-throws (best-effort cleanup, see legacy\n * `deleteApplicationDatabase` semantics).\n */\n dropApplicationDatabase(input: {\n databaseName: string;\n username: string;\n }): Promise<void>;\n /**\n * Stop the application's OWNER role from authenticating — and destroy nothing (#1307).\n *\n * The application backend's role OWNS its database, so it cannot be dropped without first handing\n * ownership of every object to somebody else (PostgreSQL refuses `DROP ROLE` while objects depend\n * on it). Revocation therefore keeps the role and removes its ability to open a session:\n * `NOLOGIN` (a role without it cannot be \"the initial session authorization name during client\n * connection\") plus `PASSWORD NULL` (\"password authentication will always fail for that user\"),\n * then terminates the sessions it already holds, because a login attribute is checked only when a\n * session starts.\n *\n * spec-cite: PostgreSQL 17 `CREATE ROLE` — `LOGIN`/`NOLOGIN` and `PASSWORD` parameter descriptions\n * (https://www.postgresql.org/docs/17/sql-createrole.html); `pg_terminate_backend`, System\n * Administration Functions (https://www.postgresql.org/docs/17/functions-admin.html).\n *\n * Separate from {@link IPostgresAdminClient.dropApplicationDatabase}, which DROPS the database: a\n * withdrawn application's data is kept (#1562 owns destruction), and a revocation that routed\n * through the drop would erase it while believing it was only retiring a login.\n *\n * Reversible by {@link IPostgresAdminClient.upsertApplicationDatabase}, which re-applies\n * `LOGIN PASSWORD` to an existing role. Idempotent: a role that does not exist is a no-op.\n */\n revokeApplicationDatabaseLogin(input: {\n username: string;\n }): Promise<void>;\n /**\n * Upsert a LOGIN role holding exactly the given per-table privileges inside an\n * existing application database (Step 3 / R1).\n *\n * A SEPARATE method from {@link IPostgresAdminClient.upsertApplicationDatabase},\n * for the same reason the Mongo port is split: that one CREATEs the database\n * and makes its caller the OWNER with `ALL PRIVILEGES`, this one grants named\n * verbs on named tables inside a database somebody else owns. One method with\n * an optional privileges argument would make OWNERSHIP the behaviour you get\n * by forgetting to pass something.\n *\n * The grants are AUTHORITATIVE: the implementation must revoke what the role\n * previously held before granting, or a table removed from `resourceAccess`\n * keeps its privilege and revocation becomes a no-op that reports success.\n *\n * A declared table that does not exist yet cannot be granted, and is OWED: the\n * implementation must record every grant it derived, in the same transaction, in\n * the in-database contract of `postgresql-owed-grants.contracts.ts`, so the\n * application's migration run grants each table as it creates it (#3027).\n * `dropTableScopedDatabaseRole` must remove the role's record with its grants.\n *\n * An empty `readTables`/`writeTables` pair is legitimate — a role that can\n * connect and see nothing — and must NOT be read as \"unspecified, leave the\n * previous grants alone\".\n */\n /**\n * Remove a table-scoped LOGIN role and everything it holds — WITHOUT touching\n * the database it was scoped into.\n *\n * Separate from {@link IPostgresAdminClient.dropApplicationDatabase}, which\n * drops the DATABASE and its owner. Reusing that one to retire a minion would\n * destroy the entire application's data while believing it was removing one\n * principal's access. That asymmetry is why revocation gets its own method\n * rather than a flag.\n */\n dropTableScopedDatabaseRole(input: {\n databaseName: string;\n username: string;\n schemaName: string;\n }): Promise<void>;\n upsertTableScopedDatabaseRole(input: {\n databaseName: string;\n username: string;\n password: string;\n schemaName: string;\n readTables: readonly string[];\n writeTables: readonly string[];\n /**\n * Insert-only tables — `GRANT INSERT`, never UPDATE and never DELETE.\n *\n * A third axis rather than a flag on `writeTables`, because the two say\n * different things about the same verb set and a boolean would make the\n * safer one the thing you get by remembering to pass it. Today this carries\n * the engine's mandatory append floor — the audit trail and retained job\n * output (see `deriveMinionDatabaseGrants`): a principal must be able to record\n * what it did, and must never be able to unrecord it.\n */\n appendTables: readonly string[];\n /** Insert/update durable runtime records without granting DELETE. Read is granted separately. */\n maintainTables?: readonly string[];\n sslMode?: PostgreSQLSSLMode;\n }): Promise<{ connectionUrl: string }>;\n}\n\n/**\n * Raw MongoDB Atlas API transport. Surface what\n * `MongodbAtlasInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. The legacy\n * `MongoAtlasManagerService` (apps-manager) implements this\n * contract via its existing `createApplicationDatabase` /\n * `deleteDatabaseUser` methods (Slice 4.B.3 5C policy/transport\n * split).\n *\n * **Idempotent upsert** (`upsertApplicationDatabase`): the legacy\n * `createApplicationDatabase` is upsert-style — `POST /databaseUsers`\n * falls back to `PATCH` on conflict (existing user); cluster scope +\n * roles are reapplied on every call. Returns the SRV connection\n * string with credentials embedded, ready for transient\n * app-database seeding by the orchestrator.\n */\nexport interface IMongoAtlasClient {\n /**\n * Upsert per-app Atlas database user. Returns the SRV connection\n * string (with credentials embedded, `mongodb+srv://user:pass@...`)\n * that the orchestrator uses for transient app-init operations.\n * The string is NOT persisted into `Wildo_Application_Secrets`\n * by today's orchestrator — it's exposed via\n * `AppCredentialMintingResult.runtimeArtifacts.connectionString`.\n */\n upsertApplicationDatabase(input: {\n clusterName: string;\n databaseName: string;\n username: string;\n password: string;\n }): Promise<{ connectionString: string }>;\n /**\n * Delete an Atlas database user. Idempotent: 404 → no-op.\n */\n deleteDatabaseUser(username: string): Promise<void>;\n /**\n * Upsert a database user holding exactly ONE Atlas custom database role, which carries exactly the\n * given collection-scoped privileges and inherits nothing (#1694). The Atlas twin of\n * {@link IMongoSelfAdminClient.upsertCollectionScopedDatabaseUser}, for a runtime principal (a minion).\n *\n * A SEPARATE method from {@link IMongoAtlasClient.upsertApplicationDatabase} for the reason the\n * self-hosted contract gives: that one grants `readWrite` on the whole database, this one grants named\n * actions on named collections, and an optional \"privileges\" argument would make the wide grant the\n * behaviour you get by forgetting to pass something.\n *\n * - `privileges[].actions` are Atlas Admin API privilege-action names (`FIND`, `INSERT`, `UPDATE`,\n * `REMOVE`, …). The caller translates from MongoDB's own vocabulary; this transport never widens it.\n * - `privileges` is AUTHORITATIVE: an existing role's actions are REPLACED, so a resource removed from\n * `resourceAccess` loses its grant on the next sync.\n * - The user is scoped to `clusterName` alone (Atlas grants every cluster in the project when `scopes`\n * is omitted), and holds the custom role and nothing else.\n * - Idempotent: safe when the role and user already exist; the password is re-applied, which is how a\n * rotation lands.\n *\n * Returns the SRV connection string carrying THIS user's credentials, for the same transient use as\n * {@link IMongoAtlasClient.upsertApplicationDatabase}'s.\n */\n upsertCollectionScopedDatabaseUser(input: {\n clusterName: string;\n databaseName: string;\n username: string;\n password: string;\n roleName: string;\n privileges: ReadonlyArray<{\n resource: { db: string; collection: string };\n actions: readonly string[];\n }>;\n }): Promise<{ connectionString: string }>;\n /**\n * Retire a collection-scoped user AND the custom role it holds — and nothing else.\n *\n * Two objects, deleted user FIRST: Atlas refuses to delete a custom role that would leave a database\n * user with no roles, so the reverse order fails while the user exists. Dropping only the user would\n * leave a privileged role behind that the next mint silently adopts. Idempotent in both halves: a\n * missing user or a missing role is a no-op.\n */\n dropCollectionScopedDatabaseUser(input: {\n username: string;\n roleName: string;\n }): Promise<void>;\n}\n\n/**\n * The immudb permission an application's audit user holds on its OWN database (#1696).\n *\n * The values are immudb's own permission bytes, because the admin transport sends them verbatim.\n * spec-cite: immudb v1.11.1 `pkg/auth/permissions.go` — `PermissionNone = iota`, `PermissionR`, `PermissionRW`\n * (0, 1, 2), `PermissionAdmin = 254`, `PermissionSysAdmin = 255`\n * (https://raw.githubusercontent.com/codenotary/immudb/v1.11.1/pkg/auth/permissions.go, fetched 2026-09-29).\n *\n * Only READ_WRITE is named: an audit sink appends and verifies, and nothing in the framework grants an\n * application more. `ADMIN` and `SYSADMIN` are deliberately absent — holding either is the defect #1696 removes.\n */\nexport enum ImmudbDatabasePermission {\n READ_WRITE = 2,\n}\n\n/**\n * Raw immudb admin transport (#1696). Surfaces exactly what `ImmudbSelfInfraProviderModule` needs to give each\n * application ONE database and ONE user confined to it, and to revoke that user — nothing more.\n *\n * Implemented in apps-manager over the gRPC admin API with the PLATFORM's own admin credential (a\n * framework-managed secret no application receives). Every method is idempotent, because registration,\n * withdrawal and restore all retry by re-running.\n *\n * **No method deletes anything.** immudb keeps every database and every user it has created: an append-only\n * store's audit history must outlive the application's credential, and a withdrawn application is restored by\n * RE-ACTIVATING its user onto the same database (#1307).\n */\nexport interface IImmudbAdminClient {\n /** Create the database when it does not exist; a no-op when it does. */\n ensureDatabase(input: { databaseName: string }): Promise<void>;\n /**\n * Create the user, or bring an existing one back to exactly this state: ACTIVE, this password, and `permission`\n * on `databaseName`. Re-applying the password and re-activating are what make a restore after withdrawal work.\n */\n upsertDatabaseUser(input: {\n username: string;\n password: string;\n databaseName: string;\n permission: ImmudbDatabasePermission;\n }): Promise<void>;\n /**\n * Refuse the user's credential from now on: revoke its permission on `databaseName` and DEACTIVATE it.\n * immudb has no user deletion; a deactivated user cannot log in. A user that does not exist is a no-op.\n */\n deactivateDatabaseUser(input: { username: string; databaseName: string }): Promise<void>;\n}\n\n/**\n * Raw self-managed MongoDB admin transport. Surface what\n * `MongodbSelfInfraProviderModule.mintAppCredentials` /\n * `revokeAppCredentials` need; nothing more. Implemented by a\n * lightweight admin-side mongoose connection — the legacy inline\n * `ensureSelfManagedMongoApplicationUser` at\n * `wildo-application-lifecycle.service.ts:2710-2745` is the source\n * of behavior.\n *\n * **Why this contract is asymmetric to `IMongoAtlasClient`** (Slice\n * 4.B.3 design note, 2026-05-10): Atlas exposes a stateless REST\n * API for user management; self-managed Mongo requires opening an\n * admin-DB connection and running `createUser` / `updateUser`\n * commands. The contract therefore takes the admin connect URL as\n * an input (not a constructor-time configuration) — implementations\n * open transient connections per call, mirroring the legacy\n * pattern.\n */\nexport interface IMongoSelfAdminClient {\n /**\n * Upsert per-app database user on a self-managed MongoDB\n * instance. Connects to `adminConnectUrl` (admin-scoped),\n * creates or updates the user with `readWrite` + `dbAdmin`\n * roles on `databaseName`, then closes the connection. Idempotent.\n */\n upsertApplicationDatabaseUser(input: {\n adminConnectUrl: string;\n databaseName: string;\n username: string;\n password: string;\n }): Promise<void>;\n /**\n * Delete a per-app database user. Idempotent: missing user is a\n * no-op (best-effort cleanup, mirrors `IPostgresAdminClient`\n * semantics).\n */\n deleteApplicationDatabaseUser(input: {\n adminConnectUrl: string;\n username: string;\n }): Promise<void>;\n /**\n * Upsert a database user holding ONE custom role carrying exactly the given\n * collection-scoped privileges (Step 3 / R1 / D14).\n *\n * Deliberately a SEPARATE method from\n * {@link IMongoSelfAdminClient.upsertApplicationDatabaseUser} rather than an\n * optional parameter on it. The two grant fundamentally different authority —\n * that one grants `readWrite` + `dbAdmin` on the WHOLE database, this one\n * grants named actions on named collections and nothing else — and a single\n * method with an optional \"privileges\" argument would make the wide grant the\n * behaviour you get by forgetting to pass something. Two methods make the\n * caller name which authority it intends.\n *\n * `privileges` is authoritative and REPLACES the role's previous contents, so\n * a resource removed from `resourceAccess` loses its grant on the next sync.\n * An empty list is legitimate — a principal with no data access — and MUST\n * yield a role granting nothing rather than being treated as \"unspecified\".\n *\n * Idempotent: safe to call when the role and user already exist.\n */\n /**\n * Retire a collection-scoped user AND the custom role it holds.\n *\n * Separate from {@link IMongoSelfAdminClient.deleteApplicationDatabaseUser}\n * because a scoped principal owns TWO objects in TWO databases — the user in\n * `admin`, the role in the application database — and dropping only the user\n * leaves a privileged role behind that the next mint silently adopts.\n *\n * Idempotent in both halves: a missing user or a missing role is a no-op.\n */\n dropCollectionScopedDatabaseUser(input: {\n adminConnectUrl: string;\n databaseName: string;\n username: string;\n roleName: string;\n }): Promise<void>;\n upsertCollectionScopedDatabaseUser(input: {\n adminConnectUrl: string;\n databaseName: string;\n username: string;\n password: string;\n roleName: string;\n privileges: ReadonlyArray<{\n resource: { db: string; collection: string };\n actions: readonly string[];\n }>;\n }): Promise<void>;\n}\n\nexport interface InfraProviderModule {\n provider: InfraProvider;\n supportedCapabilities: ReadonlyArray<InfraCapability>;\n\n /**\n * Present when this module EXISTS but the platform cannot yet deliver a working connection for the\n * provider — the module can plan, and an application selecting it would still receive no usable\n * credential. The value says why, and what would change it.\n *\n * ## Why the module stays in the catalogue instead of being removed\n *\n * The module's `plan()` is correct and useful: it formalizes the env contract an operator will set\n * and gives the lockfile a stable digest. What is missing is elsewhere (for `AWS_S3`, the credential\n * broker that speaks only MinIO's AssumeRole, #14). Removing the module would lose the correct half\n * to express the missing one.\n *\n * ## What it does\n *\n * A declaration resolving to a provider whose module carries this is REFUSED at authoring time\n * (`wildo config validate` / `config sync` / `lock check`), exactly like a declaration resolving to\n * a provider with no module. Delete the field in the same change that makes the provider servable.\n */\n unservableReason?: string;\n\n /**\n * Every `Wildo_Application_Secrets` JSON path this module can mint PER RUNTIME PRINCIPAL.\n *\n * ## Why this is static, when `plan()` already reports the same paths\n *\n * `plan()` answers \"what does THIS application get\", so it needs an\n * {@link InfraProviderPlanningContext}. The secret-DELIVERY path in apps-manager asks a different\n * question — \"which paths are per-principal AT ALL\" — and must answer it with no application in\n * hand, because it decides what to STRIP from the application blob before overlaying a\n * principal's own material. A principal must receive a credential only where one was minted for\n * it; anything left un-stripped is delivered with the APPLICATION's value, which for a database\n * means `readWrite` + `dbAdmin` on the whole database.\n *\n * Empty for a provider with no per-app credentials — shared-bucket object storage\n * (`MINIO_SELF`, `AWS_S3`) and stateless infra (`CLAMAV_SELF`). Empty is a\n * real answer, not a missing one, which is why the field is required rather than optional: a\n * module that mints per-principal material must not be able to omit it and be silently read as\n * \"nothing to confine\".\n *\n * **Modules MUST derive `appRuntime.perAppSecretBlobPaths` from this same constant** rather than\n * repeating the literal list. Two spellings of where a credential lives is the defect this exists\n * to prevent, one layer up.\n *\n * **A module declaring paths here MUST derive a distinct resource name per principal**, in its mint\n * AND its revoke, through one function. apps-manager dispatches every minion mint and revocation\n * through the catalogue (#1692), so a module that ignored `principal` and derived the application\n * backend's own name would OVERWRITE the backend's user on a minion mint and DELETE it on a minion\n * revocation — the defect `invariant-call-site-enumeration.md` #18 records. MongoDB Atlas shipped in\n * exactly that shape and was refused at registration until its per-principal path landed (#1694).\n */\n perPrincipalSecretBlobPaths: ReadonlyArray<string>;\n\n plan(context: InfraProviderPlanningContext): InfraProviderPlanContribution;\n\n /**\n * Optional. Called by apps-manager at app-init time (see\n * `wildo-application-lifecycle.service.ts:432-580` — the existing\n * per-resource ceremony this method abstracts). Upserts the per-app\n * user / role / DB on the broker using `secretInputs` for any\n * orchestrator-supplied passwords; returns the canonical form of\n * the persisted secrets blob slice.\n *\n * Returns `null` when the provider has no per-app credentials (e.g.,\n * shared S3 bucket with shared access key).\n *\n * **Idempotent broker upsert** — the module installs / replaces the\n * user with the password from `secretInputs`. It does NOT make\n * generation/rotation decisions; that is the orchestrator's\n * responsibility (driven by the existing `overrideCredentials`\n * flag on `WildoApplicationInitOptions`). The module MUST NOT\n * crash on \"user already exists\" (PUT semantics on the broker\n * management API are sufficient for RabbitMQ; equivalent\n * upsert-on-conflict semantics for other providers).\n */\n mintAppCredentials?(\n context: AppCredentialMintingContext,\n ): Promise<AppCredentialMintingResult | null>;\n\n /**\n * Optional. Symmetric to `mintAppCredentials`: afterwards the principal's credential is REFUSED by the\n * server. Called by apps-manager when a minion leaves the declaration, and for EVERY principal of an\n * application withdrawn from the platform (`deregisterApplication`, #1307).\n *\n * **It revokes and never destroys.** It removes the ability to authenticate — an ACL user, a broker\n * user, a database user, or a login — and leaves the application's DATA where it is: its database,\n * keys, queues and blobs. A withdrawn application is restored by re-minting (`mintAppCredentials` with\n * the recorded material), which only works if nothing it owns was dropped. Destroying data is a\n * different verb with its own protection (#1562); a module must never reach it through this one.\n *\n * Idempotent: safe to call when the per-principal user / role does not exist (no throw on\n * already-absent), because a retry after a partial revocation must converge.\n */\n revokeAppCredentials?(context: AppCredentialMintingContext): Promise<void>;\n\n /**\n * Optional (LD-8 / Slice 2.5). Called by the orchestrator\n * (`PlatformInfrastructureManagerService.provisionServiceCredentials`\n * + `ensureAppsManagerCredentials`) at platform-service-init time.\n * Upserts a SCOPED (non-admin) per-platform-service user on the\n * broker for inter-service messaging — distinct from\n * `mintAppCredentials` (audience-3, customer-app per-app creds).\n *\n * Same orchestrator-pattern as `mintAppCredentials`: orchestrator\n * owns generation, module is upsert-only.\n *\n * Returns `null` when the provider has no per-platform-service\n * credentials concept (e.g., S3 modules — platform services use a\n * shared bucket).\n */\n mintPlatformServiceCredentials?(\n context: PlatformServiceCredentialMintingContext,\n ): Promise<PlatformServiceCredentialMintingResult | null>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infra-service.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"infra-service.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/infra-service.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * App-authored local runtime addressing for helper services.\n */\nexport const InfraServiceAddressingSchema = z.object({\n host: z.string().optional(),\n port: z.number().int().positive().optional(),\n url: z.string().optional(),\n}).strict();\nexport type InfraServiceAddressing = z.infer<typeof InfraServiceAddressingSchema>;\n\n/**\n * App-authored Kubernetes runtime scaling for generated service workloads.\n */\nexport const InfraServiceK8sSchema = z.object({\n replicas: z.number().int().positive().optional(),\n}).strict();\nexport type InfraServiceK8s = z.infer<typeof InfraServiceK8sSchema>;\n"]}
|
|
@@ -15,6 +15,7 @@ export declare const INFRA_DEFAULT_PORTS: {
|
|
|
15
15
|
readonly MONGOT_GRPC: 27028;
|
|
16
16
|
readonly MONGOT_HEALTH: 8080;
|
|
17
17
|
readonly MONGOT_METRICS: 9946;
|
|
18
|
+
readonly OPENBAO: 8200;
|
|
18
19
|
};
|
|
19
20
|
export declare const PLATFORM_DEFAULT_PORTS: {
|
|
20
21
|
readonly APPS_MANAGER: 5151;
|
|
@@ -80,7 +81,7 @@ export declare const PLATFORM_MONGO_DATABASE: "wildo_platform";
|
|
|
80
81
|
* `PostgreSQLConnectionManagerService.ensurePlatformDatabaseExists` using the `PG_ADMIN_*`
|
|
81
82
|
* credentials, because PostgreSQL (unlike MongoDB) creates no database on connect and the compose
|
|
82
83
|
* container's initdb creates only the application's. That makes the separation structural rather
|
|
83
|
-
* than conventional.
|
|
84
|
+
* than conventional.
|
|
84
85
|
*/
|
|
85
86
|
export declare const PLATFORM_POSTGRES_DATABASE: "wildo_platform";
|
|
86
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infrastructure-defaults.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"infrastructure-defaults.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/infrastructure-defaults.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;CA8BtB,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;CAIzB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB;;;CAGzB,CAAC;AAEX,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAG,gBAAyB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B,EAAG,gBAAyB,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,sCAAsC,EAAG,UAAmB,CAAC"}
|
|
@@ -30,6 +30,9 @@ export const INFRA_DEFAULT_PORTS = {
|
|
|
30
30
|
MONGOT_GRPC: 27028,
|
|
31
31
|
MONGOT_HEALTH: 8080,
|
|
32
32
|
MONGOT_METRICS: 9946,
|
|
33
|
+
// #2933 — the self-hosted OpenBao that holds the platform's custodied keys: Vault's API port. Only apps-manager dials
|
|
34
|
+
// it; the compose lane publishes it on the host solely because a framework developer's apps-manager runs there.
|
|
35
|
+
OPENBAO: 8200,
|
|
33
36
|
};
|
|
34
37
|
export const PLATFORM_DEFAULT_PORTS = {
|
|
35
38
|
APPS_MANAGER: 5151,
|
|
@@ -95,7 +98,7 @@ export const PLATFORM_MONGO_DATABASE = 'wildo_platform';
|
|
|
95
98
|
* `PostgreSQLConnectionManagerService.ensurePlatformDatabaseExists` using the `PG_ADMIN_*`
|
|
96
99
|
* credentials, because PostgreSQL (unlike MongoDB) creates no database on connect and the compose
|
|
97
100
|
* container's initdb creates only the application's. That makes the separation structural rather
|
|
98
|
-
* than conventional.
|
|
101
|
+
* than conventional.
|
|
99
102
|
*/
|
|
100
103
|
export const PLATFORM_POSTGRES_DATABASE = 'wildo_platform';
|
|
101
104
|
/**
|