@wildo-ai/saas-specifications 1.1.8 → 1.1.10
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/_catalogs/index.d.ts.map +1 -1
- package/dist/esm/_catalogs/index.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/aggregate-offer.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/aggregate-rating.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/aggregate-rating.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/article.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/article.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/blog-posting.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/blog-posting.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/breadcrumb-list.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/breadcrumb-list.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/faq-page.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/faq-page.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/index.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/index.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/offer.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/offer.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/organization.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/organization.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/product.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/product.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/review.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/review.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/software-application.catalog-spec.js.map +1 -1
- package/dist/esm/_catalogs/schema-org/website.catalog-spec.d.ts.map +1 -1
- package/dist/esm/_catalogs/schema-org/website.catalog-spec.js.map +1 -1
- package/dist/esm/_core/application-maturity/application-maturity-validation.d.ts.map +1 -1
- package/dist/esm/_core/application-maturity/application-maturity-validation.js.map +1 -1
- package/dist/esm/_core/application-maturity/application-maturity.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/application-maturity/application-maturity.family-aspects.js.map +1 -1
- package/dist/esm/_core/application-maturity/application-maturity.schemas.d.ts.map +1 -1
- package/dist/esm/_core/application-maturity/application-maturity.schemas.js.map +1 -1
- package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +9 -0
- package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -1
- package/dist/esm/_core/application-specification-family-identity.schemas.js +9 -0
- package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -1
- package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.d.ts.map +1 -1
- package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.js.map +1 -1
- package/dist/esm/_core/assertions/assertion-behaviors.schemas.d.ts.map +1 -1
- package/dist/esm/_core/assertions/assertion-behaviors.schemas.js.map +1 -1
- package/dist/esm/_core/assertions/assertion-references.schemas.d.ts.map +1 -1
- package/dist/esm/_core/assertions/assertion-references.schemas.js.map +1 -1
- package/dist/esm/_core/assertions/assertion-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/assertions/assertion-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/assertions/assertion-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/assertions/assertion-specification.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-audience.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-audience.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-authored-metadata.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-authored-metadata.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-generation.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-logo-direction.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-logo-direction.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-name-choice.d.ts +198 -0
- package/dist/esm/_core/brand/brand-name-choice.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-choice.js +313 -0
- package/dist/esm/_core/brand/brand-name-choice.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts +148 -0
- package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js +75 -0
- package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-validation.d.ts +57 -0
- package/dist/esm/_core/brand/brand-name-screening-validation.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-validation.js +178 -0
- package/dist/esm/_core/brand/brand-name-screening-validation.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-view.d.ts +172 -0
- package/dist/esm/_core/brand/brand-name-screening-view.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-view.js +88 -0
- package/dist/esm/_core/brand/brand-name-screening-view.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts +3 -0
- package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening.family-aspects.js +42 -0
- package/dist/esm/_core/brand/brand-name-screening.family-aspects.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts +438 -0
- package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening.schemas.js +434 -0
- package/dist/esm/_core/brand/brand-name-screening.schemas.js.map +1 -0
- package/dist/esm/_core/brand/brand-name.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-name.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +23 -0
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot.schemas.js +32 -0
- package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-visual-tone.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-visual-tone.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +20 -0
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +61 -0
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +105 -0
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +137 -21
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +113 -12
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js +18 -2
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts +28 -4
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +53 -5
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +24 -4
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js +64 -4
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts +59 -0
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js +64 -0
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-references.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-references.schemas.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -1
- package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts +3 -0
- package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js +16 -0
- package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js.map +1 -1
- package/dist/esm/_core/business-semantics.specifications.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-semantics.specifications.schemas.js.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts +7 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.js +34 -28
- package/dist/esm/_core/capability-composition/capability-composition-validation.js.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.family-aspects.js.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +75 -4
- package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.js +62 -4
- package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -1
- package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-completeness-statement.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-completeness-statement.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -1
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +7 -0
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts +193 -0
- package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js +414 -0
- package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js.map +1 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/recipient-population.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/required-document-set.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/required-document-set.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/retention-enforcement-facts.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.js.map +1 -1
- package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/cross-registry-assertions.d.ts.map +1 -1
- package/dist/esm/_core/cross-registry-assertions.js.map +1 -1
- package/dist/esm/_core/data-seed-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/data-seed-specification.schemas.js.map +1 -1
- package/dist/esm/_core/definition-specification-validators.d.ts.map +1 -1
- package/dist/esm/_core/definition-specification-validators.js.map +1 -1
- package/dist/esm/_core/definition-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/definition-specification.schemas.js.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.d.ts +32 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.js +41 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.js.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts +40 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js +153 -10
- package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts +178 -3
- package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js +191 -3
- package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +21 -1
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/error-message-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/error-message-specification.schemas.js.map +1 -1
- package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.d.ts +17 -1
- package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.js +21 -5
- package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.js.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan-validation.d.ts +7 -1
- package/dist/esm/_core/experience-plan/experience-plan-validation.d.ts.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan-validation.js +39 -1
- package/dist/esm/_core/experience-plan/experience-plan-validation.js.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js +31 -5
- package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts +74 -9
- package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.schemas.js +60 -7
- package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-validation.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-personas.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-personas.family-aspects.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.js.map +1 -1
- package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -1
- package/dist/esm/_core/family-aspects.registry.js +2 -0
- package/dist/esm/_core/family-aspects.registry.js.map +1 -1
- package/dist/esm/_core/family-aspects.schemas.d.ts +24 -0
- package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -1
- package/dist/esm/_core/family-aspects.schemas.js +20 -0
- package/dist/esm/_core/family-aspects.schemas.js.map +1 -1
- package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +14 -14
- package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.js.map +1 -1
- package/dist/esm/_core/feature-drafts/capability-map-output-set-validation.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/capability-map-output-set-validation.js.map +1 -1
- package/dist/esm/_core/feature-drafts/capability-map-output-set.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/capability-map-output-set.schemas.js.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-validation.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-validation.js.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js.map +1 -1
- package/dist/esm/_core/feature-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/feature-specification.schemas.js.map +1 -1
- package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
- package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
- package/dist/esm/_core/index.d.ts +7 -0
- package/dist/esm/_core/index.d.ts.map +1 -1
- package/dist/esm/_core/index.js +7 -0
- package/dist/esm/_core/index.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan-validation.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan-validation.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +5 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.schemas.js.map +1 -1
- package/dist/esm/_core/market/feature-benefit.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/feature-benefit.schemas.js.map +1 -1
- package/dist/esm/_core/market/inherit-from.d.ts.map +1 -1
- package/dist/esm/_core/market/inherit-from.js.map +1 -1
- package/dist/esm/_core/market/is-benefit-available.d.ts.map +1 -1
- package/dist/esm/_core/market/is-benefit-available.js.map +1 -1
- package/dist/esm/_core/market/market-alternative.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-alternative.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-authored-metadata.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-authored-metadata.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-buying-journey.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-buying-journey.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-category.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-category.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-channel.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-channel.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-context-block.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-context-block.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-gain.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-gain.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-generation.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-icp.schemas.d.ts +7 -0
- package/dist/esm/_core/market/market-icp.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-icp.schemas.js +7 -0
- package/dist/esm/_core/market/market-icp.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-job.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-job.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-language-coverage.d.ts +62 -0
- package/dist/esm/_core/market/market-language-coverage.d.ts.map +1 -0
- package/dist/esm/_core/market/market-language-coverage.js +48 -0
- package/dist/esm/_core/market/market-language-coverage.js.map +1 -0
- package/dist/esm/_core/market/market-message-template.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-message-template.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-objection.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-objection.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-pain.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-pain.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-persona.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-persona.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-positioning.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-positioning.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-proof.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-proof.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-references.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-references.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-scoring.d.ts.map +1 -1
- package/dist/esm/_core/market/market-scoring.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +28 -28
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/market/market-snapshot-validation.js +2 -2
- package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-snapshot.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-tone-of-voice.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-tone-of-voice.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-trigger.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-trigger.schemas.js.map +1 -1
- package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/market/market.family-aspects.js +4 -1
- package/dist/esm/_core/market/market.family-aspects.js.map +1 -1
- package/dist/esm/_core/milestone-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/milestone-specification.schemas.js.map +1 -1
- package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts +8 -3
- package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js +6 -3
- package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +10 -1
- package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-validation.js +40 -1
- package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +27 -0
- package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js +41 -0
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
- package/dist/esm/_core/product-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/product-specification.schemas.js.map +1 -1
- package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/provider-specification.schemas.js.map +1 -1
- package/dist/esm/_core/required-features-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/required-features-specification.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts +3 -2
- package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/functional-requirement.schemas.js +8 -2
- package/dist/esm/_core/requirements/functional-requirement.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/non-functional-requirement.schemas.d.ts +1 -0
- package/dist/esm/_core/requirements/non-functional-requirement.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/non-functional-requirement.schemas.js +2 -0
- package/dist/esm/_core/requirements/non-functional-requirement.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-pain-coverage.d.ts +41 -0
- package/dist/esm/_core/requirements/requirements-pain-coverage.d.ts.map +1 -0
- package/dist/esm/_core/requirements/requirements-pain-coverage.js +63 -0
- package/dist/esm/_core/requirements/requirements-pain-coverage.js.map +1 -0
- package/dist/esm/_core/requirements/requirements-references.schemas.d.ts +1 -1
- package/dist/esm/_core/requirements/requirements-references.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-references.schemas.js +1 -1
- package/dist/esm/_core/requirements/requirements-references.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts +16 -0
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js +12 -1
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts +13 -2
- package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-validation.js +32 -1
- package/dist/esm/_core/requirements/requirements-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts +65 -1
- package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot.schemas.js +53 -1
- package/dist/esm/_core/requirements/requirements-snapshot.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements.family-aspects.js +2 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -1
- package/dist/esm/_core/resource-specification-registry-alignment.d.ts.map +1 -1
- package/dist/esm/_core/resource-specification-registry-alignment.js.map +1 -1
- package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
- package/dist/esm/_core/resource-type-member-name.types.d.ts.map +1 -1
- package/dist/esm/_core/resource-type-member-name.types.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-phase.schemas.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-phase.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-references.schemas.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-references.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -1
- package/dist/esm/_core/role-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/role-specification.schemas.js.map +1 -1
- package/dist/esm/_core/sidebar-section-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/sidebar-section-specification.schemas.js.map +1 -1
- package/dist/esm/_core/system-email-template-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/system-email-template-specification.schemas.js.map +1 -1
- package/dist/esm/_core/translation-slot-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/translation-slot-specification.schemas.js.map +1 -1
- package/dist/esm/_core/utils/extract-field-specs.d.ts.map +1 -1
- package/dist/esm/_core/utils/extract-field-specs.js.map +1 -1
- package/dist/esm/_core/utils/family-ref-stamping.d.ts.map +1 -1
- package/dist/esm/_core/utils/family-ref-stamping.js.map +1 -1
- package/dist/esm/_core/utils/retention-clock-field-specs.d.ts.map +1 -1
- package/dist/esm/_core/utils/retention-clock-field-specs.js.map +1 -1
- package/dist/esm/_core/utils/retention-marker-field-specs.d.ts.map +1 -1
- package/dist/esm/_core/utils/retention-marker-field-specs.js.map +1 -1
- package/dist/esm/_core/utils/validate-field-shapes.d.ts.map +1 -1
- package/dist/esm/_core/utils/validate-field-shapes.js.map +1 -1
- package/dist/esm/_core/vision/vision-authored-metadata.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-authored-metadata.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision-constraint.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-constraint.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision-idea.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-idea.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision-mission.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-mission.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision-problem.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-problem.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision-references.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-references.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/vision/vision-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-snapshot.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision-success-criterion.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-success-criterion.schemas.js.map +1 -1
- package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -1
- package/dist/esm/_core/website-plan/website-plan-generation.schemas.d.ts +2 -0
- package/dist/esm/_core/website-plan/website-plan-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/website-plan/website-plan-generation.schemas.js.map +1 -1
- package/dist/esm/_core/website-plan/website-plan-validation.d.ts +7 -1
- package/dist/esm/_core/website-plan/website-plan-validation.d.ts.map +1 -1
- package/dist/esm/_core/website-plan/website-plan-validation.js +16 -1
- package/dist/esm/_core/website-plan/website-plan-validation.js.map +1 -1
- package/dist/esm/_core/website-plan/website-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/website-plan/website-plan.family-aspects.js +5 -1
- package/dist/esm/_core/website-plan/website-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/website-plan/website-plan.schemas.d.ts +54 -0
- package/dist/esm/_core/website-plan/website-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/website-plan/website-plan.schemas.js +25 -0
- package/dist/esm/_core/website-plan/website-plan.schemas.js.map +1 -1
- package/dist/esm/_core/zod-core-nameability.d.ts.map +1 -1
- package/dist/esm/_core/zod-core-nameability.js.map +1 -1
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +81 -2
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +83 -5
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-line.application-creation.schemas.js +2 -0
- package/dist/esm/application-creation/application-line.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-specification-family-decisions.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/creator-inputs.family-aspects.d.ts.map +1 -1
- package/dist/esm/application-creation/creator-inputs.family-aspects.js.map +1 -1
- package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -1
- package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -1
- package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -1
- package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -1
- package/dist/esm/application-creation/domain-plan-evaluation-identities.application-creation.definitions.d.ts +7 -1
- package/dist/esm/application-creation/domain-plan-evaluation-identities.application-creation.definitions.d.ts.map +1 -1
- package/dist/esm/application-creation/domain-plan-evaluation-identities.application-creation.definitions.js +7 -1
- package/dist/esm/application-creation/domain-plan-evaluation-identities.application-creation.definitions.js.map +1 -1
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbook-instance.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +114 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js +136 -8
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/specification-content-validation-state.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/specification-content-validation-state.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +1 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +1 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation.exports.d.ts +8 -0
- package/dist/esm/application-creation.exports.d.ts.map +1 -1
- package/dist/esm/application-creation.exports.js +8 -0
- package/dist/esm/application-creation.exports.js.map +1 -1
- package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
- package/dist/esm/assurance/application-document-release-set.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/application-document-release-set.schemas.js.map +1 -1
- package/dist/esm/assurance/application-risk-register.family-aspects.d.ts.map +1 -1
- package/dist/esm/assurance/application-risk-register.family-aspects.js.map +1 -1
- package/dist/esm/assurance/application-risk-register.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/application-risk-register.schemas.js.map +1 -1
- package/dist/esm/assurance/application-risk-signals.derivations.d.ts +20 -0
- package/dist/esm/assurance/application-risk-signals.derivations.d.ts.map +1 -1
- package/dist/esm/assurance/application-risk-signals.derivations.js +85 -0
- package/dist/esm/assurance/application-risk-signals.derivations.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-document-blueprint-selection.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-blueprint-selection.js.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-evidence-judgement.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-evidence-judgement.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -1
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -1
- package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -1
- package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -1
- package/dist/esm/assurance/document-release-set.family-aspects.d.ts.map +1 -1
- package/dist/esm/assurance/document-release-set.family-aspects.js.map +1 -1
- package/dist/esm/assurance/governed-document-release.d.ts +9 -0
- package/dist/esm/assurance/governed-document-release.d.ts.map +1 -1
- package/dist/esm/assurance/governed-document-release.js +9 -0
- package/dist/esm/assurance/governed-document-release.js.map +1 -1
- package/dist/esm/assurance.exports.d.ts.map +1 -1
- package/dist/esm/assurance.exports.js.map +1 -1
- package/dist/esm/companion-exports.d.ts +10 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/engine/_bootstrap.d.ts.map +1 -1
- package/dist/esm/engine/_bootstrap.js.map +1 -1
- package/dist/esm/engine/applications/index.d.ts.map +1 -1
- package/dist/esm/engine/applications/index.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/index.js.map +1 -1
- package/dist/esm/engine/auth/index.d.ts.map +1 -1
- package/dist/esm/engine/auth/index.js.map +1 -1
- package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/index.js.map +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/index.d.ts.map +1 -1
- package/dist/esm/engine/billing/index.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-api-reference-examples.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-api-reference-examples.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/index.js.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/index.d.ts.map +1 -1
- package/dist/esm/engine/compliance/index.js.map +1 -1
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/index.js.map +1 -1
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.js.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.js +3 -0
- package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
- package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -1
- package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
- package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
- package/dist/esm/engine/errors/index.d.ts.map +1 -1
- package/dist/esm/engine/errors/index.js.map +1 -1
- package/dist/esm/engine/features/_engine-feature-shared.d.ts.map +1 -1
- package/dist/esm/engine/features/_engine-feature-shared.js.map +1 -1
- package/dist/esm/engine/features/advanced-analytics.feature.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/advanced-analytics.feature.specification.js.map +1 -1
- package/dist/esm/engine/features/audit-logs.feature.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/audit-logs.feature.specification.js.map +1 -1
- package/dist/esm/engine/features/core-limits.feature.specifications.d.ts.map +1 -1
- package/dist/esm/engine/features/core-limits.feature.specifications.js.map +1 -1
- package/dist/esm/engine/features/custom-branding.feature.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/custom-branding.feature.specification.js.map +1 -1
- package/dist/esm/engine/features/directory-provisioning.feature.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/directory-provisioning.feature.specification.js.map +1 -1
- package/dist/esm/engine/features/index.d.ts.map +1 -1
- package/dist/esm/engine/features/index.js.map +1 -1
- package/dist/esm/engine/features/m2m-webhook-delivery.feature.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/m2m-webhook-delivery.feature.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/index.js.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/security-event-export.feature.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/security-event-export.feature.specification.js.map +1 -1
- package/dist/esm/engine/features/single-sign-on.feature.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/single-sign-on.feature.specification.js.map +1 -1
- package/dist/esm/engine/files/index.d.ts.map +1 -1
- package/dist/esm/engine/files/index.js.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
- package/dist/esm/engine/files/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/files/resources/index.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/actions/action-bar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/actions/action-bar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/actions/action-button.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/actions/action-button.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/actions/button-group-separator.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/actions/button-group-separator.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/actions/button-group-text.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/actions/button-group-text.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/actions/button-group.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/actions/button-group.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/actions/button.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/actions/button.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-artifact-list.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-artifact-list.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-artifact.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-artifact.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-code-block.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-code-block.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-image.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-image.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-web-preview.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-web-preview.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-conversation.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-conversation.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-message.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-message.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-prompt-input.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-prompt-input.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-sources.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-sources.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-suggestion.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-suggestion.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-suggestions.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/chat/ai-suggestions.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-queue.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-queue.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-request.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-request.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-decision-request.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-decision-request.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-human-input-request.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/decision/ai-human-input-request.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/execution/ai-confirmation.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/execution/ai-confirmation.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/execution/ai-queue.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/execution/ai-queue.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/execution/ai-task.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/execution/ai-task.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/execution/ai-tool.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/execution/ai-tool.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-canvas.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-canvas.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-connection.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-connection.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-controls.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-controls.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-edge.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-edge.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-node.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-node.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-panel.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-panel.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-toolbar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/graph/ai-toolbar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-agent-capabilities.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-agent-capabilities.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-agent-card.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-agent-card.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-agent-list.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-agent-list.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-agent-prompt-spec.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-agent-prompt-spec.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-context.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-context.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-model-selector.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-model-selector.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-open-in-chat.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/meta/ai-open-in-chat.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/shared/ai-loader.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/shared/ai-loader.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/shared/ai-shimmer.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/shared/ai-shimmer.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-chain-of-thought.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-chain-of-thought.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-checkpoint.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-checkpoint.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-inline-citation.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-inline-citation.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-plan.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-plan.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-reasoning.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/ai-elements/trace/ai-reasoning.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-appearance-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-appearance-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-error-boundary.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-error-boundary.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-home.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-home.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-invitations-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-invitations-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-main-container.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-main-container.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-router-error-boundary.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-router-error-boundary.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-settings-hub.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-settings-hub.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layouts-test-component.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layouts-test-component.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/lifecycle-home-activation-progress.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/lifecycle-home-activation-progress.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/lifecycle-home-dashboard.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/lifecycle-home-dashboard.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/lifecycle-home-welcome-back.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/lifecycle-home-welcome-back.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-legal-notice.frontend-component.specification.d.ts +4 -0
- package/dist/esm/engine/frontend-components/app/public-layout-legal-notice.frontend-component.specification.d.ts.map +1 -0
- package/dist/esm/engine/frontend-components/app/public-layout-legal-notice.frontend-component.specification.js +22 -0
- package/dist/esm/engine/frontend-components/app/public-layout-legal-notice.frontend-component.specification.js.map +1 -0
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-static-content-container.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-static-content-container.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-terms.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-terms.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/admin-config/app-page-security-settings.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/admin-config/app-page-security-settings.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-auth-callback.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-auth-callback.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-enrollment-required.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-enrollment-required.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-magic-link-verify.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-magic-link-verify.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-mfa-challenge.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-mfa-challenge.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-oauth-consent.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-oauth-consent.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-oauth-logged-out.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-oauth-logged-out.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-oauth-logout-confirm.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-oauth-logout-confirm.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-one-off-session.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-one-off-session.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-auth.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-auth.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-confirm-email.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-confirm-email.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-invitation.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-invitation.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-password-lost.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-password-lost.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-register.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/auth/public-layout-user-register.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-invoice-history.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-invoice-history.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-portal-link.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-portal-link.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-subscription-status.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-subscription-status.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-usage-dashboard.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/billing/billing-usage-dashboard.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/avatar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/avatar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/badge.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/badge.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/description-details.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/description-details.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/description-list.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/description-list.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/description-term.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/description-term.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/_display-field-spec.factory.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/_display-field-spec.factory.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-bigdecimal.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-bigdecimal.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-boolean.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-boolean.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-code.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-code.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-date.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-date.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-datetime.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-datetime.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-duration.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-duration.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-enum.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-enum.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-audio.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-audio.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-document.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-document.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-gallery.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-gallery.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-image.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-image.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-video.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-video.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-foreign-key.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-foreign-key.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-money.extra-props.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-money.extra-props.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-money.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-money.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-number.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-number.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-phone.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-phone.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-bigdecimal.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-bigdecimal.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-date.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-date.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-datetime.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-datetime.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-money.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-money.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-number.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-number.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-time.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-range-time.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-string.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-string.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-time.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/formatters/display-field-time.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/notification-indicator.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/notification-indicator.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/celebration-overlay.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/celebration-overlay.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/danger-zone.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/danger-zone.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/empty-state.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/empty-state.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/error-display.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/error-display.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/features/feature-limit-indicator.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/features/feature-limit-indicator.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/features/feature-lock-badge.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/features/feature-lock-badge.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/features/feature-unavailable-dialog.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/features/feature-unavailable-dialog.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/features/feature-unavailable-prompt.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/features/feature-unavailable-prompt.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/loading-overlay.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/loading-overlay.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/loading-spinner.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/loading-spinner.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/operations-confirm-critical.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/operations-confirm-critical.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/progress.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/progress.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/skeleton.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/skeleton.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/toast.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/feedback/toast.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-actor.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-actor.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-agent-config.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-agent-config.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-artifact-browser.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-artifact-browser.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-decision.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-decision.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-execution-plan.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-execution-plan.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-execution-stream.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-execution-stream.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-flow-execution.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-flow-execution.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-flow-node.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-flow-node.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-system-catalog.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-system-catalog.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-task-detail.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-task-detail.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-task-memory.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-task-memory.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/_framework-layout-form-field-spec.factory.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/_framework-layout-form-field-spec.factory.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/_low-level-preset-wrapper-spec.factory.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/_low-level-preset-wrapper-spec.factory.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/autosave-indicator.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/autosave-indicator.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-content.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-content.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-description.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-description.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-error.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-error.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-label.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-label.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-separator.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-separator.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-title.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field-title.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/field.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-control.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-control.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-description.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-description.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-field.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-field.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-item.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-item.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-label.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-label.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-message.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-message.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-root.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/chromes/form-root.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/combobox-multiple.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/combobox-multiple.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/combobox.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/combobox.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/boolean/checkbox.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/boolean/checkbox.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/boolean/switch.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/boolean/switch.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/boolean/toggle-group-boolean.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/boolean/toggle-group-boolean.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/boolean/toggle.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/boolean/toggle.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/calendar-day-button.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/calendar-day-button.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/calendar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/calendar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/date-range-picker.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/date-range-picker.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/datepicker.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/datepicker.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/datetime-picker.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/datetime-picker.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/datetime-range-picker.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/datetime-range-picker.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/time-picker.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/time-picker.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/time-range-picker.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/date-time/time-range-picker.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/radio-group.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/radio-group.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/radio-item.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/radio-item.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/select-multiple.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/select-multiple.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/select.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/select.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/toggle-group.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/enum/toggle-group.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/file/file-upload.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/file/file-upload.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/file/image-crop.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/file/image-crop.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-addon.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-addon.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-button.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-button.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-input.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-input.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-text.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-text.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-textarea.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group-textarea.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input-group.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/input.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/number/range-slider.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/number/range-slider.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/number/slider.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/number/slider.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/color-input.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/color-input.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/input-otp.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/input-otp.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/markdown-editor.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/markdown-editor.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/password-input.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/password-input.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/textarea.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/controls/string/textarea.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-bigdecimal.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-bigdecimal.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-boolean.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-boolean.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-code.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-code.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-date.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-date.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-datetime.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-datetime.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-duration.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-duration.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-enum.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-enum.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-file.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-file.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-money.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-money.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-number.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-number.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-phone.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-phone.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-bigdecimal.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-bigdecimal.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-date.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-date.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-datetime.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-datetime.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-money.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-money.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-number.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-number.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-time.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-range-time.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-string.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-string.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-time.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/fields/form-field-time.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/form/form-field-foreign-key.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/form/form-field-foreign-key.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-announcement.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-announcement.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-badge.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-badge.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-banner.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-banner.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-card.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-card.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-checklist-item.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-checklist-item.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-checklist.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-checklist.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-modal.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-modal.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-onboarding-view.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-onboarding-view.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-survey.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-survey.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-tooltip.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-tooltip.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-tour.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/guidance/guidance-tour.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/chart-echarts.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/chart-echarts.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/chart-widget.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/chart-widget.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-chart.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-chart.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-composite.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-composite.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-execution.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-execution.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-flows-actors.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-flows-actors.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-full-custom.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-full-custom.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-not-found.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/high-level-views/high-level-views-not-found.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/index.d.ts +1 -0
- package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/index.js +3 -0
- package/dist/esm/engine/frontend-components/index.js.map +1 -1
- package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout/aspect-ratio.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout/aspect-ratio.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout/carousel.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout/carousel.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout/divider.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout/divider.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout/resizable-panel-group.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout/resizable-panel-group.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout/scroll-area.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout/scroll-area.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout/separator.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout/separator.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-content-section-container.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-content-section-container.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-content-section-group.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-content-section-group.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-content-section-legend.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-content-section-legend.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-content-section.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-content-section.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-overlay-container.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/layout-internals/low-level-overlay-container.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/activity-bar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/activity-bar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/command-menu.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/command-menu.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/control-panel.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/control-panel.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/menubar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/menubar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/navigation-back.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/navigation-back.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/notification-center.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/notification-center.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/quick-action-button.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/quick-action-button.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/quick-switcher.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/quick-switcher.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/sidebar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/sidebar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/status-bar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/status-bar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/toolbar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/toolbar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/user-dropdown.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/user-dropdown.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/utility-panel.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/app-level/utility-panel.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/breadcrumb.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/breadcrumb.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/command.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/command.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/menu-bar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/menu-bar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/navbar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/navbar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/sidebar.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/navigation/sidebar.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/alert-dialog.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/alert-dialog.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/alert.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/alert.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/dialog.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/dialog.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/drawer.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/drawer.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/sheet.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/containers/sheet.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/context-menu.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/context-menu.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/dropdown-menu.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/dropdown-menu.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/hover-card.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/hover-card.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/popover.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/popover.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/tooltip.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/overlays/floating/tooltip.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/progression/progression-achievement-badge.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/progression/progression-achievement-badge.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/_framework-layout-resource-layout-spec.factory.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/_framework-layout-resource-layout-spec.factory.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-action.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-action.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-breadcrumb.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-breadcrumb.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-container-dialogs.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-container-dialogs.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-container-nested.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-container-nested.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-create.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-create.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-danger-zone.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-danger-zone.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-empty-state.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-empty-state.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-filters.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-filters.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-header.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-header.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-list-table.frontend-component.preset-specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-list-table.frontend-component.preset-specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-list.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-list.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-operation-bulk.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-operation-bulk.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-operations-items.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-operations-items.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-pagination.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-pagination.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-read-expandable.frontend-component.preset-specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-read-expandable.frontend-component.preset-specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-read-summary-table-row.frontend-component.preset-specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-read-summary-table-row.frontend-component.preset-specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-read-summary.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-read-summary.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-read.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-read.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-search-table.frontend-component.preset-specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-search-table.frontend-component.preset-specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-search.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-search.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-update.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resource-layout-update.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-display.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-display.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-edit-search.frontend-component.preset-specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-edit-search.frontend-component.preset-specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-edit.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/resources/resources-fields-resource-reference-edit.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/accordion.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/accordion.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/card.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/card.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/collapsible.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/collapsible.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/pagination.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/pagination.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/stacked-layout.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/stacked-layout.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/stepper.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/stepper.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/table.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/table.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/sections/tabs.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/sections/tabs.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/typography/code.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/typography/code.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/typography/heading.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/typography/heading.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/typography/label.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/typography/label.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/typography/link.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/typography/link.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/typography/strong.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/typography/strong.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/typography/subheading.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/typography/subheading.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/typography/text-link.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/typography/text-link.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/full-custom-views/index.d.ts.map +1 -1
- package/dist/esm/engine/full-custom-views/index.js.map +1 -1
- package/dist/esm/engine/guidance/index.d.ts.map +1 -1
- package/dist/esm/engine/guidance/index.js.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/index.js.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/index.d.ts.map +1 -1
- package/dist/esm/engine/index.js.map +1 -1
- package/dist/esm/engine/infrastructure/index.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/index.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/document-sequence-counters.resource.specification.d.ts +9 -0
- package/dist/esm/engine/infrastructure/resources/document-sequence-counters.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/infrastructure/resources/document-sequence-counters.resource.specification.js +110 -0
- package/dist/esm/engine/infrastructure/resources/document-sequence-counters.resource.specification.js.map +1 -0
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pending-references.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/index.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +1 -0
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/system-of-record-write-admissions.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/index.d.ts.map +1 -1
- package/dist/esm/engine/notifications/index.js.map +1 -1
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/index.js.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/system-emails/authentication.system-emails.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/system-emails/authentication.system-emails.specification.js.map +1 -1
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.js.map +1 -1
- package/dist/esm/engine/notifications/system-emails/index.d.ts.map +1 -1
- package/dist/esm/engine/notifications/system-emails/index.js.map +1 -1
- package/dist/esm/engine/notifications/system-emails/organization.system-emails.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/system-emails/organization.system-emails.specification.js.map +1 -1
- package/dist/esm/engine/notifications/system-emails/security.system-emails.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/system-emails/security.system-emails.specification.js.map +1 -1
- package/dist/esm/engine/notifications/system-emails/subscription.system-emails.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/system-emails/subscription.system-emails.specification.js.map +1 -1
- package/dist/esm/engine/organizations/index.d.ts.map +1 -1
- package/dist/esm/engine/organizations/index.js.map +1 -1
- package/dist/esm/engine/organizations/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/index.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.js.map +1 -1
- package/dist/esm/engine/providers/_engine-provider-shared.d.ts.map +1 -1
- package/dist/esm/engine/providers/_engine-provider-shared.js.map +1 -1
- package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/github.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/google-places.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/google-places.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/google.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/index.d.ts.map +1 -1
- package/dist/esm/engine/providers/index.js.map +1 -1
- package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/recaptcha.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/recaptcha.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -1
- package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -1
- package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -1
- package/dist/esm/engine/roles/_engine-role-shared.d.ts.map +1 -1
- package/dist/esm/engine/roles/_engine-role-shared.js.map +1 -1
- package/dist/esm/engine/roles/app-admin-billing-manager.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-admin-billing-manager.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-admin-marketing-editor.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-admin-marketing-editor.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-admin-super-admin.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-admin-super-admin.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-admin-viewer.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-admin-viewer.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-anonymous.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-anonymous.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-billing-provider-events.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-email-inbound-intake.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-public.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-public.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/app-user.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/app-user.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/index.d.ts.map +1 -1
- package/dist/esm/engine/roles/index.js.map +1 -1
- package/dist/esm/engine/roles/org-admin.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/org-admin.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/org-billing-provider-events.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/org-guest.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/org-guest.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/org-manager.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/org-manager.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/org-member.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/org-member.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/org-owner.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/org-owner.role.specification.js.map +1 -1
- package/dist/esm/engine/roles/org-service-provider.role.specification.d.ts.map +1 -1
- package/dist/esm/engine/roles/org-service-provider.role.specification.js.map +1 -1
- package/dist/esm/engine/users/index.d.ts.map +1 -1
- package/dist/esm/engine/users/index.js.map +1 -1
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/index.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/index.js.map +1 -1
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/self-service-user-notifications.shared.js.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/users-api-reference.examples.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/users-api-reference.examples.js.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-chapters.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-chapters.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.d.ts +2 -2
- package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-plan-validation.d.ts.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-plan-validation.js.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.js.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-plan.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/application-documentation-plan.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-api-reference-targets.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-api-reference-targets.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-assets.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-assets.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-capture.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-capture.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-common.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-common.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-environment-identity.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-environment-identity.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-evidence.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-evidence.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-lifecycle.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-lifecycle.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-publication.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-publication.schemas.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
- package/dist/esm/technical-documentation.exports.d.ts.map +1 -1
- package/dist/esm/technical-documentation.exports.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts +0 -24
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts.map +0 -1
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js +0 -24
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-specification.schemas.js","sourceRoot":"","sources":["../../../../src/_core/resource-specification.schemas.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,mBAAmB,EACnB,0CAA0C,EAC1C,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,SAAS,EACT,2BAA2B,EAC3B,0BAA0B,EAC1B,oBAAoB,EACpB,8BAA8B,EAC9B,4BAA4B,EAE5B,oBAAoB,EACpB,qBAAqB,EAErB,2BAA2B,EAC3B,gCAAgC,GACjC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAE,4BAA4B,EAA8E,MAAM,qCAAqC,CAAC;AAE/J,OAAO,EACL,uBAAuB,GAIxB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAOpE,OAAO,EAAE,2CA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AAI,iBAAiB,EAAE,CAAC;YAC5C,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC1C,MAAM,IAAI,KAAK,CACb,qDAAqD,QAAQ,KAAK,OAAO,8BAA8B,WAAW,+DAA+D,CAClL,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["import type { z } from 'zod';\nimport type {\n CodeEnumMemberRef,\n CodeSymbolRef,\n EnumLikeType,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport type {\n LayoutRefManifest,\n ObjectShape,\n ResourceConfigLike,\n ResourceOperationFrontendConfig,\n ResourceUIBehaviorConfig,\n ResourceUIBehavior_EmptyState,\n ResourceUIBehavior_GuidanceFlow,\n} from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n FRONTEND_SCHEMA_KEY,\n collectExecutionViewSurfaceRefsByOperation,\n collectOperationLikeViewRefs,\n} from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CoreM2MNotificationChannel,\n CoreResourceOperation,\n ErrorCustomMessageReference,\n ErrorType,\n CoreUserNotificationChannel,\n CoreUserNotificationTarget,\n M2MNotificationLevel,\n ResourceGeneratedOperationKind,\n ResourceOperationVariantType,\n ResourceOperationFrontendSurface,\n ResourcePrimaryScope,\n Resources_SharedUtils,\n SystemEmailTemplateRef,\n SystemEmailTemplateRegistry,\n collectTemplatableFileFieldPaths,\n} from '@wildo-ai/saas-models';\nimport type { ResourceRelationship, ValidOperationKeys } from '@wildo-ai/saas-models';\nimport { ResourceCollectionExportFormat, ResourceCollectionExportRowScope } from '@wildo-ai/saas-models';\nimport { describeExternalDataPipeline, type ExternalDataPipelineDeclaration, type ExternalDataPipelineDescription } from '@wildo-ai/saas-models/external-data';\nimport type { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CustomBatchManifestKind,\n type CustomBatchManifest,\n type ResourceAnchoredCustomBatchManifest,\n type ScopeAnchoredCustomBatchManifest,\n} from '@wildo-ai/saas-backend-lib/custom-batch-manifests';\nimport type { ExtractedFieldSpec } from './utils/extract-field-specs';\nimport { validateFieldShapes } from './utils/validate-field-shapes';\nimport type { CodeCollectionEntryRef } from './definition-specification.schemas';\nimport type {\n StructuralTranslationSlotSpecification,\n TranslationSlotSpecification,\n TranslationSlotSpecificationMap,\n} from './translation-slot-specification.schemas';\nimport { assertOptionalRequiredFeaturesSpecification } from './required-features-specification.schemas';\nimport type { RequiredFeaturesSpecification } from './required-features-specification.schemas';\nimport {\n FileGenerationSource,\n getZodDef,\n getZodDefArrayProperty,\n getZodDefSchemaProperty,\n getFileMetadata,\n getZodObjectShape,\n getZodType,\n isTemplatableFileField,\n unwrapSchema,\n} from '@wildo-ai/zod-decorators';\n\n\n// ── Operation Specification ─────────────────────────────────────────────────\n\n/**\n * @wildo_source:part:start saas.specifications.resource-operation-spec facet:layer:specification facet:family:companion\n *\n * Companion-facing semantic prose for operations and variants (`resourceSpecification().operations`).\n *\n * **Per-variant** semantics (`ResourceOperationVariantSpecification`):\n * Provides sparse overlays for an operation's business prose and, when an\n * HTTP response shape genuinely differs, its payload examples. URLs, DTO\n * shape, and authorization rules remain structural contracts; prose explains\n * what the operation accomplishes in business terms, while examples make the\n * concrete transport representation understandable.\n *\n * **Per-operation** map types (`ResourceOperationSpecification`, maps) layer\n * shared operation meaning plus optional named variants (`admin`, `summary`,\n * `context`, …) aligned with the resource configuration vocabulary.\n *\n * **HTTP documentation** fields on `ResourceOperationSpecification`\n * (`responseStatuses`, `errorScenarios`, `idempotent`, `rateLimitNote`,\n * `examples`) carry the transport-level outcomes the OpenAPI generator emits\n * as `responses` / `examples` / `x-idempotent`. Response outcomes are\n * per-operation. Base examples apply to every variant unless a variant owns a\n * complete replacement, preventing a full DTO example from leaking into a\n * context or summary response. HTTP-only fields are intentionally excluded\n * from frontend-view specs, which are not HTTP operations.\n */\nexport interface ResourceOperationVariantSpecification {\n /** Business intent of the operation when this variant differs from the base operation. */\n purpose?: string;\n /** Observable business result once the operation succeeds. */\n outcome?: string;\n /** Guidance about when this operation is the right choice. */\n whenToUse?: string;\n /** Relative weight of this operation in the resource understanding. */\n importance?: FieldSemanticImportance;\n /**\n * Override the resource-level label {@link LabelAudience} for THIS operation's\n * generated labels. Use when a mostly-end-user resource exposes an admin-only\n * operation (or vice-versa) so its copy adopts the right register without\n * reclassifying the whole resource. Omit to inherit the resource's `audience`.\n */\n audienceOverride?: LabelAudience;\n /**\n * Variant-specific OpenAPI examples. When present, these REPLACE the base\n * operation `examples` for this variant; they never merge. Use this where a\n * context or summary response has a different schema from the default path.\n */\n examples?: ResourceOperationExampleSpecification[];\n}\n\n/**\n * Variant map for one operation.\n *\n * `default` represents the default/no-explicit-variant path. Named variant keys\n * (`admin`, `summary`, `context`, `internal`, ...) mirror the authored\n * operation-variant vocabulary instead of flattening them into synthetic tuples.\n */\nexport type ResourceOperationSpecificationVariants = Record<string, ResourceOperationVariantSpecification | undefined> & {\n default?: ResourceOperationVariantSpecification;\n};\n\n/**\n * Frontend-view variants preserve business semantics but deliberately exclude\n * HTTP examples: a frontend view is not an API operation and must not become a\n * second authoring path for generated OpenAPI payloads.\n */\nexport type ResourceFrontendViewSpecificationVariants = Record<\n string,\n Omit<ResourceOperationVariantSpecification, 'examples'> | undefined\n> & {\n default?: Omit<ResourceOperationVariantSpecification, 'examples'>;\n};\n\n/**\n * Import-oriented metadata for the email fired by a resource operation.\n *\n * Lets downstream transposer/code-generation layers point at the real event\n * payload schema without re-reading the resource's backend code.\n */\nexport interface ResourceOperationEmailSpecificationCodeHandling {\n /** Public Zod schema symbol that describes the event payload of the email. */\n eventDataSchemaSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the payload type is split from its Zod schema. */\n eventDataTypeSymbol?: CodeSymbolRef;\n /** Extra supporting symbols (builders, renderers) that transposer prompts need. */\n supportingSymbols?: CodeSymbolRef[];\n /** Companion/transposer caveats that must survive serialization. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for ONE email delivery fired by a resource operation.\n *\n * Models the engine fan-out faithfully: every entry in the runtime\n * `userNotifications[]` array with `channel === EMAIL` is one delivery, and\n * the runtime constructs a distinct template-ref path for each\n * `(variantKey, targetType, customNotificationRef)` combination through the\n * notifications dispatcher (`email.{resourceId}.{op}.{variant?}.{target-kebab}_{customRef?}`).\n *\n * Authoring sites declare one delivery per such combination so:\n * - companion prompts know exactly how many template files exist for the operation,\n * - translators can author per-delivery overrides when the audience changes the copy,\n * - transposers can compute the runtime template-ref path from the spec without\n * re-reading the resource configuration code.\n *\n * The parent `ResourceOperationEmailSpecification` carries shared semantics\n * (purpose, tone, default text slots, event data); per-delivery overrides\n * layer on top via `purposeOverride`, `textSlotsOverrides`,\n * `additionalBusinessConstraints`. Omit overrides when the delivery shares\n * the parent copy verbatim — that is the common case.\n */\nexport interface ResourceOperationEmailDeliverySpecification {\n /**\n * Audience description: who receives this delivery and why. Required —\n * the deliveries axis exists specifically to distinguish audiences (creator\n * vs assignee vs admin recipient, …), so an undocumented audience defeats\n * the purpose of fanning out.\n */\n audience: string;\n /**\n * Target type from the runtime `UserNotificationDefinition.target` (see\n * `CoreUserNotificationTarget` — `USERS_CUSTOM`, `USER_SELF`,\n * `ORGANIZATION_USERS`, …). The dispatcher kebab-cases this and appends\n * it to the template-ref path, so spec authors must echo the exact runtime\n * target so the computed path stays truthful. A `CoreUserNotificationTarget` member: the runtime refuses any\n * other target when the configuration is built.\n */\n targetRef: CoreUserNotificationTarget;\n /**\n * Operation variant this delivery belongs to. `undefined` means the default\n * variant (no `variantKey` segment in the runtime path). Maps to\n * `variantKey` on the runtime variant when present.\n */\n variantRef?: string;\n /**\n * Distinguishes deliveries when the same `(variantRef, targetRef)` fires\n * multiple emails. Maps 1:1 to `customNotificationRef` on the runtime\n * `UserNotificationDefinition`. Required by the engine when more than one\n * `USERS_CUSTOM` notification appears in the same operation (to make the\n * template paths unique); the spec validator mirrors that contract.\n */\n customDeliveryRef?: string;\n /**\n * Stable `SystemEmailTemplateRef` THIS delivery resolves to, when the\n * runtime template path corresponds to an entry registered in\n * `SystemEmailTemplateRegistry` (system-level emails such as\n * `WELCOME_EMAIL`, `ORGANIZATION_INVITATION`, …). Use it to cross-link a\n * resource-initiated trigger to its authored\n * `SystemEmailTemplateSpecification` overlay in companion prompts.\n *\n * Lives per-delivery (not on `codeHandling`) because the runtime\n * template-ref path is per-delivery: every authored\n * `(variantRef, targetRef, customDeliveryRef)` triple resolves to ONE\n * concrete template, so each delivery either points at a registered\n * `SystemEmailTemplateRef` or — for resource-local templates that live\n * outside `SystemEmailTemplateRegistry` (e.g. Wonder Todos\n * `email.todos.change_status.users-custom_notify-creator`) — leaves the\n * field undefined.\n *\n * Cross-validated at module load against `SystemEmailTemplateRegistry` so\n * a typo or stale ref fails closed instead of leaking a dangling cross-\n * link into companion prompts. Typed as the enum to give authors\n * autocomplete and eliminate the silent-string-identity anti-pattern.\n */\n systemEmailTemplateRef?: SystemEmailTemplateRef;\n /**\n * Optional per-delivery overrides for translatable text slots. When a key\n * is present here, it replaces the parent `textSlots[key]` for THIS\n * delivery only (e.g., creator and assignee share the parent subject\n * normally, but the admin variant for the creator uses a different one).\n * Omit entirely when the delivery uses the parent copy verbatim.\n */\n textSlotsOverrides?: TranslationSlotSpecificationMap;\n /**\n * Per-delivery override for `purpose` when this delivery has its own intent\n * distinct from the parent (e.g., the admin variant explains a managerial\n * intervention rather than a self-progress signal). Falls back to the\n * parent `purpose` when omitted.\n */\n purposeOverride?: string;\n /**\n * Domain/compliance caveats that apply to THIS delivery only, layered on\n * top of the parent `businessConstraints` (which apply to all deliveries).\n */\n additionalBusinessConstraints?: string[];\n /** Companion/transposer caveats specific to this delivery. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for the email fired by a resource operation.\n *\n * Follows the same authoring shape as `SystemEmailTemplateSpecification`:\n * `purpose` and `tone` are plain authoring prose, while every translatable\n * fragment (subject, previewText, ctaLabel, heading, body, …) lives inside\n * `textSlots`. `eventData` documents the meaning of the payload used to render\n * the email so translators know which runtime values will land in each slot.\n *\n * A resource-initiated email is always anchored to its operation: the same\n * action decides what is sent, to whom, and why, so the companion resolves the\n * wording through the operation spec instead of a parallel family.\n *\n * **Engine-parity contract for `deliveries`**. The runtime fans out one email\n * per entry in `userNotifications[]` with `channel === EMAIL`, computing a\n * distinct template-ref path per `(variantKey, target, customNotificationRef)`\n * combination. The spec layer mirrors this faithfully: every such runtime\n * delivery must be authored as one entry in `deliveries`, so the spec is\n * never silent about a real runtime template path. A single-delivery email\n * still needs one `deliveries` entry — the array is required so the engine\n * fan-out semantics are explicit at every authoring site, not implicit in\n * the absence of the field.\n */\nexport interface ResourceOperationEmailSpecification {\n /** Why this operation fires an email (shared intent across all deliveries). */\n purpose: string;\n /** Expected voice/posture for the generated copy (urgent, reassuring, informational, ...). */\n tone: string;\n /** Situations where this email must be sent alongside the operation. */\n useWhen?: string;\n /** Situations where this email should not fire (e.g. reassignment to the same user). */\n avoidWhen?: string;\n /**\n * Translatable text slots for the email (`subject`, `previewText`,\n * `ctaLabel`, or any template-specific named slot) with per-slot meaning\n * for translators. `subject` is required because every transactional email\n * needs a subject line. Per-delivery overrides live on each\n * `deliveries[i].textSlotsOverrides`.\n */\n textSlots: TranslationSlotSpecificationMap;\n /** Meaning of the event payload this email renders with (shared across deliveries). */\n eventData?: TranslationSlotSpecification;\n /** Domain/compliance caveats that matter beyond the operation's own constraints. */\n businessConstraints?: string[];\n /**\n * Explicit fan-out: one entry per runtime `userNotifications[]` email\n * delivery. At least one entry is required when an `email` block is\n * authored — see the JSDoc on the parent interface for the engine-parity\n * rationale. The validator enforces uniqueness on\n * `(variantRef, targetRef, customDeliveryRef)` triples and rejects\n * duplicates that would compute the same runtime template-ref path.\n */\n deliveries: ResourceOperationEmailDeliverySpecification[];\n /** Import-oriented coding/transposition metadata. */\n codeHandling?: ResourceOperationEmailSpecificationCodeHandling;\n}\n\n/**\n * Import-oriented metadata for the notification fired by a resource operation.\n */\nexport interface ResourceOperationNotificationSpecificationCodeHandling {\n /**\n * Public enum exposing the channel vocabulary that each\n * `deliveries[i].channelRef` is drawn from (for example\n * `CoreUserNotificationChannel`). Declaring the owning enum lets transposer layers import the canonical members\n * when generating notification dispatch code.\n */\n channelEnum?: CodeSymbolRef;\n /** Public Zod schema symbol describing the notification event payload. */\n eventDataSchemaSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the payload type is split from its Zod schema. */\n eventDataTypeSymbol?: CodeSymbolRef;\n /** Extra supporting symbols that transposer prompts need. */\n supportingSymbols?: CodeSymbolRef[];\n /** Companion/transposer caveats that must survive serialization. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for ONE in-app notification delivery fired by a resource\n * operation.\n *\n * Models the engine fan-out faithfully: every entry in the runtime\n * `userNotifications[]` array whose `channel` is NOT `EMAIL` is one in-app\n * notification delivery (FRONT_END_SUCCESS toast for the actor, WEBSOCKET push\n * to the activity feed, SMS / PUSH when implemented, …). Each delivery is\n * its own (target, channel) pair at runtime; the spec layer mirrors this so\n * companion prompts know exactly which surfaces the operation actually\n * touches, and translators can author per-delivery copy when a specific\n * channel needs different wording (e.g. SMS character limits vs WebSocket\n * activity-feed prose).\n */\nexport interface ResourceOperationNotificationDeliverySpecification {\n /**\n * Audience description: who receives this delivery (the actor themselves\n * via FRONT_END_SUCCESS, the rest of the organization via WEBSOCKET, …).\n * Required — the deliveries axis exists specifically to distinguish\n * audiences, so an undocumented audience defeats the purpose of fanning\n * out.\n */\n audience: string;\n /**\n * Channel the runtime fires through: a `CoreUserNotificationChannel` member (`EMAIL`, `WEBSOCKET`,\n * `FRONT_END_SUCCESS`). Exactly the channels the dispatcher delivers — the runtime refuses any other at build\n * (#1874), so a specification naming one would describe a delivery that cannot exist.\n */\n channelRef: CoreUserNotificationChannel;\n /**\n * Target type from the runtime `UserNotificationDefinition.target` (see\n * `CoreUserNotificationTarget`). Documents whether the delivery is\n * actor-only (`USER_SELF`), org-wide (`ORGANIZATION_USERS`), a specific\n * audience (`USERS_CUSTOM` with a selector), … A `CoreUserNotificationTarget` member: the runtime refuses any\n * other target when the configuration is built.\n */\n targetRef: CoreUserNotificationTarget;\n /**\n * Operation variant this delivery belongs to. `undefined` means the default\n * variant. Maps to `variantKey` on the runtime variant when present.\n */\n variantRef?: string;\n /**\n * Distinguishes deliveries when the same `(variantRef, targetRef, channelRef)`\n * triple fires multiple notifications (rare but supported by the runtime\n * via `customNotificationRef`).\n */\n customDeliveryRef?: string;\n /** Per-delivery overrides for translatable text slots. */\n textSlotsOverrides?: TranslationSlotSpecificationMap;\n /** Per-delivery override for `purpose` when this delivery has its own intent. */\n purposeOverride?: string;\n /** Per-delivery business constraints layered on top of the parent list. */\n additionalBusinessConstraints?: string[];\n /** Companion/transposer caveats specific to this delivery. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for the in-app notifications fired by a resource operation.\n *\n * Mirrors `ResourceOperationEmailSpecification` for consistency: `purpose`\n * and `tone` are plain authoring prose; every translatable fragment (title,\n * body, actionLabel, …) lives in `textSlots`; `eventData` documents the\n * payload meaning. The `deliveries` array makes the engine fan-out explicit\n * — every runtime `userNotifications[]` entry with a non-EMAIL channel maps\n * to one entry here so the spec is never silent about a real runtime\n * notification surface.\n */\nexport interface ResourceOperationNotificationSpecification {\n /** Why this operation fires in-app notifications (shared across deliveries). */\n purpose: string;\n /** Expected voice/posture for the generated copy. */\n tone: string;\n /** Situations where this notification must be raised alongside the operation. */\n useWhen?: string;\n /** Situations where this notification should not fire. */\n avoidWhen?: string;\n /**\n * Translatable text slots for the notification (`title`, `body`,\n * `actionLabel`, or any channel-specific named slot). `title` is required\n * so every notification has a recognisable headline for translators and\n * transposers to target. Per-delivery overrides live on each\n * `deliveries[i].textSlotsOverrides`.\n */\n textSlots: TranslationSlotSpecificationMap;\n /**\n * Explicit fan-out: one entry per runtime `userNotifications[]` non-EMAIL\n * delivery. At least one entry is required when a `notification` block is\n * authored. The validator enforces uniqueness on\n * `(variantRef, targetRef, channelRef, customDeliveryRef)` quadruples.\n */\n deliveries: ResourceOperationNotificationDeliverySpecification[];\n /** Meaning of the event payload the notification renders with. */\n eventData?: TranslationSlotSpecification;\n /** Domain/compliance caveats that matter beyond the operation's own constraints. */\n businessConstraints?: string[];\n /** Import-oriented coding/transposition metadata. */\n codeHandling?: ResourceOperationNotificationSpecificationCodeHandling;\n}\n\n/**\n * Import-oriented metadata for the M2M (machine-to-machine) notifications\n * fired by a resource operation.\n *\n * M2M notifications are webhook-style fan-outs declared on the resource\n * operation's `m2mNotifications[]` array (see `CoreM2MNotificationChannel` —\n * `WEBHOOK_ORGANIZATION`, `WEBHOOK_APPLICATION`, …). They never carry\n * user-facing copy; transposers/companion prompts only need to know the\n * channel vocabulary, the level vocabulary, and the payload schema to\n * generate truthful integration code.\n */\nexport interface ResourceOperationM2MSpecificationCodeHandling {\n /**\n * Public enum exposing the channel vocabulary that `deliveries[i].channelRef`\n * members come from (for example `CoreM2MNotificationChannel`). Custom\n * channels can still be authored as raw string refs in `channelRef`, but\n * declaring the owning enum lets transposer layers import the canonical\n * members when generating webhook dispatch code.\n */\n channelEnum?: CodeSymbolRef;\n /**\n * Public enum exposing the severity vocabulary that `deliveries[i].level`\n * members come from (for example `M2MNotificationLevel`).\n */\n levelEnum?: CodeSymbolRef;\n /**\n * Public Zod schema describing the m2m payload (often the resource main\n * schema augmented with operation metadata, but operations are free to\n * publish a webhook-shaped projection).\n */\n payloadSchemaSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the payload type is split from its Zod schema. */\n payloadTypeSymbol?: CodeSymbolRef;\n /** Extra supporting symbols transposer prompts may need. */\n supportingSymbols?: CodeSymbolRef[];\n /** Companion/transposer caveats that must survive serialization. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for ONE M2M notification delivery fired by a resource\n * operation. Each entry in the runtime `m2mNotifications[]` array maps to\n * one entry here so the spec stays parity-faithful with the engine fan-out.\n */\nexport interface ResourceOperationM2MDeliverySpecification {\n /**\n * Audience description: which integration consumers receive this webhook\n * (the organization's configured webhook endpoints, the application's\n * platform-wide endpoint, …). Required for the same fan-out reason as the\n * email/notification delivery audiences.\n */\n audience: string;\n /**\n * Channel ref: a `CoreM2MNotificationChannel` member (`WEBHOOK_ORGANIZATION`, `WEBHOOK_APPLICATION`). Exactly the\n * channels the dispatcher delivers — the runtime refuses any other when the configuration is built, so a\n * specification naming one would describe a webhook that is never sent.\n */\n channelRef: CoreM2MNotificationChannel;\n /**\n * Severity classification (info / success / error). Authoring sites should\n * use `M2MNotificationLevel` members; mirrors the runtime enum.\n */\n level?: M2MNotificationLevel | (string & {});\n /**\n * Operation variant this delivery belongs to. `undefined` means the default\n * variant. Maps to `variantKey` on the runtime variant when present.\n */\n variantRef?: string;\n /**\n * Distinguishes deliveries when the same `(variantRef, channelRef, level)`\n * triple is authored more than once. Note the runtime fans out one webhook per channel, so the validator\n * refuses two deliveries on the same channel regardless (see `assertM2MDeliveries`).\n */\n customDeliveryRef?: string;\n /** Companion/transposer caveats specific to this delivery. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for the M2M (webhook) notifications fired by a resource\n * operation. Mirrors the email/notification overlay shape so authors get a\n * uniform fan-out vocabulary across all three communications surfaces.\n *\n * The `requiredFeatures` slot is a documentation-oriented feature-gate\n * descriptor — see {@link RequiredFeaturesSpecification}. The runtime checks\n * the M2M dispatch gate at its delivery boundary, so this slot documents the\n * application intent rather than acting as enforcement.\n * The M2M validator opts in to fail-soft cross-registry resolution (see\n * `assertOptionalRequiredFeaturesSpecification` — `crossRegistry:\n * 'fail-soft'`) so application-defined feature refs beyond the engine\n * baseline do not silently re-define the runtime contract.\n */\nexport interface ResourceOperationM2MSpecification {\n /** Why this operation fires M2M webhooks (shared intent across deliveries). */\n purpose: string;\n /** Situations where the M2M dispatch must run alongside the operation. */\n useWhen?: string;\n /** Situations where the M2M dispatch should not fire. */\n avoidWhen?: string;\n /** Domain/compliance caveats (rate limits, privacy filters, retry policy …). */\n businessConstraints?: string[];\n /**\n * Explicit fan-out: one entry per runtime `m2mNotifications[]` delivery.\n * At least one entry is required when an `m2m` block is authored.\n */\n deliveries: ResourceOperationM2MDeliverySpecification[];\n /**\n * Documentation-oriented feature-gate descriptor — see\n * {@link RequiredFeaturesSpecification}. Optional. The authoritative\n * runtime gate lives at the M2M dispatcher\n * (`featureResolution.isFeatureEnabled(M2M_WEBHOOK_DELIVERY)`); declaring\n * this slot lets companion prompts surface the same requirement without\n * re-implementing the runtime check. Authors may add additional\n * application-level features here (e.g. `'PARTNER_INTEGRATION'`) when\n * the operation's webhook fan-out is gated beyond the engine baseline.\n */\n requiredFeatures?: RequiredFeaturesSpecification;\n /** Import-oriented coding/transposition metadata. */\n codeHandling?: ResourceOperationM2MSpecificationCodeHandling;\n}\n\n/**\n * Outbound communications fired by a resource operation.\n *\n * Each sub-block is optional — an operation may send only an email, only a\n * notification, only an m2m webhook, any combination, or none. The companion\n * will render only the authored sub-blocks. The three sub-blocks mirror the\n * runtime fan-out surfaces:\n * - `email` ↔ `userNotifications[].channel === EMAIL` entries\n * - `notification` ↔ `userNotifications[].channel !== EMAIL` entries\n * - `m2m` ↔ `m2mNotifications[]` entries\n *\n * Variant-level overrides are not modelled at the parent level: deliveries\n * carry their own `variantRef`, so per-variant differences are captured\n * inside the `deliveries` arrays of each sub-block.\n */\nexport interface ResourceOperationCommunicationsSpecification {\n /** Email deliveries fired by the operation, when applicable. */\n email?: ResourceOperationEmailSpecification;\n /** In-app notification deliveries fired by the operation, when applicable. */\n notification?: ResourceOperationNotificationSpecification;\n /** M2M (webhook) deliveries fired by the operation, when applicable. */\n m2m?: ResourceOperationM2MSpecification;\n}\n\n/**\n * Import-oriented metadata for the scheduled execution of a resource operation.\n *\n * Scheduled work always anchors to `(resourceIdentifier, operationIdentifier)`\n * at runtime — either through a `ResourceOperationVariantType.CRON_JOB`\n * variant of the operation, or through `createCustomBatchExecutionService(...)`\n * whose `batchCronjob_Context` pins the same anchor. Transposer/companion\n * prompts need stable import refs to the input/output schemas and to the\n * batch-ref constant so generated code can reuse the canonical declarations\n * instead of re-typing them.\n */\nexport interface ResourceOperationScheduledExecutionCodeHandling {\n /** Public Zod schema symbol describing the scheduled-run input payload. */\n inputSchemaSymbol?: CodeSymbolRef;\n /** Public Zod schema symbol describing the scheduled-run output payload. */\n outputSchemaSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the input type is split from its Zod schema. */\n inputTypeSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the output type is split from its Zod schema. */\n outputTypeSymbol?: CodeSymbolRef;\n /**\n * Public symbol declaring the custom-batch reference constant (for example\n * `FILES_CLEANUP_BATCH_REF`) when the schedule runs through\n * `createCustomBatchExecutionService(...)` rather than a\n * `ResourceOperationVariantType.CRON_JOB` variant.\n */\n customBatchRefSymbol?: CodeSymbolRef;\n /**\n * Public symbol declaring the factory that builds the custom batch service\n * (for example `createFilesCleanupBatch`). Lets generated code import the\n * constructor directly without re-reading the batch file.\n */\n batchFactorySymbol?: CodeSymbolRef;\n /** Extra supporting symbols transposer prompts may need. */\n supportingSymbols?: CodeSymbolRef[];\n /** Companion/transposer caveats that must survive serialization. */\n notes?: string[];\n}\n\n/**\n * Discriminant vocabulary for how a scheduled unit of work is anchored to a\n * resource operation at runtime.\n *\n * The spec-layer vocabulary intentionally does NOT reuse\n * `ResourceOperationVariantType` directly. Runtime variants describe how the\n * operation itself is declared on the resource configuration, while custom\n * batches are a separate mechanism registered through\n * `createCustomBatchExecutionService(...)` whose `batchCronjob_Context`\n * happens to anchor to a `(resourceIdentifier, operationIdentifier)` pair.\n * The three spec arms below make the distinction explicit so illegal\n * combinations (a `CRON_JOB` variant with no cron, a `BATCH_JOB` variant\n * with a cron, a custom batch with no `customBatchRef`, …) are\n * unrepresentable at authoring time.\n */\nexport enum ResourceOperationScheduledExecutionVariantType {\n /**\n * Operation itself declares a `ResourceOperationVariantType.CRON_JOB`\n * variant whose `cronJobExpression` drives the schedule. The spec echoes\n * the same cron so companion prompts can reason about cadence without\n * reading the runtime configuration.\n */\n NATIVE_CRON_JOB = 'NATIVE_CRON_JOB',\n /**\n * Operation itself declares a `ResourceOperationVariantType.BATCH_JOB`\n * variant. No cron is attached — the batch variant is event-triggered\n * (queue message, deferred work) and runs when upstream work dispatches it.\n */\n NATIVE_BATCH_JOB = 'NATIVE_BATCH_JOB',\n /**\n * Schedule is registered through `createCustomBatchExecutionService(...)`\n * with a `batchCronjob_Context` pinning it to this operation. The batch\n * lives outside the operation's own variants and is addressed by a stable\n * `customBatchRef` that the runtime registry (and the declarative\n * `CustomBatchManifest` aggregator) both consume.\n */\n CUSTOM_BATCH = 'CUSTOM_BATCH',\n}\n\n/**\n * Fields shared by every `scheduledExecution` arm. Authoring prose\n * (`purpose` / `outcome`) is not translatable — scheduled runs have no\n * user-facing copy of their own, so we do not carry `textSlots` here.\n */\ninterface BaseResourceOperationScheduledExecutionSpecification {\n /** Why this scheduled work runs (business intent, not mechanics). */\n purpose: string;\n /** Observable business result once the scheduled run finishes successfully. */\n outcome: string;\n /** Situations where the scheduled run is the right business path. */\n useWhen?: string;\n /** Situations where the scheduled run should be suppressed (maintenance windows, migrations, …). */\n avoidWhen?: string;\n /** Domain/compliance caveats that matter beyond the operation's own constraints. */\n businessConstraints?: string[];\n /** Import-oriented coding/transposition metadata. */\n codeHandling?: ResourceOperationScheduledExecutionCodeHandling;\n}\n\n/**\n * Scheduled-execution overlay for operations whose own variants declare a\n * `ResourceOperationVariantType.CRON_JOB` with an inline cron expression.\n * The spec echoes that cron so companion prompts see the authoritative cadence\n * without re-reading backend code; authors must not invent a cron the runtime\n * variant does not declare.\n */\nexport interface NativeCronJobScheduledExecutionSpecification\n extends BaseResourceOperationScheduledExecutionSpecification {\n variantType: ResourceOperationScheduledExecutionVariantType.NATIVE_CRON_JOB;\n /** Echoed cron expression from the operation's `CRON_JOB` variant. */\n cronExpression: string;\n}\n\n/**\n * Scheduled-execution overlay for operations whose own variants declare a\n * `ResourceOperationVariantType.BATCH_JOB`. Batch variants run on dispatch\n * rather than a schedule, so no cron is attached and no custom-batch ref is\n * involved.\n */\nexport interface NativeBatchJobScheduledExecutionSpecification\n extends BaseResourceOperationScheduledExecutionSpecification {\n variantType: ResourceOperationScheduledExecutionVariantType.NATIVE_BATCH_JOB;\n}\n\n/**\n * Scheduled-execution overlay for work registered through\n * `createCustomBatchExecutionService(...)` whose `batchCronjob_Context`\n * anchors to this operation. The stable `customBatchRef` must match the\n * `CustomBatchManifest.batchRef` exported next to the batch factory, which\n * in turn feeds the imperative `customBatches.set(...)` registration in\n * `start-application.backend.service.ts`.\n *\n * `cronExpression` echoes the custom batch's `batchCronjob_Context.cronJobExpression`\n * when one is declared; event-triggered custom batches (for example the\n * email `batch-send` path) omit both the cron and the `cronExpression` field.\n */\nexport interface CustomBatchScheduledExecutionSpecification\n extends BaseResourceOperationScheduledExecutionSpecification {\n variantType: ResourceOperationScheduledExecutionVariantType.CUSTOM_BATCH;\n /** Stable ref that resolves to a `CustomBatchManifest` at module load. */\n customBatchRef: string;\n /**\n * Echoed cron expression from the custom batch's `batchCronjob_Context`.\n * Must match the manifest: present when the batch declares a cron, absent\n * when the batch is purely event-triggered.\n */\n cronExpression?: string;\n}\n\n/**\n * Discriminated-union semantic overlay for scheduled execution of a resource\n * operation. The discriminant is\n * {@link ResourceOperationScheduledExecutionVariantType} and each arm enforces\n * the fields the runtime anchor actually requires, so illegal combinations\n * (cron without variant, batch-job with cron, custom batch without ref, …)\n * are rejected at authoring time.\n *\n * Attaching the slot at the operation level mirrors the runtime invariant\n * that every scheduled unit of work anchors to a resource operation\n * (`ResourceOperationVariantType.CRON_JOB` / `BATCH_JOB` or a custom batch\n * whose `batchCronjob_Context` binds it to `(resourceIdentifier,\n * operationIdentifier)`). There is no operation-less scheduled path.\n *\n * Cross-registry verification of `customBatchRef` runs at module load by\n * consulting the declarative `CustomBatchManifest` registry — see\n * {@link registerCustomBatchManifests} and the engine's\n * `ENGINE_CUSTOM_BATCH_MANIFESTS` export in `@wildo-ai/saas-backend-lib`.\n */\nexport type ResourceOperationScheduledExecutionSpecification =\n | NativeCronJobScheduledExecutionSpecification\n | NativeBatchJobScheduledExecutionSpecification\n | CustomBatchScheduledExecutionSpecification;\n\n// ── Operation HTTP-documentation overlay (Tier 3 — OpenAPI semantics) ───────\n\n/**\n * Fixed vocabulary of HTTP response status codes an operation may document.\n * An enum (not a literal union) per the framework rule — a single source of\n * truth for the renderer and the OpenAPI generator. The string VALUE is the\n * OpenAPI `responses` key (`'200'`, `'404'`, …) so it splices in verbatim.\n */\nexport enum HttpResponseStatusCode {\n OK_200 = '200',\n CREATED_201 = '201',\n ACCEPTED_202 = '202',\n NO_CONTENT_204 = '204',\n BAD_REQUEST_400 = '400',\n UNAUTHORIZED_401 = '401',\n FORBIDDEN_403 = '403',\n NOT_FOUND_404 = '404',\n CONFLICT_409 = '409',\n UNPROCESSABLE_ENTITY_422 = '422',\n TOO_MANY_REQUESTS_429 = '429',\n INTERNAL_SERVER_ERROR_500 = '500',\n}\n\n/**\n * One documented response status for an operation. Becomes an OpenAPI\n * `responses.<code>` entry whose `description` is the authored `meaning`.\n */\nexport interface ResourceOperationResponseStatusSpecification {\n /** HTTP status code this operation returns on this outcome. */\n code: HttpResponseStatusCode;\n /** What this status means for THIS operation, in business terms. */\n meaning: string;\n}\n\n/**\n * One documented failure mode beyond the happy path. Becomes an OpenAPI error\n * `responses.<code>` entry; `when` explains the trigger.\n *\n * The three optional identifiers each name ONE field of the error body a client\n * receives (`{ error: { type, customMessageReference, code, … } }`), so a client\n * can branch on what it will actually see. Set only the ones this failure mode\n * really produces — an identifier the API never sends is a promise a client will\n * code against and never see honoured:\n *\n * - `errorType` — `error.type`. Only worth stating where the status alone does\n * not decide it (a `403` can be `AUTHORIZATION`, `FEATURE_NOT_AVAILABLE`,\n * `FEATURE_LIMIT_EXCEEDED` or `INSUFFICIENT_CREDITS`).\n * - `customMessageReference` — `error.customMessageReference`, the stable key of\n * the message the failure carries (for example a uniqueness conflict's\n * `conflictMessageReference`).\n * - `errorCode` — `error.code`, an operation-specific refusal code the operation\n * throws in its error context (for example `LAST_ORGANIZATION_OWNER`). Never an\n * `ErrorType` or `ErrorCustomMessageReference` value: those have their own fields.\n *\n * A plain schema-validation failure carries none of the three beyond its `400`\n * status and `type: VALIDATION`; leave them unset rather than inventing a code.\n */\nexport interface ResourceOperationErrorScenarioSpecification {\n /** HTTP status code returned in this failure mode. */\n code: HttpResponseStatusCode;\n /** Trigger condition — when/why this error occurs. */\n when: string;\n /** `error.type` of this failure, when the status alone does not decide it. */\n errorType?: ErrorType;\n /** `error.customMessageReference` this failure carries. */\n customMessageReference?: ErrorCustomMessageReference;\n /** `error.code`: an operation-specific refusal code thrown in the error context. */\n errorCode?: string;\n}\n\n/**\n * A request/response payload example for docs + client codegen. Becomes an\n * OpenAPI example on the request body and/or the `forStatus` response.\n */\nexport interface ResourceOperationExampleSpecification {\n /** Short human label, e.g. \"Create with assignee\". */\n title: string;\n /** Optional example request body (JSON-serialisable). */\n request?: unknown;\n /** Optional example response body (JSON-serialisable). */\n response?: unknown;\n /** Which response status this example illustrates (links to `responseStatuses`). */\n forStatus?: HttpResponseStatusCode;\n}\n\n/**\n * Semantic explanation for one logical resource operation.\n *\n * The operation-level fields capture the invariant business meaning of the\n * action, while `variants` captures frontend/runtime-specific differences when\n * multiple operation variants exist.\n */\nexport interface ResourceOperationSpecification {\n /** Stable operation identifier as declared by the resource configuration. */\n operationId?: string;\n /** Shared business intent across all variants of the operation. */\n purpose?: string;\n /** Shared observable business result once the operation succeeds. */\n outcome?: string;\n /** Guidance about when this operation is the right choice. */\n whenToUse?: string;\n /**\n * When the operation CANNOT run on an item, in business terms — the meaning of its\n * `enabledCondition` (\"the todo has no assignee\"). It grounds the generated sentence an unavailable\n * action shows when someone asks why (`operations.<op>.unavailableReason`), so the person reads the\n * condition rather than a generic refusal. Owed by every operation that declares an\n * `enabledCondition`; without it the reason is generated from the purpose alone.\n */\n unavailableWhen?: string;\n /** Relative weight of this operation in the resource understanding. */\n importance?: FieldSemanticImportance;\n /**\n * Outbound communications (emails, notifications) fired as a side-effect of\n * running the operation. Because `ResourceFrontendViewSpecification`\n * structurally extends this interface, communications authored at the base\n * level are automatically visible through `frontend.views` as well.\n */\n communications?: ResourceOperationCommunicationsSpecification;\n /**\n * Scheduled-execution overlay for cron/batch operations. Applies when the\n * operation has a `CRON_JOB` / `BATCH_JOB` variant or is implemented by a\n * custom batch whose `batchCronjob_Context` anchors to this operation.\n * Attached at the base level so it also surfaces through\n * `frontend.views` via structural inheritance — scheduled work is a\n * backend-initiated side effect, not a UI seam.\n */\n scheduledExecution?: ResourceOperationScheduledExecutionSpecification;\n /** Variant-specific semantics layered under the same logical operation id. */\n variants?: ResourceOperationSpecificationVariants;\n /**\n * Authored HTTP response statuses for this operation. Feeds the OpenAPI\n * `responses` object, replacing the generator's default single `200`/`204`.\n * Per-operation — variants share the same HTTP contract (a per-variant\n * response set would multiply identical contracts with no semantic gain).\n */\n responseStatuses?: ResourceOperationResponseStatusSpecification[];\n /**\n * Failure modes a client should handle beyond the happy path. Each becomes\n * an OpenAPI error `responses` entry (400/403/404/409/…) carrying its `when`\n * prose. Per-operation.\n */\n errorScenarios?: ResourceOperationErrorScenarioSpecification[];\n /**\n * Whether repeating the request with the same input is side-effect-free.\n * Surfaces as an OpenAPI `x-idempotent` extension plus a description note.\n */\n idempotent?: boolean;\n /** Optional human note on the operation's rate-limiting posture (free prose). */\n rateLimitNote?: string;\n /**\n * Request/response payload examples for docs + client codegen. Base examples\n * apply to every variant unless `variants.<key>.examples` provides a complete\n * replacement for a divergent variant response schema.\n */\n examples?: ResourceOperationExampleSpecification[];\n}\n\n/**\n * Validation entry point used by the resource specification factory to assert\n * that an authored `communications` block is internally consistent. Factories\n * call this from the same place they already assert frontend-operation\n * completeness, so misconfigurations fail at module load rather than leaking\n * into companion renderers as half-formed prose.\n *\n * @param ownerLabel Stable identifier of the owning operation (used in error\n * messages so authors can locate the broken spec immediately).\n * @param communications The authored communications block, or undefined when\n * the operation does not declare one.\n * @param resourcePrimaryScope The owning resource's `resourcePrimaryScope`.\n * This is the specification author's explicitly declared scope (the fourth\n * `options` argument to {@link resourceSpecification}), threaded through\n * every re-validation path (including\n * {@link resourceSpecificationFromFrontendConfiguration}'s\n * `base.operations` / `base.frontend.views` / `frontend.views`\n * re-validation passes). It MAY still be `undefined` only on hand-built\n * spec configs that bypass both factories — those paths intentionally\n * soft-skip the cross-check because they have no contract with the spec\n * author for declaring scope. The primary entry point hard-fails on\n * missing scope (TypeScript-enforced), so production specs always\n * exercise the cross-check.\n */\nexport function validateResourceOperationCommunicationsSpecification(\n ownerLabel: string,\n communications: ResourceOperationCommunicationsSpecification | undefined,\n resourcePrimaryScope?: ResourcePrimaryScope,\n): void {\n if (!communications) {\n return;\n }\n if (communications.email) {\n assertNonEmptyProseSlot(\n ownerLabel,\n 'communications.email.purpose',\n communications.email.purpose,\n );\n assertNonEmptyProseSlot(ownerLabel, 'communications.email.tone', communications.email.tone);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.email.useWhen',\n communications.email.useWhen,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.email.avoidWhen',\n communications.email.avoidWhen,\n );\n assertEveryAuthoredTextSlot(\n ownerLabel,\n 'email',\n ['subject'],\n communications.email.textSlots,\n );\n assertOptionalEventDataSlot(ownerLabel, 'email', communications.email.eventData);\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.email.businessConstraints',\n communications.email.businessConstraints,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.email.codeHandling.notes',\n communications.email.codeHandling?.notes,\n );\n assertEmailDeliveries(ownerLabel, communications.email.deliveries);\n }\n if (communications.notification) {\n assertNonEmptyProseSlot(\n ownerLabel,\n 'communications.notification.purpose',\n communications.notification.purpose,\n );\n assertNonEmptyProseSlot(\n ownerLabel,\n 'communications.notification.tone',\n communications.notification.tone,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.notification.useWhen',\n communications.notification.useWhen,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.notification.avoidWhen',\n communications.notification.avoidWhen,\n );\n assertEveryAuthoredTextSlot(\n ownerLabel,\n 'notification',\n ['title'],\n communications.notification.textSlots,\n );\n assertOptionalEventDataSlot(\n ownerLabel,\n 'notification',\n communications.notification.eventData,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.notification.businessConstraints',\n communications.notification.businessConstraints,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.notification.codeHandling.notes',\n communications.notification.codeHandling?.notes,\n );\n assertNotificationDeliveries(ownerLabel, communications.notification.deliveries);\n }\n if (communications.m2m) {\n assertNonEmptyProseSlot(ownerLabel, 'communications.m2m.purpose', communications.m2m.purpose);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.m2m.useWhen',\n communications.m2m.useWhen,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.m2m.avoidWhen',\n communications.m2m.avoidWhen,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.m2m.businessConstraints',\n communications.m2m.businessConstraints,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.m2m.codeHandling.notes',\n communications.m2m.codeHandling?.notes,\n );\n assertOptionalRequiredFeaturesSpecification(\n `Resource operation \"${ownerLabel}\" communications.m2m.requiredFeatures`,\n communications.m2m.requiredFeatures,\n { crossRegistry: 'fail-soft' },\n );\n assertM2MDeliveries(ownerLabel, communications.m2m.deliveries, resourcePrimaryScope);\n }\n}\n\n/**\n * Assert that a REQUIRED prose slot (`purpose`, `tone`, `audience`, …) is\n * non-empty trimmed. `slotLabel` is the full owner-relative path included\n * verbatim in the error (e.g. `communications.email.purpose`,\n * `communications.email.deliveries[0].audience`) so callers can locate the\n * broken authoring site immediately, regardless of whether the slot lives\n * directly under `communications.*` or further nested under a `deliveries[i]`.\n */\nfunction assertNonEmptyProseSlot(\n ownerLabel: string,\n slotLabel: string,\n value: string | undefined,\n): void {\n if (!value || !value.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotLabel} must be a non-empty prose slot.`,\n );\n }\n}\n\n/**\n * Best-effort resource-type hint derivation from the `_factory` argument\n * passed to `resourceSpecification(...)`.\n *\n * Used exclusively to enrich the `validateFieldShapes(...)` error prefix so\n * authors see `resourceSpecification(TODOS): ...` instead of a\n * bare `resourceSpecification(): ...` when multiple resources fail\n * validation in the same bundle. Returns an empty string when the hint\n * cannot be derived — callers must treat that case as \"use the bare\n * prefix\" rather than throwing.\n *\n * Handles both factory forms:\n * - Function form (`ResourceConfiguration_InitializationFactory`): reads\n * the function `name` and strips the standard\n * `_ResourceConfiguration_InitializationFactory` suffix. This matches the\n * application factory naming convention.\n * - Object form (`ResourceConfiguration`): reads the\n * `resourceType?.memberName` when present. Older static object-form\n * factories do not always set this; the empty-string fallback keeps\n * them working.\n */\nfunction extractResourceTypeHintFromFactory(factory: unknown): string {\n if (typeof factory === 'function') {\n const name = typeof factory.name === 'string' ? factory.name : '';\n const stripped = name.replace(/_ResourceConfiguration_InitializationFactory$/, '');\n return stripped.trim();\n }\n if (factory && typeof factory === 'object') {\n const maybeRef = (factory as { resourceType?: { memberName?: unknown } }).resourceType;\n if (maybeRef && typeof maybeRef.memberName === 'string') {\n return maybeRef.memberName;\n }\n }\n return '';\n}\n\n/**\n * Assert that an OPTIONAL prose slot (`useWhen`, `avoidWhen`, `purposeOverride`,\n * …) is non-empty trimmed when authored. Absent slots are a no-op.\n *\n * Mirrors the per-bullet contract on `assertOptionalNonEmptyStringList`: every\n * surface the renderer prints — even optional ones — must fail closed on\n * blanks because a blank `useWhen` line silently appears as `Use when .` in\n * companion prompts and undermines translator/transposer grounding.\n *\n * `slotLabel` is the full owner-relative path included verbatim in the error\n * (e.g. `email.useWhen`, `scheduledExecution.avoidWhen`,\n * `communications.email.deliveries[0].purposeOverride`) so callers can locate\n * the broken authoring site immediately.\n */\nfunction assertOptionalNonEmptyProseSlot(\n ownerLabel: string,\n slotLabel: string,\n value: string | undefined,\n): void {\n if (value === undefined) {\n return;\n }\n if (typeof value !== 'string' || !value.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotLabel} must be a non-empty trimmed prose slot when authored (omit the field entirely instead of declaring an empty value).`,\n );\n }\n}\n\n/**\n * Validate the `deliveries` array on a `ResourceOperationEmailSpecification`.\n *\n * Engine-parity contract: every entry must mirror one runtime\n * `userNotifications[]` email delivery, so the spec is never silent about a\n * real runtime template path. The validator enforces:\n * - at least one delivery (the array is required when an `email` block is\n * authored — single-delivery emails still need one explicit entry),\n * - non-empty `audience` and a `CoreUserNotificationTarget` `targetRef` on every delivery,\n * - non-empty trimmed `variantRef` / `customDeliveryRef` when authored,\n * - non-empty trimmed `purposeOverride` when authored,\n * - per-delivery `systemEmailTemplateRef` (when authored) is a member of\n * `SystemEmailTemplateRegistry` — the cross-link lives per-delivery\n * because the runtime template-ref path is per-delivery,\n * - per-delivery `textSlotsOverrides` slots carry a non-empty `purpose`,\n * - per-delivery `additionalBusinessConstraints` and `notes` follow the\n * per-bullet non-empty contract,\n * - uniqueness on `(variantRef ?? '__default__', targetRef, customDeliveryRef ?? '__none__')`\n * so two deliveries cannot collide on the runtime template-ref path.\n */\nfunction assertEmailDeliveries(\n ownerLabel: string,\n deliveries: ResourceOperationEmailDeliverySpecification[] | undefined,\n): void {\n if (!deliveries || deliveries.length === 0) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.email.deliveries must declare at least one delivery so the spec is never silent about a real runtime email template path. Even single-delivery emails need one explicit entry.`,\n );\n }\n const seenKeys = new Set<string>();\n for (const [index, delivery] of deliveries.entries()) {\n const path = `communications.email.deliveries[${index}]`;\n assertNonEmptyProseSlot(ownerLabel, `${path}.audience`, delivery.audience);\n assertUserNotificationTargetMembership(ownerLabel, `${path}.targetRef`, delivery.targetRef);\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.variantRef`, delivery.variantRef);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `${path}.customDeliveryRef`,\n delivery.customDeliveryRef,\n );\n assertSystemEmailTemplateCrossLink(\n ownerLabel,\n `${path}.systemEmailTemplateRef`,\n delivery.systemEmailTemplateRef,\n );\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.purposeOverride`, delivery.purposeOverride);\n assertTextSlotsOverrides(\n ownerLabel,\n `${path}.textSlotsOverrides`,\n delivery.textSlotsOverrides,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `${path}.additionalBusinessConstraints`,\n delivery.additionalBusinessConstraints,\n );\n assertOptionalNonEmptyStringList(ownerLabel, `${path}.notes`, delivery.notes);\n\n const key = `${delivery.variantRef ?? '__default__'}::${delivery.targetRef}::${delivery.customDeliveryRef ?? '__none__'}`;\n if (seenKeys.has(key)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path} duplicates the (variantRef, targetRef, customDeliveryRef) triple of an earlier delivery. Two deliveries with the same triple compute the same runtime template-ref path and would silently shadow each other; add a distinguishing customDeliveryRef or merge the entries.`,\n );\n }\n seenKeys.add(key);\n }\n}\n\n/**\n * Validate the `deliveries` array on a `ResourceOperationNotificationSpecification`.\n * Same engine-parity contract as {@link assertEmailDeliveries}, with `channelRef`\n * added to the uniqueness key (notifications fan out per (target, channel) pair).\n */\nfunction assertNotificationDeliveries(\n ownerLabel: string,\n deliveries: ResourceOperationNotificationDeliverySpecification[] | undefined,\n): void {\n if (!deliveries || deliveries.length === 0) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.notification.deliveries must declare at least one delivery so companion routing cannot invent an in-app surface that the runtime does not fire.`,\n );\n }\n const seenKeys = new Set<string>();\n for (const [index, delivery] of deliveries.entries()) {\n const path = `communications.notification.deliveries[${index}]`;\n assertNonEmptyProseSlot(ownerLabel, `${path}.audience`, delivery.audience);\n if (!Object.values(CoreUserNotificationChannel).includes(delivery.channelRef as CoreUserNotificationChannel)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path}.channelRef must be a CoreUserNotificationChannel member (${Object.values(CoreUserNotificationChannel).join(', ')}): the runtime delivers no other channel (#1874).`,\n );\n }\n assertUserNotificationTargetMembership(ownerLabel, `${path}.targetRef`, delivery.targetRef);\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.variantRef`, delivery.variantRef);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `${path}.customDeliveryRef`,\n delivery.customDeliveryRef,\n );\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.purposeOverride`, delivery.purposeOverride);\n assertTextSlotsOverrides(\n ownerLabel,\n `${path}.textSlotsOverrides`,\n delivery.textSlotsOverrides,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `${path}.additionalBusinessConstraints`,\n delivery.additionalBusinessConstraints,\n );\n assertOptionalNonEmptyStringList(ownerLabel, `${path}.notes`, delivery.notes);\n\n const key = `${delivery.variantRef ?? '__default__'}::${delivery.targetRef}::${delivery.channelRef}::${delivery.customDeliveryRef ?? '__none__'}`;\n if (seenKeys.has(key)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path} duplicates the (variantRef, targetRef, channelRef, customDeliveryRef) quadruple of an earlier delivery; add a distinguishing customDeliveryRef or merge the entries.`,\n );\n }\n seenKeys.add(key);\n }\n}\n\n/**\n * Validate the `deliveries` array on a `ResourceOperationM2MSpecification`.\n *\n * Webhook-style M2M deliveries fan out per\n * `(variantRef, channelRef, level, customDeliveryRef)` — the validator\n * enforces uniqueness on that quadruple so two deliveries that genuinely\n * differ on those axes can coexist. `variantRef` is the first segment of\n * the key (defaulting to `__default__` when omitted), so two deliveries\n * that differ only by their owning variant remain distinct.\n *\n * Each authored `level` (when present) is also enum-membership-checked\n * against `M2MNotificationLevel` so a typo (`'inf0'`, `'WARN'`,\n * …) fails at module load — the runtime schema is strict-enum even\n * though the TypeScript declaration is widened with `(string & {})` for\n * IDE autocomplete.\n *\n * **Runtime-identity cross-check.** The runtime\n * `M2MNotificationDefinitionSchema` carries no `customNotificationRef`\n * field; the dispatcher constructs the fan-out identifier as\n * `${resourceIdentifier}_${operationIdentifier}_${channel}` only — no\n * variant, no level and no custom-reference segment.\n * The spec layer is therefore free to author multiple deliveries on the\n * same `channelRef` (disambiguated by `level` / `customDeliveryRef`), but\n * at runtime they would collapse to a single identifier and one of the\n * deliveries would silently shadow the other. The validator fail-closes\n * on this collision: every authored delivery must project to a unique\n * `channelRef` within its operation. Authors who genuinely need multiple\n * fan-outs on the same channel must wait until the runtime carries a\n * `customNotificationRef` axis (engineering scope, separate workstream).\n */\nfunction assertM2MDeliveries(\n ownerLabel: string,\n deliveries: ResourceOperationM2MDeliverySpecification[] | undefined,\n resourcePrimaryScope?: ResourcePrimaryScope,\n): void {\n if (!deliveries || deliveries.length === 0) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.m2m.deliveries must declare at least one delivery so companion routing cannot invent a webhook surface that the runtime does not fire.`,\n );\n }\n const seenKeys = new Set<string>();\n const seenRuntimeIdentities = new Map<string, number>();\n for (const [index, delivery] of deliveries.entries()) {\n const path = `communications.m2m.deliveries[${index}]`;\n assertNonEmptyProseSlot(ownerLabel, `${path}.audience`, delivery.audience);\n if (!Object.values(CoreM2MNotificationChannel).includes(delivery.channelRef as CoreM2MNotificationChannel)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path}.channelRef must be a CoreM2MNotificationChannel member (${Object.values(CoreM2MNotificationChannel).join(', ')}): the runtime delivers no other channel.`,\n );\n }\n assertM2MChannelMatchesPrimaryScope(\n ownerLabel,\n `${path}.channelRef`,\n delivery.channelRef,\n resourcePrimaryScope,\n );\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.level`, delivery.level);\n assertOptionalM2MNotificationLevelMembership(\n ownerLabel,\n `${path}.level`,\n delivery.level,\n );\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.variantRef`, delivery.variantRef);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `${path}.customDeliveryRef`,\n delivery.customDeliveryRef,\n );\n assertOptionalNonEmptyStringList(ownerLabel, `${path}.notes`, delivery.notes);\n\n const key = `${delivery.variantRef ?? '__default__'}::${delivery.channelRef}::${delivery.level ?? '__none__'}::${delivery.customDeliveryRef ?? '__none__'}`;\n if (seenKeys.has(key)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path} duplicates the (variantRef, channelRef, level, customDeliveryRef) quadruple of an earlier delivery; add a distinguishing customDeliveryRef or merge the entries.`,\n );\n }\n seenKeys.add(key);\n\n const runtimeIdentityKey = delivery.channelRef;\n const previousIndex = seenRuntimeIdentities.get(runtimeIdentityKey);\n if (previousIndex !== undefined) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path} collides with deliveries[${previousIndex}] on the runtime m2m identifier (resource_op_channel) — both project to channel \"${runtimeIdentityKey}\". The runtime M2MNotificationDefinitionSchema carries no customNotificationRef axis, so two deliveries that differ only by (variantRef, level, customDeliveryRef) collapse to a single identifier and one would silently shadow the other. Either merge the entries or wait until the runtime carries a customNotificationRef axis.`,\n );\n }\n seenRuntimeIdentities.set(runtimeIdentityKey, index);\n }\n}\n\n/**\n * Iterate every authored text slot and assert it has a non-empty trimmed\n * `purpose`, then assert the required slot keys (`subject` for email, `title`\n * for notification) are also present. This protects optional translatable\n * fragments (`previewText`, `ctaLabel`, `body`, `actionLabel`, …) from being\n * authored as placeholders that the translator cannot ground in author intent.\n */\nfunction assertEveryAuthoredTextSlot(\n ownerLabel: string,\n blockLabel: 'email' | 'notification',\n requiredSlotKeys: readonly string[],\n textSlots: TranslationSlotSpecificationMap | undefined,\n): void {\n for (const requiredKey of requiredSlotKeys) {\n const slot = textSlots?.[requiredKey];\n if (!slot || !slot.purpose || !slot.purpose.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.${blockLabel} must document text slot \"${requiredKey}\" with a non-empty purpose so translators have a grounded target.`,\n );\n }\n }\n if (!textSlots) {\n return;\n }\n for (const [slotKey, slot] of Object.entries(textSlots)) {\n if (!slot || !slot.purpose || !slot.purpose.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.${blockLabel}.textSlots[\"${slotKey}\"] must carry a non-empty purpose so translators have a grounded target for every authored slot.`,\n );\n }\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `communications.${blockLabel}.textSlots[\"${slotKey}\"].whenToUse`,\n slot.whenToUse,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `communications.${blockLabel}.textSlots[\"${slotKey}\"].notes`,\n slot.notes,\n );\n }\n}\n\n/**\n * When `eventData` is authored on either communications sub-block, assert its\n * `purpose` is a non-empty trimmed string. Companion prompts use this slot to\n * narrate which runtime values land in each translatable text slot, so a blank\n * `purpose` would produce a labelled but undocumented payload reference.\n */\nfunction assertOptionalEventDataSlot(\n ownerLabel: string,\n blockLabel: 'email' | 'notification',\n eventData: TranslationSlotSpecification | undefined,\n): void {\n if (!eventData) {\n return;\n }\n if (!eventData.purpose || !eventData.purpose.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.${blockLabel}.eventData must carry a non-empty purpose so companion prompts can narrate which runtime values land in each text slot.`,\n );\n }\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `communications.${blockLabel}.eventData.whenToUse`,\n eventData.whenToUse,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `communications.${blockLabel}.eventData.notes`,\n eventData.notes,\n );\n}\n\n/**\n * Validate a per-delivery `textSlotsOverrides` map (or any structurally\n * compatible `TranslationSlotSpecificationMap`):\n *\n * - absent map → no-op,\n * - every authored slot must carry a non-empty trimmed `purpose`,\n * - every authored optional `whenToUse` (if present) must be non-empty\n * trimmed prose so the renderer never prints `When to use .`,\n * - every authored `notes` array must follow the per-bullet contract.\n *\n * Path-agnostic: callers pass the full owner-relative path prefix (for\n * example `communications.email.deliveries[0].textSlotsOverrides`) so this\n * primitive serves every overlay surface without baking a sub-tree prefix\n * into the helper.\n */\nfunction assertTextSlotsOverrides(\n ownerLabel: string,\n pathPrefix: string,\n slots: TranslationSlotSpecificationMap | undefined,\n): void {\n if (!slots) {\n return;\n }\n for (const [slotKey, slot] of Object.entries(slots)) {\n if (!slot || !slot.purpose || !slot.purpose.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${pathPrefix}[\"${slotKey}\"] must carry a non-empty purpose so translators have a grounded target for every authored override.`,\n );\n }\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `${pathPrefix}[\"${slotKey}\"].whenToUse`,\n slot.whenToUse,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `${pathPrefix}[\"${slotKey}\"].notes`,\n slot.notes,\n );\n }\n}\n\n/**\n * Defensive guard for any optional `string[]` companion-bullet surface\n * (notes arrays, businessConstraints arrays, …). When the array is absent\n * the check is a no-op; when present, every entry must be a non-empty\n * trimmed string because the renderer emits each entry as a bullet — empty\n * entries leak blank lines into companion prompts and break the fail-closed\n * contract the surrounding validators promise.\n *\n * The helper is path-agnostic: callers pass the full owner-relative path\n * (for example `communications.email.codeHandling.notes` or\n * `scheduledExecution.codeHandling.notes`) so the same primitive serves\n * every overlay surface without baking a sub-tree prefix into the helper.\n *\n * @param ownerLabel Stable identifier of the owning operation (used in error\n * messages so authors can locate the broken spec immediately).\n * @param fullPath Dotted owner-relative authoring path; included verbatim in\n * the error message.\n */\nfunction assertOptionalNonEmptyStringList(\n ownerLabel: string,\n fullPath: string,\n values: string[] | undefined,\n): void {\n if (!values) {\n return;\n }\n for (const [index, value] of values.entries()) {\n if (typeof value !== 'string' || !value.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${fullPath}[${index}] must be a non-empty trimmed string.`,\n );\n }\n }\n}\n\n/**\n * Cross-validate the optional m2m delivery `level` against the runtime\n * `M2MNotificationLevel` enum so a typo (`'inf0'`, `'WARN'`, `'crit'`, …)\n * fails at module load instead of leaking through the spec validator and\n * surfacing later as a runtime Zod parse error (or, worse, leaking into\n * companion prompts unchanged).\n *\n * The TypeScript declaration `M2MNotificationLevel | (string & {})` exists\n * to give autocomplete on enum members in IDEs, but the runtime\n * `M2MNotificationDefinitionSchema` declares `level` as\n * `z.enum(M2MNotificationLevel).optional()` — strict enum-only. The spec\n * layer mirrors that runtime contract here so spec → runtime parity is\n * fail-closed at module load.\n *\n * Mirrors `assertSystemEmailTemplateCrossLink` in error-message structure:\n * `slotPath` is the full owner-relative path included verbatim so authors\n * can locate the broken delivery directly.\n */\nfunction assertOptionalM2MNotificationLevelMembership(\n ownerLabel: string,\n slotPath: string,\n level: M2MNotificationLevel | (string & {}) | undefined,\n): void {\n if (level === undefined) {\n return;\n }\n const allowedValues = Object.values(M2MNotificationLevel) as string[];\n if (!allowedValues.includes(level)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} \"${level}\" is not a member of M2MNotificationLevel (expected one of: ${allowedValues.join(', ')}). Use a M2MNotificationLevel enum value so spec → runtime parity stays fail-closed at module load.`,\n );\n }\n}\n\n/**\n * Cross-validate one M2M delivery `channelRef` against the owning resource's\n * `resourcePrimaryScope`.\n *\n * The runtime `WEBHOOK_ORGANIZATION` channel only fires when the operation's\n * resource lives under an organization scope — the dispatcher resolves the\n * scope from the organization initiator identity, which is only present on\n * organization-scoped operations.\n * Authoring `WEBHOOK_ORGANIZATION` on an APPLICATION/USER_SELF/ANONYMOUS\n * resource silently no-ops at runtime and is therefore a fail-closed\n * authoring error here.\n *\n * `WEBHOOK_APPLICATION` is allowed on any scope: the dispatcher resolves the\n * application scope from the always-present\n * `appConfigService.applicationId`, so the channel fires regardless of the\n * resource's own scope. The check is therefore one-sided — only the\n * `WEBHOOK_ORGANIZATION` arm fails closed.\n *\n * The cross-check is skipped when `resourcePrimaryScope` is `undefined`\n * — a defensive guard for re-validation seams that may be reached without\n * a scope (e.g., test fixtures invoking the validator directly, or future\n * call sites that haven't been updated). All production entry points\n * (`resourceSpecification`, `resourceSpecificationFromFrontendConfiguration`)\n * thread the scope explicitly, so this branch should not fire from the main\n * application path.\n */\nfunction assertM2MChannelMatchesPrimaryScope(\n ownerLabel: string,\n slotPath: string,\n channelRef: CoreM2MNotificationChannel,\n resourcePrimaryScope: ResourcePrimaryScope | undefined,\n): void {\n if (resourcePrimaryScope === undefined) {\n return;\n }\n if (channelRef === CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION) {\n if (resourcePrimaryScope !== ResourcePrimaryScope.ORGANIZATIONS) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} declares CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION on a resource whose resourcePrimaryScope is \"${resourcePrimaryScope}\". WEBHOOK_ORGANIZATION resolves its scope from executionContext.initiatorIds.organizationId, which is only present on resources whose resourcePrimaryScope is \"${ResourcePrimaryScope.ORGANIZATIONS}\" — for application/user/anonymous-scoped resources use CoreM2MNotificationChannel.WEBHOOK_APPLICATION instead so the dispatcher can resolve the scope from appConfigService.applicationId.`,\n );\n }\n }\n // WEBHOOK_APPLICATION resolves scope from appConfigService.applicationId,\n // which is always present, so it is allowed on every primary scope.\n}\n\n/**\n * Refuse a notification `targetRef` outside `CoreUserNotificationTarget`. The runtime refuses such a target when the\n * configuration is built, and every member has a recipient rule in the dispatcher, so a specification naming any\n * other value would describe a delivery that cannot exist.\n */\nfunction assertUserNotificationTargetMembership(ownerLabel: string, slotPath: string, targetRef: unknown): void {\n if (!Object.values(CoreUserNotificationTarget).includes(targetRef as CoreUserNotificationTarget)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} must be a CoreUserNotificationTarget member (${Object.values(CoreUserNotificationTarget).join(', ')}): the runtime resolves recipients for no other target.`,\n );\n }\n}\n\n/**\n * Cross-validate the optional `systemEmailTemplateRef` (now per-delivery)\n * against the runtime `SystemEmailTemplateRegistry` so a typo or stale ref\n * fails at module load instead of leaking a dangling cross-link into\n * companion prompts. Mirrors the registered-manifest cross-validation used\n * by the scheduledExecution `customBatchRef` arm — same anti-pattern, same\n * fail-closed treatment.\n *\n * `slotPath` is the full owner-relative path (e.g.\n * `communications.email.deliveries[2].systemEmailTemplateRef`) so error\n * messages locate the broken delivery directly.\n */\nfunction assertSystemEmailTemplateCrossLink(\n ownerLabel: string,\n slotPath: string,\n systemEmailTemplateRef: SystemEmailTemplateRef | undefined,\n): void {\n if (systemEmailTemplateRef === undefined) {\n return;\n }\n if (typeof systemEmailTemplateRef !== 'string' || !systemEmailTemplateRef.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} must be a non-empty trimmed SystemEmailTemplateRef value.`,\n );\n }\n if (!Object.prototype.hasOwnProperty.call(SystemEmailTemplateRegistry, systemEmailTemplateRef)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} \"${systemEmailTemplateRef}\" is not a member of SystemEmailTemplateRegistry. Use a SystemEmailTemplateRef enum value or register the template before this spec loads.`,\n );\n }\n}\n\n/**\n * Iterate an operation map and validate every authored `communications` block.\n *\n * `ownerLabelPrefix` lets factories disambiguate which seam produced the error\n * (base-operation vs frontend-view), since `ResourceFrontendViewSpecification`\n * structurally extends `ResourceOperationSpecification` and can therefore\n * author communications too.\n */\nfunction validateResourceOperationsCommunications(\n ownerLabelPrefix: string,\n operations:\n | Record<string, ResourceOperationSpecification | ResourceFrontendViewSpecification | undefined>\n | undefined,\n resourcePrimaryScope?: ResourcePrimaryScope,\n): void {\n if (!operations) {\n return;\n }\n for (const [operationId, operationSpec] of Object.entries(operations)) {\n if (!operationSpec) {\n continue;\n }\n validateResourceOperationCommunicationsSpecification(\n `${ownerLabelPrefix}${operationId}`,\n operationSpec.communications,\n resourcePrimaryScope,\n );\n }\n}\n\nconst registeredCustomBatchManifests = new Map<string, CustomBatchManifest>();\n\n/**\n * Register custom-batch manifests with the spec-layer registry so authored\n * `scheduledExecution.customBatchRef` values can be cross-validated at\n * module load. Safe to call multiple times; re-registering the same\n * `batchRef` with an identical manifest is a no-op, but re-registering with\n * a divergent shape is a fail-closed error so silent drift between the\n * runtime batch and the spec layer is caught immediately.\n *\n * The framework registers its built-in batches when the public specification\n * package is loaded. Applications with custom batches should register them\n * from their specification bootstrap before evaluating a resource\n * specification that refers to them.\n *\n * **Import-order contract — read this if you author CUSTOM_BATCH specs.**\n * Registering built-in batches depends on loading the public package entry.\n * A consumer that reaches a low-level internal module first can evaluate a\n * CUSTOM_BATCH-bearing resource spec against an empty registry and fail closed\n * on the cross-link check at\n * {@link validateResourceOperationScheduledExecutionSpecification}. The\n * fix in that case is to either (a) ensure the engine barrel is imported\n * first (typically via `import '@wildo-ai/saas-specifications'`), or (b)\n * explicitly register the manifests required by that application's bootstrap.\n * Both paths make the contract explicit rather than leaving availability to\n * import order. Test suites that reset the registry must re-seed for the same\n * reason.\n */\nexport function registerCustomBatchManifests(\n manifests: Iterable<CustomBatchManifest>,\n): void {\n for (const manifest of manifests) {\n if (!manifest.batchRef || !manifest.batchRef.trim()) {\n throw new Error('registerCustomBatchManifests(): every manifest must carry a non-empty `batchRef`.');\n }\n if (!manifest.operationIdentifier || !manifest.operationIdentifier.trim()) {\n throw new Error(\n `registerCustomBatchManifests(): manifest for \"${manifest.batchRef}\" must declare a non-empty trimmed \\`operationIdentifier\\`.`,\n );\n }\n assertCustomBatchManifestKindArm(manifest);\n const existing = registeredCustomBatchManifests.get(manifest.batchRef);\n if (existing && !areCustomBatchManifestsEqual(existing, manifest)) {\n throw new Error(\n `registerCustomBatchManifests(): manifest for \"${manifest.batchRef}\" was registered twice with divergent shapes. Deduplicate the co-located manifest exports or update the spec-layer registration call.`,\n );\n }\n registeredCustomBatchManifests.set(manifest.batchRef, manifest);\n }\n}\n\n/**\n * Per-arm structural validation for a {@link CustomBatchManifest} at\n * registration time. Mirrors the discriminated union split in\n * `ExecutionContextCreatorBackendService.createForInternalCustomBatch`:\n *\n * - `resource_anchored` — must declare a non-empty `resourceIdentifier`.\n * The spec layer does not (and should not) try to verify that the\n * identifier resolves to a registered resource — that cross-check lives\n * inside the runtime EC creator where the resources registry is the\n * source of truth and where a missing resource fails closed with the\n * same error message authors already see today.\n * - `scope_anchored` — must declare a `primaryScope` that is a member of\n * {@link ResourcePrimaryScope} (the runtime synthetic operation copies\n * this value into `resourcePrimaryScope`, so a typo would silently\n * widen or narrow downstream authorization). The `operationIdentifier`\n * must follow the `<domain>:<batch-ref>` convention so synthetic\n * operation labels stay grep-able alongside their batch ref — the\n * convention is also pinned by a dedicated unit test.\n *\n * Adding a future arm to {@link CustomBatchManifest} is a compile-time\n * error in the exhaustive `default` branch, forcing the author to extend\n * the per-arm rules instead of leaking an unchecked manifest into the\n * registry.\n */\nfunction assertCustomBatchManifestKindArm(manifest: CustomBatchManifest): void {\n switch (manifest.kind) {\n case CustomBatchManifestKind.RESOURCE_ANCHORED: {\n if (!manifest.resourceIdentifier || !manifest.resourceIdentifier.trim()) {\n throw new Error(\n `registerCustomBatchManifests(): resource_anchored manifest for \"${manifest.batchRef}\" must declare a non-empty trimmed \\`resourceIdentifier\\`.`,\n );\n }\n return;\n }\n case CustomBatchManifestKind.SCOPE_ANCHORED: {\n const allowedPrimaryScopes = Object.values(ResourcePrimaryScope) as readonly string[];\n if (!allowedPrimaryScopes.includes(manifest.primaryScope)) {\n throw new Error(\n `registerCustomBatchManifests(): scope_anchored manifest for \"${manifest.batchRef}\" declares unknown primaryScope \"${manifest.primaryScope}\". Use one of: ${allowedPrimaryScopes.join(', ')}.`,\n );\n }\n const colonIndex = manifest.operationIdentifier.indexOf(':');\n const domain = colonIndex >= 0 ? manifest.operationIdentifier.slice(0, colonIndex).trim() : '';\n const tail = colonIndex >= 0 ? manifest.operationIdentifier.slice(colonIndex + 1).trim() : '';\n if (colonIndex < 0 || !domain || tail !== manifest.batchRef) {\n throw new Error(\n `registerCustomBatchManifests(): scope_anchored manifest for \"${manifest.batchRef}\" must use the \"<domain>:${manifest.batchRef}\" convention for \\`operationIdentifier\\` (got \"${manifest.operationIdentifier}\"). Pick a non-empty domain prefix (e.g. \"notifications\") so synthetic operation labels stay grep-able alongside their batch ref.`,\n );\n }\n return;\n }\n default: {\n const exhaustiveCheck: never = manifest;\n throw new Error(\n `registerCustomBatchManifests(): unsupported CustomBatchManifest kind: ${JSON.stringify(exhaustiveCheck)}.`,\n );\n }\n }\n}\n\n/**\n * Test-only helper that wipes the module-local custom-batch manifest registry.\n * Authored specifications should never call this at runtime — it exists only\n * so tests can exercise registration / cross-validation in isolation.\n */\nexport function resetCustomBatchManifestRegistryForTesting(): void {\n registeredCustomBatchManifests.clear();\n}\n\n/**\n * Structural equality for two {@link CustomBatchManifest} values, used by\n * {@link registerCustomBatchManifests} to detect divergent re-registration of\n * the same `batchRef` across the engine + app bootstrap seams.\n *\n * Comparison rules:\n * - Both manifests must declare the same `kind` discriminator. A\n * `resource_anchored` manifest is **never** equal to a `scope_anchored`\n * one even if their non-arm fields happen to align — the two arms model\n * structurally different bootstrap semantics in\n * `ExecutionContextCreatorBackendService.createForInternalCustomBatch` and\n * silently treating them as interchangeable would mask a real authoring\n * bug at registration time.\n * - Common fields (`batchRef`, `operationIdentifier`, `cronExpression`,\n * `cronExpressionConfigurable`) must match across both arms.\n * - The arm-specific identity field is then compared:\n * `resourceIdentifier` for `resource_anchored`, `primaryScope` for\n * `scope_anchored`. The exhaustive switch makes adding a future arm a\n * compile-time error here rather than a silent equality regression.\n */\nfunction areCustomBatchManifestsEqual(a: CustomBatchManifest, b: CustomBatchManifest): boolean {\n if (a.kind !== b.kind) {\n return false;\n }\n const commonEqual =\n a.batchRef === b.batchRef\n && a.operationIdentifier === b.operationIdentifier\n && a.cronExpression === b.cronExpression\n && Boolean(a.cronExpressionConfigurable) === Boolean(b.cronExpressionConfigurable);\n if (!commonEqual) {\n return false;\n }\n switch (a.kind) {\n case CustomBatchManifestKind.RESOURCE_ANCHORED:\n return a.resourceIdentifier\n === (b as ResourceAnchoredCustomBatchManifest).resourceIdentifier;\n case CustomBatchManifestKind.SCOPE_ANCHORED:\n return a.primaryScope\n === (b as ScopeAnchoredCustomBatchManifest).primaryScope;\n default: {\n const exhaustiveCheck: never = a;\n throw new Error(\n `areCustomBatchManifestsEqual(): unsupported CustomBatchManifest kind: ${JSON.stringify(exhaustiveCheck)}.`,\n );\n }\n }\n}\n\n/**\n * Validation entry point used by the resource specification factory to assert\n * that an authored `scheduledExecution` block is internally consistent and,\n * for custom-batch arms, cross-checks against the declarative\n * {@link CustomBatchManifest} registry so typos or unregistered refs fail at\n * module load rather than silently at runtime.\n *\n * Each arm of the discriminated union enforces its own fail-closed contract:\n * - `NATIVE_CRON_JOB`: `cronExpression` must be a non-empty trimmed string.\n * - `NATIVE_BATCH_JOB`: no schedule or batch ref is permitted.\n * - `CUSTOM_BATCH`: `customBatchRef` must resolve to a registered manifest;\n * when the manifest declares a fixed cron the spec must echo it; when the\n * manifest is `cronExpressionConfigurable: true` the spec only needs to\n * carry a non-empty cron (divergence from the manifest default is allowed\n * because the runtime cron comes from app config); when the manifest omits\n * a cron entirely the spec must omit it too.\n *\n * Cross-validation is opt-in by design: the spec layer is built around a\n * declarative `CustomBatchManifest` registry seeded by the engine (and\n * optionally by app bootstraps) rather than an imperative dependency on\n * runtime service instances. If no manifest has been registered for a\n * `customBatchRef`, validation fails closed with an actionable message.\n *\n * **Test-suite seeding contract.** The framework registers built-in batches\n * when the public package entry is imported. Test files that\n * (a) reset the registry via {@link resetCustomBatchManifestRegistryForTesting}\n * and (b) need engine batches available afterwards must re-seed by calling\n * `registerCustomBatchManifests(ENGINE_CUSTOM_BATCH_MANIFESTS)` in `beforeAll`\n * or `beforeEach`. The current test suites either scope their reset to\n * test-only manifests or never reach built-in batches, so this remains an\n * explicit test setup contract.\n *\n * @param ownerLabel Stable identifier of the owning operation (used in error\n * messages so authors can locate the broken spec immediately).\n */\nexport function validateResourceOperationScheduledExecutionSpecification(\n ownerLabel: string,\n scheduledExecution: ResourceOperationScheduledExecutionSpecification | undefined,\n): void {\n if (!scheduledExecution) {\n return;\n }\n assertNonEmptyScheduledExecutionProseSlot(ownerLabel, 'purpose', scheduledExecution.purpose);\n assertNonEmptyScheduledExecutionProseSlot(ownerLabel, 'outcome', scheduledExecution.outcome);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'scheduledExecution.useWhen',\n scheduledExecution.useWhen,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'scheduledExecution.avoidWhen',\n scheduledExecution.avoidWhen,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'scheduledExecution.businessConstraints',\n scheduledExecution.businessConstraints,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'scheduledExecution.codeHandling.notes',\n scheduledExecution.codeHandling?.notes,\n );\n\n switch (scheduledExecution.variantType) {\n case ResourceOperationScheduledExecutionVariantType.NATIVE_CRON_JOB:\n assertNativeCronJobArm(ownerLabel, scheduledExecution);\n return;\n case ResourceOperationScheduledExecutionVariantType.NATIVE_BATCH_JOB:\n assertNativeBatchJobArm(ownerLabel, scheduledExecution);\n return;\n case ResourceOperationScheduledExecutionVariantType.CUSTOM_BATCH:\n assertCustomBatchArm(ownerLabel, scheduledExecution);\n return;\n default: {\n const exhaustiveCheck: never = scheduledExecution;\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution carries an unsupported variantType: ${JSON.stringify(exhaustiveCheck)}.`,\n );\n }\n }\n}\n\nfunction assertNonEmptyScheduledExecutionProseSlot(\n ownerLabel: string,\n slotLabel: 'purpose' | 'outcome',\n value: string | undefined,\n): void {\n if (!value || !value.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.${slotLabel} must be a non-empty prose slot so companion prompts have grounded cron-run semantics.`,\n );\n }\n}\n\n/**\n * Defense-in-depth runtime guards for the NATIVE_CRON_JOB arm.\n *\n * The static type already requires `cronExpression: string` and does **not**\n * declare `customBatchRef`, so well-typed authoring sites cannot reach an\n * invalid state. We still trim-check `cronExpression` and structurally reject\n * a smuggled `customBatchRef` so authoring sites that bypass type narrowing\n * (`as never`, `as any`, dynamic data, custom factories) cannot leak a blank\n * schedule or a foreign field into companion prompts. Symmetric with\n * {@link assertNativeBatchJobArm} so every arm enforces the same defensive\n * discipline.\n */\nfunction assertNativeCronJobArm(\n ownerLabel: string,\n arm: NativeCronJobScheduledExecutionSpecification,\n): void {\n if (!arm.cronExpression || !arm.cronExpression.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression must be a non-empty trimmed cron expression for the NATIVE_CRON_JOB arm (the runtime CRON_JOB variant requires a concrete schedule).`,\n );\n }\n if ('customBatchRef' in arm && (arm as unknown as { customBatchRef?: unknown }).customBatchRef !== undefined) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution cannot declare customBatchRef for the NATIVE_CRON_JOB arm — custom batches belong to the CUSTOM_BATCH arm so the declarative manifest cross-validation runs.`,\n );\n }\n}\n\n/**\n * Defense-in-depth runtime guards for the NATIVE_BATCH_JOB arm.\n *\n * The static type does **not** declare `cronExpression` or `customBatchRef`,\n * so well-typed authoring sites cannot reach this state. The structural\n * `'<key>' in arm` checks back the `// @ts-expect-error` test cases and\n * protect against dynamic data or `as any` bypasses at authoring sites — if\n * an author silences TypeScript to attach a stray field to a batch-job arm,\n * the validator still rejects it at module load.\n */\nfunction assertNativeBatchJobArm(\n ownerLabel: string,\n arm: NativeBatchJobScheduledExecutionSpecification,\n): void {\n if ('cronExpression' in arm && (arm as unknown as { cronExpression?: unknown }).cronExpression !== undefined) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution cannot declare cronExpression for the NATIVE_BATCH_JOB arm — batch-job variants are event-triggered and never carry a cron. Move the schedule to the NATIVE_CRON_JOB or CUSTOM_BATCH arm.`,\n );\n }\n if ('customBatchRef' in arm && (arm as unknown as { customBatchRef?: unknown }).customBatchRef !== undefined) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution cannot declare customBatchRef for the NATIVE_BATCH_JOB arm — custom batches belong to the CUSTOM_BATCH arm so the declarative manifest and cron echo stay consistent.`,\n );\n }\n}\n\n/**\n * Validates the CUSTOM_BATCH arm against the spec-layer manifest registry.\n *\n * Cron-echo policy:\n * - **Fixed-cron manifest** (`cronExpressionConfigurable !== true` and\n * `cronExpression` declared): the authored spec must echo the manifest's\n * cron exactly, so companion prompts and the runtime cannot drift.\n * - **Configurable-cron manifest** (`cronExpressionConfigurable === true`):\n * the authored spec must still carry a non-empty cron (companion prompts\n * need a cadence) but is free to diverge from the manifest's runtime\n * default — divergence is the whole point of configurability.\n * - **Event-triggered manifest** (`cronExpression` undefined): the spec\n * must omit `cronExpression` so it does not invent a schedule the runtime\n * never honors.\n */\nfunction assertCustomBatchArm(\n ownerLabel: string,\n arm: CustomBatchScheduledExecutionSpecification,\n): void {\n if (!arm.customBatchRef || !arm.customBatchRef.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.customBatchRef must be a non-empty trimmed batch ref for the CUSTOM_BATCH arm (for example \"files-cleanup\").`,\n );\n }\n if (\n 'cronExpression' in arm\n && arm.cronExpression !== undefined\n && (!arm.cronExpression || !arm.cronExpression.trim())\n ) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression must be a non-empty trimmed cron expression when provided (authors must not declare an empty schedule).`,\n );\n }\n\n const manifest = registeredCustomBatchManifests.get(arm.customBatchRef);\n if (!manifest) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.customBatchRef \"${arm.customBatchRef}\" is not registered. Either export a CustomBatchManifest next to the batch factory (engine batches go through ENGINE_CUSTOM_BATCH_MANIFESTS) and call registerCustomBatchManifests() before this spec loads, or correct the ref.`,\n );\n }\n if (manifest.cronExpression && !arm.cronExpression) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression must echo the runtime cron \"${manifest.cronExpression}\" declared by custom batch \"${arm.customBatchRef}\" so companion prompts see the authoritative cadence.`,\n );\n }\n if (!manifest.cronExpression && arm.cronExpression) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression is declared but custom batch \"${arm.customBatchRef}\" is registered without a cron (event-triggered). Remove the authored cron or update the manifest if the runtime actually schedules this batch.`,\n );\n }\n if (\n manifest.cronExpression\n && arm.cronExpression\n && !manifest.cronExpressionConfigurable\n && manifest.cronExpression !== arm.cronExpression\n ) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression \"${arm.cronExpression}\" does not match the manifest cron \"${manifest.cronExpression}\" for custom batch \"${arm.customBatchRef}\". Align the authored cron with the runtime batchCronjob_Context, or mark the manifest as cronExpressionConfigurable if the schedule is intentionally driven by app config.`,\n );\n }\n}\n\n/**\n * Iterate an operation map and validate every authored `scheduledExecution`\n * block. Same dual-seam rationale as communications: base-operation and\n * frontend-operation both structurally carry the slot, and both seams must\n * fail closed at module load.\n */\n/**\n * Every `ErrorType` value and every `ErrorCustomMessageReference` key and value — none of them is an\n * `error.code` — with the field each one belongs in. One identifier can belong to BOTH vocabularies\n * (`CONFLICT` is an `ErrorType` value and an `ErrorCustomMessageReference` key), so each maps to every\n * owner and the refusal names them all rather than guessing which was meant.\n */\nconst ERROR_IDENTIFIERS_OWNED_BY_OTHER_FIELDS: ReadonlyMap<string, readonly string[]> = (() => {\n const owners = new Map<string, string[]>();\n const add = (identifier: string, owner: string): void => {\n owners.set(identifier, [...(owners.get(identifier) ?? []), owner]);\n };\n for (const value of Object.values(ErrorType)) add(value, `an ErrorType value — author it as \\`errorType: ErrorType.${value}\\``);\n for (const [key, value] of Object.entries(ErrorCustomMessageReference)) {\n add(value, `an ErrorCustomMessageReference value — author it as \\`customMessageReference: ErrorCustomMessageReference.${key}\\``);\n add(key, `an ErrorCustomMessageReference key — author it as \\`customMessageReference: ErrorCustomMessageReference.${key}\\``);\n }\n return owners;\n})();\n\n/**\n * Refuse an `errorScenarios[].errorCode` that names a value the API sends in a DIFFERENT field of the\n * error body. `errorCode` documents `error.code`; an `ErrorType` arrives in `error.type` and an\n * `ErrorCustomMessageReference` in `error.customMessageReference`. Authored in the wrong field, the\n * reference tells a client to branch on an `error.code` it will never receive — the published\n * documentation did exactly that for 30 authored codes until the fields were separated (#1620).\n *\n * This refuses rather than marks because the artifact is untrue, and the remedy is editing it: move\n * the value to the field the message names. A code the operation genuinely throws in its error\n * context (`LAST_ORGANIZATION_OWNER`, a billing refusal code) is not either vocabulary and passes.\n */\nfunction validateResourceOperationsErrorScenarios(\n ownerLabelPrefix: string,\n operations: Record<string, ResourceOperationSpecification | undefined> | undefined,\n): void {\n for (const [operationId, operationSpec] of Object.entries(operations ?? {})) {\n for (const [index, scenario] of (operationSpec?.errorScenarios ?? []).entries()) {\n if (scenario.errorCode === undefined) continue;\n const owners = ERROR_IDENTIFIERS_OWNED_BY_OTHER_FIELDS.get(scenario.errorCode);\n if (owners !== undefined) {\n throw new Error(\n `${ownerLabelPrefix}${operationId}.errorScenarios[${index}].errorCode '${scenario.errorCode}' is ${owners.join(', or ')}. `\n + '`errorCode` documents `error.code` only, and the API never sends this value there.',\n );\n }\n }\n }\n}\n\nfunction validateResourceOperationsScheduledExecution(\n ownerLabelPrefix: string,\n operations:\n | Record<string, ResourceOperationSpecification | ResourceFrontendViewSpecification | undefined>\n | undefined,\n): void {\n if (!operations) {\n return;\n }\n for (const [operationId, operationSpec] of Object.entries(operations)) {\n if (!operationSpec) {\n continue;\n }\n validateResourceOperationScheduledExecutionSpecification(\n `${ownerLabelPrefix}${operationId}`,\n operationSpec.scheduledExecution,\n );\n }\n}\n\nexport type ResourceOperationSpecificationMap<\n TCustomOp extends EnumLikeType | undefined = any,\n TCoreOp extends Partial<CoreResourceOperation> | undefined = any,\n> = Partial<Record<ValidOperationKeys<TCustomOp, TCoreOp>, ResourceOperationSpecification>>;\n/** @wildo_source:part:end saas.specifications.resource-operation-spec */\n\nexport type ResourceSpecificationSurfacedOperationMap<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n> = Partial<Record<\n ValidOperationKeys<TCustomOp, TCoreOp>,\n {\n hasDefaultVariant: boolean;\n variantKeys: string[];\n }\n>>;\n\nexport interface ResourceFrontendOperationSurface {\n /** The operation's frontend surface — ADDRESSABLE (routed page) / EMBEDDED (non-addressable view rendered within a host) / API_ONLY (headless). */\n surface: ResourceOperationFrontendSurface;\n hasCustomView: boolean;\n /**\n * Resource-owned view refs rendered inside this operation host, computed\n * directly from the resource UI behavior's view declarations:\n *\n * - `compositeView.operationLike` / `chartView.operationLike` (single op),\n * - `executionView.surfaceInOperations` (list of `OperationKey`).\n *\n * There is no operation-level `additionalViews` authoring seam — the view\n * declaration itself is the single source of truth. Order is canonical:\n * composites first (authored map key order), then charts (authored array\n * order), then executions (authored map key order).\n */\n additionalViewRefs: string[];\n hasDisplayPresetOverride: boolean;\n hasNavigationOverrides: boolean;\n displayPriority?: number;\n hasIconOverride: boolean;\n}\n\nexport interface ResourceFrontendOperationSurfaceGroup {\n default?: ResourceFrontendOperationSurface;\n variants?: Record<string, ResourceFrontendOperationSurface>;\n}\n\nexport type ResourceFrontendOperationSurfaceMap<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n> = Partial<Record<ValidOperationKeys<TCustomOp, TCoreOp>, ResourceFrontendOperationSurfaceGroup>>;\n\n/**\n * @wildo_source:part:start saas.specifications.resource-frontend-configuration-aspect facet:layer:specification facet:family:companion\n *\n * Frontend aspect distilled from `ResourceUIBehavior` for specification / companion layers.\n */\nexport interface ResourceFrontendLabelAspect {\n strategy: 'field-paths' | 'computed';\n fieldNames?: string[];\n}\n\nexport interface ResourceFrontendLayoutAspect {\n refs?: LayoutRefManifest;\n hasDisplayTemplate: boolean;\n hasSummaryTemplate: boolean;\n hasEditTemplate: boolean;\n}\n\nexport interface ResourceFrontendConfigurationAspect<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n> {\n schema: TSchema;\n label?: ResourceFrontendLabelAspect;\n emptyState?: ResourceUIBehavior_EmptyState;\n layout?: ResourceFrontendLayoutAspect;\n guidance?: Record<string, ResourceUIBehavior_GuidanceFlow>;\n relationshipOverrides?: NonNullable<ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>['relationshipOverrides']>;\n surfacedOperations: ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp>;\n operations: ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp>;\n}\n/** @wildo_source:part:end saas.specifications.resource-frontend-configuration-aspect */\n\n// ── Frontend Specification Config ───────────────────────────────────────────\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-frontend-prose facet:layer:specification facet:family:companion\n *\n * Prose slots for resource specification `frontend` slice (label, layout, empty state, guidance, operations).\n */\nexport interface ResourceFrontendLabelSpecification {\n purpose: string;\n textSlots?: TranslationSlotSpecificationMap;\n}\n\nexport type ResourceFrontendStructuralSlotSpecification = StructuralTranslationSlotSpecification;\n\nexport interface ResourceFrontendLayoutSpecification {\n purpose?: string;\n displayPurpose?: string;\n summaryPurpose?: string;\n editPurpose?: string;\n /**\n * Intent of the resource's `layout.header` template — the record's IDENTITY\n * LINE in the READ page header (accent swatch / name / status / visibility\n * chips, in whatever order the resource composes them).\n *\n * Documented separately from `displayPurpose` because the two answer\n * different questions and, once a header template exists, must not repeat\n * each other: the header states WHICH record this is and what state it is in,\n * the display body states everything else about it.\n */\n headerPurpose?: string;\n sections?: Record<string, ResourceFrontendStructuralSlotSpecification>;\n wizardSteps?: Record<string, ResourceFrontendStructuralSlotSpecification>;\n groups?: Record<string, ResourceFrontendStructuralSlotSpecification>;\n}\n\n/**\n * The resource's EMPTY STATE — what an empty collection says under its page header.\n *\n * Authoring `purpose` is what gives the empty state a DESCRIPTION: the labelling pipeline plans\n * `resources.<type>.emptyState.description` only for a resource that authors it. Without it the empty state is\n * its title (\"No todos yet\") and the create button. That is deliberate: the line sits under a header that already\n * says what the items are and beside a button that names the action, so a description with nothing authored\n * behind it can only restate one of them (\"Create your first todo to get started.\" beside \"Create todo\").\n */\nexport interface ResourceFrontendEmptyStateSpecification {\n /**\n * Something the header does NOT say — typically the first concrete use, or when items come to appear here.\n * Example: \"Point at the first concrete use — marking that one todo cannot start until another is done.\"\n * Never the resource's purpose again, and never the create action: the button beside the line names it.\n */\n purpose: string;\n /** Documents the primary action for readers of the specification. The button is always the CREATE operation and reads its title; this names nothing on screen. */\n primaryActionPurpose?: string;\n /** Grounds the label of the empty state's secondary action (a link or guidance flow declared in the ui-behavior). */\n secondaryActionPurpose?: string;\n}\n\nexport interface ResourceFrontendGuidanceFlowSpecification {\n purpose: string;\n whenToTrigger?: string;\n textSlots?: TranslationSlotSpecificationMap;\n elements?: Record<string, {\n purpose: string;\n whenToUse?: string;\n textSlots?: TranslationSlotSpecificationMap;\n }>;\n}\n\n/**\n * Which separate view family an operation links to in addition to its main host.\n *\n * These families will later gain their own dedicated DTO registries; the\n * resource specification keeps the operation-owned linkage close to the\n * resource/runtime seam for now.\n */\nexport enum ResourceOperationOtherViewKind {\n EXECUTION = 'execution',\n CHART = 'chart',\n COMPOSITE = 'composite',\n FULL_CUSTOM = 'full-custom',\n}\n\n/**\n * Resource-owned direct host override selected through\n * `operationFrontendConfig.customView`.\n */\nexport interface ResourceOperationCustomViewSpecification {\n /** Why this direct operation host exists beyond the default resource shell. */\n purpose: string;\n /** Situations where this host override is the intended authoring choice. */\n whenToUse?: string;\n /** Meaning of the host-level translatable slots such as title and description. */\n textSlots?: TranslationSlotSpecificationMap;\n /** Optional preset/base shell that the custom view composes or extends. */\n basedOnPreset?: string;\n /** Public symbol exposing the actual custom host component. */\n implementationSymbol: CodeSymbolRef;\n /** Preferred public import surface when different from the implementation. */\n consumerFacingSymbol?: CodeSymbolRef;\n /** Public declarations where this custom view is authored/selected. */\n declarationSymbols?: CodeSymbolRef[];\n /** Extra caveats for companion/transposer layers. */\n notes?: string[];\n}\n\n/**\n * Additional non-host resource-owned views rendered inside a resource\n * operation host.\n *\n * These views are resolved by the framework directly from the resource UI\n * behavior's view declarations (`compositeViews[*].operationLike`,\n * `chartViews[*].operationLike`, `executionViews[*].surfaceInOperations`)\n * — there is no operation-level `additionalViews` authoring seam. The\n * specification layer simply mirrors, per operation, the set of resource-owned\n * views that target that operation host, for labelling/translation/authoring\n * documentation purposes.\n */\nexport interface ResourceOperationOtherViewSpecification {\n /** Stable referenced view identifier as declared by the resource UI behavior. */\n viewRef: string;\n /** Which view family owns the referenced view. */\n viewKind: ResourceOperationOtherViewKind;\n /** Why this extra linked view exists in the workflow. */\n purpose: string;\n /** Situations where the linked view should be used. */\n whenToUse?: string;\n /** Meaning of the linked-view translatable slots such as title and description. */\n textSlots?: TranslationSlotSpecificationMap;\n /** Extra caveats for companion/transposer layers. */\n notes?: string[];\n}\n\n/**\n * Operation-owned view seams layered on top of the semantic operation meaning.\n */\nexport interface ResourceOperationViewSpecification {\n /** Direct replacement host selected through `customView`, if any. */\n customView?: ResourceOperationCustomViewSpecification;\n /** Additional linked views exposed alongside the main operation host. */\n otherViews?: ResourceOperationOtherViewSpecification[];\n}\n\n/**\n * The frontend \"view\" of a single resource operation — the UI-side overlay\n * for an operation declared in `base.operations`.\n *\n * Structurally extends {@link ResourceOperationSpecification} so the same\n * intent/outcome/communications fields can be authored at this layer when\n * needed (the validators re-fire on every overlay seam — see\n * {@link resourceSpecificationFromFrontendConfiguration}). Adds variant\n * overlays and per-variant view-host configuration.\n *\n * Naming nuance: the inner `views?:` slot here is the *view-host* map (per\n * variant), distinct from the OUTER `frontend.views` map keyed by operation\n * id. Same word at two nesting levels — outer = \"views by operation\",\n * inner = \"view-hosts by variant\". Both are correct in their own right.\n */\nexport interface ResourceFrontendViewSpecification\n extends Omit<\n ResourceOperationSpecification,\n 'variants' | 'responseStatuses' | 'errorScenarios' | 'idempotent' | 'rateLimitNote' | 'examples'\n > {\n /** Variant-specific UI semantics layered under the same logical operation id. */\n variants?: ResourceFrontendViewSpecificationVariants;\n /**\n * Per-variant view-host configuration (`customView`, `otherViews`).\n * The \"view-hosts\" of this view, in other words. Naming overlap with the\n * outer `frontend.views` map is intentional — see interface JSDoc.\n */\n views?: {\n default?: ResourceOperationViewSpecification;\n variants?: Record<string, ResourceOperationViewSpecification>;\n };\n}\n\nexport type ResourceFrontendViewSpecificationMap<\n TCustomOp extends EnumLikeType | undefined = any,\n TCoreOp extends Partial<CoreResourceOperation> | undefined = any,\n> = Partial<Record<ValidOperationKeys<TCustomOp, TCoreOp>, ResourceFrontendViewSpecification>>;\n/** @wildo_source:part:end saas.specifications.resource-spec-frontend-prose */\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-frontend-config-type facet:layer:specification facet:family:companion\n *\n * Frontend-facing semantic additions layered on top of the base resource\n * specification.\n *\n * This slice is authored from a resolved `ResourceUIBehaviorConfig`, so it\n * should describe how the resource is surfaced to users, not restate structural\n * backend semantics that already live in the base specification.\n */\nexport type ResourceSpecificationFrontendConfig<\n TCustomOp extends EnumLikeType | undefined = any,\n TCoreOp extends Partial<CoreResourceOperation> | undefined = any,\n> = {\n /** Why this resource label strategy exists in surfaced UI. */\n label?: ResourceFrontendLabelSpecification;\n /** How the frontend layout organizes the resource meaning. */\n layout?: ResourceFrontendLayoutSpecification;\n /** Why the empty state is framed the way it is. */\n emptyState?: ResourceFrontendEmptyStateSpecification;\n /** Semantic intent of resource-owned guidance flows. */\n guidance?: Record<string, ResourceFrontendGuidanceFlowSpecification>;\n /**\n * Per-operation frontend overlays — the UI-side \"views\" of each domain\n * operation declared in `base.operations`.\n *\n * Keys are the same operation identifiers as `base.operations`. Each value\n * supplies frontend-specific prose (purpose, whenToUse, importance, variant\n * overlays) and view-host configuration. The base entry remains the domain\n * truth; this map says HOW that operation surfaces in the UI.\n *\n * Renamed from `operations` to `views` (April 2026): the previous name\n * suggested a duplicate domain-operations declaration, when the real intent\n * is \"the views of the operations\". The base operations map remains\n * `operations`; this UI overlay is `views`.\n *\n * Note on inner naming: each entry can declare a nested `views?:` slot that\n * holds per-variant view-host configuration (`customView`, `otherViews`).\n * The outer `views` (here) is \"views BY operation\"; the inner `views`\n * (inside each entry) is \"view-hosts BY variant\" — same word, different\n * nesting level, both correct in their own right.\n */\n views?: ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp>;\n};\n/** @wildo_source:part:end saas.specifications.resource-spec-frontend-config-type */\n\nexport interface ResourceSpecificationOperationVocabulary {\n /** Public enum exposing the framework core operation vocabulary. */\n coreEnum?: CodeSymbolRef;\n /** Public enum exposing resource-specific custom operations. */\n customEnum?: CodeSymbolRef;\n}\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-code-handling facet:layer:specification facet:family:companion\n *\n * Import-oriented references that help downstream prompt/transposition layers\n * write truthful code against this resource.\n */\nexport interface ResourceSpecificationCodeHandling {\n /** Public schema symbol that owns the resource main shape. */\n mainSchema: CodeSymbolRef;\n /** Public factory symbol that owns the resource structural contract. */\n resourceFactory?: CodeSymbolRef;\n /** Truthful locator when the resource factory lives inside a public collection export. */\n resourceFactoryCollectionEntry?: CodeCollectionEntryRef;\n /**\n * Public enum member representing this resource type.\n * Required: every resource specification identifies the same public resource\n * enum member used by its runtime factory. This lets coding and companion\n * workflows generate discriminated resource logic without guessing or\n * silently dropping the resource identity.\n */\n resourceType: CodeEnumMemberRef;\n /**\n * Public enums that define the operation identifier vocabulary.\n * Required whenever the resource has operations. Coding and companion\n * workflows use `coreEnum` / `customEnum` as the authoritative vocabulary\n * for emitted operation branches, so the declaration must be complete rather\n * than leaving the runtime to infer missing cases.\n */\n operationVocabulary: ResourceSpecificationOperationVocabulary;\n /**\n * Public frontend contribution symbols used to build the merged\n * `resourceFrontendConfiguration()` input.\n */\n frontendConfigurationSources?: CodeSymbolRef[];\n /** Truthful locators when frontend UI behavior leaves live inside public collections. */\n frontendConfigurationSourceEntries?: CodeCollectionEntryRef[];\n /** Extra caveats for downstream coding/transposition consumers. */\n notes?: string[];\n}\n/** @wildo_source:part:end saas.specifications.resource-spec-code-handling */\n\n// ── Resource Specification Config ───────────────────────────────────────────\n\n/**\n * @wildo_source:part:start saas.specifications.resource-pdf-template-spec facet:layer:specification facet:family:pdf-templates\n *\n * Companion-facing semantic projection for generated PDF file fields.\n *\n * Runtime truth lives in the shared `z_file({ generation })` metadata and the\n * backend-only `PdfTemplateDefinition` binding. `ResourcePdfTemplateSpecification`\n * documents the same boundary for app developers and companion prompts:\n * read-visible file output, no upload route, synchronous CREATE rendering,\n * no UPDATE auto-render, and explicit REGENERATE operation identity.\n */\nexport enum ResourcePdfTemplateOutputUploadRoute {\n NONE = 'none',\n}\n\nexport enum ResourcePdfTemplateCreateBehavior {\n RENDERS_SYNCHRONOUSLY = 'rendersSynchronously',\n}\n\nexport enum ResourcePdfTemplateUpdateBehavior {\n DOES_NOT_AUTO_RENDER = 'doesNotAutoRender',\n}\n\nexport enum ResourcePdfTemplateContextAvailability {\n PARENT_PAYLOAD_AND_PARENTS_ONLY = 'parentPayloadAndParentsOnly',\n PERSISTED_RECORD_AND_SUPPORTED_RELATIONSHIPS = 'persistedRecordAndSupportedRelationships',\n}\n\nexport type ResourcePdfTemplateSpecification = {\n fieldName: string;\n templateId: string;\n output: {\n mimeType: 'application/pdf';\n multiple: false;\n readVisible: true;\n writeStripped: true;\n uploadRoute: ResourcePdfTemplateOutputUploadRoute.NONE;\n };\n operations: {\n create: ResourcePdfTemplateCreateBehavior.RENDERS_SYNCHRONOUSLY;\n update: ResourcePdfTemplateUpdateBehavior.DOES_NOT_AUTO_RENDER;\n regenerateOperationIdentifier: string;\n };\n contextAvailability: {\n create: ResourcePdfTemplateContextAvailability.PARENT_PAYLOAD_AND_PARENTS_ONLY;\n regenerate: ResourcePdfTemplateContextAvailability.PERSISTED_RECORD_AND_SUPPORTED_RELATIONSHIPS;\n };\n};\n/** @wildo_source:part:end saas.specifications.resource-pdf-template-spec */\n\n/**\n * The file-export companion of one LIST/SEARCH operation, as the specification records it.\n *\n * ## Why this is its own section rather than an `operations` entry\n *\n * The companion is DERIVED — the resource factory emits it from a `collectionExport` declaration on\n * the source operation — so it has no authored identifier a spec author could key an `operations`\n * entry on, exactly like the generated-PDF regenerate operation above. What a reader needs from the\n * spec is the CONTRACT (which listing it exports, what it offers, where it routes, and what it\n * records), not a second description of the listing itself.\n *\n * The properties recorded here are the ones a consumer cannot infer from the source operation:\n * WHICH selectors are on offer, whether a ceiling exists, and that the export is audited. Everything\n * else — the roles, the filters, the sort, the tenancy — is the source operation's, by construction,\n * and duplicating it here would create a second place for it to drift.\n */\nexport type ResourceCollectionExportSpecification = {\n /** The LIST/SEARCH operation whose result set this exports; must be documented in `operations`. */\n sourceOperationId: string;\n /**\n * The route the companion answers on, relative to the source operation's own collection path —\n * `export` for a LIST, `search/export` for a SEARCH (it inherits the `search` segment its source\n * already carries, which is what keeps two companions of one resource from colliding).\n */\n routeSuffix: 'export' | 'search/export';\n /**\n * Offered wire formats, in the author's declared order — the first is the default. Typed from\n * `ResourceCollectionExportFormat`, so a format added to the engine is documentable the day it lands.\n */\n formats: readonly `${ResourceCollectionExportFormat}`[];\n /** Offered row scopes. `full_result_set` iterates pages; it never raises the source's page bound. */\n rowScopes: readonly ('visible_page' | 'full_result_set')[];\n /**\n * Match count above which a whole-result-set export is REFUSED. Absent ⇒ no ceiling.\n * The refusal is an error, never a truncated file.\n */\n maximumExportedRows?: number;\n /**\n * The template a PDF export is rendered through (#1645) — present exactly when `formats` offers\n * `pdf`, mirroring the runtime declaration.\n */\n pdfTemplateId?: string;\n /** The auditable event every export emits, carrying its row count. */\n auditEventType: 'collection_data_export';\n};\n\n/**\n * Structural validation for the documented export companions.\n *\n * Deliberately NOT a runtime cross-check against the resource configuration (the shape\n * `validateResourcePdfTemplates` performs for generated PDFs). That check earns its cost there\n * because a documented regenerate operation that runtime does not derive is a callable contract that\n * does not exist; here the companion's existence follows mechanically from a `collectionExport`\n * declaration the factory already refuses when malformed. What CAN drift, and is checked, is the\n * link between this section and the spec's own `operations` map: a documented export whose source\n * operation is undocumented describes a listing the reader cannot look up.\n */\nfunction validateResourceCollectionExports(\n prefix: string,\n collectionExports: readonly ResourceCollectionExportSpecification[] | undefined,\n documentedOperationIds: readonly string[],\n): void {\n if (!collectionExports) return;\n\n const seenSources = new Set<string>();\n for (const [index, entry] of collectionExports.entries()) {\n const entryPrefix = `${prefix}collectionExports[${index}]`;\n if (!entry.sourceOperationId?.trim()) {\n throw new Error(`${entryPrefix}.sourceOperationId must name the LIST/SEARCH operation this exports.`);\n }\n if (seenSources.has(entry.sourceOperationId)) {\n throw new Error(`${entryPrefix} documents a second export for \"${entry.sourceOperationId}\"; one operation has exactly one companion.`);\n }\n seenSources.add(entry.sourceOperationId);\n if (documentedOperationIds.length > 0 && !documentedOperationIds.includes(entry.sourceOperationId)) {\n throw new Error(\n `${entryPrefix}.sourceOperationId \"${entry.sourceOperationId}\" is not documented in this specification's operations; `\n + `an export describes a listing a reader must be able to look up.`,\n );\n }\n if (entry.formats.length === 0) {\n throw new Error(`${entryPrefix}.formats must not be empty — an export offering nothing is not an export.`);\n }\n if (entry.rowScopes.length === 0) {\n throw new Error(`${entryPrefix}.rowScopes must not be empty.`);\n }\n if (entry.maximumExportedRows !== undefined && entry.maximumExportedRows <= 0) {\n throw new Error(`${entryPrefix}.maximumExportedRows must be positive; omit it to declare no ceiling.`);\n }\n const offersPdf = entry.formats.includes(ResourceCollectionExportFormat.PDF);\n if (offersPdf !== (entry.pdfTemplateId !== undefined && entry.pdfTemplateId.trim() !== '')) {\n throw new Error(`${entryPrefix}.pdfTemplateId must be documented exactly when formats offers \"pdf\" (#1645).`);\n }\n if (offersPdf && entry.rowScopes.includes(ResourceCollectionExportRowScope.FULL_RESULT_SET) && entry.maximumExportedRows === undefined) {\n throw new Error(`${entryPrefix}.maximumExportedRows must be documented for a whole-set \"pdf\" export: a PDF is built in memory from every row (#1645).`);\n }\n }\n}\n\nfunction validateResourcePdfTemplates(\n prefix: string,\n pdfTemplates: readonly ResourcePdfTemplateSpecification[] | undefined,\n schema?: z.ZodTypeAny,\n resourceConfig?: ResourceConfigLike<any, any, any>,\n): void {\n const resourceConfigResolution = resolveResourceConfigLike(resourceConfig);\n const resolvedResourceConfig = resourceConfigResolution.config;\n const schemaGeneratedFields = collectGeneratedPdfTemplateFieldsForSpec(schema, resolvedResourceConfig);\n const arrayContainedGeneratedFields = schemaGeneratedFields.filter((field) => field.isInsideArray);\n if (arrayContainedGeneratedFields.length > 0) {\n throw new Error(`${prefix}pdfTemplates cannot document generated PDF z_file fields inside arrays or dynamic containers in v1: ${arrayContainedGeneratedFields.map((field) => field.fieldName).join(', ')}.`);\n }\n const schemaGeneratedFieldNames = new Set(schemaGeneratedFields.map((field) => field.fieldName));\n\n if (!pdfTemplates) {\n if (schemaGeneratedFields.length > 0) {\n throw new Error(`${prefix}pdfTemplates must document every generated PDF z_file field: ${schemaGeneratedFields.map((field) => field.fieldName).join(', ')}.`);\n }\n return;\n }\n\n if (resourceConfigResolution.error) {\n throw new Error(`${prefix}pdfTemplates cannot validate generated PDF runtime operations because the resource configuration factory could not be resolved: ${resourceConfigResolution.error.message}`);\n }\n\n const fieldNames = new Set<string>();\n for (const [index, entry] of pdfTemplates.entries()) {\n const entryPrefix = `${prefix}pdfTemplates[${index}]`;\n if (typeof entry.fieldName !== 'string' || entry.fieldName.trim().length === 0) {\n throw new Error(`${entryPrefix}.fieldName must be a non-empty string.`);\n }\n if (fieldNames.has(entry.fieldName)) {\n throw new Error(`${entryPrefix}.fieldName duplicates generated PDF field \"${entry.fieldName}\".`);\n }\n fieldNames.add(entry.fieldName);\n\n if (typeof entry.templateId !== 'string' || entry.templateId.trim().length === 0) {\n throw new Error(`${entryPrefix}.templateId must be a non-empty string.`);\n }\n\n const collectedField = schemaGeneratedFields.find((field) => field.fieldName === entry.fieldName);\n const fieldSchema = collectedField?.schema ?? (schema ? resolveSchemaFieldPath(schema, entry.fieldName) : undefined);\n if (schema && !fieldSchema) {\n throw new Error(`${entryPrefix}.fieldName references \"${entry.fieldName}\", but that field does not exist on the resource schema.`);\n }\n if (fieldSchema) {\n const fileMetadata = getFileMetadata(fieldSchema);\n if (!isTemplatableFileField(fieldSchema) || fileMetadata?.generation?.source !== FileGenerationSource.PDF_TEMPLATE) {\n throw new Error(`${entryPrefix}.fieldName references \"${entry.fieldName}\", but that field is not a generated PDF z_file field.`);\n }\n if (fileMetadata.generation.templateId !== entry.templateId) {\n throw new Error(`${entryPrefix}.templateId must match the z_file generation.templateId for \"${entry.fieldName}\".`);\n }\n }\n\n if (schema && !schemaGeneratedFieldNames.has(entry.fieldName)) {\n throw new Error(`${entryPrefix}.fieldName references \"${entry.fieldName}\", but that field is not a collected generated PDF z_file field on the resource schema.`);\n }\n\n if (\n entry.output?.mimeType !== 'application/pdf' ||\n entry.output.multiple !== false ||\n entry.output.readVisible !== true ||\n entry.output.writeStripped !== true ||\n entry.output.uploadRoute !== ResourcePdfTemplateOutputUploadRoute.NONE\n ) {\n throw new Error(`${entryPrefix}.output must describe a read-visible, write-stripped single PDF with no upload route.`);\n }\n\n if (\n !entry.operations ||\n entry.operations.create !== ResourcePdfTemplateCreateBehavior.RENDERS_SYNCHRONOUSLY ||\n entry.operations.update !== ResourcePdfTemplateUpdateBehavior.DOES_NOT_AUTO_RENDER ||\n typeof entry.operations.regenerateOperationIdentifier !== 'string' ||\n entry.operations.regenerateOperationIdentifier.trim().length === 0\n ) {\n throw new Error(`${entryPrefix}.operations must document synchronous CREATE rendering, no UPDATE auto-render, and a concrete regenerate operation identifier.`);\n }\n const expectedRegenerateIdentifier = Resources_SharedUtils.buildGeneratedFileRegenerateOperationIdentifier(entry.fieldName);\n if (entry.operations.regenerateOperationIdentifier !== expectedRegenerateIdentifier) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must be \"${expectedRegenerateIdentifier}\" for field \"${entry.fieldName}\".`);\n }\n validateGeneratedPdfRuntimeOperation(entryPrefix, entry, resolvedResourceConfig);\n\n if (\n !entry.contextAvailability ||\n entry.contextAvailability.create !== ResourcePdfTemplateContextAvailability.PARENT_PAYLOAD_AND_PARENTS_ONLY ||\n entry.contextAvailability.regenerate !== ResourcePdfTemplateContextAvailability.PERSISTED_RECORD_AND_SUPPORTED_RELATIONSHIPS\n ) {\n throw new Error(`${entryPrefix}.contextAvailability must document the supported CREATE and REGENERATE context shapes.`);\n }\n }\n\n const missingSchemaFields = schemaGeneratedFields\n .map((field) => field.fieldName)\n .filter((fieldName) => !fieldNames.has(fieldName));\n if (missingSchemaFields.length > 0) {\n throw new Error(`${prefix}pdfTemplates must document every generated PDF z_file field: ${missingSchemaFields.join(', ')}.`);\n }\n}\n\nfunction resolveResourceConfigLike(\n resourceConfig?: ResourceConfigLike<any, any, any>,\n): { config?: { operations?: any[] }; error?: Error } {\n if (!resourceConfig) {\n return {};\n }\n\n if (typeof resourceConfig !== 'function') {\n return { config: resourceConfig as { operations?: any[] } };\n }\n\n try {\n return { config: resourceConfig([]) as { operations?: any[] } };\n } catch (error) {\n return {\n error: error instanceof Error\n ? error\n : new Error(String(error)),\n };\n }\n}\n\nfunction collectGeneratedPdfTemplateFieldsForSpec(\n schema?: z.ZodTypeAny,\n resourceConfig?: { operations?: any[] },\n) {\n const fieldsByName = new Map<string, ReturnType<typeof collectTemplatableFileFieldPaths>[number]>();\n const addFields = (sourceSchema?: z.ZodTypeAny): void => {\n if (!sourceSchema) {\n return;\n }\n for (const field of collectTemplatableFileFieldPaths(sourceSchema)) {\n const metadata = getFileMetadata(field.schema);\n if (metadata?.generation?.source !== FileGenerationSource.PDF_TEMPLATE) {\n continue;\n }\n const existing = fieldsByName.get(field.fieldName);\n if (existing && !areGeneratedPdfFieldMetadataCompatible(existing.schema, field.schema)) {\n throw new Error(`pdfTemplates generated PDF field \"${field.fieldName}\" has incompatible z_file generation metadata across resource schemas.`);\n }\n fieldsByName.set(field.fieldName, existing\n ? { ...existing, isInsideArray: existing.isInsideArray || field.isInsideArray }\n : field);\n }\n };\n\n addFields(schema);\n\n for (const operation of resourceConfig?.operations ?? []) {\n if (operation.generatedOperation?.kind !== ResourceGeneratedOperationKind.GENERATED_FILE_REGENERATE) {\n continue;\n }\n const responseShape = getZodObjectShape(operation.responseDto);\n addFields(responseShape?.resource as z.ZodTypeAny | undefined);\n }\n\n return Array.from(fieldsByName.values()).sort((left, right) =>\n left.fieldName.localeCompare(right.fieldName)\n );\n}\n\nfunction validateGeneratedPdfRuntimeOperation(\n entryPrefix: string,\n entry: ResourcePdfTemplateSpecification,\n resourceConfig?: { operations?: any[] },\n): void {\n if (!resourceConfig || !('operations' in resourceConfig) || !Array.isArray(resourceConfig.operations)) {\n return;\n }\n\n const defaultUpdateOperation = resourceConfig.operations.find((operation) =>\n operation.operationIdentifier === CoreResourceOperation.UPDATE\n && operation.isOperationDefault === true\n && (\n operation.variantType === ResourceOperationVariantType.API_CALL\n || operation.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n )\n && operation.isBulkOperation !== true\n );\n if (!defaultUpdateOperation) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier requires the resource configuration to expose a default non-bulk URL-bearing UPDATE operation.`);\n }\n\n const regenerateOperation = resourceConfig.operations.find((operation) =>\n operation.operationIdentifier === entry.operations.regenerateOperationIdentifier\n );\n if (\n !regenerateOperation ||\n regenerateOperation.generatedOperation?.kind !== ResourceGeneratedOperationKind.GENERATED_FILE_REGENERATE ||\n regenerateOperation.generatedOperation?.fieldName !== entry.fieldName\n ) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must reference an existing generated file REGENERATE operation for \"${entry.fieldName}\".`);\n }\n\n const responseShape = getZodObjectShape(regenerateOperation.responseDto);\n if (!responseShape?.resource || !responseShape.file) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must reference a generated REGENERATE operation whose responseDto is { file, resource }.`);\n }\n // Structural shape check (NOT reference equality). The factory builds\n // `responseShape.file` with `z_file()` (a marked single file, #1959), a\n // fresh instance per resource, so there is no shared schema to compare\n // against — and even if there were, reference equality would not hold:\n // 1. The runtime DTO builder (`resources-config-operations.dtos-builder.utils.ts`,\n // \"Transform z.date() → z.coerce.date() recursively for API/WebSocket/Queue\n // DTOs.\") rewrites the schema tree before it lands on the operation —\n // the file-shaped schema reaching this validator is intentionally a\n // different object than the one the factory built.\n // 2. The dev-companion is framework code that introspects ANY app via\n // a subprocess; reference identity is not preserved across the\n // framework / app process boundary by definition. The validator must\n // verify the contract shape, not the JS reference.\n // The `SingleFileValue` contract is a Zod object with `{ fileId: string,\n // updatedAt: date }` — assert exactly that shape, ignoring `coerce` and\n // any other DTO-transform overlays that don't change the contract.\n const fileSchemaShape = getZodObjectShape(responseShape.file as z.ZodTypeAny);\n if (\n !fileSchemaShape?.fileId\n || getZodType(fileSchemaShape.fileId) !== 'string'\n || !fileSchemaShape?.updatedAt\n || getZodType(fileSchemaShape.updatedAt) !== 'date'\n ) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must reference a generated REGENERATE operation whose responseDto.file matches the SingleFileValue shape ({ fileId: string, updatedAt: date }).`);\n }\n // Structural field-presence check (NOT metadata-based detection). Cannot\n // rely on `collectGeneratedPdfTemplateFieldsForSpec` here because that\n // helper filters by `getFileMetadata().generation.source === PDF_TEMPLATE`,\n // and the WeakMap-keyed metadata bindings on the field schemas don't\n // survive the runtime DTO transform (`resources-config-operations.dtos-builder.utils.ts`)\n // that rewrites the schema tree before it lands on the operation. The\n // framework validator runs against the post-transform schema and so must\n // assert by NAME — the contract is \"responseDto.resource carries a field\n // named `${entry.fieldName}`\", which is checkable without metadata.\n // The runtime DTO transform may wrap the resource sub-schema (e.g. in a\n // `z.pipe(...)` for date coercion), so a direct `getZodObjectShape` call\n // returns an empty shape. Unwrap repeatedly until we hit a shape-bearing\n // object — the field-presence check needs the underlying object schema's\n // top-level keys.\n if (!resourceContainsFieldName(responseShape.resource as z.ZodTypeAny, entry.fieldName)) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must reference a generated REGENERATE operation whose responseDto.resource includes \"${entry.fieldName}\".`);\n }\n}\n\n/**\n * Recursively walk a Zod schema (handling `pipe`, `optional`, `nullable`,\n * `default`, decorator wrappers, `intersection`, and `union` discriminated /\n * untagged variants) to determine whether ANY object branch declares a\n * top-level field with the given name.\n *\n * Mirrors the traversal in `collectTemplatableFileFieldPaths` (engine/saas-models/.../\n * templatable-file-fields.shared.utils.ts) so the validator's structural\n * check follows the same schema-tree shape as the original metadata-based\n * detection. The original detection filtered by `getFileMetadata().generation.source`,\n * which is a WeakMap-keyed binding that the runtime DTO transform\n * (`z.date()` → `z.coerce.date()` rewrite that lifts schemas into pipes /\n * synthesizes new union variants) doesn't preserve. The validator therefore\n * asserts by NAME across all object branches — name presence is the\n * structural contract that survives the transform.\n */\nfunction resourceContainsFieldName(schema: z.ZodTypeAny, fieldName: string): boolean {\n const seen = new WeakSet<object>();\n function walk(node: z.ZodTypeAny | undefined): boolean {\n if (!node || typeof node !== 'object' || seen.has(node)) return false;\n seen.add(node);\n\n const shape = getZodObjectShape(node);\n if (shape[fieldName]) return true;\n\n const rawType = getZodType(node);\n if (rawType === 'pipe') {\n const inSchema = getZodDefSchemaProperty(node, 'in');\n const outSchema = getZodDefSchemaProperty(node, 'out');\n return walk(outSchema) || walk(inSchema);\n }\n if (rawType === 'union') {\n const options = getZodDefArrayProperty(node, 'options') as z.ZodTypeAny[] | undefined;\n return (options ?? []).some(walk);\n }\n if (rawType === 'intersection') {\n return walk(getZodDefSchemaProperty(node, 'left'))\n || walk(getZodDefSchemaProperty(node, 'right'));\n }\n const innerType = getZodDefSchemaProperty(node, 'innerType');\n if (innerType) return walk(innerType);\n const unwrapped = unwrapSchema(node);\n if (unwrapped !== node) return walk(unwrapped);\n return false;\n }\n return walk(schema);\n}\n\nfunction normalizeMetadataForComparison(value: unknown): unknown {\n if (Array.isArray(value)) {\n return value.map(normalizeMetadataForComparison);\n }\n\n if (value && typeof value === 'object') {\n return Object.fromEntries(\n Object.entries(value as Record<string, unknown>)\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([key, childValue]) => [key, normalizeMetadataForComparison(childValue)]),\n );\n }\n\n return value;\n}\n\nfunction areGeneratedPdfFieldMetadataCompatible(\n leftSchema: z.ZodTypeAny,\n rightSchema: z.ZodTypeAny,\n): boolean {\n return JSON.stringify(normalizeMetadataForComparison(getFileMetadata(leftSchema)))\n === JSON.stringify(normalizeMetadataForComparison(getFileMetadata(rightSchema)));\n}\n\nfunction resolveSchemaFieldPath(\n schema: z.ZodTypeAny,\n fieldPath: string,\n): z.ZodTypeAny | undefined {\n const segments = fieldPath.split('.').filter(Boolean);\n return resolveSchemaFieldPathSegments(schema, segments, new WeakSet<z.ZodTypeAny>());\n}\n\nfunction resolveSchemaFieldPathSegments(\n schema: z.ZodTypeAny | undefined,\n segments: string[],\n activeSchemas: WeakSet<z.ZodTypeAny>,\n): z.ZodTypeAny | undefined {\n if (!schema) {\n return undefined;\n }\n if (segments.length === 0) {\n return schema;\n }\n if (activeSchemas.has(schema)) {\n return undefined;\n }\n\n activeSchemas.add(schema);\n try {\n const schemaType = getZodType(schema);\n if (schemaType === 'lazy') {\n const lazyGetter = getZodDef(schema)?.getter;\n if (typeof lazyGetter !== 'function') {\n return undefined;\n }\n return resolveSchemaFieldPathSegments(lazyGetter() as z.ZodTypeAny, segments, activeSchemas);\n }\n\n if (schemaType === 'intersection') {\n const leftSchema = getZodDefSchemaProperty(schema, 'left');\n const rightSchema = getZodDefSchemaProperty(schema, 'right');\n return resolveSchemaFieldPathSegments(leftSchema, segments, activeSchemas)\n ?? resolveSchemaFieldPathSegments(rightSchema, segments, activeSchemas);\n }\n\n if (schemaType === 'union') {\n const options = (getZodDefArrayProperty(schema, 'options') as z.ZodTypeAny[] | undefined) ?? [];\n for (const option of options) {\n const resolved = resolveSchemaFieldPathSegments(option, segments, activeSchemas);\n if (resolved) {\n return resolved;\n }\n }\n return undefined;\n }\n\n if (schemaType === 'pipe') {\n const inSchema = getZodDefSchemaProperty(schema, 'in');\n const outSchema = getZodDefSchemaProperty(schema, 'out');\n return resolveSchemaFieldPathSegments(outSchema, segments, activeSchemas)\n ?? resolveSchemaFieldPathSegments(inSchema, segments, activeSchemas);\n }\n\n const unwrapped = unwrapSchema(schema);\n if (unwrapped !== schema) {\n return resolveSchemaFieldPathSegments(unwrapped, segments, activeSchemas);\n }\n\n const [segment, ...rest] = segments;\n const shape = getZodObjectShape(unwrapped);\n return resolveSchemaFieldPathSegments(shape?.[segment] as z.ZodTypeAny | undefined, rest, activeSchemas);\n } finally {\n activeSchemas.delete(schema);\n }\n}\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-config facet:layer:specification facet:family:companion\n *\n * Callback parameter type for `resourceSpecification()`.\n *\n * Mirrors `ResourceUIBehaviorCallbackParams` — the factory resolves the schema\n * shape so that `{primitive}Spec()` decorators can be called with type safety.\n */\nexport type ResourceSpecificationCallbackParams<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n> = {\n /** The raw Zod schema (e.g., `TodoSchema`). */\n schema: TSchema;\n /** Pre-resolved shape — each key is a schema field ready for decorator chaining. */\n schemaShape: ObjectShape<TSchema>;\n};\n\n/**\n * Return type of the base `resourceSpecification()` callback.\n *\n * Resource-level prose lives here alongside the per-field decorator container.\n * The `fields` property works identically to `ResourceUIBehaviorConfig.fields`:\n * calling `{primitive}Spec()` on a shape field mutates its metadata in place;\n * the property itself exists for type safety and declaration.\n *\n * **Validator-entry contract — read this before constructing this object\n * directly (M5-9).** The cross-cutting fail-closed validators that protect\n * spec → runtime parity (`validateResourceOperationsCommunications`,\n * `validateResourceOperationsScheduledExecution`, and the per-delivery,\n * per-slot, per-field assertions they fan out to) ONLY fire from inside\n * the two authoring factories:\n *\n * 1. {@link resourceSpecification} — runs the validators on\n * `config.operations` and `config.frontend?.views` after the\n * callback returns.\n * 2. {@link resourceSpecificationFromFrontendConfiguration} — runs the\n * validators on `base.operations`, `base.frontend?.views`, and the\n * callback's `frontend.views` (the `base` revalidation forecloses\n * a hand-built-base regression silently bypassing the contract).\n *\n * If a future caller constructs a `ResourceSpecificationConfig` literal\n * by hand and exports it WITHOUT routing it through one of those two\n * factories, NONE of the per-delivery / per-slot / per-channel uniqueness\n * / system-email cross-link / m2m runtime-identity / M2MNotificationLevel\n * enum-membership / scheduledExecution custom-batch cross-link checks\n * will run — the spec would compile and ship, and the dispatch-side\n * contract violations would only surface as runtime errors at companion\n * render time or, worse, at user-facing dispatch time. Always author via\n * the two factories above; treat this type as the factory return shape,\n * not as a raw spec authoring surface.\n */\nexport type ResourceSpecificationConfig<\n TCustomOp extends EnumLikeType | undefined = any,\n TCoreOp extends Partial<CoreResourceOperation> | undefined = any,\n TSchema extends z.ZodTypeAny = z.ZodAny,\n> = {\n /** Why this resource exists in the domain. */\n purpose: string;\n /** Functional role played by the resource inside the business architecture. */\n businessRole: string;\n /** How the resource evolves over time (lifecycle semantics). */\n lifecycleRole?: string;\n /**\n * Which part of the product this resource belongs to, WITHIN its owner.\n *\n * A second grouping axis under the one that already exists. An application's resources are grouped\n * by the module that registers them; the engine's are grouped by nothing, so every surface that\n * has to present them — the domain-model graph, `wildo context`, generated documentation, an\n * application-creation playbook — meets one flat set of 85 and either shows it undifferentiated or\n * invents a grouping of its own and drifts from the next surface that does the same.\n *\n * Typed `string` and OPEN on purpose. The engine's values are a closed vocabulary with a named\n * runtime source, {@link EngineResourceSubDomain} in this package's `engine` surface, and engine\n * specs must use it. An application's sub-domains are its own — this repository cannot enumerate\n * a vocabulary it does not own, and a union that tried would refuse every real application.\n *\n * Optional, and its absence means exactly \"unclassified\" rather than \"belongs to a default\". A\n * consumer grouping by it must carry a bucket for that and say so; silently folding unclassified\n * rows into a real group is how a grouping starts lying.\n *\n * Distinct from {@link ResourceSpecificationConfig.resourcePrimaryScope}, which answers WHO a row\n * belongs to. This answers what it is ABOUT, and one sub-domain spans several scopes.\n */\n subDomain?: string;\n /**\n * Intended READER of this resource's generated labels — the register the label\n * generator should adopt: {@link LabelAudience.END_USER} for consumer surfaces\n * (todos, lists, profile), {@link LabelAudience.ADMIN} for operator /\n * back-office resources (users, organizations, billing, roles, audit),\n * {@link LabelAudience.DEVELOPER} for integration / technical resources (API\n * keys, webhooks, M2M, SCIM/SIEM). An operation may override it per-operation\n * via {@link ResourceOperationVariantSpecification.audienceOverride}.\n *\n * **Required.** Every resource spec must declare its audience so the label\n * generator picks the correct register (product copy vs operator console vs\n * technical / integration voice) without guessing from field names. The\n * labelling projector still keeps an end-user-normalizing fallback for the\n * rare hand-built config paths that bypass the authoring factories, but the\n * type contract now forces authors to make the choice explicitly.\n */\n audience: LabelAudience;\n /**\n * The resource's primary scope — **factory-set, never author-set**.\n *\n * The specification author declares scope via the fourth `options` argument\n * to {@link resourceSpecification}; the factory writes that resolved scope\n * here so downstream consumers, including\n * {@link resourceSpecificationFromFrontendConfiguration}'s re-validation\n * passes, can read it from `base.resourcePrimaryScope`.\n *\n * Optional only as a soft-fail concession to hand-built spec configs\n * that bypass both authoring factories — those paths intentionally\n * forfeit the m2m channel × scope cross-check on the re-validation\n * seams. Every spec produced by either factory carries this field.\n *\n * There is no local drift check between this declared value and the\n * registry-assembled `resourcePrimaryScope`: this layer cannot observe the\n * real `ResourceRelationship[]` needed to make that comparison. The\n * registry/companion assembly layer performs that cross-check when both\n * signals are available.\n */\n resourcePrimaryScope?: ResourcePrimaryScope;\n /**\n * The resource's PIPELINE, described from its `externalDataPipeline` declaration (#1685) — where the rows come from,\n * which rows, and what writes each local field, declared expressions included. An OUTBOUND pipeline (#1690) is\n * described the other way round: `direction`, the verbs it `sends`, and each local field sent to a remote field.\n *\n * DERIVED, never authored: `resourceSpecification()` refuses a callback that returns it, and attaches it itself\n * when it can materialize the resource configuration — that is, when the spec supplies `resourceRelationships`\n * (the preferred path). The companion's specification projection derives the same description from the\n * configuration it holds, so a spec on the explicit-scope path still has it there. A description typed by hand is\n * a second copy of the declaration, and the second copy is the one that drifts.\n */\n externalDataPipeline?: ExternalDataPipelineDescription;\n /** Public-import-oriented metadata for downstream code-handling prompts. */\n codeHandling?: ResourceSpecificationCodeHandling;\n\n /**\n * Per-field specification decorators for the resource's `mainSchema`.\n *\n * Keys are field names of `TMainSchema`; values are decorated Zod schemas\n * from the same shape (e.g., `shape.status.enumSpec({ ... })`).\n *\n * The merge happens at **module evaluation time** — calling `.enumSpec()`\n * on a shape field mutates its metadata in place. The `fields` property\n * exists primarily for type safety (`keyof ObjectShape<TMainSchema>`) and\n * as a declaration container — same semantics as `ResourceUIBehavior.fields`.\n */\n fields?: {\n [K in keyof ObjectShape<TSchema>]?: ObjectShape<TSchema>[K];\n };\n /**\n * Explicit field metadata entries that do not live on `mainSchema`.\n *\n * Use this for inherited/variant-only fields or any companion-facing field\n * semantics that should not depend on cross-package schema singleton sharing.\n */\n additionalFieldSpecs?: ExtractedFieldSpec[];\n\n /** Semantic clarification for operations. */\n operations?: ResourceOperationSpecificationMap<TCustomOp, TCoreOp>;\n /** Generated PDF field semantics exposed to companion/spec consumers. */\n pdfTemplates?: ResourcePdfTemplateSpecification[];\n /** File-export companions derived from LIST/SEARCH `collectionExport` declarations. */\n collectionExports?: ResourceCollectionExportSpecification[];\n /** Frontend-facing semantic layer derived from UI behavior leaves. */\n frontend?: ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp>;\n /** Domain caveats not encoded structurally elsewhere. */\n businessConstraints?: string[];\n};\n\nexport type AnyResourceSpecificationConfig = ResourceSpecificationConfig<any, any, any>;\n\n/**\n * Resource specification overlay — keyed by resource type.\n * Same structural pattern as `ResourceUIBehavior = Record<string, ResourceUIBehaviorConfig>`.\n */\nexport type ResourceSpecification = Record<string, AnyResourceSpecificationConfig>;\n/** @wildo_source:part:end saas.specifications.resource-spec-config */\n\nexport type ResourceSpecificationFromFrontendConfigurationCallbackParams<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n> = {\n /** Resolved base resource specification to enrich. */\n base: ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>;\n /** Merged frontend configuration aspect used as the semantic source. */\n frontendConfiguration: ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema>;\n /** Schema recovered from the UI behavior leaf for typed field access if needed. */\n schema: TSchema;\n /** Pre-resolved schema shape for decorator-aware field access. */\n schemaShape: ObjectShape<TSchema>;\n /**\n * Frontend-exposed operation inventory derived from the UI behavior `views` map.\n *\n * This keeps the UI-derived specification honest: callers can see which\n * operations are actually surfaced and which named variants are present.\n */\n surfacedOperations: ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp>;\n};\n\nexport type ResourceSpecificationFromFrontendConfigurationOptions<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n> = {\n /**\n * Runtime resource configuration used to validate generated PDF operations.\n *\n * The base `resourceSpecification(...)` call validates this when it owns the\n * authored spec. The frontend wrapper also accepts hand-built bases, so any\n * base carrying `pdfTemplates` must provide the same runtime config here\n * rather than silently skipping generated-operation checks.\n */\n resourceConfig?: ResourceConfigLike<TCustomOp, TCoreOp, TSchema>;\n};\n\n\n// ── Factory Function ────────────────────────────────────────────────────────\n\n/**\n * Options object accepted by {@link resourceSpecification}. Exactly ONE of\n * `resourceRelationships` or `resourcePrimaryScope` must be supplied — the\n * spec layer needs at least one signal to validate scope-driven concerns\n * (m2m channel × scope cross-check, generated PDF runtime operations).\n *\n * **`resourceRelationships` is the preferred path** when the spec layer can\n * import the registry (e.g. `wonder-todos/specifications` already depends on\n * `@wonder-todos/shared-lib`). The framework calls `_factory(rels)` once,\n * derives `resourcePrimaryScope` from the same `isPrimaryScope: true` rel\n * the runtime uses, and threads the resolved config into the pdfTemplates\n * validator — eliminating the redundant explicit declaration.\n *\n * **`resourcePrimaryScope` remains for spec sites that genuinely cannot see\n * the registry** (engine-internal specs that ship without a workspace dep on\n * the consuming app's shared-lib). When supplied alone, the validator falls\n * back to `_factory([])`, which works for self-anchoring resources\n * (USERS / ORGANIZATIONS / APPLICATION / ANONYMOUS_USERS) and any resource\n * that doesn't author `pdfTemplates`.\n */\nexport type ResourceSpecificationOptions = {\n /**\n * Registry-resolved relationships for this resource. When supplied,\n * `resourcePrimaryScope` is derived from the registry signal\n * (`isPrimaryScope: true` rel) — the spec does NOT need to redeclare it.\n *\n * The framework calls `_factory(resourceRelationships)` once and uses the\n * resolved config for both scope derivation AND the pdfTemplates validator\n * (which would otherwise crash on `_factory([])` for any resource that\n * needs a registry rel for its primary scope).\n *\n * Import the rels from the consuming module's registry contribution, e.g.:\n * `import { moduleResourcesRelationships } from '@wonder-todos/shared-lib';`\n */\n resourceRelationships?: readonly ResourceRelationship[];\n /**\n * The resource's primary scope. Required when `resourceRelationships` is\n * not supplied; redundant (and ignored — the registry-derived value wins)\n * when both are supplied.\n *\n * **Why explicit and not derived.** Phase 4 attempted to derive this\n * value at the spec layer by invoking the resource configuration factory\n * with an empty relationships array (`_factory([])`) and reading\n * `resourcePrimaryScope` off the returned config. That approach was a\n * mis-implementation: the spec layer has no access to the real\n * cross-resource `ResourceRelationship[]` (those are wired in the\n * registry at assembly time), so `_factory([])` produces a degenerate\n * configuration whose primary-scope falls through to the\n * `ORGANIZATIONS` default branch in\n * `resources-config.shared.factory.ts` for every non-self-anchor\n * resource. The \"derived\" value was therefore not the real scope but\n * the factory's empty-input fallback — meaningless for any resource\n * whose true scope is `APPLICATION`, `USER_SELF`, or `ANONYMOUS`.\n *\n * Step 2 makes the declaration the single source of truth at the spec\n * layer and removes the broken extractor entirely. The genuine\n * cross-check between this declared value and the registry-derived\n * `resourcePrimaryScope` (the one produced by the factory when invoked\n * with the real relationships) is the responsibility of the\n * registry/companion assembly layer, where both signals exist in the\n * same scope. See the Phase 4.5 plan, Step 2.5 (post-factory cross-\n * check) for the follow-up that wires that comparison in the right\n * place.\n *\n * Until the post-factory cross-check lands, the safety net is:\n * - TypeScript enforces presence of this field on every\n * `resourceSpecification(...)` call site, so a new resource cannot\n * ship without an explicit scope declaration.\n * - The m2m channel × scope cross-check (D1b) inside\n * `validateResourceOperationCommunicationsSpecification` always runs\n * with this declared value, so authoring errors like\n * `WEBHOOK_ORGANIZATION` on a `USER_SELF`-scoped resource fail loudly\n * at module load.\n *\n * Use the matching `ResourcePrimaryScope` enum member from\n * `@wildo-ai/saas-models`:\n * - `ResourcePrimaryScope.ORGANIZATIONS` — multi-tenant resources owned\n * by an organization (most common)\n * - `ResourcePrimaryScope.USERS` — resources scoped to a user identity\n * (the `users` resource itself)\n * - `ResourcePrimaryScope.USER_SELF` — self-service resources owned by\n * the acting user (profiles, preferences)\n * - `ResourcePrimaryScope.APPLICATION` — application-wide resources not\n * bound to an organization or user (audit logs, job executions)\n * - `ResourcePrimaryScope.ANONYMOUS` — pre-auth / anonymous-session\n * resources\n */\n resourcePrimaryScope?: ResourcePrimaryScope;\n};\n\n/**\n * Resolve the scope signal and the resource-config form used by\n * `validateResourcePdfTemplates`, honouring whichever option the spec\n * author supplied.\n *\n * Behaviour:\n * - When `options.resourceRelationships` is supplied, materialize the\n * config once with real registry rels. Take scope from the resolved\n * config (registry-derived, single source of truth). Pass the resolved\n * config object — NOT the bare factory — to the validator so it doesn't\n * re-invoke `_factory([])` and trigger the missing-scope throw.\n * - Otherwise, fall back to `options.resourcePrimaryScope` (legacy path).\n * The validator falls back to `_factory` and calls it with `[]`; this\n * only succeeds for self-anchoring resources or for specs that do not\n * author `pdfTemplates`.\n * - When neither option is supplied, throw at module-load time so the\n * author sees the missing wiring at the call site.\n *\n * Cross-check: when both signals are supplied, the registry-derived scope\n * wins and a mismatched `resourcePrimaryScope` is reported as a fail-loud\n * drift error (the registry IS the runtime truth).\n */\nfunction resolveScopeAndValidatorConfig<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n _factory: ResourceConfigLike<TCustomOp, TCoreOp, TSchema>,\n options: ResourceSpecificationOptions,\n): {\n declaredScope: ResourcePrimaryScope | undefined;\n validatorResourceConfig: ResourceConfigLike<TCustomOp, TCoreOp, TSchema> | undefined;\n} {\n if (options.resourceRelationships !== undefined) {\n if (typeof _factory !== 'function') {\n throw new Error(\n 'resourceSpecification(): `options.resourceRelationships` requires the `_factory` argument to be a function — pass the `*_ResourceConfiguration_InitializationFactory` directly, not a pre-built config object.',\n );\n }\n const resolvedConfig = _factory(options.resourceRelationships as ResourceRelationship[]) as {\n resourcePrimaryScope?: ResourcePrimaryScope;\n };\n const registryDerivedScope = resolvedConfig.resourcePrimaryScope;\n if (registryDerivedScope === undefined) {\n throw new Error(\n 'resourceSpecification(): the resource configuration factory did not produce a `resourcePrimaryScope` even when invoked with the supplied registry relationships. Verify the rels include the `isPrimaryScope: true` parent relationship for this resource.',\n );\n }\n if (\n options.resourcePrimaryScope !== undefined\n && options.resourcePrimaryScope !== registryDerivedScope\n ) {\n throw new Error(\n `resourceSpecification(): declared resourcePrimaryScope \"${options.resourcePrimaryScope}\" disagrees with the registry-derived scope \"${registryDerivedScope}\". Drop the explicit declaration so the registry remains the single source of truth.`,\n );\n }\n return {\n declaredScope: registryDerivedScope,\n validatorResourceConfig: resolvedConfig as ResourceConfigLike<TCustomOp, TCoreOp, TSchema>,\n };\n }\n\n if (options.resourcePrimaryScope === undefined) {\n throw new Error(\n 'resourceSpecification(): `options` must supply either `resourceRelationships` (preferred — registry-derived scope) or `resourcePrimaryScope` (explicit declaration). See `ResourceSpecificationOptions`.',\n );\n }\n\n return {\n declaredScope: options.resourcePrimaryScope,\n validatorResourceConfig: _factory,\n };\n}\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-factory facet:layer:specification facet:family:companion\n *\n * Type-safe factory for authoring a `ResourceSpecificationConfig`.\n *\n * Mirrors `resourceUIBehavior()` — the `_factory` parameter is for type\n * inference only and is never invoked by the spec layer. The schema is\n * used to resolve `ObjectShape` so that `{primitive}Spec()` decorators\n * are type-checked against real fields.\n *\n * The callback runs immediately at module evaluation time. In the companion\n * context (where specifications are imported), this attaches `{primitive}Spec`\n * metadata to the schema's `customFieldMetadata`. In the frontend context\n * (where specifications are never imported), this code never runs, so no\n * semantic prose ends up in the browser bundle.\n *\n * **Explicit scope declaration.** The fourth `options` argument carries an\n * explicit `resourcePrimaryScope`. TypeScript enforces its presence at compile\n * time, so every specification call site declares scope.\n * That declared value is then:\n *\n * 1. Threaded into every `validateResourceOperationsCommunications` call\n * so the M2M channel × scope cross-check fires end-to-end on\n * every operation block, including the re-validation paths inside\n * {@link resourceSpecificationFromFrontendConfiguration}.\n * 2. Folded into the returned config (`resourcePrimaryScope` field) so\n * the frontend-config sibling can read it from `base`, preserving scope\n * context across the base → frontend handoff.\n *\n * **No local drift-check.** Calling a resource configuration factory with an\n * empty relationships array produces its empty-input fallback, not the real\n * scope for `APPLICATION`, `USER_SELF` or `ANONYMOUS` resources. This layer\n * therefore lacks the real `ResourceRelationship[]` inputs required for a\n * meaningful comparison and must not manufacture one.\n *\n * The genuine cross-check between this declared scope and the registry-\n * assembled scope happens at the registry/companion assembly layer, where\n * both signals coexist.\n *\n * @param _factory - The resource configuration factory (function form) or\n * a pre-built configuration object. Used purely for TypeScript inference\n * of `TCustomOp` / `TCoreOp` / `TSchema` for most validation. PDF-template\n * operation validation does materialize this factory with an empty\n * relationships array to inspect generated regenerate operations; that check\n * is limited to operation shape and must not be used as a registry-scope\n * drift signal.\n * @param schema - The resource's main Zod schema.\n * @param configFactory - Callback producing the specification content.\n * @param options - REQUIRED: declares the resource's `resourcePrimaryScope`.\n * See {@link ResourceSpecificationOptions} for the rationale.\n *\n * @example\n * ```ts\n * export const todosSpec = resourceSpecification(\n * todosFactory, TodoSchema,\n * ({ schemaShape }) => ({\n * purpose: 'Central entity for task tracking',\n * businessRole: 'Primary work item',\n * fields: {\n * status: schemaShape.status.enumSpec({\n * meaning: 'Current lifecycle state',\n * values: { pending: { meaning: 'Created but not started' } },\n * }),\n * },\n * operations: {\n * create: {\n * purpose: 'Create a new work item.',\n * },\n * },\n * }),\n * { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n * );\n * ```\n */\nexport function resourceSpecification<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n _factory: ResourceConfigLike<TCustomOp, TCoreOp, TSchema>,\n schema: TSchema,\n configFactory: (\n params: ResourceSpecificationCallbackParams<TCustomOp, TCoreOp, TSchema>,\n ) => ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>,\n options: ResourceSpecificationOptions,\n): ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema> {\n const schemaShape = (\n schema && 'shape' in schema\n ? (schema as unknown as z.ZodObject<any>).shape\n : getZodObjectShape(schema)\n ) as ObjectShape<TSchema>;\n\n const config = configFactory({ schema, schemaShape });\n if (config.externalDataPipeline !== undefined) {\n throw new Error(\n 'resourceSpecification(): `externalDataPipeline` is DERIVED from the resource configuration\\'s pipeline declaration and cannot be authored. '\n + 'Remove it from the specification; supply `resourceRelationships` in the options and the description is attached from the declaration itself.',\n );\n }\n\n // Resolve scope and the runtime config used by the pdfTemplates validator\n // from whichever signal the spec author supplied. `resourceRelationships`\n // is the preferred path — it materializes the resource configuration once\n // with the real registry rels, so scope derives from the same\n // `isPrimaryScope: true` signal the runtime uses, AND the validator gets\n // a pre-resolved config (avoiding the failing `_factory([])` call for\n // resources whose primary scope comes from a parent rel).\n const { declaredScope, validatorResourceConfig } = resolveScopeAndValidatorConfig(\n _factory,\n options,\n );\n\n validateResourceOperationsCommunications(\n 'operations.',\n config.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n declaredScope,\n );\n validateResourceOperationsCommunications(\n 'frontend.views.',\n config.frontend?.views as Record<string, ResourceFrontendViewSpecification | undefined> | undefined,\n declaredScope,\n );\n validateResourceOperationsScheduledExecution(\n 'operations.',\n config.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n );\n validateResourceOperationsErrorScenarios(\n 'operations.',\n config.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n );\n validateResourceOperationsScheduledExecution(\n 'frontend.views.',\n config.frontend?.views as Record<string, ResourceFrontendViewSpecification | undefined> | undefined,\n );\n validateResourcePdfTemplates('', config.pdfTemplates, schema, validatorResourceConfig);\n validateResourceCollectionExports('', config.collectionExports, Object.keys(config.operations ?? {}));\n\n // Fail-closed shape validator for `fields` /\n // `additionalFieldSpecs`. Runs at module-load time so authors see\n // structural mistakes (`meaning` blank, `enumDeclaration` missing,\n // `arraySpec.elementMeaning` blank, ENUM-element array missing\n // `elementType.enumDeclaration`, etc.) at the call site rather than\n // inside a downstream rendered prompt. Registry-presence for\n // `foreignKeySpec` is intentionally NOT checked here — `_core` does\n // not see `ResourceRelationship[]`; the companion-level completeness\n // validator owns that cross-check.\n //\n // The resource-type hint in the prefix comes from `_factory` (either\n // the function's `name` stripped of the `_ResourceConfiguration_\n // InitializationFactory` suffix, or — for rare object-form factories —\n // the `resourceType` slot directly). Best-effort: when the hint cannot\n // be derived, the prefix falls back to the bare `resourceSpecification():`\n // label, matching the pre-hint behaviour.\n const resourceTypeHint = extractResourceTypeHintFromFactory(_factory);\n const fieldShapesPrefix = resourceTypeHint.length > 0\n ? `resourceSpecification(${resourceTypeHint}): `\n : 'resourceSpecification(): ';\n validateFieldShapes(fieldShapesPrefix, {\n fields: config.fields as Record<string, z.ZodTypeAny> | undefined,\n additionalFieldSpecs: config.additionalFieldSpecs,\n });\n\n // Attach the resolved scope so the frontend-config sibling\n // (`resourceSpecificationFromFrontendConfiguration`) can read it from\n // `base.resourcePrimaryScope` and thread it into its own re-validation\n // passes without losing base → frontend scope context.\n // #1685 — the pipeline, described from the declaration the configuration actually carries. Only a MATERIALIZED\n // configuration has one: on the explicit-scope path `validatorResourceConfig` is the factory itself, never called.\n const pipelineDeclaration = typeof validatorResourceConfig === 'object' && validatorResourceConfig !== null\n ? (validatorResourceConfig as { externalDataPipeline?: ExternalDataPipelineDeclaration }).externalDataPipeline\n : undefined;\n\n return {\n ...config,\n resourcePrimaryScope: declaredScope,\n ...(pipelineDeclaration === undefined ? {} : { externalDataPipeline: describeExternalDataPipeline(pipelineDeclaration) }),\n } as ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>;\n}\n/** @wildo_source:part:end saas.specifications.resource-spec-factory */\n\n/**\n * Build the specification-oriented frontend source from one merged\n * `ResourceUIBehaviorConfig`.\n *\n * This is the bridge between frontend ownership and specifications: the UI\n * author keeps declaring real frontend config in `resourceUIBehavior(...)`,\n * while specifications consume a distilled aspect shaped for semantic prose.\n */\nexport function resourceFrontendConfiguration<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n uiBehavior: ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>,\n): ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema> {\n const schema = (uiBehavior as unknown as Record<typeof FRONTEND_SCHEMA_KEY, TSchema>)[FRONTEND_SCHEMA_KEY];\n if (schema === undefined) {\n throw new Error('resourceFrontendConfiguration() requires a UI behavior created by resourceUIBehavior() or resourceUIBehaviorFrom().');\n }\n\n return {\n schema,\n label: resolveFrontendLabelAspect(uiBehavior.getFrontendResourceLabel),\n emptyState: uiBehavior.emptyState,\n layout: resolveFrontendLayoutAspect(uiBehavior),\n guidance: indexGuidanceByRef(uiBehavior.guidance),\n relationshipOverrides: uiBehavior.relationshipOverrides,\n surfacedOperations: buildSurfacedOperationMap(uiBehavior),\n operations: buildFrontendOperationSurfaceMap(uiBehavior),\n };\n}\n\n/**\n * Merge several frontend configuration aspects into the single semantic source\n * used by a resource specification.\n *\n * The merge is cumulative where the frontend model is additive (sections,\n * guidance flows, surfaced operation variants) and last-write-wins where the\n * frontend model is override-based (label strategy, empty state field values,\n * individual relationship override entries).\n */\nexport function mergeResourceFrontendConfigurations<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n ...configs: Array<ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema>>\n): ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema> {\n if (configs.length === 0) {\n throw new Error('mergeResourceFrontendConfigurations() requires at least one frontend configuration.');\n }\n\n return configs.reduce((merged, incoming) => {\n ensureCompatibleFrontendConfigurationSchemas(merged.schema, incoming.schema);\n\n return {\n schema: incoming.schema,\n label: incoming.label ?? merged.label,\n emptyState: mergeEmptyStateAspect(merged.emptyState, incoming.emptyState),\n layout: mergeFrontendLayoutAspect(merged.layout, incoming.layout),\n guidance: mergeGuidanceAspect(merged.guidance, incoming.guidance),\n relationshipOverrides: mergeRelationshipOverrides(\n merged.relationshipOverrides,\n incoming.relationshipOverrides,\n ),\n surfacedOperations: mergeSurfacedOperationMaps(\n merged.surfacedOperations,\n incoming.surfacedOperations,\n ) ?? {},\n operations: mergeFrontendOperationSurfaceMaps(\n merged.operations,\n incoming.operations,\n ) ?? {},\n };\n });\n}\n\n/**\n * Adds a frontend-specific semantic layer to an existing base resource\n * specification using a merged frontend configuration aspect.\n *\n * **Phase 4.5 Step 2 — F-2 fold-in.** The `base.resourcePrimaryScope`\n * threaded by {@link resourceSpecification} is now read here and passed\n * into every `validateResourceOperationsCommunications` re-validation\n * pass — including the defensive `base.operations` and\n * `base.frontend.views` passes. Phase 4 silently dropped the scope\n * across this boundary, which meant the m2m channel × scope cross-check\n * (D1b) only fired on the original factory call and not on the\n * re-validated frontend slice. With the scope threaded through, every\n * authored m2m block is checked against the same scope contract end to\n * end. Hand-built `base` configs that lack `resourcePrimaryScope` still\n * soft-skip the cross-check on the re-validation paths (those callers\n * forfeit the m2m × scope guarantee — see the\n * {@link ResourceSpecificationConfig} JSDoc).\n */\nexport function resourceSpecificationFromFrontendConfiguration<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n frontendConfiguration: ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema>,\n base: ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>,\n configFactory: (\n params: ResourceSpecificationFromFrontendConfigurationCallbackParams<TCustomOp, TCoreOp, TSchema>,\n ) => ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp>,\n options: ResourceSpecificationFromFrontendConfigurationOptions<TCustomOp, TCoreOp, TSchema> = {},\n): ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema> {\n const schema = frontendConfiguration.schema;\n const schemaShape = (\n schema && 'shape' in schema\n ? (schema as unknown as z.ZodObject<any>).shape\n : getZodObjectShape(schema)\n ) as ObjectShape<TSchema>;\n\n // F-2: read the scope from `base` (always set when `base` came from\n // `resourceSpecification(...)`; may be `undefined` only on hand-built\n // bases — those forfeit the m2m × scope cross-check on this re-validation\n // path).\n const baseScope = base.resourcePrimaryScope;\n\n // Resource-type label (e.g. \"USER_PREFERENCES\") used to make spec↔config drift\n // errors self-documenting. Sourced from `base.resourceType.memberName` (set via\n // the spec's `codeHandling.resourceType`); empty string when the author did not\n // declare one — the drift errors then read `(...)` and say so. Reused below for\n // the `validateFieldShapes` prefix so the extraction lives in one place.\n const baseResourceTypeRef = (base as { resourceType?: { memberName?: unknown } }).resourceType;\n const resourceLabel = baseResourceTypeRef && typeof baseResourceTypeRef.memberName === 'string'\n ? baseResourceTypeRef.memberName\n : '';\n\n const frontendConfig = configFactory({\n base,\n frontendConfiguration,\n schema,\n schemaShape,\n surfacedOperations: frontendConfiguration.surfacedOperations,\n });\n validateFrontendSpecificationAgainstConfiguration(frontendConfiguration, frontendConfig, resourceLabel);\n /*\n * Idempotently re-validate `base.operations` here so a hand-built `base`\n * (one that bypassed `resourceSpecification()` and therefore the\n * factory-site validation pass) still gets caught on the same branches as\n * the factory path. Production call paths produce `base` from\n * `resourceSpecification()` so this is a defensive no-op for them, but it\n * forecloses a quiet failure mode where a future caller assembles `base`\n * by hand and the contract drifts silently. Symmetric with the\n * `frontend.views` re-validation directly below.\n */\n validateResourceOperationsCommunications(\n 'base.operations.',\n base.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n baseScope,\n );\n validateResourceOperationsScheduledExecution(\n 'base.operations.',\n base.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n );\n validateResourceOperationsErrorScenarios(\n 'base.operations.',\n base.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n );\n /*\n * Re-validate `base.frontend?.views` too. A hand-built `base` MAY ship\n * frontend-view overlays directly (the type allows it), and those overlays\n * carry the same `communications` / `scheduledExecution` slots as the\n * configFactory output — without this pass, a base-level frontend view\n * could ship a malformed `deliveries` array and only get caught the next\n * time the merged result was re-fed through the factory.\n */\n validateResourceOperationsCommunications(\n 'base.frontend.views.',\n base.frontend?.views as\n | Record<string, ResourceFrontendViewSpecification | undefined>\n | undefined,\n baseScope,\n );\n validateResourceOperationsScheduledExecution(\n 'base.frontend.views.',\n base.frontend?.views as\n | Record<string, ResourceFrontendViewSpecification | undefined>\n | undefined,\n );\n if ((base.pdfTemplates?.length ?? 0) > 0 && !options.resourceConfig) {\n throw new Error(\n 'resourceSpecificationFromFrontendConfiguration(): base.pdfTemplates requires options.resourceConfig so generated PDF runtime operations are validated on the frontend-configuration path.',\n );\n }\n validateResourcePdfTemplates('base.', base.pdfTemplates, schema, options.resourceConfig);\n validateResourceCollectionExports('base.', base.collectionExports, Object.keys(base.operations ?? {}));\n validateResourceOperationsCommunications(\n 'frontend.views.',\n frontendConfig.views as Record<string, ResourceFrontendViewSpecification | undefined> | undefined,\n baseScope,\n );\n validateResourceOperationsScheduledExecution(\n 'frontend.views.',\n frontendConfig.views as Record<string, ResourceFrontendViewSpecification | undefined> | undefined,\n );\n\n // Step 6 D-6 Phase 3 — defensive re-validation of `base.fields` /\n // `base.additionalFieldSpecs`. Production callers produce `base` from\n // `resourceSpecification(...)` so this is a no-op for them, but it\n // forecloses the same hand-built-base drift the operations passes\n // above already guard against.\n //\n // Reuse the `resourceLabel` extracted above (from `base.resourceType.memberName`,\n // set by the authoring resource through `codeHandling.resourceType`); when the\n // author did not declare one, fall back to the bare prefix.\n const frontendFieldShapesPrefix = resourceLabel.length > 0\n ? `resourceSpecificationFromFrontendConfiguration(${resourceLabel}): base.`\n : 'resourceSpecificationFromFrontendConfiguration(): base.';\n validateFieldShapes(frontendFieldShapesPrefix, {\n fields: base.fields as Record<string, z.ZodTypeAny> | undefined,\n additionalFieldSpecs: base.additionalFieldSpecs,\n });\n\n return {\n ...base,\n frontend: mergeFrontendSpecification(base.frontend, frontendConfig),\n };\n}\n\nfunction buildSurfacedOperationMap<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n uiBehavior: ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>,\n): ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp> {\n const surfacedOperations: Record<string, { hasDefaultVariant: boolean; variantKeys: string[] }> = {};\n\n for (const operationKey of uiBehavior.views.keys()) {\n if (Array.isArray(operationKey)) {\n const [operationId, variantKey] = operationKey;\n const operationEntry = surfacedOperations[String(operationId)] ?? {\n hasDefaultVariant: false,\n variantKeys: [],\n };\n if (!operationEntry.variantKeys.includes(variantKey)) {\n operationEntry.variantKeys.push(variantKey);\n }\n surfacedOperations[String(operationId)] = operationEntry;\n continue;\n }\n\n const operationEntry = surfacedOperations[String(operationKey)] ?? {\n hasDefaultVariant: false,\n variantKeys: [],\n };\n operationEntry.hasDefaultVariant = true;\n surfacedOperations[String(operationKey)] = operationEntry;\n }\n\n return surfacedOperations as ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp>;\n}\n\nfunction buildFrontendOperationSurfaceMap<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n uiBehavior: ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>,\n): ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp> {\n const surfacedOperations: Record<string, ResourceFrontendOperationSurfaceGroup> = {};\n\n // Compute, per operation, the canonical list of resource-owned view refs\n // rendered inside that operation host, directly from the view declarations:\n //\n // - Composite + chart views declare surfacing via a single `operationLike`\n // (they render inside exactly one operation host). The\n // `CoreResourceOperation.READ` fallback MUST match the Zod default on the\n // corresponding authoring schemas (`InsertedChartDeclarationSchema.operationLike`,\n // `ResourceCompositeViewAuthoringConfig.operationLike`) — if those\n // defaults ever diverge, the runtime layout filter and the specification\n // extraction would disagree silently on where the view surfaces.\n // - Execution views declare surfacing via a list `surfaceInOperations`\n // (one execution surface can legitimately render in multiple operation\n // hosts, e.g. READ + UPDATE).\n //\n // Canonical per-operation order: composites → charts → executions. This\n // matches the order `ResourceLayout_InsertedViews` uses when rendering\n // inserted segments, so the spec faithfully mirrors what the layout shows.\n const linkedRefsByOperation = new Map<string, string[]>();\n for (const source of [\n collectOperationLikeViewRefs(uiBehavior.compositeViews, CoreResourceOperation.READ),\n collectOperationLikeViewRefs(uiBehavior.chartViews, CoreResourceOperation.READ),\n collectExecutionViewSurfaceRefsByOperation(uiBehavior.executionViews),\n ]) {\n for (const [key, refs] of source.entries()) {\n const existing = linkedRefsByOperation.get(key) ?? [];\n linkedRefsByOperation.set(key, [...existing, ...refs]);\n }\n }\n\n // NOTE: this mirrors the AUTHORED UI behavior (`uiBehavior.views`). An operation\n // surfaced ONLY by the build-time `defaultFrontendPosture: API_ONLY` default — i.e.\n // not present in `views` — is intentionally absent here; the spec documents what the\n // app authored, and a headless (API_ONLY) op has no frontend surface to document.\n for (const [operationKey, frontendConfig] of uiBehavior.views.entries()) {\n const serializedKey = Array.isArray(operationKey)\n ? `${operationKey[0]}::${operationKey[1]}`\n : String(operationKey);\n const operationSurface = buildFrontendOperationSurface(\n frontendConfig,\n linkedRefsByOperation.get(serializedKey) ?? [],\n );\n if (Array.isArray(operationKey)) {\n const [operationId, variantKey] = operationKey;\n const group = surfacedOperations[String(operationId)] ?? {};\n surfacedOperations[String(operationId)] = {\n ...group,\n variants: {\n ...(group.variants ?? {}),\n [variantKey]: operationSurface,\n },\n };\n continue;\n }\n\n const group = surfacedOperations[String(operationKey)] ?? {};\n surfacedOperations[String(operationKey)] = {\n ...group,\n default: operationSurface,\n };\n }\n\n return surfacedOperations as ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp>;\n}\n\nfunction buildFrontendOperationSurface(\n frontendConfig: ResourceOperationFrontendConfig,\n operationLinkedViewRefs: string[],\n): ResourceFrontendOperationSurface {\n return {\n surface: frontendConfig.surface,\n hasCustomView: frontendConfig.customView !== undefined,\n additionalViewRefs: operationLinkedViewRefs,\n hasDisplayPresetOverride: frontendConfig.displayPresetOverride !== undefined,\n hasNavigationOverrides: (frontendConfig.navigationOverrides?.length ?? 0) > 0,\n displayPriority: frontendConfig.displayPriority,\n hasIconOverride: frontendConfig.iconOverride !== undefined,\n };\n}\n\nfunction resolveFrontendLabelAspect(\n label: ResourceUIBehaviorConfig<any, any, any>['getFrontendResourceLabel'],\n): ResourceFrontendLabelAspect | undefined {\n if (label === undefined) {\n return undefined;\n }\n\n if (Array.isArray(label)) {\n return {\n strategy: 'field-paths',\n fieldNames: [...label],\n };\n }\n\n return {\n strategy: 'computed',\n };\n}\n\nfunction resolveFrontendLayoutAspect<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n uiBehavior: ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>,\n): ResourceFrontendLayoutAspect | undefined {\n if (uiBehavior.layout === undefined) {\n return undefined;\n }\n\n return {\n refs: uiBehavior.layout.refs,\n hasDisplayTemplate: uiBehavior.layout.display !== undefined,\n hasSummaryTemplate: uiBehavior.layout.summary !== undefined,\n hasEditTemplate: uiBehavior.layout.edit !== undefined,\n };\n}\n\nfunction indexGuidanceByRef(\n guidance: ResourceUIBehaviorConfig<any, any, any>['guidance'],\n): Record<string, ResourceUIBehavior_GuidanceFlow> | undefined {\n if (guidance === undefined || guidance.length === 0) {\n return undefined;\n }\n\n return Object.fromEntries(\n guidance.map((entry) => [entry.ref, entry]),\n );\n}\n\nfunction mergeFrontendSpecification<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n>(\n base: ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp> | undefined,\n incoming: ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp>,\n): ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp> {\n return {\n ...base,\n ...incoming,\n ...(base?.guidance !== undefined || incoming.guidance !== undefined\n ? {\n guidance: mergeGuidanceSpecificationMap(\n base?.guidance,\n incoming.guidance,\n ),\n }\n : {}),\n ...(base?.layout !== undefined || incoming.layout !== undefined\n ? {\n layout: mergeLayoutSpecification(\n base?.layout,\n incoming.layout,\n ),\n }\n : {}),\n ...(base?.emptyState !== undefined || incoming.emptyState !== undefined\n ? {\n emptyState: mergeEmptyStateSpecification(\n base?.emptyState,\n incoming.emptyState,\n ),\n }\n : {}),\n ...(base?.views !== undefined || incoming.views !== undefined\n ? {\n views: mergeFrontendViewSpecificationMaps(\n base?.views,\n incoming.views,\n ),\n }\n : {}),\n };\n}\n\nfunction mergeLayoutSpecification(\n base: ResourceFrontendLayoutSpecification | undefined,\n incoming: ResourceFrontendLayoutSpecification | undefined,\n): ResourceFrontendLayoutSpecification | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n ...base,\n ...incoming,\n sections: mergeStructuralTranslationSlotMap(base.sections, incoming.sections),\n wizardSteps: mergeStructuralTranslationSlotMap(base.wizardSteps, incoming.wizardSteps),\n groups: mergeStructuralTranslationSlotMap(base.groups, incoming.groups),\n };\n}\n\nfunction mergeGuidanceSpecificationMap(\n base: ResourceSpecificationFrontendConfig<any, any>['guidance'] | undefined,\n incoming: ResourceSpecificationFrontendConfig<any, any>['guidance'] | undefined,\n): ResourceSpecificationFrontendConfig<any, any>['guidance'] | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return Object.fromEntries(\n Array.from(new Set([\n ...Object.keys(base),\n ...Object.keys(incoming),\n ])).map((guidanceRef) => {\n const baseEntry = base[guidanceRef];\n const incomingEntry = incoming[guidanceRef];\n if (baseEntry === undefined) {\n return [guidanceRef, incomingEntry];\n }\n if (incomingEntry === undefined) {\n return [guidanceRef, baseEntry];\n }\n return [guidanceRef, {\n ...baseEntry,\n ...incomingEntry,\n textSlots: mergeTranslationSlotSpecificationMap(baseEntry.textSlots, incomingEntry.textSlots),\n elements: mergeGuidanceElementSpecificationMap(baseEntry.elements, incomingEntry.elements),\n }];\n }),\n );\n}\n\nfunction mergeGuidanceElementSpecificationMap(\n base: NonNullable<ResourceFrontendGuidanceFlowSpecification['elements']> | undefined,\n incoming: NonNullable<ResourceFrontendGuidanceFlowSpecification['elements']> | undefined,\n): NonNullable<ResourceFrontendGuidanceFlowSpecification['elements']> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return Object.fromEntries(\n Array.from(new Set([\n ...Object.keys(base),\n ...Object.keys(incoming),\n ])).map((elementRef) => {\n const baseEntry = base[elementRef];\n const incomingEntry = incoming[elementRef];\n if (baseEntry === undefined) {\n return [elementRef, incomingEntry];\n }\n if (incomingEntry === undefined) {\n return [elementRef, baseEntry];\n }\n return [elementRef, {\n ...baseEntry,\n ...incomingEntry,\n textSlots: mergeTranslationSlotSpecificationMap(baseEntry.textSlots, incomingEntry.textSlots),\n }];\n }),\n );\n}\n\nfunction mergeStructuralTranslationSlotMap(\n base: Record<string, ResourceFrontendStructuralSlotSpecification> | undefined,\n incoming: Record<string, ResourceFrontendStructuralSlotSpecification> | undefined,\n): Record<string, ResourceFrontendStructuralSlotSpecification> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return Object.fromEntries(\n Array.from(new Set([\n ...Object.keys(base),\n ...Object.keys(incoming),\n ])).map((slotRef) => {\n const baseEntry = base[slotRef];\n const incomingEntry = incoming[slotRef];\n if (baseEntry === undefined) {\n return [slotRef, incomingEntry];\n }\n if (incomingEntry === undefined) {\n return [slotRef, baseEntry];\n }\n return [slotRef, {\n ...baseEntry,\n ...incomingEntry,\n textSlots: mergeTranslationSlotSpecificationMap(baseEntry.textSlots, incomingEntry.textSlots),\n }];\n }),\n );\n}\n\nfunction mergeTranslationSlotSpecificationMap(\n base: TranslationSlotSpecificationMap | undefined,\n incoming: TranslationSlotSpecificationMap | undefined,\n): TranslationSlotSpecificationMap | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return Object.fromEntries(\n Array.from(new Set([\n ...Object.keys(base),\n ...Object.keys(incoming),\n ])).map((slotName) => {\n const baseEntry = base[slotName];\n const incomingEntry = incoming[slotName];\n if (baseEntry === undefined) {\n return [slotName, incomingEntry];\n }\n if (incomingEntry === undefined) {\n return [slotName, baseEntry];\n }\n return [slotName, {\n ...baseEntry,\n ...incomingEntry,\n notes: mergeStringLists(baseEntry.notes, incomingEntry.notes),\n }];\n }),\n );\n}\n\nfunction mergeStringLists(\n base: string[] | undefined,\n incoming: string[] | undefined,\n): string[] | undefined {\n const merged = Array.from(new Set([...(base ?? []), ...(incoming ?? [])]));\n return merged.length > 0 ? merged : undefined;\n}\n\nfunction mergeEmptyStateSpecification(\n base: ResourceFrontendEmptyStateSpecification | undefined,\n incoming: ResourceFrontendEmptyStateSpecification | undefined,\n): ResourceFrontendEmptyStateSpecification | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n ...base,\n ...incoming,\n };\n}\n\nfunction mergeFrontendViewSpecificationMaps<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n>(\n base: ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp> | undefined,\n incoming: ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp> | undefined,\n): ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n const mergedViews: Record<string, ResourceFrontendViewSpecification> = {\n ...(base as Record<string, ResourceFrontendViewSpecification>),\n };\n\n for (const [operationId, incomingView] of Object.entries(\n incoming as Record<string, ResourceFrontendViewSpecification>,\n )) {\n const baseView = mergedViews[operationId];\n const mergedVariants = {\n ...(baseView?.variants ?? {}),\n ...(incomingView.variants ?? {}),\n };\n const mergedHostVariants = {\n ...(baseView?.views?.variants ?? {}),\n ...(incomingView.views?.variants ?? {}),\n };\n\n mergedViews[operationId] = {\n ...baseView,\n ...incomingView,\n ...(Object.keys(mergedVariants).length > 0\n ? { variants: mergedVariants }\n : {}),\n ...(baseView?.views !== undefined || incomingView.views !== undefined\n ? {\n views: {\n default: incomingView.views?.default ?? baseView?.views?.default,\n ...(Object.keys(mergedHostVariants).length > 0\n ? { variants: mergedHostVariants }\n : {}),\n },\n }\n : {}),\n };\n }\n\n return mergedViews as ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp>;\n}\n\nfunction mergeEmptyStateAspect(\n base: ResourceUIBehavior_EmptyState | undefined,\n incoming: ResourceUIBehavior_EmptyState | undefined,\n): ResourceUIBehavior_EmptyState | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n ...base,\n ...incoming,\n secondaryAction: incoming.secondaryAction ?? base.secondaryAction,\n };\n}\n\nfunction mergeFrontendLayoutAspect(\n base: ResourceFrontendLayoutAspect | undefined,\n incoming: ResourceFrontendLayoutAspect | undefined,\n): ResourceFrontendLayoutAspect | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n refs: mergeLayoutRefManifest(base.refs, incoming.refs),\n hasDisplayTemplate: base.hasDisplayTemplate || incoming.hasDisplayTemplate,\n hasSummaryTemplate: base.hasSummaryTemplate || incoming.hasSummaryTemplate,\n hasEditTemplate: base.hasEditTemplate || incoming.hasEditTemplate,\n };\n}\n\nfunction mergeLayoutRefManifest(\n base: LayoutRefManifest | undefined,\n incoming: LayoutRefManifest | undefined,\n): LayoutRefManifest | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n sections: mergeStringLists(base.sections, incoming.sections),\n wizardSteps: mergeStringLists(base.wizardSteps, incoming.wizardSteps),\n groups: mergeStringLists(base.groups, incoming.groups),\n };\n}\n\nfunction mergeGuidanceAspect(\n base: Record<string, ResourceUIBehavior_GuidanceFlow> | undefined,\n incoming: Record<string, ResourceUIBehavior_GuidanceFlow> | undefined,\n): Record<string, ResourceUIBehavior_GuidanceFlow> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n ...base,\n ...incoming,\n };\n}\n\nfunction mergeRelationshipOverrides(\n base: ResourceFrontendConfigurationAspect<any, any, any>['relationshipOverrides'],\n incoming: ResourceFrontendConfigurationAspect<any, any, any>['relationshipOverrides'],\n): ResourceFrontendConfigurationAspect<any, any, any>['relationshipOverrides'] {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n const mergedOverrides = new Map<string, NonNullable<typeof base>[number]>();\n for (const override of base) {\n mergedOverrides.set(buildRelationshipOverrideKey(override), override);\n }\n for (const override of incoming) {\n mergedOverrides.set(buildRelationshipOverrideKey(override), override);\n }\n return [...mergedOverrides.values()];\n}\n\nfunction buildRelationshipOverrideKey(\n override: NonNullable<ResourceFrontendConfigurationAspect<any, any, any>['relationshipOverrides']>[number],\n): string {\n return [\n override.target,\n override.foreignKeyField ?? '__default__',\n ].join('::');\n}\n\nfunction mergeSurfacedOperationMaps<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n>(\n base: ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp> | undefined,\n incoming: ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp> | undefined,\n): ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n const mergedOperations: Record<string, { hasDefaultVariant: boolean; variantKeys: string[] }> = {\n ...(base as Record<string, { hasDefaultVariant: boolean; variantKeys: string[] }>),\n };\n\n for (const [operationId, incomingOperation] of Object.entries(\n incoming as Record<string, { hasDefaultVariant: boolean; variantKeys: string[] }>,\n )) {\n const baseOperation = mergedOperations[operationId];\n mergedOperations[operationId] = {\n hasDefaultVariant: Boolean(baseOperation?.hasDefaultVariant) || incomingOperation.hasDefaultVariant,\n variantKeys: mergeStringLists(baseOperation?.variantKeys, incomingOperation.variantKeys) ?? [],\n };\n }\n\n return mergedOperations as ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp>;\n}\n\nfunction mergeFrontendOperationSurfaceMaps<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n>(\n base: ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp> | undefined,\n incoming: ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp> | undefined,\n): ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n const mergedOperations: Record<string, ResourceFrontendOperationSurfaceGroup> = {\n ...(base as Record<string, ResourceFrontendOperationSurfaceGroup>),\n };\n\n for (const [operationId, incomingOperation] of Object.entries(\n incoming as Record<string, ResourceFrontendOperationSurfaceGroup>,\n )) {\n const baseOperation = mergedOperations[operationId];\n mergedOperations[operationId] = {\n default: incomingOperation.default ?? baseOperation?.default,\n variants: {\n ...(baseOperation?.variants ?? {}),\n ...(incomingOperation.variants ?? {}),\n },\n };\n }\n\n return mergedOperations as ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp>;\n}\n\nfunction ensureCompatibleFrontendConfigurationSchemas(\n base: z.ZodTypeAny,\n incoming: z.ZodTypeAny,\n): void {\n if (base === incoming) {\n return;\n }\n\n const baseShape = getZodObjectShape(base);\n const incomingShape = getZodObjectShape(incoming);\n const baseKeys = Object.keys(baseShape).sort();\n const incomingKeys = Object.keys(incomingShape).sort();\n\n if (\n baseKeys.length !== incomingKeys.length\n || baseKeys.some((key, index) => key !== incomingKeys[index])\n ) {\n throw new Error(\n 'mergeResourceFrontendConfigurations() can only merge frontend configurations that resolve to the same resource schema shape.',\n );\n }\n\n for (const key of baseKeys) {\n if (baseShape[key] !== incomingShape[key]) {\n throw new Error(\n 'mergeResourceFrontendConfigurations() can only merge frontend configurations built from the same schema field instances.',\n );\n }\n }\n}\n\nfunction validateFrontendSpecificationAgainstConfiguration<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n frontendConfiguration: ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema>,\n frontendSpec: ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp>,\n resourceLabel: string,\n): void {\n // Both refusals name the resource, like the layout ones below: the companion's labelling planner reports this\n // message verbatim as the reason EVERY resource unit was left unplanned, so without the name a reader has to\n // search each specification that documents the aspect to find the one that drifted.\n if (frontendSpec.label && frontendConfiguration.label === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(${resourceLabel}): \\`frontend.label\\` was documented, but the merged frontend configuration has no label strategy.`,\n );\n }\n\n if (frontendSpec.emptyState && frontendConfiguration.emptyState === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(${resourceLabel}): \\`frontend.emptyState\\` was documented, but the merged frontend configuration has no empty state. `\n + 'Declare `emptyState: {}` (or with an icon) in the resource\\'s ui-behavior if the collection has an empty state, or remove `frontend.emptyState` from the specification if it does not.',\n );\n }\n\n if (frontendSpec.layout) {\n if (frontendConfiguration.layout === undefined) {\n throw new Error(\n 'resourceSpecificationFromFrontendConfiguration(): `frontend.layout` was documented, but the merged frontend configuration has no layout.',\n );\n }\n\n validateStructuralSlotDescriptions(\n 'sections',\n Object.keys(frontendSpec.layout.sections ?? {}),\n frontendSpec.layout.sections,\n frontendConfiguration.layout.refs?.sections,\n resourceLabel,\n );\n validateStructuralSlotDescriptions(\n 'wizardSteps',\n Object.keys(frontendSpec.layout.wizardSteps ?? {}),\n frontendSpec.layout.wizardSteps,\n frontendConfiguration.layout.refs?.wizardSteps,\n resourceLabel,\n );\n validateStructuralSlotDescriptions(\n 'groups',\n Object.keys(frontendSpec.layout.groups ?? {}),\n frontendSpec.layout.groups,\n frontendConfiguration.layout.refs?.groups,\n resourceLabel,\n );\n }\n\n for (const guidanceRef of Object.keys(frontendSpec.guidance ?? {})) {\n const runtimeGuidance = frontendConfiguration.guidance?.[guidanceRef];\n if (runtimeGuidance === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): guidance \"${guidanceRef}\" is documented but does not exist in the merged frontend configuration.`,\n );\n }\n\n const documentedElementRefs = Object.keys(frontendSpec.guidance?.[guidanceRef]?.elements ?? {});\n const runtimeElementRefs = new Set((runtimeGuidance.elements ?? []).map((element) => element.ref));\n for (const elementRef of documentedElementRefs) {\n if (!runtimeElementRefs.has(elementRef)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): guidance \"${guidanceRef}\" documents element \"${elementRef}\" but the merged frontend configuration does not declare it.`,\n );\n }\n }\n }\n\n for (const [operationId, operationSpec] of Object.entries(\n (frontendSpec.views ?? {}) as Record<string, ResourceFrontendViewSpecification>,\n )) {\n const surfacedOperation = (\n frontendConfiguration.operations as Record<string, ResourceFrontendOperationSurfaceGroup | undefined>\n )[operationId];\n if (surfacedOperation === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" is documented in frontend semantics but is not surfaced by the merged frontend configuration.`,\n );\n }\n\n for (const variantKey of Object.keys(operationSpec?.variants ?? {})) {\n if (variantKey === 'default') {\n if (surfacedOperation.default === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents a default variant that is not surfaced by the merged frontend configuration.`,\n );\n }\n continue;\n }\n\n if (surfacedOperation.variants?.[variantKey] === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents variant \"${variantKey}\" that is not surfaced by the merged frontend configuration.`,\n );\n }\n }\n\n validateDocumentedOperationViewSpecification(\n operationId,\n 'default',\n operationSpec.views?.default,\n surfacedOperation.default,\n );\n\n for (const [variantKey, documentedViews] of Object.entries(operationSpec.views?.variants ?? {})) {\n validateDocumentedOperationViewSpecification(\n operationId,\n variantKey,\n documentedViews,\n surfacedOperation.variants?.[variantKey],\n );\n }\n }\n}\n\nfunction validateDocumentedOperationViewSpecification(\n operationId: string,\n variantKey: string,\n documentedViews: ResourceOperationViewSpecification | undefined,\n surfacedOperation: ResourceFrontendOperationSurface | undefined,\n): void {\n if (!documentedViews) {\n return;\n }\n\n if (surfacedOperation === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents view metadata for variant \"${variantKey}\" that is not surfaced by the merged frontend configuration.`,\n );\n }\n\n if (documentedViews.customView && !surfacedOperation.hasCustomView) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents a customView for variant \"${variantKey}\" but the merged frontend configuration has no customView there.`,\n );\n }\n\n if (!documentedViews.customView && surfacedOperation.hasCustomView) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" exposes a customView for variant \"${variantKey}\" but the semantic specification does not document it.`,\n );\n }\n\n if (documentedViews.customView) {\n validateRequiredOperationViewTextSlots(\n `operation \"${operationId}\" customView for variant \"${variantKey}\"`,\n documentedViews.customView.textSlots,\n );\n }\n\n const documentedOtherViews = documentedViews.otherViews ?? [];\n const documentedViewRefs = new Set(documentedOtherViews.map((view) => view.viewRef));\n\n for (const otherView of documentedOtherViews) {\n if (!surfacedOperation.additionalViewRefs.includes(otherView.viewRef)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents linked view \"${otherView.viewRef}\" for variant \"${variantKey}\" but no resource-owned view declaration targets this operation host via \\`operationLike\\` / \\`surfaceInOperations\\`.`,\n );\n }\n\n validateRequiredOperationViewTextSlots(\n `operation \"${operationId}\" linked view \"${otherView.viewRef}\" for variant \"${variantKey}\"`,\n otherView.textSlots,\n );\n }\n\n for (const surfacedViewRef of surfacedOperation.additionalViewRefs) {\n if (!documentedViewRefs.has(surfacedViewRef)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" exposes linked view \"${surfacedViewRef}\" for variant \"${variantKey}\" but the semantic specification does not document it.`,\n );\n }\n }\n}\n\nconst RESOURCE_OPERATION_VIEW_REQUIRED_TEXT_SLOTS = ['title', 'description'];\n\nfunction validateRequiredOperationViewTextSlots(\n subject: string,\n documentedTextSlots: TranslationSlotSpecificationMap | undefined,\n): void {\n const knownTextSlots = new Set(Object.keys(documentedTextSlots ?? {}));\n for (const textSlotKey of RESOURCE_OPERATION_VIEW_REQUIRED_TEXT_SLOTS) {\n if (!knownTextSlots.has(textSlotKey)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): ${subject} must document text slot \"${textSlotKey}\" so linked or overridden view chrome stays semantically grounded.`,\n );\n }\n }\n}\n\n/**\n * The text slots every documented structural slot MUST ground. The remaining slot is OPTIONAL: a slot\n * that documents it gets a generated label, one that does not gets none, and the runtime renders\n * nothing where it would have gone (`tResourceSection(…, 'description')` answers '' on a miss).\n *\n * A SECTION's description is optional since 2026-09-25, and requiring it was the defect. The rule\n * made every section in every application carry a sub-heading, so the labeller wrote one whether or\n * not there was anything to say — Wonder Todos' task read view showed \"Workflow — Choose a workflow\",\n * \"Effort — Estimate required effort\", \"Assignment — Choose an assignee\": edit prompts on a page where\n * nothing could be chosen, restating the heading above them. A description that informs (\"each delay\n * counts from the escalation, not from the previous attempt\") is still documented and still generated;\n * one that would only restate its heading is simply not written.\n *\n * A WIZARD STEP keeps both: a step is a stage the author passes through one at a time, and saying what\n * the stage is for is the stepper's job.\n */\nconst RESOURCE_LAYOUT_REQUIRED_TEXT_SLOTS: Record<'sections' | 'wizardSteps' | 'groups', string[]> = {\n sections: ['title'],\n wizardSteps: ['title', 'description'],\n groups: ['title'],\n};\n\nfunction validateStructuralSlotDescriptions(\n slotKind: 'sections' | 'wizardSteps' | 'groups',\n documentedRefs: string[],\n documentedSlots: Record<string, ResourceFrontendStructuralSlotSpecification> | undefined,\n surfacedRefs: string[] | undefined,\n resourceLabel: string,\n): void {\n const knownRefs = new Set(surfacedRefs ?? []);\n // Self-documenting drift errors: name the resource, show BOTH sides (what the\n // runtime layout declares vs what the spec documents), and spell out the two\n // ways to reconcile — so the reader fixes it without reading the stack trace\n // or guessing. The \"shared layout\" note exists because self/admin and\n // polymorphic resources reuse one layout (`layout: main[<SELF>].layout`), so a\n // single slot removal drifts EVERY spec that documents it (recovered from the\n // 2026-06-25 user-self-preferences → user-preferences crash-loop).\n const fnPrefix = `resourceSpecificationFromFrontendConfiguration(${resourceLabel})`;\n const declaredList = (surfacedRefs ?? []).join(', ') || '(none)';\n const documentedList = documentedRefs.join(', ') || '(none)';\n const slotSingular = slotKind === 'sections' ? 'section' : slotKind === 'wizardSteps' ? 'wizard step' : 'group';\n\n for (const documentedRef of documentedRefs) {\n if (!knownRefs.has(documentedRef)) {\n throw new Error(\n `${fnPrefix}: ${slotKind} \"${documentedRef}\" is documented in the spec but is NOT declared by the resource's merged frontend layout.\\n` +\n ` layout declares (runtime truth): ${declaredList}\\n` +\n ` spec documents: ${documentedList}\\n` +\n ` Fix ONE side so they match:\\n` +\n ` - remove \"${documentedRef}\" from the spec's frontend.layout.${slotKind} (if the layout intentionally dropped the ${slotSingular}), or\\n` +\n ` - add a \"${documentedRef}\" ${slotSingular} ref to the resource's ui-behavior layout (if the ${slotSingular} should exist).\\n` +\n ` Note: self/admin & polymorphic resources often share one layout (an admin preset sets \"layout: main[<SELF>].layout\"), so the same drift can live in EVERY spec that documents this slot - search '${documentedRef}:' across all *.resource.specification.ts, not just this one.`,\n );\n }\n }\n\n for (const surfacedRef of surfacedRefs ?? []) {\n if (!documentedRefs.includes(surfacedRef)) {\n throw new Error(\n `${fnPrefix}: ${slotKind} \"${surfacedRef}\" is declared by the resource's merged frontend layout but the semantic specification does NOT document it.\\n` +\n ` layout declares (runtime truth): ${declaredList}\\n` +\n ` spec documents: ${documentedList}\\n` +\n ` Fix ONE side so they match:\\n` +\n ` - add a \"${surfacedRef}\" entry to the spec's frontend.layout.${slotKind} (document the ${slotSingular}), or\\n` +\n ` - remove the \"${surfacedRef}\" ${slotSingular} ref from the resource's ui-behavior layout (if it should not exist).`,\n );\n }\n }\n\n const requiredTextSlots = RESOURCE_LAYOUT_REQUIRED_TEXT_SLOTS[slotKind];\n if (requiredTextSlots.length === 0) {\n return;\n }\n\n for (const [slotRef, slotSpecification] of Object.entries(documentedSlots ?? {})) {\n const documentedTextSlots = new Set(Object.keys(slotSpecification.textSlots ?? {}));\n for (const textSlotKey of requiredTextSlots) {\n if (!documentedTextSlots.has(textSlotKey)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): ${slotKind} \"${slotRef}\" must document text slot \"${textSlotKey}\" so the generated labelling keys stay semantically grounded.`,\n );\n }\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"resource-specification.schemas.js","sourceRoot":"","sources":["../../../src/_core/resource-specification.schemas.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,mBAAmB,EACnB,0CAA0C,EAC1C,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,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BAAqB,WAAW,KAAK,YAAY,uEAAuE,CACzH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,iBAAiB,GAAG,mCAAmC,CAAC,QAAQ,CAAC,CAAC;IACxE,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO;IACT,CAAC;IAED,KAAK,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,EAAE,CAAC;QACjF,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC;QACpF,KAAK,MAAM,WAAW,IAAI,iBAAiB,EAAE,CAAC;YAC5C,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC1C,MAAM,IAAI,KAAK,CACb,qDAAqD,QAAQ,KAAK,OAAO,8BAA8B,WAAW,+DAA+D,CAClL,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["import type { z } from 'zod';\nimport type {\n CodeEnumMemberRef,\n CodeSymbolRef,\n EnumLikeType,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport type {\n LayoutRefManifest,\n ObjectShape,\n ResourceConfigLike,\n ResourceOperationFrontendConfig,\n ResourceUIBehaviorConfig,\n ResourceUIBehavior_EmptyState,\n ResourceUIBehavior_GuidanceFlow,\n} from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n FRONTEND_SCHEMA_KEY,\n collectExecutionViewSurfaceRefsByOperation,\n collectOperationLikeViewRefs,\n} from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CoreM2MNotificationChannel,\n CoreResourceOperation,\n ErrorCustomMessageReference,\n ErrorType,\n CoreUserNotificationChannel,\n CoreUserNotificationTarget,\n M2MNotificationLevel,\n ResourceGeneratedOperationKind,\n ResourceOperationVariantType,\n ResourceOperationFrontendSurface,\n ResourcePrimaryScope,\n Resources_SharedUtils,\n SystemEmailTemplateRef,\n SystemEmailTemplateRegistry,\n collectTemplatableFileFieldPaths,\n} from '@wildo-ai/saas-models';\nimport type { ResourceRelationship, ValidOperationKeys } from '@wildo-ai/saas-models';\nimport { ResourceCollectionExportFormat, ResourceCollectionExportRowScope } from '@wildo-ai/saas-models';\nimport { describeExternalDataPipeline, type ExternalDataPipelineDeclaration, type ExternalDataPipelineDescription } from '@wildo-ai/saas-models/external-data';\nimport type { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CustomBatchManifestKind,\n type CustomBatchManifest,\n type ResourceAnchoredCustomBatchManifest,\n type ScopeAnchoredCustomBatchManifest,\n} from '@wildo-ai/saas-backend-lib/custom-batch-manifests';\nimport type { ExtractedFieldSpec } from './utils/extract-field-specs';\nimport { validateFieldShapes } from './utils/validate-field-shapes';\nimport type { CodeCollectionEntryRef } from './definition-specification.schemas';\nimport type {\n StructuralTranslationSlotSpecification,\n TranslationSlotSpecification,\n TranslationSlotSpecificationMap,\n} from './translation-slot-specification.schemas';\nimport { assertOptionalRequiredFeaturesSpecification } from './required-features-specification.schemas';\nimport type { RequiredFeaturesSpecification } from './required-features-specification.schemas';\nimport {\n FileGenerationSource,\n getZodDef,\n getZodDefArrayProperty,\n getZodDefSchemaProperty,\n getFileMetadata,\n getZodObjectShape,\n getZodType,\n isTemplatableFileField,\n unwrapSchema,\n} from '@wildo-ai/zod-decorators';\n\n\n// ── Operation Specification ─────────────────────────────────────────────────\n\n/**\n * @wildo_source:part:start saas.specifications.resource-operation-spec facet:layer:specification facet:family:companion\n *\n * Companion-facing semantic prose for operations and variants (`resourceSpecification().operations`).\n *\n * **Per-variant** semantics (`ResourceOperationVariantSpecification`):\n * Provides sparse overlays for an operation's business prose and, when an\n * HTTP response shape genuinely differs, its payload examples. URLs, DTO\n * shape, and authorization rules remain structural contracts; prose explains\n * what the operation accomplishes in business terms, while examples make the\n * concrete transport representation understandable.\n *\n * **Per-operation** map types (`ResourceOperationSpecification`, maps) layer\n * shared operation meaning plus optional named variants (`admin`, `summary`,\n * `context`, …) aligned with the resource configuration vocabulary.\n *\n * **HTTP documentation** fields on `ResourceOperationSpecification`\n * (`responseStatuses`, `errorScenarios`, `idempotent`, `rateLimitNote`,\n * `examples`) carry the transport-level outcomes the OpenAPI generator emits\n * as `responses` / `examples` / `x-idempotent`. Response outcomes are\n * per-operation. Base examples apply to every variant unless a variant owns a\n * complete replacement, preventing a full DTO example from leaking into a\n * context or summary response. HTTP-only fields are intentionally excluded\n * from frontend-view specs, which are not HTTP operations.\n */\nexport interface ResourceOperationVariantSpecification {\n /** Business intent of the operation when this variant differs from the base operation. */\n purpose?: string;\n /** Observable business result once the operation succeeds. */\n outcome?: string;\n /** Guidance about when this operation is the right choice. */\n whenToUse?: string;\n /** Relative weight of this operation in the resource understanding. */\n importance?: FieldSemanticImportance;\n /**\n * Override the resource-level label {@link LabelAudience} for THIS operation's\n * generated labels. Use when a mostly-end-user resource exposes an admin-only\n * operation (or vice-versa) so its copy adopts the right register without\n * reclassifying the whole resource. Omit to inherit the resource's `audience`.\n */\n audienceOverride?: LabelAudience;\n /**\n * Variant-specific OpenAPI examples. When present, these REPLACE the base\n * operation `examples` for this variant; they never merge. Use this where a\n * context or summary response has a different schema from the default path.\n */\n examples?: ResourceOperationExampleSpecification[];\n}\n\n/**\n * Variant map for one operation.\n *\n * `default` represents the default/no-explicit-variant path. Named variant keys\n * (`admin`, `summary`, `context`, `internal`, ...) mirror the authored\n * operation-variant vocabulary instead of flattening them into synthetic tuples.\n */\nexport type ResourceOperationSpecificationVariants = Record<string, ResourceOperationVariantSpecification | undefined> & {\n default?: ResourceOperationVariantSpecification;\n};\n\n/**\n * Frontend-view variants preserve business semantics but deliberately exclude\n * HTTP examples: a frontend view is not an API operation and must not become a\n * second authoring path for generated OpenAPI payloads.\n */\nexport type ResourceFrontendViewSpecificationVariants = Record<\n string,\n Omit<ResourceOperationVariantSpecification, 'examples'> | undefined\n> & {\n default?: Omit<ResourceOperationVariantSpecification, 'examples'>;\n};\n\n/**\n * Import-oriented metadata for the email fired by a resource operation.\n *\n * Lets downstream transposer/code-generation layers point at the real event\n * payload schema without re-reading the resource's backend code.\n */\nexport interface ResourceOperationEmailSpecificationCodeHandling {\n /** Public Zod schema symbol that describes the event payload of the email. */\n eventDataSchemaSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the payload type is split from its Zod schema. */\n eventDataTypeSymbol?: CodeSymbolRef;\n /** Extra supporting symbols (builders, renderers) that transposer prompts need. */\n supportingSymbols?: CodeSymbolRef[];\n /** Companion/transposer caveats that must survive serialization. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for ONE email delivery fired by a resource operation.\n *\n * Models the engine fan-out faithfully: every entry in the runtime\n * `userNotifications[]` array with `channel === EMAIL` is one delivery, and\n * the runtime constructs a distinct template-ref path for each\n * `(variantKey, targetType, customNotificationRef)` combination through the\n * notifications dispatcher (`email.{resourceId}.{op}.{variant?}.{target-kebab}_{customRef?}`).\n *\n * Authoring sites declare one delivery per such combination so:\n * - companion prompts know exactly how many template files exist for the operation,\n * - translators can author per-delivery overrides when the audience changes the copy,\n * - transposers can compute the runtime template-ref path from the spec without\n * re-reading the resource configuration code.\n *\n * The parent `ResourceOperationEmailSpecification` carries shared semantics\n * (purpose, tone, default text slots, event data); per-delivery overrides\n * layer on top via `purposeOverride`, `textSlotsOverrides`,\n * `additionalBusinessConstraints`. Omit overrides when the delivery shares\n * the parent copy verbatim — that is the common case.\n */\nexport interface ResourceOperationEmailDeliverySpecification {\n /**\n * Audience description: who receives this delivery and why. Required —\n * the deliveries axis exists specifically to distinguish audiences (creator\n * vs assignee vs admin recipient, …), so an undocumented audience defeats\n * the purpose of fanning out.\n */\n audience: string;\n /**\n * Target type from the runtime `UserNotificationDefinition.target` (see\n * `CoreUserNotificationTarget` — `USERS_CUSTOM`, `USER_SELF`,\n * `ORGANIZATION_USERS`, …). The dispatcher kebab-cases this and appends\n * it to the template-ref path, so spec authors must echo the exact runtime\n * target so the computed path stays truthful. A `CoreUserNotificationTarget` member: the runtime refuses any\n * other target when the configuration is built.\n */\n targetRef: CoreUserNotificationTarget;\n /**\n * Operation variant this delivery belongs to. `undefined` means the default\n * variant (no `variantKey` segment in the runtime path). Maps to\n * `variantKey` on the runtime variant when present.\n */\n variantRef?: string;\n /**\n * Distinguishes deliveries when the same `(variantRef, targetRef)` fires\n * multiple emails. Maps 1:1 to `customNotificationRef` on the runtime\n * `UserNotificationDefinition`. Required by the engine when more than one\n * `USERS_CUSTOM` notification appears in the same operation (to make the\n * template paths unique); the spec validator mirrors that contract.\n */\n customDeliveryRef?: string;\n /**\n * Stable `SystemEmailTemplateRef` THIS delivery resolves to, when the\n * runtime template path corresponds to an entry registered in\n * `SystemEmailTemplateRegistry` (system-level emails such as\n * `WELCOME_EMAIL`, `ORGANIZATION_INVITATION`, …). Use it to cross-link a\n * resource-initiated trigger to its authored\n * `SystemEmailTemplateSpecification` overlay in companion prompts.\n *\n * Lives per-delivery (not on `codeHandling`) because the runtime\n * template-ref path is per-delivery: every authored\n * `(variantRef, targetRef, customDeliveryRef)` triple resolves to ONE\n * concrete template, so each delivery either points at a registered\n * `SystemEmailTemplateRef` or — for resource-local templates that live\n * outside `SystemEmailTemplateRegistry` (e.g. Wonder Todos\n * `email.todos.change_status.users-custom_notify-creator`) — leaves the\n * field undefined.\n *\n * Cross-validated at module load against `SystemEmailTemplateRegistry` so\n * a typo or stale ref fails closed instead of leaking a dangling cross-\n * link into companion prompts. Typed as the enum to give authors\n * autocomplete and eliminate the silent-string-identity anti-pattern.\n */\n systemEmailTemplateRef?: SystemEmailTemplateRef;\n /**\n * Optional per-delivery overrides for translatable text slots. When a key\n * is present here, it replaces the parent `textSlots[key]` for THIS\n * delivery only (e.g., creator and assignee share the parent subject\n * normally, but the admin variant for the creator uses a different one).\n * Omit entirely when the delivery uses the parent copy verbatim.\n */\n textSlotsOverrides?: TranslationSlotSpecificationMap;\n /**\n * Per-delivery override for `purpose` when this delivery has its own intent\n * distinct from the parent (e.g., the admin variant explains a managerial\n * intervention rather than a self-progress signal). Falls back to the\n * parent `purpose` when omitted.\n */\n purposeOverride?: string;\n /**\n * Domain/compliance caveats that apply to THIS delivery only, layered on\n * top of the parent `businessConstraints` (which apply to all deliveries).\n */\n additionalBusinessConstraints?: string[];\n /** Companion/transposer caveats specific to this delivery. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for the email fired by a resource operation.\n *\n * Follows the same authoring shape as `SystemEmailTemplateSpecification`:\n * `purpose` and `tone` are plain authoring prose, while every translatable\n * fragment (subject, previewText, ctaLabel, heading, body, …) lives inside\n * `textSlots`. `eventData` documents the meaning of the payload used to render\n * the email so translators know which runtime values will land in each slot.\n *\n * A resource-initiated email is always anchored to its operation: the same\n * action decides what is sent, to whom, and why, so the companion resolves the\n * wording through the operation spec instead of a parallel family.\n *\n * **Engine-parity contract for `deliveries`**. The runtime fans out one email\n * per entry in `userNotifications[]` with `channel === EMAIL`, computing a\n * distinct template-ref path per `(variantKey, target, customNotificationRef)`\n * combination. The spec layer mirrors this faithfully: every such runtime\n * delivery must be authored as one entry in `deliveries`, so the spec is\n * never silent about a real runtime template path. A single-delivery email\n * still needs one `deliveries` entry — the array is required so the engine\n * fan-out semantics are explicit at every authoring site, not implicit in\n * the absence of the field.\n */\nexport interface ResourceOperationEmailSpecification {\n /** Why this operation fires an email (shared intent across all deliveries). */\n purpose: string;\n /** Expected voice/posture for the generated copy (urgent, reassuring, informational, ...). */\n tone: string;\n /** Situations where this email must be sent alongside the operation. */\n useWhen?: string;\n /** Situations where this email should not fire (e.g. reassignment to the same user). */\n avoidWhen?: string;\n /**\n * Translatable text slots for the email (`subject`, `previewText`,\n * `ctaLabel`, or any template-specific named slot) with per-slot meaning\n * for translators. `subject` is required because every transactional email\n * needs a subject line. Per-delivery overrides live on each\n * `deliveries[i].textSlotsOverrides`.\n */\n textSlots: TranslationSlotSpecificationMap;\n /** Meaning of the event payload this email renders with (shared across deliveries). */\n eventData?: TranslationSlotSpecification;\n /** Domain/compliance caveats that matter beyond the operation's own constraints. */\n businessConstraints?: string[];\n /**\n * Explicit fan-out: one entry per runtime `userNotifications[]` email\n * delivery. At least one entry is required when an `email` block is\n * authored — see the JSDoc on the parent interface for the engine-parity\n * rationale. The validator enforces uniqueness on\n * `(variantRef, targetRef, customDeliveryRef)` triples and rejects\n * duplicates that would compute the same runtime template-ref path.\n */\n deliveries: ResourceOperationEmailDeliverySpecification[];\n /** Import-oriented coding/transposition metadata. */\n codeHandling?: ResourceOperationEmailSpecificationCodeHandling;\n}\n\n/**\n * Import-oriented metadata for the notification fired by a resource operation.\n */\nexport interface ResourceOperationNotificationSpecificationCodeHandling {\n /**\n * Public enum exposing the channel vocabulary that each\n * `deliveries[i].channelRef` is drawn from (for example\n * `CoreUserNotificationChannel`). Declaring the owning enum lets transposer layers import the canonical members\n * when generating notification dispatch code.\n */\n channelEnum?: CodeSymbolRef;\n /** Public Zod schema symbol describing the notification event payload. */\n eventDataSchemaSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the payload type is split from its Zod schema. */\n eventDataTypeSymbol?: CodeSymbolRef;\n /** Extra supporting symbols that transposer prompts need. */\n supportingSymbols?: CodeSymbolRef[];\n /** Companion/transposer caveats that must survive serialization. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for ONE in-app notification delivery fired by a resource\n * operation.\n *\n * Models the engine fan-out faithfully: every entry in the runtime\n * `userNotifications[]` array whose `channel` is NOT `EMAIL` is one in-app\n * notification delivery (FRONT_END_SUCCESS toast for the actor, WEBSOCKET push\n * to the activity feed, SMS / PUSH when implemented, …). Each delivery is\n * its own (target, channel) pair at runtime; the spec layer mirrors this so\n * companion prompts know exactly which surfaces the operation actually\n * touches, and translators can author per-delivery copy when a specific\n * channel needs different wording (e.g. SMS character limits vs WebSocket\n * activity-feed prose).\n */\nexport interface ResourceOperationNotificationDeliverySpecification {\n /**\n * Audience description: who receives this delivery (the actor themselves\n * via FRONT_END_SUCCESS, the rest of the organization via WEBSOCKET, …).\n * Required — the deliveries axis exists specifically to distinguish\n * audiences, so an undocumented audience defeats the purpose of fanning\n * out.\n */\n audience: string;\n /**\n * Channel the runtime fires through: a `CoreUserNotificationChannel` member (`EMAIL`, `WEBSOCKET`,\n * `FRONT_END_SUCCESS`). Exactly the channels the dispatcher delivers — the runtime refuses any other at build\n * (#1874), so a specification naming one would describe a delivery that cannot exist.\n */\n channelRef: CoreUserNotificationChannel;\n /**\n * Target type from the runtime `UserNotificationDefinition.target` (see\n * `CoreUserNotificationTarget`). Documents whether the delivery is\n * actor-only (`USER_SELF`), org-wide (`ORGANIZATION_USERS`), a specific\n * audience (`USERS_CUSTOM` with a selector), … A `CoreUserNotificationTarget` member: the runtime refuses any\n * other target when the configuration is built.\n */\n targetRef: CoreUserNotificationTarget;\n /**\n * Operation variant this delivery belongs to. `undefined` means the default\n * variant. Maps to `variantKey` on the runtime variant when present.\n */\n variantRef?: string;\n /**\n * Distinguishes deliveries when the same `(variantRef, targetRef, channelRef)`\n * triple fires multiple notifications (rare but supported by the runtime\n * via `customNotificationRef`).\n */\n customDeliveryRef?: string;\n /** Per-delivery overrides for translatable text slots. */\n textSlotsOverrides?: TranslationSlotSpecificationMap;\n /** Per-delivery override for `purpose` when this delivery has its own intent. */\n purposeOverride?: string;\n /** Per-delivery business constraints layered on top of the parent list. */\n additionalBusinessConstraints?: string[];\n /** Companion/transposer caveats specific to this delivery. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for the in-app notifications fired by a resource operation.\n *\n * Mirrors `ResourceOperationEmailSpecification` for consistency: `purpose`\n * and `tone` are plain authoring prose; every translatable fragment (title,\n * body, actionLabel, …) lives in `textSlots`; `eventData` documents the\n * payload meaning. The `deliveries` array makes the engine fan-out explicit\n * — every runtime `userNotifications[]` entry with a non-EMAIL channel maps\n * to one entry here so the spec is never silent about a real runtime\n * notification surface.\n */\nexport interface ResourceOperationNotificationSpecification {\n /** Why this operation fires in-app notifications (shared across deliveries). */\n purpose: string;\n /** Expected voice/posture for the generated copy. */\n tone: string;\n /** Situations where this notification must be raised alongside the operation. */\n useWhen?: string;\n /** Situations where this notification should not fire. */\n avoidWhen?: string;\n /**\n * Translatable text slots for the notification (`title`, `body`,\n * `actionLabel`, or any channel-specific named slot). `title` is required\n * so every notification has a recognisable headline for translators and\n * transposers to target. Per-delivery overrides live on each\n * `deliveries[i].textSlotsOverrides`.\n */\n textSlots: TranslationSlotSpecificationMap;\n /**\n * Explicit fan-out: one entry per runtime `userNotifications[]` non-EMAIL\n * delivery. At least one entry is required when a `notification` block is\n * authored. The validator enforces uniqueness on\n * `(variantRef, targetRef, channelRef, customDeliveryRef)` quadruples.\n */\n deliveries: ResourceOperationNotificationDeliverySpecification[];\n /** Meaning of the event payload the notification renders with. */\n eventData?: TranslationSlotSpecification;\n /** Domain/compliance caveats that matter beyond the operation's own constraints. */\n businessConstraints?: string[];\n /** Import-oriented coding/transposition metadata. */\n codeHandling?: ResourceOperationNotificationSpecificationCodeHandling;\n}\n\n/**\n * Import-oriented metadata for the M2M (machine-to-machine) notifications\n * fired by a resource operation.\n *\n * M2M notifications are webhook-style fan-outs declared on the resource\n * operation's `m2mNotifications[]` array (see `CoreM2MNotificationChannel` —\n * `WEBHOOK_ORGANIZATION`, `WEBHOOK_APPLICATION`, …). They never carry\n * user-facing copy; transposers/companion prompts only need to know the\n * channel vocabulary, the level vocabulary, and the payload schema to\n * generate truthful integration code.\n */\nexport interface ResourceOperationM2MSpecificationCodeHandling {\n /**\n * Public enum exposing the channel vocabulary that `deliveries[i].channelRef`\n * members come from (for example `CoreM2MNotificationChannel`). Custom\n * channels can still be authored as raw string refs in `channelRef`, but\n * declaring the owning enum lets transposer layers import the canonical\n * members when generating webhook dispatch code.\n */\n channelEnum?: CodeSymbolRef;\n /**\n * Public enum exposing the severity vocabulary that `deliveries[i].level`\n * members come from (for example `M2MNotificationLevel`).\n */\n levelEnum?: CodeSymbolRef;\n /**\n * Public Zod schema describing the m2m payload (often the resource main\n * schema augmented with operation metadata, but operations are free to\n * publish a webhook-shaped projection).\n */\n payloadSchemaSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the payload type is split from its Zod schema. */\n payloadTypeSymbol?: CodeSymbolRef;\n /** Extra supporting symbols transposer prompts may need. */\n supportingSymbols?: CodeSymbolRef[];\n /** Companion/transposer caveats that must survive serialization. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for ONE M2M notification delivery fired by a resource\n * operation. Each entry in the runtime `m2mNotifications[]` array maps to\n * one entry here so the spec stays parity-faithful with the engine fan-out.\n */\nexport interface ResourceOperationM2MDeliverySpecification {\n /**\n * Audience description: which integration consumers receive this webhook\n * (the organization's configured webhook endpoints, the application's\n * platform-wide endpoint, …). Required for the same fan-out reason as the\n * email/notification delivery audiences.\n */\n audience: string;\n /**\n * Channel ref: a `CoreM2MNotificationChannel` member (`WEBHOOK_ORGANIZATION`, `WEBHOOK_APPLICATION`). Exactly the\n * channels the dispatcher delivers — the runtime refuses any other when the configuration is built, so a\n * specification naming one would describe a webhook that is never sent.\n */\n channelRef: CoreM2MNotificationChannel;\n /**\n * Severity classification (info / success / error). Authoring sites should\n * use `M2MNotificationLevel` members; mirrors the runtime enum.\n */\n level?: M2MNotificationLevel | (string & {});\n /**\n * Operation variant this delivery belongs to. `undefined` means the default\n * variant. Maps to `variantKey` on the runtime variant when present.\n */\n variantRef?: string;\n /**\n * Distinguishes deliveries when the same `(variantRef, channelRef, level)`\n * triple is authored more than once. Note the runtime fans out one webhook per channel, so the validator\n * refuses two deliveries on the same channel regardless (see `assertM2MDeliveries`).\n */\n customDeliveryRef?: string;\n /** Companion/transposer caveats specific to this delivery. */\n notes?: string[];\n}\n\n/**\n * Semantic overlay for the M2M (webhook) notifications fired by a resource\n * operation. Mirrors the email/notification overlay shape so authors get a\n * uniform fan-out vocabulary across all three communications surfaces.\n *\n * The `requiredFeatures` slot is a documentation-oriented feature-gate\n * descriptor — see {@link RequiredFeaturesSpecification}. The runtime checks\n * the M2M dispatch gate at its delivery boundary, so this slot documents the\n * application intent rather than acting as enforcement.\n * The M2M validator opts in to fail-soft cross-registry resolution (see\n * `assertOptionalRequiredFeaturesSpecification` — `crossRegistry:\n * 'fail-soft'`) so application-defined feature refs beyond the engine\n * baseline do not silently re-define the runtime contract.\n */\nexport interface ResourceOperationM2MSpecification {\n /** Why this operation fires M2M webhooks (shared intent across deliveries). */\n purpose: string;\n /** Situations where the M2M dispatch must run alongside the operation. */\n useWhen?: string;\n /** Situations where the M2M dispatch should not fire. */\n avoidWhen?: string;\n /** Domain/compliance caveats (rate limits, privacy filters, retry policy …). */\n businessConstraints?: string[];\n /**\n * Explicit fan-out: one entry per runtime `m2mNotifications[]` delivery.\n * At least one entry is required when an `m2m` block is authored.\n */\n deliveries: ResourceOperationM2MDeliverySpecification[];\n /**\n * Documentation-oriented feature-gate descriptor — see\n * {@link RequiredFeaturesSpecification}. Optional. The authoritative\n * runtime gate lives at the M2M dispatcher\n * (`featureResolution.isFeatureEnabled(M2M_WEBHOOK_DELIVERY)`); declaring\n * this slot lets companion prompts surface the same requirement without\n * re-implementing the runtime check. Authors may add additional\n * application-level features here (e.g. `'PARTNER_INTEGRATION'`) when\n * the operation's webhook fan-out is gated beyond the engine baseline.\n */\n requiredFeatures?: RequiredFeaturesSpecification;\n /** Import-oriented coding/transposition metadata. */\n codeHandling?: ResourceOperationM2MSpecificationCodeHandling;\n}\n\n/**\n * Outbound communications fired by a resource operation.\n *\n * Each sub-block is optional — an operation may send only an email, only a\n * notification, only an m2m webhook, any combination, or none. The companion\n * will render only the authored sub-blocks. The three sub-blocks mirror the\n * runtime fan-out surfaces:\n * - `email` ↔ `userNotifications[].channel === EMAIL` entries\n * - `notification` ↔ `userNotifications[].channel !== EMAIL` entries\n * - `m2m` ↔ `m2mNotifications[]` entries\n *\n * Variant-level overrides are not modelled at the parent level: deliveries\n * carry their own `variantRef`, so per-variant differences are captured\n * inside the `deliveries` arrays of each sub-block.\n */\nexport interface ResourceOperationCommunicationsSpecification {\n /** Email deliveries fired by the operation, when applicable. */\n email?: ResourceOperationEmailSpecification;\n /** In-app notification deliveries fired by the operation, when applicable. */\n notification?: ResourceOperationNotificationSpecification;\n /** M2M (webhook) deliveries fired by the operation, when applicable. */\n m2m?: ResourceOperationM2MSpecification;\n}\n\n/**\n * Import-oriented metadata for the scheduled execution of a resource operation.\n *\n * Scheduled work always anchors to `(resourceIdentifier, operationIdentifier)`\n * at runtime — either through a `ResourceOperationVariantType.CRON_JOB`\n * variant of the operation, or through `createCustomBatchExecutionService(...)`\n * whose `batchCronjob_Context` pins the same anchor. Transposer/companion\n * prompts need stable import refs to the input/output schemas and to the\n * batch-ref constant so generated code can reuse the canonical declarations\n * instead of re-typing them.\n */\nexport interface ResourceOperationScheduledExecutionCodeHandling {\n /** Public Zod schema symbol describing the scheduled-run input payload. */\n inputSchemaSymbol?: CodeSymbolRef;\n /** Public Zod schema symbol describing the scheduled-run output payload. */\n outputSchemaSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the input type is split from its Zod schema. */\n inputTypeSymbol?: CodeSymbolRef;\n /** Public TypeScript type symbol when the output type is split from its Zod schema. */\n outputTypeSymbol?: CodeSymbolRef;\n /**\n * Public symbol declaring the custom-batch reference constant (for example\n * `FILES_CLEANUP_BATCH_REF`) when the schedule runs through\n * `createCustomBatchExecutionService(...)` rather than a\n * `ResourceOperationVariantType.CRON_JOB` variant.\n */\n customBatchRefSymbol?: CodeSymbolRef;\n /**\n * Public symbol declaring the factory that builds the custom batch service\n * (for example `createFilesCleanupBatch`). Lets generated code import the\n * constructor directly without re-reading the batch file.\n */\n batchFactorySymbol?: CodeSymbolRef;\n /** Extra supporting symbols transposer prompts may need. */\n supportingSymbols?: CodeSymbolRef[];\n /** Companion/transposer caveats that must survive serialization. */\n notes?: string[];\n}\n\n/**\n * Discriminant vocabulary for how a scheduled unit of work is anchored to a\n * resource operation at runtime.\n *\n * The spec-layer vocabulary intentionally does NOT reuse\n * `ResourceOperationVariantType` directly. Runtime variants describe how the\n * operation itself is declared on the resource configuration, while custom\n * batches are a separate mechanism registered through\n * `createCustomBatchExecutionService(...)` whose `batchCronjob_Context`\n * happens to anchor to a `(resourceIdentifier, operationIdentifier)` pair.\n * The three spec arms below make the distinction explicit so illegal\n * combinations (a `CRON_JOB` variant with no cron, a `BATCH_JOB` variant\n * with a cron, a custom batch with no `customBatchRef`, …) are\n * unrepresentable at authoring time.\n */\nexport enum ResourceOperationScheduledExecutionVariantType {\n /**\n * Operation itself declares a `ResourceOperationVariantType.CRON_JOB`\n * variant whose `cronJobExpression` drives the schedule. The spec echoes\n * the same cron so companion prompts can reason about cadence without\n * reading the runtime configuration.\n */\n NATIVE_CRON_JOB = 'NATIVE_CRON_JOB',\n /**\n * Operation itself declares a `ResourceOperationVariantType.BATCH_JOB`\n * variant. No cron is attached — the batch variant is event-triggered\n * (queue message, deferred work) and runs when upstream work dispatches it.\n */\n NATIVE_BATCH_JOB = 'NATIVE_BATCH_JOB',\n /**\n * Schedule is registered through `createCustomBatchExecutionService(...)`\n * with a `batchCronjob_Context` pinning it to this operation. The batch\n * lives outside the operation's own variants and is addressed by a stable\n * `customBatchRef` that the runtime registry (and the declarative\n * `CustomBatchManifest` aggregator) both consume.\n */\n CUSTOM_BATCH = 'CUSTOM_BATCH',\n}\n\n/**\n * Fields shared by every `scheduledExecution` arm. Authoring prose\n * (`purpose` / `outcome`) is not translatable — scheduled runs have no\n * user-facing copy of their own, so we do not carry `textSlots` here.\n */\ninterface BaseResourceOperationScheduledExecutionSpecification {\n /** Why this scheduled work runs (business intent, not mechanics). */\n purpose: string;\n /** Observable business result once the scheduled run finishes successfully. */\n outcome: string;\n /** Situations where the scheduled run is the right business path. */\n useWhen?: string;\n /** Situations where the scheduled run should be suppressed (maintenance windows, migrations, …). */\n avoidWhen?: string;\n /** Domain/compliance caveats that matter beyond the operation's own constraints. */\n businessConstraints?: string[];\n /** Import-oriented coding/transposition metadata. */\n codeHandling?: ResourceOperationScheduledExecutionCodeHandling;\n}\n\n/**\n * Scheduled-execution overlay for operations whose own variants declare a\n * `ResourceOperationVariantType.CRON_JOB` with an inline cron expression.\n * The spec echoes that cron so companion prompts see the authoritative cadence\n * without re-reading backend code; authors must not invent a cron the runtime\n * variant does not declare.\n */\nexport interface NativeCronJobScheduledExecutionSpecification\n extends BaseResourceOperationScheduledExecutionSpecification {\n variantType: ResourceOperationScheduledExecutionVariantType.NATIVE_CRON_JOB;\n /** Echoed cron expression from the operation's `CRON_JOB` variant. */\n cronExpression: string;\n}\n\n/**\n * Scheduled-execution overlay for operations whose own variants declare a\n * `ResourceOperationVariantType.BATCH_JOB`. Batch variants run on dispatch\n * rather than a schedule, so no cron is attached and no custom-batch ref is\n * involved.\n */\nexport interface NativeBatchJobScheduledExecutionSpecification\n extends BaseResourceOperationScheduledExecutionSpecification {\n variantType: ResourceOperationScheduledExecutionVariantType.NATIVE_BATCH_JOB;\n}\n\n/**\n * Scheduled-execution overlay for work registered through\n * `createCustomBatchExecutionService(...)` whose `batchCronjob_Context`\n * anchors to this operation. The stable `customBatchRef` must match the\n * `CustomBatchManifest.batchRef` exported next to the batch factory, which\n * in turn feeds the imperative `customBatches.set(...)` registration in\n * `start-application.backend.service.ts`.\n *\n * `cronExpression` echoes the custom batch's `batchCronjob_Context.cronJobExpression`\n * when one is declared; event-triggered custom batches (for example the\n * email `batch-send` path) omit both the cron and the `cronExpression` field.\n */\nexport interface CustomBatchScheduledExecutionSpecification\n extends BaseResourceOperationScheduledExecutionSpecification {\n variantType: ResourceOperationScheduledExecutionVariantType.CUSTOM_BATCH;\n /** Stable ref that resolves to a `CustomBatchManifest` at module load. */\n customBatchRef: string;\n /**\n * Echoed cron expression from the custom batch's `batchCronjob_Context`.\n * Must match the manifest: present when the batch declares a cron, absent\n * when the batch is purely event-triggered.\n */\n cronExpression?: string;\n}\n\n/**\n * Discriminated-union semantic overlay for scheduled execution of a resource\n * operation. The discriminant is\n * {@link ResourceOperationScheduledExecutionVariantType} and each arm enforces\n * the fields the runtime anchor actually requires, so illegal combinations\n * (cron without variant, batch-job with cron, custom batch without ref, …)\n * are rejected at authoring time.\n *\n * Attaching the slot at the operation level mirrors the runtime invariant\n * that every scheduled unit of work anchors to a resource operation\n * (`ResourceOperationVariantType.CRON_JOB` / `BATCH_JOB` or a custom batch\n * whose `batchCronjob_Context` binds it to `(resourceIdentifier,\n * operationIdentifier)`). There is no operation-less scheduled path.\n *\n * Cross-registry verification of `customBatchRef` runs at module load by\n * consulting the declarative `CustomBatchManifest` registry — see\n * {@link registerCustomBatchManifests} and the engine's\n * `ENGINE_CUSTOM_BATCH_MANIFESTS` export in `@wildo-ai/saas-backend-lib`.\n */\nexport type ResourceOperationScheduledExecutionSpecification =\n | NativeCronJobScheduledExecutionSpecification\n | NativeBatchJobScheduledExecutionSpecification\n | CustomBatchScheduledExecutionSpecification;\n\n// ── Operation HTTP-documentation overlay (Tier 3 — OpenAPI semantics) ───────\n\n/**\n * Fixed vocabulary of HTTP response status codes an operation may document.\n * An enum (not a literal union) per the framework rule — a single source of\n * truth for the renderer and the OpenAPI generator. The string VALUE is the\n * OpenAPI `responses` key (`'200'`, `'404'`, …) so it splices in verbatim.\n */\nexport enum HttpResponseStatusCode {\n OK_200 = '200',\n CREATED_201 = '201',\n ACCEPTED_202 = '202',\n NO_CONTENT_204 = '204',\n BAD_REQUEST_400 = '400',\n UNAUTHORIZED_401 = '401',\n FORBIDDEN_403 = '403',\n NOT_FOUND_404 = '404',\n CONFLICT_409 = '409',\n UNPROCESSABLE_ENTITY_422 = '422',\n TOO_MANY_REQUESTS_429 = '429',\n INTERNAL_SERVER_ERROR_500 = '500',\n}\n\n/**\n * One documented response status for an operation. Becomes an OpenAPI\n * `responses.<code>` entry whose `description` is the authored `meaning`.\n */\nexport interface ResourceOperationResponseStatusSpecification {\n /** HTTP status code this operation returns on this outcome. */\n code: HttpResponseStatusCode;\n /** What this status means for THIS operation, in business terms. */\n meaning: string;\n}\n\n/**\n * One documented failure mode beyond the happy path. Becomes an OpenAPI error\n * `responses.<code>` entry; `when` explains the trigger.\n *\n * The three optional identifiers each name ONE field of the error body a client\n * receives (`{ error: { type, customMessageReference, code, … } }`), so a client\n * can branch on what it will actually see. Set only the ones this failure mode\n * really produces — an identifier the API never sends is a promise a client will\n * code against and never see honoured:\n *\n * - `errorType` — `error.type`. Only worth stating where the status alone does\n * not decide it (a `403` can be `AUTHORIZATION`, `FEATURE_NOT_AVAILABLE`,\n * `FEATURE_LIMIT_EXCEEDED` or `INSUFFICIENT_CREDITS`).\n * - `customMessageReference` — `error.customMessageReference`, the stable key of\n * the message the failure carries (for example a uniqueness conflict's\n * `conflictMessageReference`).\n * - `errorCode` — `error.code`, an operation-specific refusal code the operation\n * throws in its error context (for example `LAST_ORGANIZATION_OWNER`). Never an\n * `ErrorType` or `ErrorCustomMessageReference` value: those have their own fields.\n *\n * A plain schema-validation failure carries none of the three beyond its `400`\n * status and `type: VALIDATION`; leave them unset rather than inventing a code.\n */\nexport interface ResourceOperationErrorScenarioSpecification {\n /** HTTP status code returned in this failure mode. */\n code: HttpResponseStatusCode;\n /** Trigger condition — when/why this error occurs. */\n when: string;\n /** `error.type` of this failure, when the status alone does not decide it. */\n errorType?: ErrorType;\n /** `error.customMessageReference` this failure carries. */\n customMessageReference?: ErrorCustomMessageReference;\n /** `error.code`: an operation-specific refusal code thrown in the error context. */\n errorCode?: string;\n}\n\n/**\n * A request/response payload example for docs + client codegen. Becomes an\n * OpenAPI example on the request body and/or the `forStatus` response.\n */\nexport interface ResourceOperationExampleSpecification {\n /** Short human label, e.g. \"Create with assignee\". */\n title: string;\n /** Optional example request body (JSON-serialisable). */\n request?: unknown;\n /** Optional example response body (JSON-serialisable). */\n response?: unknown;\n /** Which response status this example illustrates (links to `responseStatuses`). */\n forStatus?: HttpResponseStatusCode;\n}\n\n/**\n * Semantic explanation for one logical resource operation.\n *\n * The operation-level fields capture the invariant business meaning of the\n * action, while `variants` captures frontend/runtime-specific differences when\n * multiple operation variants exist.\n */\nexport interface ResourceOperationSpecification {\n /** Stable operation identifier as declared by the resource configuration. */\n operationId?: string;\n /** Shared business intent across all variants of the operation. */\n purpose?: string;\n /** Shared observable business result once the operation succeeds. */\n outcome?: string;\n /** Guidance about when this operation is the right choice. */\n whenToUse?: string;\n /**\n * When the operation CANNOT run on an item, in business terms — the meaning of its\n * `enabledCondition` (\"the todo has no assignee\"). It grounds the generated sentence an unavailable\n * action shows when someone asks why (`operations.<op>.unavailableReason`), so the person reads the\n * condition rather than a generic refusal. Owed by every operation that declares an\n * `enabledCondition`; without it the reason is generated from the purpose alone.\n */\n unavailableWhen?: string;\n /** Relative weight of this operation in the resource understanding. */\n importance?: FieldSemanticImportance;\n /**\n * Outbound communications (emails, notifications) fired as a side-effect of\n * running the operation. Because `ResourceFrontendViewSpecification`\n * structurally extends this interface, communications authored at the base\n * level are automatically visible through `frontend.views` as well.\n */\n communications?: ResourceOperationCommunicationsSpecification;\n /**\n * Scheduled-execution overlay for cron/batch operations. Applies when the\n * operation has a `CRON_JOB` / `BATCH_JOB` variant or is implemented by a\n * custom batch whose `batchCronjob_Context` anchors to this operation.\n * Attached at the base level so it also surfaces through\n * `frontend.views` via structural inheritance — scheduled work is a\n * backend-initiated side effect, not a UI seam.\n */\n scheduledExecution?: ResourceOperationScheduledExecutionSpecification;\n /** Variant-specific semantics layered under the same logical operation id. */\n variants?: ResourceOperationSpecificationVariants;\n /**\n * Authored HTTP response statuses for this operation. Feeds the OpenAPI\n * `responses` object, replacing the generator's default single `200`/`204`.\n * Per-operation — variants share the same HTTP contract (a per-variant\n * response set would multiply identical contracts with no semantic gain).\n */\n responseStatuses?: ResourceOperationResponseStatusSpecification[];\n /**\n * Failure modes a client should handle beyond the happy path. Each becomes\n * an OpenAPI error `responses` entry (400/403/404/409/…) carrying its `when`\n * prose. Per-operation.\n */\n errorScenarios?: ResourceOperationErrorScenarioSpecification[];\n /**\n * Whether repeating the request with the same input is side-effect-free.\n * Surfaces as an OpenAPI `x-idempotent` extension plus a description note.\n */\n idempotent?: boolean;\n /** Optional human note on the operation's rate-limiting posture (free prose). */\n rateLimitNote?: string;\n /**\n * Request/response payload examples for docs + client codegen. Base examples\n * apply to every variant unless `variants.<key>.examples` provides a complete\n * replacement for a divergent variant response schema.\n */\n examples?: ResourceOperationExampleSpecification[];\n}\n\n/**\n * Validation entry point used by the resource specification factory to assert\n * that an authored `communications` block is internally consistent. Factories\n * call this from the same place they already assert frontend-operation\n * completeness, so misconfigurations fail at module load rather than leaking\n * into companion renderers as half-formed prose.\n *\n * @param ownerLabel Stable identifier of the owning operation (used in error\n * messages so authors can locate the broken spec immediately).\n * @param communications The authored communications block, or undefined when\n * the operation does not declare one.\n * @param resourcePrimaryScope The owning resource's `resourcePrimaryScope`.\n * This is the specification author's explicitly declared scope (the fourth\n * `options` argument to {@link resourceSpecification}), threaded through\n * every re-validation path (including\n * {@link resourceSpecificationFromFrontendConfiguration}'s\n * `base.operations` / `base.frontend.views` / `frontend.views`\n * re-validation passes). It MAY still be `undefined` only on hand-built\n * spec configs that bypass both factories — those paths intentionally\n * soft-skip the cross-check because they have no contract with the spec\n * author for declaring scope. The primary entry point hard-fails on\n * missing scope (TypeScript-enforced), so production specs always\n * exercise the cross-check.\n */\nexport function validateResourceOperationCommunicationsSpecification(\n ownerLabel: string,\n communications: ResourceOperationCommunicationsSpecification | undefined,\n resourcePrimaryScope?: ResourcePrimaryScope,\n): void {\n if (!communications) {\n return;\n }\n if (communications.email) {\n assertNonEmptyProseSlot(\n ownerLabel,\n 'communications.email.purpose',\n communications.email.purpose,\n );\n assertNonEmptyProseSlot(ownerLabel, 'communications.email.tone', communications.email.tone);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.email.useWhen',\n communications.email.useWhen,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.email.avoidWhen',\n communications.email.avoidWhen,\n );\n assertEveryAuthoredTextSlot(\n ownerLabel,\n 'email',\n ['subject'],\n communications.email.textSlots,\n );\n assertOptionalEventDataSlot(ownerLabel, 'email', communications.email.eventData);\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.email.businessConstraints',\n communications.email.businessConstraints,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.email.codeHandling.notes',\n communications.email.codeHandling?.notes,\n );\n assertEmailDeliveries(ownerLabel, communications.email.deliveries);\n }\n if (communications.notification) {\n assertNonEmptyProseSlot(\n ownerLabel,\n 'communications.notification.purpose',\n communications.notification.purpose,\n );\n assertNonEmptyProseSlot(\n ownerLabel,\n 'communications.notification.tone',\n communications.notification.tone,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.notification.useWhen',\n communications.notification.useWhen,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.notification.avoidWhen',\n communications.notification.avoidWhen,\n );\n assertEveryAuthoredTextSlot(\n ownerLabel,\n 'notification',\n ['title'],\n communications.notification.textSlots,\n );\n assertOptionalEventDataSlot(\n ownerLabel,\n 'notification',\n communications.notification.eventData,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.notification.businessConstraints',\n communications.notification.businessConstraints,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.notification.codeHandling.notes',\n communications.notification.codeHandling?.notes,\n );\n assertNotificationDeliveries(ownerLabel, communications.notification.deliveries);\n }\n if (communications.m2m) {\n assertNonEmptyProseSlot(ownerLabel, 'communications.m2m.purpose', communications.m2m.purpose);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.m2m.useWhen',\n communications.m2m.useWhen,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'communications.m2m.avoidWhen',\n communications.m2m.avoidWhen,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.m2m.businessConstraints',\n communications.m2m.businessConstraints,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'communications.m2m.codeHandling.notes',\n communications.m2m.codeHandling?.notes,\n );\n assertOptionalRequiredFeaturesSpecification(\n `Resource operation \"${ownerLabel}\" communications.m2m.requiredFeatures`,\n communications.m2m.requiredFeatures,\n { crossRegistry: 'fail-soft' },\n );\n assertM2MDeliveries(ownerLabel, communications.m2m.deliveries, resourcePrimaryScope);\n }\n}\n\n/**\n * Assert that a REQUIRED prose slot (`purpose`, `tone`, `audience`, …) is\n * non-empty trimmed. `slotLabel` is the full owner-relative path included\n * verbatim in the error (e.g. `communications.email.purpose`,\n * `communications.email.deliveries[0].audience`) so callers can locate the\n * broken authoring site immediately, regardless of whether the slot lives\n * directly under `communications.*` or further nested under a `deliveries[i]`.\n */\nfunction assertNonEmptyProseSlot(\n ownerLabel: string,\n slotLabel: string,\n value: string | undefined,\n): void {\n if (!value || !value.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotLabel} must be a non-empty prose slot.`,\n );\n }\n}\n\n/**\n * Best-effort resource-type hint derivation from the `_factory` argument\n * passed to `resourceSpecification(...)`.\n *\n * Used exclusively to enrich the `validateFieldShapes(...)` error prefix so\n * authors see `resourceSpecification(TODOS): ...` instead of a\n * bare `resourceSpecification(): ...` when multiple resources fail\n * validation in the same bundle. Returns an empty string when the hint\n * cannot be derived — callers must treat that case as \"use the bare\n * prefix\" rather than throwing.\n *\n * Handles both factory forms:\n * - Function form (`ResourceConfiguration_InitializationFactory`): reads\n * the function `name` and strips the standard\n * `_ResourceConfiguration_InitializationFactory` suffix. This matches the\n * application factory naming convention.\n * - Object form (`ResourceConfiguration`): reads the\n * `resourceType?.memberName` when present. Older static object-form\n * factories do not always set this; the empty-string fallback keeps\n * them working.\n */\nfunction extractResourceTypeHintFromFactory(factory: unknown): string {\n if (typeof factory === 'function') {\n const name = typeof factory.name === 'string' ? factory.name : '';\n const stripped = name.replace(/_ResourceConfiguration_InitializationFactory$/, '');\n return stripped.trim();\n }\n if (factory && typeof factory === 'object') {\n const maybeRef = (factory as { resourceType?: { memberName?: unknown } }).resourceType;\n if (maybeRef && typeof maybeRef.memberName === 'string') {\n return maybeRef.memberName;\n }\n }\n return '';\n}\n\n/**\n * Assert that an OPTIONAL prose slot (`useWhen`, `avoidWhen`, `purposeOverride`,\n * …) is non-empty trimmed when authored. Absent slots are a no-op.\n *\n * Mirrors the per-bullet contract on `assertOptionalNonEmptyStringList`: every\n * surface the renderer prints — even optional ones — must fail closed on\n * blanks because a blank `useWhen` line silently appears as `Use when .` in\n * companion prompts and undermines translator/transposer grounding.\n *\n * `slotLabel` is the full owner-relative path included verbatim in the error\n * (e.g. `email.useWhen`, `scheduledExecution.avoidWhen`,\n * `communications.email.deliveries[0].purposeOverride`) so callers can locate\n * the broken authoring site immediately.\n */\nfunction assertOptionalNonEmptyProseSlot(\n ownerLabel: string,\n slotLabel: string,\n value: string | undefined,\n): void {\n if (value === undefined) {\n return;\n }\n if (typeof value !== 'string' || !value.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotLabel} must be a non-empty trimmed prose slot when authored (omit the field entirely instead of declaring an empty value).`,\n );\n }\n}\n\n/**\n * Validate the `deliveries` array on a `ResourceOperationEmailSpecification`.\n *\n * Engine-parity contract: every entry must mirror one runtime\n * `userNotifications[]` email delivery, so the spec is never silent about a\n * real runtime template path. The validator enforces:\n * - at least one delivery (the array is required when an `email` block is\n * authored — single-delivery emails still need one explicit entry),\n * - non-empty `audience` and a `CoreUserNotificationTarget` `targetRef` on every delivery,\n * - non-empty trimmed `variantRef` / `customDeliveryRef` when authored,\n * - non-empty trimmed `purposeOverride` when authored,\n * - per-delivery `systemEmailTemplateRef` (when authored) is a member of\n * `SystemEmailTemplateRegistry` — the cross-link lives per-delivery\n * because the runtime template-ref path is per-delivery,\n * - per-delivery `textSlotsOverrides` slots carry a non-empty `purpose`,\n * - per-delivery `additionalBusinessConstraints` and `notes` follow the\n * per-bullet non-empty contract,\n * - uniqueness on `(variantRef ?? '__default__', targetRef, customDeliveryRef ?? '__none__')`\n * so two deliveries cannot collide on the runtime template-ref path.\n */\nfunction assertEmailDeliveries(\n ownerLabel: string,\n deliveries: ResourceOperationEmailDeliverySpecification[] | undefined,\n): void {\n if (!deliveries || deliveries.length === 0) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.email.deliveries must declare at least one delivery so the spec is never silent about a real runtime email template path. Even single-delivery emails need one explicit entry.`,\n );\n }\n const seenKeys = new Set<string>();\n for (const [index, delivery] of deliveries.entries()) {\n const path = `communications.email.deliveries[${index}]`;\n assertNonEmptyProseSlot(ownerLabel, `${path}.audience`, delivery.audience);\n assertUserNotificationTargetMembership(ownerLabel, `${path}.targetRef`, delivery.targetRef);\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.variantRef`, delivery.variantRef);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `${path}.customDeliveryRef`,\n delivery.customDeliveryRef,\n );\n assertSystemEmailTemplateCrossLink(\n ownerLabel,\n `${path}.systemEmailTemplateRef`,\n delivery.systemEmailTemplateRef,\n );\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.purposeOverride`, delivery.purposeOverride);\n assertTextSlotsOverrides(\n ownerLabel,\n `${path}.textSlotsOverrides`,\n delivery.textSlotsOverrides,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `${path}.additionalBusinessConstraints`,\n delivery.additionalBusinessConstraints,\n );\n assertOptionalNonEmptyStringList(ownerLabel, `${path}.notes`, delivery.notes);\n\n const key = `${delivery.variantRef ?? '__default__'}::${delivery.targetRef}::${delivery.customDeliveryRef ?? '__none__'}`;\n if (seenKeys.has(key)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path} duplicates the (variantRef, targetRef, customDeliveryRef) triple of an earlier delivery. Two deliveries with the same triple compute the same runtime template-ref path and would silently shadow each other; add a distinguishing customDeliveryRef or merge the entries.`,\n );\n }\n seenKeys.add(key);\n }\n}\n\n/**\n * Validate the `deliveries` array on a `ResourceOperationNotificationSpecification`.\n * Same engine-parity contract as {@link assertEmailDeliveries}, with `channelRef`\n * added to the uniqueness key (notifications fan out per (target, channel) pair).\n */\nfunction assertNotificationDeliveries(\n ownerLabel: string,\n deliveries: ResourceOperationNotificationDeliverySpecification[] | undefined,\n): void {\n if (!deliveries || deliveries.length === 0) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.notification.deliveries must declare at least one delivery so companion routing cannot invent an in-app surface that the runtime does not fire.`,\n );\n }\n const seenKeys = new Set<string>();\n for (const [index, delivery] of deliveries.entries()) {\n const path = `communications.notification.deliveries[${index}]`;\n assertNonEmptyProseSlot(ownerLabel, `${path}.audience`, delivery.audience);\n if (!Object.values(CoreUserNotificationChannel).includes(delivery.channelRef as CoreUserNotificationChannel)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path}.channelRef must be a CoreUserNotificationChannel member (${Object.values(CoreUserNotificationChannel).join(', ')}): the runtime delivers no other channel (#1874).`,\n );\n }\n assertUserNotificationTargetMembership(ownerLabel, `${path}.targetRef`, delivery.targetRef);\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.variantRef`, delivery.variantRef);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `${path}.customDeliveryRef`,\n delivery.customDeliveryRef,\n );\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.purposeOverride`, delivery.purposeOverride);\n assertTextSlotsOverrides(\n ownerLabel,\n `${path}.textSlotsOverrides`,\n delivery.textSlotsOverrides,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `${path}.additionalBusinessConstraints`,\n delivery.additionalBusinessConstraints,\n );\n assertOptionalNonEmptyStringList(ownerLabel, `${path}.notes`, delivery.notes);\n\n const key = `${delivery.variantRef ?? '__default__'}::${delivery.targetRef}::${delivery.channelRef}::${delivery.customDeliveryRef ?? '__none__'}`;\n if (seenKeys.has(key)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path} duplicates the (variantRef, targetRef, channelRef, customDeliveryRef) quadruple of an earlier delivery; add a distinguishing customDeliveryRef or merge the entries.`,\n );\n }\n seenKeys.add(key);\n }\n}\n\n/**\n * Validate the `deliveries` array on a `ResourceOperationM2MSpecification`.\n *\n * Webhook-style M2M deliveries fan out per\n * `(variantRef, channelRef, level, customDeliveryRef)` — the validator\n * enforces uniqueness on that quadruple so two deliveries that genuinely\n * differ on those axes can coexist. `variantRef` is the first segment of\n * the key (defaulting to `__default__` when omitted), so two deliveries\n * that differ only by their owning variant remain distinct.\n *\n * Each authored `level` (when present) is also enum-membership-checked\n * against `M2MNotificationLevel` so a typo (`'inf0'`, `'WARN'`,\n * …) fails at module load — the runtime schema is strict-enum even\n * though the TypeScript declaration is widened with `(string & {})` for\n * IDE autocomplete.\n *\n * **Runtime-identity cross-check.** The runtime\n * `M2MNotificationDefinitionSchema` carries no `customNotificationRef`\n * field; the dispatcher constructs the fan-out identifier as\n * `${resourceIdentifier}_${operationIdentifier}_${channel}` only — no\n * variant, no level and no custom-reference segment.\n * The spec layer is therefore free to author multiple deliveries on the\n * same `channelRef` (disambiguated by `level` / `customDeliveryRef`), but\n * at runtime they would collapse to a single identifier and one of the\n * deliveries would silently shadow the other. The validator fail-closes\n * on this collision: every authored delivery must project to a unique\n * `channelRef` within its operation. Authors who genuinely need multiple\n * fan-outs on the same channel must wait until the runtime carries a\n * `customNotificationRef` axis (engineering scope, separate workstream).\n */\nfunction assertM2MDeliveries(\n ownerLabel: string,\n deliveries: ResourceOperationM2MDeliverySpecification[] | undefined,\n resourcePrimaryScope?: ResourcePrimaryScope,\n): void {\n if (!deliveries || deliveries.length === 0) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.m2m.deliveries must declare at least one delivery so companion routing cannot invent a webhook surface that the runtime does not fire.`,\n );\n }\n const seenKeys = new Set<string>();\n const seenRuntimeIdentities = new Map<string, number>();\n for (const [index, delivery] of deliveries.entries()) {\n const path = `communications.m2m.deliveries[${index}]`;\n assertNonEmptyProseSlot(ownerLabel, `${path}.audience`, delivery.audience);\n if (!Object.values(CoreM2MNotificationChannel).includes(delivery.channelRef as CoreM2MNotificationChannel)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path}.channelRef must be a CoreM2MNotificationChannel member (${Object.values(CoreM2MNotificationChannel).join(', ')}): the runtime delivers no other channel.`,\n );\n }\n assertM2MChannelMatchesPrimaryScope(\n ownerLabel,\n `${path}.channelRef`,\n delivery.channelRef,\n resourcePrimaryScope,\n );\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.level`, delivery.level);\n assertOptionalM2MNotificationLevelMembership(\n ownerLabel,\n `${path}.level`,\n delivery.level,\n );\n assertOptionalNonEmptyProseSlot(ownerLabel, `${path}.variantRef`, delivery.variantRef);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `${path}.customDeliveryRef`,\n delivery.customDeliveryRef,\n );\n assertOptionalNonEmptyStringList(ownerLabel, `${path}.notes`, delivery.notes);\n\n const key = `${delivery.variantRef ?? '__default__'}::${delivery.channelRef}::${delivery.level ?? '__none__'}::${delivery.customDeliveryRef ?? '__none__'}`;\n if (seenKeys.has(key)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path} duplicates the (variantRef, channelRef, level, customDeliveryRef) quadruple of an earlier delivery; add a distinguishing customDeliveryRef or merge the entries.`,\n );\n }\n seenKeys.add(key);\n\n const runtimeIdentityKey = delivery.channelRef;\n const previousIndex = seenRuntimeIdentities.get(runtimeIdentityKey);\n if (previousIndex !== undefined) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${path} collides with deliveries[${previousIndex}] on the runtime m2m identifier (resource_op_channel) — both project to channel \"${runtimeIdentityKey}\". The runtime M2MNotificationDefinitionSchema carries no customNotificationRef axis, so two deliveries that differ only by (variantRef, level, customDeliveryRef) collapse to a single identifier and one would silently shadow the other. Either merge the entries or wait until the runtime carries a customNotificationRef axis.`,\n );\n }\n seenRuntimeIdentities.set(runtimeIdentityKey, index);\n }\n}\n\n/**\n * Iterate every authored text slot and assert it has a non-empty trimmed\n * `purpose`, then assert the required slot keys (`subject` for email, `title`\n * for notification) are also present. This protects optional translatable\n * fragments (`previewText`, `ctaLabel`, `body`, `actionLabel`, …) from being\n * authored as placeholders that the translator cannot ground in author intent.\n */\nfunction assertEveryAuthoredTextSlot(\n ownerLabel: string,\n blockLabel: 'email' | 'notification',\n requiredSlotKeys: readonly string[],\n textSlots: TranslationSlotSpecificationMap | undefined,\n): void {\n for (const requiredKey of requiredSlotKeys) {\n const slot = textSlots?.[requiredKey];\n if (!slot || !slot.purpose || !slot.purpose.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.${blockLabel} must document text slot \"${requiredKey}\" with a non-empty purpose so translators have a grounded target.`,\n );\n }\n }\n if (!textSlots) {\n return;\n }\n for (const [slotKey, slot] of Object.entries(textSlots)) {\n if (!slot || !slot.purpose || !slot.purpose.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.${blockLabel}.textSlots[\"${slotKey}\"] must carry a non-empty purpose so translators have a grounded target for every authored slot.`,\n );\n }\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `communications.${blockLabel}.textSlots[\"${slotKey}\"].whenToUse`,\n slot.whenToUse,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `communications.${blockLabel}.textSlots[\"${slotKey}\"].notes`,\n slot.notes,\n );\n }\n}\n\n/**\n * When `eventData` is authored on either communications sub-block, assert its\n * `purpose` is a non-empty trimmed string. Companion prompts use this slot to\n * narrate which runtime values land in each translatable text slot, so a blank\n * `purpose` would produce a labelled but undocumented payload reference.\n */\nfunction assertOptionalEventDataSlot(\n ownerLabel: string,\n blockLabel: 'email' | 'notification',\n eventData: TranslationSlotSpecification | undefined,\n): void {\n if (!eventData) {\n return;\n }\n if (!eventData.purpose || !eventData.purpose.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" communications.${blockLabel}.eventData must carry a non-empty purpose so companion prompts can narrate which runtime values land in each text slot.`,\n );\n }\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `communications.${blockLabel}.eventData.whenToUse`,\n eventData.whenToUse,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `communications.${blockLabel}.eventData.notes`,\n eventData.notes,\n );\n}\n\n/**\n * Validate a per-delivery `textSlotsOverrides` map (or any structurally\n * compatible `TranslationSlotSpecificationMap`):\n *\n * - absent map → no-op,\n * - every authored slot must carry a non-empty trimmed `purpose`,\n * - every authored optional `whenToUse` (if present) must be non-empty\n * trimmed prose so the renderer never prints `When to use .`,\n * - every authored `notes` array must follow the per-bullet contract.\n *\n * Path-agnostic: callers pass the full owner-relative path prefix (for\n * example `communications.email.deliveries[0].textSlotsOverrides`) so this\n * primitive serves every overlay surface without baking a sub-tree prefix\n * into the helper.\n */\nfunction assertTextSlotsOverrides(\n ownerLabel: string,\n pathPrefix: string,\n slots: TranslationSlotSpecificationMap | undefined,\n): void {\n if (!slots) {\n return;\n }\n for (const [slotKey, slot] of Object.entries(slots)) {\n if (!slot || !slot.purpose || !slot.purpose.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${pathPrefix}[\"${slotKey}\"] must carry a non-empty purpose so translators have a grounded target for every authored override.`,\n );\n }\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n `${pathPrefix}[\"${slotKey}\"].whenToUse`,\n slot.whenToUse,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n `${pathPrefix}[\"${slotKey}\"].notes`,\n slot.notes,\n );\n }\n}\n\n/**\n * Defensive guard for any optional `string[]` companion-bullet surface\n * (notes arrays, businessConstraints arrays, …). When the array is absent\n * the check is a no-op; when present, every entry must be a non-empty\n * trimmed string because the renderer emits each entry as a bullet — empty\n * entries leak blank lines into companion prompts and break the fail-closed\n * contract the surrounding validators promise.\n *\n * The helper is path-agnostic: callers pass the full owner-relative path\n * (for example `communications.email.codeHandling.notes` or\n * `scheduledExecution.codeHandling.notes`) so the same primitive serves\n * every overlay surface without baking a sub-tree prefix into the helper.\n *\n * @param ownerLabel Stable identifier of the owning operation (used in error\n * messages so authors can locate the broken spec immediately).\n * @param fullPath Dotted owner-relative authoring path; included verbatim in\n * the error message.\n */\nfunction assertOptionalNonEmptyStringList(\n ownerLabel: string,\n fullPath: string,\n values: string[] | undefined,\n): void {\n if (!values) {\n return;\n }\n for (const [index, value] of values.entries()) {\n if (typeof value !== 'string' || !value.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${fullPath}[${index}] must be a non-empty trimmed string.`,\n );\n }\n }\n}\n\n/**\n * Cross-validate the optional m2m delivery `level` against the runtime\n * `M2MNotificationLevel` enum so a typo (`'inf0'`, `'WARN'`, `'crit'`, …)\n * fails at module load instead of leaking through the spec validator and\n * surfacing later as a runtime Zod parse error (or, worse, leaking into\n * companion prompts unchanged).\n *\n * The TypeScript declaration `M2MNotificationLevel | (string & {})` exists\n * to give autocomplete on enum members in IDEs, but the runtime\n * `M2MNotificationDefinitionSchema` declares `level` as\n * `z.enum(M2MNotificationLevel).optional()` — strict enum-only. The spec\n * layer mirrors that runtime contract here so spec → runtime parity is\n * fail-closed at module load.\n *\n * Mirrors `assertSystemEmailTemplateCrossLink` in error-message structure:\n * `slotPath` is the full owner-relative path included verbatim so authors\n * can locate the broken delivery directly.\n */\nfunction assertOptionalM2MNotificationLevelMembership(\n ownerLabel: string,\n slotPath: string,\n level: M2MNotificationLevel | (string & {}) | undefined,\n): void {\n if (level === undefined) {\n return;\n }\n const allowedValues = Object.values(M2MNotificationLevel) as string[];\n if (!allowedValues.includes(level)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} \"${level}\" is not a member of M2MNotificationLevel (expected one of: ${allowedValues.join(', ')}). Use a M2MNotificationLevel enum value so spec → runtime parity stays fail-closed at module load.`,\n );\n }\n}\n\n/**\n * Cross-validate one M2M delivery `channelRef` against the owning resource's\n * `resourcePrimaryScope`.\n *\n * The runtime `WEBHOOK_ORGANIZATION` channel only fires when the operation's\n * resource lives under an organization scope — the dispatcher resolves the\n * scope from the organization initiator identity, which is only present on\n * organization-scoped operations.\n * Authoring `WEBHOOK_ORGANIZATION` on an APPLICATION/USER_SELF/ANONYMOUS\n * resource silently no-ops at runtime and is therefore a fail-closed\n * authoring error here.\n *\n * `WEBHOOK_APPLICATION` is allowed on any scope: the dispatcher resolves the\n * application scope from the always-present\n * `appConfigService.applicationId`, so the channel fires regardless of the\n * resource's own scope. The check is therefore one-sided — only the\n * `WEBHOOK_ORGANIZATION` arm fails closed.\n *\n * The cross-check is skipped when `resourcePrimaryScope` is `undefined`\n * — a defensive guard for re-validation seams that may be reached without\n * a scope (e.g., test fixtures invoking the validator directly, or future\n * call sites that haven't been updated). All production entry points\n * (`resourceSpecification`, `resourceSpecificationFromFrontendConfiguration`)\n * thread the scope explicitly, so this branch should not fire from the main\n * application path.\n */\nfunction assertM2MChannelMatchesPrimaryScope(\n ownerLabel: string,\n slotPath: string,\n channelRef: CoreM2MNotificationChannel,\n resourcePrimaryScope: ResourcePrimaryScope | undefined,\n): void {\n if (resourcePrimaryScope === undefined) {\n return;\n }\n if (channelRef === CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION) {\n if (resourcePrimaryScope !== ResourcePrimaryScope.ORGANIZATIONS) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} declares CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION on a resource whose resourcePrimaryScope is \"${resourcePrimaryScope}\". WEBHOOK_ORGANIZATION resolves its scope from executionContext.initiatorIds.organizationId, which is only present on resources whose resourcePrimaryScope is \"${ResourcePrimaryScope.ORGANIZATIONS}\" — for application/user/anonymous-scoped resources use CoreM2MNotificationChannel.WEBHOOK_APPLICATION instead so the dispatcher can resolve the scope from appConfigService.applicationId.`,\n );\n }\n }\n // WEBHOOK_APPLICATION resolves scope from appConfigService.applicationId,\n // which is always present, so it is allowed on every primary scope.\n}\n\n/**\n * Refuse a notification `targetRef` outside `CoreUserNotificationTarget`. The runtime refuses such a target when the\n * configuration is built, and every member has a recipient rule in the dispatcher, so a specification naming any\n * other value would describe a delivery that cannot exist.\n */\nfunction assertUserNotificationTargetMembership(ownerLabel: string, slotPath: string, targetRef: unknown): void {\n if (!Object.values(CoreUserNotificationTarget).includes(targetRef as CoreUserNotificationTarget)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} must be a CoreUserNotificationTarget member (${Object.values(CoreUserNotificationTarget).join(', ')}): the runtime resolves recipients for no other target.`,\n );\n }\n}\n\n/**\n * Cross-validate the optional `systemEmailTemplateRef` (now per-delivery)\n * against the runtime `SystemEmailTemplateRegistry` so a typo or stale ref\n * fails at module load instead of leaking a dangling cross-link into\n * companion prompts. Mirrors the registered-manifest cross-validation used\n * by the scheduledExecution `customBatchRef` arm — same anti-pattern, same\n * fail-closed treatment.\n *\n * `slotPath` is the full owner-relative path (e.g.\n * `communications.email.deliveries[2].systemEmailTemplateRef`) so error\n * messages locate the broken delivery directly.\n */\nfunction assertSystemEmailTemplateCrossLink(\n ownerLabel: string,\n slotPath: string,\n systemEmailTemplateRef: SystemEmailTemplateRef | undefined,\n): void {\n if (systemEmailTemplateRef === undefined) {\n return;\n }\n if (typeof systemEmailTemplateRef !== 'string' || !systemEmailTemplateRef.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} must be a non-empty trimmed SystemEmailTemplateRef value.`,\n );\n }\n if (!Object.prototype.hasOwnProperty.call(SystemEmailTemplateRegistry, systemEmailTemplateRef)) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" ${slotPath} \"${systemEmailTemplateRef}\" is not a member of SystemEmailTemplateRegistry. Use a SystemEmailTemplateRef enum value or register the template before this spec loads.`,\n );\n }\n}\n\n/**\n * Iterate an operation map and validate every authored `communications` block.\n *\n * `ownerLabelPrefix` lets factories disambiguate which seam produced the error\n * (base-operation vs frontend-view), since `ResourceFrontendViewSpecification`\n * structurally extends `ResourceOperationSpecification` and can therefore\n * author communications too.\n */\nfunction validateResourceOperationsCommunications(\n ownerLabelPrefix: string,\n operations:\n | Record<string, ResourceOperationSpecification | ResourceFrontendViewSpecification | undefined>\n | undefined,\n resourcePrimaryScope?: ResourcePrimaryScope,\n): void {\n if (!operations) {\n return;\n }\n for (const [operationId, operationSpec] of Object.entries(operations)) {\n if (!operationSpec) {\n continue;\n }\n validateResourceOperationCommunicationsSpecification(\n `${ownerLabelPrefix}${operationId}`,\n operationSpec.communications,\n resourcePrimaryScope,\n );\n }\n}\n\nconst registeredCustomBatchManifests = new Map<string, CustomBatchManifest>();\n\n/**\n * Register custom-batch manifests with the spec-layer registry so authored\n * `scheduledExecution.customBatchRef` values can be cross-validated at\n * module load. Safe to call multiple times; re-registering the same\n * `batchRef` with an identical manifest is a no-op, but re-registering with\n * a divergent shape is a fail-closed error so silent drift between the\n * runtime batch and the spec layer is caught immediately.\n *\n * The framework registers its built-in batches when the public specification\n * package is loaded. Applications with custom batches should register them\n * from their specification bootstrap before evaluating a resource\n * specification that refers to them.\n *\n * **Import-order contract — read this if you author CUSTOM_BATCH specs.**\n * Registering built-in batches depends on loading the public package entry.\n * A consumer that reaches a low-level internal module first can evaluate a\n * CUSTOM_BATCH-bearing resource spec against an empty registry and fail closed\n * on the cross-link check at\n * {@link validateResourceOperationScheduledExecutionSpecification}. The\n * fix in that case is to either (a) ensure the engine barrel is imported\n * first (typically via `import '@wildo-ai/saas-specifications'`), or (b)\n * explicitly register the manifests required by that application's bootstrap.\n * Both paths make the contract explicit rather than leaving availability to\n * import order. Test suites that reset the registry must re-seed for the same\n * reason.\n */\nexport function registerCustomBatchManifests(\n manifests: Iterable<CustomBatchManifest>,\n): void {\n for (const manifest of manifests) {\n if (!manifest.batchRef || !manifest.batchRef.trim()) {\n throw new Error('registerCustomBatchManifests(): every manifest must carry a non-empty `batchRef`.');\n }\n if (!manifest.operationIdentifier || !manifest.operationIdentifier.trim()) {\n throw new Error(\n `registerCustomBatchManifests(): manifest for \"${manifest.batchRef}\" must declare a non-empty trimmed \\`operationIdentifier\\`.`,\n );\n }\n assertCustomBatchManifestKindArm(manifest);\n const existing = registeredCustomBatchManifests.get(manifest.batchRef);\n if (existing && !areCustomBatchManifestsEqual(existing, manifest)) {\n throw new Error(\n `registerCustomBatchManifests(): manifest for \"${manifest.batchRef}\" was registered twice with divergent shapes. Deduplicate the co-located manifest exports or update the spec-layer registration call.`,\n );\n }\n registeredCustomBatchManifests.set(manifest.batchRef, manifest);\n }\n}\n\n/**\n * Per-arm structural validation for a {@link CustomBatchManifest} at\n * registration time. Mirrors the discriminated union split in\n * `ExecutionContextCreatorBackendService.createForInternalCustomBatch`:\n *\n * - `resource_anchored` — must declare a non-empty `resourceIdentifier`.\n * The spec layer does not (and should not) try to verify that the\n * identifier resolves to a registered resource — that cross-check lives\n * inside the runtime EC creator where the resources registry is the\n * source of truth and where a missing resource fails closed with the\n * same error message authors already see today.\n * - `scope_anchored` — must declare a `primaryScope` that is a member of\n * {@link ResourcePrimaryScope} (the runtime synthetic operation copies\n * this value into `resourcePrimaryScope`, so a typo would silently\n * widen or narrow downstream authorization). The `operationIdentifier`\n * must follow the `<domain>:<batch-ref>` convention so synthetic\n * operation labels stay grep-able alongside their batch ref — the\n * convention is also pinned by a dedicated unit test.\n *\n * Adding a future arm to {@link CustomBatchManifest} is a compile-time\n * error in the exhaustive `default` branch, forcing the author to extend\n * the per-arm rules instead of leaking an unchecked manifest into the\n * registry.\n */\nfunction assertCustomBatchManifestKindArm(manifest: CustomBatchManifest): void {\n switch (manifest.kind) {\n case CustomBatchManifestKind.RESOURCE_ANCHORED: {\n if (!manifest.resourceIdentifier || !manifest.resourceIdentifier.trim()) {\n throw new Error(\n `registerCustomBatchManifests(): resource_anchored manifest for \"${manifest.batchRef}\" must declare a non-empty trimmed \\`resourceIdentifier\\`.`,\n );\n }\n return;\n }\n case CustomBatchManifestKind.SCOPE_ANCHORED: {\n const allowedPrimaryScopes = Object.values(ResourcePrimaryScope) as readonly string[];\n if (!allowedPrimaryScopes.includes(manifest.primaryScope)) {\n throw new Error(\n `registerCustomBatchManifests(): scope_anchored manifest for \"${manifest.batchRef}\" declares unknown primaryScope \"${manifest.primaryScope}\". Use one of: ${allowedPrimaryScopes.join(', ')}.`,\n );\n }\n const colonIndex = manifest.operationIdentifier.indexOf(':');\n const domain = colonIndex >= 0 ? manifest.operationIdentifier.slice(0, colonIndex).trim() : '';\n const tail = colonIndex >= 0 ? manifest.operationIdentifier.slice(colonIndex + 1).trim() : '';\n if (colonIndex < 0 || !domain || tail !== manifest.batchRef) {\n throw new Error(\n `registerCustomBatchManifests(): scope_anchored manifest for \"${manifest.batchRef}\" must use the \"<domain>:${manifest.batchRef}\" convention for \\`operationIdentifier\\` (got \"${manifest.operationIdentifier}\"). Pick a non-empty domain prefix (e.g. \"notifications\") so synthetic operation labels stay grep-able alongside their batch ref.`,\n );\n }\n return;\n }\n default: {\n const exhaustiveCheck: never = manifest;\n throw new Error(\n `registerCustomBatchManifests(): unsupported CustomBatchManifest kind: ${JSON.stringify(exhaustiveCheck)}.`,\n );\n }\n }\n}\n\n/**\n * Test-only helper that wipes the module-local custom-batch manifest registry.\n * Authored specifications should never call this at runtime — it exists only\n * so tests can exercise registration / cross-validation in isolation.\n */\nexport function resetCustomBatchManifestRegistryForTesting(): void {\n registeredCustomBatchManifests.clear();\n}\n\n/**\n * Structural equality for two {@link CustomBatchManifest} values, used by\n * {@link registerCustomBatchManifests} to detect divergent re-registration of\n * the same `batchRef` across the engine + app bootstrap seams.\n *\n * Comparison rules:\n * - Both manifests must declare the same `kind` discriminator. A\n * `resource_anchored` manifest is **never** equal to a `scope_anchored`\n * one even if their non-arm fields happen to align — the two arms model\n * structurally different bootstrap semantics in\n * `ExecutionContextCreatorBackendService.createForInternalCustomBatch` and\n * silently treating them as interchangeable would mask a real authoring\n * bug at registration time.\n * - Common fields (`batchRef`, `operationIdentifier`, `cronExpression`,\n * `cronExpressionConfigurable`) must match across both arms.\n * - The arm-specific identity field is then compared:\n * `resourceIdentifier` for `resource_anchored`, `primaryScope` for\n * `scope_anchored`. The exhaustive switch makes adding a future arm a\n * compile-time error here rather than a silent equality regression.\n */\nfunction areCustomBatchManifestsEqual(a: CustomBatchManifest, b: CustomBatchManifest): boolean {\n if (a.kind !== b.kind) {\n return false;\n }\n const commonEqual =\n a.batchRef === b.batchRef\n && a.operationIdentifier === b.operationIdentifier\n && a.cronExpression === b.cronExpression\n && Boolean(a.cronExpressionConfigurable) === Boolean(b.cronExpressionConfigurable);\n if (!commonEqual) {\n return false;\n }\n switch (a.kind) {\n case CustomBatchManifestKind.RESOURCE_ANCHORED:\n return a.resourceIdentifier\n === (b as ResourceAnchoredCustomBatchManifest).resourceIdentifier;\n case CustomBatchManifestKind.SCOPE_ANCHORED:\n return a.primaryScope\n === (b as ScopeAnchoredCustomBatchManifest).primaryScope;\n default: {\n const exhaustiveCheck: never = a;\n throw new Error(\n `areCustomBatchManifestsEqual(): unsupported CustomBatchManifest kind: ${JSON.stringify(exhaustiveCheck)}.`,\n );\n }\n }\n}\n\n/**\n * Validation entry point used by the resource specification factory to assert\n * that an authored `scheduledExecution` block is internally consistent and,\n * for custom-batch arms, cross-checks against the declarative\n * {@link CustomBatchManifest} registry so typos or unregistered refs fail at\n * module load rather than silently at runtime.\n *\n * Each arm of the discriminated union enforces its own fail-closed contract:\n * - `NATIVE_CRON_JOB`: `cronExpression` must be a non-empty trimmed string.\n * - `NATIVE_BATCH_JOB`: no schedule or batch ref is permitted.\n * - `CUSTOM_BATCH`: `customBatchRef` must resolve to a registered manifest;\n * when the manifest declares a fixed cron the spec must echo it; when the\n * manifest is `cronExpressionConfigurable: true` the spec only needs to\n * carry a non-empty cron (divergence from the manifest default is allowed\n * because the runtime cron comes from app config); when the manifest omits\n * a cron entirely the spec must omit it too.\n *\n * Cross-validation is opt-in by design: the spec layer is built around a\n * declarative `CustomBatchManifest` registry seeded by the engine (and\n * optionally by app bootstraps) rather than an imperative dependency on\n * runtime service instances. If no manifest has been registered for a\n * `customBatchRef`, validation fails closed with an actionable message.\n *\n * **Test-suite seeding contract.** The framework registers built-in batches\n * when the public package entry is imported. Test files that\n * (a) reset the registry via {@link resetCustomBatchManifestRegistryForTesting}\n * and (b) need engine batches available afterwards must re-seed by calling\n * `registerCustomBatchManifests(ENGINE_CUSTOM_BATCH_MANIFESTS)` in `beforeAll`\n * or `beforeEach`. The current test suites either scope their reset to\n * test-only manifests or never reach built-in batches, so this remains an\n * explicit test setup contract.\n *\n * @param ownerLabel Stable identifier of the owning operation (used in error\n * messages so authors can locate the broken spec immediately).\n */\nexport function validateResourceOperationScheduledExecutionSpecification(\n ownerLabel: string,\n scheduledExecution: ResourceOperationScheduledExecutionSpecification | undefined,\n): void {\n if (!scheduledExecution) {\n return;\n }\n assertNonEmptyScheduledExecutionProseSlot(ownerLabel, 'purpose', scheduledExecution.purpose);\n assertNonEmptyScheduledExecutionProseSlot(ownerLabel, 'outcome', scheduledExecution.outcome);\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'scheduledExecution.useWhen',\n scheduledExecution.useWhen,\n );\n assertOptionalNonEmptyProseSlot(\n ownerLabel,\n 'scheduledExecution.avoidWhen',\n scheduledExecution.avoidWhen,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'scheduledExecution.businessConstraints',\n scheduledExecution.businessConstraints,\n );\n assertOptionalNonEmptyStringList(\n ownerLabel,\n 'scheduledExecution.codeHandling.notes',\n scheduledExecution.codeHandling?.notes,\n );\n\n switch (scheduledExecution.variantType) {\n case ResourceOperationScheduledExecutionVariantType.NATIVE_CRON_JOB:\n assertNativeCronJobArm(ownerLabel, scheduledExecution);\n return;\n case ResourceOperationScheduledExecutionVariantType.NATIVE_BATCH_JOB:\n assertNativeBatchJobArm(ownerLabel, scheduledExecution);\n return;\n case ResourceOperationScheduledExecutionVariantType.CUSTOM_BATCH:\n assertCustomBatchArm(ownerLabel, scheduledExecution);\n return;\n default: {\n const exhaustiveCheck: never = scheduledExecution;\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution carries an unsupported variantType: ${JSON.stringify(exhaustiveCheck)}.`,\n );\n }\n }\n}\n\nfunction assertNonEmptyScheduledExecutionProseSlot(\n ownerLabel: string,\n slotLabel: 'purpose' | 'outcome',\n value: string | undefined,\n): void {\n if (!value || !value.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.${slotLabel} must be a non-empty prose slot so companion prompts have grounded cron-run semantics.`,\n );\n }\n}\n\n/**\n * Defense-in-depth runtime guards for the NATIVE_CRON_JOB arm.\n *\n * The static type already requires `cronExpression: string` and does **not**\n * declare `customBatchRef`, so well-typed authoring sites cannot reach an\n * invalid state. We still trim-check `cronExpression` and structurally reject\n * a smuggled `customBatchRef` so authoring sites that bypass type narrowing\n * (`as never`, `as any`, dynamic data, custom factories) cannot leak a blank\n * schedule or a foreign field into companion prompts. Symmetric with\n * {@link assertNativeBatchJobArm} so every arm enforces the same defensive\n * discipline.\n */\nfunction assertNativeCronJobArm(\n ownerLabel: string,\n arm: NativeCronJobScheduledExecutionSpecification,\n): void {\n if (!arm.cronExpression || !arm.cronExpression.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression must be a non-empty trimmed cron expression for the NATIVE_CRON_JOB arm (the runtime CRON_JOB variant requires a concrete schedule).`,\n );\n }\n if ('customBatchRef' in arm && (arm as unknown as { customBatchRef?: unknown }).customBatchRef !== undefined) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution cannot declare customBatchRef for the NATIVE_CRON_JOB arm — custom batches belong to the CUSTOM_BATCH arm so the declarative manifest cross-validation runs.`,\n );\n }\n}\n\n/**\n * Defense-in-depth runtime guards for the NATIVE_BATCH_JOB arm.\n *\n * The static type does **not** declare `cronExpression` or `customBatchRef`,\n * so well-typed authoring sites cannot reach this state. The structural\n * `'<key>' in arm` checks back the `// @ts-expect-error` test cases and\n * protect against dynamic data or `as any` bypasses at authoring sites — if\n * an author silences TypeScript to attach a stray field to a batch-job arm,\n * the validator still rejects it at module load.\n */\nfunction assertNativeBatchJobArm(\n ownerLabel: string,\n arm: NativeBatchJobScheduledExecutionSpecification,\n): void {\n if ('cronExpression' in arm && (arm as unknown as { cronExpression?: unknown }).cronExpression !== undefined) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution cannot declare cronExpression for the NATIVE_BATCH_JOB arm — batch-job variants are event-triggered and never carry a cron. Move the schedule to the NATIVE_CRON_JOB or CUSTOM_BATCH arm.`,\n );\n }\n if ('customBatchRef' in arm && (arm as unknown as { customBatchRef?: unknown }).customBatchRef !== undefined) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution cannot declare customBatchRef for the NATIVE_BATCH_JOB arm — custom batches belong to the CUSTOM_BATCH arm so the declarative manifest and cron echo stay consistent.`,\n );\n }\n}\n\n/**\n * Validates the CUSTOM_BATCH arm against the spec-layer manifest registry.\n *\n * Cron-echo policy:\n * - **Fixed-cron manifest** (`cronExpressionConfigurable !== true` and\n * `cronExpression` declared): the authored spec must echo the manifest's\n * cron exactly, so companion prompts and the runtime cannot drift.\n * - **Configurable-cron manifest** (`cronExpressionConfigurable === true`):\n * the authored spec must still carry a non-empty cron (companion prompts\n * need a cadence) but is free to diverge from the manifest's runtime\n * default — divergence is the whole point of configurability.\n * - **Event-triggered manifest** (`cronExpression` undefined): the spec\n * must omit `cronExpression` so it does not invent a schedule the runtime\n * never honors.\n */\nfunction assertCustomBatchArm(\n ownerLabel: string,\n arm: CustomBatchScheduledExecutionSpecification,\n): void {\n if (!arm.customBatchRef || !arm.customBatchRef.trim()) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.customBatchRef must be a non-empty trimmed batch ref for the CUSTOM_BATCH arm (for example \"files-cleanup\").`,\n );\n }\n if (\n 'cronExpression' in arm\n && arm.cronExpression !== undefined\n && (!arm.cronExpression || !arm.cronExpression.trim())\n ) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression must be a non-empty trimmed cron expression when provided (authors must not declare an empty schedule).`,\n );\n }\n\n const manifest = registeredCustomBatchManifests.get(arm.customBatchRef);\n if (!manifest) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.customBatchRef \"${arm.customBatchRef}\" is not registered. Either export a CustomBatchManifest next to the batch factory (engine batches go through ENGINE_CUSTOM_BATCH_MANIFESTS) and call registerCustomBatchManifests() before this spec loads, or correct the ref.`,\n );\n }\n if (manifest.cronExpression && !arm.cronExpression) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression must echo the runtime cron \"${manifest.cronExpression}\" declared by custom batch \"${arm.customBatchRef}\" so companion prompts see the authoritative cadence.`,\n );\n }\n if (!manifest.cronExpression && arm.cronExpression) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression is declared but custom batch \"${arm.customBatchRef}\" is registered without a cron (event-triggered). Remove the authored cron or update the manifest if the runtime actually schedules this batch.`,\n );\n }\n if (\n manifest.cronExpression\n && arm.cronExpression\n && !manifest.cronExpressionConfigurable\n && manifest.cronExpression !== arm.cronExpression\n ) {\n throw new Error(\n `Resource operation \"${ownerLabel}\" scheduledExecution.cronExpression \"${arm.cronExpression}\" does not match the manifest cron \"${manifest.cronExpression}\" for custom batch \"${arm.customBatchRef}\". Align the authored cron with the runtime batchCronjob_Context, or mark the manifest as cronExpressionConfigurable if the schedule is intentionally driven by app config.`,\n );\n }\n}\n\n/**\n * Iterate an operation map and validate every authored `scheduledExecution`\n * block. Same dual-seam rationale as communications: base-operation and\n * frontend-operation both structurally carry the slot, and both seams must\n * fail closed at module load.\n */\n/**\n * Every `ErrorType` value and every `ErrorCustomMessageReference` key and value — none of them is an\n * `error.code` — with the field each one belongs in. One identifier can belong to BOTH vocabularies\n * (`CONFLICT` is an `ErrorType` value and an `ErrorCustomMessageReference` key), so each maps to every\n * owner and the refusal names them all rather than guessing which was meant.\n */\nconst ERROR_IDENTIFIERS_OWNED_BY_OTHER_FIELDS: ReadonlyMap<string, readonly string[]> = (() => {\n const owners = new Map<string, string[]>();\n const add = (identifier: string, owner: string): void => {\n owners.set(identifier, [...(owners.get(identifier) ?? []), owner]);\n };\n for (const value of Object.values(ErrorType)) add(value, `an ErrorType value — author it as \\`errorType: ErrorType.${value}\\``);\n for (const [key, value] of Object.entries(ErrorCustomMessageReference)) {\n add(value, `an ErrorCustomMessageReference value — author it as \\`customMessageReference: ErrorCustomMessageReference.${key}\\``);\n add(key, `an ErrorCustomMessageReference key — author it as \\`customMessageReference: ErrorCustomMessageReference.${key}\\``);\n }\n return owners;\n})();\n\n/**\n * Refuse an `errorScenarios[].errorCode` that names a value the API sends in a DIFFERENT field of the\n * error body. `errorCode` documents `error.code`; an `ErrorType` arrives in `error.type` and an\n * `ErrorCustomMessageReference` in `error.customMessageReference`. Authored in the wrong field, the\n * reference tells a client to branch on an `error.code` it will never receive — the published\n * documentation did exactly that for 30 authored codes until the fields were separated (#1620).\n *\n * This refuses rather than marks because the artifact is untrue, and the remedy is editing it: move\n * the value to the field the message names. A code the operation genuinely throws in its error\n * context (`LAST_ORGANIZATION_OWNER`, a billing refusal code) is not either vocabulary and passes.\n */\nfunction validateResourceOperationsErrorScenarios(\n ownerLabelPrefix: string,\n operations: Record<string, ResourceOperationSpecification | undefined> | undefined,\n): void {\n for (const [operationId, operationSpec] of Object.entries(operations ?? {})) {\n for (const [index, scenario] of (operationSpec?.errorScenarios ?? []).entries()) {\n if (scenario.errorCode === undefined) continue;\n const owners = ERROR_IDENTIFIERS_OWNED_BY_OTHER_FIELDS.get(scenario.errorCode);\n if (owners !== undefined) {\n throw new Error(\n `${ownerLabelPrefix}${operationId}.errorScenarios[${index}].errorCode '${scenario.errorCode}' is ${owners.join(', or ')}. `\n + '`errorCode` documents `error.code` only, and the API never sends this value there.',\n );\n }\n }\n }\n}\n\nfunction validateResourceOperationsScheduledExecution(\n ownerLabelPrefix: string,\n operations:\n | Record<string, ResourceOperationSpecification | ResourceFrontendViewSpecification | undefined>\n | undefined,\n): void {\n if (!operations) {\n return;\n }\n for (const [operationId, operationSpec] of Object.entries(operations)) {\n if (!operationSpec) {\n continue;\n }\n validateResourceOperationScheduledExecutionSpecification(\n `${ownerLabelPrefix}${operationId}`,\n operationSpec.scheduledExecution,\n );\n }\n}\n\nexport type ResourceOperationSpecificationMap<\n TCustomOp extends EnumLikeType | undefined = any,\n TCoreOp extends Partial<CoreResourceOperation> | undefined = any,\n> = Partial<Record<ValidOperationKeys<TCustomOp, TCoreOp>, ResourceOperationSpecification>>;\n/** @wildo_source:part:end saas.specifications.resource-operation-spec */\n\nexport type ResourceSpecificationSurfacedOperationMap<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n> = Partial<Record<\n ValidOperationKeys<TCustomOp, TCoreOp>,\n {\n hasDefaultVariant: boolean;\n variantKeys: string[];\n }\n>>;\n\nexport interface ResourceFrontendOperationSurface {\n /** The operation's frontend surface — ADDRESSABLE (routed page) / EMBEDDED (non-addressable view rendered within a host) / API_ONLY (headless). */\n surface: ResourceOperationFrontendSurface;\n hasCustomView: boolean;\n /**\n * Resource-owned view refs rendered inside this operation host, computed\n * directly from the resource UI behavior's view declarations:\n *\n * - `compositeView.operationLike` / `chartView.operationLike` (single op),\n * - `executionView.surfaceInOperations` (list of `OperationKey`).\n *\n * There is no operation-level `additionalViews` authoring seam — the view\n * declaration itself is the single source of truth. Order is canonical:\n * composites first (authored map key order), then charts (authored array\n * order), then executions (authored map key order).\n */\n additionalViewRefs: string[];\n hasDisplayPresetOverride: boolean;\n hasNavigationOverrides: boolean;\n displayPriority?: number;\n hasIconOverride: boolean;\n}\n\nexport interface ResourceFrontendOperationSurfaceGroup {\n default?: ResourceFrontendOperationSurface;\n variants?: Record<string, ResourceFrontendOperationSurface>;\n}\n\nexport type ResourceFrontendOperationSurfaceMap<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n> = Partial<Record<ValidOperationKeys<TCustomOp, TCoreOp>, ResourceFrontendOperationSurfaceGroup>>;\n\n/**\n * @wildo_source:part:start saas.specifications.resource-frontend-configuration-aspect facet:layer:specification facet:family:companion\n *\n * Frontend aspect distilled from `ResourceUIBehavior` for specification / companion layers.\n */\nexport interface ResourceFrontendLabelAspect {\n strategy: 'field-paths' | 'computed';\n fieldNames?: string[];\n}\n\nexport interface ResourceFrontendLayoutAspect {\n refs?: LayoutRefManifest;\n hasDisplayTemplate: boolean;\n hasSummaryTemplate: boolean;\n hasEditTemplate: boolean;\n}\n\nexport interface ResourceFrontendConfigurationAspect<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n> {\n schema: TSchema;\n label?: ResourceFrontendLabelAspect;\n emptyState?: ResourceUIBehavior_EmptyState;\n layout?: ResourceFrontendLayoutAspect;\n guidance?: Record<string, ResourceUIBehavior_GuidanceFlow>;\n relationshipOverrides?: NonNullable<ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>['relationshipOverrides']>;\n surfacedOperations: ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp>;\n operations: ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp>;\n}\n/** @wildo_source:part:end saas.specifications.resource-frontend-configuration-aspect */\n\n// ── Frontend Specification Config ───────────────────────────────────────────\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-frontend-prose facet:layer:specification facet:family:companion\n *\n * Prose slots for resource specification `frontend` slice (label, layout, empty state, guidance, operations).\n */\nexport interface ResourceFrontendLabelSpecification {\n purpose: string;\n textSlots?: TranslationSlotSpecificationMap;\n}\n\nexport type ResourceFrontendStructuralSlotSpecification = StructuralTranslationSlotSpecification;\n\nexport interface ResourceFrontendLayoutSpecification {\n purpose?: string;\n displayPurpose?: string;\n summaryPurpose?: string;\n editPurpose?: string;\n /**\n * Intent of the resource's `layout.header` template — the record's IDENTITY\n * LINE in the READ page header (accent swatch / name / status / visibility\n * chips, in whatever order the resource composes them).\n *\n * Documented separately from `displayPurpose` because the two answer\n * different questions and, once a header template exists, must not repeat\n * each other: the header states WHICH record this is and what state it is in,\n * the display body states everything else about it.\n */\n headerPurpose?: string;\n sections?: Record<string, ResourceFrontendStructuralSlotSpecification>;\n wizardSteps?: Record<string, ResourceFrontendStructuralSlotSpecification>;\n groups?: Record<string, ResourceFrontendStructuralSlotSpecification>;\n}\n\n/**\n * The resource's EMPTY STATE — what an empty collection says under its page header.\n *\n * Authoring `purpose` is what gives the empty state a DESCRIPTION: the labelling pipeline plans\n * `resources.<type>.emptyState.description` only for a resource that authors it. Without it the empty state is\n * its title (\"No todos yet\") and the create button. That is deliberate: the line sits under a header that already\n * says what the items are and beside a button that names the action, so a description with nothing authored\n * behind it can only restate one of them (\"Create your first todo to get started.\" beside \"Create todo\").\n */\nexport interface ResourceFrontendEmptyStateSpecification {\n /**\n * Something the header does NOT say — typically the first concrete use, or when items come to appear here.\n * Example: \"Point at the first concrete use — marking that one todo cannot start until another is done.\"\n * Never the resource's purpose again, and never the create action: the button beside the line names it.\n */\n purpose: string;\n /** Documents the primary action for readers of the specification. The button is always the CREATE operation and reads its title; this names nothing on screen. */\n primaryActionPurpose?: string;\n /** Grounds the label of the empty state's secondary action (a link or guidance flow declared in the ui-behavior). */\n secondaryActionPurpose?: string;\n}\n\nexport interface ResourceFrontendGuidanceFlowSpecification {\n purpose: string;\n whenToTrigger?: string;\n textSlots?: TranslationSlotSpecificationMap;\n elements?: Record<string, {\n purpose: string;\n whenToUse?: string;\n textSlots?: TranslationSlotSpecificationMap;\n }>;\n}\n\n/**\n * Which separate view family an operation links to in addition to its main host.\n *\n * These families will later gain their own dedicated DTO registries; the\n * resource specification keeps the operation-owned linkage close to the\n * resource/runtime seam for now.\n */\nexport enum ResourceOperationOtherViewKind {\n EXECUTION = 'execution',\n CHART = 'chart',\n COMPOSITE = 'composite',\n FULL_CUSTOM = 'full-custom',\n}\n\n/**\n * Resource-owned direct host override selected through\n * `operationFrontendConfig.customView`.\n */\nexport interface ResourceOperationCustomViewSpecification {\n /** Why this direct operation host exists beyond the default resource shell. */\n purpose: string;\n /** Situations where this host override is the intended authoring choice. */\n whenToUse?: string;\n /** Meaning of the host-level translatable slots such as title and description. */\n textSlots?: TranslationSlotSpecificationMap;\n /** Optional preset/base shell that the custom view composes or extends. */\n basedOnPreset?: string;\n /** Public symbol exposing the actual custom host component. */\n implementationSymbol: CodeSymbolRef;\n /** Preferred public import surface when different from the implementation. */\n consumerFacingSymbol?: CodeSymbolRef;\n /** Public declarations where this custom view is authored/selected. */\n declarationSymbols?: CodeSymbolRef[];\n /** Extra caveats for companion/transposer layers. */\n notes?: string[];\n}\n\n/**\n * Additional non-host resource-owned views rendered inside a resource\n * operation host.\n *\n * These views are resolved by the framework directly from the resource UI\n * behavior's view declarations (`compositeViews[*].operationLike`,\n * `chartViews[*].operationLike`, `executionViews[*].surfaceInOperations`)\n * — there is no operation-level `additionalViews` authoring seam. The\n * specification layer simply mirrors, per operation, the set of resource-owned\n * views that target that operation host, for labelling/translation/authoring\n * documentation purposes.\n */\nexport interface ResourceOperationOtherViewSpecification {\n /** Stable referenced view identifier as declared by the resource UI behavior. */\n viewRef: string;\n /** Which view family owns the referenced view. */\n viewKind: ResourceOperationOtherViewKind;\n /** Why this extra linked view exists in the workflow. */\n purpose: string;\n /** Situations where the linked view should be used. */\n whenToUse?: string;\n /** Meaning of the linked-view translatable slots such as title and description. */\n textSlots?: TranslationSlotSpecificationMap;\n /** Extra caveats for companion/transposer layers. */\n notes?: string[];\n}\n\n/**\n * Operation-owned view seams layered on top of the semantic operation meaning.\n */\nexport interface ResourceOperationViewSpecification {\n /** Direct replacement host selected through `customView`, if any. */\n customView?: ResourceOperationCustomViewSpecification;\n /** Additional linked views exposed alongside the main operation host. */\n otherViews?: ResourceOperationOtherViewSpecification[];\n}\n\n/**\n * The frontend \"view\" of a single resource operation — the UI-side overlay\n * for an operation declared in `base.operations`.\n *\n * Structurally extends {@link ResourceOperationSpecification} so the same\n * intent/outcome/communications fields can be authored at this layer when\n * needed (the validators re-fire on every overlay seam — see\n * {@link resourceSpecificationFromFrontendConfiguration}). Adds variant\n * overlays and per-variant view-host configuration.\n *\n * Naming nuance: the inner `views?:` slot here is the *view-host* map (per\n * variant), distinct from the OUTER `frontend.views` map keyed by operation\n * id. Same word at two nesting levels — outer = \"views by operation\",\n * inner = \"view-hosts by variant\". Both are correct in their own right.\n */\nexport interface ResourceFrontendViewSpecification\n extends Omit<\n ResourceOperationSpecification,\n 'variants' | 'responseStatuses' | 'errorScenarios' | 'idempotent' | 'rateLimitNote' | 'examples'\n > {\n /** Variant-specific UI semantics layered under the same logical operation id. */\n variants?: ResourceFrontendViewSpecificationVariants;\n /**\n * Per-variant view-host configuration (`customView`, `otherViews`).\n * The \"view-hosts\" of this view, in other words. Naming overlap with the\n * outer `frontend.views` map is intentional — see interface JSDoc.\n */\n views?: {\n default?: ResourceOperationViewSpecification;\n variants?: Record<string, ResourceOperationViewSpecification>;\n };\n}\n\nexport type ResourceFrontendViewSpecificationMap<\n TCustomOp extends EnumLikeType | undefined = any,\n TCoreOp extends Partial<CoreResourceOperation> | undefined = any,\n> = Partial<Record<ValidOperationKeys<TCustomOp, TCoreOp>, ResourceFrontendViewSpecification>>;\n/** @wildo_source:part:end saas.specifications.resource-spec-frontend-prose */\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-frontend-config-type facet:layer:specification facet:family:companion\n *\n * Frontend-facing semantic additions layered on top of the base resource\n * specification.\n *\n * This slice is authored from a resolved `ResourceUIBehaviorConfig`, so it\n * should describe how the resource is surfaced to users, not restate structural\n * backend semantics that already live in the base specification.\n */\nexport type ResourceSpecificationFrontendConfig<\n TCustomOp extends EnumLikeType | undefined = any,\n TCoreOp extends Partial<CoreResourceOperation> | undefined = any,\n> = {\n /** Why this resource label strategy exists in surfaced UI. */\n label?: ResourceFrontendLabelSpecification;\n /** How the frontend layout organizes the resource meaning. */\n layout?: ResourceFrontendLayoutSpecification;\n /** Why the empty state is framed the way it is. */\n emptyState?: ResourceFrontendEmptyStateSpecification;\n /** Semantic intent of resource-owned guidance flows. */\n guidance?: Record<string, ResourceFrontendGuidanceFlowSpecification>;\n /**\n * Per-operation frontend overlays — the UI-side \"views\" of each domain\n * operation declared in `base.operations`.\n *\n * Keys are the same operation identifiers as `base.operations`. Each value\n * supplies frontend-specific prose (purpose, whenToUse, importance, variant\n * overlays) and view-host configuration. The base entry remains the domain\n * truth; this map says HOW that operation surfaces in the UI.\n *\n * Renamed from `operations` to `views` (April 2026): the previous name\n * suggested a duplicate domain-operations declaration, when the real intent\n * is \"the views of the operations\". The base operations map remains\n * `operations`; this UI overlay is `views`.\n *\n * Note on inner naming: each entry can declare a nested `views?:` slot that\n * holds per-variant view-host configuration (`customView`, `otherViews`).\n * The outer `views` (here) is \"views BY operation\"; the inner `views`\n * (inside each entry) is \"view-hosts BY variant\" — same word, different\n * nesting level, both correct in their own right.\n */\n views?: ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp>;\n};\n/** @wildo_source:part:end saas.specifications.resource-spec-frontend-config-type */\n\nexport interface ResourceSpecificationOperationVocabulary {\n /** Public enum exposing the framework core operation vocabulary. */\n coreEnum?: CodeSymbolRef;\n /** Public enum exposing resource-specific custom operations. */\n customEnum?: CodeSymbolRef;\n}\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-code-handling facet:layer:specification facet:family:companion\n *\n * Import-oriented references that help downstream prompt/transposition layers\n * write truthful code against this resource.\n */\nexport interface ResourceSpecificationCodeHandling {\n /** Public schema symbol that owns the resource main shape. */\n mainSchema: CodeSymbolRef;\n /** Public factory symbol that owns the resource structural contract. */\n resourceFactory?: CodeSymbolRef;\n /** Truthful locator when the resource factory lives inside a public collection export. */\n resourceFactoryCollectionEntry?: CodeCollectionEntryRef;\n /**\n * Public enum member representing this resource type.\n * Required: every resource specification identifies the same public resource\n * enum member used by its runtime factory. This lets coding and companion\n * workflows generate discriminated resource logic without guessing or\n * silently dropping the resource identity.\n */\n resourceType: CodeEnumMemberRef;\n /**\n * Public enums that define the operation identifier vocabulary.\n * Required whenever the resource has operations. Coding and companion\n * workflows use `coreEnum` / `customEnum` as the authoritative vocabulary\n * for emitted operation branches, so the declaration must be complete rather\n * than leaving the runtime to infer missing cases.\n */\n operationVocabulary: ResourceSpecificationOperationVocabulary;\n /**\n * Public frontend contribution symbols used to build the merged\n * `resourceFrontendConfiguration()` input.\n */\n frontendConfigurationSources?: CodeSymbolRef[];\n /** Truthful locators when frontend UI behavior leaves live inside public collections. */\n frontendConfigurationSourceEntries?: CodeCollectionEntryRef[];\n /** Extra caveats for downstream coding/transposition consumers. */\n notes?: string[];\n}\n/** @wildo_source:part:end saas.specifications.resource-spec-code-handling */\n\n// ── Resource Specification Config ───────────────────────────────────────────\n\n/**\n * @wildo_source:part:start saas.specifications.resource-pdf-template-spec facet:layer:specification facet:family:pdf-templates\n *\n * Companion-facing semantic projection for generated PDF file fields.\n *\n * Runtime truth lives in the shared `z_file({ generation })` metadata and the\n * backend-only `PdfTemplateDefinition` binding. `ResourcePdfTemplateSpecification`\n * documents the same boundary for app developers and companion prompts:\n * read-visible file output, no upload route, synchronous CREATE rendering,\n * no UPDATE auto-render, and explicit REGENERATE operation identity.\n */\nexport enum ResourcePdfTemplateOutputUploadRoute {\n NONE = 'none',\n}\n\nexport enum ResourcePdfTemplateCreateBehavior {\n RENDERS_SYNCHRONOUSLY = 'rendersSynchronously',\n}\n\nexport enum ResourcePdfTemplateUpdateBehavior {\n DOES_NOT_AUTO_RENDER = 'doesNotAutoRender',\n}\n\nexport enum ResourcePdfTemplateContextAvailability {\n PARENT_PAYLOAD_AND_PARENTS_ONLY = 'parentPayloadAndParentsOnly',\n PERSISTED_RECORD_AND_SUPPORTED_RELATIONSHIPS = 'persistedRecordAndSupportedRelationships',\n}\n\nexport type ResourcePdfTemplateSpecification = {\n fieldName: string;\n templateId: string;\n output: {\n mimeType: 'application/pdf';\n multiple: false;\n readVisible: true;\n writeStripped: true;\n uploadRoute: ResourcePdfTemplateOutputUploadRoute.NONE;\n };\n operations: {\n create: ResourcePdfTemplateCreateBehavior.RENDERS_SYNCHRONOUSLY;\n update: ResourcePdfTemplateUpdateBehavior.DOES_NOT_AUTO_RENDER;\n regenerateOperationIdentifier: string;\n };\n contextAvailability: {\n create: ResourcePdfTemplateContextAvailability.PARENT_PAYLOAD_AND_PARENTS_ONLY;\n regenerate: ResourcePdfTemplateContextAvailability.PERSISTED_RECORD_AND_SUPPORTED_RELATIONSHIPS;\n };\n};\n/** @wildo_source:part:end saas.specifications.resource-pdf-template-spec */\n\n/**\n * The file-export companion of one LIST/SEARCH operation, as the specification records it.\n *\n * ## Why this is its own section rather than an `operations` entry\n *\n * The companion is DERIVED — the resource factory emits it from a `collectionExport` declaration on\n * the source operation — so it has no authored identifier a spec author could key an `operations`\n * entry on, exactly like the generated-PDF regenerate operation above. What a reader needs from the\n * spec is the CONTRACT (which listing it exports, what it offers, where it routes, and what it\n * records), not a second description of the listing itself.\n *\n * The properties recorded here are the ones a consumer cannot infer from the source operation:\n * WHICH selectors are on offer, whether a ceiling exists, and that the export is audited. Everything\n * else — the roles, the filters, the sort, the tenancy — is the source operation's, by construction,\n * and duplicating it here would create a second place for it to drift.\n */\nexport type ResourceCollectionExportSpecification = {\n /** The LIST/SEARCH operation whose result set this exports; must be documented in `operations`. */\n sourceOperationId: string;\n /**\n * The route the companion answers on, relative to the source operation's own collection path —\n * `export` for a LIST, `search/export` for a SEARCH (it inherits the `search` segment its source\n * already carries, which is what keeps two companions of one resource from colliding).\n */\n routeSuffix: 'export' | 'search/export';\n /**\n * Offered wire formats, in the author's declared order — the first is the default. Typed from\n * `ResourceCollectionExportFormat`, so a format added to the engine is documentable the day it lands.\n */\n formats: readonly `${ResourceCollectionExportFormat}`[];\n /** Offered row scopes. `full_result_set` iterates pages; it never raises the source's page bound. */\n rowScopes: readonly ('visible_page' | 'full_result_set')[];\n /**\n * Match count above which a whole-result-set export is REFUSED. Absent ⇒ no ceiling.\n * The refusal is an error, never a truncated file.\n */\n maximumExportedRows?: number;\n /**\n * The template a PDF export is rendered through (#1645) — present exactly when `formats` offers\n * `pdf`, mirroring the runtime declaration.\n */\n pdfTemplateId?: string;\n /** The auditable event every export emits, carrying its row count. */\n auditEventType: 'collection_data_export';\n};\n\n/**\n * Structural validation for the documented export companions.\n *\n * Deliberately NOT a runtime cross-check against the resource configuration (the shape\n * `validateResourcePdfTemplates` performs for generated PDFs). That check earns its cost there\n * because a documented regenerate operation that runtime does not derive is a callable contract that\n * does not exist; here the companion's existence follows mechanically from a `collectionExport`\n * declaration the factory already refuses when malformed. What CAN drift, and is checked, is the\n * link between this section and the spec's own `operations` map: a documented export whose source\n * operation is undocumented describes a listing the reader cannot look up.\n */\nfunction validateResourceCollectionExports(\n prefix: string,\n collectionExports: readonly ResourceCollectionExportSpecification[] | undefined,\n documentedOperationIds: readonly string[],\n): void {\n if (!collectionExports) return;\n\n const seenSources = new Set<string>();\n for (const [index, entry] of collectionExports.entries()) {\n const entryPrefix = `${prefix}collectionExports[${index}]`;\n if (!entry.sourceOperationId?.trim()) {\n throw new Error(`${entryPrefix}.sourceOperationId must name the LIST/SEARCH operation this exports.`);\n }\n if (seenSources.has(entry.sourceOperationId)) {\n throw new Error(`${entryPrefix} documents a second export for \"${entry.sourceOperationId}\"; one operation has exactly one companion.`);\n }\n seenSources.add(entry.sourceOperationId);\n if (documentedOperationIds.length > 0 && !documentedOperationIds.includes(entry.sourceOperationId)) {\n throw new Error(\n `${entryPrefix}.sourceOperationId \"${entry.sourceOperationId}\" is not documented in this specification's operations; `\n + `an export describes a listing a reader must be able to look up.`,\n );\n }\n if (entry.formats.length === 0) {\n throw new Error(`${entryPrefix}.formats must not be empty — an export offering nothing is not an export.`);\n }\n if (entry.rowScopes.length === 0) {\n throw new Error(`${entryPrefix}.rowScopes must not be empty.`);\n }\n if (entry.maximumExportedRows !== undefined && entry.maximumExportedRows <= 0) {\n throw new Error(`${entryPrefix}.maximumExportedRows must be positive; omit it to declare no ceiling.`);\n }\n const offersPdf = entry.formats.includes(ResourceCollectionExportFormat.PDF);\n if (offersPdf !== (entry.pdfTemplateId !== undefined && entry.pdfTemplateId.trim() !== '')) {\n throw new Error(`${entryPrefix}.pdfTemplateId must be documented exactly when formats offers \"pdf\" (#1645).`);\n }\n if (offersPdf && entry.rowScopes.includes(ResourceCollectionExportRowScope.FULL_RESULT_SET) && entry.maximumExportedRows === undefined) {\n throw new Error(`${entryPrefix}.maximumExportedRows must be documented for a whole-set \"pdf\" export: a PDF is built in memory from every row (#1645).`);\n }\n }\n}\n\nfunction validateResourcePdfTemplates(\n prefix: string,\n pdfTemplates: readonly ResourcePdfTemplateSpecification[] | undefined,\n schema?: z.ZodTypeAny,\n resourceConfig?: ResourceConfigLike<any, any, any>,\n): void {\n const resourceConfigResolution = resolveResourceConfigLike(resourceConfig);\n const resolvedResourceConfig = resourceConfigResolution.config;\n const schemaGeneratedFields = collectGeneratedPdfTemplateFieldsForSpec(schema, resolvedResourceConfig);\n const arrayContainedGeneratedFields = schemaGeneratedFields.filter((field) => field.isInsideArray);\n if (arrayContainedGeneratedFields.length > 0) {\n throw new Error(`${prefix}pdfTemplates cannot document generated PDF z_file fields inside arrays or dynamic containers in v1: ${arrayContainedGeneratedFields.map((field) => field.fieldName).join(', ')}.`);\n }\n const schemaGeneratedFieldNames = new Set(schemaGeneratedFields.map((field) => field.fieldName));\n\n if (!pdfTemplates) {\n if (schemaGeneratedFields.length > 0) {\n throw new Error(`${prefix}pdfTemplates must document every generated PDF z_file field: ${schemaGeneratedFields.map((field) => field.fieldName).join(', ')}.`);\n }\n return;\n }\n\n if (resourceConfigResolution.error) {\n throw new Error(`${prefix}pdfTemplates cannot validate generated PDF runtime operations because the resource configuration factory could not be resolved: ${resourceConfigResolution.error.message}`);\n }\n\n const fieldNames = new Set<string>();\n for (const [index, entry] of pdfTemplates.entries()) {\n const entryPrefix = `${prefix}pdfTemplates[${index}]`;\n if (typeof entry.fieldName !== 'string' || entry.fieldName.trim().length === 0) {\n throw new Error(`${entryPrefix}.fieldName must be a non-empty string.`);\n }\n if (fieldNames.has(entry.fieldName)) {\n throw new Error(`${entryPrefix}.fieldName duplicates generated PDF field \"${entry.fieldName}\".`);\n }\n fieldNames.add(entry.fieldName);\n\n if (typeof entry.templateId !== 'string' || entry.templateId.trim().length === 0) {\n throw new Error(`${entryPrefix}.templateId must be a non-empty string.`);\n }\n\n const collectedField = schemaGeneratedFields.find((field) => field.fieldName === entry.fieldName);\n const fieldSchema = collectedField?.schema ?? (schema ? resolveSchemaFieldPath(schema, entry.fieldName) : undefined);\n if (schema && !fieldSchema) {\n throw new Error(`${entryPrefix}.fieldName references \"${entry.fieldName}\", but that field does not exist on the resource schema.`);\n }\n if (fieldSchema) {\n const fileMetadata = getFileMetadata(fieldSchema);\n if (!isTemplatableFileField(fieldSchema) || fileMetadata?.generation?.source !== FileGenerationSource.PDF_TEMPLATE) {\n throw new Error(`${entryPrefix}.fieldName references \"${entry.fieldName}\", but that field is not a generated PDF z_file field.`);\n }\n if (fileMetadata.generation.templateId !== entry.templateId) {\n throw new Error(`${entryPrefix}.templateId must match the z_file generation.templateId for \"${entry.fieldName}\".`);\n }\n }\n\n if (schema && !schemaGeneratedFieldNames.has(entry.fieldName)) {\n throw new Error(`${entryPrefix}.fieldName references \"${entry.fieldName}\", but that field is not a collected generated PDF z_file field on the resource schema.`);\n }\n\n if (\n entry.output?.mimeType !== 'application/pdf' ||\n entry.output.multiple !== false ||\n entry.output.readVisible !== true ||\n entry.output.writeStripped !== true ||\n entry.output.uploadRoute !== ResourcePdfTemplateOutputUploadRoute.NONE\n ) {\n throw new Error(`${entryPrefix}.output must describe a read-visible, write-stripped single PDF with no upload route.`);\n }\n\n if (\n !entry.operations ||\n entry.operations.create !== ResourcePdfTemplateCreateBehavior.RENDERS_SYNCHRONOUSLY ||\n entry.operations.update !== ResourcePdfTemplateUpdateBehavior.DOES_NOT_AUTO_RENDER ||\n typeof entry.operations.regenerateOperationIdentifier !== 'string' ||\n entry.operations.regenerateOperationIdentifier.trim().length === 0\n ) {\n throw new Error(`${entryPrefix}.operations must document synchronous CREATE rendering, no UPDATE auto-render, and a concrete regenerate operation identifier.`);\n }\n const expectedRegenerateIdentifier = Resources_SharedUtils.buildGeneratedFileRegenerateOperationIdentifier(entry.fieldName);\n if (entry.operations.regenerateOperationIdentifier !== expectedRegenerateIdentifier) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must be \"${expectedRegenerateIdentifier}\" for field \"${entry.fieldName}\".`);\n }\n validateGeneratedPdfRuntimeOperation(entryPrefix, entry, resolvedResourceConfig);\n\n if (\n !entry.contextAvailability ||\n entry.contextAvailability.create !== ResourcePdfTemplateContextAvailability.PARENT_PAYLOAD_AND_PARENTS_ONLY ||\n entry.contextAvailability.regenerate !== ResourcePdfTemplateContextAvailability.PERSISTED_RECORD_AND_SUPPORTED_RELATIONSHIPS\n ) {\n throw new Error(`${entryPrefix}.contextAvailability must document the supported CREATE and REGENERATE context shapes.`);\n }\n }\n\n const missingSchemaFields = schemaGeneratedFields\n .map((field) => field.fieldName)\n .filter((fieldName) => !fieldNames.has(fieldName));\n if (missingSchemaFields.length > 0) {\n throw new Error(`${prefix}pdfTemplates must document every generated PDF z_file field: ${missingSchemaFields.join(', ')}.`);\n }\n}\n\nfunction resolveResourceConfigLike(\n resourceConfig?: ResourceConfigLike<any, any, any>,\n): { config?: { operations?: any[] }; error?: Error } {\n if (!resourceConfig) {\n return {};\n }\n\n if (typeof resourceConfig !== 'function') {\n return { config: resourceConfig as { operations?: any[] } };\n }\n\n try {\n return { config: resourceConfig([]) as { operations?: any[] } };\n } catch (error) {\n return {\n error: error instanceof Error\n ? error\n : new Error(String(error)),\n };\n }\n}\n\nfunction collectGeneratedPdfTemplateFieldsForSpec(\n schema?: z.ZodTypeAny,\n resourceConfig?: { operations?: any[] },\n) {\n const fieldsByName = new Map<string, ReturnType<typeof collectTemplatableFileFieldPaths>[number]>();\n const addFields = (sourceSchema?: z.ZodTypeAny): void => {\n if (!sourceSchema) {\n return;\n }\n for (const field of collectTemplatableFileFieldPaths(sourceSchema)) {\n const metadata = getFileMetadata(field.schema);\n if (metadata?.generation?.source !== FileGenerationSource.PDF_TEMPLATE) {\n continue;\n }\n const existing = fieldsByName.get(field.fieldName);\n if (existing && !areGeneratedPdfFieldMetadataCompatible(existing.schema, field.schema)) {\n throw new Error(`pdfTemplates generated PDF field \"${field.fieldName}\" has incompatible z_file generation metadata across resource schemas.`);\n }\n fieldsByName.set(field.fieldName, existing\n ? { ...existing, isInsideArray: existing.isInsideArray || field.isInsideArray }\n : field);\n }\n };\n\n addFields(schema);\n\n for (const operation of resourceConfig?.operations ?? []) {\n if (operation.generatedOperation?.kind !== ResourceGeneratedOperationKind.GENERATED_FILE_REGENERATE) {\n continue;\n }\n const responseShape = getZodObjectShape(operation.responseDto);\n addFields(responseShape?.resource as z.ZodTypeAny | undefined);\n }\n\n return Array.from(fieldsByName.values()).sort((left, right) =>\n left.fieldName.localeCompare(right.fieldName)\n );\n}\n\nfunction validateGeneratedPdfRuntimeOperation(\n entryPrefix: string,\n entry: ResourcePdfTemplateSpecification,\n resourceConfig?: { operations?: any[] },\n): void {\n if (!resourceConfig || !('operations' in resourceConfig) || !Array.isArray(resourceConfig.operations)) {\n return;\n }\n\n const defaultUpdateOperation = resourceConfig.operations.find((operation) =>\n operation.operationIdentifier === CoreResourceOperation.UPDATE\n && operation.isOperationDefault === true\n && (\n operation.variantType === ResourceOperationVariantType.API_CALL\n || operation.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n )\n && operation.isBulkOperation !== true\n );\n if (!defaultUpdateOperation) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier requires the resource configuration to expose a default non-bulk URL-bearing UPDATE operation.`);\n }\n\n const regenerateOperation = resourceConfig.operations.find((operation) =>\n operation.operationIdentifier === entry.operations.regenerateOperationIdentifier\n );\n if (\n !regenerateOperation ||\n regenerateOperation.generatedOperation?.kind !== ResourceGeneratedOperationKind.GENERATED_FILE_REGENERATE ||\n regenerateOperation.generatedOperation?.fieldName !== entry.fieldName\n ) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must reference an existing generated file REGENERATE operation for \"${entry.fieldName}\".`);\n }\n\n const responseShape = getZodObjectShape(regenerateOperation.responseDto);\n if (!responseShape?.resource || !responseShape.file) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must reference a generated REGENERATE operation whose responseDto is { file, resource }.`);\n }\n // Structural shape check (NOT reference equality). The factory builds\n // `responseShape.file` with `z_file()` (a marked single file, #1959), a\n // fresh instance per resource, so there is no shared schema to compare\n // against — and even if there were, reference equality would not hold:\n // 1. The runtime DTO builder (`resources-config-operations.dtos-builder.utils.ts`,\n // \"Transform z.date() → z.coerce.date() recursively for API/WebSocket/Queue\n // DTOs.\") rewrites the schema tree before it lands on the operation —\n // the file-shaped schema reaching this validator is intentionally a\n // different object than the one the factory built.\n // 2. The dev-companion is framework code that introspects ANY app via\n // a subprocess; reference identity is not preserved across the\n // framework / app process boundary by definition. The validator must\n // verify the contract shape, not the JS reference.\n // The `SingleFileValue` contract is a Zod object with `{ fileId: string,\n // updatedAt: date }` — assert exactly that shape, ignoring `coerce` and\n // any other DTO-transform overlays that don't change the contract.\n const fileSchemaShape = getZodObjectShape(responseShape.file as z.ZodTypeAny);\n if (\n !fileSchemaShape?.fileId\n || getZodType(fileSchemaShape.fileId) !== 'string'\n || !fileSchemaShape?.updatedAt\n || getZodType(fileSchemaShape.updatedAt) !== 'date'\n ) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must reference a generated REGENERATE operation whose responseDto.file matches the SingleFileValue shape ({ fileId: string, updatedAt: date }).`);\n }\n // Structural field-presence check (NOT metadata-based detection). Cannot\n // rely on `collectGeneratedPdfTemplateFieldsForSpec` here because that\n // helper filters by `getFileMetadata().generation.source === PDF_TEMPLATE`,\n // and the WeakMap-keyed metadata bindings on the field schemas don't\n // survive the runtime DTO transform (`resources-config-operations.dtos-builder.utils.ts`)\n // that rewrites the schema tree before it lands on the operation. The\n // framework validator runs against the post-transform schema and so must\n // assert by NAME — the contract is \"responseDto.resource carries a field\n // named `${entry.fieldName}`\", which is checkable without metadata.\n // The runtime DTO transform may wrap the resource sub-schema (e.g. in a\n // `z.pipe(...)` for date coercion), so a direct `getZodObjectShape` call\n // returns an empty shape. Unwrap repeatedly until we hit a shape-bearing\n // object — the field-presence check needs the underlying object schema's\n // top-level keys.\n if (!resourceContainsFieldName(responseShape.resource as z.ZodTypeAny, entry.fieldName)) {\n throw new Error(`${entryPrefix}.operations.regenerateOperationIdentifier must reference a generated REGENERATE operation whose responseDto.resource includes \"${entry.fieldName}\".`);\n }\n}\n\n/**\n * Recursively walk a Zod schema (handling `pipe`, `optional`, `nullable`,\n * `default`, decorator wrappers, `intersection`, and `union` discriminated /\n * untagged variants) to determine whether ANY object branch declares a\n * top-level field with the given name.\n *\n * Mirrors the traversal in `collectTemplatableFileFieldPaths` (engine/saas-models/.../\n * templatable-file-fields.shared.utils.ts) so the validator's structural\n * check follows the same schema-tree shape as the original metadata-based\n * detection. The original detection filtered by `getFileMetadata().generation.source`,\n * which is a WeakMap-keyed binding that the runtime DTO transform\n * (`z.date()` → `z.coerce.date()` rewrite that lifts schemas into pipes /\n * synthesizes new union variants) doesn't preserve. The validator therefore\n * asserts by NAME across all object branches — name presence is the\n * structural contract that survives the transform.\n */\nfunction resourceContainsFieldName(schema: z.ZodTypeAny, fieldName: string): boolean {\n const seen = new WeakSet<object>();\n function walk(node: z.ZodTypeAny | undefined): boolean {\n if (!node || typeof node !== 'object' || seen.has(node)) return false;\n seen.add(node);\n\n const shape = getZodObjectShape(node);\n if (shape[fieldName]) return true;\n\n const rawType = getZodType(node);\n if (rawType === 'pipe') {\n const inSchema = getZodDefSchemaProperty(node, 'in');\n const outSchema = getZodDefSchemaProperty(node, 'out');\n return walk(outSchema) || walk(inSchema);\n }\n if (rawType === 'union') {\n const options = getZodDefArrayProperty(node, 'options') as z.ZodTypeAny[] | undefined;\n return (options ?? []).some(walk);\n }\n if (rawType === 'intersection') {\n return walk(getZodDefSchemaProperty(node, 'left'))\n || walk(getZodDefSchemaProperty(node, 'right'));\n }\n const innerType = getZodDefSchemaProperty(node, 'innerType');\n if (innerType) return walk(innerType);\n const unwrapped = unwrapSchema(node);\n if (unwrapped !== node) return walk(unwrapped);\n return false;\n }\n return walk(schema);\n}\n\nfunction normalizeMetadataForComparison(value: unknown): unknown {\n if (Array.isArray(value)) {\n return value.map(normalizeMetadataForComparison);\n }\n\n if (value && typeof value === 'object') {\n return Object.fromEntries(\n Object.entries(value as Record<string, unknown>)\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([key, childValue]) => [key, normalizeMetadataForComparison(childValue)]),\n );\n }\n\n return value;\n}\n\nfunction areGeneratedPdfFieldMetadataCompatible(\n leftSchema: z.ZodTypeAny,\n rightSchema: z.ZodTypeAny,\n): boolean {\n return JSON.stringify(normalizeMetadataForComparison(getFileMetadata(leftSchema)))\n === JSON.stringify(normalizeMetadataForComparison(getFileMetadata(rightSchema)));\n}\n\nfunction resolveSchemaFieldPath(\n schema: z.ZodTypeAny,\n fieldPath: string,\n): z.ZodTypeAny | undefined {\n const segments = fieldPath.split('.').filter(Boolean);\n return resolveSchemaFieldPathSegments(schema, segments, new WeakSet<z.ZodTypeAny>());\n}\n\nfunction resolveSchemaFieldPathSegments(\n schema: z.ZodTypeAny | undefined,\n segments: string[],\n activeSchemas: WeakSet<z.ZodTypeAny>,\n): z.ZodTypeAny | undefined {\n if (!schema) {\n return undefined;\n }\n if (segments.length === 0) {\n return schema;\n }\n if (activeSchemas.has(schema)) {\n return undefined;\n }\n\n activeSchemas.add(schema);\n try {\n const schemaType = getZodType(schema);\n if (schemaType === 'lazy') {\n const lazyGetter = getZodDef(schema)?.getter;\n if (typeof lazyGetter !== 'function') {\n return undefined;\n }\n return resolveSchemaFieldPathSegments(lazyGetter() as z.ZodTypeAny, segments, activeSchemas);\n }\n\n if (schemaType === 'intersection') {\n const leftSchema = getZodDefSchemaProperty(schema, 'left');\n const rightSchema = getZodDefSchemaProperty(schema, 'right');\n return resolveSchemaFieldPathSegments(leftSchema, segments, activeSchemas)\n ?? resolveSchemaFieldPathSegments(rightSchema, segments, activeSchemas);\n }\n\n if (schemaType === 'union') {\n const options = (getZodDefArrayProperty(schema, 'options') as z.ZodTypeAny[] | undefined) ?? [];\n for (const option of options) {\n const resolved = resolveSchemaFieldPathSegments(option, segments, activeSchemas);\n if (resolved) {\n return resolved;\n }\n }\n return undefined;\n }\n\n if (schemaType === 'pipe') {\n const inSchema = getZodDefSchemaProperty(schema, 'in');\n const outSchema = getZodDefSchemaProperty(schema, 'out');\n return resolveSchemaFieldPathSegments(outSchema, segments, activeSchemas)\n ?? resolveSchemaFieldPathSegments(inSchema, segments, activeSchemas);\n }\n\n const unwrapped = unwrapSchema(schema);\n if (unwrapped !== schema) {\n return resolveSchemaFieldPathSegments(unwrapped, segments, activeSchemas);\n }\n\n const [segment, ...rest] = segments;\n const shape = getZodObjectShape(unwrapped);\n return resolveSchemaFieldPathSegments(shape?.[segment] as z.ZodTypeAny | undefined, rest, activeSchemas);\n } finally {\n activeSchemas.delete(schema);\n }\n}\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-config facet:layer:specification facet:family:companion\n *\n * Callback parameter type for `resourceSpecification()`.\n *\n * Mirrors `ResourceUIBehaviorCallbackParams` — the factory resolves the schema\n * shape so that `{primitive}Spec()` decorators can be called with type safety.\n */\nexport type ResourceSpecificationCallbackParams<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n> = {\n /** The raw Zod schema (e.g., `TodoSchema`). */\n schema: TSchema;\n /** Pre-resolved shape — each key is a schema field ready for decorator chaining. */\n schemaShape: ObjectShape<TSchema>;\n};\n\n/**\n * Return type of the base `resourceSpecification()` callback.\n *\n * Resource-level prose lives here alongside the per-field decorator container.\n * The `fields` property works identically to `ResourceUIBehaviorConfig.fields`:\n * calling `{primitive}Spec()` on a shape field mutates its metadata in place;\n * the property itself exists for type safety and declaration.\n *\n * **Validator-entry contract — read this before constructing this object\n * directly (M5-9).** The cross-cutting fail-closed validators that protect\n * spec → runtime parity (`validateResourceOperationsCommunications`,\n * `validateResourceOperationsScheduledExecution`, and the per-delivery,\n * per-slot, per-field assertions they fan out to) ONLY fire from inside\n * the two authoring factories:\n *\n * 1. {@link resourceSpecification} — runs the validators on\n * `config.operations` and `config.frontend?.views` after the\n * callback returns.\n * 2. {@link resourceSpecificationFromFrontendConfiguration} — runs the\n * validators on `base.operations`, `base.frontend?.views`, and the\n * callback's `frontend.views` (the `base` revalidation forecloses\n * a hand-built-base regression silently bypassing the contract).\n *\n * If a future caller constructs a `ResourceSpecificationConfig` literal\n * by hand and exports it WITHOUT routing it through one of those two\n * factories, NONE of the per-delivery / per-slot / per-channel uniqueness\n * / system-email cross-link / m2m runtime-identity / M2MNotificationLevel\n * enum-membership / scheduledExecution custom-batch cross-link checks\n * will run — the spec would compile and ship, and the dispatch-side\n * contract violations would only surface as runtime errors at companion\n * render time or, worse, at user-facing dispatch time. Always author via\n * the two factories above; treat this type as the factory return shape,\n * not as a raw spec authoring surface.\n */\nexport type ResourceSpecificationConfig<\n TCustomOp extends EnumLikeType | undefined = any,\n TCoreOp extends Partial<CoreResourceOperation> | undefined = any,\n TSchema extends z.ZodTypeAny = z.ZodAny,\n> = {\n /** Why this resource exists in the domain. */\n purpose: string;\n /** Functional role played by the resource inside the business architecture. */\n businessRole: string;\n /** How the resource evolves over time (lifecycle semantics). */\n lifecycleRole?: string;\n /**\n * Which part of the product this resource belongs to, WITHIN its owner.\n *\n * A second grouping axis under the one that already exists. An application's resources are grouped\n * by the module that registers them; the engine's are grouped by nothing, so every surface that\n * has to present them — the domain-model graph, `wildo context`, generated documentation, an\n * application-creation playbook — meets one flat set of 85 and either shows it undifferentiated or\n * invents a grouping of its own and drifts from the next surface that does the same.\n *\n * Typed `string` and OPEN on purpose. The engine's values are a closed vocabulary with a named\n * runtime source, {@link EngineResourceSubDomain} in this package's `engine` surface, and engine\n * specs must use it. An application's sub-domains are its own — this repository cannot enumerate\n * a vocabulary it does not own, and a union that tried would refuse every real application.\n *\n * Optional, and its absence means exactly \"unclassified\" rather than \"belongs to a default\". A\n * consumer grouping by it must carry a bucket for that and say so; silently folding unclassified\n * rows into a real group is how a grouping starts lying.\n *\n * Distinct from {@link ResourceSpecificationConfig.resourcePrimaryScope}, which answers WHO a row\n * belongs to. This answers what it is ABOUT, and one sub-domain spans several scopes.\n */\n subDomain?: string;\n /**\n * Intended READER of this resource's generated labels — the register the label\n * generator should adopt: {@link LabelAudience.END_USER} for consumer surfaces\n * (todos, lists, profile), {@link LabelAudience.ADMIN} for operator /\n * back-office resources (users, organizations, billing, roles, audit),\n * {@link LabelAudience.DEVELOPER} for integration / technical resources (API\n * keys, webhooks, M2M, SCIM/SIEM). An operation may override it per-operation\n * via {@link ResourceOperationVariantSpecification.audienceOverride}.\n *\n * **Required.** Every resource spec must declare its audience so the label\n * generator picks the correct register (product copy vs operator console vs\n * technical / integration voice) without guessing from field names. The\n * labelling projector still keeps an end-user-normalizing fallback for the\n * rare hand-built config paths that bypass the authoring factories, but the\n * type contract now forces authors to make the choice explicitly.\n */\n audience: LabelAudience;\n /**\n * The resource's primary scope — **factory-set, never author-set**.\n *\n * The specification author declares scope via the fourth `options` argument\n * to {@link resourceSpecification}; the factory writes that resolved scope\n * here so downstream consumers, including\n * {@link resourceSpecificationFromFrontendConfiguration}'s re-validation\n * passes, can read it from `base.resourcePrimaryScope`.\n *\n * Optional only as a soft-fail concession to hand-built spec configs\n * that bypass both authoring factories — those paths intentionally\n * forfeit the m2m channel × scope cross-check on the re-validation\n * seams. Every spec produced by either factory carries this field.\n *\n * There is no local drift check between this declared value and the\n * registry-assembled `resourcePrimaryScope`: this layer cannot observe the\n * real `ResourceRelationship[]` needed to make that comparison. The\n * registry/companion assembly layer performs that cross-check when both\n * signals are available.\n */\n resourcePrimaryScope?: ResourcePrimaryScope;\n /**\n * The resource's PIPELINE, described from its `externalDataPipeline` declaration (#1685) — where the rows come from,\n * which rows, and what writes each local field, declared expressions included. An OUTBOUND pipeline (#1690) is\n * described the other way round: `direction`, the verbs it `sends`, and each local field sent to a remote field.\n *\n * DERIVED, never authored: `resourceSpecification()` refuses a callback that returns it, and attaches it itself\n * when it can materialize the resource configuration — that is, when the spec supplies `resourceRelationships`\n * (the preferred path). The companion's specification projection derives the same description from the\n * configuration it holds, so a spec on the explicit-scope path still has it there. A description typed by hand is\n * a second copy of the declaration, and the second copy is the one that drifts.\n */\n externalDataPipeline?: ExternalDataPipelineDescription;\n /** Public-import-oriented metadata for downstream code-handling prompts. */\n codeHandling?: ResourceSpecificationCodeHandling;\n\n /**\n * Per-field specification decorators for the resource's `mainSchema`.\n *\n * Keys are field names of `TMainSchema`; values are decorated Zod schemas\n * from the same shape (e.g., `shape.status.enumSpec({ ... })`).\n *\n * The merge happens at **module evaluation time** — calling `.enumSpec()`\n * on a shape field mutates its metadata in place. The `fields` property\n * exists primarily for type safety (`keyof ObjectShape<TMainSchema>`) and\n * as a declaration container — same semantics as `ResourceUIBehavior.fields`.\n */\n fields?: {\n [K in keyof ObjectShape<TSchema>]?: ObjectShape<TSchema>[K];\n };\n /**\n * Explicit field metadata entries that do not live on `mainSchema`.\n *\n * Use this for inherited/variant-only fields or any companion-facing field\n * semantics that should not depend on cross-package schema singleton sharing.\n */\n additionalFieldSpecs?: ExtractedFieldSpec[];\n\n /** Semantic clarification for operations. */\n operations?: ResourceOperationSpecificationMap<TCustomOp, TCoreOp>;\n /** Generated PDF field semantics exposed to companion/spec consumers. */\n pdfTemplates?: ResourcePdfTemplateSpecification[];\n /** File-export companions derived from LIST/SEARCH `collectionExport` declarations. */\n collectionExports?: ResourceCollectionExportSpecification[];\n /** Frontend-facing semantic layer derived from UI behavior leaves. */\n frontend?: ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp>;\n /** Domain caveats not encoded structurally elsewhere. */\n businessConstraints?: string[];\n};\n\nexport type AnyResourceSpecificationConfig = ResourceSpecificationConfig<any, any, any>;\n\n/**\n * Resource specification overlay — keyed by resource type.\n * Same structural pattern as `ResourceUIBehavior = Record<string, ResourceUIBehaviorConfig>`.\n */\nexport type ResourceSpecification = Record<string, AnyResourceSpecificationConfig>;\n/** @wildo_source:part:end saas.specifications.resource-spec-config */\n\nexport type ResourceSpecificationFromFrontendConfigurationCallbackParams<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n> = {\n /** Resolved base resource specification to enrich. */\n base: ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>;\n /** Merged frontend configuration aspect used as the semantic source. */\n frontendConfiguration: ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema>;\n /** Schema recovered from the UI behavior leaf for typed field access if needed. */\n schema: TSchema;\n /** Pre-resolved schema shape for decorator-aware field access. */\n schemaShape: ObjectShape<TSchema>;\n /**\n * Frontend-exposed operation inventory derived from the UI behavior `views` map.\n *\n * This keeps the UI-derived specification honest: callers can see which\n * operations are actually surfaced and which named variants are present.\n */\n surfacedOperations: ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp>;\n};\n\nexport type ResourceSpecificationFromFrontendConfigurationOptions<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n> = {\n /**\n * Runtime resource configuration used to validate generated PDF operations.\n *\n * The base `resourceSpecification(...)` call validates this when it owns the\n * authored spec. The frontend wrapper also accepts hand-built bases, so any\n * base carrying `pdfTemplates` must provide the same runtime config here\n * rather than silently skipping generated-operation checks.\n */\n resourceConfig?: ResourceConfigLike<TCustomOp, TCoreOp, TSchema>;\n};\n\n\n// ── Factory Function ────────────────────────────────────────────────────────\n\n/**\n * Options object accepted by {@link resourceSpecification}. Exactly ONE of\n * `resourceRelationships` or `resourcePrimaryScope` must be supplied — the\n * spec layer needs at least one signal to validate scope-driven concerns\n * (m2m channel × scope cross-check, generated PDF runtime operations).\n *\n * **`resourceRelationships` is the preferred path** when the spec layer can\n * import the registry (e.g. `wonder-todos/specifications` already depends on\n * `@wonder-todos/shared-lib`). The framework calls `_factory(rels)` once,\n * derives `resourcePrimaryScope` from the same `isPrimaryScope: true` rel\n * the runtime uses, and threads the resolved config into the pdfTemplates\n * validator — eliminating the redundant explicit declaration.\n *\n * **`resourcePrimaryScope` remains for spec sites that genuinely cannot see\n * the registry** (engine-internal specs that ship without a workspace dep on\n * the consuming app's shared-lib). When supplied alone, the validator falls\n * back to `_factory([])`, which works for self-anchoring resources\n * (USERS / ORGANIZATIONS / APPLICATION / ANONYMOUS_USERS) and any resource\n * that doesn't author `pdfTemplates`.\n */\nexport type ResourceSpecificationOptions = {\n /**\n * Registry-resolved relationships for this resource. When supplied,\n * `resourcePrimaryScope` is derived from the registry signal\n * (`isPrimaryScope: true` rel) — the spec does NOT need to redeclare it.\n *\n * The framework calls `_factory(resourceRelationships)` once and uses the\n * resolved config for both scope derivation AND the pdfTemplates validator\n * (which would otherwise crash on `_factory([])` for any resource that\n * needs a registry rel for its primary scope).\n *\n * Import the rels from the consuming module's registry contribution, e.g.:\n * `import { moduleResourcesRelationships } from '@wonder-todos/shared-lib';`\n */\n resourceRelationships?: readonly ResourceRelationship[];\n /**\n * The resource's primary scope. Required when `resourceRelationships` is\n * not supplied; redundant (and ignored — the registry-derived value wins)\n * when both are supplied.\n *\n * **Why explicit and not derived.** Phase 4 attempted to derive this\n * value at the spec layer by invoking the resource configuration factory\n * with an empty relationships array (`_factory([])`) and reading\n * `resourcePrimaryScope` off the returned config. That approach was a\n * mis-implementation: the spec layer has no access to the real\n * cross-resource `ResourceRelationship[]` (those are wired in the\n * registry at assembly time), so `_factory([])` produces a degenerate\n * configuration whose primary-scope falls through to the\n * `ORGANIZATIONS` default branch in\n * `resources-config.shared.factory.ts` for every non-self-anchor\n * resource. The \"derived\" value was therefore not the real scope but\n * the factory's empty-input fallback — meaningless for any resource\n * whose true scope is `APPLICATION`, `USER_SELF`, or `ANONYMOUS`.\n *\n * Step 2 makes the declaration the single source of truth at the spec\n * layer and removes the broken extractor entirely. The genuine\n * cross-check between this declared value and the registry-derived\n * `resourcePrimaryScope` (the one produced by the factory when invoked\n * with the real relationships) is the responsibility of the\n * registry/companion assembly layer, where both signals exist in the\n * same scope. See the Phase 4.5 plan, Step 2.5 (post-factory cross-\n * check) for the follow-up that wires that comparison in the right\n * place.\n *\n * Until the post-factory cross-check lands, the safety net is:\n * - TypeScript enforces presence of this field on every\n * `resourceSpecification(...)` call site, so a new resource cannot\n * ship without an explicit scope declaration.\n * - The m2m channel × scope cross-check (D1b) inside\n * `validateResourceOperationCommunicationsSpecification` always runs\n * with this declared value, so authoring errors like\n * `WEBHOOK_ORGANIZATION` on a `USER_SELF`-scoped resource fail loudly\n * at module load.\n *\n * Use the matching `ResourcePrimaryScope` enum member from\n * `@wildo-ai/saas-models`:\n * - `ResourcePrimaryScope.ORGANIZATIONS` — multi-tenant resources owned\n * by an organization (most common)\n * - `ResourcePrimaryScope.USERS` — resources scoped to a user identity\n * (the `users` resource itself)\n * - `ResourcePrimaryScope.USER_SELF` — self-service resources owned by\n * the acting user (profiles, preferences)\n * - `ResourcePrimaryScope.APPLICATION` — application-wide resources not\n * bound to an organization or user (audit logs, job executions)\n * - `ResourcePrimaryScope.ANONYMOUS` — pre-auth / anonymous-session\n * resources\n */\n resourcePrimaryScope?: ResourcePrimaryScope;\n};\n\n/**\n * Resolve the scope signal and the resource-config form used by\n * `validateResourcePdfTemplates`, honouring whichever option the spec\n * author supplied.\n *\n * Behaviour:\n * - When `options.resourceRelationships` is supplied, materialize the\n * config once with real registry rels. Take scope from the resolved\n * config (registry-derived, single source of truth). Pass the resolved\n * config object — NOT the bare factory — to the validator so it doesn't\n * re-invoke `_factory([])` and trigger the missing-scope throw.\n * - Otherwise, fall back to `options.resourcePrimaryScope` (legacy path).\n * The validator falls back to `_factory` and calls it with `[]`; this\n * only succeeds for self-anchoring resources or for specs that do not\n * author `pdfTemplates`.\n * - When neither option is supplied, throw at module-load time so the\n * author sees the missing wiring at the call site.\n *\n * Cross-check: when both signals are supplied, the registry-derived scope\n * wins and a mismatched `resourcePrimaryScope` is reported as a fail-loud\n * drift error (the registry IS the runtime truth).\n */\nfunction resolveScopeAndValidatorConfig<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n _factory: ResourceConfigLike<TCustomOp, TCoreOp, TSchema>,\n options: ResourceSpecificationOptions,\n): {\n declaredScope: ResourcePrimaryScope | undefined;\n validatorResourceConfig: ResourceConfigLike<TCustomOp, TCoreOp, TSchema> | undefined;\n} {\n if (options.resourceRelationships !== undefined) {\n if (typeof _factory !== 'function') {\n throw new Error(\n 'resourceSpecification(): `options.resourceRelationships` requires the `_factory` argument to be a function — pass the `*_ResourceConfiguration_InitializationFactory` directly, not a pre-built config object.',\n );\n }\n const resolvedConfig = _factory(options.resourceRelationships as ResourceRelationship[]) as {\n resourcePrimaryScope?: ResourcePrimaryScope;\n };\n const registryDerivedScope = resolvedConfig.resourcePrimaryScope;\n if (registryDerivedScope === undefined) {\n throw new Error(\n 'resourceSpecification(): the resource configuration factory did not produce a `resourcePrimaryScope` even when invoked with the supplied registry relationships. Verify the rels include the `isPrimaryScope: true` parent relationship for this resource.',\n );\n }\n if (\n options.resourcePrimaryScope !== undefined\n && options.resourcePrimaryScope !== registryDerivedScope\n ) {\n throw new Error(\n `resourceSpecification(): declared resourcePrimaryScope \"${options.resourcePrimaryScope}\" disagrees with the registry-derived scope \"${registryDerivedScope}\". Drop the explicit declaration so the registry remains the single source of truth.`,\n );\n }\n return {\n declaredScope: registryDerivedScope,\n validatorResourceConfig: resolvedConfig as ResourceConfigLike<TCustomOp, TCoreOp, TSchema>,\n };\n }\n\n if (options.resourcePrimaryScope === undefined) {\n throw new Error(\n 'resourceSpecification(): `options` must supply either `resourceRelationships` (preferred — registry-derived scope) or `resourcePrimaryScope` (explicit declaration). See `ResourceSpecificationOptions`.',\n );\n }\n\n return {\n declaredScope: options.resourcePrimaryScope,\n validatorResourceConfig: _factory,\n };\n}\n\n/**\n * @wildo_source:part:start saas.specifications.resource-spec-factory facet:layer:specification facet:family:companion\n *\n * Type-safe factory for authoring a `ResourceSpecificationConfig`.\n *\n * Mirrors `resourceUIBehavior()` — the `_factory` parameter is for type\n * inference only and is never invoked by the spec layer. The schema is\n * used to resolve `ObjectShape` so that `{primitive}Spec()` decorators\n * are type-checked against real fields.\n *\n * The callback runs immediately at module evaluation time. In the companion\n * context (where specifications are imported), this attaches `{primitive}Spec`\n * metadata to the schema's `customFieldMetadata`. In the frontend context\n * (where specifications are never imported), this code never runs, so no\n * semantic prose ends up in the browser bundle.\n *\n * **Explicit scope declaration.** The fourth `options` argument carries an\n * explicit `resourcePrimaryScope`. TypeScript enforces its presence at compile\n * time, so every specification call site declares scope.\n * That declared value is then:\n *\n * 1. Threaded into every `validateResourceOperationsCommunications` call\n * so the M2M channel × scope cross-check fires end-to-end on\n * every operation block, including the re-validation paths inside\n * {@link resourceSpecificationFromFrontendConfiguration}.\n * 2. Folded into the returned config (`resourcePrimaryScope` field) so\n * the frontend-config sibling can read it from `base`, preserving scope\n * context across the base → frontend handoff.\n *\n * **No local drift-check.** Calling a resource configuration factory with an\n * empty relationships array produces its empty-input fallback, not the real\n * scope for `APPLICATION`, `USER_SELF` or `ANONYMOUS` resources. This layer\n * therefore lacks the real `ResourceRelationship[]` inputs required for a\n * meaningful comparison and must not manufacture one.\n *\n * The genuine cross-check between this declared scope and the registry-\n * assembled scope happens at the registry/companion assembly layer, where\n * both signals coexist.\n *\n * @param _factory - The resource configuration factory (function form) or\n * a pre-built configuration object. Used purely for TypeScript inference\n * of `TCustomOp` / `TCoreOp` / `TSchema` for most validation. PDF-template\n * operation validation does materialize this factory with an empty\n * relationships array to inspect generated regenerate operations; that check\n * is limited to operation shape and must not be used as a registry-scope\n * drift signal.\n * @param schema - The resource's main Zod schema.\n * @param configFactory - Callback producing the specification content.\n * @param options - REQUIRED: declares the resource's `resourcePrimaryScope`.\n * See {@link ResourceSpecificationOptions} for the rationale.\n *\n * @example\n * ```ts\n * export const todosSpec = resourceSpecification(\n * todosFactory, TodoSchema,\n * ({ schemaShape }) => ({\n * purpose: 'Central entity for task tracking',\n * businessRole: 'Primary work item',\n * fields: {\n * status: schemaShape.status.enumSpec({\n * meaning: 'Current lifecycle state',\n * values: { pending: { meaning: 'Created but not started' } },\n * }),\n * },\n * operations: {\n * create: {\n * purpose: 'Create a new work item.',\n * },\n * },\n * }),\n * { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n * );\n * ```\n */\nexport function resourceSpecification<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n _factory: ResourceConfigLike<TCustomOp, TCoreOp, TSchema>,\n schema: TSchema,\n configFactory: (\n params: ResourceSpecificationCallbackParams<TCustomOp, TCoreOp, TSchema>,\n ) => ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>,\n options: ResourceSpecificationOptions,\n): ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema> {\n const schemaShape = (\n schema && 'shape' in schema\n ? (schema as unknown as z.ZodObject<any>).shape\n : getZodObjectShape(schema)\n ) as ObjectShape<TSchema>;\n\n const config = configFactory({ schema, schemaShape });\n if (config.externalDataPipeline !== undefined) {\n throw new Error(\n 'resourceSpecification(): `externalDataPipeline` is DERIVED from the resource configuration\\'s pipeline declaration and cannot be authored. '\n + 'Remove it from the specification; supply `resourceRelationships` in the options and the description is attached from the declaration itself.',\n );\n }\n\n // Resolve scope and the runtime config used by the pdfTemplates validator\n // from whichever signal the spec author supplied. `resourceRelationships`\n // is the preferred path — it materializes the resource configuration once\n // with the real registry rels, so scope derives from the same\n // `isPrimaryScope: true` signal the runtime uses, AND the validator gets\n // a pre-resolved config (avoiding the failing `_factory([])` call for\n // resources whose primary scope comes from a parent rel).\n const { declaredScope, validatorResourceConfig } = resolveScopeAndValidatorConfig(\n _factory,\n options,\n );\n\n validateResourceOperationsCommunications(\n 'operations.',\n config.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n declaredScope,\n );\n validateResourceOperationsCommunications(\n 'frontend.views.',\n config.frontend?.views as Record<string, ResourceFrontendViewSpecification | undefined> | undefined,\n declaredScope,\n );\n validateResourceOperationsScheduledExecution(\n 'operations.',\n config.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n );\n validateResourceOperationsErrorScenarios(\n 'operations.',\n config.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n );\n validateResourceOperationsScheduledExecution(\n 'frontend.views.',\n config.frontend?.views as Record<string, ResourceFrontendViewSpecification | undefined> | undefined,\n );\n validateResourcePdfTemplates('', config.pdfTemplates, schema, validatorResourceConfig);\n validateResourceCollectionExports('', config.collectionExports, Object.keys(config.operations ?? {}));\n\n // Fail-closed shape validator for `fields` /\n // `additionalFieldSpecs`. Runs at module-load time so authors see\n // structural mistakes (`meaning` blank, `enumDeclaration` missing,\n // `arraySpec.elementMeaning` blank, ENUM-element array missing\n // `elementType.enumDeclaration`, etc.) at the call site rather than\n // inside a downstream rendered prompt. Registry-presence for\n // `foreignKeySpec` is intentionally NOT checked here — `_core` does\n // not see `ResourceRelationship[]`; the companion-level completeness\n // validator owns that cross-check.\n //\n // The resource-type hint in the prefix comes from `_factory` (either\n // the function's `name` stripped of the `_ResourceConfiguration_\n // InitializationFactory` suffix, or — for rare object-form factories —\n // the `resourceType` slot directly). Best-effort: when the hint cannot\n // be derived, the prefix falls back to the bare `resourceSpecification():`\n // label, matching the pre-hint behaviour.\n const resourceTypeHint = extractResourceTypeHintFromFactory(_factory);\n const fieldShapesPrefix = resourceTypeHint.length > 0\n ? `resourceSpecification(${resourceTypeHint}): `\n : 'resourceSpecification(): ';\n validateFieldShapes(fieldShapesPrefix, {\n fields: config.fields as Record<string, z.ZodTypeAny> | undefined,\n additionalFieldSpecs: config.additionalFieldSpecs,\n });\n\n // Attach the resolved scope so the frontend-config sibling\n // (`resourceSpecificationFromFrontendConfiguration`) can read it from\n // `base.resourcePrimaryScope` and thread it into its own re-validation\n // passes without losing base → frontend scope context.\n // #1685 — the pipeline, described from the declaration the configuration actually carries. Only a MATERIALIZED\n // configuration has one: on the explicit-scope path `validatorResourceConfig` is the factory itself, never called.\n const pipelineDeclaration = typeof validatorResourceConfig === 'object' && validatorResourceConfig !== null\n ? (validatorResourceConfig as { externalDataPipeline?: ExternalDataPipelineDeclaration }).externalDataPipeline\n : undefined;\n\n return {\n ...config,\n resourcePrimaryScope: declaredScope,\n ...(pipelineDeclaration === undefined ? {} : { externalDataPipeline: describeExternalDataPipeline(pipelineDeclaration) }),\n } as ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>;\n}\n/** @wildo_source:part:end saas.specifications.resource-spec-factory */\n\n/**\n * Build the specification-oriented frontend source from one merged\n * `ResourceUIBehaviorConfig`.\n *\n * This is the bridge between frontend ownership and specifications: the UI\n * author keeps declaring real frontend config in `resourceUIBehavior(...)`,\n * while specifications consume a distilled aspect shaped for semantic prose.\n */\nexport function resourceFrontendConfiguration<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n uiBehavior: ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>,\n): ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema> {\n const schema = (uiBehavior as unknown as Record<typeof FRONTEND_SCHEMA_KEY, TSchema>)[FRONTEND_SCHEMA_KEY];\n if (schema === undefined) {\n throw new Error('resourceFrontendConfiguration() requires a UI behavior created by resourceUIBehavior() or resourceUIBehaviorFrom().');\n }\n\n return {\n schema,\n label: resolveFrontendLabelAspect(uiBehavior.getFrontendResourceLabel),\n emptyState: uiBehavior.emptyState,\n layout: resolveFrontendLayoutAspect(uiBehavior),\n guidance: indexGuidanceByRef(uiBehavior.guidance),\n relationshipOverrides: uiBehavior.relationshipOverrides,\n surfacedOperations: buildSurfacedOperationMap(uiBehavior),\n operations: buildFrontendOperationSurfaceMap(uiBehavior),\n };\n}\n\n/**\n * Merge several frontend configuration aspects into the single semantic source\n * used by a resource specification.\n *\n * The merge is cumulative where the frontend model is additive (sections,\n * guidance flows, surfaced operation variants) and last-write-wins where the\n * frontend model is override-based (label strategy, empty state field values,\n * individual relationship override entries).\n */\nexport function mergeResourceFrontendConfigurations<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n ...configs: Array<ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema>>\n): ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema> {\n if (configs.length === 0) {\n throw new Error('mergeResourceFrontendConfigurations() requires at least one frontend configuration.');\n }\n\n return configs.reduce((merged, incoming) => {\n ensureCompatibleFrontendConfigurationSchemas(merged.schema, incoming.schema);\n\n return {\n schema: incoming.schema,\n label: incoming.label ?? merged.label,\n emptyState: mergeEmptyStateAspect(merged.emptyState, incoming.emptyState),\n layout: mergeFrontendLayoutAspect(merged.layout, incoming.layout),\n guidance: mergeGuidanceAspect(merged.guidance, incoming.guidance),\n relationshipOverrides: mergeRelationshipOverrides(\n merged.relationshipOverrides,\n incoming.relationshipOverrides,\n ),\n surfacedOperations: mergeSurfacedOperationMaps(\n merged.surfacedOperations,\n incoming.surfacedOperations,\n ) ?? {},\n operations: mergeFrontendOperationSurfaceMaps(\n merged.operations,\n incoming.operations,\n ) ?? {},\n };\n });\n}\n\n/**\n * Adds a frontend-specific semantic layer to an existing base resource\n * specification using a merged frontend configuration aspect.\n *\n * **Phase 4.5 Step 2 — F-2 fold-in.** The `base.resourcePrimaryScope`\n * threaded by {@link resourceSpecification} is now read here and passed\n * into every `validateResourceOperationsCommunications` re-validation\n * pass — including the defensive `base.operations` and\n * `base.frontend.views` passes. Phase 4 silently dropped the scope\n * across this boundary, which meant the m2m channel × scope cross-check\n * (D1b) only fired on the original factory call and not on the\n * re-validated frontend slice. With the scope threaded through, every\n * authored m2m block is checked against the same scope contract end to\n * end. Hand-built `base` configs that lack `resourcePrimaryScope` still\n * soft-skip the cross-check on the re-validation paths (those callers\n * forfeit the m2m × scope guarantee — see the\n * {@link ResourceSpecificationConfig} JSDoc).\n */\nexport function resourceSpecificationFromFrontendConfiguration<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n frontendConfiguration: ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema>,\n base: ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>,\n configFactory: (\n params: ResourceSpecificationFromFrontendConfigurationCallbackParams<TCustomOp, TCoreOp, TSchema>,\n ) => ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp>,\n options: ResourceSpecificationFromFrontendConfigurationOptions<TCustomOp, TCoreOp, TSchema> = {},\n): ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema> {\n const schema = frontendConfiguration.schema;\n const schemaShape = (\n schema && 'shape' in schema\n ? (schema as unknown as z.ZodObject<any>).shape\n : getZodObjectShape(schema)\n ) as ObjectShape<TSchema>;\n\n // F-2: read the scope from `base` (always set when `base` came from\n // `resourceSpecification(...)`; may be `undefined` only on hand-built\n // bases — those forfeit the m2m × scope cross-check on this re-validation\n // path).\n const baseScope = base.resourcePrimaryScope;\n\n // Resource-type label (e.g. \"USER_PREFERENCES\") used to make spec↔config drift\n // errors self-documenting. Sourced from `base.resourceType.memberName` (set via\n // the spec's `codeHandling.resourceType`); empty string when the author did not\n // declare one — the drift errors then read `(...)` and say so. Reused below for\n // the `validateFieldShapes` prefix so the extraction lives in one place.\n const baseResourceTypeRef = (base as { resourceType?: { memberName?: unknown } }).resourceType;\n const resourceLabel = baseResourceTypeRef && typeof baseResourceTypeRef.memberName === 'string'\n ? baseResourceTypeRef.memberName\n : '';\n\n const frontendConfig = configFactory({\n base,\n frontendConfiguration,\n schema,\n schemaShape,\n surfacedOperations: frontendConfiguration.surfacedOperations,\n });\n validateFrontendSpecificationAgainstConfiguration(frontendConfiguration, frontendConfig, resourceLabel);\n /*\n * Idempotently re-validate `base.operations` here so a hand-built `base`\n * (one that bypassed `resourceSpecification()` and therefore the\n * factory-site validation pass) still gets caught on the same branches as\n * the factory path. Production call paths produce `base` from\n * `resourceSpecification()` so this is a defensive no-op for them, but it\n * forecloses a quiet failure mode where a future caller assembles `base`\n * by hand and the contract drifts silently. Symmetric with the\n * `frontend.views` re-validation directly below.\n */\n validateResourceOperationsCommunications(\n 'base.operations.',\n base.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n baseScope,\n );\n validateResourceOperationsScheduledExecution(\n 'base.operations.',\n base.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n );\n validateResourceOperationsErrorScenarios(\n 'base.operations.',\n base.operations as Record<string, ResourceOperationSpecification | undefined> | undefined,\n );\n /*\n * Re-validate `base.frontend?.views` too. A hand-built `base` MAY ship\n * frontend-view overlays directly (the type allows it), and those overlays\n * carry the same `communications` / `scheduledExecution` slots as the\n * configFactory output — without this pass, a base-level frontend view\n * could ship a malformed `deliveries` array and only get caught the next\n * time the merged result was re-fed through the factory.\n */\n validateResourceOperationsCommunications(\n 'base.frontend.views.',\n base.frontend?.views as\n | Record<string, ResourceFrontendViewSpecification | undefined>\n | undefined,\n baseScope,\n );\n validateResourceOperationsScheduledExecution(\n 'base.frontend.views.',\n base.frontend?.views as\n | Record<string, ResourceFrontendViewSpecification | undefined>\n | undefined,\n );\n if ((base.pdfTemplates?.length ?? 0) > 0 && !options.resourceConfig) {\n throw new Error(\n 'resourceSpecificationFromFrontendConfiguration(): base.pdfTemplates requires options.resourceConfig so generated PDF runtime operations are validated on the frontend-configuration path.',\n );\n }\n validateResourcePdfTemplates('base.', base.pdfTemplates, schema, options.resourceConfig);\n validateResourceCollectionExports('base.', base.collectionExports, Object.keys(base.operations ?? {}));\n validateResourceOperationsCommunications(\n 'frontend.views.',\n frontendConfig.views as Record<string, ResourceFrontendViewSpecification | undefined> | undefined,\n baseScope,\n );\n validateResourceOperationsScheduledExecution(\n 'frontend.views.',\n frontendConfig.views as Record<string, ResourceFrontendViewSpecification | undefined> | undefined,\n );\n\n // Step 6 D-6 Phase 3 — defensive re-validation of `base.fields` /\n // `base.additionalFieldSpecs`. Production callers produce `base` from\n // `resourceSpecification(...)` so this is a no-op for them, but it\n // forecloses the same hand-built-base drift the operations passes\n // above already guard against.\n //\n // Reuse the `resourceLabel` extracted above (from `base.resourceType.memberName`,\n // set by the authoring resource through `codeHandling.resourceType`); when the\n // author did not declare one, fall back to the bare prefix.\n const frontendFieldShapesPrefix = resourceLabel.length > 0\n ? `resourceSpecificationFromFrontendConfiguration(${resourceLabel}): base.`\n : 'resourceSpecificationFromFrontendConfiguration(): base.';\n validateFieldShapes(frontendFieldShapesPrefix, {\n fields: base.fields as Record<string, z.ZodTypeAny> | undefined,\n additionalFieldSpecs: base.additionalFieldSpecs,\n });\n\n return {\n ...base,\n frontend: mergeFrontendSpecification(base.frontend, frontendConfig),\n };\n}\n\nfunction buildSurfacedOperationMap<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n uiBehavior: ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>,\n): ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp> {\n const surfacedOperations: Record<string, { hasDefaultVariant: boolean; variantKeys: string[] }> = {};\n\n for (const operationKey of uiBehavior.views.keys()) {\n if (Array.isArray(operationKey)) {\n const [operationId, variantKey] = operationKey;\n const operationEntry = surfacedOperations[String(operationId)] ?? {\n hasDefaultVariant: false,\n variantKeys: [],\n };\n if (!operationEntry.variantKeys.includes(variantKey)) {\n operationEntry.variantKeys.push(variantKey);\n }\n surfacedOperations[String(operationId)] = operationEntry;\n continue;\n }\n\n const operationEntry = surfacedOperations[String(operationKey)] ?? {\n hasDefaultVariant: false,\n variantKeys: [],\n };\n operationEntry.hasDefaultVariant = true;\n surfacedOperations[String(operationKey)] = operationEntry;\n }\n\n return surfacedOperations as ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp>;\n}\n\nfunction buildFrontendOperationSurfaceMap<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n uiBehavior: ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>,\n): ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp> {\n const surfacedOperations: Record<string, ResourceFrontendOperationSurfaceGroup> = {};\n\n // Compute, per operation, the canonical list of resource-owned view refs\n // rendered inside that operation host, directly from the view declarations:\n //\n // - Composite + chart views declare surfacing via a single `operationLike`\n // (they render inside exactly one operation host). The\n // `CoreResourceOperation.READ` fallback MUST match the Zod default on the\n // corresponding authoring schemas (`InsertedChartDeclarationSchema.operationLike`,\n // `ResourceCompositeViewAuthoringConfig.operationLike`) — if those\n // defaults ever diverge, the runtime layout filter and the specification\n // extraction would disagree silently on where the view surfaces.\n // - Execution views declare surfacing via a list `surfaceInOperations`\n // (one execution surface can legitimately render in multiple operation\n // hosts, e.g. READ + UPDATE).\n //\n // Canonical per-operation order: composites → charts → executions. This\n // matches the order `ResourceLayout_InsertedViews` uses when rendering\n // inserted segments, so the spec faithfully mirrors what the layout shows.\n const linkedRefsByOperation = new Map<string, string[]>();\n for (const source of [\n collectOperationLikeViewRefs(uiBehavior.compositeViews, CoreResourceOperation.READ),\n collectOperationLikeViewRefs(uiBehavior.chartViews, CoreResourceOperation.READ),\n collectExecutionViewSurfaceRefsByOperation(uiBehavior.executionViews),\n ]) {\n for (const [key, refs] of source.entries()) {\n const existing = linkedRefsByOperation.get(key) ?? [];\n linkedRefsByOperation.set(key, [...existing, ...refs]);\n }\n }\n\n // NOTE: this mirrors the AUTHORED UI behavior (`uiBehavior.views`). An operation\n // surfaced ONLY by the build-time `defaultFrontendPosture: API_ONLY` default — i.e.\n // not present in `views` — is intentionally absent here; the spec documents what the\n // app authored, and a headless (API_ONLY) op has no frontend surface to document.\n for (const [operationKey, frontendConfig] of uiBehavior.views.entries()) {\n const serializedKey = Array.isArray(operationKey)\n ? `${operationKey[0]}::${operationKey[1]}`\n : String(operationKey);\n const operationSurface = buildFrontendOperationSurface(\n frontendConfig,\n linkedRefsByOperation.get(serializedKey) ?? [],\n );\n if (Array.isArray(operationKey)) {\n const [operationId, variantKey] = operationKey;\n const group = surfacedOperations[String(operationId)] ?? {};\n surfacedOperations[String(operationId)] = {\n ...group,\n variants: {\n ...(group.variants ?? {}),\n [variantKey]: operationSurface,\n },\n };\n continue;\n }\n\n const group = surfacedOperations[String(operationKey)] ?? {};\n surfacedOperations[String(operationKey)] = {\n ...group,\n default: operationSurface,\n };\n }\n\n return surfacedOperations as ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp>;\n}\n\nfunction buildFrontendOperationSurface(\n frontendConfig: ResourceOperationFrontendConfig,\n operationLinkedViewRefs: string[],\n): ResourceFrontendOperationSurface {\n return {\n surface: frontendConfig.surface,\n hasCustomView: frontendConfig.customView !== undefined,\n additionalViewRefs: operationLinkedViewRefs,\n hasDisplayPresetOverride: frontendConfig.displayPresetOverride !== undefined,\n hasNavigationOverrides: (frontendConfig.navigationOverrides?.length ?? 0) > 0,\n displayPriority: frontendConfig.displayPriority,\n hasIconOverride: frontendConfig.iconOverride !== undefined,\n };\n}\n\nfunction resolveFrontendLabelAspect(\n label: ResourceUIBehaviorConfig<any, any, any>['getFrontendResourceLabel'],\n): ResourceFrontendLabelAspect | undefined {\n if (label === undefined) {\n return undefined;\n }\n\n if (Array.isArray(label)) {\n return {\n strategy: 'field-paths',\n fieldNames: [...label],\n };\n }\n\n return {\n strategy: 'computed',\n };\n}\n\nfunction resolveFrontendLayoutAspect<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n uiBehavior: ResourceUIBehaviorConfig<TCustomOp, TCoreOp, TSchema>,\n): ResourceFrontendLayoutAspect | undefined {\n if (uiBehavior.layout === undefined) {\n return undefined;\n }\n\n return {\n refs: uiBehavior.layout.refs,\n hasDisplayTemplate: uiBehavior.layout.display !== undefined,\n hasSummaryTemplate: uiBehavior.layout.summary !== undefined,\n hasEditTemplate: uiBehavior.layout.edit !== undefined,\n };\n}\n\nfunction indexGuidanceByRef(\n guidance: ResourceUIBehaviorConfig<any, any, any>['guidance'],\n): Record<string, ResourceUIBehavior_GuidanceFlow> | undefined {\n if (guidance === undefined || guidance.length === 0) {\n return undefined;\n }\n\n return Object.fromEntries(\n guidance.map((entry) => [entry.ref, entry]),\n );\n}\n\nfunction mergeFrontendSpecification<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n>(\n base: ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp> | undefined,\n incoming: ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp>,\n): ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp> {\n return {\n ...base,\n ...incoming,\n ...(base?.guidance !== undefined || incoming.guidance !== undefined\n ? {\n guidance: mergeGuidanceSpecificationMap(\n base?.guidance,\n incoming.guidance,\n ),\n }\n : {}),\n ...(base?.layout !== undefined || incoming.layout !== undefined\n ? {\n layout: mergeLayoutSpecification(\n base?.layout,\n incoming.layout,\n ),\n }\n : {}),\n ...(base?.emptyState !== undefined || incoming.emptyState !== undefined\n ? {\n emptyState: mergeEmptyStateSpecification(\n base?.emptyState,\n incoming.emptyState,\n ),\n }\n : {}),\n ...(base?.views !== undefined || incoming.views !== undefined\n ? {\n views: mergeFrontendViewSpecificationMaps(\n base?.views,\n incoming.views,\n ),\n }\n : {}),\n };\n}\n\nfunction mergeLayoutSpecification(\n base: ResourceFrontendLayoutSpecification | undefined,\n incoming: ResourceFrontendLayoutSpecification | undefined,\n): ResourceFrontendLayoutSpecification | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n ...base,\n ...incoming,\n sections: mergeStructuralTranslationSlotMap(base.sections, incoming.sections),\n wizardSteps: mergeStructuralTranslationSlotMap(base.wizardSteps, incoming.wizardSteps),\n groups: mergeStructuralTranslationSlotMap(base.groups, incoming.groups),\n };\n}\n\nfunction mergeGuidanceSpecificationMap(\n base: ResourceSpecificationFrontendConfig<any, any>['guidance'] | undefined,\n incoming: ResourceSpecificationFrontendConfig<any, any>['guidance'] | undefined,\n): ResourceSpecificationFrontendConfig<any, any>['guidance'] | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return Object.fromEntries(\n Array.from(new Set([\n ...Object.keys(base),\n ...Object.keys(incoming),\n ])).map((guidanceRef) => {\n const baseEntry = base[guidanceRef];\n const incomingEntry = incoming[guidanceRef];\n if (baseEntry === undefined) {\n return [guidanceRef, incomingEntry];\n }\n if (incomingEntry === undefined) {\n return [guidanceRef, baseEntry];\n }\n return [guidanceRef, {\n ...baseEntry,\n ...incomingEntry,\n textSlots: mergeTranslationSlotSpecificationMap(baseEntry.textSlots, incomingEntry.textSlots),\n elements: mergeGuidanceElementSpecificationMap(baseEntry.elements, incomingEntry.elements),\n }];\n }),\n );\n}\n\nfunction mergeGuidanceElementSpecificationMap(\n base: NonNullable<ResourceFrontendGuidanceFlowSpecification['elements']> | undefined,\n incoming: NonNullable<ResourceFrontendGuidanceFlowSpecification['elements']> | undefined,\n): NonNullable<ResourceFrontendGuidanceFlowSpecification['elements']> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return Object.fromEntries(\n Array.from(new Set([\n ...Object.keys(base),\n ...Object.keys(incoming),\n ])).map((elementRef) => {\n const baseEntry = base[elementRef];\n const incomingEntry = incoming[elementRef];\n if (baseEntry === undefined) {\n return [elementRef, incomingEntry];\n }\n if (incomingEntry === undefined) {\n return [elementRef, baseEntry];\n }\n return [elementRef, {\n ...baseEntry,\n ...incomingEntry,\n textSlots: mergeTranslationSlotSpecificationMap(baseEntry.textSlots, incomingEntry.textSlots),\n }];\n }),\n );\n}\n\nfunction mergeStructuralTranslationSlotMap(\n base: Record<string, ResourceFrontendStructuralSlotSpecification> | undefined,\n incoming: Record<string, ResourceFrontendStructuralSlotSpecification> | undefined,\n): Record<string, ResourceFrontendStructuralSlotSpecification> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return Object.fromEntries(\n Array.from(new Set([\n ...Object.keys(base),\n ...Object.keys(incoming),\n ])).map((slotRef) => {\n const baseEntry = base[slotRef];\n const incomingEntry = incoming[slotRef];\n if (baseEntry === undefined) {\n return [slotRef, incomingEntry];\n }\n if (incomingEntry === undefined) {\n return [slotRef, baseEntry];\n }\n return [slotRef, {\n ...baseEntry,\n ...incomingEntry,\n textSlots: mergeTranslationSlotSpecificationMap(baseEntry.textSlots, incomingEntry.textSlots),\n }];\n }),\n );\n}\n\nfunction mergeTranslationSlotSpecificationMap(\n base: TranslationSlotSpecificationMap | undefined,\n incoming: TranslationSlotSpecificationMap | undefined,\n): TranslationSlotSpecificationMap | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return Object.fromEntries(\n Array.from(new Set([\n ...Object.keys(base),\n ...Object.keys(incoming),\n ])).map((slotName) => {\n const baseEntry = base[slotName];\n const incomingEntry = incoming[slotName];\n if (baseEntry === undefined) {\n return [slotName, incomingEntry];\n }\n if (incomingEntry === undefined) {\n return [slotName, baseEntry];\n }\n return [slotName, {\n ...baseEntry,\n ...incomingEntry,\n notes: mergeStringLists(baseEntry.notes, incomingEntry.notes),\n }];\n }),\n );\n}\n\nfunction mergeStringLists(\n base: string[] | undefined,\n incoming: string[] | undefined,\n): string[] | undefined {\n const merged = Array.from(new Set([...(base ?? []), ...(incoming ?? [])]));\n return merged.length > 0 ? merged : undefined;\n}\n\nfunction mergeEmptyStateSpecification(\n base: ResourceFrontendEmptyStateSpecification | undefined,\n incoming: ResourceFrontendEmptyStateSpecification | undefined,\n): ResourceFrontendEmptyStateSpecification | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n ...base,\n ...incoming,\n };\n}\n\nfunction mergeFrontendViewSpecificationMaps<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n>(\n base: ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp> | undefined,\n incoming: ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp> | undefined,\n): ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n const mergedViews: Record<string, ResourceFrontendViewSpecification> = {\n ...(base as Record<string, ResourceFrontendViewSpecification>),\n };\n\n for (const [operationId, incomingView] of Object.entries(\n incoming as Record<string, ResourceFrontendViewSpecification>,\n )) {\n const baseView = mergedViews[operationId];\n const mergedVariants = {\n ...(baseView?.variants ?? {}),\n ...(incomingView.variants ?? {}),\n };\n const mergedHostVariants = {\n ...(baseView?.views?.variants ?? {}),\n ...(incomingView.views?.variants ?? {}),\n };\n\n mergedViews[operationId] = {\n ...baseView,\n ...incomingView,\n ...(Object.keys(mergedVariants).length > 0\n ? { variants: mergedVariants }\n : {}),\n ...(baseView?.views !== undefined || incomingView.views !== undefined\n ? {\n views: {\n default: incomingView.views?.default ?? baseView?.views?.default,\n ...(Object.keys(mergedHostVariants).length > 0\n ? { variants: mergedHostVariants }\n : {}),\n },\n }\n : {}),\n };\n }\n\n return mergedViews as ResourceFrontendViewSpecificationMap<TCustomOp, TCoreOp>;\n}\n\nfunction mergeEmptyStateAspect(\n base: ResourceUIBehavior_EmptyState | undefined,\n incoming: ResourceUIBehavior_EmptyState | undefined,\n): ResourceUIBehavior_EmptyState | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n ...base,\n ...incoming,\n secondaryAction: incoming.secondaryAction ?? base.secondaryAction,\n };\n}\n\nfunction mergeFrontendLayoutAspect(\n base: ResourceFrontendLayoutAspect | undefined,\n incoming: ResourceFrontendLayoutAspect | undefined,\n): ResourceFrontendLayoutAspect | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n refs: mergeLayoutRefManifest(base.refs, incoming.refs),\n hasDisplayTemplate: base.hasDisplayTemplate || incoming.hasDisplayTemplate,\n hasSummaryTemplate: base.hasSummaryTemplate || incoming.hasSummaryTemplate,\n hasEditTemplate: base.hasEditTemplate || incoming.hasEditTemplate,\n };\n}\n\nfunction mergeLayoutRefManifest(\n base: LayoutRefManifest | undefined,\n incoming: LayoutRefManifest | undefined,\n): LayoutRefManifest | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n sections: mergeStringLists(base.sections, incoming.sections),\n wizardSteps: mergeStringLists(base.wizardSteps, incoming.wizardSteps),\n groups: mergeStringLists(base.groups, incoming.groups),\n };\n}\n\nfunction mergeGuidanceAspect(\n base: Record<string, ResourceUIBehavior_GuidanceFlow> | undefined,\n incoming: Record<string, ResourceUIBehavior_GuidanceFlow> | undefined,\n): Record<string, ResourceUIBehavior_GuidanceFlow> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n return {\n ...base,\n ...incoming,\n };\n}\n\nfunction mergeRelationshipOverrides(\n base: ResourceFrontendConfigurationAspect<any, any, any>['relationshipOverrides'],\n incoming: ResourceFrontendConfigurationAspect<any, any, any>['relationshipOverrides'],\n): ResourceFrontendConfigurationAspect<any, any, any>['relationshipOverrides'] {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n const mergedOverrides = new Map<string, NonNullable<typeof base>[number]>();\n for (const override of base) {\n mergedOverrides.set(buildRelationshipOverrideKey(override), override);\n }\n for (const override of incoming) {\n mergedOverrides.set(buildRelationshipOverrideKey(override), override);\n }\n return [...mergedOverrides.values()];\n}\n\nfunction buildRelationshipOverrideKey(\n override: NonNullable<ResourceFrontendConfigurationAspect<any, any, any>['relationshipOverrides']>[number],\n): string {\n return [\n override.target,\n override.foreignKeyField ?? '__default__',\n ].join('::');\n}\n\nfunction mergeSurfacedOperationMaps<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n>(\n base: ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp> | undefined,\n incoming: ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp> | undefined,\n): ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n const mergedOperations: Record<string, { hasDefaultVariant: boolean; variantKeys: string[] }> = {\n ...(base as Record<string, { hasDefaultVariant: boolean; variantKeys: string[] }>),\n };\n\n for (const [operationId, incomingOperation] of Object.entries(\n incoming as Record<string, { hasDefaultVariant: boolean; variantKeys: string[] }>,\n )) {\n const baseOperation = mergedOperations[operationId];\n mergedOperations[operationId] = {\n hasDefaultVariant: Boolean(baseOperation?.hasDefaultVariant) || incomingOperation.hasDefaultVariant,\n variantKeys: mergeStringLists(baseOperation?.variantKeys, incomingOperation.variantKeys) ?? [],\n };\n }\n\n return mergedOperations as ResourceSpecificationSurfacedOperationMap<TCustomOp, TCoreOp>;\n}\n\nfunction mergeFrontendOperationSurfaceMaps<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n>(\n base: ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp> | undefined,\n incoming: ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp> | undefined,\n): ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp> | undefined {\n if (base === undefined) {\n return incoming;\n }\n\n if (incoming === undefined) {\n return base;\n }\n\n const mergedOperations: Record<string, ResourceFrontendOperationSurfaceGroup> = {\n ...(base as Record<string, ResourceFrontendOperationSurfaceGroup>),\n };\n\n for (const [operationId, incomingOperation] of Object.entries(\n incoming as Record<string, ResourceFrontendOperationSurfaceGroup>,\n )) {\n const baseOperation = mergedOperations[operationId];\n mergedOperations[operationId] = {\n default: incomingOperation.default ?? baseOperation?.default,\n variants: {\n ...(baseOperation?.variants ?? {}),\n ...(incomingOperation.variants ?? {}),\n },\n };\n }\n\n return mergedOperations as ResourceFrontendOperationSurfaceMap<TCustomOp, TCoreOp>;\n}\n\nfunction ensureCompatibleFrontendConfigurationSchemas(\n base: z.ZodTypeAny,\n incoming: z.ZodTypeAny,\n): void {\n if (base === incoming) {\n return;\n }\n\n const baseShape = getZodObjectShape(base);\n const incomingShape = getZodObjectShape(incoming);\n const baseKeys = Object.keys(baseShape).sort();\n const incomingKeys = Object.keys(incomingShape).sort();\n\n if (\n baseKeys.length !== incomingKeys.length\n || baseKeys.some((key, index) => key !== incomingKeys[index])\n ) {\n throw new Error(\n 'mergeResourceFrontendConfigurations() can only merge frontend configurations that resolve to the same resource schema shape.',\n );\n }\n\n for (const key of baseKeys) {\n if (baseShape[key] !== incomingShape[key]) {\n throw new Error(\n 'mergeResourceFrontendConfigurations() can only merge frontend configurations built from the same schema field instances.',\n );\n }\n }\n}\n\nfunction validateFrontendSpecificationAgainstConfiguration<\n TCustomOp extends EnumLikeType | undefined,\n TCoreOp extends Partial<CoreResourceOperation> | undefined,\n TSchema extends z.ZodTypeAny,\n>(\n frontendConfiguration: ResourceFrontendConfigurationAspect<TCustomOp, TCoreOp, TSchema>,\n frontendSpec: ResourceSpecificationFrontendConfig<TCustomOp, TCoreOp>,\n resourceLabel: string,\n): void {\n // Both refusals name the resource, like the layout ones below: the companion's labelling planner reports this\n // message verbatim as the reason EVERY resource unit was left unplanned, so without the name a reader has to\n // search each specification that documents the aspect to find the one that drifted.\n if (frontendSpec.label && frontendConfiguration.label === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(${resourceLabel}): \\`frontend.label\\` was documented, but the merged frontend configuration has no label strategy.`,\n );\n }\n\n if (frontendSpec.emptyState && frontendConfiguration.emptyState === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(${resourceLabel}): \\`frontend.emptyState\\` was documented, but the merged frontend configuration has no empty state. `\n + 'Declare `emptyState: {}` (or with an icon) in the resource\\'s ui-behavior if the collection has an empty state, or remove `frontend.emptyState` from the specification if it does not.',\n );\n }\n\n if (frontendSpec.layout) {\n if (frontendConfiguration.layout === undefined) {\n throw new Error(\n 'resourceSpecificationFromFrontendConfiguration(): `frontend.layout` was documented, but the merged frontend configuration has no layout.',\n );\n }\n\n validateStructuralSlotDescriptions(\n 'sections',\n Object.keys(frontendSpec.layout.sections ?? {}),\n frontendSpec.layout.sections,\n frontendConfiguration.layout.refs?.sections,\n resourceLabel,\n );\n validateStructuralSlotDescriptions(\n 'wizardSteps',\n Object.keys(frontendSpec.layout.wizardSteps ?? {}),\n frontendSpec.layout.wizardSteps,\n frontendConfiguration.layout.refs?.wizardSteps,\n resourceLabel,\n );\n validateStructuralSlotDescriptions(\n 'groups',\n Object.keys(frontendSpec.layout.groups ?? {}),\n frontendSpec.layout.groups,\n frontendConfiguration.layout.refs?.groups,\n resourceLabel,\n );\n }\n\n for (const guidanceRef of Object.keys(frontendSpec.guidance ?? {})) {\n const runtimeGuidance = frontendConfiguration.guidance?.[guidanceRef];\n if (runtimeGuidance === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): guidance \"${guidanceRef}\" is documented but does not exist in the merged frontend configuration.`,\n );\n }\n\n const documentedElementRefs = Object.keys(frontendSpec.guidance?.[guidanceRef]?.elements ?? {});\n const runtimeElementRefs = new Set((runtimeGuidance.elements ?? []).map((element) => element.ref));\n for (const elementRef of documentedElementRefs) {\n if (!runtimeElementRefs.has(elementRef)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): guidance \"${guidanceRef}\" documents element \"${elementRef}\" but the merged frontend configuration does not declare it.`,\n );\n }\n }\n }\n\n for (const [operationId, operationSpec] of Object.entries(\n (frontendSpec.views ?? {}) as Record<string, ResourceFrontendViewSpecification>,\n )) {\n const surfacedOperation = (\n frontendConfiguration.operations as Record<string, ResourceFrontendOperationSurfaceGroup | undefined>\n )[operationId];\n if (surfacedOperation === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" is documented in frontend semantics but is not surfaced by the merged frontend configuration.`,\n );\n }\n\n for (const variantKey of Object.keys(operationSpec?.variants ?? {})) {\n if (variantKey === 'default') {\n if (surfacedOperation.default === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents a default variant that is not surfaced by the merged frontend configuration.`,\n );\n }\n continue;\n }\n\n if (surfacedOperation.variants?.[variantKey] === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents variant \"${variantKey}\" that is not surfaced by the merged frontend configuration.`,\n );\n }\n }\n\n validateDocumentedOperationViewSpecification(\n operationId,\n 'default',\n operationSpec.views?.default,\n surfacedOperation.default,\n );\n\n for (const [variantKey, documentedViews] of Object.entries(operationSpec.views?.variants ?? {})) {\n validateDocumentedOperationViewSpecification(\n operationId,\n variantKey,\n documentedViews,\n surfacedOperation.variants?.[variantKey],\n );\n }\n }\n}\n\nfunction validateDocumentedOperationViewSpecification(\n operationId: string,\n variantKey: string,\n documentedViews: ResourceOperationViewSpecification | undefined,\n surfacedOperation: ResourceFrontendOperationSurface | undefined,\n): void {\n if (!documentedViews) {\n return;\n }\n\n if (surfacedOperation === undefined) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents view metadata for variant \"${variantKey}\" that is not surfaced by the merged frontend configuration.`,\n );\n }\n\n if (documentedViews.customView && !surfacedOperation.hasCustomView) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents a customView for variant \"${variantKey}\" but the merged frontend configuration has no customView there.`,\n );\n }\n\n if (!documentedViews.customView && surfacedOperation.hasCustomView) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" exposes a customView for variant \"${variantKey}\" but the semantic specification does not document it.`,\n );\n }\n\n if (documentedViews.customView) {\n validateRequiredOperationViewTextSlots(\n `operation \"${operationId}\" customView for variant \"${variantKey}\"`,\n documentedViews.customView.textSlots,\n );\n }\n\n const documentedOtherViews = documentedViews.otherViews ?? [];\n const documentedViewRefs = new Set(documentedOtherViews.map((view) => view.viewRef));\n\n for (const otherView of documentedOtherViews) {\n if (!surfacedOperation.additionalViewRefs.includes(otherView.viewRef)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" documents linked view \"${otherView.viewRef}\" for variant \"${variantKey}\" but no resource-owned view declaration targets this operation host via \\`operationLike\\` / \\`surfaceInOperations\\`.`,\n );\n }\n\n validateRequiredOperationViewTextSlots(\n `operation \"${operationId}\" linked view \"${otherView.viewRef}\" for variant \"${variantKey}\"`,\n otherView.textSlots,\n );\n }\n\n for (const surfacedViewRef of surfacedOperation.additionalViewRefs) {\n if (!documentedViewRefs.has(surfacedViewRef)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): operation \"${operationId}\" exposes linked view \"${surfacedViewRef}\" for variant \"${variantKey}\" but the semantic specification does not document it.`,\n );\n }\n }\n}\n\nconst RESOURCE_OPERATION_VIEW_REQUIRED_TEXT_SLOTS = ['title', 'description'];\n\nfunction validateRequiredOperationViewTextSlots(\n subject: string,\n documentedTextSlots: TranslationSlotSpecificationMap | undefined,\n): void {\n const knownTextSlots = new Set(Object.keys(documentedTextSlots ?? {}));\n for (const textSlotKey of RESOURCE_OPERATION_VIEW_REQUIRED_TEXT_SLOTS) {\n if (!knownTextSlots.has(textSlotKey)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): ${subject} must document text slot \"${textSlotKey}\" so linked or overridden view chrome stays semantically grounded.`,\n );\n }\n }\n}\n\n/**\n * The text slots every documented structural slot MUST ground. The remaining slot is OPTIONAL: a slot\n * that documents it gets a generated label, one that does not gets none, and the runtime renders\n * nothing where it would have gone (`tResourceSection(…, 'description')` answers '' on a miss).\n *\n * A SECTION's description is optional since 2026-09-25, and requiring it was the defect. The rule\n * made every section in every application carry a sub-heading, so the labeller wrote one whether or\n * not there was anything to say — Wonder Todos' task read view showed \"Workflow — Choose a workflow\",\n * \"Effort — Estimate required effort\", \"Assignment — Choose an assignee\": edit prompts on a page where\n * nothing could be chosen, restating the heading above them. A description that informs (\"each delay\n * counts from the escalation, not from the previous attempt\") is still documented and still generated;\n * one that would only restate its heading is simply not written.\n *\n * A WIZARD STEP keeps both: a step is a stage the author passes through one at a time, and saying what\n * the stage is for is the stepper's job.\n */\nconst RESOURCE_LAYOUT_REQUIRED_TEXT_SLOTS: Record<'sections' | 'wizardSteps' | 'groups', string[]> = {\n sections: ['title'],\n wizardSteps: ['title', 'description'],\n groups: ['title'],\n};\n\nfunction validateStructuralSlotDescriptions(\n slotKind: 'sections' | 'wizardSteps' | 'groups',\n documentedRefs: string[],\n documentedSlots: Record<string, ResourceFrontendStructuralSlotSpecification> | undefined,\n surfacedRefs: string[] | undefined,\n resourceLabel: string,\n): void {\n const knownRefs = new Set(surfacedRefs ?? []);\n // Self-documenting drift errors: name the resource, show BOTH sides (what the\n // runtime layout declares vs what the spec documents), and spell out the two\n // ways to reconcile — so the reader fixes it without reading the stack trace\n // or guessing. The \"shared layout\" note exists because self/admin and\n // polymorphic resources reuse one layout (`layout: main[<SELF>].layout`), so a\n // single slot removal drifts EVERY spec that documents it (recovered from the\n // 2026-06-25 user-self-preferences → user-preferences crash-loop).\n const fnPrefix = `resourceSpecificationFromFrontendConfiguration(${resourceLabel})`;\n const declaredList = (surfacedRefs ?? []).join(', ') || '(none)';\n const documentedList = documentedRefs.join(', ') || '(none)';\n const slotSingular = slotKind === 'sections' ? 'section' : slotKind === 'wizardSteps' ? 'wizard step' : 'group';\n\n for (const documentedRef of documentedRefs) {\n if (!knownRefs.has(documentedRef)) {\n throw new Error(\n `${fnPrefix}: ${slotKind} \"${documentedRef}\" is documented in the spec but is NOT declared by the resource's merged frontend layout.\\n` +\n ` layout declares (runtime truth): ${declaredList}\\n` +\n ` spec documents: ${documentedList}\\n` +\n ` Fix ONE side so they match:\\n` +\n ` - remove \"${documentedRef}\" from the spec's frontend.layout.${slotKind} (if the layout intentionally dropped the ${slotSingular}), or\\n` +\n ` - add a \"${documentedRef}\" ${slotSingular} ref to the resource's ui-behavior layout (if the ${slotSingular} should exist).\\n` +\n ` Note: self/admin & polymorphic resources often share one layout (an admin preset sets \"layout: main[<SELF>].layout\"), so the same drift can live in EVERY spec that documents this slot - search '${documentedRef}:' across all *.resource.specification.ts, not just this one.`,\n );\n }\n }\n\n for (const surfacedRef of surfacedRefs ?? []) {\n if (!documentedRefs.includes(surfacedRef)) {\n throw new Error(\n `${fnPrefix}: ${slotKind} \"${surfacedRef}\" is declared by the resource's merged frontend layout but the semantic specification does NOT document it.\\n` +\n ` layout declares (runtime truth): ${declaredList}\\n` +\n ` spec documents: ${documentedList}\\n` +\n ` Fix ONE side so they match:\\n` +\n ` - add a \"${surfacedRef}\" entry to the spec's frontend.layout.${slotKind} (document the ${slotSingular}), or\\n` +\n ` - remove the \"${surfacedRef}\" ${slotSingular} ref from the resource's ui-behavior layout (if it should not exist).`,\n );\n }\n }\n\n const requiredTextSlots = RESOURCE_LAYOUT_REQUIRED_TEXT_SLOTS[slotKind];\n if (requiredTextSlots.length === 0) {\n return;\n }\n\n for (const [slotRef, slotSpecification] of Object.entries(documentedSlots ?? {})) {\n const documentedTextSlots = new Set(Object.keys(slotSpecification.textSlots ?? {}));\n for (const textSlotKey of requiredTextSlots) {\n if (!documentedTextSlots.has(textSlotKey)) {\n throw new Error(\n `resourceSpecificationFromFrontendConfiguration(): ${slotKind} \"${slotRef}\" must document text slot \"${textSlotKey}\" so the generated labelling keys stay semantically grounded.`,\n );\n }\n }\n }\n}\n"]}
|