@wildo-ai/platform-config-lib 1.0.1 → 1.1.1
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/LICENSE +34 -0
- package/dist/esm/.builder.pid +9 -0
- package/dist/esm/_unimplemented/index.d.ts +3 -0
- package/dist/esm/_unimplemented/index.d.ts.map +1 -0
- package/dist/esm/_unimplemented/index.js +3 -0
- package/dist/esm/_unimplemented/index.js.map +1 -0
- package/dist/esm/_unimplemented/soft-warn.d.ts +124 -0
- package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -0
- package/dist/esm/_unimplemented/soft-warn.js +170 -0
- package/dist/esm/_unimplemented/soft-warn.js.map +1 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +137 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +1 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.js +153 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +1 -0
- package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/application-backend-env.contracts.js +1 -1
- package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts +13 -0
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.js +14 -0
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -0
- package/dist/esm/bootstrap/bootstrap-planner.d.ts +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.js +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts +141 -37
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.js +104 -18
- package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts +430 -421
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.js +383 -21
- package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +213 -8
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js +230 -5
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +79 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.js +83 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -0
- package/dist/esm/bootstrap/runtime-network-policy.d.ts +63 -0
- package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-network-policy.js +104 -0
- package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -0
- package/dist/esm/bootstrap/runtime-network-topology.d.ts +78 -0
- package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-network-topology.js +134 -0
- package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -0
- package/dist/esm/bootstrap/runtime-platform-access.d.ts +67 -0
- package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-platform-access.js +57 -0
- package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +173 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.js +218 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -0
- package/dist/esm/bootstrap/runtime-topology.contracts.d.ts +112 -1
- package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-topology.contracts.js +141 -8
- package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts +3 -0
- package/dist/esm/config-authoring.entry.d.ts.map +1 -0
- package/dist/esm/config-authoring.entry.js +5 -0
- package/dist/esm/config-authoring.entry.js.map +1 -0
- package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
- package/dist/esm/credentials/credential-generator.service.js +1 -1
- package/dist/esm/credentials/credential-generator.service.js.map +1 -1
- package/dist/esm/index.d.ts +30 -15
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +16 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lockfile/canonical-json.d.ts +41 -0
- package/dist/esm/lockfile/canonical-json.d.ts.map +1 -0
- package/dist/esm/lockfile/canonical-json.js +56 -0
- package/dist/esm/lockfile/canonical-json.js.map +1 -0
- package/dist/esm/lockfile/lockfile-io.d.ts +231 -0
- package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -0
- package/dist/esm/lockfile/lockfile-io.js +303 -0
- package/dist/esm/lockfile/lockfile-io.js.map +1 -0
- package/dist/esm/lockfile/materialize-infra-section.d.ts +99 -0
- package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -0
- package/dist/esm/lockfile/materialize-infra-section.js +153 -0
- package/dist/esm/lockfile/materialize-infra-section.js.map +1 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +522 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +116 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -0
- package/dist/esm/project-config/define-framework-config.d.ts +36 -10
- package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-framework-config.js +67 -3
- package/dist/esm/project-config/define-framework-config.js.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.d.ts +570 -0
- package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -0
- package/dist/esm/project-config/define-infra-env-config.js +726 -0
- package/dist/esm/project-config/define-infra-env-config.js.map +1 -0
- package/dist/esm/project-config/define-minion-config.d.ts +221 -23
- package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-minion-config.js +228 -11
- package/dist/esm/project-config/define-minion-config.js.map +1 -1
- package/dist/esm/project-config/define-saas-config.d.ts +427 -218
- package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-saas-config.js +704 -75
- package/dist/esm/project-config/define-saas-config.js.map +1 -1
- package/dist/esm/project-config/define-worker-config.d.ts +106 -10
- package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-worker-config.js +99 -9
- package/dist/esm/project-config/define-worker-config.js.map +1 -1
- package/dist/esm/project-config/index.d.ts +28 -21
- package/dist/esm/project-config/index.d.ts.map +1 -1
- package/dist/esm/project-config/index.js +14 -7
- package/dist/esm/project-config/index.js.map +1 -1
- package/dist/esm/project-config/loader.d.ts +120 -10
- package/dist/esm/project-config/loader.d.ts.map +1 -1
- package/dist/esm/project-config/loader.js +290 -38
- package/dist/esm/project-config/loader.js.map +1 -1
- package/dist/esm/project-config/minion-local-provider-registration.d.ts +69 -0
- package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -0
- package/dist/esm/project-config/minion-local-provider-registration.js +72 -0
- package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -0
- package/dist/esm/project-config/provider-catalog-types.d.ts +12 -0
- package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -0
- package/dist/esm/project-config/provider-catalog-types.js +49 -0
- package/dist/esm/project-config/provider-catalog-types.js.map +1 -0
- package/dist/esm/project-config/provider-companion-discovery.d.ts +24 -0
- package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -0
- package/dist/esm/project-config/provider-companion-discovery.js +244 -0
- package/dist/esm/project-config/provider-companion-discovery.js.map +1 -0
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts +297 -0
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -0
- package/dist/esm/project-config/provider-runtime-artifacts.js +860 -0
- package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +18 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.js +25 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/application-modules.schemas.d.ts +10 -2
- package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/application-modules.schemas.js +12 -1
- package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/application-modules.utils.d.ts +2 -1
- package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
- package/dist/esm/project-config/shared/application-modules.utils.js +6 -1
- package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
- package/dist/esm/project-config/shared/auth.schemas.d.ts +102 -0
- package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/auth.schemas.js +100 -0
- package/dist/esm/project-config/shared/auth.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts +316 -39
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/backing-services.schemas.js +359 -24
- package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/cdn.example.d.ts +14 -0
- package/dist/esm/project-config/shared/cdn.example.d.ts.map +1 -0
- package/dist/esm/project-config/shared/cdn.example.js +38 -0
- package/dist/esm/project-config/shared/cdn.example.js.map +1 -0
- package/dist/esm/project-config/shared/cdn.schemas.d.ts +182 -0
- package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/cdn.schemas.js +151 -0
- package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/csp-defaults.d.ts +92 -0
- package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -0
- package/dist/esm/project-config/shared/csp-defaults.js +195 -0
- package/dist/esm/project-config/shared/csp-defaults.js.map +1 -0
- package/dist/esm/project-config/shared/csp-emit.d.ts +106 -0
- package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -0
- package/dist/esm/project-config/shared/csp-emit.js +305 -0
- package/dist/esm/project-config/shared/csp-emit.js.map +1 -0
- package/dist/esm/project-config/shared/csp.schemas.d.ts +266 -0
- package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/csp.schemas.js +281 -0
- package/dist/esm/project-config/shared/csp.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/data-services.schemas.d.ts +45 -9
- package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/data-services.schemas.js +45 -9
- package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/env-example-defaults.d.ts +0 -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 +1 -2
- package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.d.ts +134 -8
- package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.js +185 -2
- package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +779 -0
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/infra-providers.schemas.js +210 -0
- package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/infra-service.schemas.d.ts +18 -0
- package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/infra-service.schemas.js +16 -0
- package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +83 -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 +99 -2
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.d.ts +51 -7
- package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.js +59 -12
- package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts +31 -0
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -0
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js +32 -0
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +142 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.js +159 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.d.ts +100 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.js +130 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -0
- package/dist/esm/project-config/shared/platform-services.schemas.d.ts +9 -14
- package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/platform-services.schemas.js +13 -9
- package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts +15 -0
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/schema-version.schemas.js +40 -0
- package/dist/esm/project-config/shared/schema-version.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +283 -8
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/service-definitions.schemas.js +325 -8
- package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
- package/dist/esm/registry/artifact-domain.schemas.d.ts +54 -0
- package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -0
- package/dist/esm/registry/artifact-domain.schemas.js +40 -0
- package/dist/esm/registry/artifact-domain.schemas.js.map +1 -0
- package/dist/esm/registry/companion-api.schemas.d.ts +176 -0
- package/dist/esm/registry/companion-api.schemas.d.ts.map +1 -0
- package/dist/esm/registry/companion-api.schemas.js +165 -0
- package/dist/esm/registry/companion-api.schemas.js.map +1 -0
- package/dist/esm/registry/digest.schemas.d.ts +20 -0
- package/dist/esm/registry/digest.schemas.d.ts.map +1 -0
- package/dist/esm/registry/digest.schemas.js +21 -0
- package/dist/esm/registry/digest.schemas.js.map +1 -0
- package/dist/esm/registry/index.d.ts +33 -0
- package/dist/esm/registry/index.d.ts.map +1 -0
- package/dist/esm/registry/index.js +33 -0
- package/dist/esm/registry/index.js.map +1 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +107 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.js +67 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -0
- package/dist/esm/registry/module-artifact.schemas.d.ts +94 -0
- package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -0
- package/dist/esm/registry/module-artifact.schemas.js +69 -0
- package/dist/esm/registry/module-artifact.schemas.js.map +1 -0
- package/dist/esm/registry/module-manifest.schemas.d.ts +134 -0
- package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -0
- package/dist/esm/registry/module-manifest.schemas.js +155 -0
- package/dist/esm/registry/module-manifest.schemas.js.map +1 -0
- package/dist/esm/registry/registry-config.schemas.d.ts +31 -0
- package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -0
- package/dist/esm/registry/registry-config.schemas.js +24 -0
- package/dist/esm/registry/registry-config.schemas.js.map +1 -0
- package/dist/esm/registry/registry-defaults.constants.d.ts +37 -0
- package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -0
- package/dist/esm/registry/registry-defaults.constants.js +37 -0
- package/dist/esm/registry/registry-defaults.constants.js.map +1 -0
- package/dist/esm/registry/registry-errors.d.ts +109 -0
- package/dist/esm/registry/registry-errors.d.ts.map +1 -0
- package/dist/esm/registry/registry-errors.js +185 -0
- package/dist/esm/registry/registry-errors.js.map +1 -0
- package/dist/esm/registry/registry-section-schemas.constants.d.ts +39 -0
- package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -0
- package/dist/esm/registry/registry-section-schemas.constants.js +22 -0
- package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -0
- package/dist/esm/release/framework-release.constants.d.ts +26 -1
- package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
- package/dist/esm/release/framework-release.constants.js +27 -2
- package/dist/esm/release/framework-release.constants.js.map +1 -1
- package/dist/esm/schemas/framework-info.schemas.d.ts +1 -1
- package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-info.schemas.js +1 -1
- package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.d.ts +5 -5
- package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.js +1 -1
- 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.d.ts.map +1 -1
- package/dist/esm/schemas/platform-application-config.schemas.js +11 -2
- package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +7 -7
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.js +17 -2
- package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-config.schemas.d.ts +12 -13
- package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-config.schemas.js +15 -3
- package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
- package/dist/esm/workspace-scope/application-subject-manifest.d.ts +26 -0
- package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -0
- package/dist/esm/workspace-scope/application-subject-manifest.js +43 -0
- package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -0
- package/dist/esm/workspace-scope/index.d.ts +5 -2
- package/dist/esm/workspace-scope/index.d.ts.map +1 -1
- package/dist/esm/workspace-scope/index.js +4 -1
- package/dist/esm/workspace-scope/index.js.map +1 -1
- package/dist/esm/workspace-scope/resolve-homes.d.ts +20 -0
- package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -0
- package/dist/esm/workspace-scope/resolve-homes.js +62 -0
- package/dist/esm/workspace-scope/resolve-homes.js.map +1 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts +211 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.js +113 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -0
- package/dist/esm/workspace-scope/workspace-scope-detector.d.ts +10 -5
- package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope-detector.js +22 -36
- package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts +147 -58
- package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.js +174 -78
- package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +31 -17
- package/dist/esm/credentials/credentials-provisioner.service.d.ts +0 -190
- package/dist/esm/credentials/credentials-provisioner.service.d.ts.map +0 -1
- package/dist/esm/credentials/credentials-provisioner.service.js +0 -278
- package/dist/esm/credentials/credentials-provisioner.service.js.map +0 -1
- package/dist/esm/infra-managers/infra-manager.models.d.ts +0 -146
- package/dist/esm/infra-managers/infra-manager.models.d.ts.map +0 -1
- package/dist/esm/infra-managers/infra-manager.models.js +0 -2
- package/dist/esm/infra-managers/infra-manager.models.js.map +0 -1
- package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts +0 -64
- package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/mongo-atlas-manager.service.js +0 -307
- package/dist/esm/infra-managers/mongo-atlas-manager.service.js.map +0 -1
- package/dist/esm/infra-managers/postgresql-manager.service.d.ts +0 -115
- package/dist/esm/infra-managers/postgresql-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/postgresql-manager.service.js +0 -403
- package/dist/esm/infra-managers/postgresql-manager.service.js.map +0 -1
- package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts +0 -64
- package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/rabbitmq-manager.service.js +0 -288
- package/dist/esm/infra-managers/rabbitmq-manager.service.js.map +0 -1
- package/dist/esm/infra-managers/redis-manager.service.d.ts +0 -78
- package/dist/esm/infra-managers/redis-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/redis-manager.service.js +0 -326
- package/dist/esm/infra-managers/redis-manager.service.js.map +0 -1
- package/dist/esm/project-config/define-infra-config.d.ts +0 -128
- package/dist/esm/project-config/define-infra-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-infra-config.js +0 -87
- package/dist/esm/project-config/define-infra-config.js.map +0 -1
- package/dist/esm/project-config/define-platform-config.d.ts +0 -65
- package/dist/esm/project-config/define-platform-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-platform-config.js +0 -22
- package/dist/esm/project-config/define-platform-config.js.map +0 -1
- package/dist/esm/project-config/define-platform-env-config.d.ts +0 -41
- package/dist/esm/project-config/define-platform-env-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-platform-env-config.js +0 -45
- package/dist/esm/project-config/define-platform-env-config.js.map +0 -1
- package/dist/esm/project-config/define-project-config.d.ts +0 -38
- package/dist/esm/project-config/define-project-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-project-config.js +0 -57
- package/dist/esm/project-config/define-project-config.js.map +0 -1
- package/dist/esm/project-config/define-sharing-policy.d.ts +0 -35
- package/dist/esm/project-config/define-sharing-policy.d.ts.map +0 -1
- package/dist/esm/project-config/define-sharing-policy.js +0 -30
- package/dist/esm/project-config/define-sharing-policy.js.map +0 -1
- package/dist/esm/project-config/sharing-policy-validation.d.ts +0 -40
- package/dist/esm/project-config/sharing-policy-validation.d.ts.map +0 -1
- package/dist/esm/project-config/sharing-policy-validation.js +0 -143
- package/dist/esm/project-config/sharing-policy-validation.js.map +0 -1
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts +0 -23
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts.map +0 -1
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js +0 -13
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js.map +0 -1
- package/src/bootstrap/application-backend-env.contracts.ts +0 -17
- package/src/bootstrap/bootstrap-planner.ts +0 -46
- package/src/bootstrap/bootstrap.contracts.ts +0 -251
- package/src/bootstrap/bootstrap.schemas.ts +0 -164
- package/src/bootstrap/platform-runtime-env.contracts.ts +0 -99
- package/src/bootstrap/runtime-topology.contracts.ts +0 -102
- package/src/credentials/credential-generator.service.ts +0 -39
- package/src/index.ts +0 -16
- package/src/project-config/__tests__/application-modules.utils.test.ts +0 -53
- package/src/project-config/__tests__/define-framework-config.test.ts +0 -43
- package/src/project-config/__tests__/define-saas-config.test.ts +0 -210
- package/src/project-config/__tests__/loader.test.ts +0 -100
- package/src/project-config/define-framework-config.ts +0 -44
- package/src/project-config/define-infra-config.ts +0 -168
- package/src/project-config/define-minion-config.ts +0 -27
- package/src/project-config/define-platform-config.ts +0 -28
- package/src/project-config/define-platform-env-config.ts +0 -59
- package/src/project-config/define-project-config.ts +0 -63
- package/src/project-config/define-saas-config.ts +0 -171
- package/src/project-config/define-sharing-policy.ts +0 -36
- package/src/project-config/define-worker-config.ts +0 -27
- package/src/project-config/index.ts +0 -23
- package/src/project-config/loader.ts +0 -220
- package/src/project-config/shared/application-modules.schemas.ts +0 -12
- package/src/project-config/shared/application-modules.utils.ts +0 -65
- package/src/project-config/shared/backing-services.schemas.ts +0 -59
- package/src/project-config/shared/data-services.schemas.ts +0 -58
- package/src/project-config/shared/env-example-defaults.ts +0 -50
- package/src/project-config/shared/environment.schemas.ts +0 -136
- package/src/project-config/shared/infrastructure-defaults.schemas.ts +0 -47
- package/src/project-config/shared/k8s-utils.ts +0 -56
- package/src/project-config/shared/platform-services.schemas.ts +0 -33
- package/src/project-config/shared/service-definitions.schemas.ts +0 -38
- package/src/project-config/sharing-policy-validation.ts +0 -159
- package/src/release/framework-release.constants.ts +0 -2
- package/src/schemas/__tests__/platform-config.schemas.test.ts +0 -90
- package/src/schemas/framework-info.schemas.ts +0 -13
- package/src/schemas/framework-secrets.schemas.ts +0 -19
- package/src/schemas/platform-application-config.schemas.ts +0 -25
- package/src/schemas/platform-application-secrets.schemas.ts +0 -78
- package/src/schemas/platform-config.schemas.ts +0 -45
- package/src/workspace-scope/index.ts +0 -2
- package/src/workspace-scope/workspace-scope-detector.ts +0 -98
- package/src/workspace-scope/workspace-scope.schemas.ts +0 -224
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"bootstrap.schemas.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/bootstrap.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mCAAmC,EAExC,KAAK,sBAAsB,EAC3B,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAML,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC9B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,eAAe,EAIhB,MAAM,sDAAsD,CAAC;AAK9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAE9E;;;GAGG;AACH,oBAAY,qBAAqB;IAC/B,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;GAGG;AACH,oBAAY,eAAe;IACzB,mBAAmB,wBAAwB;IAC3C,kBAAkB,uBAAuB;IACzC,2BAA2B,gCAAgC;IAC3D,0BAA0B,+BAA+B;IACzD,mBAAmB,wBAAwB;CAC5C;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;;iBAKxC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;;;iBAKhD,CAAC;AAEH,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE;QACH,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,MAAM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AM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { AppConfiguration_Shared_AppIdentity_Schema,
|
|
1
|
+
import { AppConfiguration_Shared_AppIdentity_Schema, FrontendServicesConfigSchema, RuntimeEnvironment, } from '@wildo-ai/saas-models';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
import { AppFrontendType } from '../project-config/shared/service-definitions.schemas.js';
|
|
3
|
+
import { EngineCapabilityActivationsSchema, MinionPlatformAccessCarriedSchema, MinionResourceAccessSchema, ProviderConfigurationsSchema, SaasConfigProvidersBlockSchema, } from '../project-config/define-saas-config.js';
|
|
4
|
+
import { AppFrontendType, DataAccessSchema, ResourceLimitsSchema, WorkerRuntimeSchema, } from '../project-config/shared/service-definitions.schemas.js';
|
|
5
|
+
import { WorkerAuthSchema, WorkerHttpSchema, } from '../project-config/define-worker-config.js';
|
|
6
|
+
import { WildoAuthConfigSchema } from '../project-config/shared/auth.schemas.js';
|
|
7
|
+
import { DatabaseEngine } from '../project-config/shared/environment.schemas.js';
|
|
5
8
|
/**
|
|
6
9
|
* Shared bootstrap execution mode.
|
|
7
10
|
* The workflow semantics stay the same; only the executor differs.
|
|
@@ -31,7 +34,7 @@ export const AppBootstrapCredentialsSchema = z.object({
|
|
|
31
34
|
APPLICATION_ID: z.string().min(1),
|
|
32
35
|
PLATFORM_APPLICATION_PRIMARY_SECRET: z.string().min(1),
|
|
33
36
|
PLATFORM_APPS_MANAGER_URL: z.url(),
|
|
34
|
-
APPLICATION_ENV: z.
|
|
37
|
+
APPLICATION_ENV: z.enum(RuntimeEnvironment),
|
|
35
38
|
});
|
|
36
39
|
/**
|
|
37
40
|
* Shared response envelope returned by apps-manager when bootstrap credentials are requested.
|
|
@@ -42,9 +45,88 @@ export const AppBootstrapCredentialsSchema = z.object({
|
|
|
42
45
|
export const AppBootstrapCredentialsResponseSchema = z.object({
|
|
43
46
|
success: z.literal(true),
|
|
44
47
|
appSlug: z.string().min(1),
|
|
45
|
-
environment: z.
|
|
48
|
+
environment: z.enum(RuntimeEnvironment),
|
|
46
49
|
credentials: AppBootstrapCredentialsSchema,
|
|
47
50
|
});
|
|
51
|
+
const AdminAppManagedMinionsSchema = z.record(z.string().min(1), z.object({
|
|
52
|
+
resourceAccess: MinionResourceAccessSchema.optional(),
|
|
53
|
+
/**
|
|
54
|
+
* R4/R5 platform-access axis. Independent of `resourceAccess` (D12) — a
|
|
55
|
+
* minion may hold either, both, or neither. apps-manager reads this to
|
|
56
|
+
* decide whether to mint a principal-scoped attestation at all, and
|
|
57
|
+
* `buildOwnCronRecordFilter` reads it to decide whether the minion has any
|
|
58
|
+
* subject to query WITH, so a field dropped here confers nothing no matter
|
|
59
|
+
* what the author wrote.
|
|
60
|
+
*/
|
|
61
|
+
platformAccess: MinionPlatformAccessCarriedSchema.optional(),
|
|
62
|
+
/**
|
|
63
|
+
* KD-12 cron-tick path. When `mode === 'cron'` and `schedule` is
|
|
64
|
+
* provided, the backend-api's `cron-job-sync.backend.service.ts`
|
|
65
|
+
* registers a `MINION_TICK` CronJob record on
|
|
66
|
+
* `platform-crontabs-batches-manager` so the per-minion queue
|
|
67
|
+
* (`wildo.queue.{appId}.minion-tick.{minionName}`) actually fires
|
|
68
|
+
* on schedule.
|
|
69
|
+
*/
|
|
70
|
+
mode: z.enum(['always-up', 'cron']).optional(),
|
|
71
|
+
schedule: z.string().min(1).optional(),
|
|
72
|
+
})).default({});
|
|
73
|
+
const AdminAppManagedWorkersSchema = z.record(z.string().min(1), z.object({
|
|
74
|
+
name: z.string().min(1),
|
|
75
|
+
displayName: z.string().min(1),
|
|
76
|
+
description: z.string().optional(),
|
|
77
|
+
runtime: WorkerRuntimeSchema,
|
|
78
|
+
http: WorkerHttpSchema,
|
|
79
|
+
auth: WorkerAuthSchema,
|
|
80
|
+
replicas: z.number().int().positive(),
|
|
81
|
+
resources: ResourceLimitsSchema.optional(),
|
|
82
|
+
dataAccess: DataAccessSchema.optional(),
|
|
83
|
+
})).default({});
|
|
84
|
+
/**
|
|
85
|
+
* Admin-side projection of `wildo.saas.config.ts` carried from the CLI to
|
|
86
|
+
* apps-manager at app initialization / re-apply time.
|
|
87
|
+
*
|
|
88
|
+
* Cross-bucket trust asymmetry (Slice 3 closeout):
|
|
89
|
+
* Fields in this schema fall into TWO TRUST BUCKETS that the apps-manager
|
|
90
|
+
* treats differently:
|
|
91
|
+
*
|
|
92
|
+
* 1. AUTHORITATIVE bucket (always honored, write-through):
|
|
93
|
+
* - `app.name` / `app.slug` / `app.displayName` / `app.description`
|
|
94
|
+
* — `appIdentity` core (F-53 swap: `app.name` is the canonical
|
|
95
|
+
* identifier, `app.displayName` is the UI label only).
|
|
96
|
+
* - `frontendServices` — frontend service registry (consumed by
|
|
97
|
+
* `_merge_WildoApplicationConfig` to materialise endpoints).
|
|
98
|
+
* - `minions` — minion runtime inventory, currently carrying the
|
|
99
|
+
* per-minion `resourceAccess` authority whitelist used by
|
|
100
|
+
* `start-minion-application`.
|
|
101
|
+
* - `workers` — worker runtime inventory persisted by apps-manager so
|
|
102
|
+
* the control-plane can validate worker identity and serve the
|
|
103
|
+
* worker bootstrap contract without re-reading authored files.
|
|
104
|
+
* - `engineCapabilities`, `providers`, and `providerConfigurations`
|
|
105
|
+
* — the provider runtime graph and its non-secret settings.
|
|
106
|
+
*
|
|
107
|
+
* 2. POLICY bucket (governed by override semantics):
|
|
108
|
+
* - currently empty for provider registration. Capability activation
|
|
109
|
+
* is authored as `engineCapabilities`, while provider routing is
|
|
110
|
+
* materialized into `providers`.
|
|
111
|
+
*
|
|
112
|
+
* What is intentionally NOT here (out of bucket):
|
|
113
|
+
* - JWT TTLs (`accessTokenExpirationMinutes`/`refreshTokenExpirationDays`)
|
|
114
|
+
* travel via the SIBLING field `serviceAuth` on the request envelope
|
|
115
|
+
* (see `AdminAppInitializeRequestSchema.serviceAuth`), NOT here.
|
|
116
|
+
* This separation reflects that JWT TTLs are infra-environment policy
|
|
117
|
+
* sourced from `wildo.infra.<env>.config.ts`, while
|
|
118
|
+
* `managedDeclaration` projects the application-level
|
|
119
|
+
* `wildo.saas.config.ts`.
|
|
120
|
+
* - `dataServices.*` (Redis key prefix, S3 bucket prefix, etc.) — these
|
|
121
|
+
* flow through `PlatformEnvConfigJson` env wiring, not the admin
|
|
122
|
+
* declaration. The declaration carries application-level semantics
|
|
123
|
+
* only.
|
|
124
|
+
*
|
|
125
|
+
* If you ADD a field, decide explicitly which bucket it belongs to and
|
|
126
|
+
* document it in the merge service's JSDoc — silently widening the
|
|
127
|
+
* declaration without consumer-side handling is the documented failure
|
|
128
|
+
* mode this comment exists to prevent.
|
|
129
|
+
*/
|
|
48
130
|
export const AdminAppManagedDeclarationSchema = z.object({
|
|
49
131
|
app: z.object({
|
|
50
132
|
name: z.string().min(1),
|
|
@@ -57,59 +139,280 @@ export const AdminAppManagedDeclarationSchema = z.object({
|
|
|
57
139
|
serviceName: z.string().min(1),
|
|
58
140
|
frontendType: z.enum(AppFrontendType),
|
|
59
141
|
})).default([]),
|
|
60
|
-
|
|
61
|
-
|
|
142
|
+
minions: AdminAppManagedMinionsSchema,
|
|
143
|
+
workers: AdminAppManagedWorkersSchema,
|
|
144
|
+
engineCapabilities: EngineCapabilityActivationsSchema,
|
|
145
|
+
providers: SaasConfigProvidersBlockSchema,
|
|
146
|
+
providerConfigurations: ProviderConfigurationsSchema,
|
|
62
147
|
});
|
|
148
|
+
/**
|
|
149
|
+
* WHEN an application's OWN database gets its bootstrap rows, relative to the schema those rows need.
|
|
150
|
+
*
|
|
151
|
+
* ## The circularity this vocabulary exists to break
|
|
152
|
+
*
|
|
153
|
+
* On MongoDB, seeding an application's database needed no schema — a collection springs into being on
|
|
154
|
+
* first write — so provisioning could create the database and its first rows in one uninterrupted
|
|
155
|
+
* step. PostgreSQL removed that luxury and exposed a genuine cycle that had always been latent:
|
|
156
|
+
*
|
|
157
|
+
* - apps-manager seeds the application's database during provisioning;
|
|
158
|
+
* - those rows need tables, which come from the application's OWN `migrations/` directory;
|
|
159
|
+
* - those migrations are applied by the application backend at boot
|
|
160
|
+
* (`applyStartupPostgresMigrations`, the production door);
|
|
161
|
+
* - and the backend cannot boot until it is seeded, because its execution-context creator requires
|
|
162
|
+
* exactly one APPLICATION row.
|
|
163
|
+
*
|
|
164
|
+
* Nothing inside that circle can break it. apps-manager cannot read the application's migration files
|
|
165
|
+
* — in production they ship inside the application's own image — and the backend cannot supply the
|
|
166
|
+
* seed, which is authored in `wildo.saas.config.ts`. Only the DEPLOY TOOLING holds both, which is why
|
|
167
|
+
* this is a two-phase contract rather than a retry, a tolerance, or a longer timeout.
|
|
168
|
+
*
|
|
169
|
+
* Observed 2026-08-23 on the first PostgreSQL install: provisioning aborted with
|
|
170
|
+
* `relation "applications" does not exist`, and `wildo local dev` failed. The same order holds on
|
|
171
|
+
* every lane, so per-application PostgreSQL provisioning had never completed anywhere.
|
|
172
|
+
*
|
|
173
|
+
* ## Why a request field rather than an inferred tolerance
|
|
174
|
+
*
|
|
175
|
+
* Making apps-manager silently skip seeding when the schema happens to be absent would be a
|
|
176
|
+
* fail-open: provisioning would report success having left the application unbootable, and the caller
|
|
177
|
+
* would have no way to tell a deferred seed from a completed one. The caller states its intent, and
|
|
178
|
+
* the response states what happened — see {@link AppDatabaseSeedingOutcome}.
|
|
179
|
+
*/
|
|
180
|
+
export var AppDatabaseSeedingPhase;
|
|
181
|
+
(function (AppDatabaseSeedingPhase) {
|
|
182
|
+
/**
|
|
183
|
+
* Seed now. The default, and the ONLY behaviour any pre-2026-08-23 caller can produce, so every
|
|
184
|
+
* MongoDB lane and every older CLI is unchanged.
|
|
185
|
+
*/
|
|
186
|
+
AppDatabaseSeedingPhase["REQUIRED"] = "REQUIRED";
|
|
187
|
+
/**
|
|
188
|
+
* Provision infrastructure and platform records, but do NOT seed the application's own database —
|
|
189
|
+
* the caller is about to create its schema and will then re-invoke with {@link REQUIRED}.
|
|
190
|
+
*/
|
|
191
|
+
AppDatabaseSeedingPhase["DEFERRED"] = "DEFERRED";
|
|
192
|
+
})(AppDatabaseSeedingPhase || (AppDatabaseSeedingPhase = {}));
|
|
193
|
+
/**
|
|
194
|
+
* What provisioning actually DID about the application's own bootstrap rows.
|
|
195
|
+
*
|
|
196
|
+
* Reported so a caller can never mistake a deferred seed for a completed one. The CLI treats
|
|
197
|
+
* {@link DEFERRED} as expected on its first phase and FATAL on its second — an application that is
|
|
198
|
+
* still unseeded after its migrations have been applied is a defect, not a state to tolerate.
|
|
199
|
+
*/
|
|
200
|
+
export var AppDatabaseSeedingOutcome;
|
|
201
|
+
(function (AppDatabaseSeedingOutcome) {
|
|
202
|
+
/** Bootstrap rows exist in the application's own database. */
|
|
203
|
+
AppDatabaseSeedingOutcome["SEEDED"] = "SEEDED";
|
|
204
|
+
/** Skipped because the caller asked for {@link AppDatabaseSeedingPhase.DEFERRED}. */
|
|
205
|
+
AppDatabaseSeedingOutcome["DEFERRED"] = "DEFERRED";
|
|
206
|
+
/**
|
|
207
|
+
* Skipped because the application has no resolved persistence target. Distinct from
|
|
208
|
+
* {@link DEFERRED}: nothing the caller does next will seed it — the target itself is missing.
|
|
209
|
+
*/
|
|
210
|
+
AppDatabaseSeedingOutcome["NO_PERSISTENCE_TARGET"] = "NO_PERSISTENCE_TARGET";
|
|
211
|
+
})(AppDatabaseSeedingOutcome || (AppDatabaseSeedingOutcome = {}));
|
|
63
212
|
export const AppBootstrapFirstAdminSeedSchema = z.object({
|
|
64
213
|
userTypes: z.array(z.string().min(1)).min(1),
|
|
65
214
|
});
|
|
66
215
|
const AppBootstrapRotatedPublicKeyEntrySchema = z.object({
|
|
67
216
|
kid: z.string().min(1),
|
|
68
217
|
publicKey: z.string().min(1),
|
|
218
|
+
/** Last observation/token instant this retired key may authenticate. */
|
|
219
|
+
notAfter: z.coerce.date().optional(),
|
|
69
220
|
});
|
|
70
221
|
export const AppBootstrapConfigMetadataResponseSchema = z.object({
|
|
71
222
|
appSlug: z.string().min(1),
|
|
72
223
|
appIdentity: AppConfiguration_Shared_AppIdentity_Schema.optional(),
|
|
73
224
|
frontendServices: FrontendServicesConfigSchema.optional(),
|
|
74
|
-
|
|
225
|
+
minions: AdminAppManagedMinionsSchema.optional(),
|
|
226
|
+
workers: AdminAppManagedWorkersSchema.optional(),
|
|
227
|
+
engineCapabilities: EngineCapabilityActivationsSchema.optional(),
|
|
228
|
+
providers: SaasConfigProvidersBlockSchema.optional(),
|
|
75
229
|
email: z.object({
|
|
76
230
|
isTransactionalWildoManaged: z.boolean(),
|
|
77
231
|
isMarketingWildoManaged: z.boolean(),
|
|
78
232
|
}).optional(),
|
|
79
|
-
|
|
233
|
+
providerConfigurations: ProviderConfigurationsSchema,
|
|
80
234
|
jwt: z.object({
|
|
81
235
|
publicKey: z.record(z.string(), z.string()),
|
|
82
236
|
rotatedPublicKeys: z.record(z.string(), z.array(AppBootstrapRotatedPublicKeyEntrySchema)).optional(),
|
|
237
|
+
/**
|
|
238
|
+
* Operator-authored JWT TTLs (Slice 3.3 hardening, F-24 / closeout).
|
|
239
|
+
*
|
|
240
|
+
* Sourced from `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,
|
|
241
|
+
* refreshTokenExpirationDays}` (which itself was seeded from
|
|
242
|
+
* `serviceAuth` in `wildo.infra.<env>.config.ts` at apps-manager init
|
|
243
|
+
* time, falling back to `WildoAuthConfigSchema` defaults of 15 min /
|
|
244
|
+
* 30 days when omitted \u2014 access-token default tightened from 60
|
|
245
|
+
* \u2192 15 in Auth-hardening Slice A Step 5 on 2026-04-13; see the
|
|
246
|
+
* file-level JSDoc on `auth.schemas.ts` for the threat-model rationale).
|
|
247
|
+
* The application backend MUST consume these values at sign time
|
|
248
|
+
* (`AuthTokenIssuerBackendService.issueAccessToken`,
|
|
249
|
+
* `JwtBackendService.createRefreshToken`) instead of falling back to
|
|
250
|
+
* developer-authored constants in `saas-config.backend.ts`.
|
|
251
|
+
*
|
|
252
|
+
* REQUIRED on the response (Slice 3 closeout): `_getDefault_WildoApplicationConfig`
|
|
253
|
+
* always seeds these via `WildoAuthConfigSchema.parse(serviceAuth ?? {})`
|
|
254
|
+
* (15 min / 30 days defaults), so any persisted
|
|
255
|
+
* `Wildo_Application_Config.jwt` block has both fields populated.
|
|
256
|
+
* Marking them required here lets the consumer
|
|
257
|
+
* (`app-configuration-loader.backend.service.ts`) drop the
|
|
258
|
+
* `accessTokenExpirationMinutes !== undefined ? ... : {}` defensive
|
|
259
|
+
* spread and treat them as guaranteed values.
|
|
260
|
+
*/
|
|
261
|
+
accessTokenExpirationMinutes: z.number().int().positive(),
|
|
262
|
+
refreshTokenExpirationDays: z.number().int().positive(),
|
|
83
263
|
}).optional(),
|
|
84
264
|
});
|
|
265
|
+
export const AppWorkerBootstrapResponseSchema = z.object({
|
|
266
|
+
appSlug: z.string().min(1),
|
|
267
|
+
workerName: z.string().min(1),
|
|
268
|
+
worker: z.object({
|
|
269
|
+
name: z.string().min(1),
|
|
270
|
+
displayName: z.string().min(1),
|
|
271
|
+
description: z.string().optional(),
|
|
272
|
+
runtime: WorkerRuntimeSchema,
|
|
273
|
+
http: WorkerHttpSchema,
|
|
274
|
+
auth: WorkerAuthSchema,
|
|
275
|
+
replicas: z.number().int().positive(),
|
|
276
|
+
resources: ResourceLimitsSchema.optional(),
|
|
277
|
+
dataAccess: DataAccessSchema.optional(),
|
|
278
|
+
}),
|
|
279
|
+
jwt: z.object({
|
|
280
|
+
publicKey: z.string().min(1),
|
|
281
|
+
rotatedPublicKeys: z.array(AppBootstrapRotatedPublicKeyEntrySchema).optional(),
|
|
282
|
+
}),
|
|
283
|
+
});
|
|
85
284
|
/**
|
|
86
285
|
* Shared admin request payload for a single app initialization.
|
|
87
|
-
*
|
|
88
|
-
*
|
|
286
|
+
*
|
|
287
|
+
* This describes the control-plane contract, independently of whether the
|
|
288
|
+
* caller is the CLI or a future CI/CD executor.
|
|
289
|
+
*
|
|
290
|
+
* Required-by-contract fields:
|
|
291
|
+
* - `managedDeclaration` — the projection of `wildo.saas.config.ts` that
|
|
292
|
+
* seeds frontend services, capability policy, and external providers.
|
|
293
|
+
* Omitting it would silently half-bootstrap an app, so the admin HTTP
|
|
294
|
+
* boundary rejects requests without it.
|
|
295
|
+
* - `userEmail` / `userFirstName` / `userLastName` — admin identity for
|
|
296
|
+
* the seeded super-admin user. The previous implementation defaulted
|
|
297
|
+
* these to a developer's personal identity, silently bypassing the
|
|
298
|
+
* downstream `validateInitializationOptions` validation; that bypass
|
|
299
|
+
* is now closed at the contract boundary.
|
|
300
|
+
*
|
|
301
|
+
* Optional-by-design fields:
|
|
302
|
+
* - `userPassword` — the service auto-generates a secure password when
|
|
303
|
+
* omitted (intentional one-shot bootstrap affordance).
|
|
304
|
+
* - `name` / `appDatabaseName` / `override` / `firstAdminSeed` — caller
|
|
305
|
+
* overrides; sensible defaults exist downstream.
|
|
89
306
|
*/
|
|
90
307
|
export const AdminAppInitializeRequestSchema = z.object({
|
|
91
308
|
name: z.string().min(1).optional(),
|
|
92
309
|
appDatabaseName: z.string().min(1).optional(),
|
|
93
310
|
override: z.boolean().optional(),
|
|
94
|
-
userEmail: z.
|
|
95
|
-
userFirstName: z.string().min(1)
|
|
96
|
-
userLastName: z.string().min(1)
|
|
311
|
+
userEmail: z.email(),
|
|
312
|
+
userFirstName: z.string().min(1),
|
|
313
|
+
userLastName: z.string().min(1),
|
|
97
314
|
userPassword: z.string().min(1).optional(),
|
|
98
|
-
managedDeclaration: AdminAppManagedDeclarationSchema
|
|
315
|
+
managedDeclaration: AdminAppManagedDeclarationSchema,
|
|
316
|
+
/**
|
|
317
|
+
* Which store this application's own resources persist to — mirrored from the authored
|
|
318
|
+
* `applicationDatabase` in `wildo.infra.<env>.config.ts`, and carried under the SAME name so the
|
|
319
|
+
* value is traceable end to end by one word.
|
|
320
|
+
*
|
|
321
|
+
* ## Why this field had to be added
|
|
322
|
+
*
|
|
323
|
+
* apps-manager already held the entire per-application PostgreSQL path: `mintAppCredentials`
|
|
324
|
+
* provisioning the database, role and password, plus the `defaultAdapter` and `resourceIdFormat`
|
|
325
|
+
* branches of the stored application config. All three were gated on
|
|
326
|
+
* `WildoApplicationInitOptions.usePostgreSQL`, and on 2026-08-19 a repo-wide search found that flag
|
|
327
|
+
* had FOUR mentions in the whole codebase — one declaration and three reads, in a single file.
|
|
328
|
+
* **Nothing ever set it.**
|
|
329
|
+
*
|
|
330
|
+
* So the capability had no door. `backingServices.postgresql` had been authored for some time and
|
|
331
|
+
* no application role ever appeared in `pg_roles`, because the declaration had no path to the
|
|
332
|
+
* provisioner. This field is that path.
|
|
333
|
+
*
|
|
334
|
+
* OPTIONAL, and absence means MongoDB — matching
|
|
335
|
+
* `ApplicationBackendDataEnvKeys.DATABASE_DEFAULT_ADAPTER`'s own default, so an older CLI that does
|
|
336
|
+
* not send it keeps exactly the behaviour every existing application already has.
|
|
337
|
+
*/
|
|
338
|
+
applicationDatabase: z.object({
|
|
339
|
+
engine: z.enum(DatabaseEngine),
|
|
340
|
+
/**
|
|
341
|
+
* The AUTHORED database name, from `backingServices.postgresql.database`.
|
|
342
|
+
*
|
|
343
|
+
* Sent because two sources were naming this database and disagreeing: the provisioner derives
|
|
344
|
+
* `wildo_<sanitized-slug>` while `env-vars-builder` emits the authored name as
|
|
345
|
+
* `POSTGRESQL_DATABASE`. On 2026-08-19 that produced `wildo_wonder_todos` (owned by the app role)
|
|
346
|
+
* beside `wonder-todos-db` (what the backend was told to connect to) — both empty, so the
|
|
347
|
+
* application would have opened a database it did not own while its grants landed elsewhere.
|
|
348
|
+
*
|
|
349
|
+
* The authored value wins: it is the git-borne declaration, it is what the env already carries,
|
|
350
|
+
* and the provisioner has always accepted an override — the caller simply never passed one.
|
|
351
|
+
*/
|
|
352
|
+
databaseName: z.string().min(1).optional(),
|
|
353
|
+
}).optional(),
|
|
99
354
|
firstAdminSeed: AppBootstrapFirstAdminSeedSchema.optional(),
|
|
355
|
+
/**
|
|
356
|
+
* WHEN to seed this application's own database — see {@link AppDatabaseSeedingPhase}.
|
|
357
|
+
*
|
|
358
|
+
* OPTIONAL, and absence means `REQUIRED`, so a CLI that predates the two-phase contract keeps
|
|
359
|
+
* exactly the single-phase behaviour every MongoDB application already has.
|
|
360
|
+
*/
|
|
361
|
+
appDatabaseSeeding: z.enum(AppDatabaseSeedingPhase).optional(),
|
|
362
|
+
/**
|
|
363
|
+
* Authored `serviceAuth` projection from `wildo.infra.<env>.config.ts`,
|
|
364
|
+
* threaded by the CLI so apps-manager can seed
|
|
365
|
+
* `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,
|
|
366
|
+
* refreshTokenExpirationDays}` from the operator's policy instead of a
|
|
367
|
+
* hardcoded constant. When omitted (older CLI, or infra file that does
|
|
368
|
+
* not author `serviceAuth`), apps-manager applies the
|
|
369
|
+
* `WildoAuthConfigSchema` defaults (15 min / 30 days as of Auth-hardening
|
|
370
|
+
* Slice A Step 5 on 2026-04-13; pre-Slice-A the access-token default
|
|
371
|
+
* was 60 min) at init time via `WildoAuthConfigSchema.parse({})`.
|
|
372
|
+
*/
|
|
373
|
+
serviceAuth: WildoAuthConfigSchema.optional(),
|
|
100
374
|
});
|
|
375
|
+
/**
|
|
376
|
+
* Per-target payload inside a batch admin initialization request.
|
|
377
|
+
*
|
|
378
|
+
* `managedDeclaration` is required for the same contract reason as in
|
|
379
|
+
* `AdminAppInitializeRequestSchema`. Admin identity lives at the batch
|
|
380
|
+
* envelope level (one admin user across all targets), not per target.
|
|
381
|
+
*/
|
|
101
382
|
export const AdminAppInitializeTargetSchema = z.object({
|
|
102
383
|
slug: z.string().min(1),
|
|
103
384
|
name: z.string().min(1).optional(),
|
|
104
385
|
appDatabaseName: z.string().min(1).optional(),
|
|
105
|
-
managedDeclaration: AdminAppManagedDeclarationSchema
|
|
386
|
+
managedDeclaration: AdminAppManagedDeclarationSchema,
|
|
387
|
+
/**
|
|
388
|
+
* Per-target application persistence selection. Same shape and same meaning as
|
|
389
|
+
* {@link AdminAppInitializeRequestSchema}'s field of this name — read that one for why the
|
|
390
|
+
* selection must be authored rather than inferred from which backing services are declared.
|
|
391
|
+
*/
|
|
392
|
+
applicationDatabase: z.object({
|
|
393
|
+
engine: z.enum(DatabaseEngine),
|
|
394
|
+
databaseName: z.string().min(1).optional(),
|
|
395
|
+
}).optional(),
|
|
106
396
|
firstAdminSeed: AppBootstrapFirstAdminSeedSchema.optional(),
|
|
397
|
+
/**
|
|
398
|
+
* Per-target `serviceAuth` projection. Today every target in a batch
|
|
399
|
+
* shares the same infra-authored `serviceAuth` (one infra file per env),
|
|
400
|
+
* but the field is per-target rather than batch-level so a future
|
|
401
|
+
* targeted override (e.g. preview-app with a longer access TTL) can land
|
|
402
|
+
* without breaking the contract. See
|
|
403
|
+
* {@link AdminAppInitializeRequestSchema.serviceAuth} for full semantics.
|
|
404
|
+
*/
|
|
405
|
+
serviceAuth: WildoAuthConfigSchema.optional(),
|
|
107
406
|
});
|
|
407
|
+
/**
|
|
408
|
+
* Batch admin initialization envelope. Admin identity is required at the
|
|
409
|
+
* envelope level (the seeded admin user is shared across all targets).
|
|
410
|
+
*/
|
|
108
411
|
export const AdminAppsInitializeBatchRequestSchema = z.object({
|
|
109
412
|
override: z.boolean().optional(),
|
|
110
|
-
userEmail: z.
|
|
111
|
-
userFirstName: z.string().min(1)
|
|
112
|
-
userLastName: z.string().min(1)
|
|
413
|
+
userEmail: z.email(),
|
|
414
|
+
userFirstName: z.string().min(1),
|
|
415
|
+
userLastName: z.string().min(1),
|
|
113
416
|
userPassword: z.string().min(1).optional(),
|
|
114
417
|
targets: z.array(AdminAppInitializeTargetSchema).min(1),
|
|
115
418
|
});
|
|
@@ -123,8 +426,67 @@ export const AdminAppInitializeResponseSchema = z.object({
|
|
|
123
426
|
slug: z.string().min(1),
|
|
124
427
|
}),
|
|
125
428
|
credentials: z.object({
|
|
126
|
-
email: z.
|
|
429
|
+
email: z.email(),
|
|
127
430
|
password: z.string().min(1),
|
|
128
431
|
}),
|
|
432
|
+
/**
|
|
433
|
+
* What provisioning did about the application's own bootstrap rows — see
|
|
434
|
+
* {@link AppDatabaseSeedingOutcome}.
|
|
435
|
+
*
|
|
436
|
+
* OPTIONAL so a CLI can still parse a response from an apps-manager that predates the two-phase
|
|
437
|
+
* contract. A caller that DEPENDS on the two-phase flow must treat absence as "unknown" and say
|
|
438
|
+
* so, never as `SEEDED`.
|
|
439
|
+
*/
|
|
440
|
+
appDatabaseSeeding: z.enum(AppDatabaseSeedingOutcome).optional(),
|
|
441
|
+
});
|
|
442
|
+
/**
|
|
443
|
+
* Shared admin request payload for reapplying the `wildo.saas.config.ts`
|
|
444
|
+
* declaration projection (`AdminAppManagedDeclaration`) onto an
|
|
445
|
+
* already-initialized application.
|
|
446
|
+
*
|
|
447
|
+
* Contract semantics — what this endpoint owns:
|
|
448
|
+
* - Re-source the declaration-managed slices of `Wildo_Application_Config`
|
|
449
|
+
* from the new declaration: `appIdentity` display fields,
|
|
450
|
+
* `frontendServices` seed, `engineCapabilities`, `providers`, and
|
|
451
|
+
* `providerConfigurations`.
|
|
452
|
+
* - Return a `updatedFields` diff so the caller can surface what changed.
|
|
453
|
+
*
|
|
454
|
+
* Contract semantics — what this endpoint deliberately does NOT touch:
|
|
455
|
+
* - Credentials (DB users, JWT private keys, session secrets, admin
|
|
456
|
+
* passwords). Those live in `Wildo_Application_Secrets` and are owned
|
|
457
|
+
* by initialize / rotate flows.
|
|
458
|
+
* - Database / infrastructure provisioning. Those are owned by
|
|
459
|
+
* `/admin/apps/:appSlug/initialize` and the platform-init flow.
|
|
460
|
+
* - K8s endpoints. Those are owned by
|
|
461
|
+
* `/admin/apps/:appSlug/refresh` (config refresh) and the deploy flow.
|
|
462
|
+
* - First-admin seeding (`firstAdminSeed`). User/role seeding happens
|
|
463
|
+
* at init time only. Reapplying the declaration is a config-drift
|
|
464
|
+
* operation; silently changing seeded role grants would be a
|
|
465
|
+
* security regression. Callers wanting to change admin user types
|
|
466
|
+
* must use a dedicated admin-management endpoint (not this one).
|
|
467
|
+
*
|
|
468
|
+
* Stable action identifier: `apps.reapply-declaration` (see
|
|
469
|
+
* {@link APPS_REAPPLY_DECLARATION_ACTION_ID} in `bootstrap.contracts.ts`).
|
|
470
|
+
* The CI/CD admin rights workstream (Step 8) reuses this identifier in
|
|
471
|
+
* its permission grid so this endpoint can be granted independently
|
|
472
|
+
* from the broader `apps.initialize` action.
|
|
473
|
+
*/
|
|
474
|
+
export const AdminAppReapplyDeclarationRequestSchema = z.strictObject({
|
|
475
|
+
managedDeclaration: AdminAppManagedDeclarationSchema,
|
|
476
|
+
});
|
|
477
|
+
/**
|
|
478
|
+
* Shared success response for a managed-declaration reapply request.
|
|
479
|
+
*
|
|
480
|
+
* `updatedFields` lists the dot-paths of the declaration-projection
|
|
481
|
+
* slices that actually changed (e.g. `appIdentity.displayName`,
|
|
482
|
+
* `frontendServices`, `engineCapabilities`, `providers`).
|
|
483
|
+
* An empty list means the stored config already matched the new
|
|
484
|
+
* declaration — the operation is idempotent.
|
|
485
|
+
*/
|
|
486
|
+
export const AdminAppReapplyDeclarationResponseSchema = z.object({
|
|
487
|
+
success: z.literal(true),
|
|
488
|
+
appSlug: z.string().min(1),
|
|
489
|
+
updatedFields: z.array(z.string()),
|
|
490
|
+
appliedAt: z.string().datetime(),
|
|
129
491
|
});
|
|
130
|
-
//# sourceMappingURL=bootstrap.schemas.js.map
|
|
492
|
+
//# sourceMappingURL=bootstrap.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.schemas.js","sourceRoot":"","sources":["../../../src/bootstrap/bootstrap.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,EAC1C,8BAA8B,EAC9B,gBAAgB,EAChB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,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GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACxB,CAAC;IACF,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE;QAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAC5B,CAAC;IACF;;;;;;;OAOG;IACH,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,QAAQ,EAAE;CACjE,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,YAAY,CAAC;IACpE,kBAAkB,EAAE,gCAAgC;CACrD,CAAiD,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/D,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC","sourcesContent":["import {\n AppConfiguration_Shared_AppIdentity_Schema,\n type AppConfiguration_Shared_AppIdentity,\n FrontendServicesConfigSchema,\n type FrontendServicesConfig,\n RuntimeEnvironment,\n} from '@wildo-ai/saas-models';\nimport { z } from 'zod';\nimport {\n EngineCapabilityActivationsSchema,\n MinionPlatformAccessCarriedSchema,\n MinionResourceAccessSchema,\n ProviderConfigurationsSchema,\n SaasConfigProvidersBlockSchema,\n type EngineCapabilityActivations,\n type MinionPlatformAccessCarried,\n type MinionResourceAccess,\n type ProviderConfigurations,\n type SaasConfigProvidersBlock,\n} from '../project-config/define-saas-config';\nimport {\n AppFrontendType,\n DataAccessSchema,\n ResourceLimitsSchema,\n WorkerRuntimeSchema,\n} from '../project-config/shared/service-definitions.schemas';\nimport {\n WorkerAuthSchema,\n WorkerHttpSchema,\n} from '../project-config/define-worker-config';\nimport { WildoAuthConfigSchema } from '../project-config/shared/auth.schemas';\nimport { DatabaseEngine } from '../project-config/shared/environment.schemas';\n\n/**\n * Shared bootstrap execution mode.\n * The workflow semantics stay the same; only the executor differs.\n */\nexport enum BootstrapExecutorKind {\n LOCAL = 'local',\n REMOTE = 'remote',\n}\n\n/**\n * Shared bootstrap step identifiers.\n * These represent semantic workflow stages, not package-specific implementation details.\n */\nexport enum BootstrapStepId {\n INITIALIZE_PLATFORM = 'initialize-platform',\n ENSURE_APPLICATION = 'ensure-application',\n FETCH_BOOTSTRAP_CREDENTIALS = 'fetch-bootstrap-credentials',\n GENERATE_RUNTIME_ARTIFACTS = 'generate-runtime-artifacts',\n START_LOCAL_RUNTIME = 'start-local-runtime',\n}\n\n/**\n * Minimum bootstrap credentials required for an application backend to authenticate\n * with apps-manager and fetch its full runtime configuration.\n */\nexport const AppBootstrapCredentialsSchema = z.object({\n APPLICATION_ID: z.string().min(1),\n PLATFORM_APPLICATION_PRIMARY_SECRET: z.string().min(1),\n PLATFORM_APPS_MANAGER_URL: z.url(),\n APPLICATION_ENV: z.enum(RuntimeEnvironment),\n});\n\n/**\n * Shared response envelope returned by apps-manager when bootstrap credentials are requested.\n * Both apps-manager and CLI should rely on this same contract.\n * `environment` / `APPLICATION_ENV` describe runtime semantics for the\n * bootstrapped application process, not the project-level remote environment id.\n */\nexport const AppBootstrapCredentialsResponseSchema = z.object({\n success: z.literal(true),\n appSlug: z.string().min(1),\n environment: z.enum(RuntimeEnvironment),\n credentials: AppBootstrapCredentialsSchema,\n});\n\nexport interface AdminAppManagedDeclaration {\n app: {\n name: string;\n slug: string;\n displayName: string;\n description?: string;\n type: 'saas';\n };\n frontendServices: Array<{\n serviceName: string;\n frontendType: AppFrontendType;\n }>;\n minions: Record<string, {\n resourceAccess?: MinionResourceAccess;\n /** R4/R5 — what this minion may read about ITSELF at the platform level. Absent ⇒ nothing. */\n platformAccess?: MinionPlatformAccessCarried;\n /** KD-12 — `'cron'` minions paired with a `schedule` produce MINION_TICK CronJob records. */\n mode?: 'always-up' | 'cron';\n schedule?: string;\n }>;\n workers: Record<string, {\n name: string;\n displayName: string;\n description?: string;\n runtime: {\n type: string;\n language: string;\n };\n http: {\n port: number;\n healthPath: string;\n readyPath: string;\n metricsPath?: string;\n };\n auth: 'wildo-jwt';\n replicas: number;\n resources?: {\n cpu?: string;\n memory?: string;\n };\n dataAccess?: {\n database?: 'read-only' | 'read-write' | 'none';\n cache?: boolean;\n queue?: 'consumer' | 'producer' | 'both' | 'none';\n };\n }>;\n engineCapabilities: EngineCapabilityActivations;\n providers: SaasConfigProvidersBlock;\n providerConfigurations: ProviderConfigurations;\n}\n\nconst AdminAppManagedMinionsSchema = z.record(\n z.string().min(1),\n z.object({\n resourceAccess: MinionResourceAccessSchema.optional(),\n /**\n * R4/R5 platform-access axis. Independent of `resourceAccess` (D12) — a\n * minion may hold either, both, or neither. apps-manager reads this to\n * decide whether to mint a principal-scoped attestation at all, and\n * `buildOwnCronRecordFilter` reads it to decide whether the minion has any\n * subject to query WITH, so a field dropped here confers nothing no matter\n * what the author wrote.\n */\n platformAccess: MinionPlatformAccessCarriedSchema.optional(),\n /**\n * KD-12 cron-tick path. When `mode === 'cron'` and `schedule` is\n * provided, the backend-api's `cron-job-sync.backend.service.ts`\n * registers a `MINION_TICK` CronJob record on\n * `platform-crontabs-batches-manager` so the per-minion queue\n * (`wildo.queue.{appId}.minion-tick.{minionName}`) actually fires\n * on schedule.\n */\n mode: z.enum(['always-up', 'cron']).optional(),\n schedule: z.string().min(1).optional(),\n }),\n).default({});\n\nconst AdminAppManagedWorkersSchema = z.record(\n z.string().min(1),\n z.object({\n name: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n runtime: WorkerRuntimeSchema,\n http: WorkerHttpSchema,\n auth: WorkerAuthSchema,\n replicas: z.number().int().positive(),\n resources: ResourceLimitsSchema.optional(),\n dataAccess: DataAccessSchema.optional(),\n }),\n).default({});\n\n/**\n * Admin-side projection of `wildo.saas.config.ts` carried from the CLI to\n * apps-manager at app initialization / re-apply time.\n *\n * Cross-bucket trust asymmetry (Slice 3 closeout):\n * Fields in this schema fall into TWO TRUST BUCKETS that the apps-manager\n * treats differently:\n *\n * 1. AUTHORITATIVE bucket (always honored, write-through):\n * - `app.name` / `app.slug` / `app.displayName` / `app.description`\n * — `appIdentity` core (F-53 swap: `app.name` is the canonical\n * identifier, `app.displayName` is the UI label only).\n * - `frontendServices` — frontend service registry (consumed by\n * `_merge_WildoApplicationConfig` to materialise endpoints).\n * - `minions` — minion runtime inventory, currently carrying the\n * per-minion `resourceAccess` authority whitelist used by\n * `start-minion-application`.\n * - `workers` — worker runtime inventory persisted by apps-manager so\n * the control-plane can validate worker identity and serve the\n * worker bootstrap contract without re-reading authored files.\n * - `engineCapabilities`, `providers`, and `providerConfigurations`\n * — the provider runtime graph and its non-secret settings.\n *\n * 2. POLICY bucket (governed by override semantics):\n * - currently empty for provider registration. Capability activation\n * is authored as `engineCapabilities`, while provider routing is\n * materialized into `providers`.\n *\n * What is intentionally NOT here (out of bucket):\n * - JWT TTLs (`accessTokenExpirationMinutes`/`refreshTokenExpirationDays`)\n * travel via the SIBLING field `serviceAuth` on the request envelope\n * (see `AdminAppInitializeRequestSchema.serviceAuth`), NOT here.\n * This separation reflects that JWT TTLs are infra-environment policy\n * sourced from `wildo.infra.<env>.config.ts`, while\n * `managedDeclaration` projects the application-level\n * `wildo.saas.config.ts`.\n * - `dataServices.*` (Redis key prefix, S3 bucket prefix, etc.) — these\n * flow through `PlatformEnvConfigJson` env wiring, not the admin\n * declaration. The declaration carries application-level semantics\n * only.\n *\n * If you ADD a field, decide explicitly which bucket it belongs to and\n * document it in the merge service's JSDoc — silently widening the\n * declaration without consumer-side handling is the documented failure\n * mode this comment exists to prevent.\n */\nexport const AdminAppManagedDeclarationSchema = z.object({\n app: z.object({\n name: z.string().min(1),\n slug: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n type: z.literal('saas'),\n }),\n frontendServices: z.array(z.object({\n serviceName: z.string().min(1),\n frontendType: z.enum(AppFrontendType),\n })).default([]),\n minions: AdminAppManagedMinionsSchema,\n workers: AdminAppManagedWorkersSchema,\n engineCapabilities: EngineCapabilityActivationsSchema,\n providers: SaasConfigProvidersBlockSchema,\n providerConfigurations: ProviderConfigurationsSchema,\n}) as z.ZodType<AdminAppManagedDeclaration>;\n\n/**\n * WHEN an application's OWN database gets its bootstrap rows, relative to the schema those rows need.\n *\n * ## The circularity this vocabulary exists to break\n *\n * On MongoDB, seeding an application's database needed no schema — a collection springs into being on\n * first write — so provisioning could create the database and its first rows in one uninterrupted\n * step. PostgreSQL removed that luxury and exposed a genuine cycle that had always been latent:\n *\n * - apps-manager seeds the application's database during provisioning;\n * - those rows need tables, which come from the application's OWN `migrations/` directory;\n * - those migrations are applied by the application backend at boot\n * (`applyStartupPostgresMigrations`, the production door);\n * - and the backend cannot boot until it is seeded, because its execution-context creator requires\n * exactly one APPLICATION row.\n *\n * Nothing inside that circle can break it. apps-manager cannot read the application's migration files\n * — in production they ship inside the application's own image — and the backend cannot supply the\n * seed, which is authored in `wildo.saas.config.ts`. Only the DEPLOY TOOLING holds both, which is why\n * this is a two-phase contract rather than a retry, a tolerance, or a longer timeout.\n *\n * Observed 2026-08-23 on the first PostgreSQL install: provisioning aborted with\n * `relation \"applications\" does not exist`, and `wildo local dev` failed. The same order holds on\n * every lane, so per-application PostgreSQL provisioning had never completed anywhere.\n *\n * ## Why a request field rather than an inferred tolerance\n *\n * Making apps-manager silently skip seeding when the schema happens to be absent would be a\n * fail-open: provisioning would report success having left the application unbootable, and the caller\n * would have no way to tell a deferred seed from a completed one. The caller states its intent, and\n * the response states what happened — see {@link AppDatabaseSeedingOutcome}.\n */\nexport enum AppDatabaseSeedingPhase {\n /**\n * Seed now. The default, and the ONLY behaviour any pre-2026-08-23 caller can produce, so every\n * MongoDB lane and every older CLI is unchanged.\n */\n REQUIRED = 'REQUIRED',\n /**\n * Provision infrastructure and platform records, but do NOT seed the application's own database —\n * the caller is about to create its schema and will then re-invoke with {@link REQUIRED}.\n */\n DEFERRED = 'DEFERRED',\n}\n\n/**\n * What provisioning actually DID about the application's own bootstrap rows.\n *\n * Reported so a caller can never mistake a deferred seed for a completed one. The CLI treats\n * {@link DEFERRED} as expected on its first phase and FATAL on its second — an application that is\n * still unseeded after its migrations have been applied is a defect, not a state to tolerate.\n */\nexport enum AppDatabaseSeedingOutcome {\n /** Bootstrap rows exist in the application's own database. */\n SEEDED = 'SEEDED',\n /** Skipped because the caller asked for {@link AppDatabaseSeedingPhase.DEFERRED}. */\n DEFERRED = 'DEFERRED',\n /**\n * Skipped because the application has no resolved persistence target. Distinct from\n * {@link DEFERRED}: nothing the caller does next will seed it — the target itself is missing.\n */\n NO_PERSISTENCE_TARGET = 'NO_PERSISTENCE_TARGET',\n}\n\nexport const AppBootstrapFirstAdminSeedSchema = z.object({\n userTypes: z.array(z.string().min(1)).min(1),\n});\n\nconst AppBootstrapRotatedPublicKeyEntrySchema = z.object({\n kid: z.string().min(1),\n publicKey: z.string().min(1),\n /** Last observation/token instant this retired key may authenticate. */\n notAfter: z.coerce.date().optional(),\n});\n\nexport interface AppBootstrapConfigMetadataResponse {\n appSlug: string;\n appIdentity?: AppConfiguration_Shared_AppIdentity;\n frontendServices?: FrontendServicesConfig;\n minions?: Record<string, {\n resourceAccess?: MinionResourceAccess;\n /** R4/R5 — what this minion may read about ITSELF at the platform level. Absent ⇒ nothing. */\n platformAccess?: MinionPlatformAccessCarried;\n /** KD-12 — `'cron'` minions paired with a `schedule` produce MINION_TICK CronJob records. */\n mode?: 'always-up' | 'cron';\n schedule?: string;\n }>;\n workers?: Record<string, {\n name: string;\n displayName: string;\n description?: string;\n runtime: {\n type: string;\n language: string;\n };\n http: {\n port: number;\n healthPath: string;\n readyPath: string;\n metricsPath?: string;\n };\n auth: 'wildo-jwt';\n replicas: number;\n resources?: {\n cpu?: string;\n memory?: string;\n };\n dataAccess?: {\n database?: 'read-only' | 'read-write' | 'none';\n cache?: boolean;\n queue?: 'consumer' | 'producer' | 'both' | 'none';\n };\n }>;\n engineCapabilities?: EngineCapabilityActivations;\n providers?: SaasConfigProvidersBlock;\n email?: {\n isTransactionalWildoManaged: boolean;\n isMarketingWildoManaged: boolean;\n };\n providerConfigurations: ProviderConfigurations;\n jwt?: {\n publicKey: Record<string, string>;\n rotatedPublicKeys?: Record<string, Array<z.infer<typeof AppBootstrapRotatedPublicKeyEntrySchema>>>;\n accessTokenExpirationMinutes: number;\n refreshTokenExpirationDays: number;\n };\n}\n\nexport const AppBootstrapConfigMetadataResponseSchema = z.object({\n appSlug: z.string().min(1),\n appIdentity: AppConfiguration_Shared_AppIdentity_Schema.optional(),\n frontendServices: FrontendServicesConfigSchema.optional(),\n minions: AdminAppManagedMinionsSchema.optional(),\n workers: AdminAppManagedWorkersSchema.optional(),\n engineCapabilities: EngineCapabilityActivationsSchema.optional(),\n providers: SaasConfigProvidersBlockSchema.optional(),\n email: z.object({\n isTransactionalWildoManaged: z.boolean(),\n isMarketingWildoManaged: z.boolean(),\n }).optional(),\n providerConfigurations: ProviderConfigurationsSchema,\n jwt: z.object({\n publicKey: z.record(z.string(), z.string()),\n rotatedPublicKeys: z.record(\n z.string(),\n z.array(AppBootstrapRotatedPublicKeyEntrySchema),\n ).optional(),\n /**\n * Operator-authored JWT TTLs (Slice 3.3 hardening, F-24 / closeout).\n *\n * Sourced from `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,\n * refreshTokenExpirationDays}` (which itself was seeded from\n * `serviceAuth` in `wildo.infra.<env>.config.ts` at apps-manager init\n * time, falling back to `WildoAuthConfigSchema` defaults of 15 min /\n * 30 days when omitted \\u2014 access-token default tightened from 60\n * \\u2192 15 in Auth-hardening Slice A Step 5 on 2026-04-13; see the\n * file-level JSDoc on `auth.schemas.ts` for the threat-model rationale).\n * The application backend MUST consume these values at sign time\n * (`AuthTokenIssuerBackendService.issueAccessToken`,\n * `JwtBackendService.createRefreshToken`) instead of falling back to\n * developer-authored constants in `saas-config.backend.ts`.\n *\n * REQUIRED on the response (Slice 3 closeout): `_getDefault_WildoApplicationConfig`\n * always seeds these via `WildoAuthConfigSchema.parse(serviceAuth ?? {})`\n * (15 min / 30 days defaults), so any persisted\n * `Wildo_Application_Config.jwt` block has both fields populated.\n * Marking them required here lets the consumer\n * (`app-configuration-loader.backend.service.ts`) drop the\n * `accessTokenExpirationMinutes !== undefined ? ... : {}` defensive\n * spread and treat them as guaranteed values.\n */\n accessTokenExpirationMinutes: z.number().int().positive(),\n refreshTokenExpirationDays: z.number().int().positive(),\n }).optional(),\n}) as z.ZodType<AppBootstrapConfigMetadataResponse>;\n\nexport interface AppWorkerBootstrapResponse {\n appSlug: string;\n workerName: string;\n worker: z.infer<typeof AdminAppManagedWorkersSchema>[string];\n jwt: {\n publicKey: string;\n rotatedPublicKeys?: Array<z.infer<typeof AppBootstrapRotatedPublicKeyEntrySchema>>;\n };\n}\n\nexport const AppWorkerBootstrapResponseSchema = z.object({\n appSlug: z.string().min(1),\n workerName: z.string().min(1),\n worker: z.object({\n name: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n runtime: WorkerRuntimeSchema,\n http: WorkerHttpSchema,\n auth: WorkerAuthSchema,\n replicas: z.number().int().positive(),\n resources: ResourceLimitsSchema.optional(),\n dataAccess: DataAccessSchema.optional(),\n }),\n jwt: z.object({\n publicKey: z.string().min(1),\n rotatedPublicKeys: z.array(AppBootstrapRotatedPublicKeyEntrySchema).optional(),\n }),\n}) as z.ZodType<AppWorkerBootstrapResponse>;\n\ntype WildoAuthConfig = z.infer<typeof WildoAuthConfigSchema>;\n\nexport interface AdminAppInitializeRequest {\n name?: string;\n appDatabaseName?: string;\n override?: boolean;\n userEmail: string;\n userFirstName: string;\n userLastName: string;\n userPassword?: string;\n managedDeclaration: AdminAppManagedDeclaration;\n /**\n * The application's own persistence engine — see the field's JSDoc on the schema below for why it\n * exists at all.\n *\n * ⚠️ This interface and that schema are TWO declarations of ONE contract, joined by the\n * `as z.ZodType<AdminAppInitializeRequest>` cast. The cast means a field added to only the schema\n * type-checks perfectly while being invisible to every CONSUMER — which is exactly what happened on\n * 2026-08-19: apps-manager's controller could not read `applicationDatabase` off a parsed request\n * though the schema accepted it. Add to BOTH, always.\n */\n applicationDatabase?: { engine: DatabaseEngine; databaseName?: string };\n firstAdminSeed?: AppBootstrapFirstAdminSeed;\n /**\n * WHEN to seed this application's own database. Absent means\n * {@link AppDatabaseSeedingPhase.REQUIRED} — see that enum for why the phase is stated rather\n * than inferred.\n */\n appDatabaseSeeding?: AppDatabaseSeedingPhase;\n serviceAuth?: WildoAuthConfig;\n}\n\n/**\n * Shared admin request payload for a single app initialization.\n *\n * This describes the control-plane contract, independently of whether the\n * caller is the CLI or a future CI/CD executor.\n *\n * Required-by-contract fields:\n * - `managedDeclaration` — the projection of `wildo.saas.config.ts` that\n * seeds frontend services, capability policy, and external providers.\n * Omitting it would silently half-bootstrap an app, so the admin HTTP\n * boundary rejects requests without it.\n * - `userEmail` / `userFirstName` / `userLastName` — admin identity for\n * the seeded super-admin user. The previous implementation defaulted\n * these to a developer's personal identity, silently bypassing the\n * downstream `validateInitializationOptions` validation; that bypass\n * is now closed at the contract boundary.\n *\n * Optional-by-design fields:\n * - `userPassword` — the service auto-generates a secure password when\n * omitted (intentional one-shot bootstrap affordance).\n * - `name` / `appDatabaseName` / `override` / `firstAdminSeed` — caller\n * overrides; sensible defaults exist downstream.\n */\nexport const AdminAppInitializeRequestSchema = z.object({\n name: z.string().min(1).optional(),\n appDatabaseName: z.string().min(1).optional(),\n override: z.boolean().optional(),\n userEmail: z.email(),\n userFirstName: z.string().min(1),\n userLastName: z.string().min(1),\n userPassword: z.string().min(1).optional(),\n managedDeclaration: AdminAppManagedDeclarationSchema,\n /**\n * Which store this application's own resources persist to — mirrored from the authored\n * `applicationDatabase` in `wildo.infra.<env>.config.ts`, and carried under the SAME name so the\n * value is traceable end to end by one word.\n *\n * ## Why this field had to be added\n *\n * apps-manager already held the entire per-application PostgreSQL path: `mintAppCredentials`\n * provisioning the database, role and password, plus the `defaultAdapter` and `resourceIdFormat`\n * branches of the stored application config. All three were gated on\n * `WildoApplicationInitOptions.usePostgreSQL`, and on 2026-08-19 a repo-wide search found that flag\n * had FOUR mentions in the whole codebase — one declaration and three reads, in a single file.\n * **Nothing ever set it.**\n *\n * So the capability had no door. `backingServices.postgresql` had been authored for some time and\n * no application role ever appeared in `pg_roles`, because the declaration had no path to the\n * provisioner. This field is that path.\n *\n * OPTIONAL, and absence means MongoDB — matching\n * `ApplicationBackendDataEnvKeys.DATABASE_DEFAULT_ADAPTER`'s own default, so an older CLI that does\n * not send it keeps exactly the behaviour every existing application already has.\n */\n applicationDatabase: z.object({\n engine: z.enum(DatabaseEngine),\n /**\n * The AUTHORED database name, from `backingServices.postgresql.database`.\n *\n * Sent because two sources were naming this database and disagreeing: the provisioner derives\n * `wildo_<sanitized-slug>` while `env-vars-builder` emits the authored name as\n * `POSTGRESQL_DATABASE`. On 2026-08-19 that produced `wildo_wonder_todos` (owned by the app role)\n * beside `wonder-todos-db` (what the backend was told to connect to) — both empty, so the\n * application would have opened a database it did not own while its grants landed elsewhere.\n *\n * The authored value wins: it is the git-borne declaration, it is what the env already carries,\n * and the provisioner has always accepted an override — the caller simply never passed one.\n */\n databaseName: z.string().min(1).optional(),\n }).optional(),\n firstAdminSeed: AppBootstrapFirstAdminSeedSchema.optional(),\n /**\n * WHEN to seed this application's own database — see {@link AppDatabaseSeedingPhase}.\n *\n * OPTIONAL, and absence means `REQUIRED`, so a CLI that predates the two-phase contract keeps\n * exactly the single-phase behaviour every MongoDB application already has.\n */\n appDatabaseSeeding: z.enum(AppDatabaseSeedingPhase).optional(),\n /**\n * Authored `serviceAuth` projection from `wildo.infra.<env>.config.ts`,\n * threaded by the CLI so apps-manager can seed\n * `Wildo_Application_Config.jwt.{accessTokenExpirationMinutes,\n * refreshTokenExpirationDays}` from the operator's policy instead of a\n * hardcoded constant. When omitted (older CLI, or infra file that does\n * not author `serviceAuth`), apps-manager applies the\n * `WildoAuthConfigSchema` defaults (15 min / 30 days as of Auth-hardening\n * Slice A Step 5 on 2026-04-13; pre-Slice-A the access-token default\n * was 60 min) at init time via `WildoAuthConfigSchema.parse({})`.\n */\n serviceAuth: WildoAuthConfigSchema.optional(),\n}) as z.ZodType<AdminAppInitializeRequest>;\n\nexport interface AdminAppInitializeTarget {\n slug: string;\n name?: string;\n appDatabaseName?: string;\n managedDeclaration: AdminAppManagedDeclaration;\n /**\n * The application's own persistence engine — identical semantics to\n * {@link AdminAppInitializeRequest.applicationDatabase}, per target.\n *\n * Added 2026-08-27. The batch envelope had no way to express it, so\n * `POST /admin/apps/initialize` could only ever register applications as MongoDB — the single-app\n * endpoint carried the selection and its batch sibling silently dropped it. One invariant, two\n * call sites, applied at one (`.claude/rules/invariant-call-site-enumeration.md`).\n *\n * ⚠️ Interface AND schema, always — the `as z.ZodType<AdminAppInitializeTarget>` cast below makes\n * a schema-only addition type-check while staying invisible to every consumer.\n */\n applicationDatabase?: { engine: DatabaseEngine; databaseName?: string };\n firstAdminSeed?: AppBootstrapFirstAdminSeed;\n serviceAuth?: WildoAuthConfig;\n}\n\n/**\n * Per-target payload inside a batch admin initialization request.\n *\n * `managedDeclaration` is required for the same contract reason as in\n * `AdminAppInitializeRequestSchema`. Admin identity lives at the batch\n * envelope level (one admin user across all targets), not per target.\n */\nexport const AdminAppInitializeTargetSchema = z.object({\n slug: z.string().min(1),\n name: z.string().min(1).optional(),\n appDatabaseName: z.string().min(1).optional(),\n managedDeclaration: AdminAppManagedDeclarationSchema,\n /**\n * Per-target application persistence selection. Same shape and same meaning as\n * {@link AdminAppInitializeRequestSchema}'s field of this name — read that one for why the\n * selection must be authored rather than inferred from which backing services are declared.\n */\n applicationDatabase: z.object({\n engine: z.enum(DatabaseEngine),\n databaseName: z.string().min(1).optional(),\n }).optional(),\n firstAdminSeed: AppBootstrapFirstAdminSeedSchema.optional(),\n /**\n * Per-target `serviceAuth` projection. Today every target in a batch\n * shares the same infra-authored `serviceAuth` (one infra file per env),\n * but the field is per-target rather than batch-level so a future\n * targeted override (e.g. preview-app with a longer access TTL) can land\n * without breaking the contract. See\n * {@link AdminAppInitializeRequestSchema.serviceAuth} for full semantics.\n */\n serviceAuth: WildoAuthConfigSchema.optional(),\n}) as z.ZodType<AdminAppInitializeTarget>;\n\nexport interface AdminAppsInitializeBatchRequest {\n override?: boolean;\n userEmail: string;\n userFirstName: string;\n userLastName: string;\n userPassword?: string;\n targets: AdminAppInitializeTarget[];\n}\n\n/**\n * Batch admin initialization envelope. Admin identity is required at the\n * envelope level (the seeded admin user is shared across all targets).\n */\nexport const AdminAppsInitializeBatchRequestSchema = z.object({\n override: z.boolean().optional(),\n userEmail: z.email(),\n userFirstName: z.string().min(1),\n userLastName: z.string().min(1),\n userPassword: z.string().min(1).optional(),\n targets: z.array(AdminAppInitializeTargetSchema).min(1),\n}) as z.ZodType<AdminAppsInitializeBatchRequest>;\n\nexport interface AdminAppReapplyDeclarationRequest {\n managedDeclaration: AdminAppManagedDeclaration;\n}\n\n/**\n * Shared success response for a single app initialization request.\n */\nexport const AdminAppInitializeResponseSchema = z.object({\n success: z.literal(true),\n application: z.object({\n name: z.string().min(1),\n slug: z.string().min(1),\n }),\n credentials: z.object({\n email: z.email(),\n password: z.string().min(1),\n }),\n /**\n * What provisioning did about the application's own bootstrap rows — see\n * {@link AppDatabaseSeedingOutcome}.\n *\n * OPTIONAL so a CLI can still parse a response from an apps-manager that predates the two-phase\n * contract. A caller that DEPENDS on the two-phase flow must treat absence as \"unknown\" and say\n * so, never as `SEEDED`.\n */\n appDatabaseSeeding: z.enum(AppDatabaseSeedingOutcome).optional(),\n});\n\n/**\n * Shared admin request payload for reapplying the `wildo.saas.config.ts`\n * declaration projection (`AdminAppManagedDeclaration`) onto an\n * already-initialized application.\n *\n * Contract semantics — what this endpoint owns:\n * - Re-source the declaration-managed slices of `Wildo_Application_Config`\n * from the new declaration: `appIdentity` display fields,\n * `frontendServices` seed, `engineCapabilities`, `providers`, and\n * `providerConfigurations`.\n * - Return a `updatedFields` diff so the caller can surface what changed.\n *\n * Contract semantics — what this endpoint deliberately does NOT touch:\n * - Credentials (DB users, JWT private keys, session secrets, admin\n * passwords). Those live in `Wildo_Application_Secrets` and are owned\n * by initialize / rotate flows.\n * - Database / infrastructure provisioning. Those are owned by\n * `/admin/apps/:appSlug/initialize` and the platform-init flow.\n * - K8s endpoints. Those are owned by\n * `/admin/apps/:appSlug/refresh` (config refresh) and the deploy flow.\n * - First-admin seeding (`firstAdminSeed`). User/role seeding happens\n * at init time only. Reapplying the declaration is a config-drift\n * operation; silently changing seeded role grants would be a\n * security regression. Callers wanting to change admin user types\n * must use a dedicated admin-management endpoint (not this one).\n *\n * Stable action identifier: `apps.reapply-declaration` (see\n * {@link APPS_REAPPLY_DECLARATION_ACTION_ID} in `bootstrap.contracts.ts`).\n * The CI/CD admin rights workstream (Step 8) reuses this identifier in\n * its permission grid so this endpoint can be granted independently\n * from the broader `apps.initialize` action.\n */\nexport const AdminAppReapplyDeclarationRequestSchema = z.strictObject({\n managedDeclaration: AdminAppManagedDeclarationSchema,\n}) as z.ZodType<AdminAppReapplyDeclarationRequest>;\n\n/**\n * Shared success response for a managed-declaration reapply request.\n *\n * `updatedFields` lists the dot-paths of the declaration-projection\n * slices that actually changed (e.g. `appIdentity.displayName`,\n * `frontendServices`, `engineCapabilities`, `providers`).\n * An empty list means the stored config already matched the new\n * declaration — the operation is idempotent.\n */\nexport const AdminAppReapplyDeclarationResponseSchema = z.object({\n success: z.literal(true),\n appSlug: z.string().min(1),\n updatedFields: z.array(z.string()),\n appliedAt: z.string().datetime(),\n});\n\nexport type AppBootstrapCredentials = z.infer<typeof AppBootstrapCredentialsSchema>;\nexport type AppBootstrapCredentialsResponse = z.infer<typeof AppBootstrapCredentialsResponseSchema>;\nexport type AppBootstrapFirstAdminSeed = z.infer<typeof AppBootstrapFirstAdminSeedSchema>;\nexport type AdminAppInitializeResponse = z.infer<typeof AdminAppInitializeResponseSchema>;\nexport type AdminAppReapplyDeclarationResponse = z.infer<typeof AdminAppReapplyDeclarationResponseSchema>;\n"]}
|