@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":"resolve-homes.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"resolve-homes.js","sourceRoot":"","sources":["../../../src/workspace-scope/resolve-homes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW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AAI,IAAI;YACzF,MAAM,EAAE,SAAS;YACjB,gBAAgB,EAAE,cAAc,CAAC,QAAQ,KAAK,IAAI;SACnD;QACD,YAAY,EAAE;YACZ,qBAAqB,EAAE,cAAc,CAAC,sBAAsB,KAAK,IAAI;YACrE,qBAAqB,EAAE,cAAc,CAAC,aAAa,KAAK,IAAI;YAC5D,eAAe,EAAE,cAAc,CAAC,QAAQ,KAAK,IAAI;YACjD,iCAAiC,EAC/B,uBAAuB,KAAK,IAAI,IAAI,CAClC,cAAc,CAAC,aAAa,KAAK,IAAI;gBACrC,OAAO,CAAC,wBAAwB,KAAK,IAAI,CAC1C;YACH,qBAAqB,EAAE,uBAAuB,KAAK,IAAI;YACvD,oBAAoB,EAAE,SAAS,KAAK,IAAI;SACzC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAc,OAAO,CAAC,GAAG,EAAE,EAC3B,UAA+B,EAAE;IAEjC,OAAO,kBAAkB,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,qBAAqB,CAAC,IAA+B;IAC5D,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["import { resolve as resolvePath } from 'path';\nimport { resolveWorkspaceScope } from './workspace-scope-detector';\nimport type { WorkspaceScopeResult } from './workspace-scope.schemas';\nimport { WorkspaceScope } from './workspace-scope.schemas';\nimport {\n resolveAppLayout,\n resolveFrameworkLayout,\n resolveMachineLayout,\n} from './workspace-homes.schemas';\nimport type { ResolvedHomes } from './workspace-homes.schemas';\n\nexport interface ResolveHomesOptions {\n userHome?: string;\n frameworkPathHint?: string | null;\n isFrameworkDeveloperHint?: boolean;\n}\n\n/**\n * Compute the trusted home/layout snapshot from an already resolved workspace scope.\n *\n * The optional framework hint lets callers outside the framework repository\n * retain access to framework-owned assets without reintroducing ad hoc path\n * probing throughout the CLI.\n */\nexport function buildResolvedHomes(\n workspaceScope: WorkspaceScopeResult,\n options: ResolveHomesOptions = {},\n): ResolvedHomes {\n const machineLayout = resolveMachineLayout(options.userHome);\n const frameworkRepositoryRoot = workspaceScope.frameworkRoot ?? normalizeOptionalPath(options.frameworkPathHint);\n const frameworkLayout = frameworkRepositoryRoot\n ? resolveFrameworkLayout(frameworkRepositoryRoot)\n : null;\n const appLayout = workspaceScope.saasRoot ? resolveAppLayout(workspaceScope.saasRoot) : null;\n\n return {\n workspaceScope,\n scope: workspaceScope.scope,\n machine: {\n layout: machineLayout,\n hasPreferencesFile: workspaceScope.machinePreferencesPath !== null,\n },\n framework: {\n repositoryRoot: frameworkLayout?.repositoryRoot ?? null,\n markerHome: frameworkLayout?.markerHome ?? null,\n declarationConfigPath: frameworkLayout?.declarationConfigPath ?? null,\n layout: frameworkLayout,\n isInFrameworkWorkspace: workspaceScope.frameworkRoot !== null,\n },\n app: {\n declarationRoot: appLayout?.declarationRoot ?? null,\n runtimeHome: appLayout?.runtimeHome ?? null,\n saasConfigPath: appLayout?.declarationConfigPath ?? workspaceScope.saasConfigPath ?? null,\n layout: appLayout,\n isInAppWorkspace: workspaceScope.saasRoot !== null,\n },\n capabilities: {\n hasMachinePreferences: workspaceScope.machinePreferencesPath !== null,\n hasFrameworkWorkspace: workspaceScope.frameworkRoot !== null,\n hasAppWorkspace: workspaceScope.saasRoot !== null,\n hasFrameworkDeveloperCapabilities:\n frameworkRepositoryRoot !== null && (\n workspaceScope.frameworkRoot !== null ||\n options.isFrameworkDeveloperHint === true\n ),\n canUseFrameworkAssets: frameworkRepositoryRoot !== null,\n canUseAppRuntimeHome: appLayout !== null,\n },\n };\n}\n\n/**\n * Resolve the trusted home/layout snapshot directly from a working directory.\n */\nexport function resolveHomes(\n cwd: string = process.cwd(),\n options: ResolveHomesOptions = {},\n): ResolvedHomes {\n return buildResolvedHomes(resolveWorkspaceScope(cwd), options);\n}\n\nfunction normalizeOptionalPath(path: string | null | undefined): string | null {\n if (!path) {\n return null;\n }\n\n return resolvePath(path);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-homes.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"workspace-homes.schemas.d.ts","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-homes.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAML,cAAc,EACd,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,qCAAqC,EAAE,MAAM,CAAC;IAC9C,oEAAoE;IACpE,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;;OAcG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0BAA0B,EAAE,MAAM,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,yBAAyB,EAAE,MAAM,CAAC;IAClC,0BAA0B,EAAE,MAAM,CAAC;IACnC,yBAAyB,EAAE,MAAM,CAAC;IAClC,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,EAAE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,EAAE,oBAAoB,CAAC;IACrC,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,EAAE,sBAAsB,CAAC;IAClC,GAAG,EAAE,gBAAgB,CAAC;IACtB,YAAY,EAAE,wBAAwB,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAa1E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,oBAAoB,CAsElF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CA2DhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-homes.schemas.js","sourceRoot":"","sources":["../../../../src/workspace-scope/workspace-homes.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AA8NnC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAiB;IACpD,MAAM,IAAI,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAChD,OAAO;QACL,IAAI;QACJ,eAAe,EAAE,IAAI,CAAC,IAAI,EAAE,0BAA0B,CAAC,WAAW,CAAC;QACnE,cAAc;QACd,qCAAqC,EAAE,IAAI,CACzC,cAAc,EACd,uBAAuB,CACxB;QACD,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;KACvD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,aAAqB;IAC1D,MAAM,UAAU,GAAG,IAAI,CAAC,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wB,CAAC,WAAW,CACrC;QACD,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,KAAK,CAAC;QAC5D,aAAa;QACb,6BAA6B,EAAE,IAAI,CACjC,aAAa,EACb,wBAAwB,CAAC,iBAAiB,CAC3C;QACD,QAAQ;QACR,iBAAiB,EAAE,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC;QAClD,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,UAAU,CAAC;QACrE,yBAAyB;QACzB,uBAAuB,EAAE,IAAI,CAAC,yBAAyB,EAAE,wBAAwB,CAAC,YAAY,CAAC;QAC/F,mBAAmB,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,MAAM,CAAC;QACvE,oBAAoB,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,iBAAiB,CAAC;QACnF,kBAAkB,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,eAAe,CAAC;QAC/E,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,SAAS,CAAC;QACpE,sBAAsB,EAAE,IAAI,CAAC,WAAW,EAAE,0BAA0B,CAAC,qBAAqB,CAAC;QAC3F,yBAAyB,EAAE,IAAI,CAC7B,QAAQ,EACR,wBAAwB,CAAC,aAAa,EACtC,MAAM,CACP;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { join } from 'path';\nimport {\n AUTHORED_CONFIG_FILE_NAMES,\n APP_CONTINUITY_FILE_NAMES,\n APP_RUNTIME_SUBDIR_NAMES,\n resolveMachineWildoHomePath,\n WORKSPACE_HOME_NAMES,\n WorkspaceScope,\n type WorkspaceScopeResult,\n} from './workspace-scope.schemas';\n\nexport interface MachineLayoutPaths {\n home: string;\n preferencesPath: string;\n /** Machine-local root for all continuity authority domains and subjects. */\n continuityHome: string;\n /**\n * Machine-local authority-domain manifest.\n *\n * The manifest identifies a storage/writer namespace. It is deliberately\n * outside every subject directory because one local authority domain may\n * own several application subjects.\n */\n continuityAuthorityDomainManifestPath: string;\n /** Root containing `domains/<authority-domain-id>/subjects/...`. */\n continuityDomainsHome: string;\n}\n\nexport interface FrameworkLayoutPaths {\n repositoryRoot: string;\n rootPackageJsonPath: string;\n pnpmLockfilePath: string;\n engineHome: string;\n platformHome: string;\n /**\n * The THIRD workspace home (plan D9): where the framework AUTHORS the provider modules it distributes through the\n * module registry, one directory per provider (`providers-registry/<ref>/`, holding `wildo.module.json` and one\n * package per facet). An application installs one with `wildo registry add wildo/providers/<ref>` (#2015 reads this\n * directory when the CLI runs inside a checkout) and owns the copy from then on.\n *\n * It replaced `providersHome` (`providers/`, the generated `@wildo-ai/providers` catalogue) at the cut-over, #2019:\n * that catalogue is archived under `_code_archive/providers/` and nothing reads it any more.\n *\n * It is a field here because this interface is what makes a home VISIBLE to tooling: framework-knowledge generation\n * and the anchor audit take their scan roots from it, and a home absent from those roots is not excluded, it is\n * unseen. An unseen home reports clean (`negative-results-require-a-positive-probe.md`): an anchor in a registry\n * provider would never reach a skill. Publish discovery deliberately does NOT read it: a registry module is\n * published to the module registry, never to npm.\n */\n providersRegistryHome: string;\n examplesHome: string;\n markerHome: string;\n declarationConfigPath: string;\n templatesHome: string;\n infraTemplatesHome: string;\n dockerComposeTemplatesHome: string;\n ciTemplatesHome: string;\n k8sTemplatesHome: string;\n dockerImagesTemplatesHome: string;\n platformBaseDockerfilePath: string;\n backendBaseDockerfilePath: string;\n backendJavaDockerfilePath: string;\n docsHome: string;\n frameworkKnowledgePackageHome: string;\n frameworkKnowledgeSourceHome: string;\n /**\n * Home of **authored** skill folders (`src/skills/<skill_id>/SKILL.md` + supporting\n * markdown). Distinct from {@link frameworkKnowledgeSkillsHome}, which is the\n * **materialized** output home under `dist/knowledge/skills/`. Keeping the two\n * names clearly separated prevents accidental conflation between authored\n * source and generated artifact.\n */\n frameworkKnowledgeAuthoredSkillsHome: string;\n /**\n * Home of **authored** playbook folders\n * (`src/playbooks/<ref>/playbook.json` + `method.md`). Playbooks are the\n * meta-workflow artifact kind (app-creation methodology definitions) — a\n * distinct compilation lane from skills, so they get their own authored\n * home instead of polluting the skills router. Mirrors the\n * authored-vs-materialized split of\n * {@link frameworkKnowledgeAuthoredSkillsHome} /\n * {@link frameworkKnowledgeSkillsHome}.\n */\n frameworkKnowledgeAuthoredPlaybooksHome: string;\n /**\n * Home of **authored** always-on rules (`src/rules/*.md`).\n *\n * A rule is policy an application's coding agent should have at its elbow WITHOUT routing to a\n * skill first — the distinction the skills router cannot express, because a router match requires\n * the agent to already suspect the topic. Authored-vs-materialized split as above:\n * {@link frameworkKnowledgeRulesHome} is the compiled output.\n */\n frameworkKnowledgeAuthoredRulesHome: string;\n frameworkKnowledgeOutputHome: string;\n frameworkKnowledgeReferencesHome: string;\n frameworkKnowledgeSkillsHome: string;\n frameworkKnowledgeRegistriesHome: string;\n /** Materialized playbook output home under `dist/knowledge/playbooks/`. */\n frameworkKnowledgePlaybooksHome: string;\n /** Materialized rule output home under `dist/knowledge/rules/`. */\n frameworkKnowledgeRulesHome: string;\n releaseHome: string;\n releaseDistHome: string;\n releasePublishHome: string;\n releaseSecretsHome: string;\n releaseSecretsPath: string;\n npmPublishManifestsHome: string;\n configLoaderArtifactsHome: string;\n}\n\nexport interface AppLayoutPaths {\n declarationRoot: string;\n declarationConfigPath: string;\n authoredInfrastructureHome: string;\n runtimeHome: string;\n /** Tracked portable identity/bootstrap inputs for local continuity. */\n continuityHome: string;\n applicationSubjectManifestPath: string;\n applicationContinuityBootstrapProfilePath: string;\n distHome: string;\n /** Generated application-specification runtime outputs. */\n applicationSpecificationsDistHome: string;\n applicationSpecificationProjectionsHome: string;\n stateHome: string;\n /** Disposable application-owned workspaces; never application truth. */\n temporaryHome: string;\n integrationTestsTemporaryHome: string;\n logsHome: string;\n companionLogsHome: string;\n localDataHome: string;\n runtimeInfrastructureHome: string;\n runtimeEnvironmentsHome: string;\n /**\n * Root of the env-scoped deployment-artifact staging area\n * (`.wildo-saas/deploy/`). Per-env renders live at `<home>/<envName>/`.\n * Always secret-bearing — see {@link APP_RUNTIME_SUBDIR_NAMES.DEPLOY}.\n */\n deployArtifactsHome: string;\n frameworkScriptsHome: string;\n runtimeSignalsHome: string;\n companionHome: string;\n preferencesOverlayPath: string;\n configLoaderArtifactsHome: string;\n}\n\nexport interface ResolvedMachineHomes {\n layout: MachineLayoutPaths;\n hasPreferencesFile: boolean;\n}\n\nexport interface ResolvedFrameworkHomes {\n repositoryRoot: string | null;\n markerHome: string | null;\n declarationConfigPath: string | null;\n layout: FrameworkLayoutPaths | null;\n /**\n * True ONLY when the caller's `cwd` sits inside a framework workspace that\n * was discovered by walking up for `wildo-framework.info.json`. A framework\n * root derived from `frameworkPathHint` (machine preferences) populates\n * `repositoryRoot` and `layout`, but leaves this flag `false` because the\n * caller is NOT operating from inside the framework repo — they merely have\n * a pointer to it. Consumers that need \"am I currently developing the\n * framework?\" must read this field; consumers that need \"can I read\n * framework-owned assets from here?\" must read\n * `ResolvedHomeCapabilities.canUseFrameworkAssets`.\n */\n isInFrameworkWorkspace: boolean;\n}\n\nexport interface ResolvedAppHomes {\n declarationRoot: string | null;\n runtimeHome: string | null;\n saasConfigPath: string | null;\n layout: AppLayoutPaths | null;\n isInAppWorkspace: boolean;\n}\n\n/**\n * Pre-computed, semantic booleans that gate downstream CLI / companion /\n * runtime behavior based on the resolved-homes snapshot.\n *\n * Each flag is intentionally separate because they answer different questions\n * — merging any two of them (\"are we in a framework workspace?\" vs \"can we\n * reach framework assets?\") would silently reintroduce the Phase 5\n * env-vs-context confusion we explicitly killed:\n *\n * - `hasMachinePreferences` — A `preferences.json` file exists under the\n * machine Wildo home. `canUseFrameworkAssets` can be true without this\n * flag being true (e.g. the preferences hint was seeded in a session that\n * never persisted), and vice versa.\n * - `hasFrameworkWorkspace` — The caller's `cwd` is inside a framework\n * workspace (walk-up found `wildo-framework.info.json`). Equivalent to\n * `framework.isInFrameworkWorkspace`; duplicated here so capability checks\n * are one-stop-shop without having to reach into the nested roots.\n * - `hasAppWorkspace` — The caller's `cwd` is inside a SaaS app workspace\n * (walk-up found `wildo.saas.config.ts`). Equivalent to\n * `app.isInAppWorkspace`.\n * - `hasFrameworkDeveloperCapabilities` — Either the operator is actually\n * sitting inside the framework workspace (`hasFrameworkWorkspace`) OR the\n * `isFrameworkDeveloperHint` from preferences is true. This is metadata\n * used by commands that surface framework-dev-only tooling — it never\n * participates in path resolution.\n * - `canUseFrameworkAssets` — The resolved snapshot has a usable framework\n * `repositoryRoot` (either because the caller is inside one, or because a\n * validated hint pointed at one). This is the flag used by consumers that\n * need to READ framework-owned paths (scripts, shared dist, etc.) — it is\n * intentionally broader than `hasFrameworkWorkspace` so that apps can\n * reach framework assets without the caller pretending to be \"in\" the\n * framework workspace.\n * - `canUseAppRuntimeHome` — The resolved snapshot has a usable\n * `.wildo-saas/` runtime home. Required by anything that writes runtime\n * signals, caches, generated files, etc.\n */\nexport interface ResolvedHomeCapabilities {\n hasMachinePreferences: boolean;\n hasFrameworkWorkspace: boolean;\n hasAppWorkspace: boolean;\n hasFrameworkDeveloperCapabilities: boolean;\n canUseFrameworkAssets: boolean;\n canUseAppRuntimeHome: boolean;\n}\n\nexport interface ResolvedHomes {\n workspaceScope: WorkspaceScopeResult;\n scope: WorkspaceScope;\n machine: ResolvedMachineHomes;\n framework: ResolvedFrameworkHomes;\n app: ResolvedAppHomes;\n capabilities: ResolvedHomeCapabilities;\n}\n\n/**\n * Build the machine-global Wildo home layout: under `$WILDO_HOME` when set, else the current user's\n * `~/.wildo` — the one rule `resolveMachineWildoHomePath` owns and both launchers apply. An explicit\n * `userHome` answers about that home and ignores the environment.\n */\nexport function resolveMachineLayout(userHome?: string): MachineLayoutPaths {\n const home = resolveMachineWildoHomePath(userHome);\n const continuityHome = join(home, 'continuity');\n return {\n home,\n preferencesPath: join(home, AUTHORED_CONFIG_FILE_NAMES.PREFERENCES),\n continuityHome,\n continuityAuthorityDomainManifestPath: join(\n continuityHome,\n 'authority-domain.json',\n ),\n continuityDomainsHome: join(continuityHome, 'domains'),\n };\n}\n\n/**\n * Build the framework-owned homes and asset roots for a framework repository.\n */\nexport function resolveFrameworkLayout(frameworkRoot: string): FrameworkLayoutPaths {\n const markerHome = join(frameworkRoot, WORKSPACE_HOME_NAMES.FRAMEWORK_HOME);\n const engineHome = join(frameworkRoot, 'engine');\n const platformHome = join(frameworkRoot, 'platform');\n const providersRegistryHome = join(frameworkRoot, 'providers-registry');\n const examplesHome = join(frameworkRoot, 'examples');\n const templatesHome = join(frameworkRoot, 'templates');\n const infraTemplatesHome = join(templatesHome, 'infra');\n const dockerImagesTemplatesHome = join(infraTemplatesHome, 'docker-images');\n const backendDockerImagesHome = join(dockerImagesTemplatesHome, 'backend');\n const frameworkKnowledgePackageHome = join(platformHome, 'factory', 'framework-knowledge');\n const frameworkKnowledgeSourceHome = join(frameworkKnowledgePackageHome, 'src');\n const frameworkKnowledgeOutputHome = join(frameworkKnowledgePackageHome, 'dist', 'knowledge');\n const releaseDistHome = join(markerHome, APP_RUNTIME_SUBDIR_NAMES.DIST);\n const releasePublishHome = join(releaseDistHome, 'publish');\n const releaseSecretsHome = join(markerHome, 'framework-secrets');\n return {\n repositoryRoot: frameworkRoot,\n rootPackageJsonPath: join(frameworkRoot, 'package.json'),\n pnpmLockfilePath: join(frameworkRoot, 'pnpm-lock.yaml'),\n engineHome,\n platformHome,\n providersRegistryHome,\n examplesHome,\n markerHome,\n declarationConfigPath: join(markerHome, AUTHORED_CONFIG_FILE_NAMES.FRAMEWORK),\n templatesHome,\n infraTemplatesHome,\n dockerComposeTemplatesHome: join(infraTemplatesHome, 'docker-compose'),\n ciTemplatesHome: join(infraTemplatesHome, 'ci'),\n k8sTemplatesHome: join(infraTemplatesHome, 'k8s'),\n dockerImagesTemplatesHome,\n platformBaseDockerfilePath: join(\n dockerImagesTemplatesHome,\n 'platform',\n 'Dockerfile.platform-base',\n ),\n backendBaseDockerfilePath: join(\n backendDockerImagesHome,\n 'Dockerfile.backend-base',\n ),\n backendJavaDockerfilePath: join(\n backendDockerImagesHome,\n 'Dockerfile.backend-base-java',\n ),\n docsHome: join(frameworkRoot, 'docs'),\n frameworkKnowledgePackageHome,\n frameworkKnowledgeSourceHome,\n frameworkKnowledgeAuthoredSkillsHome: join(frameworkKnowledgeSourceHome, 'skills'),\n frameworkKnowledgeAuthoredPlaybooksHome: join(frameworkKnowledgeSourceHome, 'playbooks'),\n frameworkKnowledgeAuthoredRulesHome: join(frameworkKnowledgeSourceHome, 'rules'),\n frameworkKnowledgeOutputHome,\n frameworkKnowledgeReferencesHome: join(frameworkKnowledgeOutputHome, 'references'),\n frameworkKnowledgeSkillsHome: join(frameworkKnowledgeOutputHome, 'skills'),\n frameworkKnowledgeRegistriesHome: join(frameworkKnowledgeOutputHome, 'registries'),\n frameworkKnowledgePlaybooksHome: join(frameworkKnowledgeOutputHome, 'playbooks'),\n frameworkKnowledgeRulesHome: join(frameworkKnowledgeOutputHome, 'rules'),\n releaseHome: markerHome,\n releaseDistHome,\n releasePublishHome,\n releaseSecretsHome,\n releaseSecretsPath: join(releaseSecretsHome, 'secrets.json'),\n npmPublishManifestsHome: join(releasePublishHome, 'npm-manifests'),\n configLoaderArtifactsHome: join(\n markerHome,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'framework',\n ),\n };\n}\n\n/**\n * Build the app declaration-root and runtime-home layout for a SaaS app.\n */\nexport function resolveAppLayout(appRoot: string): AppLayoutPaths {\n const runtimeHome = join(appRoot, WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME);\n const continuityHome = join(\n runtimeHome,\n APP_RUNTIME_SUBDIR_NAMES.CONTINUITY,\n );\n const distHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.DIST);\n const applicationSpecificationsDistHome = join(\n distHome,\n APP_RUNTIME_SUBDIR_NAMES.APPLICATION_SPECIFICATIONS,\n );\n const temporaryHome = join(\n runtimeHome,\n APP_RUNTIME_SUBDIR_NAMES.TEMPORARY,\n );\n const runtimeInfrastructureHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE);\n const logsHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.LOGS);\n return {\n declarationRoot: appRoot,\n declarationConfigPath: join(appRoot, AUTHORED_CONFIG_FILE_NAMES.SAAS),\n authoredInfrastructureHome: join(appRoot, APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE),\n runtimeHome,\n continuityHome,\n applicationSubjectManifestPath: join(\n continuityHome,\n APP_CONTINUITY_FILE_NAMES.APPLICATION_SUBJECT_MANIFEST,\n ),\n applicationContinuityBootstrapProfilePath: join(\n continuityHome,\n APP_CONTINUITY_FILE_NAMES.BOOTSTRAP_PROFILE,\n ),\n distHome,\n applicationSpecificationsDistHome,\n applicationSpecificationProjectionsHome: join(\n applicationSpecificationsDistHome,\n APP_RUNTIME_SUBDIR_NAMES.PROJECTIONS,\n ),\n stateHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.STATE),\n temporaryHome,\n integrationTestsTemporaryHome: join(\n temporaryHome,\n APP_RUNTIME_SUBDIR_NAMES.INTEGRATION_TESTS,\n ),\n logsHome,\n companionLogsHome: join(logsHome, 'dev-companion'),\n localDataHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.LOCAL_DATA),\n runtimeInfrastructureHome,\n runtimeEnvironmentsHome: join(runtimeInfrastructureHome, APP_RUNTIME_SUBDIR_NAMES.ENVIRONMENTS),\n deployArtifactsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.DEPLOY),\n frameworkScriptsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.FRAMEWORK_SCRIPTS),\n runtimeSignalsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.RUNTIME_SIGNALS),\n companionHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.COMPANION),\n preferencesOverlayPath: join(runtimeHome, AUTHORED_CONFIG_FILE_NAMES.APP_LOCAL_PREFERENCES),\n configLoaderArtifactsHome: join(\n distHome,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'saas',\n ),\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"workspace-homes.schemas.js","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-homes.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AA8NnC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAiB;IACpD,MAAM,IAAI,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAChD,OAAO;QACL,IAAI;QACJ,eAAe,EAAE,IAAI,CAAC,IAAI,EAAE,0BAA0B,CAAC,WAAW,CAAC;QACnE,cAAc;QACd,qCAAqC,EAAE,IAAI,CACzC,cAAc,EACd,uBAAuB,CACxB;QACD,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;KACvD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,aAAqB;IAC1D,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAC;IAC5E,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IACjD,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IACrD,MAAM,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;IACxE,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAA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rE,yBAAyB;QACzB,uBAAuB,EAAE,IAAI,CAAC,yBAAyB,EAAE,wBAAwB,CAAC,YAAY,CAAC;QAC/F,mBAAmB,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,MAAM,CAAC;QACvE,oBAAoB,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,iBAAiB,CAAC;QACnF,kBAAkB,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,eAAe,CAAC;QAC/E,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,SAAS,CAAC;QACpE,sBAAsB,EAAE,IAAI,CAAC,WAAW,EAAE,0BAA0B,CAAC,qBAAqB,CAAC;QAC3F,yBAAyB,EAAE,IAAI,CAC7B,QAAQ,EACR,wBAAwB,CAAC,aAAa,EACtC,MAAM,CACP;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { join } from 'path';\nimport {\n AUTHORED_CONFIG_FILE_NAMES,\n APP_CONTINUITY_FILE_NAMES,\n APP_RUNTIME_SUBDIR_NAMES,\n resolveMachineWildoHomePath,\n WORKSPACE_HOME_NAMES,\n WorkspaceScope,\n type WorkspaceScopeResult,\n} from './workspace-scope.schemas';\n\nexport interface MachineLayoutPaths {\n home: string;\n preferencesPath: string;\n /** Machine-local root for all continuity authority domains and subjects. */\n continuityHome: string;\n /**\n * Machine-local authority-domain manifest.\n *\n * The manifest identifies a storage/writer namespace. It is deliberately\n * outside every subject directory because one local authority domain may\n * own several application subjects.\n */\n continuityAuthorityDomainManifestPath: string;\n /** Root containing `domains/<authority-domain-id>/subjects/...`. */\n continuityDomainsHome: string;\n}\n\nexport interface FrameworkLayoutPaths {\n repositoryRoot: string;\n rootPackageJsonPath: string;\n pnpmLockfilePath: string;\n engineHome: string;\n platformHome: string;\n /**\n * The THIRD workspace home (plan D9): where the framework AUTHORS the provider modules it distributes through the\n * module registry, one directory per provider (`providers-registry/<ref>/`, holding `wildo.module.json` and one\n * package per facet). An application installs one with `wildo registry add wildo/providers/<ref>` (#2015 reads this\n * directory when the CLI runs inside a checkout) and owns the copy from then on.\n *\n * It replaced `providersHome` (`providers/`, the generated `@wildo-ai/providers` catalogue) at the cut-over, #2019:\n * that catalogue is archived under `_code_archive/providers/` and nothing reads it any more.\n *\n * It is a field here because this interface is what makes a home VISIBLE to tooling: framework-knowledge generation\n * and the anchor audit take their scan roots from it, and a home absent from those roots is not excluded, it is\n * unseen. An unseen home reports clean (`negative-results-require-a-positive-probe.md`): an anchor in a registry\n * provider would never reach a skill. Publish discovery deliberately does NOT read it: a registry module is\n * published to the module registry, never to npm.\n */\n providersRegistryHome: string;\n examplesHome: string;\n markerHome: string;\n declarationConfigPath: string;\n templatesHome: string;\n infraTemplatesHome: string;\n dockerComposeTemplatesHome: string;\n ciTemplatesHome: string;\n k8sTemplatesHome: string;\n dockerImagesTemplatesHome: string;\n platformBaseDockerfilePath: string;\n backendBaseDockerfilePath: string;\n backendJavaDockerfilePath: string;\n docsHome: string;\n frameworkKnowledgePackageHome: string;\n frameworkKnowledgeSourceHome: string;\n /**\n * Home of **authored** skill folders (`src/skills/<skill_id>/SKILL.md` + supporting\n * markdown). Distinct from {@link frameworkKnowledgeSkillsHome}, which is the\n * **materialized** output home under `dist/knowledge/skills/`. Keeping the two\n * names clearly separated prevents accidental conflation between authored\n * source and generated artifact.\n */\n frameworkKnowledgeAuthoredSkillsHome: string;\n /**\n * Home of **authored** playbook folders\n * (`src/playbooks/<ref>/playbook.json` + `method.md`). Playbooks are the\n * meta-workflow artifact kind (app-creation methodology definitions) — a\n * distinct compilation lane from skills, so they get their own authored\n * home instead of polluting the skills router. Mirrors the\n * authored-vs-materialized split of\n * {@link frameworkKnowledgeAuthoredSkillsHome} /\n * {@link frameworkKnowledgeSkillsHome}.\n */\n frameworkKnowledgeAuthoredPlaybooksHome: string;\n /**\n * Home of **authored** always-on rules (`src/rules/*.md`).\n *\n * A rule is policy an application's coding agent should have at its elbow WITHOUT routing to a\n * skill first — the distinction the skills router cannot express, because a router match requires\n * the agent to already suspect the topic. Authored-vs-materialized split as above:\n * {@link frameworkKnowledgeRulesHome} is the compiled output.\n */\n frameworkKnowledgeAuthoredRulesHome: string;\n frameworkKnowledgeOutputHome: string;\n frameworkKnowledgeReferencesHome: string;\n frameworkKnowledgeSkillsHome: string;\n frameworkKnowledgeRegistriesHome: string;\n /** Materialized playbook output home under `dist/knowledge/playbooks/`. */\n frameworkKnowledgePlaybooksHome: string;\n /** Materialized rule output home under `dist/knowledge/rules/`. */\n frameworkKnowledgeRulesHome: string;\n releaseHome: string;\n releaseDistHome: string;\n releasePublishHome: string;\n releaseSecretsHome: string;\n releaseSecretsPath: string;\n npmPublishManifestsHome: string;\n configLoaderArtifactsHome: string;\n}\n\nexport interface AppLayoutPaths {\n declarationRoot: string;\n declarationConfigPath: string;\n authoredInfrastructureHome: string;\n runtimeHome: string;\n /** Tracked portable identity/bootstrap inputs for local continuity. */\n continuityHome: string;\n applicationSubjectManifestPath: string;\n applicationContinuityBootstrapProfilePath: string;\n distHome: string;\n /** Generated application-specification runtime outputs. */\n applicationSpecificationsDistHome: string;\n applicationSpecificationProjectionsHome: string;\n stateHome: string;\n /** Disposable application-owned workspaces; never application truth. */\n temporaryHome: string;\n integrationTestsTemporaryHome: string;\n logsHome: string;\n companionLogsHome: string;\n localDataHome: string;\n runtimeInfrastructureHome: string;\n runtimeEnvironmentsHome: string;\n /**\n * Root of the env-scoped deployment-artifact staging area\n * (`.wildo-saas/deploy/`). Per-env renders live at `<home>/<envName>/`.\n * Always secret-bearing — see {@link APP_RUNTIME_SUBDIR_NAMES.DEPLOY}.\n */\n deployArtifactsHome: string;\n frameworkScriptsHome: string;\n runtimeSignalsHome: string;\n companionHome: string;\n preferencesOverlayPath: string;\n configLoaderArtifactsHome: string;\n}\n\nexport interface ResolvedMachineHomes {\n layout: MachineLayoutPaths;\n hasPreferencesFile: boolean;\n}\n\nexport interface ResolvedFrameworkHomes {\n repositoryRoot: string | null;\n markerHome: string | null;\n declarationConfigPath: string | null;\n layout: FrameworkLayoutPaths | null;\n /**\n * True ONLY when the caller's `cwd` sits inside a framework workspace that\n * was discovered by walking up for `wildo-framework.info.json`. A framework\n * root derived from `frameworkPathHint` (machine preferences) populates\n * `repositoryRoot` and `layout`, but leaves this flag `false` because the\n * caller is NOT operating from inside the framework repo — they merely have\n * a pointer to it. Consumers that need \"am I currently developing the\n * framework?\" must read this field; consumers that need \"can I read\n * framework-owned assets from here?\" must read\n * `ResolvedHomeCapabilities.canUseFrameworkAssets`.\n */\n isInFrameworkWorkspace: boolean;\n}\n\nexport interface ResolvedAppHomes {\n declarationRoot: string | null;\n runtimeHome: string | null;\n saasConfigPath: string | null;\n layout: AppLayoutPaths | null;\n isInAppWorkspace: boolean;\n}\n\n/**\n * Pre-computed, semantic booleans that gate downstream CLI / companion /\n * runtime behavior based on the resolved-homes snapshot.\n *\n * Each flag is intentionally separate because they answer different questions\n * — merging any two of them (\"are we in a framework workspace?\" vs \"can we\n * reach framework assets?\") would silently reintroduce the Phase 5\n * env-vs-context confusion we explicitly killed:\n *\n * - `hasMachinePreferences` — A `preferences.json` file exists under the\n * machine Wildo home. `canUseFrameworkAssets` can be true without this\n * flag being true (e.g. the preferences hint was seeded in a session that\n * never persisted), and vice versa.\n * - `hasFrameworkWorkspace` — The caller's `cwd` is inside a framework\n * workspace (walk-up found `wildo-framework.info.json`). Equivalent to\n * `framework.isInFrameworkWorkspace`; duplicated here so capability checks\n * are one-stop-shop without having to reach into the nested roots.\n * - `hasAppWorkspace` — The caller's `cwd` is inside a SaaS app workspace\n * (walk-up found `wildo.saas.config.ts`). Equivalent to\n * `app.isInAppWorkspace`.\n * - `hasFrameworkDeveloperCapabilities` — Either the operator is actually\n * sitting inside the framework workspace (`hasFrameworkWorkspace`) OR the\n * `isFrameworkDeveloperHint` from preferences is true. This is metadata\n * used by commands that surface framework-dev-only tooling — it never\n * participates in path resolution.\n * - `canUseFrameworkAssets` — The resolved snapshot has a usable framework\n * `repositoryRoot` (either because the caller is inside one, or because a\n * validated hint pointed at one). This is the flag used by consumers that\n * need to READ framework-owned paths (scripts, shared dist, etc.) — it is\n * intentionally broader than `hasFrameworkWorkspace` so that apps can\n * reach framework assets without the caller pretending to be \"in\" the\n * framework workspace.\n * - `canUseAppRuntimeHome` — The resolved snapshot has a usable\n * `.wildo-saas/` runtime home. Required by anything that writes runtime\n * signals, caches, generated files, etc.\n */\nexport interface ResolvedHomeCapabilities {\n hasMachinePreferences: boolean;\n hasFrameworkWorkspace: boolean;\n hasAppWorkspace: boolean;\n hasFrameworkDeveloperCapabilities: boolean;\n canUseFrameworkAssets: boolean;\n canUseAppRuntimeHome: boolean;\n}\n\nexport interface ResolvedHomes {\n workspaceScope: WorkspaceScopeResult;\n scope: WorkspaceScope;\n machine: ResolvedMachineHomes;\n framework: ResolvedFrameworkHomes;\n app: ResolvedAppHomes;\n capabilities: ResolvedHomeCapabilities;\n}\n\n/**\n * Build the machine-global Wildo home layout: under `$WILDO_HOME` when set, else the current user's\n * `~/.wildo` — the one rule `resolveMachineWildoHomePath` owns and both launchers apply. An explicit\n * `userHome` answers about that home and ignores the environment.\n */\nexport function resolveMachineLayout(userHome?: string): MachineLayoutPaths {\n const home = resolveMachineWildoHomePath(userHome);\n const continuityHome = join(home, 'continuity');\n return {\n home,\n preferencesPath: join(home, AUTHORED_CONFIG_FILE_NAMES.PREFERENCES),\n continuityHome,\n continuityAuthorityDomainManifestPath: join(\n continuityHome,\n 'authority-domain.json',\n ),\n continuityDomainsHome: join(continuityHome, 'domains'),\n };\n}\n\n/**\n * Build the framework-owned homes and asset roots for a framework repository.\n */\nexport function resolveFrameworkLayout(frameworkRoot: string): FrameworkLayoutPaths {\n const markerHome = join(frameworkRoot, WORKSPACE_HOME_NAMES.FRAMEWORK_HOME);\n const engineHome = join(frameworkRoot, 'engine');\n const platformHome = join(frameworkRoot, 'platform');\n const providersRegistryHome = join(frameworkRoot, 'providers-registry');\n const examplesHome = join(frameworkRoot, 'examples');\n const templatesHome = join(frameworkRoot, 'templates');\n const infraTemplatesHome = join(templatesHome, 'infra');\n const dockerImagesTemplatesHome = join(infraTemplatesHome, 'docker-images');\n const backendDockerImagesHome = join(dockerImagesTemplatesHome, 'backend');\n const frameworkKnowledgePackageHome = join(platformHome, 'factory', 'framework-knowledge');\n const frameworkKnowledgeSourceHome = join(frameworkKnowledgePackageHome, 'src');\n const frameworkKnowledgeOutputHome = join(frameworkKnowledgePackageHome, 'dist', 'knowledge');\n const releaseDistHome = join(markerHome, APP_RUNTIME_SUBDIR_NAMES.DIST);\n const releasePublishHome = join(releaseDistHome, 'publish');\n const releaseSecretsHome = join(markerHome, 'framework-secrets');\n return {\n repositoryRoot: frameworkRoot,\n rootPackageJsonPath: join(frameworkRoot, 'package.json'),\n pnpmLockfilePath: join(frameworkRoot, 'pnpm-lock.yaml'),\n engineHome,\n platformHome,\n providersRegistryHome,\n examplesHome,\n markerHome,\n declarationConfigPath: join(markerHome, AUTHORED_CONFIG_FILE_NAMES.FRAMEWORK),\n templatesHome,\n infraTemplatesHome,\n dockerComposeTemplatesHome: join(infraTemplatesHome, 'docker-compose'),\n ciTemplatesHome: join(infraTemplatesHome, 'ci'),\n k8sTemplatesHome: join(infraTemplatesHome, 'k8s'),\n dockerImagesTemplatesHome,\n platformBaseDockerfilePath: join(\n dockerImagesTemplatesHome,\n 'platform',\n 'Dockerfile.platform-base',\n ),\n backendBaseDockerfilePath: join(\n backendDockerImagesHome,\n 'Dockerfile.backend-base',\n ),\n backendJavaDockerfilePath: join(\n backendDockerImagesHome,\n 'Dockerfile.backend-base-java',\n ),\n docsHome: join(frameworkRoot, 'docs'),\n frameworkKnowledgePackageHome,\n frameworkKnowledgeSourceHome,\n frameworkKnowledgeAuthoredSkillsHome: join(frameworkKnowledgeSourceHome, 'skills'),\n frameworkKnowledgeAuthoredPlaybooksHome: join(frameworkKnowledgeSourceHome, 'playbooks'),\n frameworkKnowledgeAuthoredRulesHome: join(frameworkKnowledgeSourceHome, 'rules'),\n frameworkKnowledgeOutputHome,\n frameworkKnowledgeReferencesHome: join(frameworkKnowledgeOutputHome, 'references'),\n frameworkKnowledgeSkillsHome: join(frameworkKnowledgeOutputHome, 'skills'),\n frameworkKnowledgeRegistriesHome: join(frameworkKnowledgeOutputHome, 'registries'),\n frameworkKnowledgePlaybooksHome: join(frameworkKnowledgeOutputHome, 'playbooks'),\n frameworkKnowledgeRulesHome: join(frameworkKnowledgeOutputHome, 'rules'),\n releaseHome: markerHome,\n releaseDistHome,\n releasePublishHome,\n releaseSecretsHome,\n releaseSecretsPath: join(releaseSecretsHome, 'secrets.json'),\n npmPublishManifestsHome: join(releasePublishHome, 'npm-manifests'),\n configLoaderArtifactsHome: join(\n markerHome,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'framework',\n ),\n };\n}\n\n/**\n * Build the app declaration-root and runtime-home layout for a SaaS app.\n */\nexport function resolveAppLayout(appRoot: string): AppLayoutPaths {\n const runtimeHome = join(appRoot, WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME);\n const continuityHome = join(\n runtimeHome,\n APP_RUNTIME_SUBDIR_NAMES.CONTINUITY,\n );\n const distHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.DIST);\n const applicationSpecificationsDistHome = join(\n distHome,\n APP_RUNTIME_SUBDIR_NAMES.APPLICATION_SPECIFICATIONS,\n );\n const temporaryHome = join(\n runtimeHome,\n APP_RUNTIME_SUBDIR_NAMES.TEMPORARY,\n );\n const runtimeInfrastructureHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE);\n const logsHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.LOGS);\n return {\n declarationRoot: appRoot,\n declarationConfigPath: join(appRoot, AUTHORED_CONFIG_FILE_NAMES.SAAS),\n authoredInfrastructureHome: join(appRoot, APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE),\n runtimeHome,\n continuityHome,\n applicationSubjectManifestPath: join(\n continuityHome,\n APP_CONTINUITY_FILE_NAMES.APPLICATION_SUBJECT_MANIFEST,\n ),\n applicationContinuityBootstrapProfilePath: join(\n continuityHome,\n APP_CONTINUITY_FILE_NAMES.BOOTSTRAP_PROFILE,\n ),\n distHome,\n applicationSpecificationsDistHome,\n applicationSpecificationProjectionsHome: join(\n applicationSpecificationsDistHome,\n APP_RUNTIME_SUBDIR_NAMES.PROJECTIONS,\n ),\n stateHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.STATE),\n temporaryHome,\n integrationTestsTemporaryHome: join(\n temporaryHome,\n APP_RUNTIME_SUBDIR_NAMES.INTEGRATION_TESTS,\n ),\n logsHome,\n companionLogsHome: join(logsHome, 'dev-companion'),\n localDataHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.LOCAL_DATA),\n runtimeInfrastructureHome,\n runtimeEnvironmentsHome: join(runtimeInfrastructureHome, APP_RUNTIME_SUBDIR_NAMES.ENVIRONMENTS),\n deployArtifactsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.DEPLOY),\n frameworkScriptsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.FRAMEWORK_SCRIPTS),\n runtimeSignalsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.RUNTIME_SIGNALS),\n companionHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.COMPANION),\n preferencesOverlayPath: join(runtimeHome, AUTHORED_CONFIG_FILE_NAMES.APP_LOCAL_PREFERENCES),\n configLoaderArtifactsHome: join(\n distHome,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'saas',\n ),\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-scope-detector.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"workspace-scope-detector.d.ts","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-scope-detector.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAItE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAsB,GAAG,oBAAoB,CA4CvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-scope-detector.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"workspace-scope-detector.js","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-scope-detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,cAAc,EACd,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC;AAGnC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IAC/D,MAAM,MAAM,GAAyB;QACnC,KAAK,EAAE,cAAc,CAAC,aAAa;QACnC,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;QACnB,sBAAsB,EAAE,IAAI;KAC7B,CAAC;IAEF,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAEvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,kBAAkB,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAC3B,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,0BAA0B,CAAC,IAAI,CAAC,CAAC;YACjE,IAAI,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;gBAC9B,MAAM,CAAC,cAAc,GAAG,aAAa,CAAC;gBACtC,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC;YACxB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;YAC1B,MAAM,wBAAwB,GAAG,IAAI,CAAC,GAAG,EAAE,+BAA+B,CAAC,CAAC;YAC5E,IAAI,UAAU,CAAC,wBAAwB,CAAC,EAAE,CAAC;gBACzC,MAAM,CAAC,aAAa,GAAG,GAAG,CAAC;YAC7B,CAAC;QACH,CAAC;QAED,IAAI,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;YAClD,MAAM;QACR,CAAC;QAED,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClC,IAAI,MAAM,KAAK,GAAG;YAAE,MAAM;QAC1B,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;IAED,MAAM,sBAAsB,GAAG,6BAA6B,EAAE,CAAC;IAC/D,IAAI,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAEpC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CAAC,MAA4B;IAChD,IAAI,MAAM,CAAC,cAAc;QAAE,OAAO,cAAc,CAAC,QAAQ,CAAC;IAC1D,IAAI,MAAM,CAAC,aAAa;QAAE,OAAO,cAAc,CAAC,SAAS,CAAC;IAC1D,IAAI,MAAM,CAAC,sBAAsB;QAAE,OAAO,cAAc,CAAC,MAAM,CAAC;IAChE,OAAO,cAAc,CAAC,aAAa,CAAC;AACtC,CAAC","sourcesContent":["import { existsSync } from 'fs';\nimport { join, resolve } from 'path';\nimport {\n AUTHORED_CONFIG_FILE_NAMES,\n FRAMEWORK_WORKSPACE_MARKER_FILE,\n WorkspaceScope,\n resolveMachinePreferencesPath,\n} from './workspace-scope.schemas';\nimport type { WorkspaceScopeResult } from './workspace-scope.schemas';\n\nconst MAX_WALK_UP_LEVELS = 20;\n\n/**\n * Resolves the workspace scope from a given working directory.\n *\n * Performs a single upward traversal from `cwd`, checking for authored\n * declaration anchors at each directory level:\n *\n * - `wildo.saas.config.ts` — SaaS app workspace marker.\n * - `wildo-framework.info.json` — framework workspace marker. See the\n * `FRAMEWORK_WORKSPACE_MARKER_FILE` JSDoc for why the marker file is used\n * instead of the `.wildo-framework/` home directory.\n *\n * After the walk-up, checks for `~/.wildo/preferences.json` to determine\n * whether machine preferences exist.\n *\n * @param cwd - Starting directory (defaults to `process.cwd()`)\n * @returns Fully resolved scope result with all discovered paths\n */\nexport function resolveWorkspaceScope(cwd: string = process.cwd()): WorkspaceScopeResult {\n const result: WorkspaceScopeResult = {\n scope: WorkspaceScope.UNINITIALIZED,\n saasConfigPath: null,\n saasRoot: null,\n frameworkRoot: null,\n machinePreferencesPath: null,\n };\n\n let dir = resolve(cwd);\n\n for (let i = 0; i < MAX_WALK_UP_LEVELS; i++) {\n if (!result.saasConfigPath) {\n const saasCandidate = join(dir, AUTHORED_CONFIG_FILE_NAMES.SAAS);\n if (existsSync(saasCandidate)) {\n result.saasConfigPath = saasCandidate;\n result.saasRoot = dir;\n }\n }\n\n if (!result.frameworkRoot) {\n const frameworkMarkerCandidate = join(dir, FRAMEWORK_WORKSPACE_MARKER_FILE);\n if (existsSync(frameworkMarkerCandidate)) {\n result.frameworkRoot = dir;\n }\n }\n\n if (result.saasConfigPath && result.frameworkRoot) {\n break;\n }\n\n const parent = resolve(dir, '..');\n if (parent === dir) break;\n dir = parent;\n }\n\n const machinePreferencesPath = resolveMachinePreferencesPath();\n if (existsSync(machinePreferencesPath)) {\n result.machinePreferencesPath = machinePreferencesPath;\n }\n\n result.scope = computeScope(result);\n\n return result;\n}\n\n/**\n * Determines the most specific scope from the resolved anchors.\n * Order: SAAS_APP > FRAMEWORK > GLOBAL > UNINITIALIZED\n */\nfunction computeScope(result: WorkspaceScopeResult): WorkspaceScope {\n if (result.saasConfigPath) return WorkspaceScope.SAAS_APP;\n if (result.frameworkRoot) return WorkspaceScope.FRAMEWORK;\n if (result.machinePreferencesPath) return WorkspaceScope.GLOBAL;\n return WorkspaceScope.UNINITIALIZED;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-scope.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"workspace-scope.schemas.d.ts","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH;;;;;GAKG;AACH,oBAAY,cAAc;IACxB,gFAAgF;IAChF,aAAa,IAAI;IACjB,8EAA8E;IAC9E,MAAM,IAAI;IACV,sFAAsF;IACtF,SAAS,IAAI;IACb,gFAAgF;IAChF,QAAQ,IAAI;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,KAAK,EAAE,cAAc,CAAC;IAEtB,wDAAwD;IACxD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kDAAkD;IAClD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;;;;;;OAQG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,kEAAkE;IAClE,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,+BAA+B,8BAA8B,CAAC;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;CAErB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;IAanC;;;;;;;;;;;;;;;OAeG;;;;;CAKK,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;;;CAG5B,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;CAEzB,CAAC;AAEX;;;;;;;;GAQG;AACH,oBAAY,mBAAmB;IAC7B,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAMrE;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvE;AAwCD;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM,CAAC;AAC/F,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;AA+BxE;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM,CAqBpG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-scope.schemas.js","sourceRoot":"","sources":["../../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;;;GAaG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,gFAAgF;IAChF,qEAAi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,MAAM,UAAU,oCAAoC,CAAC,OAAuC;IAC1F,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,mBAAmB,CAAC,SAAS;YAChC,OAAO,IAAI,CACT,OAAO,CAAC,SAAS,EACjB,oBAAoB,CAAC,cAAc,EACnC,wBAAwB,CAAC,IAAI,EAC7B,wBAAwB,CAAC,aAAa,EACtC,WAAW,CACZ,CAAC;QACJ,KAAK,mBAAmB,CAAC,IAAI;YAC3B,OAAO,IAAI,CACT,OAAO,CAAC,SAAS,EACjB,oBAAoB,CAAC,gBAAgB,EACrC,wBAAwB,CAAC,IAAI,EAC7B,wBAAwB,CAAC,aAAa,EACtC,MAAM,CACP,CAAC;QACJ,KAAK,mBAAmB,CAAC,IAAI;YAC3B,OAAO,IAAI,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC","sourcesContent":["import { homedir, tmpdir } from 'os';\nimport { dirname, join, relative, resolve } from 'path';\nimport { resolveWorkspaceScope } from './workspace-scope-detector';\n\n/**\n * Workspace scope detection types.\n *\n * Provides a hierarchical scope model for determining where a tool\n * (CLI, companion, IDE extension) is being invoked from within the\n * Wildo project structure.\n *\n * Scope hierarchy (most specific wins, each implies parent scopes):\n * UNINITIALIZED → GLOBAL → FRAMEWORK → SAAS_APP\n *\n * Detection is based on authored declaration anchors and the framework\n * workspace marker file, not on generated runtime state such as\n * `.wildo-saas/` or ownership directories such as `.wildo-framework/`.\n */\n\n/**\n * Hierarchical workspace scope.\n *\n * Numeric values are ordered so that higher = more specific.\n * This enables `>=` comparisons for \"at least this scope\" checks.\n */\nexport enum WorkspaceScope {\n /** No machine preferences file found and CWD is outside any app or framework */\n UNINITIALIZED = 0,\n /** Machine preferences file exists but CWD is outside any app or framework */\n GLOBAL = 1,\n /** CWD is inside the Wildo framework workspace (`wildo-framework.info.json` found) */\n FRAMEWORK = 2,\n /** CWD is inside a SaaS application directory (`wildo.saas.config.ts` found) */\n SAAS_APP = 3,\n}\n\n/**\n * Result of workspace scope detection.\n *\n * All resolved paths are populated regardless of the final scope.\n */\nexport interface WorkspaceScopeResult {\n /** Most specific scope detected from CWD */\n scope: WorkspaceScope;\n\n /** Absolute path to `wildo.saas.config.ts`, if found */\n saasConfigPath: string | null;\n /** Directory containing `wildo.saas.config.ts` */\n saasRoot: string | null;\n\n /**\n * Framework workspace root: the directory containing the\n * `wildo-framework.info.json` marker file. The `.wildo-framework/` home\n * directory lives as a sibling inside the same workspace root and stores\n * framework-owned runtime artifacts (dist, secrets, publish), but it is\n * the marker file — not the directory — that authoritatively identifies a\n * framework workspace. Walking up only on the home directory would accept\n * any repo that happens to contain a folder called `.wildo-framework/`.\n */\n frameworkRoot: string | null;\n\n /** Absolute path to the machine preferences file, if it exists */\n machinePreferencesPath: string | null;\n}\n\n/**\n * Authored declaration files and machine/app preference files.\n */\nexport const AUTHORED_CONFIG_FILE_NAMES = {\n SAAS: 'wildo.saas.config.ts',\n FRAMEWORK: 'wildo.framework.config.ts',\n PREFERENCES: 'preferences.json',\n APP_LOCAL_PREFERENCES: 'wildo.preferences.local.json',\n} as const;\n\n/**\n * Marker file committed at the root of a Wildo framework workspace.\n *\n * Authoritative signal that answers \"is this directory a Wildo framework\n * workspace?\". The detector and the `platform-config-lib` jiti loader both\n * walk up the directory tree for this file — any other marker (such as the\n * `.wildo-framework/` home directory or a generic `pnpm-workspace.yaml`) is\n * intentionally NOT accepted because:\n *\n * - `.wildo-framework/` is an owned-output directory that could in principle\n * be created by any tool; directory presence alone is a weaker signal than\n * a committed marker file.\n * - `pnpm-workspace.yaml` matches any pnpm monorepo, so a framework package\n * installed into a foreign monorepo would silently mis-root its aliases.\n *\n * Shell scripts that need the same contract (e.g. platform back-office\n * `dev-supervised.sh` wrappers) hardcode this string because they cannot\n * import TypeScript; keep those literal occurrences in sync with this constant.\n */\nexport const FRAMEWORK_WORKSPACE_MARKER_FILE = 'wildo-framework.info.json';\n\n/**\n * Dot-home directory names. These homes store framework-owned runtime\n * artifacts (dist/, secrets, publish outputs), app-owned runtime state\n * (.wildo-saas/), and machine-local preferences.\n *\n * Note: `.wildo-framework/` is the framework workspace's owned home\n * directory. It is NOT the framework workspace marker — that role belongs\n * to `FRAMEWORK_WORKSPACE_MARKER_FILE` (`wildo-framework.info.json`).\n */\nexport const WORKSPACE_HOME_NAMES = {\n FRAMEWORK_HOME: '.wildo-framework',\n APP_RUNTIME_HOME: '.wildo-saas',\n} as const;\n\nexport const MACHINE_HOME_NAMES = {\n MACHINE_HOME: '.wildo',\n} as const;\n\n/**\n * Known runtime-owned directories inside the app runtime home.\n */\nexport const APP_RUNTIME_SUBDIR_NAMES = {\n CONTINUITY: 'continuity',\n DIST: 'dist',\n APPLICATION_SPECIFICATIONS: 'application-specifications',\n PROJECTIONS: 'projections',\n CONFIG_LOADER: 'config-loader',\n STATE: 'state',\n TEMPORARY: 'tmp',\n INTEGRATION_TESTS: 'integration-tests',\n LOGS: 'logs',\n LOCAL_DATA: 'local_data',\n INFRASTRUCTURE: 'infrastructure',\n ENVIRONMENTS: 'environments',\n /**\n * Env-scoped deployment-artifact staging area\n * (`.wildo-saas/deploy/<env>/{k8s,compose}/`).\n *\n * Distinct from {@link APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE}, which holds\n * the LOCAL runtime render a developer machine's stack actually loads. This\n * zone holds the render a DEPLOYMENT consumes — K8s `Secret`/`ConfigMap`\n * manifests and per-service compose `.env` files, produced by\n * `wildo config sync --domain config` and applied by the generated deploy\n * workflows.\n *\n * Every file under it is secret-bearing by construction, so the generator\n * writes an ignore-everything `.gitignore` into the zone root on each render\n * rather than relying on an application's hand-authored root `.gitignore`\n * (which the framework does not generate).\n */\n DEPLOY: 'deploy',\n FRAMEWORK_SCRIPTS: 'dev-framework-scripts',\n RUNTIME_SIGNALS: 'runtime-signals',\n COMPANION: 'wildo-dev-companion',\n} as const;\n\n/**\n * Portable application-continuity inputs maintained in the tracked\n * `.wildo-saas/continuity/` home.\n *\n * These are repository truth, unlike the generated `dist/`, mutable `state/`\n * and disposable `tmp/` zones that share the `.wildo-saas` ownership root.\n */\nexport const APP_CONTINUITY_FILE_NAMES = {\n APPLICATION_SUBJECT_MANIFEST: 'application-subject.json',\n BOOTSTRAP_PROFILE: 'bootstrap-profile.json',\n} as const;\n\n/**\n * Narrow aggregate retained for the handful of CLI commands that still\n * hand-build `<appRoot>/wildo.saas.config.ts` joins instead of reading\n * `resolvedHomes.app.declarationConfigPath`. The `FRAMEWORK_DIR`,\n * `SAAS_DIR`, `GLOBAL_DIR`, and `PREFERENCES_FILE` members that used to\n * live here were deleted in the Phase 6 closeout: framework home lookups\n * now go through `FRAMEWORK_WORKSPACE_MARKER_FILE` + `resolveFrameworkLayout`,\n * app runtime home lookups through `resolveAppLayout`, and machine\n * preferences through `resolveMachinePreferencesPath`.\n */\nexport const WORKSPACE_CONFIG_NAMES = {\n SAAS: AUTHORED_CONFIG_FILE_NAMES.SAAS,\n} as const;\n\n/**\n * Runtime-owned zones for generated config-evaluation artifacts.\n *\n * These are semantic owners, not source locations. For example, a compatibility\n * config evaluated outside the app tree can still belong to the scoped\n * workspace zone\n * and must emit artifacts under the scoped runtime home (`.wildo-saas/dist/...`),\n * not beside the authored config file itself.\n */\nexport enum ConfigArtifactsZone {\n FRAMEWORK = 'framework',\n SAAS = 'saas',\n TEMP = 'temp',\n}\n\nexport interface ConfigArtifactsLocationOptions {\n zone: ConfigArtifactsZone;\n ownerRoot: string;\n}\n\n/**\n * Absolute path to the machine Wildo home directory. Per-user, per-machine state lives here — NOT\n * shared across machines (\"global\" would be misleading).\n *\n * `$WILDO_HOME` wins when set, then `~/.wildo`. That is the rule both installers and both launchers\n * apply (`WILDO_HOME=\"${WILDO_HOME:-$HOME/.wildo}\"`), and the installer itself suggests\n * `WILDO_HOME=/path/you/own` when `~/.wildo` is not writable. Until 2026-09-24 this function ignored\n * the variable, so the CLI read and wrote a different `preferences.json` from the one its launcher\n * read — invisible while nothing the CLI wrote there changed which CLI runs, and fatal for\n * `wildo update`, whose whole effect is rewriting `cliPath` for the launcher.\n *\n * @param userHome - when given, the home is `<userHome>/.wildo` and `$WILDO_HOME` is not consulted:\n * an explicit home is a question about THAT home, not about this process's environment.\n */\nexport function resolveMachineWildoHomePath(userHome?: string): string {\n if (userHome === undefined) {\n const override = process.env.WILDO_HOME?.trim();\n if (override) return resolve(override);\n }\n return join(userHome ?? homedir(), MACHINE_HOME_NAMES.MACHINE_HOME);\n}\n\n/**\n * Absolute path to the machine preferences file (`$WILDO_HOME/preferences.json`, else\n * `~/.wildo/preferences.json`; see {@link resolveMachineWildoHomePath}). Stores per-user, per-machine\n * preferences such as `cliPath`, `frameworkPath` and `isFrameworkDeveloper`.\n */\nexport function resolveMachinePreferencesPath(userHome?: string): string {\n return join(resolveMachineWildoHomePath(userHome), AUTHORED_CONFIG_FILE_NAMES.PREFERENCES);\n}\n\nfunction isPathInside(root: string, target: string): boolean {\n const rel = relative(resolve(root), resolve(target));\n return rel === '' || (!rel.startsWith('..') && rel !== '..');\n}\n\n/**\n * Cache for the string-overload of `resolveConfigArtifactsBaseDir`.\n *\n * The overload needs to know which zone owns an arbitrary config file path.\n * That information only depends on the containing directory, so we memoize by\n * resolved directory to avoid running the full workspace-scope walk on every\n * `loadConfig` call without an explicit artifact location.\n *\n * Cache lifetime contract:\n *\n * This map is process-scoped and never evicted automatically — workspace\n * layout is treated as static for the duration of a single CLI / companion\n * process, and cache keys are absolute directory paths, so the working set\n * stays bounded by the number of distinct config-file parents touched per\n * invocation (typically a handful). Long-running hosts (dev watchers, test\n * runners, embedded editor integrations) that may observe workspace moves or\n * need to re-detect scope must call\n * {@link clearConfigArtifactsScopeCache} to force the next resolution to\n * re-walk from disk.\n */\nconst resolvedArtifactScopeCacheByDirectory = new Map<string, WorkspaceScopeResult>();\n\nfunction resolveArtifactScopeForDirectory(directoryPath: string): WorkspaceScopeResult {\n const cached = resolvedArtifactScopeCacheByDirectory.get(directoryPath);\n if (cached) {\n return cached;\n }\n\n const scope = resolveWorkspaceScope(directoryPath);\n resolvedArtifactScopeCacheByDirectory.set(directoryPath, scope);\n return scope;\n}\n\n/**\n * Clear the memoized scope lookups used by the string overload of\n * {@link resolveConfigArtifactsBaseDir}. Intended for long-running hosts and\n * tests that simulate workspace moves; standard short-lived CLI / companion\n * processes never need to call this.\n */\nexport function clearConfigArtifactsScopeCache(): void {\n resolvedArtifactScopeCacheByDirectory.clear();\n}\n\nexport function resolveConfigArtifactsBaseDir(options: ConfigArtifactsLocationOptions): string;\nexport function resolveConfigArtifactsBaseDir(filePath: string): string;\nexport function resolveConfigArtifactsBaseDir(\n input: string | ConfigArtifactsLocationOptions,\n): string {\n if (typeof input !== 'string') {\n return resolveConfigArtifactsBaseDirForZone(input);\n }\n\n const absolutePath = resolve(input);\n const scope = resolveArtifactScopeForDirectory(dirname(absolutePath));\n\n if (scope.saasRoot && isPathInside(scope.saasRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.SAAS,\n ownerRoot: scope.saasRoot,\n });\n }\n\n if (scope.frameworkRoot && isPathInside(scope.frameworkRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.FRAMEWORK,\n ownerRoot: scope.frameworkRoot,\n });\n }\n\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.TEMP,\n ownerRoot: absolutePath,\n });\n}\n\n/**\n * Resolve the canonical runtime-owned base directory for config-loader\n * artifacts. This keeps Jiti/SWC output out of authored declaration trees and\n * anchors it under the matching runtime zone.\n */\nexport function resolveConfigArtifactsBaseDirForZone(options: ConfigArtifactsLocationOptions): string {\n switch (options.zone) {\n case ConfigArtifactsZone.FRAMEWORK:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.FRAMEWORK_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'framework',\n );\n case ConfigArtifactsZone.SAAS:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'saas',\n );\n case ConfigArtifactsZone.TEMP:\n return join(tmpdir(), 'wildo-jiti-cache');\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"workspace-scope.schemas.js","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;;;GAaG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,gFAAgF;IAChF,qEAAiB,CAAA;IACjB,8EAA8E;IAC9E,uDAAU,CAAA;IACV,sFAAsF;IACtF,6DAAa,CAAA;IACb,gFAAgF;IAChF,2DAAY,CAAA;AACd,CAAC,EATW,cAAc,KAAd,cAAc,QASzB;AA+BD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,sBAAsB;IAC5B,SAAS,EAAE,2BAA2B;IACtC,WAAW,EAAE,kBAAkB;IAC/B,qBAAqB,EAAE,8BAA8B;CAC7C,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,2BAA2B,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,cAAc,EAAE,kBAAkB;IAClC,gBAAgB,EAAE,aAAa;CACvB,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY,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 'os';\nimport { dirname, join, relative, resolve } from 'path';\nimport { resolveWorkspaceScope } from './workspace-scope-detector';\n\n/**\n * Workspace scope detection types.\n *\n * Provides a hierarchical scope model for determining where a tool\n * (CLI, companion, IDE extension) is being invoked from within the\n * Wildo project structure.\n *\n * Scope hierarchy (most specific wins, each implies parent scopes):\n * UNINITIALIZED → GLOBAL → FRAMEWORK → SAAS_APP\n *\n * Detection is based on authored declaration anchors and the framework\n * workspace marker file, not on generated runtime state such as\n * `.wildo-saas/` or ownership directories such as `.wildo-framework/`.\n */\n\n/**\n * Hierarchical workspace scope.\n *\n * Numeric values are ordered so that higher = more specific.\n * This enables `>=` comparisons for \"at least this scope\" checks.\n */\nexport enum WorkspaceScope {\n /** No machine preferences file found and CWD is outside any app or framework */\n UNINITIALIZED = 0,\n /** Machine preferences file exists but CWD is outside any app or framework */\n GLOBAL = 1,\n /** CWD is inside the Wildo framework workspace (`wildo-framework.info.json` found) */\n FRAMEWORK = 2,\n /** CWD is inside a SaaS application directory (`wildo.saas.config.ts` found) */\n SAAS_APP = 3,\n}\n\n/**\n * Result of workspace scope detection.\n *\n * All resolved paths are populated regardless of the final scope.\n */\nexport interface WorkspaceScopeResult {\n /** Most specific scope detected from CWD */\n scope: WorkspaceScope;\n\n /** Absolute path to `wildo.saas.config.ts`, if found */\n saasConfigPath: string | null;\n /** Directory containing `wildo.saas.config.ts` */\n saasRoot: string | null;\n\n /**\n * Framework workspace root: the directory containing the\n * `wildo-framework.info.json` marker file. The `.wildo-framework/` home\n * directory lives as a sibling inside the same workspace root and stores\n * framework-owned runtime artifacts (dist, secrets, publish), but it is\n * the marker file — not the directory — that authoritatively identifies a\n * framework workspace. Walking up only on the home directory would accept\n * any repo that happens to contain a folder called `.wildo-framework/`.\n */\n frameworkRoot: string | null;\n\n /** Absolute path to the machine preferences file, if it exists */\n machinePreferencesPath: string | null;\n}\n\n/**\n * Authored declaration files and machine/app preference files.\n */\nexport const AUTHORED_CONFIG_FILE_NAMES = {\n SAAS: 'wildo.saas.config.ts',\n FRAMEWORK: 'wildo.framework.config.ts',\n PREFERENCES: 'preferences.json',\n APP_LOCAL_PREFERENCES: 'wildo.preferences.local.json',\n} as const;\n\n/**\n * Marker file committed at the root of a Wildo framework workspace.\n *\n * Authoritative signal that answers \"is this directory a Wildo framework\n * workspace?\". The detector and the `platform-config-lib` jiti loader both\n * walk up the directory tree for this file — any other marker (such as the\n * `.wildo-framework/` home directory or a generic `pnpm-workspace.yaml`) is\n * intentionally NOT accepted because:\n *\n * - `.wildo-framework/` is an owned-output directory that could in principle\n * be created by any tool; directory presence alone is a weaker signal than\n * a committed marker file.\n * - `pnpm-workspace.yaml` matches any pnpm monorepo, so a framework package\n * installed into a foreign monorepo would silently mis-root its aliases.\n *\n * Shell scripts that need the same contract (e.g. platform back-office\n * `dev-supervised.sh` wrappers) hardcode this string because they cannot\n * import TypeScript; keep those literal occurrences in sync with this constant.\n */\nexport const FRAMEWORK_WORKSPACE_MARKER_FILE = 'wildo-framework.info.json';\n\n/**\n * Dot-home directory names. These homes store framework-owned runtime\n * artifacts (dist/, secrets, publish outputs), app-owned runtime state\n * (.wildo-saas/), and machine-local preferences.\n *\n * Note: `.wildo-framework/` is the framework workspace's owned home\n * directory. It is NOT the framework workspace marker — that role belongs\n * to `FRAMEWORK_WORKSPACE_MARKER_FILE` (`wildo-framework.info.json`).\n */\nexport const WORKSPACE_HOME_NAMES = {\n FRAMEWORK_HOME: '.wildo-framework',\n APP_RUNTIME_HOME: '.wildo-saas',\n} as const;\n\nexport const MACHINE_HOME_NAMES = {\n MACHINE_HOME: '.wildo',\n} as const;\n\n/**\n * Known runtime-owned directories inside the app runtime home.\n */\nexport const APP_RUNTIME_SUBDIR_NAMES = {\n CONTINUITY: 'continuity',\n DIST: 'dist',\n APPLICATION_SPECIFICATIONS: 'application-specifications',\n PROJECTIONS: 'projections',\n CONFIG_LOADER: 'config-loader',\n STATE: 'state',\n TEMPORARY: 'tmp',\n INTEGRATION_TESTS: 'integration-tests',\n LOGS: 'logs',\n LOCAL_DATA: 'local_data',\n INFRASTRUCTURE: 'infrastructure',\n ENVIRONMENTS: 'environments',\n /**\n * Env-scoped deployment-artifact staging area\n * (`.wildo-saas/deploy/<env>/{k8s,compose}/`).\n *\n * Distinct from {@link APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE}, which holds\n * the LOCAL runtime render a developer machine's stack actually loads. This\n * zone holds the render a DEPLOYMENT consumes — K8s `Secret`/`ConfigMap`\n * manifests and per-service compose `.env` files, produced by\n * `wildo config sync --domain config` and applied by the generated deploy\n * workflows.\n *\n * Every file under it is secret-bearing by construction, so the generator\n * writes an ignore-everything `.gitignore` into the zone root on each render\n * rather than relying on an application's hand-authored root `.gitignore`\n * (which the framework does not generate).\n */\n DEPLOY: 'deploy',\n FRAMEWORK_SCRIPTS: 'dev-framework-scripts',\n RUNTIME_SIGNALS: 'runtime-signals',\n COMPANION: 'wildo-dev-companion',\n} as const;\n\n/**\n * Portable application-continuity inputs maintained in the tracked\n * `.wildo-saas/continuity/` home.\n *\n * These are repository truth, unlike the generated `dist/`, mutable `state/`\n * and disposable `tmp/` zones that share the `.wildo-saas` ownership root.\n */\nexport const APP_CONTINUITY_FILE_NAMES = {\n APPLICATION_SUBJECT_MANIFEST: 'application-subject.json',\n BOOTSTRAP_PROFILE: 'bootstrap-profile.json',\n} as const;\n\n/**\n * Narrow aggregate retained for the handful of CLI commands that still\n * hand-build `<appRoot>/wildo.saas.config.ts` joins instead of reading\n * `resolvedHomes.app.declarationConfigPath`. The `FRAMEWORK_DIR`,\n * `SAAS_DIR`, `GLOBAL_DIR`, and `PREFERENCES_FILE` members that used to\n * live here were deleted in the Phase 6 closeout: framework home lookups\n * now go through `FRAMEWORK_WORKSPACE_MARKER_FILE` + `resolveFrameworkLayout`,\n * app runtime home lookups through `resolveAppLayout`, and machine\n * preferences through `resolveMachinePreferencesPath`.\n */\nexport const WORKSPACE_CONFIG_NAMES = {\n SAAS: AUTHORED_CONFIG_FILE_NAMES.SAAS,\n} as const;\n\n/**\n * Runtime-owned zones for generated config-evaluation artifacts.\n *\n * These are semantic owners, not source locations. For example, a compatibility\n * config evaluated outside the app tree can still belong to the scoped\n * workspace zone\n * and must emit artifacts under the scoped runtime home (`.wildo-saas/dist/...`),\n * not beside the authored config file itself.\n */\nexport enum ConfigArtifactsZone {\n FRAMEWORK = 'framework',\n SAAS = 'saas',\n TEMP = 'temp',\n}\n\nexport interface ConfigArtifactsLocationOptions {\n zone: ConfigArtifactsZone;\n ownerRoot: string;\n}\n\n/**\n * Absolute path to the machine Wildo home directory. Per-user, per-machine state lives here — NOT\n * shared across machines (\"global\" would be misleading).\n *\n * `$WILDO_HOME` wins when set, then `~/.wildo`. That is the rule both installers and both launchers\n * apply (`WILDO_HOME=\"${WILDO_HOME:-$HOME/.wildo}\"`), and the installer itself suggests\n * `WILDO_HOME=/path/you/own` when `~/.wildo` is not writable. Until 2026-09-24 this function ignored\n * the variable, so the CLI read and wrote a different `preferences.json` from the one its launcher\n * read — invisible while nothing the CLI wrote there changed which CLI runs, and fatal for\n * `wildo update`, whose whole effect is rewriting `cliPath` for the launcher.\n *\n * @param userHome - when given, the home is `<userHome>/.wildo` and `$WILDO_HOME` is not consulted:\n * an explicit home is a question about THAT home, not about this process's environment.\n */\nexport function resolveMachineWildoHomePath(userHome?: string): string {\n if (userHome === undefined) {\n const override = process.env.WILDO_HOME?.trim();\n if (override) return resolve(override);\n }\n return join(userHome ?? homedir(), MACHINE_HOME_NAMES.MACHINE_HOME);\n}\n\n/**\n * Absolute path to the machine preferences file (`$WILDO_HOME/preferences.json`, else\n * `~/.wildo/preferences.json`; see {@link resolveMachineWildoHomePath}). Stores per-user, per-machine\n * preferences such as `cliPath`, `frameworkPath` and `isFrameworkDeveloper`.\n */\nexport function resolveMachinePreferencesPath(userHome?: string): string {\n return join(resolveMachineWildoHomePath(userHome), AUTHORED_CONFIG_FILE_NAMES.PREFERENCES);\n}\n\nfunction isPathInside(root: string, target: string): boolean {\n const rel = relative(resolve(root), resolve(target));\n return rel === '' || (!rel.startsWith('..') && rel !== '..');\n}\n\n/**\n * Cache for the string-overload of `resolveConfigArtifactsBaseDir`.\n *\n * The overload needs to know which zone owns an arbitrary config file path.\n * That information only depends on the containing directory, so we memoize by\n * resolved directory to avoid running the full workspace-scope walk on every\n * `loadConfig` call without an explicit artifact location.\n *\n * Cache lifetime contract:\n *\n * This map is process-scoped and never evicted automatically — workspace\n * layout is treated as static for the duration of a single CLI / companion\n * process, and cache keys are absolute directory paths, so the working set\n * stays bounded by the number of distinct config-file parents touched per\n * invocation (typically a handful). Long-running hosts (dev watchers, test\n * runners, embedded editor integrations) that may observe workspace moves or\n * need to re-detect scope must call\n * {@link clearConfigArtifactsScopeCache} to force the next resolution to\n * re-walk from disk.\n */\nconst resolvedArtifactScopeCacheByDirectory = new Map<string, WorkspaceScopeResult>();\n\nfunction resolveArtifactScopeForDirectory(directoryPath: string): WorkspaceScopeResult {\n const cached = resolvedArtifactScopeCacheByDirectory.get(directoryPath);\n if (cached) {\n return cached;\n }\n\n const scope = resolveWorkspaceScope(directoryPath);\n resolvedArtifactScopeCacheByDirectory.set(directoryPath, scope);\n return scope;\n}\n\n/**\n * Clear the memoized scope lookups used by the string overload of\n * {@link resolveConfigArtifactsBaseDir}. Intended for long-running hosts and\n * tests that simulate workspace moves; standard short-lived CLI / companion\n * processes never need to call this.\n */\nexport function clearConfigArtifactsScopeCache(): void {\n resolvedArtifactScopeCacheByDirectory.clear();\n}\n\nexport function resolveConfigArtifactsBaseDir(options: ConfigArtifactsLocationOptions): string;\nexport function resolveConfigArtifactsBaseDir(filePath: string): string;\nexport function resolveConfigArtifactsBaseDir(\n input: string | ConfigArtifactsLocationOptions,\n): string {\n if (typeof input !== 'string') {\n return resolveConfigArtifactsBaseDirForZone(input);\n }\n\n const absolutePath = resolve(input);\n const scope = resolveArtifactScopeForDirectory(dirname(absolutePath));\n\n if (scope.saasRoot && isPathInside(scope.saasRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.SAAS,\n ownerRoot: scope.saasRoot,\n });\n }\n\n if (scope.frameworkRoot && isPathInside(scope.frameworkRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.FRAMEWORK,\n ownerRoot: scope.frameworkRoot,\n });\n }\n\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.TEMP,\n ownerRoot: absolutePath,\n });\n}\n\n/**\n * Resolve the canonical runtime-owned base directory for config-loader\n * artifacts. This keeps Jiti/SWC output out of authored declaration trees and\n * anchors it under the matching runtime zone.\n */\nexport function resolveConfigArtifactsBaseDirForZone(options: ConfigArtifactsLocationOptions): string {\n switch (options.zone) {\n case ConfigArtifactsZone.FRAMEWORK:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.FRAMEWORK_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'framework',\n );\n case ConfigArtifactsZone.SAAS:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'saas',\n );\n case ConfigArtifactsZone.TEMP:\n return join(tmpdir(), 'wildo-jiti-cache');\n }\n}\n"]}
|